Imported Upstream version 3.8
[platform/upstream/diffutils.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for GNU diffutils 3.8.
4 #
5 # Report bugs to <bug-diffutils@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9 # Inc.
10 #
11 #
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 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 as_nop=:
21 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22 then :
23   emulate sh
24   NULLCMD=:
25   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26   # is contrary to our usage.  Disable this feature.
27   alias -g '${1+"$@"}'='"$@"'
28   setopt NO_GLOB_SUBST
29 else $as_nop
30   case `(set -o) 2>/dev/null` in #(
31   *posix*) :
32     set -o posix ;; #(
33   *) :
34      ;;
35 esac
36 fi
37
38
39
40 # Reset variables that may have inherited troublesome values from
41 # the environment.
42
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='
48 '
49 export as_nl
50 IFS=" ""        $as_nl"
51
52 PS1='$ '
53 PS2='> '
54 PS4='+ '
55
56 # Ensure predictable behavior from utilities with locale-dependent output.
57 LC_ALL=C
58 export LC_ALL
59 LANGUAGE=C
60 export LANGUAGE
61
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
71
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
76
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=';'
83   }
84 fi
85
86
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
93 do
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
103
104      ;;
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
110 fi
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
114 fi
115
116
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
139   fi
140   # We don't want this to propagate to other subprocesses.
141           { _as_can_reexec=; unset _as_can_reexec;}
142 if test "x$CONFIG_SHELL" = x; then
143   as_bourne_compatible="as_nop=:
144 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145 then :
146   emulate sh
147   NULLCMD=:
148   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149   # is contrary to our usage.  Disable this feature.
150   alias -g '\${1+\"\$@\"}'='\"\$@\"'
151   setopt NO_GLOB_SUBST
152 else \$as_nop
153   case \`(set -o) 2>/dev/null\` in #(
154   *posix*) :
155     set -o posix ;; #(
156   *) :
157      ;;
158 esac
159 fi
160 "
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; }
166
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 :
174
175 else \$as_nop
176   exitcode=1; echo positional parameters were not saved.
177 fi
178 test x\$exitcode = x0 || exit 1
179 blah=\$(echo \$(echo blah))
180 test x\"\$blah\" = xblah || exit 1
181 test -x / || exit 1"
182   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186 test \$(( 1 + 1 )) = 2 || exit 1"
187   if (eval "$as_required") 2>/dev/null
188 then :
189   as_have_required=yes
190 else $as_nop
191   as_have_required=no
192 fi
193   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194 then :
195
196 else $as_nop
197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198 as_found=false
199 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200 do
201   IFS=$as_save_IFS
202   case $as_dir in #(((
203     '') as_dir=./ ;;
204     */) ;;
205     *) as_dir=$as_dir/ ;;
206   esac
207   as_found=:
208   case $as_dir in #(
209          /*)
210            for as_base in sh bash ksh sh5; do
211              # Try only shells that exist, to save several forks.
212              as_shell=$as_dir$as_base
213              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214                     as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215 then :
216   CONFIG_SHELL=$as_shell as_have_required=yes
217                    if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218 then :
219   break 2
220 fi
221 fi
222            done;;
223        esac
224   as_found=false
225 done
226 IFS=$as_save_IFS
227 if $as_found
228 then :
229
230 else $as_nop
231   if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233 then :
234   CONFIG_SHELL=$SHELL as_have_required=yes
235 fi
236 fi
237
238
239       if test "x$CONFIG_SHELL" != x
240 then :
241   export CONFIG_SHELL
242              # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262     if test x$as_have_required = xno
263 then :
264   printf "%s\n" "$0: This script requires a shell more modern than all"
265   printf "%s\n" "$0: the shells that I found on your system."
266   if test ${ZSH_VERSION+y} ; then
267     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
269   else
270     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
271 $0: bug-diffutils@gnu.org about your system, including any
272 $0: error possibly output before this message. Then install
273 $0: a modern shell, or manually run the script under such a
274 $0: shell if you do have one."
275   fi
276   exit 1
277 fi
278 fi
279 fi
280 SHELL=${CONFIG_SHELL-/bin/sh}
281 export SHELL
282 # Unset more variables known to interfere with behavior of common tools.
283 CLICOLOR_FORCE= GREP_OPTIONS=
284 unset CLICOLOR_FORCE GREP_OPTIONS
285
286 ## --------------------- ##
287 ## M4sh Shell Functions. ##
288 ## --------------------- ##
289 # as_fn_unset VAR
290 # ---------------
291 # Portably unset VAR.
292 as_fn_unset ()
293 {
294   { eval $1=; unset $1;}
295 }
296 as_unset=as_fn_unset
297
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316 # as_fn_nop
317 # ---------
318 # Do nothing but, unlike ":", preserve the value of $?.
319 as_fn_nop ()
320 {
321   return $?
322 }
323 as_nop=as_fn_nop
324
325 # as_fn_mkdir_p
326 # -------------
327 # Create "$as_dir" as a directory, including parents if necessary.
328 as_fn_mkdir_p ()
329 {
330
331   case $as_dir in #(
332   -*) as_dir=./$as_dir;;
333   esac
334   test -d "$as_dir" || eval $as_mkdir_p || {
335     as_dirs=
336     while :; do
337       case $as_dir in #(
338       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
339       *) as_qdir=$as_dir;;
340       esac
341       as_dirs="'$as_qdir' $as_dirs"
342       as_dir=`$as_dirname -- "$as_dir" ||
343 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344          X"$as_dir" : 'X\(//\)[^/]' \| \
345          X"$as_dir" : 'X\(//\)$' \| \
346          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
347 printf "%s\n" X"$as_dir" |
348     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\/\)[^/].*/{
353             s//\1/
354             q
355           }
356           /^X\(\/\/\)$/{
357             s//\1/
358             q
359           }
360           /^X\(\/\).*/{
361             s//\1/
362             q
363           }
364           s/.*/./; q'`
365       test -d "$as_dir" && break
366     done
367     test -z "$as_dirs" || eval "mkdir $as_dirs"
368   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
369
370
371 } # as_fn_mkdir_p
372
373 # as_fn_executable_p FILE
374 # -----------------------
375 # Test if FILE is an executable regular file.
376 as_fn_executable_p ()
377 {
378   test -f "$1" && test -x "$1"
379 } # as_fn_executable_p
380 # as_fn_append VAR VALUE
381 # ----------------------
382 # Append the text in VALUE to the end of the definition contained in VAR. Take
383 # advantage of any shell optimizations that allow amortized linear growth over
384 # repeated appends, instead of the typical quadratic growth present in naive
385 # implementations.
386 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387 then :
388   eval 'as_fn_append ()
389   {
390     eval $1+=\$2
391   }'
392 else $as_nop
393   as_fn_append ()
394   {
395     eval $1=\$$1\$2
396   }
397 fi # as_fn_append
398
399 # as_fn_arith ARG...
400 # ------------------
401 # Perform arithmetic evaluation on the ARGs, and store the result in the
402 # global $as_val. Take advantage of shells that can avoid forks. The arguments
403 # must be portable across $(()) and expr.
404 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405 then :
406   eval 'as_fn_arith ()
407   {
408     as_val=$(( $* ))
409   }'
410 else $as_nop
411   as_fn_arith ()
412   {
413     as_val=`expr "$@" || test $? -eq 1`
414   }
415 fi # as_fn_arith
416
417 # as_fn_nop
418 # ---------
419 # Do nothing but, unlike ":", preserve the value of $?.
420 as_fn_nop ()
421 {
422   return $?
423 }
424 as_nop=as_fn_nop
425
426 # as_fn_error STATUS ERROR [LINENO LOG_FD]
427 # ----------------------------------------
428 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
430 # script with STATUS, using 1 if that was 0.
431 as_fn_error ()
432 {
433   as_status=$1; test $as_status -eq 0 && as_status=1
434   if test "$4"; then
435     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
436     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
437   fi
438   printf "%s\n" "$as_me: error: $2" >&2
439   as_fn_exit $as_status
440 } # as_fn_error
441
442 if expr a : '\(a\)' >/dev/null 2>&1 &&
443    test "X`expr 00001 : '.*\(...\)'`" = X001; then
444   as_expr=expr
445 else
446   as_expr=false
447 fi
448
449 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
450   as_basename=basename
451 else
452   as_basename=false
453 fi
454
455 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456   as_dirname=dirname
457 else
458   as_dirname=false
459 fi
460
461 as_me=`$as_basename -- "$0" ||
462 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463          X"$0" : 'X\(//\)$' \| \
464          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
465 printf "%s\n" X/"$0" |
466     sed '/^.*\/\([^/][^/]*\)\/*$/{
467             s//\1/
468             q
469           }
470           /^X\/\(\/\/\)$/{
471             s//\1/
472             q
473           }
474           /^X\/\(\/\).*/{
475             s//\1/
476             q
477           }
478           s/.*/./; q'`
479
480 # Avoid depending upon Character Ranges.
481 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484 as_cr_digits='0123456789'
485 as_cr_alnum=$as_cr_Letters$as_cr_digits
486
487
488   as_lineno_1=$LINENO as_lineno_1a=$LINENO
489   as_lineno_2=$LINENO as_lineno_2a=$LINENO
490   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
493   sed -n '
494     p
495     /[$]LINENO/=
496   ' <$as_myself |
497     sed '
498       s/[$]LINENO.*/&-/
499       t lineno
500       b
501       :lineno
502       N
503       :loop
504       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
505       t loop
506       s/-\n.*//
507     ' >$as_me.lineno &&
508   chmod +x "$as_me.lineno" ||
509     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
510
511   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512   # already done that, so ensure we don't try to do so again and fall
513   # in an infinite loop.  This has already happened in practice.
514   _as_can_reexec=no; export _as_can_reexec
515   # Don't try to exec as it changes $[0], causing all sort of problems
516   # (the dirname of $[0] is not the place where we might find the
517   # original and so on.  Autoconf is especially sensitive to this).
518   . "./$as_me.lineno"
519   # Exit status is that of the last command.
520   exit
521 }
522
523
524 # Determine whether it's possible to make 'echo' print without a newline.
525 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526 # for compatibility with existing Makefiles.
527 ECHO_C= ECHO_N= ECHO_T=
528 case `echo -n x` in #(((((
529 -n*)
530   case `echo 'xy\c'` in
531   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
532   xy)  ECHO_C='\c';;
533   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
534        ECHO_T=' ';;
535   esac;;
536 *)
537   ECHO_N='-n';;
538 esac
539
540 # For backward compatibility with old third-party macros, we provide
541 # the shell variables $as_echo and $as_echo_n.  New code should use
542 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543 as_echo='printf %s\n'
544 as_echo_n='printf %s'
545
546
547 rm -f conf$$ conf$$.exe conf$$.file
548 if test -d conf$$.dir; then
549   rm -f conf$$.dir/conf$$.file
550 else
551   rm -f conf$$.dir
552   mkdir conf$$.dir 2>/dev/null
553 fi
554 if (echo >conf$$.file) 2>/dev/null; then
555   if ln -s conf$$.file conf$$ 2>/dev/null; then
556     as_ln_s='ln -s'
557     # ... but there are two gotchas:
558     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
560     # In both cases, we have to default to `cp -pR'.
561     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
562       as_ln_s='cp -pR'
563   elif ln conf$$.file conf$$ 2>/dev/null; then
564     as_ln_s=ln
565   else
566     as_ln_s='cp -pR'
567   fi
568 else
569   as_ln_s='cp -pR'
570 fi
571 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572 rmdir conf$$.dir 2>/dev/null
573
574 if mkdir -p . 2>/dev/null; then
575   as_mkdir_p='mkdir -p "$as_dir"'
576 else
577   test -d ./-p && rmdir ./-p
578   as_mkdir_p=false
579 fi
580
581 as_test_x='test -x'
582 as_executable_p=as_fn_executable_p
583
584 # Sed expression to map a string onto a valid CPP name.
585 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
586
587 # Sed expression to map a string onto a valid variable name.
588 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
589
590
591 test -n "$DJDIR" || exec 7<&0 </dev/null
592 exec 6>&1
593
594 # Name of the host.
595 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
596 # so uname gets run too.
597 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
599 #
600 # Initializations.
601 #
602 ac_default_prefix=/usr/local
603 ac_clean_files=
604 ac_config_libobj_dir=.
605 LIBOBJS=
606 cross_compiling=no
607 subdirs=
608 MFLAGS=
609 MAKEFLAGS=
610
611 # Identity of this package.
612 PACKAGE_NAME='GNU diffutils'
613 PACKAGE_TARNAME='diffutils'
614 PACKAGE_VERSION='3.8'
615 PACKAGE_STRING='GNU diffutils 3.8'
616 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
617 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
618
619 ac_unique_file="src/diff.c"
620 # Factoring default headers for most tests.
621 ac_includes_default="\
622 #include <stddef.h>
623 #ifdef HAVE_STDIO_H
624 # include <stdio.h>
625 #endif
626 #ifdef HAVE_STDLIB_H
627 # include <stdlib.h>
628 #endif
629 #ifdef HAVE_STRING_H
630 # include <string.h>
631 #endif
632 #ifdef HAVE_INTTYPES_H
633 # include <inttypes.h>
634 #endif
635 #ifdef HAVE_STDINT_H
636 # include <stdint.h>
637 #endif
638 #ifdef HAVE_STRINGS_H
639 # include <strings.h>
640 #endif
641 #ifdef HAVE_SYS_TYPES_H
642 # include <sys/types.h>
643 #endif
644 #ifdef HAVE_SYS_STAT_H
645 # include <sys/stat.h>
646 #endif
647 #ifdef HAVE_UNISTD_H
648 # include <unistd.h>
649 #endif"
650
651 ac_header_c_list=
652 gl_use_threads_default=
653 gl_use_winpthreads_default=
654 ac_func_c_list=
655 gl_fnmatch_required=POSIX
656 gl_getopt_required=POSIX
657 gt_needs=
658 ac_subst_vars='gltests_LTLIBOBJS
659 gltests_LIBOBJS
660 gl_LTLIBOBJS
661 gl_LIBOBJS
662 CONFIG_INCLUDE
663 am__EXEEXT_FALSE
664 am__EXEEXT_TRUE
665 LTLIBOBJS
666 LIBOBJS
667 POSUB
668 INTLLIBS
669 INTL_MACOSX_LIBS
670 XGETTEXT_EXTRA_OPTIONS
671 MSGMERGE
672 XGETTEXT_015
673 XGETTEXT
674 GMSGFMT_015
675 MSGFMT_015
676 GMSGFMT
677 MSGFMT
678 GETTEXT_MACRO_VERSION
679 USE_NLS
680 SRC_VERSION_C
681 PR_PROGRAM
682 GNULIB_WARN_CFLAGS
683 WARN_CFLAGS
684 WERROR_CFLAGS
685 LIBTESTS_LIBDEPS
686 LIBDIFFUTILS_LTLIBDEPS
687 LIBDIFFUTILS_LIBDEPS
688 abs_aux_dir
689 HAVE_SYS_UIO_H
690 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
691 NEXT_SYS_UIO_H
692 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
693 NEXT_SYS_IOCTL_H
694 HAVE_SYS_IOCTL_H
695 GL_GNULIB_SELECT
696 GL_GNULIB_PSELECT
697 GL_GNULIB_SCHED_YIELD
698 HAVE_STRUCT_SCHED_PARAM
699 HAVE_SCHED_H
700 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
701 NEXT_SCHED_H
702 REPLACE_SCHED_YIELD
703 HAVE_SCHED_YIELD
704 LIB_PTHREAD_SIGMASK
705 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
706 GL_GNULIB_PTHREAD_SPIN
707 GL_GNULIB_PTHREAD_TSS
708 GL_GNULIB_PTHREAD_COND
709 GL_GNULIB_PTHREAD_RWLOCK
710 GL_GNULIB_PTHREAD_MUTEX
711 GL_GNULIB_PTHREAD_ONCE
712 GL_GNULIB_PTHREAD_THREAD
713 LIB_PTHREAD
714 HAVE_PTHREAD_H
715 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
716 NEXT_PTHREAD_H
717 REPLACE_PTHREAD_SPIN_DESTROY
718 REPLACE_PTHREAD_SPIN_UNLOCK
719 REPLACE_PTHREAD_SPIN_TRYLOCK
720 REPLACE_PTHREAD_SPIN_LOCK
721 REPLACE_PTHREAD_SPIN_INIT
722 REPLACE_PTHREAD_KEY_DELETE
723 REPLACE_PTHREAD_GETSPECIFIC
724 REPLACE_PTHREAD_SETSPECIFIC
725 REPLACE_PTHREAD_KEY_CREATE
726 REPLACE_PTHREAD_COND_DESTROY
727 REPLACE_PTHREAD_COND_BROADCAST
728 REPLACE_PTHREAD_COND_SIGNAL
729 REPLACE_PTHREAD_COND_TIMEDWAIT
730 REPLACE_PTHREAD_COND_WAIT
731 REPLACE_PTHREAD_CONDATTR_DESTROY
732 REPLACE_PTHREAD_CONDATTR_INIT
733 REPLACE_PTHREAD_COND_INIT
734 REPLACE_PTHREAD_RWLOCK_DESTROY
735 REPLACE_PTHREAD_RWLOCK_UNLOCK
736 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
737 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
738 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
739 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
740 REPLACE_PTHREAD_RWLOCK_WRLOCK
741 REPLACE_PTHREAD_RWLOCK_RDLOCK
742 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
743 REPLACE_PTHREAD_RWLOCKATTR_INIT
744 REPLACE_PTHREAD_RWLOCK_INIT
745 REPLACE_PTHREAD_MUTEX_DESTROY
746 REPLACE_PTHREAD_MUTEX_UNLOCK
747 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
748 REPLACE_PTHREAD_MUTEX_TRYLOCK
749 REPLACE_PTHREAD_MUTEX_LOCK
750 REPLACE_PTHREAD_MUTEXATTR_DESTROY
751 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
752 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
753 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
754 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
755 REPLACE_PTHREAD_MUTEXATTR_INIT
756 REPLACE_PTHREAD_MUTEX_INIT
757 REPLACE_PTHREAD_ONCE
758 REPLACE_PTHREAD_EXIT
759 REPLACE_PTHREAD_JOIN
760 REPLACE_PTHREAD_DETACH
761 REPLACE_PTHREAD_EQUAL
762 REPLACE_PTHREAD_SELF
763 REPLACE_PTHREAD_ATTR_DESTROY
764 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
765 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
766 REPLACE_PTHREAD_ATTR_INIT
767 REPLACE_PTHREAD_CREATE
768 HAVE_PTHREAD_SPIN_DESTROY
769 HAVE_PTHREAD_SPIN_UNLOCK
770 HAVE_PTHREAD_SPIN_TRYLOCK
771 HAVE_PTHREAD_SPIN_LOCK
772 HAVE_PTHREAD_SPIN_INIT
773 HAVE_PTHREAD_KEY_DELETE
774 HAVE_PTHREAD_GETSPECIFIC
775 HAVE_PTHREAD_SETSPECIFIC
776 HAVE_PTHREAD_KEY_CREATE
777 HAVE_PTHREAD_COND_DESTROY
778 HAVE_PTHREAD_COND_BROADCAST
779 HAVE_PTHREAD_COND_SIGNAL
780 HAVE_PTHREAD_COND_TIMEDWAIT
781 HAVE_PTHREAD_COND_WAIT
782 HAVE_PTHREAD_CONDATTR_DESTROY
783 HAVE_PTHREAD_CONDATTR_INIT
784 HAVE_PTHREAD_COND_INIT
785 HAVE_PTHREAD_RWLOCK_DESTROY
786 HAVE_PTHREAD_RWLOCK_UNLOCK
787 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
788 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
789 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
790 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
791 HAVE_PTHREAD_RWLOCK_WRLOCK
792 HAVE_PTHREAD_RWLOCK_RDLOCK
793 HAVE_PTHREAD_RWLOCKATTR_DESTROY
794 HAVE_PTHREAD_RWLOCKATTR_INIT
795 HAVE_PTHREAD_RWLOCK_INIT
796 HAVE_PTHREAD_MUTEX_DESTROY
797 HAVE_PTHREAD_MUTEX_UNLOCK
798 HAVE_PTHREAD_MUTEX_TIMEDLOCK
799 HAVE_PTHREAD_MUTEX_TRYLOCK
800 HAVE_PTHREAD_MUTEX_LOCK
801 HAVE_PTHREAD_MUTEXATTR_DESTROY
802 HAVE_PTHREAD_MUTEXATTR_SETROBUST
803 HAVE_PTHREAD_MUTEXATTR_GETROBUST
804 HAVE_PTHREAD_MUTEXATTR_SETTYPE
805 HAVE_PTHREAD_MUTEXATTR_GETTYPE
806 HAVE_PTHREAD_MUTEXATTR_INIT
807 HAVE_PTHREAD_MUTEX_INIT
808 HAVE_PTHREAD_ONCE
809 HAVE_PTHREAD_EXIT
810 HAVE_PTHREAD_JOIN
811 HAVE_PTHREAD_DETACH
812 HAVE_PTHREAD_EQUAL
813 HAVE_PTHREAD_SELF
814 HAVE_PTHREAD_ATTR_DESTROY
815 HAVE_PTHREAD_ATTR_SETDETACHSTATE
816 HAVE_PTHREAD_ATTR_GETDETACHSTATE
817 HAVE_PTHREAD_ATTR_INIT
818 HAVE_PTHREAD_CREATE
819 HAVE_PTHREAD_PROCESS_SHARED
820 HAVE_PTHREAD_MUTEX_ROBUST
821 HAVE_PTHREAD_MUTEX_RECURSIVE
822 HAVE_PTHREAD_CREATE_DETACHED
823 HAVE_PTHREAD_SPINLOCK_T
824 HAVE_PTHREAD_T
825 GL_GENERATE_NETINET_IN_H_FALSE
826 GL_GENERATE_NETINET_IN_H_TRUE
827 NETINET_IN_H
828 HAVE_NETINET_IN_H
829 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
830 NEXT_NETINET_IN_H
831 LIB_NANOSLEEP
832 LIB_SELECT
833 LIBSOCKET
834 HAVE_SYS_SELECT_H
835 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
836 NEXT_SYS_SELECT_H
837 REPLACE_SELECT
838 REPLACE_PSELECT
839 HAVE_PSELECT
840 GL_GNULIB_IOCTL
841 INET_PTON_LIB
842 LOCALE_TR_UTF8
843 GL_GNULIB_INET_PTON
844 GL_GNULIB_INET_NTOP
845 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
846 NEXT_ARPA_INET_H
847 HAVE_ARPA_INET_H
848 REPLACE_INET_PTON
849 REPLACE_INET_NTOP
850 HAVE_DECL_INET_PTON
851 HAVE_DECL_INET_NTOP
852 GL_GNULIB_ACCEPT4
853 GL_GNULIB_SHUTDOWN
854 GL_GNULIB_SETSOCKOPT
855 GL_GNULIB_SENDTO
856 GL_GNULIB_RECVFROM
857 GL_GNULIB_SEND
858 GL_GNULIB_RECV
859 GL_GNULIB_LISTEN
860 GL_GNULIB_GETSOCKOPT
861 GL_GNULIB_GETSOCKNAME
862 GL_GNULIB_GETPEERNAME
863 GL_GNULIB_BIND
864 GL_GNULIB_ACCEPT
865 GL_GNULIB_CONNECT
866 GL_GNULIB_SOCKET
867 HAVE_WS2TCPIP_H
868 HAVE_SYS_SOCKET_H
869 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
870 NEXT_SYS_SOCKET_H
871 HAVE_ACCEPT4
872 HAVE_SA_FAMILY_T
873 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
874 HAVE_STRUCT_SOCKADDR_STORAGE
875 gltests_WITNESS
876 GL_CXXFLAG_ALLOW_WARNINGS
877 GL_CFLAG_ALLOW_WARNINGS
878 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
879 NEXT_WCHAR_H
880 HAVE_FEATURES_H
881 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
882 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
883 LIBUNISTRING_UNIWIDTH_H
884 LIBUNISTRING_UNITYPES_H
885 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
886 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
887 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
888 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
889 LIBUNISTRING_UNISTR_H
890 HAVE_UNISTD_H
891 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
892 NEXT_UNISTD_H
893 TIME_H_DEFINES_TIME_UTC
894 UNISTD_H_DEFINES_STRUCT_TIMESPEC
895 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
896 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
897 TIME_H_DEFINES_STRUCT_TIMESPEC
898 NEXT_AS_FIRST_DIRECTIVE_TIME_H
899 NEXT_TIME_H
900 GL_GNULIB_WAITPID
901 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
902 NEXT_SYS_WAIT_H
903 WINDOWS_STAT_INODES
904 WINDOWS_64_BIT_OFF_T
905 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
906 NEXT_SYS_TYPES_H
907 HAVE_SYS_RANDOM_H
908 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
909 NEXT_SYS_RANDOM_H
910 GL_GNULIB_FFS
911 HAVE_STRINGS_H
912 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
913 NEXT_STRINGS_H
914 NEXT_AS_FIRST_DIRECTIVE_STRING_H
915 NEXT_STRING_H
916 HAVE_DECL_STRNCASECMP
917 HAVE_STRCASECMP
918 HAVE_FFS
919 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
920 NEXT_STDLIB_H
921 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
922 NEXT_STDIO_H
923 HAVE__BOOL
924 GL_GENERATE_STDBOOL_H_FALSE
925 GL_GENERATE_STDBOOL_H_TRUE
926 STDBOOL_H
927 GL_GENERATE_STDARG_H_FALSE
928 GL_GENERATE_STDARG_H_TRUE
929 STDARG_H
930 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
931 NEXT_STDARG_H
932 GL_GENERATE_STDALIGN_H_FALSE
933 GL_GENERATE_STDALIGN_H_TRUE
934 STDALIGN_H
935 GL_GENERATE_SIGSEGV_H_FALSE
936 GL_GENERATE_SIGSEGV_H_TRUE
937 SIGSEGV_H
938 LIBSIGSEGV_PREFIX
939 LTLIBSIGSEGV
940 LIBSIGSEGV
941 HAVE_LIBSIGSEGV
942 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
943 NEXT_SIGNAL_H
944 GL_GNULIB_SIGACTION
945 GL_GNULIB_SIGPROCMASK
946 GL_GNULIB_SIGNAL_H_SIGPIPE
947 GL_GNULIB_RAISE
948 GL_GNULIB_PTHREAD_SIGMASK
949 REPLACE_RAISE
950 REPLACE_PTHREAD_SIGMASK
951 HAVE_SIGHANDLER_T
952 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
953 HAVE_STRUCT_SIGACTION_SA_SIGACTION
954 HAVE_SIGACTION
955 HAVE_SIGINFO_T
956 HAVE_SIGSET_T
957 HAVE_RAISE
958 HAVE_PTHREAD_SIGMASK
959 HAVE_POSIX_SIGNALBLOCKING
960 LIB_NL_LANGINFO
961 GL_GNULIB_MDA_TZSET
962 GL_GNULIB_TZSET
963 GL_GNULIB_TIME_RZ
964 GL_GNULIB_TIME_R
965 GL_GNULIB_TIMESPEC_GET
966 GL_GNULIB_TIMEGM
967 GL_GNULIB_STRPTIME
968 GL_GNULIB_STRFTIME
969 GL_GNULIB_NANOSLEEP
970 GL_GNULIB_LOCALTIME
971 GL_GNULIB_MKTIME
972 GL_GNULIB_CTIME
973 REPLACE_LOCALTIME
974 REPLACE_GMTIME
975 GNULIB_GETTIMEOFDAY
976 REPLACE_TZSET
977 REPLACE_TIMEGM
978 REPLACE_STRFTIME
979 REPLACE_NANOSLEEP
980 REPLACE_MKTIME
981 REPLACE_LOCALTIME_R
982 REPLACE_CTIME
983 HAVE_TIMEZONE_T
984 HAVE_TIMESPEC_GET
985 HAVE_TIMEGM
986 HAVE_STRPTIME
987 HAVE_NANOSLEEP
988 HAVE_DECL_LOCALTIME_R
989 UNDEFINE_STRTOK_R
990 REPLACE_STRSIGNAL
991 REPLACE_STRERRORNAME_NP
992 REPLACE_STRERROR_R
993 REPLACE_STRERROR
994 REPLACE_STRTOK_R
995 REPLACE_STRCASESTR
996 REPLACE_STRSTR
997 REPLACE_STRNLEN
998 REPLACE_STRNDUP
999 REPLACE_STRNCAT
1000 REPLACE_STRDUP
1001 REPLACE_STRCHRNUL
1002 REPLACE_STPNCPY
1003 REPLACE_MEMMEM
1004 REPLACE_MEMCHR
1005 REPLACE_FFSLL
1006 HAVE_STRVERSCMP
1007 HAVE_DECL_STRSIGNAL
1008 HAVE_SIGDESCR_NP
1009 HAVE_SIGABBREV_NP
1010 HAVE_STRERRORNAME_NP
1011 HAVE_DECL_STRERROR_R
1012 HAVE_DECL_STRTOK_R
1013 HAVE_STRCASESTR
1014 HAVE_STRSEP
1015 HAVE_STRPBRK
1016 HAVE_DECL_STRNLEN
1017 HAVE_DECL_STRNDUP
1018 HAVE_DECL_STRDUP
1019 HAVE_STRCHRNUL
1020 HAVE_STPNCPY
1021 HAVE_STPCPY
1022 HAVE_RAWMEMCHR
1023 HAVE_DECL_MEMRCHR
1024 HAVE_MEMPCPY
1025 HAVE_DECL_MEMMEM
1026 HAVE_FFSLL
1027 HAVE_FFSL
1028 HAVE_EXPLICIT_BZERO
1029 HAVE_MBSLEN
1030 GL_GNULIB_MDA_STRDUP
1031 GL_GNULIB_MDA_MEMCCPY
1032 GL_GNULIB_STRVERSCMP
1033 GL_GNULIB_STRSIGNAL
1034 GL_GNULIB_SIGDESCR_NP
1035 GL_GNULIB_SIGABBREV_NP
1036 GL_GNULIB_STRERRORNAME_NP
1037 GL_GNULIB_STRERROR_R
1038 GL_GNULIB_STRERROR
1039 GL_GNULIB_MBSTOK_R
1040 GL_GNULIB_MBSSEP
1041 GL_GNULIB_MBSSPN
1042 GL_GNULIB_MBSPBRK
1043 GL_GNULIB_MBSCSPN
1044 GL_GNULIB_MBSCASESTR
1045 GL_GNULIB_MBSPCASECMP
1046 GL_GNULIB_MBSNCASECMP
1047 GL_GNULIB_MBSCASECMP
1048 GL_GNULIB_MBSSTR
1049 GL_GNULIB_MBSRCHR
1050 GL_GNULIB_MBSCHR
1051 GL_GNULIB_MBSNLEN
1052 GL_GNULIB_MBSLEN
1053 GL_GNULIB_STRTOK_R
1054 GL_GNULIB_STRCASESTR
1055 GL_GNULIB_STRSTR
1056 GL_GNULIB_STRSEP
1057 GL_GNULIB_STRPBRK
1058 GL_GNULIB_STRNLEN
1059 GL_GNULIB_STRNDUP
1060 GL_GNULIB_STRNCAT
1061 GL_GNULIB_STRDUP
1062 GL_GNULIB_STRCHRNUL
1063 GL_GNULIB_STPNCPY
1064 GL_GNULIB_STPCPY
1065 GL_GNULIB_RAWMEMCHR
1066 GL_GNULIB_MEMRCHR
1067 GL_GNULIB_MEMPCPY
1068 GL_GNULIB_MEMMEM
1069 GL_GNULIB_MEMCHR
1070 GL_GNULIB_FFSLL
1071 GL_GNULIB_FFSL
1072 GL_GNULIB_EXPLICIT_BZERO
1073 HAVE_VISIBILITY
1074 CFLAG_VISIBILITY
1075 LIB_MBRTOWC
1076 SED
1077 LTLIBMULTITHREAD
1078 LIBMULTITHREAD
1079 LTLIBTHREAD
1080 LIBTHREAD
1081 LIBSTDTHREAD
1082 GL_GNULIB_LOCALENAME
1083 GL_GNULIB_DUPLOCALE
1084 GL_GNULIB_SETLOCALE_NULL
1085 GL_GNULIB_SETLOCALE
1086 GL_GNULIB_LOCALECONV
1087 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1088 NEXT_LOCALE_H
1089 HAVE_XLOCALE_H
1090 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1091 NEXT_STDDEF_H
1092 GL_GENERATE_STDDEF_H_FALSE
1093 GL_GENERATE_STDDEF_H_TRUE
1094 STDDEF_H
1095 HAVE_WCHAR_T
1096 HAVE_MAX_ALIGN_T
1097 REPLACE_NULL
1098 LOCALENAME_ENHANCE_LOCALE_FUNCS
1099 REPLACE_STRUCT_LCONV
1100 REPLACE_FREELOCALE
1101 REPLACE_DUPLOCALE
1102 REPLACE_NEWLOCALE
1103 REPLACE_SETLOCALE
1104 REPLACE_LOCALECONV
1105 HAVE_FREELOCALE
1106 HAVE_DUPLOCALE
1107 HAVE_NEWLOCALE
1108 LOCALCHARSET_TESTS_ENVIRONMENT
1109 GL_GNULIB_NL_LANGINFO
1110 HAVE_LANGINFO_YESEXPR
1111 HAVE_LANGINFO_ERA
1112 HAVE_LANGINFO_ALTMON
1113 HAVE_LANGINFO_T_FMT_AMPM
1114 HAVE_LANGINFO_CODESET
1115 HAVE_LANGINFO_H
1116 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1117 NEXT_LANGINFO_H
1118 REPLACE_NL_LANGINFO
1119 HAVE_NL_LANGINFO
1120 LOCALE_ZH_CN
1121 LOCALE_FR_UTF8
1122 LOCALE_JA
1123 GL_GNULIB_TOWCTRANS
1124 GL_GNULIB_WCTRANS
1125 GL_GNULIB_ISWCTYPE
1126 GL_GNULIB_WCTYPE
1127 GL_GNULIB_ISWXDIGIT
1128 GL_GNULIB_ISWDIGIT
1129 GL_GNULIB_ISWBLANK
1130 REPLACE_TOWLOWER
1131 REPLACE_ISWCNTRL
1132 HAVE_WCTYPE_H
1133 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1134 NEXT_WCTYPE_H
1135 HAVE_CRTDEFS_H
1136 HAVE_WINT_T
1137 HAVE_ISWCNTRL
1138 REPLACE_ISWXDIGIT
1139 REPLACE_ISWDIGIT
1140 REPLACE_ISWBLANK
1141 HAVE_WCTRANS_T
1142 HAVE_WCTYPE_T
1143 HAVE_ISWBLANK
1144 GL_GNULIB_STRTOUMAX
1145 GL_GNULIB_STRTOIMAX
1146 GL_GNULIB_IMAXDIV
1147 GL_GNULIB_IMAXABS
1148 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1149 NEXT_INTTYPES_H
1150 UINT64_MAX_EQ_ULONG_MAX
1151 UINT32_MAX_LT_UINTMAX_MAX
1152 PRIPTR_PREFIX
1153 INT64_MAX_EQ_LONG_MAX
1154 INT32_MAX_LT_INTMAX_MAX
1155 REPLACE_STRTOUMAX
1156 REPLACE_STRTOIMAX
1157 HAVE_IMAXDIV_T
1158 HAVE_DECL_STRTOUMAX
1159 HAVE_DECL_STRTOIMAX
1160 HAVE_DECL_IMAXDIV
1161 HAVE_DECL_IMAXABS
1162 GL_GENERATE_STDINT_H_FALSE
1163 GL_GENERATE_STDINT_H_TRUE
1164 STDINT_H
1165 HAVE_SYS_INTTYPES_H
1166 HAVE_SYS_BITYPES_H
1167 HAVE_C99_STDINT_H
1168 WINT_T_SUFFIX
1169 WCHAR_T_SUFFIX
1170 SIG_ATOMIC_T_SUFFIX
1171 SIZE_T_SUFFIX
1172 PTRDIFF_T_SUFFIX
1173 HAVE_SIGNED_WINT_T
1174 HAVE_SIGNED_WCHAR_T
1175 HAVE_SIGNED_SIG_ATOMIC_T
1176 BITSIZEOF_WINT_T
1177 BITSIZEOF_WCHAR_T
1178 BITSIZEOF_SIG_ATOMIC_T
1179 BITSIZEOF_SIZE_T
1180 BITSIZEOF_PTRDIFF_T
1181 APPLE_UNIVERSAL_BUILD
1182 HAVE_STDINT_H
1183 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1184 NEXT_STDINT_H
1185 HAVE_SYS_TYPES_H
1186 HAVE_INTTYPES_H
1187 HAVE_WCHAR_H
1188 GNULIBHEADERS_OVERRIDE_WINT_T
1189 GL_GENERATE_LIMITS_H_FALSE
1190 GL_GENERATE_LIMITS_H_TRUE
1191 LIMITS_H
1192 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1193 NEXT_LIMITS_H
1194 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1195 NEXT_ICONV_H
1196 GL_GNULIB_ICONV
1197 GL_GENERATE_ICONV_H_FALSE
1198 GL_GENERATE_ICONV_H_TRUE
1199 ICONV_H
1200 REPLACE_ICONV_UTF
1201 REPLACE_ICONV_OPEN
1202 REPLACE_ICONV
1203 ICONV_CONST
1204 LTLIBICONV
1205 LIBICONV
1206 HOST_CPU_C_ABI
1207 HOST_CPU
1208 LIB_HARD_LOCALE
1209 LIB_SETLOCALE_NULL
1210 LIB_SCHED_YIELD
1211 LIBPMULTITHREAD
1212 LIBPTHREAD
1213 GNU_MAKE_FALSE
1214 GNU_MAKE_TRUE
1215 GL_GNULIB_GETTIMEOFDAY
1216 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1217 NEXT_SYS_TIME_H
1218 REPLACE_STRUCT_TIMEVAL
1219 REPLACE_GETTIMEOFDAY
1220 HAVE_SYS_TIME_H
1221 HAVE_STRUCT_TIMEVAL
1222 HAVE_GETTIMEOFDAY
1223 LTLIBINTL
1224 LIBINTL
1225 GL_GNULIB_GETRANDOM
1226 LIB_GETRANDOM
1227 REPLACE_GETRANDOM
1228 HAVE_GETRANDOM
1229 GETOPT_CDEFS_H
1230 GETOPT_H
1231 HAVE_SYS_CDEFS_H
1232 HAVE_GETOPT_H
1233 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1234 NEXT_GETOPT_H
1235 GL_GNULIB_MDA_UMASK
1236 GL_GNULIB_MDA_MKDIR
1237 GL_GNULIB_MDA_CHMOD
1238 GL_GNULIB_OVERRIDES_STRUCT_STAT
1239 GL_GNULIB_UTIMENSAT
1240 GL_GNULIB_STAT
1241 GL_GNULIB_MKNODAT
1242 GL_GNULIB_MKNOD
1243 GL_GNULIB_MKFIFOAT
1244 GL_GNULIB_MKFIFO
1245 GL_GNULIB_MKDIRAT
1246 GL_GNULIB_MKDIR
1247 GL_GNULIB_LSTAT
1248 GL_GNULIB_LCHMOD
1249 GL_GNULIB_GETUMASK
1250 GL_GNULIB_FUTIMENS
1251 GL_GNULIB_FSTATAT
1252 GL_GNULIB_FSTAT
1253 GL_GNULIB_FCHMODAT
1254 WINDOWS_64_BIT_ST_SIZE
1255 WINDOWS_STAT_TIMESPEC
1256 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1257 NEXT_SYS_STAT_H
1258 REPLACE_UTIMENSAT
1259 REPLACE_STAT
1260 REPLACE_MKNODAT
1261 REPLACE_MKNOD
1262 REPLACE_MKFIFOAT
1263 REPLACE_MKFIFO
1264 REPLACE_MKDIR
1265 REPLACE_LSTAT
1266 REPLACE_FUTIMENS
1267 REPLACE_FSTATAT
1268 REPLACE_FSTAT
1269 REPLACE_FCHMODAT
1270 HAVE_UTIMENSAT
1271 HAVE_MKNODAT
1272 HAVE_MKNOD
1273 HAVE_MKFIFOAT
1274 HAVE_MKFIFO
1275 HAVE_MKDIRAT
1276 HAVE_LSTAT
1277 HAVE_LCHMOD
1278 HAVE_GETUMASK
1279 HAVE_FUTIMENS
1280 HAVE_FSTATAT
1281 HAVE_FCHMODAT
1282 GL_GNULIB_MDA_TEMPNAM
1283 GL_GNULIB_MDA_PUTW
1284 GL_GNULIB_MDA_GETW
1285 GL_GNULIB_MDA_FILENO
1286 GL_GNULIB_MDA_FDOPEN
1287 GL_GNULIB_MDA_FCLOSEALL
1288 GL_GNULIB_VSPRINTF_POSIX
1289 GL_GNULIB_VSNPRINTF
1290 GL_GNULIB_VPRINTF_POSIX
1291 GL_GNULIB_VPRINTF
1292 GL_GNULIB_VFPRINTF_POSIX
1293 GL_GNULIB_VFPRINTF
1294 GL_GNULIB_VDPRINTF
1295 GL_GNULIB_VSCANF
1296 GL_GNULIB_VFSCANF
1297 GL_GNULIB_VASPRINTF
1298 GL_GNULIB_TMPFILE
1299 GL_GNULIB_STDIO_H_SIGPIPE
1300 GL_GNULIB_STDIO_H_NONBLOCKING
1301 GL_GNULIB_SPRINTF_POSIX
1302 GL_GNULIB_SNPRINTF
1303 GL_GNULIB_SCANF
1304 GL_GNULIB_RENAMEAT
1305 GL_GNULIB_RENAME
1306 GL_GNULIB_REMOVE
1307 GL_GNULIB_PUTS
1308 GL_GNULIB_PUTCHAR
1309 GL_GNULIB_PUTC
1310 GL_GNULIB_PRINTF_POSIX
1311 GL_GNULIB_PRINTF
1312 GL_GNULIB_POPEN
1313 GL_GNULIB_PERROR
1314 GL_GNULIB_PCLOSE
1315 GL_GNULIB_OBSTACK_PRINTF_POSIX
1316 GL_GNULIB_OBSTACK_PRINTF
1317 GL_GNULIB_GETLINE
1318 GL_GNULIB_GETDELIM
1319 GL_GNULIB_GETCHAR
1320 GL_GNULIB_GETC
1321 GL_GNULIB_FWRITE
1322 GL_GNULIB_FTELLO
1323 GL_GNULIB_FTELL
1324 GL_GNULIB_FSEEKO
1325 GL_GNULIB_FSEEK
1326 GL_GNULIB_FSCANF
1327 GL_GNULIB_FREOPEN
1328 GL_GNULIB_FREAD
1329 GL_GNULIB_FPUTS
1330 GL_GNULIB_FPUTC
1331 GL_GNULIB_FPURGE
1332 GL_GNULIB_FPRINTF_POSIX
1333 GL_GNULIB_FPRINTF
1334 GL_GNULIB_FOPEN
1335 GL_GNULIB_FGETS
1336 GL_GNULIB_FGETC
1337 GL_GNULIB_FFLUSH
1338 GL_GNULIB_FDOPEN
1339 GL_GNULIB_FCLOSE
1340 GL_GNULIB_DPRINTF
1341 REPLACE_VSPRINTF
1342 REPLACE_VSNPRINTF
1343 REPLACE_VPRINTF
1344 REPLACE_VFPRINTF
1345 REPLACE_VDPRINTF
1346 REPLACE_VASPRINTF
1347 REPLACE_TMPFILE
1348 REPLACE_STDIO_WRITE_FUNCS
1349 REPLACE_STDIO_READ_FUNCS
1350 REPLACE_SPRINTF
1351 REPLACE_SNPRINTF
1352 REPLACE_RENAMEAT
1353 REPLACE_RENAME
1354 REPLACE_REMOVE
1355 REPLACE_PRINTF
1356 REPLACE_POPEN
1357 REPLACE_PERROR
1358 REPLACE_OBSTACK_PRINTF
1359 REPLACE_GETLINE
1360 REPLACE_GETDELIM
1361 REPLACE_FTELLO
1362 REPLACE_FTELL
1363 REPLACE_FSEEKO
1364 REPLACE_FSEEK
1365 REPLACE_FREOPEN
1366 REPLACE_FPURGE
1367 REPLACE_FPRINTF
1368 REPLACE_FOPEN
1369 REPLACE_FFLUSH
1370 REPLACE_FDOPEN
1371 REPLACE_FCLOSE
1372 REPLACE_DPRINTF
1373 HAVE_VDPRINTF
1374 HAVE_VASPRINTF
1375 HAVE_RENAMEAT
1376 HAVE_POPEN
1377 HAVE_PCLOSE
1378 HAVE_FTELLO
1379 HAVE_FSEEKO
1380 HAVE_DPRINTF
1381 HAVE_DECL_VSNPRINTF
1382 HAVE_DECL_SNPRINTF
1383 HAVE_DECL_OBSTACK_PRINTF
1384 HAVE_DECL_GETLINE
1385 HAVE_DECL_GETDELIM
1386 HAVE_DECL_FTELLO
1387 HAVE_DECL_FSEEKO
1388 HAVE_DECL_FPURGE
1389 HAVE_DECL_FCLOSEALL
1390 GL_GNULIB_FNMATCH
1391 GL_GENERATE_FNMATCH_H_FALSE
1392 GL_GENERATE_FNMATCH_H_TRUE
1393 FNMATCH_H
1394 HAVE_FNMATCH_H
1395 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1396 NEXT_FNMATCH_H
1397 REPLACE_FNMATCH
1398 HAVE_FNMATCH
1399 REPLACE_ITOLD
1400 GL_GENERATE_FLOAT_H_FALSE
1401 GL_GENERATE_FLOAT_H_TRUE
1402 FLOAT_H
1403 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1404 NEXT_FLOAT_H
1405 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1406 NEXT_FCNTL_H
1407 GL_GNULIB_MDA_OPEN
1408 GL_GNULIB_MDA_CREAT
1409 GL_GNULIB_OPENAT
1410 GL_GNULIB_OPEN
1411 GL_GNULIB_NONBLOCKING
1412 GL_GNULIB_FCNTL
1413 GL_GNULIB_CREAT
1414 REPLACE_OPENAT
1415 REPLACE_OPEN
1416 REPLACE_FCNTL
1417 REPLACE_CREAT
1418 HAVE_OPENAT
1419 HAVE_FCNTL
1420 EOVERFLOW_VALUE
1421 EOVERFLOW_HIDDEN
1422 ENOLINK_VALUE
1423 ENOLINK_HIDDEN
1424 EMULTIHOP_VALUE
1425 EMULTIHOP_HIDDEN
1426 GL_GENERATE_ERRNO_H_FALSE
1427 GL_GENERATE_ERRNO_H_TRUE
1428 ERRNO_H
1429 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1430 NEXT_ERRNO_H
1431 GL_GNULIB_ISBLANK
1432 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1433 NEXT_CTYPE_H
1434 PRAGMA_COLUMNS
1435 PRAGMA_SYSTEM_HEADER
1436 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1437 INCLUDE_NEXT
1438 HAVE_ISBLANK
1439 GL_GNULIB_MDA_WRITE
1440 GL_GNULIB_MDA_UNLINK
1441 GL_GNULIB_MDA_SWAB
1442 GL_GNULIB_MDA_RMDIR
1443 GL_GNULIB_MDA_READ
1444 GL_GNULIB_MDA_LSEEK
1445 GL_GNULIB_MDA_ISATTY
1446 GL_GNULIB_MDA_GETPID
1447 GL_GNULIB_MDA_GETCWD
1448 GL_GNULIB_MDA_EXECVPE
1449 GL_GNULIB_MDA_EXECVP
1450 GL_GNULIB_MDA_EXECVE
1451 GL_GNULIB_MDA_EXECV
1452 GL_GNULIB_MDA_EXECLP
1453 GL_GNULIB_MDA_EXECLE
1454 GL_GNULIB_MDA_EXECL
1455 GL_GNULIB_MDA_DUP2
1456 GL_GNULIB_MDA_DUP
1457 GL_GNULIB_MDA_CLOSE
1458 GL_GNULIB_MDA_CHDIR
1459 GL_GNULIB_MDA_ACCESS
1460 GL_GNULIB_WRITE
1461 GL_GNULIB_USLEEP
1462 GL_GNULIB_UNLINKAT
1463 GL_GNULIB_UNLINK
1464 GL_GNULIB_UNISTD_H_SIGPIPE
1465 GL_GNULIB_UNISTD_H_NONBLOCKING
1466 GL_GNULIB_UNISTD_H_GETOPT
1467 GL_GNULIB_TTYNAME_R
1468 GL_GNULIB_TRUNCATE
1469 GL_GNULIB_SYMLINKAT
1470 GL_GNULIB_SYMLINK
1471 GL_GNULIB_SLEEP
1472 GL_GNULIB_SETHOSTNAME
1473 GL_GNULIB_RMDIR
1474 GL_GNULIB_READLINKAT
1475 GL_GNULIB_READLINK
1476 GL_GNULIB_READ
1477 GL_GNULIB_PWRITE
1478 GL_GNULIB_PREAD
1479 GL_GNULIB_PIPE2
1480 GL_GNULIB_PIPE
1481 GL_GNULIB_LSEEK
1482 GL_GNULIB_LINKAT
1483 GL_GNULIB_LINK
1484 GL_GNULIB_LCHOWN
1485 GL_GNULIB_ISATTY
1486 GL_GNULIB_GROUP_MEMBER
1487 GL_GNULIB_GETUSERSHELL
1488 GL_GNULIB_GETPASS
1489 GL_GNULIB_GETPAGESIZE
1490 GL_GNULIB_GETOPT_POSIX
1491 GL_GNULIB_GETLOGIN_R
1492 GL_GNULIB_GETLOGIN
1493 GL_GNULIB_GETHOSTNAME
1494 GL_GNULIB_GETGROUPS
1495 GL_GNULIB_GETENTROPY
1496 GL_GNULIB_GETDTABLESIZE
1497 GL_GNULIB_GETDOMAINNAME
1498 GL_GNULIB_GETCWD
1499 GL_GNULIB_FTRUNCATE
1500 GL_GNULIB_FSYNC
1501 GL_GNULIB_FDATASYNC
1502 GL_GNULIB_FCHOWNAT
1503 GL_GNULIB_FCHDIR
1504 GL_GNULIB_FACCESSAT
1505 GL_GNULIB_EXECVPE
1506 GL_GNULIB_EXECVP
1507 GL_GNULIB_EXECVE
1508 GL_GNULIB_EXECV
1509 GL_GNULIB_EXECLP
1510 GL_GNULIB_EXECLE
1511 GL_GNULIB_EXECL
1512 GL_GNULIB_EUIDACCESS
1513 GL_GNULIB_ENVIRON
1514 GL_GNULIB_DUP3
1515 GL_GNULIB_DUP2
1516 GL_GNULIB_DUP
1517 GL_GNULIB_COPY_FILE_RANGE
1518 GL_GNULIB_CLOSE
1519 GL_GNULIB_CHOWN
1520 GL_GNULIB_CHDIR
1521 GL_GNULIB_ACCESS
1522 HAVE_WINSOCK2_H
1523 REPLACE_IOCTL
1524 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1525 SYS_IOCTL_H_HAVE_WINSOCK2_H
1526 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1527 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1528 UNISTD_H_HAVE_WINSOCK2_H
1529 UNISTD_H_HAVE_SYS_RANDOM_H
1530 REPLACE_WRITE
1531 REPLACE_USLEEP
1532 REPLACE_UNLINKAT
1533 REPLACE_UNLINK
1534 REPLACE_TTYNAME_R
1535 REPLACE_TRUNCATE
1536 REPLACE_SYMLINKAT
1537 REPLACE_SYMLINK
1538 REPLACE_SLEEP
1539 REPLACE_RMDIR
1540 REPLACE_READLINKAT
1541 REPLACE_READLINK
1542 REPLACE_READ
1543 REPLACE_PWRITE
1544 REPLACE_PREAD
1545 REPLACE_LSEEK
1546 REPLACE_LINKAT
1547 REPLACE_LINK
1548 REPLACE_LCHOWN
1549 REPLACE_ISATTY
1550 REPLACE_GETPASS
1551 REPLACE_GETPAGESIZE
1552 REPLACE_GETGROUPS
1553 REPLACE_GETLOGIN_R
1554 REPLACE_GETDTABLESIZE
1555 REPLACE_GETDOMAINNAME
1556 REPLACE_GETCWD
1557 REPLACE_FTRUNCATE
1558 REPLACE_FCHOWNAT
1559 REPLACE_FACCESSAT
1560 REPLACE_EXECVPE
1561 REPLACE_EXECVP
1562 REPLACE_EXECVE
1563 REPLACE_EXECV
1564 REPLACE_EXECLP
1565 REPLACE_EXECLE
1566 REPLACE_EXECL
1567 REPLACE_DUP2
1568 REPLACE_DUP
1569 REPLACE_CLOSE
1570 REPLACE_CHOWN
1571 REPLACE_ACCESS
1572 HAVE_SYS_PARAM_H
1573 HAVE_OS_H
1574 HAVE_DECL_TTYNAME_R
1575 HAVE_DECL_TRUNCATE
1576 HAVE_DECL_SETHOSTNAME
1577 HAVE_DECL_GETUSERSHELL
1578 HAVE_DECL_GETPAGESIZE
1579 HAVE_DECL_GETLOGIN_R
1580 HAVE_DECL_GETLOGIN
1581 HAVE_DECL_GETDOMAINNAME
1582 HAVE_DECL_FDATASYNC
1583 HAVE_DECL_FCHDIR
1584 HAVE_DECL_EXECVPE
1585 HAVE_DECL_ENVIRON
1586 HAVE_USLEEP
1587 HAVE_UNLINKAT
1588 HAVE_SYMLINKAT
1589 HAVE_SYMLINK
1590 HAVE_SLEEP
1591 HAVE_SETHOSTNAME
1592 HAVE_READLINKAT
1593 HAVE_READLINK
1594 HAVE_PWRITE
1595 HAVE_PREAD
1596 HAVE_PIPE2
1597 HAVE_PIPE
1598 HAVE_LINKAT
1599 HAVE_LINK
1600 HAVE_LCHOWN
1601 HAVE_GROUP_MEMBER
1602 HAVE_GETPASS
1603 HAVE_GETPAGESIZE
1604 HAVE_GETLOGIN
1605 HAVE_GETHOSTNAME
1606 HAVE_GETGROUPS
1607 HAVE_GETENTROPY
1608 HAVE_GETDTABLESIZE
1609 HAVE_FTRUNCATE
1610 HAVE_FSYNC
1611 HAVE_FDATASYNC
1612 HAVE_FCHOWNAT
1613 HAVE_FCHDIR
1614 HAVE_FACCESSAT
1615 HAVE_EXECVPE
1616 HAVE_EUIDACCESS
1617 HAVE_DUP3
1618 HAVE_COPY_FILE_RANGE
1619 HAVE_CHOWN
1620 LIB_CLOCK_GETTIME
1621 GL_GNULIB_MDA_PUTENV
1622 GL_GNULIB_MDA_MKTEMP
1623 GL_GNULIB_MDA_GCVT
1624 GL_GNULIB_MDA_FCVT
1625 GL_GNULIB_MDA_ECVT
1626 GL_GNULIB_WCTOMB
1627 GL_GNULIB_UNSETENV
1628 GL_GNULIB_UNLOCKPT
1629 GL_GNULIB_SYSTEM_POSIX
1630 GL_GNULIB_STRTOULL
1631 GL_GNULIB_STRTOUL
1632 GL_GNULIB_STRTOLL
1633 GL_GNULIB_STRTOLD
1634 GL_GNULIB_STRTOL
1635 GL_GNULIB_STRTOD
1636 GL_GNULIB_SETENV
1637 GL_GNULIB_SECURE_GETENV
1638 GL_GNULIB_RPMATCH
1639 GL_GNULIB_REALPATH
1640 GL_GNULIB_REALLOC_POSIX
1641 GL_GNULIB_REALLOCARRAY
1642 GL_GNULIB_RANDOM_R
1643 GL_GNULIB_RANDOM
1644 GL_GNULIB_QSORT_R
1645 GL_GNULIB_PUTENV
1646 GL_GNULIB_PTSNAME_R
1647 GL_GNULIB_PTSNAME
1648 GL_GNULIB_POSIX_OPENPT
1649 GL_GNULIB_POSIX_MEMALIGN
1650 GL_GNULIB_MKSTEMPS
1651 GL_GNULIB_MKSTEMP
1652 GL_GNULIB_MKOSTEMPS
1653 GL_GNULIB_MKOSTEMP
1654 GL_GNULIB_MKDTEMP
1655 GL_GNULIB_MBTOWC
1656 GL_GNULIB_MALLOC_POSIX
1657 GL_GNULIB_GRANTPT
1658 GL_GNULIB_GETSUBOPT
1659 GL_GNULIB_GETLOADAVG
1660 GL_GNULIB_FREE_POSIX
1661 GL_GNULIB_CANONICALIZE_FILE_NAME
1662 GL_GNULIB_CALLOC_POSIX
1663 GL_GNULIB_ATOLL
1664 GL_GNULIB_ALIGNED_ALLOC
1665 GL_GNULIB__EXIT
1666 REPLACE_WCTOMB
1667 REPLACE_UNSETENV
1668 REPLACE_STRTOULL
1669 REPLACE_STRTOUL
1670 REPLACE_STRTOLL
1671 REPLACE_STRTOLD
1672 REPLACE_STRTOL
1673 REPLACE_STRTOD
1674 REPLACE_SETSTATE
1675 REPLACE_SETENV
1676 REPLACE_REALPATH
1677 REPLACE_REALLOCARRAY
1678 REPLACE_REALLOC
1679 REPLACE_RANDOM_R
1680 REPLACE_RANDOM
1681 REPLACE_QSORT_R
1682 REPLACE_PUTENV
1683 REPLACE_PTSNAME_R
1684 REPLACE_PTSNAME
1685 REPLACE_POSIX_MEMALIGN
1686 REPLACE_MKSTEMP
1687 REPLACE_MBTOWC
1688 REPLACE_MALLOC
1689 REPLACE_INITSTATE
1690 REPLACE_FREE
1691 REPLACE_CANONICALIZE_FILE_NAME
1692 REPLACE_CALLOC
1693 REPLACE_ALIGNED_ALLOC
1694 HAVE_DECL_UNSETENV
1695 HAVE_UNLOCKPT
1696 HAVE_SYS_LOADAVG_H
1697 HAVE_STRUCT_RANDOM_DATA
1698 HAVE_STRTOULL
1699 HAVE_STRTOUL
1700 HAVE_STRTOLL
1701 HAVE_STRTOLD
1702 HAVE_STRTOL
1703 HAVE_STRTOD
1704 HAVE_DECL_SETSTATE
1705 HAVE_SETSTATE
1706 HAVE_DECL_SETENV
1707 HAVE_SETENV
1708 HAVE_SECURE_GETENV
1709 HAVE_RPMATCH
1710 HAVE_REALPATH
1711 HAVE_REALLOCARRAY
1712 HAVE_RANDOM_R
1713 HAVE_RANDOM_H
1714 HAVE_RANDOM
1715 HAVE_QSORT_R
1716 HAVE_PTSNAME_R
1717 HAVE_PTSNAME
1718 HAVE_POSIX_OPENPT
1719 HAVE_POSIX_MEMALIGN
1720 HAVE_MKSTEMPS
1721 HAVE_MKSTEMP
1722 HAVE_MKOSTEMPS
1723 HAVE_MKOSTEMP
1724 HAVE_MKDTEMP
1725 HAVE_MBTOWC
1726 HAVE_DECL_INITSTATE
1727 HAVE_INITSTATE
1728 HAVE_GRANTPT
1729 HAVE_GETSUBOPT
1730 HAVE_DECL_GETLOADAVG
1731 HAVE_DECL_GCVT
1732 HAVE_DECL_FCVT
1733 HAVE_DECL_ECVT
1734 HAVE_CANONICALIZE_FILE_NAME
1735 HAVE_ATOLL
1736 HAVE_ALIGNED_ALLOC
1737 HAVE__EXIT
1738 LTLIBCSTACK
1739 LIBCSTACK
1740 GL_GNULIB_MDA_WCSDUP
1741 GL_GNULIB_WCSFTIME
1742 GL_GNULIB_WCSWIDTH
1743 GL_GNULIB_WCSTOK
1744 GL_GNULIB_WCSSTR
1745 GL_GNULIB_WCSPBRK
1746 GL_GNULIB_WCSSPN
1747 GL_GNULIB_WCSCSPN
1748 GL_GNULIB_WCSRCHR
1749 GL_GNULIB_WCSCHR
1750 GL_GNULIB_WCSDUP
1751 GL_GNULIB_WCSXFRM
1752 GL_GNULIB_WCSCOLL
1753 GL_GNULIB_WCSNCASECMP
1754 GL_GNULIB_WCSCASECMP
1755 GL_GNULIB_WCSNCMP
1756 GL_GNULIB_WCSCMP
1757 GL_GNULIB_WCSNCAT
1758 GL_GNULIB_WCSCAT
1759 GL_GNULIB_WCPNCPY
1760 GL_GNULIB_WCSNCPY
1761 GL_GNULIB_WCPCPY
1762 GL_GNULIB_WCSCPY
1763 GL_GNULIB_WCSNLEN
1764 GL_GNULIB_WCSLEN
1765 GL_GNULIB_WMEMSET
1766 GL_GNULIB_WMEMPCPY
1767 GL_GNULIB_WMEMMOVE
1768 GL_GNULIB_WMEMCPY
1769 GL_GNULIB_WMEMCMP
1770 GL_GNULIB_WMEMCHR
1771 GL_GNULIB_WCWIDTH
1772 GL_GNULIB_WCSNRTOMBS
1773 GL_GNULIB_WCSRTOMBS
1774 GL_GNULIB_WCRTOMB
1775 GL_GNULIB_MBSNRTOWCS
1776 GL_GNULIB_MBSRTOWCS
1777 GL_GNULIB_MBRLEN
1778 GL_GNULIB_MBRTOWC
1779 GL_GNULIB_MBSINIT
1780 GL_GNULIB_WCTOB
1781 GL_GNULIB_BTOWC
1782 LOCALE_FR
1783 REPLACE_WCSTOK
1784 REPLACE_WCSFTIME
1785 REPLACE_WCSWIDTH
1786 REPLACE_WCWIDTH
1787 REPLACE_WCSNRTOMBS
1788 REPLACE_WCSRTOMBS
1789 REPLACE_WCRTOMB
1790 REPLACE_MBSNRTOWCS
1791 REPLACE_MBSRTOWCS
1792 REPLACE_MBRLEN
1793 REPLACE_MBRTOWC
1794 REPLACE_MBSINIT
1795 REPLACE_WCTOB
1796 REPLACE_BTOWC
1797 REPLACE_MBSTATE_T
1798 HAVE_DECL_WCWIDTH
1799 HAVE_DECL_WCSDUP
1800 HAVE_DECL_WCTOB
1801 HAVE_WCSFTIME
1802 HAVE_WCSWIDTH
1803 HAVE_WCSTOK
1804 HAVE_WCSSTR
1805 HAVE_WCSPBRK
1806 HAVE_WCSSPN
1807 HAVE_WCSCSPN
1808 HAVE_WCSRCHR
1809 HAVE_WCSCHR
1810 HAVE_WCSDUP
1811 HAVE_WCSXFRM
1812 HAVE_WCSCOLL
1813 HAVE_WCSNCASECMP
1814 HAVE_WCSCASECMP
1815 HAVE_WCSNCMP
1816 HAVE_WCSCMP
1817 HAVE_WCSNCAT
1818 HAVE_WCSCAT
1819 HAVE_WCPNCPY
1820 HAVE_WCSNCPY
1821 HAVE_WCPCPY
1822 HAVE_WCSCPY
1823 HAVE_WCSNLEN
1824 HAVE_WCSLEN
1825 HAVE_WMEMSET
1826 HAVE_WMEMPCPY
1827 HAVE_WMEMMOVE
1828 HAVE_WMEMCPY
1829 HAVE_WMEMCMP
1830 HAVE_WMEMCHR
1831 HAVE_WCSNRTOMBS
1832 HAVE_WCSRTOMBS
1833 HAVE_WCRTOMB
1834 HAVE_MBSNRTOWCS
1835 HAVE_MBSRTOWCS
1836 HAVE_MBRLEN
1837 HAVE_MBRTOWC
1838 HAVE_MBSINIT
1839 HAVE_BTOWC
1840 HAVE_ALLOCA_H
1841 GL_GENERATE_ALLOCA_H_FALSE
1842 GL_GENERATE_ALLOCA_H_TRUE
1843 ALLOCA_H
1844 ALLOCA
1845 GL_COND_LIBTOOL_FALSE
1846 GL_COND_LIBTOOL_TRUE
1847 ARFLAGS
1848 AR
1849 EGREP
1850 GREP
1851 CPP
1852 host_os
1853 host_vendor
1854 host_cpu
1855 host
1856 build_os
1857 build_vendor
1858 build_cpu
1859 build
1860 RANLIB
1861 HELP2MAN
1862 am__fastdepCC_FALSE
1863 am__fastdepCC_TRUE
1864 CCDEPMODE
1865 am__nodep
1866 AMDEPBACKSLASH
1867 AMDEP_FALSE
1868 AMDEP_TRUE
1869 am__include
1870 DEPDIR
1871 OBJEXT
1872 EXEEXT
1873 ac_ct_CC
1874 CPPFLAGS
1875 LDFLAGS
1876 CFLAGS
1877 CC
1878 AM_BACKSLASH
1879 AM_DEFAULT_VERBOSITY
1880 AM_DEFAULT_V
1881 AM_V
1882 CSCOPE
1883 ETAGS
1884 CTAGS
1885 am__untar
1886 am__tar
1887 AMTAR
1888 am__leading_dot
1889 SET_MAKE
1890 AWK
1891 mkdir_p
1892 MKDIR_P
1893 INSTALL_STRIP_PROGRAM
1894 STRIP
1895 install_sh
1896 MAKEINFO
1897 AUTOHEADER
1898 AUTOMAKE
1899 AUTOCONF
1900 ACLOCAL
1901 VERSION
1902 PACKAGE
1903 CYGPATH_W
1904 am__isrc
1905 INSTALL_DATA
1906 INSTALL_SCRIPT
1907 INSTALL_PROGRAM
1908 target_alias
1909 host_alias
1910 build_alias
1911 LIBS
1912 ECHO_T
1913 ECHO_N
1914 ECHO_C
1915 DEFS
1916 mandir
1917 localedir
1918 libdir
1919 psdir
1920 pdfdir
1921 dvidir
1922 htmldir
1923 infodir
1924 docdir
1925 oldincludedir
1926 includedir
1927 runstatedir
1928 localstatedir
1929 sharedstatedir
1930 sysconfdir
1931 datadir
1932 datarootdir
1933 libexecdir
1934 sbindir
1935 bindir
1936 program_transform_name
1937 prefix
1938 exec_prefix
1939 PACKAGE_URL
1940 PACKAGE_BUGREPORT
1941 PACKAGE_STRING
1942 PACKAGE_VERSION
1943 PACKAGE_TARNAME
1944 PACKAGE_NAME
1945 PATH_SEPARATOR
1946 SHELL
1947 am__quote'
1948 ac_subst_files=''
1949 ac_user_opts='
1950 enable_option_checking
1951 enable_silent_rules
1952 enable_dependency_tracking
1953 enable_largefile
1954 enable_year2038
1955 enable_threads
1956 enable_cross_guesses
1957 with_gnu_ld
1958 enable_rpath
1959 with_libiconv_prefix
1960 with_included_regex
1961 with_libsigsegv
1962 with_libsigsegv_prefix
1963 with_packager
1964 with_packager_version
1965 with_packager_bug_reports
1966 enable_gcc_warnings
1967 enable_nls
1968 with_libintl_prefix
1969 '
1970       ac_precious_vars='build_alias
1971 host_alias
1972 target_alias
1973 CC
1974 CFLAGS
1975 LDFLAGS
1976 LIBS
1977 CPPFLAGS
1978 CPP'
1979
1980
1981 # Initialize some variables set by options.
1982 ac_init_help=
1983 ac_init_version=false
1984 ac_unrecognized_opts=
1985 ac_unrecognized_sep=
1986 # The variables have the same names as the options, with
1987 # dashes changed to underlines.
1988 cache_file=/dev/null
1989 exec_prefix=NONE
1990 no_create=
1991 no_recursion=
1992 prefix=NONE
1993 program_prefix=NONE
1994 program_suffix=NONE
1995 program_transform_name=s,x,x,
1996 silent=
1997 site=
1998 srcdir=
1999 verbose=
2000 x_includes=NONE
2001 x_libraries=NONE
2002
2003 # Installation directory options.
2004 # These are left unexpanded so users can "make install exec_prefix=/foo"
2005 # and all the variables that are supposed to be based on exec_prefix
2006 # by default will actually change.
2007 # Use braces instead of parens because sh, perl, etc. also accept them.
2008 # (The list follows the same order as the GNU Coding Standards.)
2009 bindir='${exec_prefix}/bin'
2010 sbindir='${exec_prefix}/sbin'
2011 libexecdir='${exec_prefix}/libexec'
2012 datarootdir='${prefix}/share'
2013 datadir='${datarootdir}'
2014 sysconfdir='${prefix}/etc'
2015 sharedstatedir='${prefix}/com'
2016 localstatedir='${prefix}/var'
2017 runstatedir='${localstatedir}/run'
2018 includedir='${prefix}/include'
2019 oldincludedir='/usr/include'
2020 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2021 infodir='${datarootdir}/info'
2022 htmldir='${docdir}'
2023 dvidir='${docdir}'
2024 pdfdir='${docdir}'
2025 psdir='${docdir}'
2026 libdir='${exec_prefix}/lib'
2027 localedir='${datarootdir}/locale'
2028 mandir='${datarootdir}/man'
2029
2030 ac_prev=
2031 ac_dashdash=
2032 for ac_option
2033 do
2034   # If the previous option needs an argument, assign it.
2035   if test -n "$ac_prev"; then
2036     eval $ac_prev=\$ac_option
2037     ac_prev=
2038     continue
2039   fi
2040
2041   case $ac_option in
2042   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2043   *=)   ac_optarg= ;;
2044   *)    ac_optarg=yes ;;
2045   esac
2046
2047   case $ac_dashdash$ac_option in
2048   --)
2049     ac_dashdash=yes ;;
2050
2051   -bindir | --bindir | --bindi | --bind | --bin | --bi)
2052     ac_prev=bindir ;;
2053   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2054     bindir=$ac_optarg ;;
2055
2056   -build | --build | --buil | --bui | --bu)
2057     ac_prev=build_alias ;;
2058   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2059     build_alias=$ac_optarg ;;
2060
2061   -cache-file | --cache-file | --cache-fil | --cache-fi \
2062   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2063     ac_prev=cache_file ;;
2064   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2065   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2066     cache_file=$ac_optarg ;;
2067
2068   --config-cache | -C)
2069     cache_file=config.cache ;;
2070
2071   -datadir | --datadir | --datadi | --datad)
2072     ac_prev=datadir ;;
2073   -datadir=* | --datadir=* | --datadi=* | --datad=*)
2074     datadir=$ac_optarg ;;
2075
2076   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2077   | --dataroo | --dataro | --datar)
2078     ac_prev=datarootdir ;;
2079   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2080   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2081     datarootdir=$ac_optarg ;;
2082
2083   -disable-* | --disable-*)
2084     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2085     # Reject names that are not valid shell variable names.
2086     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2087       as_fn_error $? "invalid feature name: \`$ac_useropt'"
2088     ac_useropt_orig=$ac_useropt
2089     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2090     case $ac_user_opts in
2091       *"
2092 "enable_$ac_useropt"
2093 "*) ;;
2094       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2095          ac_unrecognized_sep=', ';;
2096     esac
2097     eval enable_$ac_useropt=no ;;
2098
2099   -docdir | --docdir | --docdi | --doc | --do)
2100     ac_prev=docdir ;;
2101   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2102     docdir=$ac_optarg ;;
2103
2104   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2105     ac_prev=dvidir ;;
2106   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2107     dvidir=$ac_optarg ;;
2108
2109   -enable-* | --enable-*)
2110     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2111     # Reject names that are not valid shell variable names.
2112     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2113       as_fn_error $? "invalid feature name: \`$ac_useropt'"
2114     ac_useropt_orig=$ac_useropt
2115     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2116     case $ac_user_opts in
2117       *"
2118 "enable_$ac_useropt"
2119 "*) ;;
2120       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2121          ac_unrecognized_sep=', ';;
2122     esac
2123     eval enable_$ac_useropt=\$ac_optarg ;;
2124
2125   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2126   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2127   | --exec | --exe | --ex)
2128     ac_prev=exec_prefix ;;
2129   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2130   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2131   | --exec=* | --exe=* | --ex=*)
2132     exec_prefix=$ac_optarg ;;
2133
2134   -gas | --gas | --ga | --g)
2135     # Obsolete; use --with-gas.
2136     with_gas=yes ;;
2137
2138   -help | --help | --hel | --he | -h)
2139     ac_init_help=long ;;
2140   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2141     ac_init_help=recursive ;;
2142   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2143     ac_init_help=short ;;
2144
2145   -host | --host | --hos | --ho)
2146     ac_prev=host_alias ;;
2147   -host=* | --host=* | --hos=* | --ho=*)
2148     host_alias=$ac_optarg ;;
2149
2150   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2151     ac_prev=htmldir ;;
2152   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2153   | --ht=*)
2154     htmldir=$ac_optarg ;;
2155
2156   -includedir | --includedir | --includedi | --included | --include \
2157   | --includ | --inclu | --incl | --inc)
2158     ac_prev=includedir ;;
2159   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2160   | --includ=* | --inclu=* | --incl=* | --inc=*)
2161     includedir=$ac_optarg ;;
2162
2163   -infodir | --infodir | --infodi | --infod | --info | --inf)
2164     ac_prev=infodir ;;
2165   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2166     infodir=$ac_optarg ;;
2167
2168   -libdir | --libdir | --libdi | --libd)
2169     ac_prev=libdir ;;
2170   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2171     libdir=$ac_optarg ;;
2172
2173   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2174   | --libexe | --libex | --libe)
2175     ac_prev=libexecdir ;;
2176   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2177   | --libexe=* | --libex=* | --libe=*)
2178     libexecdir=$ac_optarg ;;
2179
2180   -localedir | --localedir | --localedi | --localed | --locale)
2181     ac_prev=localedir ;;
2182   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2183     localedir=$ac_optarg ;;
2184
2185   -localstatedir | --localstatedir | --localstatedi | --localstated \
2186   | --localstate | --localstat | --localsta | --localst | --locals)
2187     ac_prev=localstatedir ;;
2188   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2189   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2190     localstatedir=$ac_optarg ;;
2191
2192   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2193     ac_prev=mandir ;;
2194   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2195     mandir=$ac_optarg ;;
2196
2197   -nfp | --nfp | --nf)
2198     # Obsolete; use --without-fp.
2199     with_fp=no ;;
2200
2201   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2202   | --no-cr | --no-c | -n)
2203     no_create=yes ;;
2204
2205   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2206   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2207     no_recursion=yes ;;
2208
2209   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2210   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2211   | --oldin | --oldi | --old | --ol | --o)
2212     ac_prev=oldincludedir ;;
2213   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2214   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2215   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2216     oldincludedir=$ac_optarg ;;
2217
2218   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2219     ac_prev=prefix ;;
2220   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2221     prefix=$ac_optarg ;;
2222
2223   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2224   | --program-pre | --program-pr | --program-p)
2225     ac_prev=program_prefix ;;
2226   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2227   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2228     program_prefix=$ac_optarg ;;
2229
2230   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2231   | --program-suf | --program-su | --program-s)
2232     ac_prev=program_suffix ;;
2233   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2234   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2235     program_suffix=$ac_optarg ;;
2236
2237   -program-transform-name | --program-transform-name \
2238   | --program-transform-nam | --program-transform-na \
2239   | --program-transform-n | --program-transform- \
2240   | --program-transform | --program-transfor \
2241   | --program-transfo | --program-transf \
2242   | --program-trans | --program-tran \
2243   | --progr-tra | --program-tr | --program-t)
2244     ac_prev=program_transform_name ;;
2245   -program-transform-name=* | --program-transform-name=* \
2246   | --program-transform-nam=* | --program-transform-na=* \
2247   | --program-transform-n=* | --program-transform-=* \
2248   | --program-transform=* | --program-transfor=* \
2249   | --program-transfo=* | --program-transf=* \
2250   | --program-trans=* | --program-tran=* \
2251   | --progr-tra=* | --program-tr=* | --program-t=*)
2252     program_transform_name=$ac_optarg ;;
2253
2254   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2255     ac_prev=pdfdir ;;
2256   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2257     pdfdir=$ac_optarg ;;
2258
2259   -psdir | --psdir | --psdi | --psd | --ps)
2260     ac_prev=psdir ;;
2261   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2262     psdir=$ac_optarg ;;
2263
2264   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2265   | -silent | --silent | --silen | --sile | --sil)
2266     silent=yes ;;
2267
2268   -runstatedir | --runstatedir | --runstatedi | --runstated \
2269   | --runstate | --runstat | --runsta | --runst | --runs \
2270   | --run | --ru | --r)
2271     ac_prev=runstatedir ;;
2272   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2273   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2274   | --run=* | --ru=* | --r=*)
2275     runstatedir=$ac_optarg ;;
2276
2277   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2278     ac_prev=sbindir ;;
2279   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2280   | --sbi=* | --sb=*)
2281     sbindir=$ac_optarg ;;
2282
2283   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2284   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2285   | --sharedst | --shareds | --shared | --share | --shar \
2286   | --sha | --sh)
2287     ac_prev=sharedstatedir ;;
2288   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2289   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2290   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2291   | --sha=* | --sh=*)
2292     sharedstatedir=$ac_optarg ;;
2293
2294   -site | --site | --sit)
2295     ac_prev=site ;;
2296   -site=* | --site=* | --sit=*)
2297     site=$ac_optarg ;;
2298
2299   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2300     ac_prev=srcdir ;;
2301   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2302     srcdir=$ac_optarg ;;
2303
2304   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2305   | --syscon | --sysco | --sysc | --sys | --sy)
2306     ac_prev=sysconfdir ;;
2307   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2308   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2309     sysconfdir=$ac_optarg ;;
2310
2311   -target | --target | --targe | --targ | --tar | --ta | --t)
2312     ac_prev=target_alias ;;
2313   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2314     target_alias=$ac_optarg ;;
2315
2316   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2317     verbose=yes ;;
2318
2319   -version | --version | --versio | --versi | --vers | -V)
2320     ac_init_version=: ;;
2321
2322   -with-* | --with-*)
2323     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2324     # Reject names that are not valid shell variable names.
2325     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2326       as_fn_error $? "invalid package name: \`$ac_useropt'"
2327     ac_useropt_orig=$ac_useropt
2328     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2329     case $ac_user_opts in
2330       *"
2331 "with_$ac_useropt"
2332 "*) ;;
2333       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2334          ac_unrecognized_sep=', ';;
2335     esac
2336     eval with_$ac_useropt=\$ac_optarg ;;
2337
2338   -without-* | --without-*)
2339     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2340     # Reject names that are not valid shell variable names.
2341     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2342       as_fn_error $? "invalid package name: \`$ac_useropt'"
2343     ac_useropt_orig=$ac_useropt
2344     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2345     case $ac_user_opts in
2346       *"
2347 "with_$ac_useropt"
2348 "*) ;;
2349       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2350          ac_unrecognized_sep=', ';;
2351     esac
2352     eval with_$ac_useropt=no ;;
2353
2354   --x)
2355     # Obsolete; use --with-x.
2356     with_x=yes ;;
2357
2358   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2359   | --x-incl | --x-inc | --x-in | --x-i)
2360     ac_prev=x_includes ;;
2361   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2362   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2363     x_includes=$ac_optarg ;;
2364
2365   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2366   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2367     ac_prev=x_libraries ;;
2368   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2369   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2370     x_libraries=$ac_optarg ;;
2371
2372   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2373 Try \`$0 --help' for more information"
2374     ;;
2375
2376   *=*)
2377     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2378     # Reject names that are not valid shell variable names.
2379     case $ac_envvar in #(
2380       '' | [0-9]* | *[!_$as_cr_alnum]* )
2381       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2382     esac
2383     eval $ac_envvar=\$ac_optarg
2384     export $ac_envvar ;;
2385
2386   *)
2387     # FIXME: should be removed in autoconf 3.0.
2388     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2389     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2390       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2391     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2392     ;;
2393
2394   esac
2395 done
2396
2397 if test -n "$ac_prev"; then
2398   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2399   as_fn_error $? "missing argument to $ac_option"
2400 fi
2401
2402 if test -n "$ac_unrecognized_opts"; then
2403   case $enable_option_checking in
2404     no) ;;
2405     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2406     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2407   esac
2408 fi
2409
2410 # Check all directory arguments for consistency.
2411 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2412                 datadir sysconfdir sharedstatedir localstatedir includedir \
2413                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2414                 libdir localedir mandir runstatedir
2415 do
2416   eval ac_val=\$$ac_var
2417   # Remove trailing slashes.
2418   case $ac_val in
2419     */ )
2420       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2421       eval $ac_var=\$ac_val;;
2422   esac
2423   # Be sure to have absolute directory names.
2424   case $ac_val in
2425     [\\/$]* | ?:[\\/]* )  continue;;
2426     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2427   esac
2428   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2429 done
2430
2431 # There might be people who depend on the old broken behavior: `$host'
2432 # used to hold the argument of --host etc.
2433 # FIXME: To remove some day.
2434 build=$build_alias
2435 host=$host_alias
2436 target=$target_alias
2437
2438 # FIXME: To remove some day.
2439 if test "x$host_alias" != x; then
2440   if test "x$build_alias" = x; then
2441     cross_compiling=maybe
2442   elif test "x$build_alias" != "x$host_alias"; then
2443     cross_compiling=yes
2444   fi
2445 fi
2446
2447 ac_tool_prefix=
2448 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2449
2450 test "$silent" = yes && exec 6>/dev/null
2451
2452
2453 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2454 ac_ls_di=`ls -di .` &&
2455 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2456   as_fn_error $? "working directory cannot be determined"
2457 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2458   as_fn_error $? "pwd does not report name of working directory"
2459
2460
2461 # Find the source files, if location was not specified.
2462 if test -z "$srcdir"; then
2463   ac_srcdir_defaulted=yes
2464   # Try the directory containing this script, then the parent directory.
2465   ac_confdir=`$as_dirname -- "$as_myself" ||
2466 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2467          X"$as_myself" : 'X\(//\)[^/]' \| \
2468          X"$as_myself" : 'X\(//\)$' \| \
2469          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2470 printf "%s\n" X"$as_myself" |
2471     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2472             s//\1/
2473             q
2474           }
2475           /^X\(\/\/\)[^/].*/{
2476             s//\1/
2477             q
2478           }
2479           /^X\(\/\/\)$/{
2480             s//\1/
2481             q
2482           }
2483           /^X\(\/\).*/{
2484             s//\1/
2485             q
2486           }
2487           s/.*/./; q'`
2488   srcdir=$ac_confdir
2489   if test ! -r "$srcdir/$ac_unique_file"; then
2490     srcdir=..
2491   fi
2492 else
2493   ac_srcdir_defaulted=no
2494 fi
2495 if test ! -r "$srcdir/$ac_unique_file"; then
2496   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2497   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2498 fi
2499 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2500 ac_abs_confdir=`(
2501         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2502         pwd)`
2503 # When building in place, set srcdir=.
2504 if test "$ac_abs_confdir" = "$ac_pwd"; then
2505   srcdir=.
2506 fi
2507 # Remove unnecessary trailing slashes from srcdir.
2508 # Double slashes in file names in object file debugging info
2509 # mess up M-x gdb in Emacs.
2510 case $srcdir in
2511 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2512 esac
2513 for ac_var in $ac_precious_vars; do
2514   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2515   eval ac_env_${ac_var}_value=\$${ac_var}
2516   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2517   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2518 done
2519
2520 #
2521 # Report the --help message.
2522 #
2523 if test "$ac_init_help" = "long"; then
2524   # Omit some internal or obsolete options to make the list less imposing.
2525   # This message is too long to be a string in the A/UX 3.1 sh.
2526   cat <<_ACEOF
2527 \`configure' configures GNU diffutils 3.8 to adapt to many kinds of systems.
2528
2529 Usage: $0 [OPTION]... [VAR=VALUE]...
2530
2531 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2532 VAR=VALUE.  See below for descriptions of some of the useful variables.
2533
2534 Defaults for the options are specified in brackets.
2535
2536 Configuration:
2537   -h, --help              display this help and exit
2538       --help=short        display options specific to this package
2539       --help=recursive    display the short help of all the included packages
2540   -V, --version           display version information and exit
2541   -q, --quiet, --silent   do not print \`checking ...' messages
2542       --cache-file=FILE   cache test results in FILE [disabled]
2543   -C, --config-cache      alias for \`--cache-file=config.cache'
2544   -n, --no-create         do not create output files
2545       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2546
2547 Installation directories:
2548   --prefix=PREFIX         install architecture-independent files in PREFIX
2549                           [$ac_default_prefix]
2550   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2551                           [PREFIX]
2552
2553 By default, \`make install' will install all the files in
2554 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2555 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2556 for instance \`--prefix=\$HOME'.
2557
2558 For better control, use the options below.
2559
2560 Fine tuning of the installation directories:
2561   --bindir=DIR            user executables [EPREFIX/bin]
2562   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2563   --libexecdir=DIR        program executables [EPREFIX/libexec]
2564   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2565   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2566   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2567   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2568   --libdir=DIR            object code libraries [EPREFIX/lib]
2569   --includedir=DIR        C header files [PREFIX/include]
2570   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2571   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2572   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2573   --infodir=DIR           info documentation [DATAROOTDIR/info]
2574   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2575   --mandir=DIR            man documentation [DATAROOTDIR/man]
2576   --docdir=DIR            documentation root [DATAROOTDIR/doc/diffutils]
2577   --htmldir=DIR           html documentation [DOCDIR]
2578   --dvidir=DIR            dvi documentation [DOCDIR]
2579   --pdfdir=DIR            pdf documentation [DOCDIR]
2580   --psdir=DIR             ps documentation [DOCDIR]
2581 _ACEOF
2582
2583   cat <<\_ACEOF
2584
2585 Program names:
2586   --program-prefix=PREFIX            prepend PREFIX to installed program names
2587   --program-suffix=SUFFIX            append SUFFIX to installed program names
2588   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2589
2590 System types:
2591   --build=BUILD     configure for building on BUILD [guessed]
2592   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2593 _ACEOF
2594 fi
2595
2596 if test -n "$ac_init_help"; then
2597   case $ac_init_help in
2598      short | recursive ) echo "Configuration of GNU diffutils 3.8:";;
2599    esac
2600   cat <<\_ACEOF
2601
2602 Optional Features:
2603   --disable-option-checking  ignore unrecognized --enable/--with options
2604   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2605   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2606   --enable-silent-rules   less verbose build output (undo: "make V=1")
2607   --disable-silent-rules  verbose build output (undo: "make V=0")
2608   --enable-dependency-tracking
2609                           do not reject slow dependency extractors
2610   --disable-dependency-tracking
2611                           speeds up one-time build
2612   --disable-largefile     omit support for large files
2613   --disable-year2038      omit support for timestamps past the year 2038
2614   --enable-threads={isoc|posix|isoc+posix|windows}
2615                           specify multithreading API
2616   --disable-threads       build without multithread safety
2617   --enable-cross-guesses={conservative|risky}
2618                           specify policy for cross-compilation guesses
2619   --disable-rpath         do not hardcode runtime library paths
2620   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2621   --disable-nls           do not use Native Language Support
2622
2623 Optional Packages:
2624   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2625   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2626   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2627   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2628   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2629   --without-included-regex
2630                           don't compile regex; this is the default on systems
2631                           with recent-enough versions of the GNU C Library
2632                           (use with caution on other systems).
2633   --with-libsigsegv       use the GNU libsigsegv library, when present,
2634                           instead of the gnulib module 'sigsegv'
2635   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2636   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2637   --with-packager         String identifying the packager of this software
2638   --with-packager-version Packager-specific version information
2639   --with-packager-bug-reports
2640                           Packager info for bug reports (URL/e-mail/...)
2641   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2642   --without-libintl-prefix     don't search for libintl in includedir and libdir
2643
2644 Some influential environment variables:
2645   CC          C compiler command
2646   CFLAGS      C compiler flags
2647   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2648               nonstandard directory <lib dir>
2649   LIBS        libraries to pass to the linker, e.g. -l<library>
2650   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2651               you have headers in a nonstandard directory <include dir>
2652   CPP         C preprocessor
2653
2654 Use these variables to override the choices made by `configure' or to help
2655 it to find libraries and programs with nonstandard names/locations.
2656
2657 Report bugs to <bug-diffutils@gnu.org>.
2658 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2659 General help using GNU software: <https://www.gnu.org/gethelp/>.
2660 _ACEOF
2661 ac_status=$?
2662 fi
2663
2664 if test "$ac_init_help" = "recursive"; then
2665   # If there are subdirs, report their specific --help.
2666   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2667     test -d "$ac_dir" ||
2668       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2669       continue
2670     ac_builddir=.
2671
2672 case "$ac_dir" in
2673 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2674 *)
2675   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2676   # A ".." for each directory in $ac_dir_suffix.
2677   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2678   case $ac_top_builddir_sub in
2679   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2680   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2681   esac ;;
2682 esac
2683 ac_abs_top_builddir=$ac_pwd
2684 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2685 # for backward compatibility:
2686 ac_top_builddir=$ac_top_build_prefix
2687
2688 case $srcdir in
2689   .)  # We are building in place.
2690     ac_srcdir=.
2691     ac_top_srcdir=$ac_top_builddir_sub
2692     ac_abs_top_srcdir=$ac_pwd ;;
2693   [\\/]* | ?:[\\/]* )  # Absolute name.
2694     ac_srcdir=$srcdir$ac_dir_suffix;
2695     ac_top_srcdir=$srcdir
2696     ac_abs_top_srcdir=$srcdir ;;
2697   *) # Relative name.
2698     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2699     ac_top_srcdir=$ac_top_build_prefix$srcdir
2700     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2701 esac
2702 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2703
2704     cd "$ac_dir" || { ac_status=$?; continue; }
2705     # Check for configure.gnu first; this name is used for a wrapper for
2706     # Metaconfig's "Configure" on case-insensitive file systems.
2707     if test -f "$ac_srcdir/configure.gnu"; then
2708       echo &&
2709       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2710     elif test -f "$ac_srcdir/configure"; then
2711       echo &&
2712       $SHELL "$ac_srcdir/configure" --help=recursive
2713     else
2714       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2715     fi || ac_status=$?
2716     cd "$ac_pwd" || { ac_status=$?; break; }
2717   done
2718 fi
2719
2720 test -n "$ac_init_help" && exit $ac_status
2721 if $ac_init_version; then
2722   cat <<\_ACEOF
2723 GNU diffutils configure 3.8
2724 generated by GNU Autoconf 2.71
2725
2726 Copyright (C) 2021 Free Software Foundation, Inc.
2727 This configure script is free software; the Free Software Foundation
2728 gives unlimited permission to copy, distribute and modify it.
2729 _ACEOF
2730   exit
2731 fi
2732
2733 ## ------------------------ ##
2734 ## Autoconf initialization. ##
2735 ## ------------------------ ##
2736
2737 # ac_fn_c_try_compile LINENO
2738 # --------------------------
2739 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2740 ac_fn_c_try_compile ()
2741 {
2742   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2743   rm -f conftest.$ac_objext conftest.beam
2744   if { { ac_try="$ac_compile"
2745 case "(($ac_try" in
2746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2747   *) ac_try_echo=$ac_try;;
2748 esac
2749 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2750 printf "%s\n" "$ac_try_echo"; } >&5
2751   (eval "$ac_compile") 2>conftest.err
2752   ac_status=$?
2753   if test -s conftest.err; then
2754     grep -v '^ *+' conftest.err >conftest.er1
2755     cat conftest.er1 >&5
2756     mv -f conftest.er1 conftest.err
2757   fi
2758   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2759   test $ac_status = 0; } && {
2760          test -z "$ac_c_werror_flag" ||
2761          test ! -s conftest.err
2762        } && test -s conftest.$ac_objext
2763 then :
2764   ac_retval=0
2765 else $as_nop
2766   printf "%s\n" "$as_me: failed program was:" >&5
2767 sed 's/^/| /' conftest.$ac_ext >&5
2768
2769         ac_retval=1
2770 fi
2771   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2772   as_fn_set_status $ac_retval
2773
2774 } # ac_fn_c_try_compile
2775
2776 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2777 # -------------------------------------------------------
2778 # Tests whether HEADER exists and can be compiled using the include files in
2779 # INCLUDES, setting the cache variable VAR accordingly.
2780 ac_fn_c_check_header_compile ()
2781 {
2782   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2783   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2784 printf %s "checking for $2... " >&6; }
2785 if eval test \${$3+y}
2786 then :
2787   printf %s "(cached) " >&6
2788 else $as_nop
2789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790 /* end confdefs.h.  */
2791 $4
2792 #include <$2>
2793 _ACEOF
2794 if ac_fn_c_try_compile "$LINENO"
2795 then :
2796   eval "$3=yes"
2797 else $as_nop
2798   eval "$3=no"
2799 fi
2800 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2801 fi
2802 eval ac_res=\$$3
2803                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2804 printf "%s\n" "$ac_res" >&6; }
2805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2806
2807 } # ac_fn_c_check_header_compile
2808
2809 # ac_fn_c_try_cpp LINENO
2810 # ----------------------
2811 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2812 ac_fn_c_try_cpp ()
2813 {
2814   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815   if { { ac_try="$ac_cpp conftest.$ac_ext"
2816 case "(($ac_try" in
2817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2818   *) ac_try_echo=$ac_try;;
2819 esac
2820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2821 printf "%s\n" "$ac_try_echo"; } >&5
2822   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2823   ac_status=$?
2824   if test -s conftest.err; then
2825     grep -v '^ *+' conftest.err >conftest.er1
2826     cat conftest.er1 >&5
2827     mv -f conftest.er1 conftest.err
2828   fi
2829   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2830   test $ac_status = 0; } > conftest.i && {
2831          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2832          test ! -s conftest.err
2833        }
2834 then :
2835   ac_retval=0
2836 else $as_nop
2837   printf "%s\n" "$as_me: failed program was:" >&5
2838 sed 's/^/| /' conftest.$ac_ext >&5
2839
2840     ac_retval=1
2841 fi
2842   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2843   as_fn_set_status $ac_retval
2844
2845 } # ac_fn_c_try_cpp
2846
2847 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2848 # -------------------------------------------
2849 # Tests whether TYPE exists after having included INCLUDES, setting cache
2850 # variable VAR accordingly.
2851 ac_fn_c_check_type ()
2852 {
2853   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855 printf %s "checking for $2... " >&6; }
2856 if eval test \${$3+y}
2857 then :
2858   printf %s "(cached) " >&6
2859 else $as_nop
2860   eval "$3=no"
2861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862 /* end confdefs.h.  */
2863 $4
2864 int
2865 main (void)
2866 {
2867 if (sizeof ($2))
2868          return 0;
2869   ;
2870   return 0;
2871 }
2872 _ACEOF
2873 if ac_fn_c_try_compile "$LINENO"
2874 then :
2875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h.  */
2877 $4
2878 int
2879 main (void)
2880 {
2881 if (sizeof (($2)))
2882             return 0;
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 if ac_fn_c_try_compile "$LINENO"
2888 then :
2889
2890 else $as_nop
2891   eval "$3=yes"
2892 fi
2893 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2894 fi
2895 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2896 fi
2897 eval ac_res=\$$3
2898                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2899 printf "%s\n" "$ac_res" >&6; }
2900   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2901
2902 } # ac_fn_c_check_type
2903
2904 # ac_fn_c_try_link LINENO
2905 # -----------------------
2906 # Try to link conftest.$ac_ext, and return whether this succeeded.
2907 ac_fn_c_try_link ()
2908 {
2909   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2910   rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2911   if { { ac_try="$ac_link"
2912 case "(($ac_try" in
2913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2914   *) ac_try_echo=$ac_try;;
2915 esac
2916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2917 printf "%s\n" "$ac_try_echo"; } >&5
2918   (eval "$ac_link") 2>conftest.err
2919   ac_status=$?
2920   if test -s conftest.err; then
2921     grep -v '^ *+' conftest.err >conftest.er1
2922     cat conftest.er1 >&5
2923     mv -f conftest.er1 conftest.err
2924   fi
2925   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2926   test $ac_status = 0; } && {
2927          test -z "$ac_c_werror_flag" ||
2928          test ! -s conftest.err
2929        } && test -s conftest$ac_exeext && {
2930          test "$cross_compiling" = yes ||
2931          test -x conftest$ac_exeext
2932        }
2933 then :
2934   ac_retval=0
2935 else $as_nop
2936   printf "%s\n" "$as_me: failed program was:" >&5
2937 sed 's/^/| /' conftest.$ac_ext >&5
2938
2939         ac_retval=1
2940 fi
2941   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2942   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2943   # interfere with the next link command; also delete a directory that is
2944   # left behind by Apple's compiler.  We do this before executing the actions.
2945   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2946   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2947   as_fn_set_status $ac_retval
2948
2949 } # ac_fn_c_try_link
2950
2951 # ac_fn_c_try_run LINENO
2952 # ----------------------
2953 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2954 # executables *can* be run.
2955 ac_fn_c_try_run ()
2956 {
2957   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958   if { { ac_try="$ac_link"
2959 case "(($ac_try" in
2960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961   *) ac_try_echo=$ac_try;;
2962 esac
2963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2964 printf "%s\n" "$ac_try_echo"; } >&5
2965   (eval "$ac_link") 2>&5
2966   ac_status=$?
2967   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2968   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2969   { { case "(($ac_try" in
2970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971   *) ac_try_echo=$ac_try;;
2972 esac
2973 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2974 printf "%s\n" "$ac_try_echo"; } >&5
2975   (eval "$ac_try") 2>&5
2976   ac_status=$?
2977   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2978   test $ac_status = 0; }; }
2979 then :
2980   ac_retval=0
2981 else $as_nop
2982   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2983        printf "%s\n" "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985
2986        ac_retval=$ac_status
2987 fi
2988   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990   as_fn_set_status $ac_retval
2991
2992 } # ac_fn_c_try_run
2993
2994 # ac_fn_c_check_func LINENO FUNC VAR
2995 # ----------------------------------
2996 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2997 ac_fn_c_check_func ()
2998 {
2999   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3001 printf %s "checking for $2... " >&6; }
3002 if eval test \${$3+y}
3003 then :
3004   printf %s "(cached) " >&6
3005 else $as_nop
3006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3007 /* end confdefs.h.  */
3008 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3009    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3010 #define $2 innocuous_$2
3011
3012 /* System header to define __stub macros and hopefully few prototypes,
3013    which can conflict with char $2 (); below.  */
3014
3015 #include <limits.h>
3016 #undef $2
3017
3018 /* Override any GCC internal prototype to avoid an error.
3019    Use char because int might match the return type of a GCC
3020    builtin and then its argument prototype would still apply.  */
3021 #ifdef __cplusplus
3022 extern "C"
3023 #endif
3024 char $2 ();
3025 /* The GNU C library defines this for functions which it implements
3026     to always fail with ENOSYS.  Some functions are actually named
3027     something starting with __ and the normal name is an alias.  */
3028 #if defined __stub_$2 || defined __stub___$2
3029 choke me
3030 #endif
3031
3032 int
3033 main (void)
3034 {
3035 return $2 ();
3036   ;
3037   return 0;
3038 }
3039 _ACEOF
3040 if ac_fn_c_try_link "$LINENO"
3041 then :
3042   eval "$3=yes"
3043 else $as_nop
3044   eval "$3=no"
3045 fi
3046 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3047     conftest$ac_exeext conftest.$ac_ext
3048 fi
3049 eval ac_res=\$$3
3050                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3051 printf "%s\n" "$ac_res" >&6; }
3052   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3053
3054 } # ac_fn_c_check_func
3055
3056 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3057 # --------------------------------------------
3058 # Tries to find the compile-time value of EXPR in a program that includes
3059 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3060 # computed
3061 ac_fn_c_compute_int ()
3062 {
3063   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3064   if test "$cross_compiling" = yes; then
3065     # Depending upon the size, compute the lo and hi bounds.
3066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067 /* end confdefs.h.  */
3068 $4
3069 int
3070 main (void)
3071 {
3072 static int test_array [1 - 2 * !(($2) >= 0)];
3073 test_array [0] = 0;
3074 return test_array [0];
3075
3076   ;
3077   return 0;
3078 }
3079 _ACEOF
3080 if ac_fn_c_try_compile "$LINENO"
3081 then :
3082   ac_lo=0 ac_mid=0
3083   while :; do
3084     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085 /* end confdefs.h.  */
3086 $4
3087 int
3088 main (void)
3089 {
3090 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3091 test_array [0] = 0;
3092 return test_array [0];
3093
3094   ;
3095   return 0;
3096 }
3097 _ACEOF
3098 if ac_fn_c_try_compile "$LINENO"
3099 then :
3100   ac_hi=$ac_mid; break
3101 else $as_nop
3102   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3103                         if test $ac_lo -le $ac_mid; then
3104                           ac_lo= ac_hi=
3105                           break
3106                         fi
3107                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3108 fi
3109 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3110   done
3111 else $as_nop
3112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3113 /* end confdefs.h.  */
3114 $4
3115 int
3116 main (void)
3117 {
3118 static int test_array [1 - 2 * !(($2) < 0)];
3119 test_array [0] = 0;
3120 return test_array [0];
3121
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 if ac_fn_c_try_compile "$LINENO"
3127 then :
3128   ac_hi=-1 ac_mid=-1
3129   while :; do
3130     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3131 /* end confdefs.h.  */
3132 $4
3133 int
3134 main (void)
3135 {
3136 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3137 test_array [0] = 0;
3138 return test_array [0];
3139
3140   ;
3141   return 0;
3142 }
3143 _ACEOF
3144 if ac_fn_c_try_compile "$LINENO"
3145 then :
3146   ac_lo=$ac_mid; break
3147 else $as_nop
3148   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3149                         if test $ac_mid -le $ac_hi; then
3150                           ac_lo= ac_hi=
3151                           break
3152                         fi
3153                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3154 fi
3155 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3156   done
3157 else $as_nop
3158   ac_lo= ac_hi=
3159 fi
3160 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3161 fi
3162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3163 # Binary search between lo and hi bounds.
3164 while test "x$ac_lo" != "x$ac_hi"; do
3165   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3167 /* end confdefs.h.  */
3168 $4
3169 int
3170 main (void)
3171 {
3172 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3173 test_array [0] = 0;
3174 return test_array [0];
3175
3176   ;
3177   return 0;
3178 }
3179 _ACEOF
3180 if ac_fn_c_try_compile "$LINENO"
3181 then :
3182   ac_hi=$ac_mid
3183 else $as_nop
3184   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3185 fi
3186 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3187 done
3188 case $ac_lo in #((
3189 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3190 '') ac_retval=1 ;;
3191 esac
3192   else
3193     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3194 /* end confdefs.h.  */
3195 $4
3196 static long int longval (void) { return $2; }
3197 static unsigned long int ulongval (void) { return $2; }
3198 #include <stdio.h>
3199 #include <stdlib.h>
3200 int
3201 main (void)
3202 {
3203
3204   FILE *f = fopen ("conftest.val", "w");
3205   if (! f)
3206     return 1;
3207   if (($2) < 0)
3208     {
3209       long int i = longval ();
3210       if (i != ($2))
3211         return 1;
3212       fprintf (f, "%ld", i);
3213     }
3214   else
3215     {
3216       unsigned long int i = ulongval ();
3217       if (i != ($2))
3218         return 1;
3219       fprintf (f, "%lu", i);
3220     }
3221   /* Do not output a trailing newline, as this causes \r\n confusion
3222      on some platforms.  */
3223   return ferror (f) || fclose (f) != 0;
3224
3225   ;
3226   return 0;
3227 }
3228 _ACEOF
3229 if ac_fn_c_try_run "$LINENO"
3230 then :
3231   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3232 else $as_nop
3233   ac_retval=1
3234 fi
3235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3236   conftest.$ac_objext conftest.beam conftest.$ac_ext
3237 rm -f conftest.val
3238
3239   fi
3240   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3241   as_fn_set_status $ac_retval
3242
3243 } # ac_fn_c_compute_int
3244
3245 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3246 # ------------------------------------------------------------------
3247 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3248 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3249 ac_fn_check_decl ()
3250 {
3251   ac_save_ac_compile="$ac_compile"
3252   if test -n "$ac_compile_for_check_decl"; then
3253     ac_compile="$ac_compile_for_check_decl"
3254   fi
3255   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3256   as_decl_name=`echo $2|sed 's/ *(.*//'`
3257   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3258 printf %s "checking whether $as_decl_name is declared... " >&6; }
3259 if eval test \${$3+y}
3260 then :
3261   printf %s "(cached) " >&6
3262 else $as_nop
3263   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3264   eval ac_save_FLAGS=\$$6
3265   as_fn_append $6 " $5"
3266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3267 /* end confdefs.h.  */
3268 $4
3269 int
3270 main (void)
3271 {
3272 #ifndef $as_decl_name
3273 #ifdef __cplusplus
3274   (void) $as_decl_use;
3275 #else
3276   (void) $as_decl_name;
3277 #endif
3278 #endif
3279
3280   ;
3281   return 0;
3282 }
3283 _ACEOF
3284 if ac_fn_c_try_compile "$LINENO"
3285 then :
3286   eval "$3=yes"
3287 else $as_nop
3288   eval "$3=no"
3289 fi
3290 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3291   eval $6=\$ac_save_FLAGS
3292
3293 fi
3294 eval ac_res=\$$3
3295                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3296 printf "%s\n" "$ac_res" >&6; }
3297   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3298   ac_compile="$ac_save_ac_compile"
3299
3300 } # ac_fn_check_decl
3301
3302 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3303 # ----------------------------------------------------
3304 # Tries to find if the field MEMBER exists in type AGGR, after including
3305 # INCLUDES, setting cache variable VAR accordingly.
3306 ac_fn_c_check_member ()
3307 {
3308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3309   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3310 printf %s "checking for $2.$3... " >&6; }
3311 if eval test \${$4+y}
3312 then :
3313   printf %s "(cached) " >&6
3314 else $as_nop
3315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316 /* end confdefs.h.  */
3317 $5
3318 int
3319 main (void)
3320 {
3321 static $2 ac_aggr;
3322 if (ac_aggr.$3)
3323 return 0;
3324   ;
3325   return 0;
3326 }
3327 _ACEOF
3328 if ac_fn_c_try_compile "$LINENO"
3329 then :
3330   eval "$4=yes"
3331 else $as_nop
3332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3333 /* end confdefs.h.  */
3334 $5
3335 int
3336 main (void)
3337 {
3338 static $2 ac_aggr;
3339 if (sizeof ac_aggr.$3)
3340 return 0;
3341   ;
3342   return 0;
3343 }
3344 _ACEOF
3345 if ac_fn_c_try_compile "$LINENO"
3346 then :
3347   eval "$4=yes"
3348 else $as_nop
3349   eval "$4=no"
3350 fi
3351 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3352 fi
3353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3354 fi
3355 eval ac_res=\$$4
3356                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3357 printf "%s\n" "$ac_res" >&6; }
3358   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3359
3360 } # ac_fn_c_check_member
3361 ac_configure_args_raw=
3362 for ac_arg
3363 do
3364   case $ac_arg in
3365   *\'*)
3366     ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3367   esac
3368   as_fn_append ac_configure_args_raw " '$ac_arg'"
3369 done
3370
3371 case $ac_configure_args_raw in
3372   *$as_nl*)
3373     ac_safe_unquote= ;;
3374   *)
3375     ac_unsafe_z='|&;<>()$`\\"*?[ ''     ' # This string ends in space, tab.
3376     ac_unsafe_a="$ac_unsafe_z#~"
3377     ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3378     ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3379 esac
3380
3381 cat >config.log <<_ACEOF
3382 This file contains any messages produced by compilers while
3383 running configure, to aid debugging if configure makes a mistake.
3384
3385 It was created by GNU diffutils $as_me 3.8, which was
3386 generated by GNU Autoconf 2.71.  Invocation command line was
3387
3388   $ $0$ac_configure_args_raw
3389
3390 _ACEOF
3391 exec 5>>config.log
3392 {
3393 cat <<_ASUNAME
3394 ## --------- ##
3395 ## Platform. ##
3396 ## --------- ##
3397
3398 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3399 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3400 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3401 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3402 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3403
3404 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3405 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3406
3407 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3408 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3409 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3410 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3411 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3412 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3413 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3414
3415 _ASUNAME
3416
3417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3418 for as_dir in $PATH
3419 do
3420   IFS=$as_save_IFS
3421   case $as_dir in #(((
3422     '') as_dir=./ ;;
3423     */) ;;
3424     *) as_dir=$as_dir/ ;;
3425   esac
3426     printf "%s\n" "PATH: $as_dir"
3427   done
3428 IFS=$as_save_IFS
3429
3430 } >&5
3431
3432 cat >&5 <<_ACEOF
3433
3434
3435 ## ----------- ##
3436 ## Core tests. ##
3437 ## ----------- ##
3438
3439 _ACEOF
3440
3441
3442 # Keep a trace of the command line.
3443 # Strip out --no-create and --no-recursion so they do not pile up.
3444 # Strip out --silent because we don't want to record it for future runs.
3445 # Also quote any args containing shell meta-characters.
3446 # Make two passes to allow for proper duplicate-argument suppression.
3447 ac_configure_args=
3448 ac_configure_args0=
3449 ac_configure_args1=
3450 ac_must_keep_next=false
3451 for ac_pass in 1 2
3452 do
3453   for ac_arg
3454   do
3455     case $ac_arg in
3456     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3457     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3458     | -silent | --silent | --silen | --sile | --sil)
3459       continue ;;
3460     *\'*)
3461       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3462     esac
3463     case $ac_pass in
3464     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3465     2)
3466       as_fn_append ac_configure_args1 " '$ac_arg'"
3467       if test $ac_must_keep_next = true; then
3468         ac_must_keep_next=false # Got value, back to normal.
3469       else
3470         case $ac_arg in
3471           *=* | --config-cache | -C | -disable-* | --disable-* \
3472           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3473           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3474           | -with-* | --with-* | -without-* | --without-* | --x)
3475             case "$ac_configure_args0 " in
3476               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3477             esac
3478             ;;
3479           -* ) ac_must_keep_next=true ;;
3480         esac
3481       fi
3482       as_fn_append ac_configure_args " '$ac_arg'"
3483       ;;
3484     esac
3485   done
3486 done
3487 { ac_configure_args0=; unset ac_configure_args0;}
3488 { ac_configure_args1=; unset ac_configure_args1;}
3489
3490 # When interrupted or exit'd, cleanup temporary files, and complete
3491 # config.log.  We remove comments because anyway the quotes in there
3492 # would cause problems or look ugly.
3493 # WARNING: Use '\'' to represent an apostrophe within the trap.
3494 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3495 trap 'exit_status=$?
3496   # Sanitize IFS.
3497   IFS=" ""      $as_nl"
3498   # Save into config.log some information that might help in debugging.
3499   {
3500     echo
3501
3502     printf "%s\n" "## ---------------- ##
3503 ## Cache variables. ##
3504 ## ---------------- ##"
3505     echo
3506     # The following way of writing the cache mishandles newlines in values,
3507 (
3508   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3509     eval ac_val=\$$ac_var
3510     case $ac_val in #(
3511     *${as_nl}*)
3512       case $ac_var in #(
3513       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3514 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3515       esac
3516       case $ac_var in #(
3517       _ | IFS | as_nl) ;; #(
3518       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3519       *) { eval $ac_var=; unset $ac_var;} ;;
3520       esac ;;
3521     esac
3522   done
3523   (set) 2>&1 |
3524     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3525     *${as_nl}ac_space=\ *)
3526       sed -n \
3527         "s/'\''/'\''\\\\'\'''\''/g;
3528           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3529       ;; #(
3530     *)
3531       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3532       ;;
3533     esac |
3534     sort
3535 )
3536     echo
3537
3538     printf "%s\n" "## ----------------- ##
3539 ## Output variables. ##
3540 ## ----------------- ##"
3541     echo
3542     for ac_var in $ac_subst_vars
3543     do
3544       eval ac_val=\$$ac_var
3545       case $ac_val in
3546       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3547       esac
3548       printf "%s\n" "$ac_var='\''$ac_val'\''"
3549     done | sort
3550     echo
3551
3552     if test -n "$ac_subst_files"; then
3553       printf "%s\n" "## ------------------- ##
3554 ## File substitutions. ##
3555 ## ------------------- ##"
3556       echo
3557       for ac_var in $ac_subst_files
3558       do
3559         eval ac_val=\$$ac_var
3560         case $ac_val in
3561         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3562         esac
3563         printf "%s\n" "$ac_var='\''$ac_val'\''"
3564       done | sort
3565       echo
3566     fi
3567
3568     if test -s confdefs.h; then
3569       printf "%s\n" "## ----------- ##
3570 ## confdefs.h. ##
3571 ## ----------- ##"
3572       echo
3573       cat confdefs.h
3574       echo
3575     fi
3576     test "$ac_signal" != 0 &&
3577       printf "%s\n" "$as_me: caught signal $ac_signal"
3578     printf "%s\n" "$as_me: exit $exit_status"
3579   } >&5
3580   rm -f core *.core core.conftest.* &&
3581     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3582     exit $exit_status
3583 ' 0
3584 for ac_signal in 1 2 13 15; do
3585   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3586 done
3587 ac_signal=0
3588
3589 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3590 rm -f -r conftest* confdefs.h
3591
3592 printf "%s\n" "/* confdefs.h */" > confdefs.h
3593
3594 # Predefined preprocessor variables.
3595
3596 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3597
3598 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3599
3600 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3601
3602 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3603
3604 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3605
3606 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3607
3608
3609 # Let the site file select an alternate cache file if it wants to.
3610 # Prefer an explicitly selected file to automatically selected ones.
3611 if test -n "$CONFIG_SITE"; then
3612   ac_site_files="$CONFIG_SITE"
3613 elif test "x$prefix" != xNONE; then
3614   ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3615 else
3616   ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3617 fi
3618
3619 for ac_site_file in $ac_site_files
3620 do
3621   case $ac_site_file in #(
3622   */*) :
3623      ;; #(
3624   *) :
3625     ac_site_file=./$ac_site_file ;;
3626 esac
3627   if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3628     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3629 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3630     sed 's/^/| /' "$ac_site_file" >&5
3631     . "$ac_site_file" \
3632       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3634 as_fn_error $? "failed to load site script $ac_site_file
3635 See \`config.log' for more details" "$LINENO" 5; }
3636   fi
3637 done
3638
3639 if test -r "$cache_file"; then
3640   # Some versions of bash will fail to source /dev/null (special files
3641   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3642   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3643     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3644 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3645     case $cache_file in
3646       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3647       *)                      . "./$cache_file";;
3648     esac
3649   fi
3650 else
3651   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3652 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3653   >$cache_file
3654 fi
3655
3656 # Test code for whether the C compiler supports C89 (global declarations)
3657 ac_c_conftest_c89_globals='
3658 /* Does the compiler advertise C89 conformance?
3659    Do not test the value of __STDC__, because some compilers set it to 0
3660    while being otherwise adequately conformant. */
3661 #if !defined __STDC__
3662 # error "Compiler does not advertise C89 conformance"
3663 #endif
3664
3665 #include <stddef.h>
3666 #include <stdarg.h>
3667 struct stat;
3668 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
3669 struct buf { int x; };
3670 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3671 static char *e (p, i)
3672      char **p;
3673      int i;
3674 {
3675   return p[i];
3676 }
3677 static char *f (char * (*g) (char **, int), char **p, ...)
3678 {
3679   char *s;
3680   va_list v;
3681   va_start (v,p);
3682   s = g (p, va_arg (v,int));
3683   va_end (v);
3684   return s;
3685 }
3686
3687 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3688    function prototypes and stuff, but not \xHH hex character constants.
3689    These do not provoke an error unfortunately, instead are silently treated
3690    as an "x".  The following induces an error, until -std is added to get
3691    proper ANSI mode.  Curiously \x00 != x always comes out true, for an
3692    array size at least.  It is necessary to write \x00 == 0 to get something
3693    that is true only with -std.  */
3694 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3695
3696 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3697    inside strings and character constants.  */
3698 #define FOO(x) '\''x'\''
3699 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3700
3701 int test (int i, double x);
3702 struct s1 {int (*f) (int a);};
3703 struct s2 {int (*f) (double a);};
3704 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3705                int, int);'
3706
3707 # Test code for whether the C compiler supports C89 (body of main).
3708 ac_c_conftest_c89_main='
3709 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3710 '
3711
3712 # Test code for whether the C compiler supports C99 (global declarations)
3713 ac_c_conftest_c99_globals='
3714 // Does the compiler advertise C99 conformance?
3715 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
3716 # error "Compiler does not advertise C99 conformance"
3717 #endif
3718
3719 #include <stdbool.h>
3720 extern int puts (const char *);
3721 extern int printf (const char *, ...);
3722 extern int dprintf (int, const char *, ...);
3723 extern void *malloc (size_t);
3724
3725 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
3726 // dprintf is used instead of fprintf to avoid needing to declare
3727 // FILE and stderr.
3728 #define debug(...) dprintf (2, __VA_ARGS__)
3729 #define showlist(...) puts (#__VA_ARGS__)
3730 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3731 static void
3732 test_varargs_macros (void)
3733 {
3734   int x = 1234;
3735   int y = 5678;
3736   debug ("Flag");
3737   debug ("X = %d\n", x);
3738   showlist (The first, second, and third items.);
3739   report (x>y, "x is %d but y is %d", x, y);
3740 }
3741
3742 // Check long long types.
3743 #define BIG64 18446744073709551615ull
3744 #define BIG32 4294967295ul
3745 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3746 #if !BIG_OK
3747   #error "your preprocessor is broken"
3748 #endif
3749 #if BIG_OK
3750 #else
3751   #error "your preprocessor is broken"
3752 #endif
3753 static long long int bignum = -9223372036854775807LL;
3754 static unsigned long long int ubignum = BIG64;
3755
3756 struct incomplete_array
3757 {
3758   int datasize;
3759   double data[];
3760 };
3761
3762 struct named_init {
3763   int number;
3764   const wchar_t *name;
3765   double average;
3766 };
3767
3768 typedef const char *ccp;
3769
3770 static inline int
3771 test_restrict (ccp restrict text)
3772 {
3773   // See if C++-style comments work.
3774   // Iterate through items via the restricted pointer.
3775   // Also check for declarations in for loops.
3776   for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3777     continue;
3778   return 0;
3779 }
3780
3781 // Check varargs and va_copy.
3782 static bool
3783 test_varargs (const char *format, ...)
3784 {
3785   va_list args;
3786   va_start (args, format);
3787   va_list args_copy;
3788   va_copy (args_copy, args);
3789
3790   const char *str = "";
3791   int number = 0;
3792   float fnumber = 0;
3793
3794   while (*format)
3795     {
3796       switch (*format++)
3797         {
3798         case '\''s'\'': // string
3799           str = va_arg (args_copy, const char *);
3800           break;
3801         case '\''d'\'': // int
3802           number = va_arg (args_copy, int);
3803           break;
3804         case '\''f'\'': // float
3805           fnumber = va_arg (args_copy, double);
3806           break;
3807         default:
3808           break;
3809         }
3810     }
3811   va_end (args_copy);
3812   va_end (args);
3813
3814   return *str && number && fnumber;
3815 }
3816 '
3817
3818 # Test code for whether the C compiler supports C99 (body of main).
3819 ac_c_conftest_c99_main='
3820   // Check bool.
3821   _Bool success = false;
3822   success |= (argc != 0);
3823
3824   // Check restrict.
3825   if (test_restrict ("String literal") == 0)
3826     success = true;
3827   char *restrict newvar = "Another string";
3828
3829   // Check varargs.
3830   success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
3831   test_varargs_macros ();
3832
3833   // Check flexible array members.
3834   struct incomplete_array *ia =
3835     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3836   ia->datasize = 10;
3837   for (int i = 0; i < ia->datasize; ++i)
3838     ia->data[i] = i * 1.234;
3839
3840   // Check named initializers.
3841   struct named_init ni = {
3842     .number = 34,
3843     .name = L"Test wide string",
3844     .average = 543.34343,
3845   };
3846
3847   ni.number = 58;
3848
3849   int dynamic_array[ni.number];
3850   dynamic_array[0] = argv[0][0];
3851   dynamic_array[ni.number - 1] = 543;
3852
3853   // work around unused variable warnings
3854   ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3855          || dynamic_array[ni.number - 1] != 543);
3856 '
3857
3858 # Test code for whether the C compiler supports C11 (global declarations)
3859 ac_c_conftest_c11_globals='
3860 // Does the compiler advertise C11 conformance?
3861 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3862 # error "Compiler does not advertise C11 conformance"
3863 #endif
3864
3865 // Check _Alignas.
3866 char _Alignas (double) aligned_as_double;
3867 char _Alignas (0) no_special_alignment;
3868 extern char aligned_as_int;
3869 char _Alignas (0) _Alignas (int) aligned_as_int;
3870
3871 // Check _Alignof.
3872 enum
3873 {
3874   int_alignment = _Alignof (int),
3875   int_array_alignment = _Alignof (int[100]),
3876   char_alignment = _Alignof (char)
3877 };
3878 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3879
3880 // Check _Noreturn.
3881 int _Noreturn does_not_return (void) { for (;;) continue; }
3882
3883 // Check _Static_assert.
3884 struct test_static_assert
3885 {
3886   int x;
3887   _Static_assert (sizeof (int) <= sizeof (long int),
3888                   "_Static_assert does not work in struct");
3889   long int y;
3890 };
3891
3892 // Check UTF-8 literals.
3893 #define u8 syntax error!
3894 char const utf8_literal[] = u8"happens to be ASCII" "another string";
3895
3896 // Check duplicate typedefs.
3897 typedef long *long_ptr;
3898 typedef long int *long_ptr;
3899 typedef long_ptr long_ptr;
3900
3901 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3902 struct anonymous
3903 {
3904   union {
3905     struct { int i; int j; };
3906     struct { int k; long int l; } w;
3907   };
3908   int m;
3909 } v1;
3910 '
3911
3912 # Test code for whether the C compiler supports C11 (body of main).
3913 ac_c_conftest_c11_main='
3914   _Static_assert ((offsetof (struct anonymous, i)
3915                    == offsetof (struct anonymous, w.k)),
3916                   "Anonymous union alignment botch");
3917   v1.i = 2;
3918   v1.w.k = 5;
3919   ok |= v1.i != 5;
3920 '
3921
3922 # Test code for whether the C compiler supports C11 (complete).
3923 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3924 ${ac_c_conftest_c99_globals}
3925 ${ac_c_conftest_c11_globals}
3926
3927 int
3928 main (int argc, char **argv)
3929 {
3930   int ok = 0;
3931   ${ac_c_conftest_c89_main}
3932   ${ac_c_conftest_c99_main}
3933   ${ac_c_conftest_c11_main}
3934   return ok;
3935 }
3936 "
3937
3938 # Test code for whether the C compiler supports C99 (complete).
3939 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3940 ${ac_c_conftest_c99_globals}
3941
3942 int
3943 main (int argc, char **argv)
3944 {
3945   int ok = 0;
3946   ${ac_c_conftest_c89_main}
3947   ${ac_c_conftest_c99_main}
3948   return ok;
3949 }
3950 "
3951
3952 # Test code for whether the C compiler supports C89 (complete).
3953 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3954
3955 int
3956 main (int argc, char **argv)
3957 {
3958   int ok = 0;
3959   ${ac_c_conftest_c89_main}
3960   return ok;
3961 }
3962 "
3963
3964 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3965 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3966 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3967 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3968 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3969 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3970 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3971 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3972 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3973 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3974 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3975 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
3976 as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT"
3977 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3978 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3979 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3980 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3981 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3982 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
3983 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
3984 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
3985 gl_fnmatch_required=GNU
3986 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3987 gl_getopt_required=GNU
3988 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3989 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3990 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3991 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3992 as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
3993 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3994 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3995 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
3996 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
3997 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3998 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
3999 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4000 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4001 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4002 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
4003 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4004 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4005 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4006 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4007 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4008 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4009 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4010 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4011 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4012 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4013 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4014 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4015 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4016 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4017 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4018 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4019 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4020 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4021 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4022 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4023 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
4024 as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
4025 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4026 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4027 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4028 as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
4029 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4030 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4031 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4032 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4033 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4034 as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
4035 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4036 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4037 as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4038 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4039 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4040 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4041 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4042 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4043 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4044 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4045 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4046 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4047 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4048 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4049 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4050 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4051 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4052 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4053 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
4054 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
4055 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
4056 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
4057 as_fn_append ac_func_c_list " fork HAVE_FORK"
4058 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
4059 gt_needs="$gt_needs need-ngettext"
4060
4061 # Auxiliary files required by this configure script.
4062 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4063
4064 # Locations in which to look for auxiliary files.
4065 ac_aux_dir_candidates="${srcdir}/build-aux"
4066
4067 # Search for a directory containing all of the required auxiliary files,
4068 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4069 # If we don't find one directory that contains all the files we need,
4070 # we report the set of missing files from the *first* directory in
4071 # $ac_aux_dir_candidates and give up.
4072 ac_missing_aux_files=""
4073 ac_first_candidate=:
4074 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076 as_found=false
4077 for as_dir in $ac_aux_dir_candidates
4078 do
4079   IFS=$as_save_IFS
4080   case $as_dir in #(((
4081     '') as_dir=./ ;;
4082     */) ;;
4083     *) as_dir=$as_dir/ ;;
4084   esac
4085   as_found=:
4086
4087   printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
4088   ac_aux_dir_found=yes
4089   ac_install_sh=
4090   for ac_aux in $ac_aux_files
4091   do
4092     # As a special case, if "install-sh" is required, that requirement
4093     # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4094     # and $ac_install_sh is set appropriately for whichever one is found.
4095     if test x"$ac_aux" = x"install-sh"
4096     then
4097       if test -f "${as_dir}install-sh"; then
4098         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
4099         ac_install_sh="${as_dir}install-sh -c"
4100       elif test -f "${as_dir}install.sh"; then
4101         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
4102         ac_install_sh="${as_dir}install.sh -c"
4103       elif test -f "${as_dir}shtool"; then
4104         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
4105         ac_install_sh="${as_dir}shtool install -c"
4106       else
4107         ac_aux_dir_found=no
4108         if $ac_first_candidate; then
4109           ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4110         else
4111           break
4112         fi
4113       fi
4114     else
4115       if test -f "${as_dir}${ac_aux}"; then
4116         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
4117       else
4118         ac_aux_dir_found=no
4119         if $ac_first_candidate; then
4120           ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4121         else
4122           break
4123         fi
4124       fi
4125     fi
4126   done
4127   if test "$ac_aux_dir_found" = yes; then
4128     ac_aux_dir="$as_dir"
4129     break
4130   fi
4131   ac_first_candidate=false
4132
4133   as_found=false
4134 done
4135 IFS=$as_save_IFS
4136 if $as_found
4137 then :
4138
4139 else $as_nop
4140   as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4141 fi
4142
4143
4144 # These three variables are undocumented and unsupported,
4145 # and are intended to be withdrawn in a future Autoconf release.
4146 # They can cause serious problems if a builder's source tree is in a directory
4147 # whose full name contains unusual characters.
4148 if test -f "${ac_aux_dir}config.guess"; then
4149   ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4150 fi
4151 if test -f "${ac_aux_dir}config.sub"; then
4152   ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4153 fi
4154 if test -f "$ac_aux_dir/configure"; then
4155   ac_configure="$SHELL ${ac_aux_dir}configure"
4156 fi
4157
4158 # Check that the precious variables saved in the cache have kept the same
4159 # value.
4160 ac_cache_corrupted=false
4161 for ac_var in $ac_precious_vars; do
4162   eval ac_old_set=\$ac_cv_env_${ac_var}_set
4163   eval ac_new_set=\$ac_env_${ac_var}_set
4164   eval ac_old_val=\$ac_cv_env_${ac_var}_value
4165   eval ac_new_val=\$ac_env_${ac_var}_value
4166   case $ac_old_set,$ac_new_set in
4167     set,)
4168       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4169 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4170       ac_cache_corrupted=: ;;
4171     ,set)
4172       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4173 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4174       ac_cache_corrupted=: ;;
4175     ,);;
4176     *)
4177       if test "x$ac_old_val" != "x$ac_new_val"; then
4178         # differences in whitespace do not lead to failure.
4179         ac_old_val_w=`echo x $ac_old_val`
4180         ac_new_val_w=`echo x $ac_new_val`
4181         if test "$ac_old_val_w" != "$ac_new_val_w"; then
4182           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4183 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4184           ac_cache_corrupted=:
4185         else
4186           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4187 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4188           eval $ac_var=\$ac_old_val
4189         fi
4190         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
4191 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
4192         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
4193 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
4194       fi;;
4195   esac
4196   # Pass precious variables to config.status.
4197   if test "$ac_new_set" = set; then
4198     case $ac_new_val in
4199     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4200     *) ac_arg=$ac_var=$ac_new_val ;;
4201     esac
4202     case " $ac_configure_args " in
4203       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4204       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4205     esac
4206   fi
4207 done
4208 if $ac_cache_corrupted; then
4209   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4210 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4211   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4212 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4213   as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4214             and start over" "$LINENO" 5
4215 fi
4216 ## -------------------- ##
4217 ## Main body of script. ##
4218 ## -------------------- ##
4219
4220 ac_ext=c
4221 ac_cpp='$CPP $CPPFLAGS'
4222 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4223 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4224 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4225
4226
4227
4228
4229
4230
4231
4232 am__api_version='1.16'
4233
4234
4235
4236   # Find a good install program.  We prefer a C program (faster),
4237 # so one script is as good as another.  But avoid the broken or
4238 # incompatible versions:
4239 # SysV /etc/install, /usr/sbin/install
4240 # SunOS /usr/etc/install
4241 # IRIX /sbin/install
4242 # AIX /bin/install
4243 # AmigaOS /C/install, which installs bootblocks on floppy discs
4244 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4245 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4246 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4247 # OS/2's system install, which has a completely different semantic
4248 # ./install, which can be erroneously created by make from ./install.sh.
4249 # Reject install programs that cannot install multiple files.
4250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4251 printf %s "checking for a BSD-compatible install... " >&6; }
4252 if test -z "$INSTALL"; then
4253 if test ${ac_cv_path_install+y}
4254 then :
4255   printf %s "(cached) " >&6
4256 else $as_nop
4257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4258 for as_dir in $PATH
4259 do
4260   IFS=$as_save_IFS
4261   case $as_dir in #(((
4262     '') as_dir=./ ;;
4263     */) ;;
4264     *) as_dir=$as_dir/ ;;
4265   esac
4266     # Account for fact that we put trailing slashes in our PATH walk.
4267 case $as_dir in #((
4268   ./ | /[cC]/* | \
4269   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4270   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4271   /usr/ucb/* ) ;;
4272   *)
4273     # OSF1 and SCO ODT 3.0 have their own names for install.
4274     # Don't use installbsd from OSF since it installs stuff as root
4275     # by default.
4276     for ac_prog in ginstall scoinst install; do
4277       for ac_exec_ext in '' $ac_executable_extensions; do
4278         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4279           if test $ac_prog = install &&
4280             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4281             # AIX install.  It has an incompatible calling convention.
4282             :
4283           elif test $ac_prog = install &&
4284             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4285             # program-specific install script used by HP pwplus--don't use.
4286             :
4287           else
4288             rm -rf conftest.one conftest.two conftest.dir
4289             echo one > conftest.one
4290             echo two > conftest.two
4291             mkdir conftest.dir
4292             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4293               test -s conftest.one && test -s conftest.two &&
4294               test -s conftest.dir/conftest.one &&
4295               test -s conftest.dir/conftest.two
4296             then
4297               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4298               break 3
4299             fi
4300           fi
4301         fi
4302       done
4303     done
4304     ;;
4305 esac
4306
4307   done
4308 IFS=$as_save_IFS
4309
4310 rm -rf conftest.one conftest.two conftest.dir
4311
4312 fi
4313   if test ${ac_cv_path_install+y}; then
4314     INSTALL=$ac_cv_path_install
4315   else
4316     # As a last resort, use the slow shell script.  Don't cache a
4317     # value for INSTALL within a source directory, because that will
4318     # break other packages using the cache if that directory is
4319     # removed, or if the value is a relative name.
4320     INSTALL=$ac_install_sh
4321   fi
4322 fi
4323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4324 printf "%s\n" "$INSTALL" >&6; }
4325
4326 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4327 # It thinks the first close brace ends the variable substitution.
4328 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4329
4330 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4331
4332 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4333
4334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4335 printf %s "checking whether build environment is sane... " >&6; }
4336 # Reject unsafe characters in $srcdir or the absolute working directory
4337 # name.  Accept space and tab only in the latter.
4338 am_lf='
4339 '
4340 case `pwd` in
4341   *[\\\"\#\$\&\'\`$am_lf]*)
4342     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4343 esac
4344 case $srcdir in
4345   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
4346     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4347 esac
4348
4349 # Do 'set' in a subshell so we don't clobber the current shell's
4350 # arguments.  Must try -L first in case configure is actually a
4351 # symlink; some systems play weird games with the mod time of symlinks
4352 # (eg FreeBSD returns the mod time of the symlink's containing
4353 # directory).
4354 if (
4355    am_has_slept=no
4356    for am_try in 1 2; do
4357      echo "timestamp, slept: $am_has_slept" > conftest.file
4358      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4359      if test "$*" = "X"; then
4360         # -L didn't work.
4361         set X `ls -t "$srcdir/configure" conftest.file`
4362      fi
4363      if test "$*" != "X $srcdir/configure conftest.file" \
4364         && test "$*" != "X conftest.file $srcdir/configure"; then
4365
4366         # If neither matched, then we have a broken ls.  This can happen
4367         # if, for instance, CONFIG_SHELL is bash and it inherits a
4368         # broken ls alias from the environment.  This has actually
4369         # happened.  Such a system could not be considered "sane".
4370         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4371   alias in your environment" "$LINENO" 5
4372      fi
4373      if test "$2" = conftest.file || test $am_try -eq 2; then
4374        break
4375      fi
4376      # Just in case.
4377      sleep 1
4378      am_has_slept=yes
4379    done
4380    test "$2" = conftest.file
4381    )
4382 then
4383    # Ok.
4384    :
4385 else
4386    as_fn_error $? "newly created file is older than distributed files!
4387 Check your system clock" "$LINENO" 5
4388 fi
4389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4390 printf "%s\n" "yes" >&6; }
4391 # If we didn't sleep, we still need to ensure time stamps of config.status and
4392 # generated files are strictly newer.
4393 am_sleep_pid=
4394 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4395   ( sleep 1 ) &
4396   am_sleep_pid=$!
4397 fi
4398
4399 rm -f conftest.file
4400
4401 test "$program_prefix" != NONE &&
4402   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4403 # Use a double $ so make ignores it.
4404 test "$program_suffix" != NONE &&
4405   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4406 # Double any \ or $.
4407 # By default was `s,x,x', remove it if useless.
4408 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4409 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4410
4411
4412 # Expand $ac_aux_dir to an absolute path.
4413 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4414
4415
4416   if test x"${MISSING+set}" != xset; then
4417   MISSING="\${SHELL} '$am_aux_dir/missing'"
4418 fi
4419 # Use eval to expand $SHELL
4420 if eval "$MISSING --is-lightweight"; then
4421   am_missing_run="$MISSING "
4422 else
4423   am_missing_run=
4424   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4425 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4426 fi
4427
4428 if test x"${install_sh+set}" != xset; then
4429   case $am_aux_dir in
4430   *\ * | *\     *)
4431     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4432   *)
4433     install_sh="\${SHELL} $am_aux_dir/install-sh"
4434   esac
4435 fi
4436
4437 # Installed binaries are usually stripped using 'strip' when the user
4438 # run "make install-strip".  However 'strip' might not be the right
4439 # tool to use in cross-compilation environments, therefore Automake
4440 # will honor the 'STRIP' environment variable to overrule this program.
4441 if test "$cross_compiling" != no; then
4442   if test -n "$ac_tool_prefix"; then
4443   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4444 set dummy ${ac_tool_prefix}strip; ac_word=$2
4445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446 printf %s "checking for $ac_word... " >&6; }
4447 if test ${ac_cv_prog_STRIP+y}
4448 then :
4449   printf %s "(cached) " >&6
4450 else $as_nop
4451   if test -n "$STRIP"; then
4452   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4453 else
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455 for as_dir in $PATH
4456 do
4457   IFS=$as_save_IFS
4458   case $as_dir in #(((
4459     '') as_dir=./ ;;
4460     */) ;;
4461     *) as_dir=$as_dir/ ;;
4462   esac
4463     for ac_exec_ext in '' $ac_executable_extensions; do
4464   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4465     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4466     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4467     break 2
4468   fi
4469 done
4470   done
4471 IFS=$as_save_IFS
4472
4473 fi
4474 fi
4475 STRIP=$ac_cv_prog_STRIP
4476 if test -n "$STRIP"; then
4477   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4478 printf "%s\n" "$STRIP" >&6; }
4479 else
4480   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481 printf "%s\n" "no" >&6; }
4482 fi
4483
4484
4485 fi
4486 if test -z "$ac_cv_prog_STRIP"; then
4487   ac_ct_STRIP=$STRIP
4488   # Extract the first word of "strip", so it can be a program name with args.
4489 set dummy strip; ac_word=$2
4490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491 printf %s "checking for $ac_word... " >&6; }
4492 if test ${ac_cv_prog_ac_ct_STRIP+y}
4493 then :
4494   printf %s "(cached) " >&6
4495 else $as_nop
4496   if test -n "$ac_ct_STRIP"; then
4497   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4498 else
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500 for as_dir in $PATH
4501 do
4502   IFS=$as_save_IFS
4503   case $as_dir in #(((
4504     '') as_dir=./ ;;
4505     */) ;;
4506     *) as_dir=$as_dir/ ;;
4507   esac
4508     for ac_exec_ext in '' $ac_executable_extensions; do
4509   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4510     ac_cv_prog_ac_ct_STRIP="strip"
4511     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4512     break 2
4513   fi
4514 done
4515   done
4516 IFS=$as_save_IFS
4517
4518 fi
4519 fi
4520 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4521 if test -n "$ac_ct_STRIP"; then
4522   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4523 printf "%s\n" "$ac_ct_STRIP" >&6; }
4524 else
4525   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526 printf "%s\n" "no" >&6; }
4527 fi
4528
4529   if test "x$ac_ct_STRIP" = x; then
4530     STRIP=":"
4531   else
4532     case $cross_compiling:$ac_tool_warned in
4533 yes:)
4534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4535 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4536 ac_tool_warned=yes ;;
4537 esac
4538     STRIP=$ac_ct_STRIP
4539   fi
4540 else
4541   STRIP="$ac_cv_prog_STRIP"
4542 fi
4543
4544 fi
4545 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4546
4547
4548   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4549 printf %s "checking for a race-free mkdir -p... " >&6; }
4550 if test -z "$MKDIR_P"; then
4551   if test ${ac_cv_path_mkdir+y}
4552 then :
4553   printf %s "(cached) " >&6
4554 else $as_nop
4555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4557 do
4558   IFS=$as_save_IFS
4559   case $as_dir in #(((
4560     '') as_dir=./ ;;
4561     */) ;;
4562     *) as_dir=$as_dir/ ;;
4563   esac
4564     for ac_prog in mkdir gmkdir; do
4565          for ac_exec_ext in '' $ac_executable_extensions; do
4566            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4567            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4568              'mkdir ('*'coreutils) '* | \
4569              'BusyBox '* | \
4570              'mkdir (fileutils) '4.1*)
4571                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4572                break 3;;
4573            esac
4574          done
4575        done
4576   done
4577 IFS=$as_save_IFS
4578
4579 fi
4580
4581   test -d ./--version && rmdir ./--version
4582   if test ${ac_cv_path_mkdir+y}; then
4583     MKDIR_P="$ac_cv_path_mkdir -p"
4584   else
4585     # As a last resort, use the slow shell script.  Don't cache a
4586     # value for MKDIR_P within a source directory, because that will
4587     # break other packages using the cache if that directory is
4588     # removed, or if the value is a relative name.
4589     MKDIR_P="$ac_install_sh -d"
4590   fi
4591 fi
4592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4593 printf "%s\n" "$MKDIR_P" >&6; }
4594
4595 for ac_prog in gawk mawk nawk awk
4596 do
4597   # Extract the first word of "$ac_prog", so it can be a program name with args.
4598 set dummy $ac_prog; ac_word=$2
4599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4600 printf %s "checking for $ac_word... " >&6; }
4601 if test ${ac_cv_prog_AWK+y}
4602 then :
4603   printf %s "(cached) " >&6
4604 else $as_nop
4605   if test -n "$AWK"; then
4606   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4607 else
4608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609 for as_dir in $PATH
4610 do
4611   IFS=$as_save_IFS
4612   case $as_dir in #(((
4613     '') as_dir=./ ;;
4614     */) ;;
4615     *) as_dir=$as_dir/ ;;
4616   esac
4617     for ac_exec_ext in '' $ac_executable_extensions; do
4618   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4619     ac_cv_prog_AWK="$ac_prog"
4620     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4621     break 2
4622   fi
4623 done
4624   done
4625 IFS=$as_save_IFS
4626
4627 fi
4628 fi
4629 AWK=$ac_cv_prog_AWK
4630 if test -n "$AWK"; then
4631   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4632 printf "%s\n" "$AWK" >&6; }
4633 else
4634   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635 printf "%s\n" "no" >&6; }
4636 fi
4637
4638
4639   test -n "$AWK" && break
4640 done
4641
4642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4643 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4644 set x ${MAKE-make}
4645 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4646 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
4647 then :
4648   printf %s "(cached) " >&6
4649 else $as_nop
4650   cat >conftest.make <<\_ACEOF
4651 SHELL = /bin/sh
4652 all:
4653         @echo '@@@%%%=$(MAKE)=@@@%%%'
4654 _ACEOF
4655 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4656 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4657   *@@@%%%=?*=@@@%%%*)
4658     eval ac_cv_prog_make_${ac_make}_set=yes;;
4659   *)
4660     eval ac_cv_prog_make_${ac_make}_set=no;;
4661 esac
4662 rm -f conftest.make
4663 fi
4664 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4665   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4666 printf "%s\n" "yes" >&6; }
4667   SET_MAKE=
4668 else
4669   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4670 printf "%s\n" "no" >&6; }
4671   SET_MAKE="MAKE=${MAKE-make}"
4672 fi
4673
4674 rm -rf .tst 2>/dev/null
4675 mkdir .tst 2>/dev/null
4676 if test -d .tst; then
4677   am__leading_dot=.
4678 else
4679   am__leading_dot=_
4680 fi
4681 rmdir .tst 2>/dev/null
4682
4683 # Check whether --enable-silent-rules was given.
4684 if test ${enable_silent_rules+y}
4685 then :
4686   enableval=$enable_silent_rules;
4687 fi
4688
4689 case $enable_silent_rules in # (((
4690   yes) AM_DEFAULT_VERBOSITY=0;;
4691    no) AM_DEFAULT_VERBOSITY=1;;
4692     *) AM_DEFAULT_VERBOSITY=1;;
4693 esac
4694 am_make=${MAKE-make}
4695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4696 printf %s "checking whether $am_make supports nested variables... " >&6; }
4697 if test ${am_cv_make_support_nested_variables+y}
4698 then :
4699   printf %s "(cached) " >&6
4700 else $as_nop
4701   if printf "%s\n" 'TRUE=$(BAR$(V))
4702 BAR0=false
4703 BAR1=true
4704 V=1
4705 am__doit:
4706         @$(TRUE)
4707 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4708   am_cv_make_support_nested_variables=yes
4709 else
4710   am_cv_make_support_nested_variables=no
4711 fi
4712 fi
4713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4714 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4715 if test $am_cv_make_support_nested_variables = yes; then
4716     AM_V='$(V)'
4717   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4718 else
4719   AM_V=$AM_DEFAULT_VERBOSITY
4720   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4721 fi
4722 AM_BACKSLASH='\'
4723
4724 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4725   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4726   # is not polluted with repeated "-I."
4727   am__isrc=' -I$(srcdir)'
4728   # test to see if srcdir already configured
4729   if test -f $srcdir/config.status; then
4730     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4731   fi
4732 fi
4733
4734 # test whether we have cygpath
4735 if test -z "$CYGPATH_W"; then
4736   if (cygpath --version) >/dev/null 2>/dev/null; then
4737     CYGPATH_W='cygpath -w'
4738   else
4739     CYGPATH_W=echo
4740   fi
4741 fi
4742
4743
4744 # Define the identity of the package.
4745  PACKAGE='diffutils'
4746  VERSION='3.8'
4747
4748
4749 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4750
4751
4752 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4753
4754 # Some tools Automake needs.
4755
4756 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4757
4758
4759 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4760
4761
4762 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4763
4764
4765 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4766
4767
4768 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4769
4770 # For better backward compatibility.  To be removed once Automake 1.9.x
4771 # dies out for good.  For more background, see:
4772 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4773 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4774 mkdir_p='$(MKDIR_P)'
4775
4776 # We need awk for the "check" target (and possibly the TAP driver).  The
4777 # system "awk" is bad on some platforms.
4778 # Always define AMTAR for backward compatibility.  Yes, it's still used
4779 # in the wild :-(  We should find a proper way to deprecate it ...
4780 AMTAR='$${TAR-tar}'
4781
4782
4783 # We'll loop over all known methods to create a tar archive until one works.
4784 _am_tools='gnutar  pax cpio none'
4785
4786 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4787
4788
4789
4790
4791
4792 # Variables for tags utilities; see am/tags.am
4793 if test -z "$CTAGS"; then
4794   CTAGS=ctags
4795 fi
4796
4797 if test -z "$ETAGS"; then
4798   ETAGS=etags
4799 fi
4800
4801 if test -z "$CSCOPE"; then
4802   CSCOPE=cscope
4803 fi
4804
4805
4806
4807 # POSIX will say in a future version that running "rm -f" with no argument
4808 # is OK; and we want to be able to make that assumption in our Makefile
4809 # recipes.  So use an aggressive probe to check that the usage we want is
4810 # actually supported "in the wild" to an acceptable degree.
4811 # See automake bug#10828.
4812 # To make any issue more visible, cause the running configure to be aborted
4813 # by default if the 'rm' program in use doesn't match our expectations; the
4814 # user can still override this though.
4815 if rm -f && rm -fr && rm -rf; then : OK; else
4816   cat >&2 <<'END'
4817 Oops!
4818
4819 Your 'rm' program seems unable to run without file operands specified
4820 on the command line, even when the '-f' option is present.  This is contrary
4821 to the behaviour of most rm programs out there, and not conforming with
4822 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4823
4824 Please tell bug-automake@gnu.org about your system, including the value
4825 of your $PATH and any error possibly output before this message.  This
4826 can help us improve future automake versions.
4827
4828 END
4829   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4830     echo 'Configuration will proceed anyway, since you have set the' >&2
4831     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4832     echo >&2
4833   else
4834     cat >&2 <<'END'
4835 Aborting the configuration process, to ensure you take notice of the issue.
4836
4837 You can download and install GNU coreutils to get an 'rm' implementation
4838 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4839
4840 If you want to complete the configuration process using your problematic
4841 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4842 to "yes", and re-run configure.
4843
4844 END
4845     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4846   fi
4847 fi
4848
4849 # Check whether --enable-silent-rules was given.
4850 if test ${enable_silent_rules+y}
4851 then :
4852   enableval=$enable_silent_rules;
4853 fi
4854
4855 case $enable_silent_rules in # (((
4856   yes) AM_DEFAULT_VERBOSITY=0;;
4857    no) AM_DEFAULT_VERBOSITY=1;;
4858     *) AM_DEFAULT_VERBOSITY=0;;
4859 esac
4860 am_make=${MAKE-make}
4861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4862 printf %s "checking whether $am_make supports nested variables... " >&6; }
4863 if test ${am_cv_make_support_nested_variables+y}
4864 then :
4865   printf %s "(cached) " >&6
4866 else $as_nop
4867   if printf "%s\n" 'TRUE=$(BAR$(V))
4868 BAR0=false
4869 BAR1=true
4870 V=1
4871 am__doit:
4872         @$(TRUE)
4873 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4874   am_cv_make_support_nested_variables=yes
4875 else
4876   am_cv_make_support_nested_variables=no
4877 fi
4878 fi
4879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4880 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4881 if test $am_cv_make_support_nested_variables = yes; then
4882     AM_V='$(V)'
4883   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4884 else
4885   AM_V=$AM_DEFAULT_VERBOSITY
4886   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4887 fi
4888 AM_BACKSLASH='\'
4889  # make --enable-silent-rules the default.
4890
4891 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4892
4893
4894 for ac_prog in gawk mawk nawk awk
4895 do
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 $as_nop
4904   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
4909 do
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
4921   fi
4922 done
4923   done
4924 IFS=$as_save_IFS
4925
4926 fi
4927 fi
4928 AWK=$ac_cv_prog_AWK
4929 if test -n "$AWK"; then
4930   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4931 printf "%s\n" "$AWK" >&6; }
4932 else
4933   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934 printf "%s\n" "no" >&6; }
4935 fi
4936
4937
4938   test -n "$AWK" && break
4939 done
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950 ac_ext=c
4951 ac_cpp='$CPP $CPPFLAGS'
4952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4955 if test -n "$ac_tool_prefix"; then
4956   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4957 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959 printf %s "checking for $ac_word... " >&6; }
4960 if test ${ac_cv_prog_CC+y}
4961 then :
4962   printf %s "(cached) " >&6
4963 else $as_nop
4964   if test -n "$CC"; then
4965   ac_cv_prog_CC="$CC" # Let the user override the test.
4966 else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 for as_dir in $PATH
4969 do
4970   IFS=$as_save_IFS
4971   case $as_dir in #(((
4972     '') as_dir=./ ;;
4973     */) ;;
4974     *) as_dir=$as_dir/ ;;
4975   esac
4976     for ac_exec_ext in '' $ac_executable_extensions; do
4977   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4978     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4979     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4980     break 2
4981   fi
4982 done
4983   done
4984 IFS=$as_save_IFS
4985
4986 fi
4987 fi
4988 CC=$ac_cv_prog_CC
4989 if test -n "$CC"; then
4990   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4991 printf "%s\n" "$CC" >&6; }
4992 else
4993   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994 printf "%s\n" "no" >&6; }
4995 fi
4996
4997
4998 fi
4999 if test -z "$ac_cv_prog_CC"; then
5000   ac_ct_CC=$CC
5001   # Extract the first word of "gcc", so it can be a program name with args.
5002 set dummy gcc; ac_word=$2
5003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 printf %s "checking for $ac_word... " >&6; }
5005 if test ${ac_cv_prog_ac_ct_CC+y}
5006 then :
5007   printf %s "(cached) " >&6
5008 else $as_nop
5009   if test -n "$ac_ct_CC"; then
5010   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5011 else
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015   IFS=$as_save_IFS
5016   case $as_dir in #(((
5017     '') as_dir=./ ;;
5018     */) ;;
5019     *) as_dir=$as_dir/ ;;
5020   esac
5021     for ac_exec_ext in '' $ac_executable_extensions; do
5022   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5023     ac_cv_prog_ac_ct_CC="gcc"
5024     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5025     break 2
5026   fi
5027 done
5028   done
5029 IFS=$as_save_IFS
5030
5031 fi
5032 fi
5033 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5034 if test -n "$ac_ct_CC"; then
5035   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5036 printf "%s\n" "$ac_ct_CC" >&6; }
5037 else
5038   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039 printf "%s\n" "no" >&6; }
5040 fi
5041
5042   if test "x$ac_ct_CC" = x; then
5043     CC=""
5044   else
5045     case $cross_compiling:$ac_tool_warned in
5046 yes:)
5047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5048 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5049 ac_tool_warned=yes ;;
5050 esac
5051     CC=$ac_ct_CC
5052   fi
5053 else
5054   CC="$ac_cv_prog_CC"
5055 fi
5056
5057 if test -z "$CC"; then
5058           if test -n "$ac_tool_prefix"; then
5059     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5060 set dummy ${ac_tool_prefix}cc; ac_word=$2
5061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062 printf %s "checking for $ac_word... " >&6; }
5063 if test ${ac_cv_prog_CC+y}
5064 then :
5065   printf %s "(cached) " >&6
5066 else $as_nop
5067   if test -n "$CC"; then
5068   ac_cv_prog_CC="$CC" # Let the user override the test.
5069 else
5070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   case $as_dir in #(((
5075     '') as_dir=./ ;;
5076     */) ;;
5077     *) as_dir=$as_dir/ ;;
5078   esac
5079     for ac_exec_ext in '' $ac_executable_extensions; do
5080   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5081     ac_cv_prog_CC="${ac_tool_prefix}cc"
5082     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5083     break 2
5084   fi
5085 done
5086   done
5087 IFS=$as_save_IFS
5088
5089 fi
5090 fi
5091 CC=$ac_cv_prog_CC
5092 if test -n "$CC"; then
5093   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5094 printf "%s\n" "$CC" >&6; }
5095 else
5096   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097 printf "%s\n" "no" >&6; }
5098 fi
5099
5100
5101   fi
5102 fi
5103 if test -z "$CC"; then
5104   # Extract the first word of "cc", so it can be a program name with args.
5105 set dummy cc; ac_word=$2
5106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5107 printf %s "checking for $ac_word... " >&6; }
5108 if test ${ac_cv_prog_CC+y}
5109 then :
5110   printf %s "(cached) " >&6
5111 else $as_nop
5112   if test -n "$CC"; then
5113   ac_cv_prog_CC="$CC" # Let the user override the test.
5114 else
5115   ac_prog_rejected=no
5116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5117 for as_dir in $PATH
5118 do
5119   IFS=$as_save_IFS
5120   case $as_dir in #(((
5121     '') as_dir=./ ;;
5122     */) ;;
5123     *) as_dir=$as_dir/ ;;
5124   esac
5125     for ac_exec_ext in '' $ac_executable_extensions; do
5126   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5127     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5128        ac_prog_rejected=yes
5129        continue
5130      fi
5131     ac_cv_prog_CC="cc"
5132     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5133     break 2
5134   fi
5135 done
5136   done
5137 IFS=$as_save_IFS
5138
5139 if test $ac_prog_rejected = yes; then
5140   # We found a bogon in the path, so make sure we never use it.
5141   set dummy $ac_cv_prog_CC
5142   shift
5143   if test $# != 0; then
5144     # We chose a different compiler from the bogus one.
5145     # However, it has the same basename, so the bogon will be chosen
5146     # first if we set CC to just the basename; use the full file name.
5147     shift
5148     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5149   fi
5150 fi
5151 fi
5152 fi
5153 CC=$ac_cv_prog_CC
5154 if test -n "$CC"; then
5155   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5156 printf "%s\n" "$CC" >&6; }
5157 else
5158   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159 printf "%s\n" "no" >&6; }
5160 fi
5161
5162
5163 fi
5164 if test -z "$CC"; then
5165   if test -n "$ac_tool_prefix"; then
5166   for ac_prog in cl.exe
5167   do
5168     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5169 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171 printf %s "checking for $ac_word... " >&6; }
5172 if test ${ac_cv_prog_CC+y}
5173 then :
5174   printf %s "(cached) " >&6
5175 else $as_nop
5176   if test -n "$CC"; then
5177   ac_cv_prog_CC="$CC" # Let the user override the test.
5178 else
5179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180 for as_dir in $PATH
5181 do
5182   IFS=$as_save_IFS
5183   case $as_dir in #(((
5184     '') as_dir=./ ;;
5185     */) ;;
5186     *) as_dir=$as_dir/ ;;
5187   esac
5188     for ac_exec_ext in '' $ac_executable_extensions; do
5189   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5190     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5191     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5192     break 2
5193   fi
5194 done
5195   done
5196 IFS=$as_save_IFS
5197
5198 fi
5199 fi
5200 CC=$ac_cv_prog_CC
5201 if test -n "$CC"; then
5202   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5203 printf "%s\n" "$CC" >&6; }
5204 else
5205   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206 printf "%s\n" "no" >&6; }
5207 fi
5208
5209
5210     test -n "$CC" && break
5211   done
5212 fi
5213 if test -z "$CC"; then
5214   ac_ct_CC=$CC
5215   for ac_prog in cl.exe
5216 do
5217   # Extract the first word of "$ac_prog", so it can be a program name with args.
5218 set dummy $ac_prog; ac_word=$2
5219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5220 printf %s "checking for $ac_word... " >&6; }
5221 if test ${ac_cv_prog_ac_ct_CC+y}
5222 then :
5223   printf %s "(cached) " >&6
5224 else $as_nop
5225   if test -n "$ac_ct_CC"; then
5226   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5227 else
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229 for as_dir in $PATH
5230 do
5231   IFS=$as_save_IFS
5232   case $as_dir in #(((
5233     '') as_dir=./ ;;
5234     */) ;;
5235     *) as_dir=$as_dir/ ;;
5236   esac
5237     for ac_exec_ext in '' $ac_executable_extensions; do
5238   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5239     ac_cv_prog_ac_ct_CC="$ac_prog"
5240     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5241     break 2
5242   fi
5243 done
5244   done
5245 IFS=$as_save_IFS
5246
5247 fi
5248 fi
5249 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5250 if test -n "$ac_ct_CC"; then
5251   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5252 printf "%s\n" "$ac_ct_CC" >&6; }
5253 else
5254   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255 printf "%s\n" "no" >&6; }
5256 fi
5257
5258
5259   test -n "$ac_ct_CC" && break
5260 done
5261
5262   if test "x$ac_ct_CC" = x; then
5263     CC=""
5264   else
5265     case $cross_compiling:$ac_tool_warned in
5266 yes:)
5267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5268 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5269 ac_tool_warned=yes ;;
5270 esac
5271     CC=$ac_ct_CC
5272   fi
5273 fi
5274
5275 fi
5276 if test -z "$CC"; then
5277   if test -n "$ac_tool_prefix"; then
5278   # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5279 set dummy ${ac_tool_prefix}clang; ac_word=$2
5280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 printf %s "checking for $ac_word... " >&6; }
5282 if test ${ac_cv_prog_CC+y}
5283 then :
5284   printf %s "(cached) " >&6
5285 else $as_nop
5286   if test -n "$CC"; then
5287   ac_cv_prog_CC="$CC" # Let the user override the test.
5288 else
5289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290 for as_dir in $PATH
5291 do
5292   IFS=$as_save_IFS
5293   case $as_dir in #(((
5294     '') as_dir=./ ;;
5295     */) ;;
5296     *) as_dir=$as_dir/ ;;
5297   esac
5298     for ac_exec_ext in '' $ac_executable_extensions; do
5299   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5300     ac_cv_prog_CC="${ac_tool_prefix}clang"
5301     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5302     break 2
5303   fi
5304 done
5305   done
5306 IFS=$as_save_IFS
5307
5308 fi
5309 fi
5310 CC=$ac_cv_prog_CC
5311 if test -n "$CC"; then
5312   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5313 printf "%s\n" "$CC" >&6; }
5314 else
5315   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316 printf "%s\n" "no" >&6; }
5317 fi
5318
5319
5320 fi
5321 if test -z "$ac_cv_prog_CC"; then
5322   ac_ct_CC=$CC
5323   # Extract the first word of "clang", so it can be a program name with args.
5324 set dummy clang; ac_word=$2
5325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326 printf %s "checking for $ac_word... " >&6; }
5327 if test ${ac_cv_prog_ac_ct_CC+y}
5328 then :
5329   printf %s "(cached) " >&6
5330 else $as_nop
5331   if test -n "$ac_ct_CC"; then
5332   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5333 else
5334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335 for as_dir in $PATH
5336 do
5337   IFS=$as_save_IFS
5338   case $as_dir in #(((
5339     '') as_dir=./ ;;
5340     */) ;;
5341     *) as_dir=$as_dir/ ;;
5342   esac
5343     for ac_exec_ext in '' $ac_executable_extensions; do
5344   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5345     ac_cv_prog_ac_ct_CC="clang"
5346     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5347     break 2
5348   fi
5349 done
5350   done
5351 IFS=$as_save_IFS
5352
5353 fi
5354 fi
5355 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5356 if test -n "$ac_ct_CC"; then
5357   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5358 printf "%s\n" "$ac_ct_CC" >&6; }
5359 else
5360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361 printf "%s\n" "no" >&6; }
5362 fi
5363
5364   if test "x$ac_ct_CC" = x; then
5365     CC=""
5366   else
5367     case $cross_compiling:$ac_tool_warned in
5368 yes:)
5369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5370 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5371 ac_tool_warned=yes ;;
5372 esac
5373     CC=$ac_ct_CC
5374   fi
5375 else
5376   CC="$ac_cv_prog_CC"
5377 fi
5378
5379 fi
5380
5381
5382 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5383 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5384 as_fn_error $? "no acceptable C compiler found in \$PATH
5385 See \`config.log' for more details" "$LINENO" 5; }
5386
5387 # Provide some information about the compiler.
5388 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5389 set X $ac_compile
5390 ac_compiler=$2
5391 for ac_option in --version -v -V -qversion -version; do
5392   { { ac_try="$ac_compiler $ac_option >&5"
5393 case "(($ac_try" in
5394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5395   *) ac_try_echo=$ac_try;;
5396 esac
5397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5398 printf "%s\n" "$ac_try_echo"; } >&5
5399   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5400   ac_status=$?
5401   if test -s conftest.err; then
5402     sed '10a\
5403 ... rest of stderr output deleted ...
5404          10q' conftest.err >conftest.er1
5405     cat conftest.er1 >&5
5406   fi
5407   rm -f conftest.er1 conftest.err
5408   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5409   test $ac_status = 0; }
5410 done
5411
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h.  */
5414
5415 int
5416 main (void)
5417 {
5418
5419   ;
5420   return 0;
5421 }
5422 _ACEOF
5423 ac_clean_files_save=$ac_clean_files
5424 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5425 # Try to create an executable without -o first, disregard a.out.
5426 # It will help us diagnose broken compilers, and finding out an intuition
5427 # of exeext.
5428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5429 printf %s "checking whether the C compiler works... " >&6; }
5430 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5431
5432 # The possible output files:
5433 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5434
5435 ac_rmfiles=
5436 for ac_file in $ac_files
5437 do
5438   case $ac_file in
5439     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5440     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5441   esac
5442 done
5443 rm -f $ac_rmfiles
5444
5445 if { { ac_try="$ac_link_default"
5446 case "(($ac_try" in
5447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5448   *) ac_try_echo=$ac_try;;
5449 esac
5450 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5451 printf "%s\n" "$ac_try_echo"; } >&5
5452   (eval "$ac_link_default") 2>&5
5453   ac_status=$?
5454   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5455   test $ac_status = 0; }
5456 then :
5457   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5458 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5459 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5460 # so that the user can short-circuit this test for compilers unknown to
5461 # Autoconf.
5462 for ac_file in $ac_files ''
5463 do
5464   test -f "$ac_file" || continue
5465   case $ac_file in
5466     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5467         ;;
5468     [ab].out )
5469         # We found the default executable, but exeext='' is most
5470         # certainly right.
5471         break;;
5472     *.* )
5473         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5474         then :; else
5475            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5476         fi
5477         # We set ac_cv_exeext here because the later test for it is not
5478         # safe: cross compilers may not add the suffix if given an `-o'
5479         # argument, so we may need to know it at that point already.
5480         # Even if this section looks crufty: it has the advantage of
5481         # actually working.
5482         break;;
5483     * )
5484         break;;
5485   esac
5486 done
5487 test "$ac_cv_exeext" = no && ac_cv_exeext=
5488
5489 else $as_nop
5490   ac_file=''
5491 fi
5492 if test -z "$ac_file"
5493 then :
5494   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5495 printf "%s\n" "no" >&6; }
5496 printf "%s\n" "$as_me: failed program was:" >&5
5497 sed 's/^/| /' conftest.$ac_ext >&5
5498
5499 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5500 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5501 as_fn_error 77 "C compiler cannot create executables
5502 See \`config.log' for more details" "$LINENO" 5; }
5503 else $as_nop
5504   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5505 printf "%s\n" "yes" >&6; }
5506 fi
5507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5508 printf %s "checking for C compiler default output file name... " >&6; }
5509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5510 printf "%s\n" "$ac_file" >&6; }
5511 ac_exeext=$ac_cv_exeext
5512
5513 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5514 ac_clean_files=$ac_clean_files_save
5515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5516 printf %s "checking for suffix of executables... " >&6; }
5517 if { { ac_try="$ac_link"
5518 case "(($ac_try" in
5519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520   *) ac_try_echo=$ac_try;;
5521 esac
5522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5523 printf "%s\n" "$ac_try_echo"; } >&5
5524   (eval "$ac_link") 2>&5
5525   ac_status=$?
5526   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5527   test $ac_status = 0; }
5528 then :
5529   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5530 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5531 # work properly (i.e., refer to `conftest.exe'), while it won't with
5532 # `rm'.
5533 for ac_file in conftest.exe conftest conftest.*; do
5534   test -f "$ac_file" || continue
5535   case $ac_file in
5536     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5537     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5538           break;;
5539     * ) break;;
5540   esac
5541 done
5542 else $as_nop
5543   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5544 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5545 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5546 See \`config.log' for more details" "$LINENO" 5; }
5547 fi
5548 rm -f conftest conftest$ac_cv_exeext
5549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5550 printf "%s\n" "$ac_cv_exeext" >&6; }
5551
5552 rm -f conftest.$ac_ext
5553 EXEEXT=$ac_cv_exeext
5554 ac_exeext=$EXEEXT
5555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5556 /* end confdefs.h.  */
5557 #include <stdio.h>
5558 int
5559 main (void)
5560 {
5561 FILE *f = fopen ("conftest.out", "w");
5562  return ferror (f) || fclose (f) != 0;
5563
5564   ;
5565   return 0;
5566 }
5567 _ACEOF
5568 ac_clean_files="$ac_clean_files conftest.out"
5569 # Check that the compiler produces executables we can run.  If not, either
5570 # the compiler is broken, or we cross compile.
5571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5572 printf %s "checking whether we are cross compiling... " >&6; }
5573 if test "$cross_compiling" != yes; then
5574   { { ac_try="$ac_link"
5575 case "(($ac_try" in
5576   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5577   *) ac_try_echo=$ac_try;;
5578 esac
5579 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5580 printf "%s\n" "$ac_try_echo"; } >&5
5581   (eval "$ac_link") 2>&5
5582   ac_status=$?
5583   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5584   test $ac_status = 0; }
5585   if { ac_try='./conftest$ac_cv_exeext'
5586   { { case "(($ac_try" in
5587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5588   *) ac_try_echo=$ac_try;;
5589 esac
5590 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5591 printf "%s\n" "$ac_try_echo"; } >&5
5592   (eval "$ac_try") 2>&5
5593   ac_status=$?
5594   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5595   test $ac_status = 0; }; }; then
5596     cross_compiling=no
5597   else
5598     if test "$cross_compiling" = maybe; then
5599         cross_compiling=yes
5600     else
5601         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5602 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5603 as_fn_error 77 "cannot run C compiled programs.
5604 If you meant to cross compile, use \`--host'.
5605 See \`config.log' for more details" "$LINENO" 5; }
5606     fi
5607   fi
5608 fi
5609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5610 printf "%s\n" "$cross_compiling" >&6; }
5611
5612 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5613 ac_clean_files=$ac_clean_files_save
5614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5615 printf %s "checking for suffix of object files... " >&6; }
5616 if test ${ac_cv_objext+y}
5617 then :
5618   printf %s "(cached) " >&6
5619 else $as_nop
5620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621 /* end confdefs.h.  */
5622
5623 int
5624 main (void)
5625 {
5626
5627   ;
5628   return 0;
5629 }
5630 _ACEOF
5631 rm -f conftest.o conftest.obj
5632 if { { ac_try="$ac_compile"
5633 case "(($ac_try" in
5634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5635   *) ac_try_echo=$ac_try;;
5636 esac
5637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5638 printf "%s\n" "$ac_try_echo"; } >&5
5639   (eval "$ac_compile") 2>&5
5640   ac_status=$?
5641   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5642   test $ac_status = 0; }
5643 then :
5644   for ac_file in conftest.o conftest.obj conftest.*; do
5645   test -f "$ac_file" || continue;
5646   case $ac_file in
5647     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5648     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5649        break;;
5650   esac
5651 done
5652 else $as_nop
5653   printf "%s\n" "$as_me: failed program was:" >&5
5654 sed 's/^/| /' conftest.$ac_ext >&5
5655
5656 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5657 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5658 as_fn_error $? "cannot compute suffix of object files: cannot compile
5659 See \`config.log' for more details" "$LINENO" 5; }
5660 fi
5661 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5662 fi
5663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5664 printf "%s\n" "$ac_cv_objext" >&6; }
5665 OBJEXT=$ac_cv_objext
5666 ac_objext=$OBJEXT
5667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5668 printf %s "checking whether the compiler supports GNU C... " >&6; }
5669 if test ${ac_cv_c_compiler_gnu+y}
5670 then :
5671   printf %s "(cached) " >&6
5672 else $as_nop
5673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h.  */
5675
5676 int
5677 main (void)
5678 {
5679 #ifndef __GNUC__
5680        choke me
5681 #endif
5682
5683   ;
5684   return 0;
5685 }
5686 _ACEOF
5687 if ac_fn_c_try_compile "$LINENO"
5688 then :
5689   ac_compiler_gnu=yes
5690 else $as_nop
5691   ac_compiler_gnu=no
5692 fi
5693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5694 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5695
5696 fi
5697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5698 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5700
5701 if test $ac_compiler_gnu = yes; then
5702   GCC=yes
5703 else
5704   GCC=
5705 fi
5706 ac_test_CFLAGS=${CFLAGS+y}
5707 ac_save_CFLAGS=$CFLAGS
5708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5709 printf %s "checking whether $CC accepts -g... " >&6; }
5710 if test ${ac_cv_prog_cc_g+y}
5711 then :
5712   printf %s "(cached) " >&6
5713 else $as_nop
5714   ac_save_c_werror_flag=$ac_c_werror_flag
5715    ac_c_werror_flag=yes
5716    ac_cv_prog_cc_g=no
5717    CFLAGS="-g"
5718    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h.  */
5720
5721 int
5722 main (void)
5723 {
5724
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 if ac_fn_c_try_compile "$LINENO"
5730 then :
5731   ac_cv_prog_cc_g=yes
5732 else $as_nop
5733   CFLAGS=""
5734       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5735 /* end confdefs.h.  */
5736
5737 int
5738 main (void)
5739 {
5740
5741   ;
5742   return 0;
5743 }
5744 _ACEOF
5745 if ac_fn_c_try_compile "$LINENO"
5746 then :
5747
5748 else $as_nop
5749   ac_c_werror_flag=$ac_save_c_werror_flag
5750          CFLAGS="-g"
5751          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752 /* end confdefs.h.  */
5753
5754 int
5755 main (void)
5756 {
5757
5758   ;
5759   return 0;
5760 }
5761 _ACEOF
5762 if ac_fn_c_try_compile "$LINENO"
5763 then :
5764   ac_cv_prog_cc_g=yes
5765 fi
5766 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5767 fi
5768 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5769 fi
5770 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5771    ac_c_werror_flag=$ac_save_c_werror_flag
5772 fi
5773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5774 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5775 if test $ac_test_CFLAGS; then
5776   CFLAGS=$ac_save_CFLAGS
5777 elif test $ac_cv_prog_cc_g = yes; then
5778   if test "$GCC" = yes; then
5779     CFLAGS="-g -O2"
5780   else
5781     CFLAGS="-g"
5782   fi
5783 else
5784   if test "$GCC" = yes; then
5785     CFLAGS="-O2"
5786   else
5787     CFLAGS=
5788   fi
5789 fi
5790 ac_prog_cc_stdc=no
5791 if test x$ac_prog_cc_stdc = xno
5792 then :
5793   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5794 printf %s "checking for $CC option to enable C11 features... " >&6; }
5795 if test ${ac_cv_prog_cc_c11+y}
5796 then :
5797   printf %s "(cached) " >&6
5798 else $as_nop
5799   ac_cv_prog_cc_c11=no
5800 ac_save_CC=$CC
5801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5802 /* end confdefs.h.  */
5803 $ac_c_conftest_c11_program
5804 _ACEOF
5805 for ac_arg in '' -std=gnu11
5806 do
5807   CC="$ac_save_CC $ac_arg"
5808   if ac_fn_c_try_compile "$LINENO"
5809 then :
5810   ac_cv_prog_cc_c11=$ac_arg
5811 fi
5812 rm -f core conftest.err conftest.$ac_objext conftest.beam
5813   test "x$ac_cv_prog_cc_c11" != "xno" && break
5814 done
5815 rm -f conftest.$ac_ext
5816 CC=$ac_save_CC
5817 fi
5818
5819 if test "x$ac_cv_prog_cc_c11" = xno
5820 then :
5821   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5822 printf "%s\n" "unsupported" >&6; }
5823 else $as_nop
5824   if test "x$ac_cv_prog_cc_c11" = x
5825 then :
5826   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5827 printf "%s\n" "none needed" >&6; }
5828 else $as_nop
5829   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5830 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5831      CC="$CC $ac_cv_prog_cc_c11"
5832 fi
5833   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5834   ac_prog_cc_stdc=c11
5835 fi
5836 fi
5837 if test x$ac_prog_cc_stdc = xno
5838 then :
5839   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5840 printf %s "checking for $CC option to enable C99 features... " >&6; }
5841 if test ${ac_cv_prog_cc_c99+y}
5842 then :
5843   printf %s "(cached) " >&6
5844 else $as_nop
5845   ac_cv_prog_cc_c99=no
5846 ac_save_CC=$CC
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848 /* end confdefs.h.  */
5849 $ac_c_conftest_c99_program
5850 _ACEOF
5851 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5852 do
5853   CC="$ac_save_CC $ac_arg"
5854   if ac_fn_c_try_compile "$LINENO"
5855 then :
5856   ac_cv_prog_cc_c99=$ac_arg
5857 fi
5858 rm -f core conftest.err conftest.$ac_objext conftest.beam
5859   test "x$ac_cv_prog_cc_c99" != "xno" && break
5860 done
5861 rm -f conftest.$ac_ext
5862 CC=$ac_save_CC
5863 fi
5864
5865 if test "x$ac_cv_prog_cc_c99" = xno
5866 then :
5867   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5868 printf "%s\n" "unsupported" >&6; }
5869 else $as_nop
5870   if test "x$ac_cv_prog_cc_c99" = x
5871 then :
5872   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5873 printf "%s\n" "none needed" >&6; }
5874 else $as_nop
5875   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5876 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5877      CC="$CC $ac_cv_prog_cc_c99"
5878 fi
5879   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5880   ac_prog_cc_stdc=c99
5881 fi
5882 fi
5883 if test x$ac_prog_cc_stdc = xno
5884 then :
5885   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5886 printf %s "checking for $CC option to enable C89 features... " >&6; }
5887 if test ${ac_cv_prog_cc_c89+y}
5888 then :
5889   printf %s "(cached) " >&6
5890 else $as_nop
5891   ac_cv_prog_cc_c89=no
5892 ac_save_CC=$CC
5893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h.  */
5895 $ac_c_conftest_c89_program
5896 _ACEOF
5897 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5898 do
5899   CC="$ac_save_CC $ac_arg"
5900   if ac_fn_c_try_compile "$LINENO"
5901 then :
5902   ac_cv_prog_cc_c89=$ac_arg
5903 fi
5904 rm -f core conftest.err conftest.$ac_objext conftest.beam
5905   test "x$ac_cv_prog_cc_c89" != "xno" && break
5906 done
5907 rm -f conftest.$ac_ext
5908 CC=$ac_save_CC
5909 fi
5910
5911 if test "x$ac_cv_prog_cc_c89" = xno
5912 then :
5913   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5914 printf "%s\n" "unsupported" >&6; }
5915 else $as_nop
5916   if test "x$ac_cv_prog_cc_c89" = x
5917 then :
5918   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5919 printf "%s\n" "none needed" >&6; }
5920 else $as_nop
5921   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5922 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5923      CC="$CC $ac_cv_prog_cc_c89"
5924 fi
5925   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5926   ac_prog_cc_stdc=c89
5927 fi
5928 fi
5929
5930 ac_ext=c
5931 ac_cpp='$CPP $CPPFLAGS'
5932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5935
5936
5937   ac_ext=c
5938 ac_cpp='$CPP $CPPFLAGS'
5939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5943 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5944 if test ${am_cv_prog_cc_c_o+y}
5945 then :
5946   printf %s "(cached) " >&6
5947 else $as_nop
5948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h.  */
5950
5951 int
5952 main (void)
5953 {
5954
5955   ;
5956   return 0;
5957 }
5958 _ACEOF
5959   # Make sure it works both with $CC and with simple cc.
5960   # Following AC_PROG_CC_C_O, we do the test twice because some
5961   # compilers refuse to overwrite an existing .o file with -o,
5962   # though they will create one.
5963   am_cv_prog_cc_c_o=yes
5964   for am_i in 1 2; do
5965     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5966    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5967    ac_status=$?
5968    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969    (exit $ac_status); } \
5970          && test -f conftest2.$ac_objext; then
5971       : OK
5972     else
5973       am_cv_prog_cc_c_o=no
5974       break
5975     fi
5976   done
5977   rm -f core conftest*
5978   unset am_i
5979 fi
5980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5981 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5982 if test "$am_cv_prog_cc_c_o" != yes; then
5983    # Losing compiler, so override with the script.
5984    # FIXME: It is wrong to rewrite CC.
5985    # But if we don't then we get into trouble of one sort or another.
5986    # A longer-term fix would be to have automake use am__CC in this case,
5987    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5988    CC="$am_aux_dir/compile $CC"
5989 fi
5990 ac_ext=c
5991 ac_cpp='$CPP $CPPFLAGS'
5992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5995
5996
5997
5998   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5999 printf %s "checking whether the compiler is clang... " >&6; }
6000 if test ${gl_cv_compiler_clang+y}
6001 then :
6002   printf %s "(cached) " >&6
6003 else $as_nop
6004                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005 /* end confdefs.h.  */
6006
6007            #ifdef __clang__
6008            barfbarf
6009            #endif
6010
6011 int
6012 main (void)
6013 {
6014
6015   ;
6016   return 0;
6017 }
6018
6019 _ACEOF
6020 if ac_fn_c_try_compile "$LINENO"
6021 then :
6022   gl_cv_compiler_clang=no
6023 else $as_nop
6024   gl_cv_compiler_clang=yes
6025 fi
6026 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6027
6028 fi
6029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6030 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6031
6032
6033   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6034 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6035 if test ${gl_cv_compiler_check_decl_option+y}
6036 then :
6037   printf %s "(cached) " >&6
6038 else $as_nop
6039   if test $gl_cv_compiler_clang = yes; then
6040                      save_ac_compile="$ac_compile"
6041        ac_compile="$ac_compile -Werror=implicit-function-declaration"
6042                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6043 /* end confdefs.h.  */
6044
6045 int
6046 main (void)
6047 {
6048
6049   ;
6050   return 0;
6051 }
6052 _ACEOF
6053 if ac_fn_c_try_compile "$LINENO"
6054 then :
6055   gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6056 else $as_nop
6057   gl_cv_compiler_check_decl_option=none
6058 fi
6059 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6060        ac_compile="$save_ac_compile"
6061      else
6062        gl_cv_compiler_check_decl_option=none
6063      fi
6064
6065 fi
6066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6067 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6068   if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6069     ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6070   else
6071     ac_compile_for_check_decl="$ac_compile"
6072   fi
6073
6074 DEPDIR="${am__leading_dot}deps"
6075
6076 ac_config_commands="$ac_config_commands depfiles"
6077
6078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6079 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6080 cat > confinc.mk << 'END'
6081 am__doit:
6082         @echo this is the am__doit target >confinc.out
6083 .PHONY: am__doit
6084 END
6085 am__include="#"
6086 am__quote=
6087 # BSD make does it like this.
6088 echo '.include "confinc.mk" # ignored' > confmf.BSD
6089 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6090 echo 'include confinc.mk # ignored' > confmf.GNU
6091 _am_result=no
6092 for s in GNU BSD; do
6093   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6094    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6095    ac_status=$?
6096    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097    (exit $ac_status); }
6098   case $?:`cat confinc.out 2>/dev/null` in #(
6099   '0:this is the am__doit target') :
6100     case $s in #(
6101   BSD) :
6102     am__include='.include' am__quote='"' ;; #(
6103   *) :
6104     am__include='include' am__quote='' ;;
6105 esac ;; #(
6106   *) :
6107      ;;
6108 esac
6109   if test "$am__include" != "#"; then
6110     _am_result="yes ($s style)"
6111     break
6112   fi
6113 done
6114 rm -f confinc.* confmf.*
6115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6116 printf "%s\n" "${_am_result}" >&6; }
6117
6118 # Check whether --enable-dependency-tracking was given.
6119 if test ${enable_dependency_tracking+y}
6120 then :
6121   enableval=$enable_dependency_tracking;
6122 fi
6123
6124 if test "x$enable_dependency_tracking" != xno; then
6125   am_depcomp="$ac_aux_dir/depcomp"
6126   AMDEPBACKSLASH='\'
6127   am__nodep='_no'
6128 fi
6129  if test "x$enable_dependency_tracking" != xno; then
6130   AMDEP_TRUE=
6131   AMDEP_FALSE='#'
6132 else
6133   AMDEP_TRUE='#'
6134   AMDEP_FALSE=
6135 fi
6136
6137
6138
6139 depcc="$CC"   am_compiler_list=
6140
6141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6142 printf %s "checking dependency style of $depcc... " >&6; }
6143 if test ${am_cv_CC_dependencies_compiler_type+y}
6144 then :
6145   printf %s "(cached) " >&6
6146 else $as_nop
6147   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6148   # We make a subdir and do the tests there.  Otherwise we can end up
6149   # making bogus files that we don't know about and never remove.  For
6150   # instance it was reported that on HP-UX the gcc test will end up
6151   # making a dummy file named 'D' -- because '-MD' means "put the output
6152   # in D".
6153   rm -rf conftest.dir
6154   mkdir conftest.dir
6155   # Copy depcomp to subdir because otherwise we won't find it if we're
6156   # using a relative directory.
6157   cp "$am_depcomp" conftest.dir
6158   cd conftest.dir
6159   # We will build objects and dependencies in a subdirectory because
6160   # it helps to detect inapplicable dependency modes.  For instance
6161   # both Tru64's cc and ICC support -MD to output dependencies as a
6162   # side effect of compilation, but ICC will put the dependencies in
6163   # the current directory while Tru64 will put them in the object
6164   # directory.
6165   mkdir sub
6166
6167   am_cv_CC_dependencies_compiler_type=none
6168   if test "$am_compiler_list" = ""; then
6169      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6170   fi
6171   am__universal=false
6172   case " $depcc " in #(
6173      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6174      esac
6175
6176   for depmode in $am_compiler_list; do
6177     # Setup a source with many dependencies, because some compilers
6178     # like to wrap large dependency lists on column 80 (with \), and
6179     # we should not choose a depcomp mode which is confused by this.
6180     #
6181     # We need to recreate these files for each test, as the compiler may
6182     # overwrite some of them when testing with obscure command lines.
6183     # This happens at least with the AIX C compiler.
6184     : > sub/conftest.c
6185     for i in 1 2 3 4 5 6; do
6186       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6187       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6188       # Solaris 10 /bin/sh.
6189       echo '/* dummy */' > sub/conftst$i.h
6190     done
6191     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6192
6193     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6194     # mode.  It turns out that the SunPro C++ compiler does not properly
6195     # handle '-M -o', and we need to detect this.  Also, some Intel
6196     # versions had trouble with output in subdirs.
6197     am__obj=sub/conftest.${OBJEXT-o}
6198     am__minus_obj="-o $am__obj"
6199     case $depmode in
6200     gcc)
6201       # This depmode causes a compiler race in universal mode.
6202       test "$am__universal" = false || continue
6203       ;;
6204     nosideeffect)
6205       # After this tag, mechanisms are not by side-effect, so they'll
6206       # only be used when explicitly requested.
6207       if test "x$enable_dependency_tracking" = xyes; then
6208         continue
6209       else
6210         break
6211       fi
6212       ;;
6213     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6214       # This compiler won't grok '-c -o', but also, the minuso test has
6215       # not run yet.  These depmodes are late enough in the game, and
6216       # so weak that their functioning should not be impacted.
6217       am__obj=conftest.${OBJEXT-o}
6218       am__minus_obj=
6219       ;;
6220     none) break ;;
6221     esac
6222     if depmode=$depmode \
6223        source=sub/conftest.c object=$am__obj \
6224        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6225        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6226          >/dev/null 2>conftest.err &&
6227        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6228        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6229        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6230        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6231       # icc doesn't choke on unknown options, it will just issue warnings
6232       # or remarks (even with -Werror).  So we grep stderr for any message
6233       # that says an option was ignored or not supported.
6234       # When given -MP, icc 7.0 and 7.1 complain thusly:
6235       #   icc: Command line warning: ignoring option '-M'; no argument required
6236       # The diagnosis changed in icc 8.0:
6237       #   icc: Command line remark: option '-MP' not supported
6238       if (grep 'ignoring option' conftest.err ||
6239           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6240         am_cv_CC_dependencies_compiler_type=$depmode
6241         break
6242       fi
6243     fi
6244   done
6245
6246   cd ..
6247   rm -rf conftest.dir
6248 else
6249   am_cv_CC_dependencies_compiler_type=none
6250 fi
6251
6252 fi
6253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6254 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6255 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6256
6257  if
6258   test "x$enable_dependency_tracking" != xno \
6259   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6260   am__fastdepCC_TRUE=
6261   am__fastdepCC_FALSE='#'
6262 else
6263   am__fastdepCC_TRUE='#'
6264   am__fastdepCC_FALSE=
6265 fi
6266
6267
6268
6269
6270 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
6271
6272 if test -n "$ac_tool_prefix"; then
6273   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6274 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6276 printf %s "checking for $ac_word... " >&6; }
6277 if test ${ac_cv_prog_RANLIB+y}
6278 then :
6279   printf %s "(cached) " >&6
6280 else $as_nop
6281   if test -n "$RANLIB"; then
6282   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6283 else
6284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285 for as_dir in $PATH
6286 do
6287   IFS=$as_save_IFS
6288   case $as_dir in #(((
6289     '') as_dir=./ ;;
6290     */) ;;
6291     *) as_dir=$as_dir/ ;;
6292   esac
6293     for ac_exec_ext in '' $ac_executable_extensions; do
6294   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6295     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6296     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6297     break 2
6298   fi
6299 done
6300   done
6301 IFS=$as_save_IFS
6302
6303 fi
6304 fi
6305 RANLIB=$ac_cv_prog_RANLIB
6306 if test -n "$RANLIB"; then
6307   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6308 printf "%s\n" "$RANLIB" >&6; }
6309 else
6310   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311 printf "%s\n" "no" >&6; }
6312 fi
6313
6314
6315 fi
6316 if test -z "$ac_cv_prog_RANLIB"; then
6317   ac_ct_RANLIB=$RANLIB
6318   # Extract the first word of "ranlib", so it can be a program name with args.
6319 set dummy ranlib; ac_word=$2
6320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6321 printf %s "checking for $ac_word... " >&6; }
6322 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6323 then :
6324   printf %s "(cached) " >&6
6325 else $as_nop
6326   if test -n "$ac_ct_RANLIB"; then
6327   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6328 else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330 for as_dir in $PATH
6331 do
6332   IFS=$as_save_IFS
6333   case $as_dir in #(((
6334     '') as_dir=./ ;;
6335     */) ;;
6336     *) as_dir=$as_dir/ ;;
6337   esac
6338     for ac_exec_ext in '' $ac_executable_extensions; do
6339   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6340     ac_cv_prog_ac_ct_RANLIB="ranlib"
6341     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6342     break 2
6343   fi
6344 done
6345   done
6346 IFS=$as_save_IFS
6347
6348 fi
6349 fi
6350 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6351 if test -n "$ac_ct_RANLIB"; then
6352   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6353 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6354 else
6355   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356 printf "%s\n" "no" >&6; }
6357 fi
6358
6359   if test "x$ac_ct_RANLIB" = x; then
6360     RANLIB=":"
6361   else
6362     case $cross_compiling:$ac_tool_warned in
6363 yes:)
6364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6365 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6366 ac_tool_warned=yes ;;
6367 esac
6368     RANLIB=$ac_ct_RANLIB
6369   fi
6370 else
6371   RANLIB="$ac_cv_prog_RANLIB"
6372 fi
6373
6374
6375 ac_header= ac_cache=
6376 for ac_item in $ac_header_c_list
6377 do
6378   if test $ac_cache; then
6379     ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6380     if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6381       printf "%s\n" "#define $ac_item 1" >> confdefs.h
6382     fi
6383     ac_header= ac_cache=
6384   elif test $ac_header; then
6385     ac_cache=$ac_item
6386   else
6387     ac_header=$ac_item
6388   fi
6389 done
6390
6391
6392
6393
6394
6395
6396
6397
6398 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6399 then :
6400
6401 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6402
6403 fi
6404
6405
6406
6407
6408
6409
6410   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6411 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6412 if test ${ac_cv_safe_to_define___extensions__+y}
6413 then :
6414   printf %s "(cached) " >&6
6415 else $as_nop
6416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6417 /* end confdefs.h.  */
6418
6419 #         define __EXTENSIONS__ 1
6420           $ac_includes_default
6421 int
6422 main (void)
6423 {
6424
6425   ;
6426   return 0;
6427 }
6428 _ACEOF
6429 if ac_fn_c_try_compile "$LINENO"
6430 then :
6431   ac_cv_safe_to_define___extensions__=yes
6432 else $as_nop
6433   ac_cv_safe_to_define___extensions__=no
6434 fi
6435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6436 fi
6437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6438 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6439
6440   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6441 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6442 if test ${ac_cv_should_define__xopen_source+y}
6443 then :
6444   printf %s "(cached) " >&6
6445 else $as_nop
6446   ac_cv_should_define__xopen_source=no
6447     if test $ac_cv_header_wchar_h = yes
6448 then :
6449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450 /* end confdefs.h.  */
6451
6452           #include <wchar.h>
6453           mbstate_t x;
6454 int
6455 main (void)
6456 {
6457
6458   ;
6459   return 0;
6460 }
6461 _ACEOF
6462 if ac_fn_c_try_compile "$LINENO"
6463 then :
6464
6465 else $as_nop
6466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6467 /* end confdefs.h.  */
6468
6469             #define _XOPEN_SOURCE 500
6470             #include <wchar.h>
6471             mbstate_t x;
6472 int
6473 main (void)
6474 {
6475
6476   ;
6477   return 0;
6478 }
6479 _ACEOF
6480 if ac_fn_c_try_compile "$LINENO"
6481 then :
6482   ac_cv_should_define__xopen_source=yes
6483 fi
6484 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6485 fi
6486 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6487 fi
6488 fi
6489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6490 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6491
6492   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6493
6494   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6495
6496   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6497
6498   printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6499
6500   printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6501
6502   printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6503
6504   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6505
6506   printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6507
6508   printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6509
6510   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6511
6512   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6513
6514   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6515
6516   printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6517
6518   printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6519
6520   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6521
6522   if test $ac_cv_header_minix_config_h = yes
6523 then :
6524   MINIX=yes
6525     printf "%s\n" "#define _MINIX 1" >>confdefs.h
6526
6527     printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6528
6529     printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6530
6531 else $as_nop
6532   MINIX=
6533 fi
6534   if test $ac_cv_safe_to_define___extensions__ = yes
6535 then :
6536   printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6537
6538 fi
6539   if test $ac_cv_should_define__xopen_source = yes
6540 then :
6541   printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6542
6543 fi
6544
6545
6546
6547   # Make sure we can run config.sub.
6548 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6549   as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6550
6551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6552 printf %s "checking build system type... " >&6; }
6553 if test ${ac_cv_build+y}
6554 then :
6555   printf %s "(cached) " >&6
6556 else $as_nop
6557   ac_build_alias=$build_alias
6558 test "x$ac_build_alias" = x &&
6559   ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6560 test "x$ac_build_alias" = x &&
6561   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6562 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6563   as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6564
6565 fi
6566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6567 printf "%s\n" "$ac_cv_build" >&6; }
6568 case $ac_cv_build in
6569 *-*-*) ;;
6570 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6571 esac
6572 build=$ac_cv_build
6573 ac_save_IFS=$IFS; IFS='-'
6574 set x $ac_cv_build
6575 shift
6576 build_cpu=$1
6577 build_vendor=$2
6578 shift; shift
6579 # Remember, the first character of IFS is used to create $*,
6580 # except with old shells:
6581 build_os=$*
6582 IFS=$ac_save_IFS
6583 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6584
6585
6586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6587 printf %s "checking host system type... " >&6; }
6588 if test ${ac_cv_host+y}
6589 then :
6590   printf %s "(cached) " >&6
6591 else $as_nop
6592   if test "x$host_alias" = x; then
6593   ac_cv_host=$ac_cv_build
6594 else
6595   ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6596     as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6597 fi
6598
6599 fi
6600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6601 printf "%s\n" "$ac_cv_host" >&6; }
6602 case $ac_cv_host in
6603 *-*-*) ;;
6604 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6605 esac
6606 host=$ac_cv_host
6607 ac_save_IFS=$IFS; IFS='-'
6608 set x $ac_cv_host
6609 shift
6610 host_cpu=$1
6611 host_vendor=$2
6612 shift; shift
6613 # Remember, the first character of IFS is used to create $*,
6614 # except with old shells:
6615 host_os=$*
6616 IFS=$ac_save_IFS
6617 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6618
6619
6620
6621
6622
6623
6624   case "$host_os" in
6625     openbsd*)
6626
6627 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6628
6629       ;;
6630   esac
6631
6632 ac_ext=c
6633 ac_cpp='$CPP $CPPFLAGS'
6634 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6635 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6636 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6638 printf %s "checking how to run the C preprocessor... " >&6; }
6639 # On Suns, sometimes $CPP names a directory.
6640 if test -n "$CPP" && test -d "$CPP"; then
6641   CPP=
6642 fi
6643 if test -z "$CPP"; then
6644   if test ${ac_cv_prog_CPP+y}
6645 then :
6646   printf %s "(cached) " >&6
6647 else $as_nop
6648       # Double quotes because $CC needs to be expanded
6649     for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6650     do
6651       ac_preproc_ok=false
6652 for ac_c_preproc_warn_flag in '' yes
6653 do
6654   # Use a header file that comes with gcc, so configuring glibc
6655   # with a fresh cross-compiler works.
6656   # On the NeXT, cc -E runs the code through the compiler's parser,
6657   # not just through cpp. "Syntax error" is here to catch this case.
6658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6659 /* end confdefs.h.  */
6660 #include <limits.h>
6661                      Syntax error
6662 _ACEOF
6663 if ac_fn_c_try_cpp "$LINENO"
6664 then :
6665
6666 else $as_nop
6667   # Broken: fails on valid input.
6668 continue
6669 fi
6670 rm -f conftest.err conftest.i conftest.$ac_ext
6671
6672   # OK, works on sane cases.  Now check whether nonexistent headers
6673   # can be detected and how.
6674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h.  */
6676 #include <ac_nonexistent.h>
6677 _ACEOF
6678 if ac_fn_c_try_cpp "$LINENO"
6679 then :
6680   # Broken: success on invalid input.
6681 continue
6682 else $as_nop
6683   # Passes both tests.
6684 ac_preproc_ok=:
6685 break
6686 fi
6687 rm -f conftest.err conftest.i conftest.$ac_ext
6688
6689 done
6690 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6691 rm -f conftest.i conftest.err conftest.$ac_ext
6692 if $ac_preproc_ok
6693 then :
6694   break
6695 fi
6696
6697     done
6698     ac_cv_prog_CPP=$CPP
6699
6700 fi
6701   CPP=$ac_cv_prog_CPP
6702 else
6703   ac_cv_prog_CPP=$CPP
6704 fi
6705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6706 printf "%s\n" "$CPP" >&6; }
6707 ac_preproc_ok=false
6708 for ac_c_preproc_warn_flag in '' yes
6709 do
6710   # Use a header file that comes with gcc, so configuring glibc
6711   # with a fresh cross-compiler works.
6712   # On the NeXT, cc -E runs the code through the compiler's parser,
6713   # not just through cpp. "Syntax error" is here to catch this case.
6714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715 /* end confdefs.h.  */
6716 #include <limits.h>
6717                      Syntax error
6718 _ACEOF
6719 if ac_fn_c_try_cpp "$LINENO"
6720 then :
6721
6722 else $as_nop
6723   # Broken: fails on valid input.
6724 continue
6725 fi
6726 rm -f conftest.err conftest.i conftest.$ac_ext
6727
6728   # OK, works on sane cases.  Now check whether nonexistent headers
6729   # can be detected and how.
6730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6731 /* end confdefs.h.  */
6732 #include <ac_nonexistent.h>
6733 _ACEOF
6734 if ac_fn_c_try_cpp "$LINENO"
6735 then :
6736   # Broken: success on invalid input.
6737 continue
6738 else $as_nop
6739   # Passes both tests.
6740 ac_preproc_ok=:
6741 break
6742 fi
6743 rm -f conftest.err conftest.i conftest.$ac_ext
6744
6745 done
6746 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6747 rm -f conftest.i conftest.err conftest.$ac_ext
6748 if $ac_preproc_ok
6749 then :
6750
6751 else $as_nop
6752   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6753 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6754 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6755 See \`config.log' for more details" "$LINENO" 5; }
6756 fi
6757
6758 ac_ext=c
6759 ac_cpp='$CPP $CPPFLAGS'
6760 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6761 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6762 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6763
6764
6765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6766 printf %s "checking for grep that handles long lines and -e... " >&6; }
6767 if test ${ac_cv_path_GREP+y}
6768 then :
6769   printf %s "(cached) " >&6
6770 else $as_nop
6771   if test -z "$GREP"; then
6772   ac_path_GREP_found=false
6773   # Loop through the user's path and test for each of PROGNAME-LIST
6774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6775 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6776 do
6777   IFS=$as_save_IFS
6778   case $as_dir in #(((
6779     '') as_dir=./ ;;
6780     */) ;;
6781     *) as_dir=$as_dir/ ;;
6782   esac
6783     for ac_prog in grep ggrep
6784    do
6785     for ac_exec_ext in '' $ac_executable_extensions; do
6786       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6787       as_fn_executable_p "$ac_path_GREP" || continue
6788 # Check for GNU ac_path_GREP and select it if it is found.
6789   # Check for GNU $ac_path_GREP
6790 case `"$ac_path_GREP" --version 2>&1` in
6791 *GNU*)
6792   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6793 *)
6794   ac_count=0
6795   printf %s 0123456789 >"conftest.in"
6796   while :
6797   do
6798     cat "conftest.in" "conftest.in" >"conftest.tmp"
6799     mv "conftest.tmp" "conftest.in"
6800     cp "conftest.in" "conftest.nl"
6801     printf "%s\n" 'GREP' >> "conftest.nl"
6802     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6803     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6804     as_fn_arith $ac_count + 1 && ac_count=$as_val
6805     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6806       # Best one so far, save it but keep looking for a better one
6807       ac_cv_path_GREP="$ac_path_GREP"
6808       ac_path_GREP_max=$ac_count
6809     fi
6810     # 10*(2^10) chars as input seems more than enough
6811     test $ac_count -gt 10 && break
6812   done
6813   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6814 esac
6815
6816       $ac_path_GREP_found && break 3
6817     done
6818   done
6819   done
6820 IFS=$as_save_IFS
6821   if test -z "$ac_cv_path_GREP"; then
6822     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6823   fi
6824 else
6825   ac_cv_path_GREP=$GREP
6826 fi
6827
6828 fi
6829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6830 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6831  GREP="$ac_cv_path_GREP"
6832
6833
6834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6835 printf %s "checking for egrep... " >&6; }
6836 if test ${ac_cv_path_EGREP+y}
6837 then :
6838   printf %s "(cached) " >&6
6839 else $as_nop
6840   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6841    then ac_cv_path_EGREP="$GREP -E"
6842    else
6843      if test -z "$EGREP"; then
6844   ac_path_EGREP_found=false
6845   # Loop through the user's path and test for each of PROGNAME-LIST
6846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6847 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6848 do
6849   IFS=$as_save_IFS
6850   case $as_dir in #(((
6851     '') as_dir=./ ;;
6852     */) ;;
6853     *) as_dir=$as_dir/ ;;
6854   esac
6855     for ac_prog in egrep
6856    do
6857     for ac_exec_ext in '' $ac_executable_extensions; do
6858       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6859       as_fn_executable_p "$ac_path_EGREP" || continue
6860 # Check for GNU ac_path_EGREP and select it if it is found.
6861   # Check for GNU $ac_path_EGREP
6862 case `"$ac_path_EGREP" --version 2>&1` in
6863 *GNU*)
6864   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6865 *)
6866   ac_count=0
6867   printf %s 0123456789 >"conftest.in"
6868   while :
6869   do
6870     cat "conftest.in" "conftest.in" >"conftest.tmp"
6871     mv "conftest.tmp" "conftest.in"
6872     cp "conftest.in" "conftest.nl"
6873     printf "%s\n" 'EGREP' >> "conftest.nl"
6874     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6875     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6876     as_fn_arith $ac_count + 1 && ac_count=$as_val
6877     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6878       # Best one so far, save it but keep looking for a better one
6879       ac_cv_path_EGREP="$ac_path_EGREP"
6880       ac_path_EGREP_max=$ac_count
6881     fi
6882     # 10*(2^10) chars as input seems more than enough
6883     test $ac_count -gt 10 && break
6884   done
6885   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6886 esac
6887
6888       $ac_path_EGREP_found && break 3
6889     done
6890   done
6891   done
6892 IFS=$as_save_IFS
6893   if test -z "$ac_cv_path_EGREP"; then
6894     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6895   fi
6896 else
6897   ac_cv_path_EGREP=$EGREP
6898 fi
6899
6900    fi
6901 fi
6902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6903 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6904  EGREP="$ac_cv_path_EGREP"
6905
6906
6907
6908
6909
6910   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6911 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6912 if test ${gl_cv_c_amsterdam_compiler+y}
6913 then :
6914   printf %s "(cached) " >&6
6915 else $as_nop
6916
6917       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h.  */
6919
6920 #ifdef __ACK__
6921 Amsterdam
6922 #endif
6923
6924 _ACEOF
6925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6926   $EGREP "Amsterdam" >/dev/null 2>&1
6927 then :
6928   gl_cv_c_amsterdam_compiler=yes
6929 else $as_nop
6930   gl_cv_c_amsterdam_compiler=no
6931 fi
6932 rm -rf conftest*
6933
6934
6935 fi
6936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6937 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6938
6939       if test $gl_cv_c_amsterdam_compiler = yes; then
6940     if test -z "$AR"; then
6941       AR='cc -c.a'
6942     fi
6943     if test -z "$ARFLAGS"; then
6944       ARFLAGS='-o'
6945     fi
6946   else
6947                                                 :
6948   fi
6949
6950         if test -n "$ac_tool_prefix"; then
6951   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6952 set dummy ${ac_tool_prefix}ar; ac_word=$2
6953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6954 printf %s "checking for $ac_word... " >&6; }
6955 if test ${ac_cv_prog_AR+y}
6956 then :
6957   printf %s "(cached) " >&6
6958 else $as_nop
6959   if test -n "$AR"; then
6960   ac_cv_prog_AR="$AR" # Let the user override the test.
6961 else
6962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6963 for as_dir in $PATH
6964 do
6965   IFS=$as_save_IFS
6966   case $as_dir in #(((
6967     '') as_dir=./ ;;
6968     */) ;;
6969     *) as_dir=$as_dir/ ;;
6970   esac
6971     for ac_exec_ext in '' $ac_executable_extensions; do
6972   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6973     ac_cv_prog_AR="${ac_tool_prefix}ar"
6974     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6975     break 2
6976   fi
6977 done
6978   done
6979 IFS=$as_save_IFS
6980
6981 fi
6982 fi
6983 AR=$ac_cv_prog_AR
6984 if test -n "$AR"; then
6985   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6986 printf "%s\n" "$AR" >&6; }
6987 else
6988   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6989 printf "%s\n" "no" >&6; }
6990 fi
6991
6992
6993 fi
6994 if test -z "$ac_cv_prog_AR"; then
6995   ac_ct_AR=$AR
6996   # Extract the first word of "ar", so it can be a program name with args.
6997 set dummy ar; ac_word=$2
6998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999 printf %s "checking for $ac_word... " >&6; }
7000 if test ${ac_cv_prog_ac_ct_AR+y}
7001 then :
7002   printf %s "(cached) " >&6
7003 else $as_nop
7004   if test -n "$ac_ct_AR"; then
7005   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7006 else
7007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008 for as_dir in $PATH
7009 do
7010   IFS=$as_save_IFS
7011   case $as_dir in #(((
7012     '') as_dir=./ ;;
7013     */) ;;
7014     *) as_dir=$as_dir/ ;;
7015   esac
7016     for ac_exec_ext in '' $ac_executable_extensions; do
7017   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7018     ac_cv_prog_ac_ct_AR="ar"
7019     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7020     break 2
7021   fi
7022 done
7023   done
7024 IFS=$as_save_IFS
7025
7026 fi
7027 fi
7028 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7029 if test -n "$ac_ct_AR"; then
7030   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7031 printf "%s\n" "$ac_ct_AR" >&6; }
7032 else
7033   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034 printf "%s\n" "no" >&6; }
7035 fi
7036
7037   if test "x$ac_ct_AR" = x; then
7038     AR="ar"
7039   else
7040     case $cross_compiling:$ac_tool_warned in
7041 yes:)
7042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7043 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7044 ac_tool_warned=yes ;;
7045 esac
7046     AR=$ac_ct_AR
7047   fi
7048 else
7049   AR="$ac_cv_prog_AR"
7050 fi
7051
7052   if test -z "$ARFLAGS"; then
7053     ARFLAGS='cr'
7054   fi
7055
7056
7057
7058   if test -z "$RANLIB"; then
7059     if test $gl_cv_c_amsterdam_compiler = yes; then
7060       RANLIB=':'
7061     else
7062             if test -n "$ac_tool_prefix"; then
7063   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7064 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7066 printf %s "checking for $ac_word... " >&6; }
7067 if test ${ac_cv_prog_RANLIB+y}
7068 then :
7069   printf %s "(cached) " >&6
7070 else $as_nop
7071   if test -n "$RANLIB"; then
7072   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7073 else
7074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7075 for as_dir in $PATH
7076 do
7077   IFS=$as_save_IFS
7078   case $as_dir in #(((
7079     '') as_dir=./ ;;
7080     */) ;;
7081     *) as_dir=$as_dir/ ;;
7082   esac
7083     for ac_exec_ext in '' $ac_executable_extensions; do
7084   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7085     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7086     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7087     break 2
7088   fi
7089 done
7090   done
7091 IFS=$as_save_IFS
7092
7093 fi
7094 fi
7095 RANLIB=$ac_cv_prog_RANLIB
7096 if test -n "$RANLIB"; then
7097   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7098 printf "%s\n" "$RANLIB" >&6; }
7099 else
7100   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7101 printf "%s\n" "no" >&6; }
7102 fi
7103
7104
7105 fi
7106 if test -z "$ac_cv_prog_RANLIB"; then
7107   ac_ct_RANLIB=$RANLIB
7108   # Extract the first word of "ranlib", so it can be a program name with args.
7109 set dummy ranlib; ac_word=$2
7110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111 printf %s "checking for $ac_word... " >&6; }
7112 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7113 then :
7114   printf %s "(cached) " >&6
7115 else $as_nop
7116   if test -n "$ac_ct_RANLIB"; then
7117   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7118 else
7119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120 for as_dir in $PATH
7121 do
7122   IFS=$as_save_IFS
7123   case $as_dir in #(((
7124     '') as_dir=./ ;;
7125     */) ;;
7126     *) as_dir=$as_dir/ ;;
7127   esac
7128     for ac_exec_ext in '' $ac_executable_extensions; do
7129   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7130     ac_cv_prog_ac_ct_RANLIB="ranlib"
7131     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7132     break 2
7133   fi
7134 done
7135   done
7136 IFS=$as_save_IFS
7137
7138 fi
7139 fi
7140 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7141 if test -n "$ac_ct_RANLIB"; then
7142   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7143 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7144 else
7145   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146 printf "%s\n" "no" >&6; }
7147 fi
7148
7149   if test "x$ac_ct_RANLIB" = x; then
7150     RANLIB=":"
7151   else
7152     case $cross_compiling:$ac_tool_warned in
7153 yes:)
7154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7155 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7156 ac_tool_warned=yes ;;
7157 esac
7158     RANLIB=$ac_ct_RANLIB
7159   fi
7160 else
7161   RANLIB="$ac_cv_prog_RANLIB"
7162 fi
7163
7164     fi
7165   fi
7166
7167
7168
7169
7170
7171   # IEEE behaviour is the default on all CPUs except Alpha and SH
7172   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7173   # and the GCC 4.1.2 manual).
7174   case "$host_cpu" in
7175     alpha*)
7176       # On Alpha systems, a compiler option provides the behaviour.
7177       # See the ieee(3) manual page, also available at
7178       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7179       if test -n "$GCC"; then
7180         # GCC has the option -mieee.
7181         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7182         CPPFLAGS="$CPPFLAGS -mieee"
7183       else
7184         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7185         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7186         CPPFLAGS="$CPPFLAGS -ieee"
7187       fi
7188       ;;
7189     sh*)
7190       if test -n "$GCC"; then
7191         # GCC has the option -mieee.
7192         CPPFLAGS="$CPPFLAGS -mieee"
7193       fi
7194       ;;
7195   esac
7196
7197 # Check whether --enable-largefile was given.
7198 if test ${enable_largefile+y}
7199 then :
7200   enableval=$enable_largefile;
7201 fi
7202
7203 if test "$enable_largefile" != no
7204 then :
7205   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7206 printf %s "checking for special C compiler options needed for large files... " >&6; }
7207 if test ${ac_cv_sys_largefile_CC+y}
7208 then :
7209   printf %s "(cached) " >&6
7210 else $as_nop
7211   ac_cv_sys_largefile_CC=no
7212      if test "$GCC" != yes; then
7213        ac_save_CC=$CC
7214        while :; do
7215          # IRIX 6.2 and later do not support large files by default,
7216          # so use the C compiler's -n32 option if that helps.
7217          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7218 /* end confdefs.h.  */
7219 #include <sys/types.h>
7220  /* Check that off_t can represent 2**63 - 1 correctly.
7221     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7222     since some C++ compilers masquerading as C compilers
7223     incorrectly reject 9223372036854775807.  */
7224 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7225   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7226                        && LARGE_OFF_T % 2147483647 == 1)
7227                       ? 1 : -1];
7228 int
7229 main (void)
7230 {
7231
7232   ;
7233   return 0;
7234 }
7235 _ACEOF
7236          if ac_fn_c_try_compile "$LINENO"
7237 then :
7238   break
7239 fi
7240 rm -f core conftest.err conftest.$ac_objext conftest.beam
7241          CC="$CC -n32"
7242          if ac_fn_c_try_compile "$LINENO"
7243 then :
7244   ac_cv_sys_largefile_CC=' -n32'; break
7245 fi
7246 rm -f core conftest.err conftest.$ac_objext conftest.beam
7247          break
7248        done
7249        CC=$ac_save_CC
7250        rm -f conftest.$ac_ext
7251     fi
7252 fi
7253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7254 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7255   if test "$ac_cv_sys_largefile_CC" != no; then
7256     CC=$CC$ac_cv_sys_largefile_CC
7257   fi
7258
7259   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7260 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7261 if test ${ac_cv_sys_file_offset_bits+y}
7262 then :
7263   printf %s "(cached) " >&6
7264 else $as_nop
7265   while :; do
7266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7267 /* end confdefs.h.  */
7268 #include <sys/types.h>
7269  /* Check that off_t can represent 2**63 - 1 correctly.
7270     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7271     since some C++ compilers masquerading as C compilers
7272     incorrectly reject 9223372036854775807.  */
7273 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7274   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7275                        && LARGE_OFF_T % 2147483647 == 1)
7276                       ? 1 : -1];
7277 int
7278 main (void)
7279 {
7280
7281   ;
7282   return 0;
7283 }
7284 _ACEOF
7285 if ac_fn_c_try_compile "$LINENO"
7286 then :
7287   ac_cv_sys_file_offset_bits=no; break
7288 fi
7289 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291 /* end confdefs.h.  */
7292 #undef _FILE_OFFSET_BITS
7293 #define _FILE_OFFSET_BITS 64
7294 #include <sys/types.h>
7295  /* Check that off_t can represent 2**63 - 1 correctly.
7296     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7297     since some C++ compilers masquerading as C compilers
7298     incorrectly reject 9223372036854775807.  */
7299 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7300   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7301                        && LARGE_OFF_T % 2147483647 == 1)
7302                       ? 1 : -1];
7303 int
7304 main (void)
7305 {
7306
7307   ;
7308   return 0;
7309 }
7310 _ACEOF
7311 if ac_fn_c_try_compile "$LINENO"
7312 then :
7313   ac_cv_sys_file_offset_bits=64; break
7314 fi
7315 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7316   ac_cv_sys_file_offset_bits=unknown
7317   break
7318 done
7319 fi
7320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7321 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7322 case $ac_cv_sys_file_offset_bits in #(
7323   no | unknown) ;;
7324   *)
7325 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7326 ;;
7327 esac
7328 rm -rf conftest*
7329   case $ac_cv_sys_file_offset_bits in #(
7330   unknown) :
7331     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7332 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7333 if test ${ac_cv_sys_large_files+y}
7334 then :
7335   printf %s "(cached) " >&6
7336 else $as_nop
7337   while :; do
7338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339 /* end confdefs.h.  */
7340 #include <sys/types.h>
7341  /* Check that off_t can represent 2**63 - 1 correctly.
7342     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7343     since some C++ compilers masquerading as C compilers
7344     incorrectly reject 9223372036854775807.  */
7345 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7346   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7347                        && LARGE_OFF_T % 2147483647 == 1)
7348                       ? 1 : -1];
7349 int
7350 main (void)
7351 {
7352
7353   ;
7354   return 0;
7355 }
7356 _ACEOF
7357 if ac_fn_c_try_compile "$LINENO"
7358 then :
7359   ac_cv_sys_large_files=no; break
7360 fi
7361 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363 /* end confdefs.h.  */
7364 #undef _LARGE_FILES
7365 #define _LARGE_FILES 1
7366 #include <sys/types.h>
7367  /* Check that off_t can represent 2**63 - 1 correctly.
7368     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7369     since some C++ compilers masquerading as C compilers
7370     incorrectly reject 9223372036854775807.  */
7371 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7372   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7373                        && LARGE_OFF_T % 2147483647 == 1)
7374                       ? 1 : -1];
7375 int
7376 main (void)
7377 {
7378
7379   ;
7380   return 0;
7381 }
7382 _ACEOF
7383 if ac_fn_c_try_compile "$LINENO"
7384 then :
7385   ac_cv_sys_large_files=1; break
7386 fi
7387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7388   ac_cv_sys_large_files=unknown
7389   break
7390 done
7391 fi
7392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7393 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7394 case $ac_cv_sys_large_files in #(
7395   no | unknown) ;;
7396   *)
7397 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7398 ;;
7399 esac
7400 rm -rf conftest* ;; #(
7401   64) :
7402
7403  # Check whether --enable-year2038 was given.
7404 if test ${enable_year2038+y}
7405 then :
7406   enableval=$enable_year2038;
7407 fi
7408
7409  if test "$enable_year2038" != no
7410 then :
7411
7412                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
7413 printf %s "checking for 64-bit time_t... " >&6; }
7414 if test ${gl_cv_type_time_t_64+y}
7415 then :
7416   printf %s "(cached) " >&6
7417 else $as_nop
7418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7419 /* end confdefs.h.  */
7420
7421   #include <time.h>
7422   /* Check that time_t can represent 2**63 - 1 correctly.
7423      We can't simply define LARGE_TIME_T to be 9223372036854775807,
7424      since some C++ compilers masquerading as C compilers
7425      incorrectly reject 9223372036854775807.  */
7426   #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
7427   int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
7428                            && LARGE_TIME_T % 2147483647 == 1)
7429                           ? 1 : -1];
7430
7431 _ACEOF
7432 if ac_fn_c_try_compile "$LINENO"
7433 then :
7434   gl_cv_type_time_t_64=yes
7435 else $as_nop
7436   gl_cv_type_time_t_64=no
7437 fi
7438 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7439
7440 fi
7441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
7442 printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
7443   if test "$gl_cv_type_time_t_64" = no; then
7444     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
7445 printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
7446 if test ${gl_cv_type_time_t_bits_macro+y}
7447 then :
7448   printf %s "(cached) " >&6
7449 else $as_nop
7450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451 /* end confdefs.h.  */
7452 #define _TIME_BITS 64
7453                            #define _FILE_OFFSET_BITS 64
7454
7455   #include <time.h>
7456   /* Check that time_t can represent 2**63 - 1 correctly.
7457      We can't simply define LARGE_TIME_T to be 9223372036854775807,
7458      since some C++ compilers masquerading as C compilers
7459      incorrectly reject 9223372036854775807.  */
7460   #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
7461   int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
7462                            && LARGE_TIME_T % 2147483647 == 1)
7463                           ? 1 : -1];
7464
7465 _ACEOF
7466 if ac_fn_c_try_compile "$LINENO"
7467 then :
7468   gl_cv_type_time_t_bits_macro=yes
7469 else $as_nop
7470   gl_cv_type_time_t_bits_macro=no
7471 fi
7472 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7473
7474 fi
7475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
7476 printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
7477     if test "$gl_cv_type_time_t_bits_macro" = yes; then
7478
7479 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
7480
7481
7482 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
7483
7484       gl_cv_type_time_t_64=yes
7485     fi
7486   fi
7487   if test $gl_cv_type_time_t_64 = no; then
7488     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7489 /* end confdefs.h.  */
7490 #ifdef _USE_32BIT_TIME_T
7491              int ok;
7492            #else
7493              error fail
7494            #endif
7495
7496 _ACEOF
7497 if ac_fn_c_try_compile "$LINENO"
7498 then :
7499   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7500 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7501 as_fn_error $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
7502 See \`config.log' for more details" "$LINENO" 5; }
7503 else $as_nop
7504   # If not cross-compiling and  says we should check,
7505        # and 'touch' works with a large timestamp, then evidently 64-bit time_t
7506        # is desired and supported, so fail and ask the builder to fix the
7507        # problem.  Otherwise, just warn the builder.
7508
7509        if test "$gl_warned_about_64_bit_time_t" != yes; then
7510          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
7511 printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
7512          gl_warned_about_64_bit_time_t=yes
7513        fi
7514
7515 fi
7516 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7517   fi
7518 fi
7519  ;; #(
7520   *) :
7521      ;;
7522 esac
7523 fi
7524
7525
7526
7527   case "$host_os" in
7528     mingw*)
7529
7530 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7531
7532       ;;
7533   esac
7534
7535
7536
7537
7538
7539
7540
7541   # Check whether --enable-threads was given.
7542 if test ${enable_threads+y}
7543 then :
7544   enableval=$enable_threads; gl_use_threads=$enableval
7545 else $as_nop
7546   if test -n "$gl_use_threads_default"; then
7547        gl_use_threads="$gl_use_threads_default"
7548      else
7549        case "$host_os" in
7550                                     osf*) gl_use_threads=no ;;
7551                                     cygwin*)
7552                case `uname -r` in
7553                  1.[0-5].*) gl_use_threads=no ;;
7554                  *)         gl_use_threads=yes ;;
7555                esac
7556                ;;
7557                   mingw*)
7558                case "$gl_use_winpthreads_default" in
7559                  yes) gl_use_threads=posix ;;
7560                  no)  gl_use_threads=windows ;;
7561                  *)   gl_use_threads=yes ;;
7562                esac
7563                ;;
7564          *)    gl_use_threads=yes ;;
7565        esac
7566      fi
7567
7568 fi
7569
7570   if test "$gl_use_threads" = yes \
7571      || test "$gl_use_threads" = isoc \
7572      || test "$gl_use_threads" = posix \
7573      || test "$gl_use_threads" = isoc+posix; then
7574     # For using <threads.h> or <pthread.h>:
7575
7576
7577   if test -z "$gl_anythreadlib_early_done"; then
7578     case "$host_os" in
7579       osf*)
7580         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7581         # groks <pthread.h>. cc also understands the flag -pthread, but
7582         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7583         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7584         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7585         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7586         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7587         ;;
7588     esac
7589     # Some systems optimize for single-threaded programs by default, and
7590     # need special flags to disable these optimizations. For example, the
7591     # definition of 'errno' in <errno.h>.
7592     case "$host_os" in
7593       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7594       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7595     esac
7596     gl_anythreadlib_early_done=done
7597   fi
7598
7599   fi
7600
7601
7602
7603   # Pre-early section.
7604
7605
7606
7607
7608   # Code from module absolute-header:
7609   # Code from module accept:
7610   # Code from module accept-tests:
7611   # Code from module alloca:
7612   # Code from module alloca-opt:
7613   # Code from module alloca-opt-tests:
7614   # Code from module allocator:
7615   # Code from module announce-gen:
7616   # Code from module areadlink:
7617   # Code from module areadlink-tests:
7618   # Code from module argmatch:
7619   # Code from module argmatch-tests:
7620   # Code from module arpa_inet:
7621   # Code from module arpa_inet-tests:
7622   # Code from module assure:
7623   # Code from module atoll:
7624   # Code from module attribute:
7625   # Code from module basename-lgpl:
7626   # Code from module binary-io:
7627   # Code from module binary-io-tests:
7628   # Code from module bind:
7629   # Code from module bind-tests:
7630   # Code from module bitrotate:
7631   # Code from module bitrotate-tests:
7632   # Code from module btowc:
7633   # Code from module btowc-tests:
7634   # Code from module builtin-expect:
7635   # Code from module c-ctype:
7636   # Code from module c-ctype-tests:
7637   # Code from module c-stack:
7638   # Code from module c-stack-tests:
7639   # Code from module c-strcase:
7640   # Code from module c-strcase-tests:
7641   # Code from module c-strcaseeq:
7642   # Code from module c99:
7643   # Code from module calloc-gnu:
7644   # Code from module calloc-gnu-tests:
7645   # Code from module calloc-posix:
7646   # Code from module careadlinkat:
7647   # Code from module clock-time:
7648   # Code from module cloexec:
7649   # Code from module cloexec-tests:
7650   # Code from module close:
7651   # Code from module close-tests:
7652   # Code from module config-h:
7653   # Code from module connect:
7654   # Code from module connect-tests:
7655   # Code from module ctype:
7656   # Code from module ctype-tests:
7657   # Code from module diffseq:
7658   # Code from module dirname:
7659   # Code from module dirname-lgpl:
7660   # Code from module dirname-tests:
7661   # Code from module do-release-commit-and-tag:
7662   # Code from module double-slash-root:
7663   # Code from module dtotimespec:
7664   # Code from module dup2:
7665   # Code from module dup2-tests:
7666   # Code from module dynarray:
7667   # Code from module dynarray-tests:
7668   # Code from module environ:
7669   # Code from module environ-tests:
7670   # Code from module errno:
7671   # Code from module errno-tests:
7672   # Code from module error:
7673   # Code from module exclude:
7674   # Code from module exclude-tests:
7675   # Code from module exitfail:
7676   # Code from module extensions:
7677   # Code from module extern-inline:
7678   # Code from module fcntl:
7679   # Code from module fcntl-h:
7680   # Code from module fcntl-h-tests:
7681   # Code from module fcntl-tests:
7682   # Code from module fd-hook:
7683   # Code from module fdl:
7684   # Code from module fdopen:
7685   # Code from module fdopen-tests:
7686   # Code from module fgetc-tests:
7687   # Code from module file-type:
7688   # Code from module filename:
7689   # Code from module filenamecat:
7690   # Code from module filenamecat-lgpl:
7691   # Code from module filenamecat-tests:
7692   # Code from module flexmember:
7693   # Code from module float:
7694   # Code from module float-tests:
7695   # Code from module fnmatch:
7696   # Code from module fnmatch-gnu:
7697   # Code from module fnmatch-h:
7698   # Code from module fnmatch-h-tests:
7699   # Code from module fnmatch-tests:
7700   # Code from module fopen:
7701   # Code from module fopen-gnu:
7702   # Code from module fopen-gnu-tests:
7703   # Code from module fopen-tests:
7704   # Code from module fpieee:
7705
7706   # Code from module fpucw:
7707   # Code from module fputc-tests:
7708   # Code from module fread-tests:
7709   # Code from module free-posix:
7710   # Code from module free-posix-tests:
7711   # Code from module freopen:
7712   # Code from module freopen-tests:
7713   # Code from module fstat:
7714   # Code from module fstat-tests:
7715   # Code from module ftruncate:
7716   # Code from module ftruncate-tests:
7717   # Code from module fwrite-tests:
7718   # Code from module gendocs:
7719   # Code from module getcwd-lgpl:
7720   # Code from module getcwd-lgpl-tests:
7721   # Code from module getdtablesize:
7722   # Code from module getdtablesize-tests:
7723   # Code from module getopt-gnu:
7724   # Code from module getopt-gnu-tests:
7725   # Code from module getopt-posix:
7726   # Code from module getopt-posix-tests:
7727   # Code from module getpagesize:
7728   # Code from module getprogname:
7729   # Code from module getprogname-tests:
7730   # Code from module getrandom:
7731   # Code from module getrandom-tests:
7732   # Code from module gettext-h:
7733   # Code from module gettime:
7734   # Code from module gettimeofday:
7735   # Code from module gettimeofday-tests:
7736   # Code from module git-version-gen:
7737   # Code from module gitlog-to-changelog:
7738   # Code from module gnu-make:
7739   # Code from module gnu-web-doc-update:
7740   # Code from module gnumakefile:
7741   # Code from module gnupload:
7742   # Code from module gperf:
7743   # Code from module hard-locale:
7744   # Code from module hard-locale-tests:
7745   # Code from module hash:
7746   # Code from module hash-pjw:
7747   # Code from module hash-tests:
7748   # Code from module havelib:
7749   # Code from module host-cpu-c-abi:
7750   # Code from module ialloc:
7751   # Code from module iconv:
7752   # Code from module iconv-h:
7753   # Code from module iconv-h-tests:
7754   # Code from module iconv-tests:
7755   # Code from module iconv_open:
7756   # Code from module idx:
7757   # Code from module ignore-value:
7758   # Code from module ignore-value-tests:
7759   # Code from module include_next:
7760   # Code from module inet_pton:
7761   # Code from module inet_pton-tests:
7762   # Code from module inline:
7763   # Code from module intprops:
7764   # Code from module intprops-tests:
7765   # Code from module inttostr:
7766   # Code from module inttostr-tests:
7767   # Code from module inttypes:
7768   # Code from module inttypes-incomplete:
7769   # Code from module inttypes-tests:
7770   # Code from module ioctl:
7771   # Code from module ioctl-tests:
7772   # Code from module isblank:
7773   # Code from module isblank-tests:
7774   # Code from module iswblank:
7775   # Code from module iswblank-tests:
7776   # Code from module iswdigit:
7777   # Code from module iswdigit-tests:
7778   # Code from module iswxdigit:
7779   # Code from module iswxdigit-tests:
7780   # Code from module langinfo:
7781   # Code from module langinfo-tests:
7782   # Code from module largefile:
7783
7784
7785   # Code from module libc-config:
7786   # Code from module limits-h:
7787   # Code from module limits-h-tests:
7788   # Code from module listen:
7789   # Code from module listen-tests:
7790   # Code from module localcharset:
7791   # Code from module localcharset-tests:
7792   # Code from module locale:
7793   # Code from module locale-tests:
7794   # Code from module localeconv:
7795   # Code from module localeconv-tests:
7796   # Code from module lock:
7797   # Code from module lstat:
7798   # Code from module lstat-tests:
7799   # Code from module maintainer-makefile:
7800   # Code from module malloc-gnu:
7801   # Code from module malloc-gnu-tests:
7802   # Code from module malloc-posix:
7803   # Code from module malloca:
7804   # Code from module malloca-tests:
7805   # Code from module manywarnings:
7806   # Code from module mbchar:
7807   # Code from module mbiter:
7808   # Code from module mbrtowc:
7809   # Code from module mbrtowc-tests:
7810   # Code from module mbscasecmp:
7811   # Code from module mbscasecmp-tests:
7812   # Code from module mbsinit:
7813   # Code from module mbsinit-tests:
7814   # Code from module mbslen:
7815   # Code from module mbsrtowcs:
7816   # Code from module mbsrtowcs-tests:
7817   # Code from module mbsstr:
7818   # Code from module mbsstr-tests:
7819   # Code from module mbtowc:
7820   # Code from module mbuiter:
7821   # Code from module memchr:
7822   # Code from module memchr-tests:
7823   # Code from module mempcpy:
7824   # Code from module minmax:
7825   # Code from module mkdir:
7826   # Code from module mkdir-tests:
7827   # Code from module mkstemp:
7828   # Code from module mktime:
7829   # Code from module mktime-internal:
7830   # Code from module msvc-inval:
7831   # Code from module msvc-nothrow:
7832   # Code from module multiarch:
7833   # Code from module nanosleep:
7834   # Code from module nanosleep-tests:
7835   # Code from module netinet_in:
7836   # Code from module netinet_in-tests:
7837   # Code from module nl_langinfo:
7838   # Code from module nl_langinfo-tests:
7839   # Code from module nocrash:
7840   # Code from module nstrftime:
7841   # Code from module nstrftime-tests:
7842   # Code from module open:
7843   # Code from module open-tests:
7844   # Code from module pathmax:
7845   # Code from module pathmax-tests:
7846   # Code from module perror:
7847   # Code from module perror-tests:
7848   # Code from module pipe-posix:
7849   # Code from module pipe-posix-tests:
7850   # Code from module progname:
7851   # Code from module propername:
7852   # Code from module pthread-h:
7853
7854
7855   if test -z "$gl_anythreadlib_early_done"; then
7856     case "$host_os" in
7857       osf*)
7858         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7859         # groks <pthread.h>. cc also understands the flag -pthread, but
7860         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7861         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7862         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7863         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7864         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7865         ;;
7866     esac
7867     # Some systems optimize for single-threaded programs by default, and
7868     # need special flags to disable these optimizations. For example, the
7869     # definition of 'errno' in <errno.h>.
7870     case "$host_os" in
7871       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7872       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7873     esac
7874     gl_anythreadlib_early_done=done
7875   fi
7876
7877   # Code from module pthread-h-tests:
7878   # Code from module pthread-thread:
7879   # Code from module pthread-thread-tests:
7880   # Code from module pthread_sigmask:
7881   # Code from module pthread_sigmask-tests:
7882   # Code from module putenv:
7883   # Code from module quote:
7884   # Code from module quotearg:
7885   # Code from module quotearg-simple:
7886   # Code from module quotearg-simple-tests:
7887   # Code from module raise:
7888   # Code from module raise-tests:
7889   # Code from module rawmemchr:
7890   # Code from module rawmemchr-tests:
7891   # Code from module readlink:
7892   # Code from module readlink-tests:
7893   # Code from module readme-release:
7894   # Code from module realloc-gnu:
7895   # Code from module realloc-gnu-tests:
7896   # Code from module realloc-posix:
7897   # Code from module reallocarray:
7898   # Code from module reallocarray-tests:
7899   # Code from module regex:
7900   # Code from module regex-tests:
7901   # Code from module same-inode:
7902   # Code from module sched:
7903   # Code from module sched-tests:
7904   # Code from module select:
7905   # Code from module select-tests:
7906   # Code from module setenv:
7907   # Code from module setenv-tests:
7908   # Code from module setlocale-null:
7909   # Code from module setlocale-null-tests:
7910   # Code from module setsockopt:
7911   # Code from module setsockopt-tests:
7912   # Code from module sh-quote:
7913   # Code from module sh-quote-tests:
7914   # Code from module sigaction:
7915   # Code from module sigaction-tests:
7916   # Code from module signal:
7917   # Code from module signal-h:
7918   # Code from module signal-h-tests:
7919   # Code from module sigprocmask:
7920   # Code from module sigprocmask-tests:
7921   # Code from module sigsegv:
7922   # Code from module sigsegv-tests:
7923   # Code from module size_max:
7924   # Code from module sleep:
7925   # Code from module sleep-tests:
7926   # Code from module snippet/_Noreturn:
7927   # Code from module snippet/arg-nonnull:
7928   # Code from module snippet/c++defs:
7929   # Code from module snippet/warn-on-use:
7930   # Code from module snprintf:
7931   # Code from module snprintf-tests:
7932   # Code from module socket:
7933   # Code from module socketlib:
7934   # Code from module sockets:
7935   # Code from module sockets-tests:
7936   # Code from module socklen:
7937   # Code from module ssize_t:
7938   # Code from module stat:
7939   # Code from module stat-macros:
7940   # Code from module stat-tests:
7941   # Code from module stat-time:
7942   # Code from module stat-time-tests:
7943   # Code from module std-gnu11:
7944   # Code from module stdalign:
7945   # Code from module stdalign-tests:
7946   # Code from module stdarg:
7947
7948
7949
7950   # Code from module stdarg-tests:
7951   # Code from module stdbool:
7952   # Code from module stdbool-tests:
7953   # Code from module stddef:
7954   # Code from module stddef-tests:
7955   # Code from module stdint:
7956   # Code from module stdint-tests:
7957   # Code from module stdio:
7958   # Code from module stdio-tests:
7959   # Code from module stdlib:
7960   # Code from module stdlib-tests:
7961   # Code from module stdopen:
7962   # Code from module strcase:
7963   # Code from module streq:
7964   # Code from module strerror:
7965   # Code from module strerror-override:
7966   # Code from module strerror-tests:
7967   # Code from module strerror_r-posix:
7968   # Code from module strerror_r-posix-tests:
7969   # Code from module striconv:
7970   # Code from module striconv-tests:
7971   # Code from module string:
7972   # Code from module string-tests:
7973   # Code from module strings:
7974   # Code from module strings-tests:
7975   # Code from module strnlen:
7976   # Code from module strnlen-tests:
7977   # Code from module strnlen1:
7978   # Code from module strptime:
7979   # Code from module strtoimax:
7980   # Code from module strtoimax-tests:
7981   # Code from module strtoll:
7982   # Code from module strtoll-tests:
7983   # Code from module symlink:
7984   # Code from module symlink-tests:
7985   # Code from module sys_ioctl:
7986   # Code from module sys_ioctl-tests:
7987   # Code from module sys_random:
7988   # Code from module sys_random-tests:
7989   # Code from module sys_select:
7990   # Code from module sys_select-tests:
7991   # Code from module sys_socket:
7992   # Code from module sys_socket-tests:
7993   # Code from module sys_stat:
7994   # Code from module sys_stat-tests:
7995   # Code from module sys_time:
7996   # Code from module sys_time-tests:
7997   # Code from module sys_types:
7998   # Code from module sys_types-tests:
7999   # Code from module sys_uio:
8000   # Code from module sys_uio-tests:
8001   # Code from module sys_wait:
8002   # Code from module sys_wait-tests:
8003   # Code from module system-quote:
8004   # Code from module tempname:
8005   # Code from module test-framework-sh:
8006   # Code from module test-framework-sh-tests:
8007   # Code from module thread:
8008   # Code from module thread-tests:
8009   # Code from module threadlib:
8010
8011
8012
8013   # Code from module time:
8014   # Code from module time-tests:
8015   # Code from module time_r:
8016   # Code from module time_rz:
8017   # Code from module timegm:
8018   # Code from module timespec:
8019   # Code from module timespec-add:
8020   # Code from module timespec-sub:
8021   # Code from module timespec-tests:
8022   # Code from module trim:
8023   # Code from module tzset:
8024   # Code from module unistd:
8025   # Code from module unistd-tests:
8026   # Code from module unistr/base:
8027   # Code from module unistr/u8-mbtoucr:
8028   # Code from module unistr/u8-mbtoucr-tests:
8029   # Code from module unistr/u8-uctomb:
8030   # Code from module unistr/u8-uctomb-tests:
8031   # Code from module unitypes:
8032   # Code from module uniwidth/base:
8033   # Code from module uniwidth/width:
8034   # Code from module uniwidth/width-tests:
8035   # Code from module unlocked-io:
8036   # Code from module unlocked-io-internal:
8037   # Code from module unsetenv:
8038   # Code from module unsetenv-tests:
8039   # Code from module update-copyright:
8040   # Code from module update-copyright-tests:
8041   # Code from module useless-if-before-free:
8042   # Code from module vasnprintf:
8043   # Code from module vasnprintf-tests:
8044   # Code from module vasprintf:
8045   # Code from module vasprintf-tests:
8046   # Code from module vc-list-files:
8047   # Code from module vc-list-files-tests:
8048   # Code from module verify:
8049   # Code from module verify-tests:
8050   # Code from module version-etc:
8051   # Code from module version-etc-fsf:
8052   # Code from module version-etc-tests:
8053   # Code from module warnings:
8054   # Code from module wchar:
8055   # Code from module wchar-tests:
8056   # Code from module wcrtomb:
8057   # Code from module wcrtomb-tests:
8058   # Code from module wctob:
8059   # Code from module wctomb:
8060   # Code from module wctype-h:
8061   # Code from module wctype-h-tests:
8062   # Code from module wcwidth:
8063   # Code from module wcwidth-tests:
8064   # Code from module windows-mutex:
8065   # Code from module windows-once:
8066   # Code from module windows-recmutex:
8067   # Code from module windows-rwlock:
8068   # Code from module windows-thread:
8069   # Code from module windows-tls:
8070   # Code from module wmemchr:
8071   # Code from module wmempcpy:
8072   # Code from module xalloc:
8073   # Code from module xalloc-die:
8074   # Code from module xalloc-die-tests:
8075   # Code from module xalloc-oversized:
8076   # Code from module xfreopen:
8077   # Code from module xmalloca:
8078   # Code from module xreadlink:
8079   # Code from module xsize:
8080   # Code from module xstdopen:
8081   # Code from module xstdopen-tests:
8082   # Code from module xstriconv:
8083   # Code from module xstrtoimax:
8084   # Code from module xstrtoimax-tests:
8085   # Code from module xstrtol:
8086   # Code from module xstrtol-error:
8087   # Code from module xstrtol-tests:
8088   # Code from module xvasprintf:
8089   # Code from module xvasprintf-tests:
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100                         # Check whether --enable-cross-guesses was given.
8101 if test ${enable_cross_guesses+y}
8102 then :
8103   enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8104        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8105 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8106        enableval=conservative
8107      fi
8108      gl_cross_guesses="$enableval"
8109 else $as_nop
8110   gl_cross_guesses=conservative
8111 fi
8112
8113   if test $gl_cross_guesses = risky; then
8114     gl_cross_guess_normal="guessing yes"
8115     gl_cross_guess_inverted="guessing no"
8116   else
8117     gl_cross_guess_normal="guessing no"
8118     gl_cross_guess_inverted="guessing yes"
8119   fi
8120           LIBC_FATAL_STDERR_=1
8121   export LIBC_FATAL_STDERR_
8122
8123
8124 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8125 if test "x$ac_cv_type_size_t" = xyes
8126 then :
8127
8128 else $as_nop
8129
8130 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8131
8132 fi
8133
8134 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8135 # for constant arguments.  Useless!
8136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8137 printf %s "checking for working alloca.h... " >&6; }
8138 if test ${ac_cv_working_alloca_h+y}
8139 then :
8140   printf %s "(cached) " >&6
8141 else $as_nop
8142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8143 /* end confdefs.h.  */
8144 #include <alloca.h>
8145 int
8146 main (void)
8147 {
8148 char *p = (char *) alloca (2 * sizeof (int));
8149                           if (p) return 0;
8150   ;
8151   return 0;
8152 }
8153 _ACEOF
8154 if ac_fn_c_try_link "$LINENO"
8155 then :
8156   ac_cv_working_alloca_h=yes
8157 else $as_nop
8158   ac_cv_working_alloca_h=no
8159 fi
8160 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8161     conftest$ac_exeext conftest.$ac_ext
8162 fi
8163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8164 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8165 if test $ac_cv_working_alloca_h = yes; then
8166
8167 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8168
8169 fi
8170
8171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8172 printf %s "checking for alloca... " >&6; }
8173 if test ${ac_cv_func_alloca_works+y}
8174 then :
8175   printf %s "(cached) " >&6
8176 else $as_nop
8177   if test $ac_cv_working_alloca_h = yes; then
8178   ac_cv_func_alloca_works=yes
8179 else
8180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181 /* end confdefs.h.  */
8182 #include <stdlib.h>
8183 #include <stddef.h>
8184 #ifndef alloca
8185 # ifdef __GNUC__
8186 #  define alloca __builtin_alloca
8187 # elif defined _MSC_VER
8188 #  include <malloc.h>
8189 #  define alloca _alloca
8190 # else
8191 #  ifdef  __cplusplus
8192 extern "C"
8193 #  endif
8194 void *alloca (size_t);
8195 # endif
8196 #endif
8197
8198 int
8199 main (void)
8200 {
8201 char *p = (char *) alloca (1);
8202                                     if (p) return 0;
8203   ;
8204   return 0;
8205 }
8206 _ACEOF
8207 if ac_fn_c_try_link "$LINENO"
8208 then :
8209   ac_cv_func_alloca_works=yes
8210 else $as_nop
8211   ac_cv_func_alloca_works=no
8212 fi
8213 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8214     conftest$ac_exeext conftest.$ac_ext
8215 fi
8216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8217 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8218 fi
8219
8220 if test $ac_cv_func_alloca_works = yes; then
8221
8222 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8223
8224 else
8225   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8226 # that cause trouble.  Some versions do not even contain alloca or
8227 # contain a buggy version.  If you still want to use their alloca,
8228 # use ar to extract alloca.o from them instead of compiling alloca.c.
8229
8230
8231
8232
8233
8234 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8235
8236 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8237
8238
8239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8240 printf %s "checking stack direction for C alloca... " >&6; }
8241 if test ${ac_cv_c_stack_direction+y}
8242 then :
8243   printf %s "(cached) " >&6
8244 else $as_nop
8245   if test "$cross_compiling" = yes
8246 then :
8247   ac_cv_c_stack_direction=0
8248 else $as_nop
8249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8250 /* end confdefs.h.  */
8251 $ac_includes_default
8252 int
8253 find_stack_direction (int *addr, int depth)
8254 {
8255   int dir, dummy = 0;
8256   if (! addr)
8257     addr = &dummy;
8258   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8259   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8260   return dir + dummy;
8261 }
8262
8263 int
8264 main (int argc, char **argv)
8265 {
8266   return find_stack_direction (0, argc + !argv + 20) < 0;
8267 }
8268 _ACEOF
8269 if ac_fn_c_try_run "$LINENO"
8270 then :
8271   ac_cv_c_stack_direction=1
8272 else $as_nop
8273   ac_cv_c_stack_direction=-1
8274 fi
8275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8276   conftest.$ac_objext conftest.beam conftest.$ac_ext
8277 fi
8278
8279 fi
8280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8281 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8282 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8283
8284
8285 fi
8286
8287
8288     HAVE_BTOWC=1;
8289   HAVE_MBSINIT=1;
8290   HAVE_MBRTOWC=1;
8291   HAVE_MBRLEN=1;
8292   HAVE_MBSRTOWCS=1;
8293   HAVE_MBSNRTOWCS=1;
8294   HAVE_WCRTOMB=1;
8295   HAVE_WCSRTOMBS=1;
8296   HAVE_WCSNRTOMBS=1;
8297   HAVE_WMEMCHR=1;
8298   HAVE_WMEMCMP=1;
8299   HAVE_WMEMCPY=1;
8300   HAVE_WMEMMOVE=1;
8301   HAVE_WMEMPCPY=1;
8302   HAVE_WMEMSET=1;
8303   HAVE_WCSLEN=1;
8304   HAVE_WCSNLEN=1;
8305   HAVE_WCSCPY=1;
8306   HAVE_WCPCPY=1;
8307   HAVE_WCSNCPY=1;
8308   HAVE_WCPNCPY=1;
8309   HAVE_WCSCAT=1;
8310   HAVE_WCSNCAT=1;
8311   HAVE_WCSCMP=1;
8312   HAVE_WCSNCMP=1;
8313   HAVE_WCSCASECMP=1;
8314   HAVE_WCSNCASECMP=1;
8315   HAVE_WCSCOLL=1;
8316   HAVE_WCSXFRM=1;
8317   HAVE_WCSDUP=1;
8318   HAVE_WCSCHR=1;
8319   HAVE_WCSRCHR=1;
8320   HAVE_WCSCSPN=1;
8321   HAVE_WCSSPN=1;
8322   HAVE_WCSPBRK=1;
8323   HAVE_WCSSTR=1;
8324   HAVE_WCSTOK=1;
8325   HAVE_WCSWIDTH=1;
8326   HAVE_WCSFTIME=1;
8327   HAVE_DECL_WCTOB=1;
8328   HAVE_DECL_WCSDUP=1;
8329   HAVE_DECL_WCWIDTH=1;
8330   REPLACE_MBSTATE_T=0;
8331   REPLACE_BTOWC=0;
8332   REPLACE_WCTOB=0;
8333   REPLACE_MBSINIT=0;
8334   REPLACE_MBRTOWC=0;
8335   REPLACE_MBRLEN=0;
8336   REPLACE_MBSRTOWCS=0;
8337   REPLACE_MBSNRTOWCS=0;
8338   REPLACE_WCRTOMB=0;
8339   REPLACE_WCSRTOMBS=0;
8340   REPLACE_WCSNRTOMBS=0;
8341   REPLACE_WCWIDTH=0;
8342   REPLACE_WCSWIDTH=0;
8343   REPLACE_WCSFTIME=0;
8344   REPLACE_WCSTOK=0;
8345
8346
8347
8348   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8349 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8350 if test ${gl_cv_header_wchar_h_correct_inline+y}
8351 then :
8352   printf %s "(cached) " >&6
8353 else $as_nop
8354   gl_cv_header_wchar_h_correct_inline=yes
8355      case "$host_os" in
8356        *-gnu* | gnu*)
8357          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358 /* end confdefs.h.  */
8359
8360
8361              #define wcstod renamed_wcstod
8362              #include <wchar.h>
8363              extern int zero (void);
8364              int main () { return zero(); }
8365
8366 _ACEOF
8367                                                       save_ac_compile="$ac_compile"
8368          ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8369          if echo '#include "conftest.c"' >conftest1.c \
8370             && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8371   (eval $ac_compile) 2>&5
8372   ac_status=$?
8373   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8374   test $ac_status = 0; }; then
8375            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8376 /* end confdefs.h.  */
8377
8378
8379                #define wcstod renamed_wcstod
8380                #include <wchar.h>
8381                int zero (void) { return 0; }
8382
8383 _ACEOF
8384                       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8385            if echo '#include "conftest.c"' >conftest2.c \
8386               && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8387   (eval $ac_compile) 2>&5
8388   ac_status=$?
8389   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8390   test $ac_status = 0; }; then
8391              if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8392                :
8393              else
8394                gl_cv_header_wchar_h_correct_inline=no
8395              fi
8396            fi
8397          fi
8398          ac_compile="$save_ac_compile"
8399          rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8400          ;;
8401      esac
8402
8403 fi
8404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8405 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
8406   if test $gl_cv_header_wchar_h_correct_inline = no; then
8407     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8408 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8409 C99 mode. You have four options:
8410   - Add the flag -fgnu89-inline to CC and reconfigure, or
8411   - Fix your include files, using parts of
8412     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8413   - Use a gcc version older than 4.3, or
8414   - Don't use the flags -std=c99 or -std=gnu99.
8415 Configuration aborted." "$LINENO" 5
8416   fi
8417
8418 ac_func=
8419 for ac_item in $ac_func_c_list
8420 do
8421   if test $ac_func; then
8422     ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8423     if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8424       echo "#define $ac_item 1" >> confdefs.h
8425     fi
8426     ac_func=
8427   else
8428     ac_func=$ac_item
8429   fi
8430 done
8431
8432   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8433 printf %s "checking for nl_langinfo and CODESET... " >&6; }
8434 if test ${am_cv_langinfo_codeset+y}
8435 then :
8436   printf %s "(cached) " >&6
8437 else $as_nop
8438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8439 /* end confdefs.h.  */
8440 #include <langinfo.h>
8441 int
8442 main (void)
8443 {
8444 char* cs = nl_langinfo(CODESET); return !cs;
8445   ;
8446   return 0;
8447 }
8448 _ACEOF
8449 if ac_fn_c_try_link "$LINENO"
8450 then :
8451   am_cv_langinfo_codeset=yes
8452 else $as_nop
8453   am_cv_langinfo_codeset=no
8454 fi
8455 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8456     conftest$ac_exeext conftest.$ac_ext
8457
8458 fi
8459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8460 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
8461   if test $am_cv_langinfo_codeset = yes; then
8462
8463 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8464
8465   fi
8466
8467
8468
8469
8470   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8471 printf %s "checking for a traditional french locale... " >&6; }
8472 if test ${gt_cv_locale_fr+y}
8473 then :
8474   printf %s "(cached) " >&6
8475 else $as_nop
8476
8477     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478 /* end confdefs.h.  */
8479
8480 #include <locale.h>
8481 #include <time.h>
8482 #if HAVE_LANGINFO_CODESET
8483 # include <langinfo.h>
8484 #endif
8485 #include <stdlib.h>
8486 #include <string.h>
8487 struct tm t;
8488 char buf[16];
8489 int main () {
8490   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
8491      imitates locale dependent behaviour by looking at the environment
8492      variables, and all locales use the UTF-8 encoding.  */
8493 #if defined __BEOS__ || defined __HAIKU__
8494   return 1;
8495 #else
8496   /* Check whether the given locale name is recognized by the system.  */
8497 # if defined _WIN32 && !defined __CYGWIN__
8498   /* On native Windows, setlocale(category, "") looks at the system settings,
8499      not at the environment variables.  Also, when an encoding suffix such
8500      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8501      category of the locale to "C".  */
8502   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8503       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8504     return 1;
8505 # else
8506   if (setlocale (LC_ALL, "") == NULL) return 1;
8507 # endif
8508   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8509      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8510      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8511      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8512      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8513      some unit tests fail.
8514      On MirBSD 10, when an unsupported locale is specified, setlocale()
8515      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8516 # if HAVE_LANGINFO_CODESET
8517   {
8518     const char *cs = nl_langinfo (CODESET);
8519     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8520         || strcmp (cs, "UTF-8") == 0)
8521       return 1;
8522   }
8523 # endif
8524 # ifdef __CYGWIN__
8525   /* On Cygwin, avoid locale names without encoding suffix, because the
8526      locale_charset() function relies on the encoding suffix.  Note that
8527      LC_ALL is set on the command line.  */
8528   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8529 # endif
8530   /* Check whether in the abbreviation of the second month, the second
8531      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8532      one byte long. This excludes the UTF-8 encoding.  */
8533   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8534   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8535 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8536   /* Check whether the decimal separator is a comma.
8537      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8538      are nl_langinfo(RADIXCHAR) are both ".".  */
8539   if (localeconv () ->decimal_point[0] != ',') return 1;
8540 # endif
8541   return 0;
8542 #endif
8543 }
8544
8545 _ACEOF
8546     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8547   (eval $ac_link) 2>&5
8548   ac_status=$?
8549   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8550   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8551       case "$host_os" in
8552         # Handle native Windows specially, because there setlocale() interprets
8553         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8554         # "fr" or "fra" as "French" or "French_France.1252",
8555         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8556         # "ja" as "Japanese" or "Japanese_Japan.932",
8557         # and similar.
8558         mingw*)
8559           # Test for the native Windows locale name.
8560           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8561             gt_cv_locale_fr=French_France.1252
8562           else
8563             # None found.
8564             gt_cv_locale_fr=none
8565           fi
8566           ;;
8567         *)
8568           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8569           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8570           # configure script would override the LC_ALL setting. Likewise for
8571           # LC_CTYPE, which is also set at the beginning of the configure script.
8572           # Test for the usual locale name.
8573           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8574             gt_cv_locale_fr=fr_FR
8575           else
8576             # Test for the locale name with explicit encoding suffix.
8577             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8578               gt_cv_locale_fr=fr_FR.ISO-8859-1
8579             else
8580               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8581               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8582                 gt_cv_locale_fr=fr_FR.ISO8859-1
8583               else
8584                 # Test for the HP-UX locale name.
8585                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8586                   gt_cv_locale_fr=fr_FR.iso88591
8587                 else
8588                   # Test for the Solaris 7 locale name.
8589                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8590                     gt_cv_locale_fr=fr
8591                   else
8592                     # None found.
8593                     gt_cv_locale_fr=none
8594                   fi
8595                 fi
8596               fi
8597             fi
8598           fi
8599           ;;
8600       esac
8601     fi
8602     rm -fr conftest*
8603
8604 fi
8605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8606 printf "%s\n" "$gt_cv_locale_fr" >&6; }
8607   LOCALE_FR=$gt_cv_locale_fr
8608
8609
8610
8611
8612   GL_GNULIB_BTOWC=0
8613
8614
8615
8616   GL_GNULIB_WCTOB=0
8617
8618
8619
8620   GL_GNULIB_MBSINIT=0
8621
8622
8623
8624   GL_GNULIB_MBRTOWC=0
8625
8626
8627
8628   GL_GNULIB_MBRLEN=0
8629
8630
8631
8632   GL_GNULIB_MBSRTOWCS=0
8633
8634
8635
8636   GL_GNULIB_MBSNRTOWCS=0
8637
8638
8639
8640   GL_GNULIB_WCRTOMB=0
8641
8642
8643
8644   GL_GNULIB_WCSRTOMBS=0
8645
8646
8647
8648   GL_GNULIB_WCSNRTOMBS=0
8649
8650
8651
8652   GL_GNULIB_WCWIDTH=0
8653
8654
8655
8656   GL_GNULIB_WMEMCHR=0
8657
8658
8659
8660   GL_GNULIB_WMEMCMP=0
8661
8662
8663
8664   GL_GNULIB_WMEMCPY=0
8665
8666
8667
8668   GL_GNULIB_WMEMMOVE=0
8669
8670
8671
8672   GL_GNULIB_WMEMPCPY=0
8673
8674
8675
8676   GL_GNULIB_WMEMSET=0
8677
8678
8679
8680   GL_GNULIB_WCSLEN=0
8681
8682
8683
8684   GL_GNULIB_WCSNLEN=0
8685
8686
8687
8688   GL_GNULIB_WCSCPY=0
8689
8690
8691
8692   GL_GNULIB_WCPCPY=0
8693
8694
8695
8696   GL_GNULIB_WCSNCPY=0
8697
8698
8699
8700   GL_GNULIB_WCPNCPY=0
8701
8702
8703
8704   GL_GNULIB_WCSCAT=0
8705
8706
8707
8708   GL_GNULIB_WCSNCAT=0
8709
8710
8711
8712   GL_GNULIB_WCSCMP=0
8713
8714
8715
8716   GL_GNULIB_WCSNCMP=0
8717
8718
8719
8720   GL_GNULIB_WCSCASECMP=0
8721
8722
8723
8724   GL_GNULIB_WCSNCASECMP=0
8725
8726
8727
8728   GL_GNULIB_WCSCOLL=0
8729
8730
8731
8732   GL_GNULIB_WCSXFRM=0
8733
8734
8735
8736   GL_GNULIB_WCSDUP=0
8737
8738
8739
8740   GL_GNULIB_WCSCHR=0
8741
8742
8743
8744   GL_GNULIB_WCSRCHR=0
8745
8746
8747
8748   GL_GNULIB_WCSCSPN=0
8749
8750
8751
8752   GL_GNULIB_WCSSPN=0
8753
8754
8755
8756   GL_GNULIB_WCSPBRK=0
8757
8758
8759
8760   GL_GNULIB_WCSSTR=0
8761
8762
8763
8764   GL_GNULIB_WCSTOK=0
8765
8766
8767
8768   GL_GNULIB_WCSWIDTH=0
8769
8770
8771
8772   GL_GNULIB_WCSFTIME=0
8773
8774
8775
8776   GL_GNULIB_MDA_WCSDUP=1
8777
8778
8779
8780
8781     HAVE__EXIT=1;
8782   HAVE_ALIGNED_ALLOC=1;
8783   HAVE_ATOLL=1;
8784   HAVE_CANONICALIZE_FILE_NAME=1;
8785   HAVE_DECL_ECVT=1;
8786   HAVE_DECL_FCVT=1;
8787   HAVE_DECL_GCVT=1;
8788   HAVE_DECL_GETLOADAVG=1;
8789   HAVE_GETSUBOPT=1;
8790   HAVE_GRANTPT=1;
8791   HAVE_INITSTATE=1;
8792   HAVE_DECL_INITSTATE=1;
8793   HAVE_MBTOWC=1;
8794   HAVE_MKDTEMP=1;
8795   HAVE_MKOSTEMP=1;
8796   HAVE_MKOSTEMPS=1;
8797   HAVE_MKSTEMP=1;
8798   HAVE_MKSTEMPS=1;
8799   HAVE_POSIX_MEMALIGN=1;
8800   HAVE_POSIX_OPENPT=1;
8801   HAVE_PTSNAME=1;
8802   HAVE_PTSNAME_R=1;
8803   HAVE_QSORT_R=1;
8804   HAVE_RANDOM=1;
8805   HAVE_RANDOM_H=1;
8806   HAVE_RANDOM_R=1;
8807   HAVE_REALLOCARRAY=1;
8808   HAVE_REALPATH=1;
8809   HAVE_RPMATCH=1;
8810   HAVE_SECURE_GETENV=1;
8811   HAVE_SETENV=1;
8812   HAVE_DECL_SETENV=1;
8813   HAVE_SETSTATE=1;
8814   HAVE_DECL_SETSTATE=1;
8815   HAVE_STRTOD=1;
8816   HAVE_STRTOL=1;
8817   HAVE_STRTOLD=1;
8818   HAVE_STRTOLL=1;
8819   HAVE_STRTOUL=1;
8820   HAVE_STRTOULL=1;
8821   HAVE_STRUCT_RANDOM_DATA=1;
8822   HAVE_SYS_LOADAVG_H=0;
8823   HAVE_UNLOCKPT=1;
8824   HAVE_DECL_UNSETENV=1;
8825   REPLACE_ALIGNED_ALLOC=0;
8826   REPLACE_CALLOC=0;
8827   REPLACE_CANONICALIZE_FILE_NAME=0;
8828   REPLACE_FREE=0;
8829   REPLACE_INITSTATE=0;
8830   REPLACE_MALLOC=0;
8831   REPLACE_MBTOWC=0;
8832   REPLACE_MKSTEMP=0;
8833   REPLACE_POSIX_MEMALIGN=0;
8834   REPLACE_PTSNAME=0;
8835   REPLACE_PTSNAME_R=0;
8836   REPLACE_PUTENV=0;
8837   REPLACE_QSORT_R=0;
8838   REPLACE_RANDOM=0;
8839   REPLACE_RANDOM_R=0;
8840   REPLACE_REALLOC=0;
8841   REPLACE_REALLOCARRAY=0;
8842   REPLACE_REALPATH=0;
8843   REPLACE_SETENV=0;
8844   REPLACE_SETSTATE=0;
8845   REPLACE_STRTOD=0;
8846   REPLACE_STRTOL=0;
8847   REPLACE_STRTOLD=0;
8848   REPLACE_STRTOLL=0;
8849   REPLACE_STRTOUL=0;
8850   REPLACE_STRTOULL=0;
8851   REPLACE_UNSETENV=0;
8852   REPLACE_WCTOMB=0;
8853
8854
8855   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
8856 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
8857 if test ${gl_cv_malloc_ptrdiff+y}
8858 then :
8859   printf %s "(cached) " >&6
8860 else $as_nop
8861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862 /* end confdefs.h.  */
8863 #include <stdint.h>
8864
8865 int
8866 main (void)
8867 {
8868 /* 64-bit ptrdiff_t is so wide that no practical platform
8869                can exceed it.  */
8870             #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
8871
8872             /* On rare machines where size_t fits in ptrdiff_t there
8873                is no problem.  */
8874             #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
8875
8876             /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
8877                bounds even on 32-bit platforms.  We don't know which
8878                non-glibc systems are safe.  */
8879             #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
8880
8881             #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
8882               return 0;
8883             #else
8884               #error "malloc might not be ptrdiff_t safe"
8885               syntax error
8886             #endif
8887
8888   ;
8889   return 0;
8890 }
8891 _ACEOF
8892 if ac_fn_c_try_compile "$LINENO"
8893 then :
8894   gl_cv_malloc_ptrdiff=yes
8895 else $as_nop
8896   gl_cv_malloc_ptrdiff=no
8897 fi
8898 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8899
8900 fi
8901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
8902 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
8903
8904
8905
8906
8907   test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
8908
8909
8910
8911   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
8912 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
8913 if test ${gl_cv_func_malloc_posix+y}
8914 then :
8915   printf %s "(cached) " >&6
8916 else $as_nop
8917
8918                                     case "$host_os" in
8919         mingw*)
8920           gl_cv_func_malloc_posix=no ;;
8921         irix* | solaris*)
8922
8923           gl_cv_func_malloc_posix=no ;;
8924         *)
8925           gl_cv_func_malloc_posix=yes ;;
8926       esac
8927
8928 fi
8929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
8930 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
8931
8932
8933
8934
8935
8936   if test "$gl_cv_func_malloc_posix" = yes; then
8937
8938 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
8939
8940   else
8941     REPLACE_MALLOC=1
8942   fi
8943
8944
8945
8946
8947   if test $REPLACE_MALLOC = 1; then
8948     REPLACE_CALLOC=1
8949   fi
8950
8951
8952
8953   GL_GNULIB__EXIT=0
8954
8955
8956
8957   GL_GNULIB_ALIGNED_ALLOC=0
8958
8959
8960
8961   GL_GNULIB_ATOLL=0
8962
8963
8964
8965   GL_GNULIB_CALLOC_POSIX=0
8966
8967
8968
8969   GL_GNULIB_CANONICALIZE_FILE_NAME=0
8970
8971
8972
8973   GL_GNULIB_FREE_POSIX=0
8974
8975
8976
8977   GL_GNULIB_GETLOADAVG=0
8978
8979
8980
8981   GL_GNULIB_GETSUBOPT=0
8982
8983
8984
8985   GL_GNULIB_GRANTPT=0
8986
8987
8988
8989   GL_GNULIB_MALLOC_POSIX=0
8990
8991
8992
8993   GL_GNULIB_MBTOWC=0
8994
8995
8996
8997   GL_GNULIB_MKDTEMP=0
8998
8999
9000
9001   GL_GNULIB_MKOSTEMP=0
9002
9003
9004
9005   GL_GNULIB_MKOSTEMPS=0
9006
9007
9008
9009   GL_GNULIB_MKSTEMP=0
9010
9011
9012
9013   GL_GNULIB_MKSTEMPS=0
9014
9015
9016
9017   GL_GNULIB_POSIX_MEMALIGN=0
9018
9019
9020
9021   GL_GNULIB_POSIX_OPENPT=0
9022
9023
9024
9025   GL_GNULIB_PTSNAME=0
9026
9027
9028
9029   GL_GNULIB_PTSNAME_R=0
9030
9031
9032
9033   GL_GNULIB_PUTENV=0
9034
9035
9036
9037   GL_GNULIB_QSORT_R=0
9038
9039
9040
9041   GL_GNULIB_RANDOM=0
9042
9043
9044
9045   GL_GNULIB_RANDOM_R=0
9046
9047
9048
9049   GL_GNULIB_REALLOCARRAY=0
9050
9051
9052
9053   GL_GNULIB_REALLOC_POSIX=0
9054
9055
9056
9057   GL_GNULIB_REALPATH=0
9058
9059
9060
9061   GL_GNULIB_RPMATCH=0
9062
9063
9064
9065   GL_GNULIB_SECURE_GETENV=0
9066
9067
9068
9069   GL_GNULIB_SETENV=0
9070
9071
9072
9073   GL_GNULIB_STRTOD=0
9074
9075
9076
9077   GL_GNULIB_STRTOL=0
9078
9079
9080
9081   GL_GNULIB_STRTOLD=0
9082
9083
9084
9085   GL_GNULIB_STRTOLL=0
9086
9087
9088
9089   GL_GNULIB_STRTOUL=0
9090
9091
9092
9093   GL_GNULIB_STRTOULL=0
9094
9095
9096
9097   GL_GNULIB_SYSTEM_POSIX=0
9098
9099
9100
9101   GL_GNULIB_UNLOCKPT=0
9102
9103
9104
9105   GL_GNULIB_UNSETENV=0
9106
9107
9108
9109   GL_GNULIB_WCTOMB=0
9110
9111
9112
9113   GL_GNULIB_MDA_ECVT=1
9114
9115
9116
9117   GL_GNULIB_MDA_FCVT=1
9118
9119
9120
9121   GL_GNULIB_MDA_GCVT=1
9122
9123
9124
9125   GL_GNULIB_MDA_MKTEMP=1
9126
9127
9128
9129   GL_GNULIB_MDA_PUTENV=1
9130
9131
9132
9133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9134 printf %s "checking for C/C++ restrict keyword... " >&6; }
9135 if test ${ac_cv_c_restrict+y}
9136 then :
9137   printf %s "(cached) " >&6
9138 else $as_nop
9139   ac_cv_c_restrict=no
9140    # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
9141    # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
9142    # Put 'restrict' last, because C++ lacks it.
9143    for ac_kw in __restrict__ __restrict _Restrict restrict; do
9144      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h.  */
9146 typedef int *int_ptr;
9147            int foo (int_ptr $ac_kw ip) { return ip[0]; }
9148            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
9149            int bar (int ip[$ac_kw]) { return ip[0]; }
9150
9151 int
9152 main (void)
9153 {
9154 int s[1];
9155            int *$ac_kw t = s;
9156            t[0] = 0;
9157            return foo (t) + bar (t);
9158
9159   ;
9160   return 0;
9161 }
9162 _ACEOF
9163 if ac_fn_c_try_compile "$LINENO"
9164 then :
9165   ac_cv_c_restrict=$ac_kw
9166 fi
9167 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9168      test "$ac_cv_c_restrict" != no && break
9169    done
9170
9171 fi
9172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9173 printf "%s\n" "$ac_cv_c_restrict" >&6; }
9174
9175  case $ac_cv_c_restrict in
9176    restrict) ;;
9177    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
9178  ;;
9179    *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
9180  ;;
9181  esac
9182
9183
9184
9185     HAVE_CHOWN=1;
9186   HAVE_COPY_FILE_RANGE=1;
9187   HAVE_DUP3=1;
9188   HAVE_EUIDACCESS=1;
9189   HAVE_EXECVPE=1;
9190   HAVE_FACCESSAT=1;
9191   HAVE_FCHDIR=1;
9192   HAVE_FCHOWNAT=1;
9193   HAVE_FDATASYNC=1;
9194   HAVE_FSYNC=1;
9195   HAVE_FTRUNCATE=1;
9196   HAVE_GETDTABLESIZE=1;
9197   HAVE_GETENTROPY=1;
9198   HAVE_GETGROUPS=1;
9199   HAVE_GETHOSTNAME=1;
9200   HAVE_GETLOGIN=1;
9201   HAVE_GETPAGESIZE=1;
9202   HAVE_GETPASS=1;
9203   HAVE_GROUP_MEMBER=1;
9204   HAVE_LCHOWN=1;
9205   HAVE_LINK=1;
9206   HAVE_LINKAT=1;
9207   HAVE_PIPE=1;
9208   HAVE_PIPE2=1;
9209   HAVE_PREAD=1;
9210   HAVE_PWRITE=1;
9211   HAVE_READLINK=1;
9212   HAVE_READLINKAT=1;
9213   HAVE_SETHOSTNAME=1;
9214   HAVE_SLEEP=1;
9215   HAVE_SYMLINK=1;
9216   HAVE_SYMLINKAT=1;
9217   HAVE_UNLINKAT=1;
9218   HAVE_USLEEP=1;
9219   HAVE_DECL_ENVIRON=1;
9220   HAVE_DECL_EXECVPE=1;
9221   HAVE_DECL_FCHDIR=1;
9222   HAVE_DECL_FDATASYNC=1;
9223   HAVE_DECL_GETDOMAINNAME=1;
9224   HAVE_DECL_GETLOGIN=1;
9225   HAVE_DECL_GETLOGIN_R=1;
9226   HAVE_DECL_GETPAGESIZE=1;
9227   HAVE_DECL_GETUSERSHELL=1;
9228   HAVE_DECL_SETHOSTNAME=1;
9229   HAVE_DECL_TRUNCATE=1;
9230   HAVE_DECL_TTYNAME_R=1;
9231   HAVE_OS_H=0;
9232   HAVE_SYS_PARAM_H=0;
9233   REPLACE_ACCESS=0;
9234   REPLACE_CHOWN=0;
9235   REPLACE_CLOSE=0;
9236   REPLACE_DUP=0;
9237   REPLACE_DUP2=0;
9238   REPLACE_EXECL=0;
9239   REPLACE_EXECLE=0;
9240   REPLACE_EXECLP=0;
9241   REPLACE_EXECV=0;
9242   REPLACE_EXECVE=0;
9243   REPLACE_EXECVP=0;
9244   REPLACE_EXECVPE=0;
9245   REPLACE_FACCESSAT=0;
9246   REPLACE_FCHOWNAT=0;
9247   REPLACE_FTRUNCATE=0;
9248   REPLACE_GETCWD=0;
9249   REPLACE_GETDOMAINNAME=0;
9250   REPLACE_GETDTABLESIZE=0;
9251   REPLACE_GETLOGIN_R=0;
9252   REPLACE_GETGROUPS=0;
9253   REPLACE_GETPAGESIZE=0;
9254   REPLACE_GETPASS=0;
9255   REPLACE_ISATTY=0;
9256   REPLACE_LCHOWN=0;
9257   REPLACE_LINK=0;
9258   REPLACE_LINKAT=0;
9259   REPLACE_LSEEK=0;
9260   REPLACE_PREAD=0;
9261   REPLACE_PWRITE=0;
9262   REPLACE_READ=0;
9263   REPLACE_READLINK=0;
9264   REPLACE_READLINKAT=0;
9265   REPLACE_RMDIR=0;
9266   REPLACE_SLEEP=0;
9267   REPLACE_SYMLINK=0;
9268   REPLACE_SYMLINKAT=0;
9269   REPLACE_TRUNCATE=0;
9270   REPLACE_TTYNAME_R=0;
9271   REPLACE_UNLINK=0;
9272   REPLACE_UNLINKAT=0;
9273   REPLACE_USLEEP=0;
9274   REPLACE_WRITE=0;
9275   UNISTD_H_HAVE_SYS_RANDOM_H=0;
9276   UNISTD_H_HAVE_WINSOCK2_H=0;
9277   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9278
9279
9280
9281
9282
9283   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9284     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9285
9286 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9287
9288   else
9289     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9290   fi
9291
9292
9293
9294     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9295   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9296
9297   REPLACE_IOCTL=0;
9298
9299
9300
9301
9302   GL_GNULIB_ACCESS=0
9303
9304
9305
9306   GL_GNULIB_CHDIR=0
9307
9308
9309
9310   GL_GNULIB_CHOWN=0
9311
9312
9313
9314   GL_GNULIB_CLOSE=0
9315
9316
9317
9318   GL_GNULIB_COPY_FILE_RANGE=0
9319
9320
9321
9322   GL_GNULIB_DUP=0
9323
9324
9325
9326   GL_GNULIB_DUP2=0
9327
9328
9329
9330   GL_GNULIB_DUP3=0
9331
9332
9333
9334   GL_GNULIB_ENVIRON=0
9335
9336
9337
9338   GL_GNULIB_EUIDACCESS=0
9339
9340
9341
9342   GL_GNULIB_EXECL=0
9343
9344
9345
9346   GL_GNULIB_EXECLE=0
9347
9348
9349
9350   GL_GNULIB_EXECLP=0
9351
9352
9353
9354   GL_GNULIB_EXECV=0
9355
9356
9357
9358   GL_GNULIB_EXECVE=0
9359
9360
9361
9362   GL_GNULIB_EXECVP=0
9363
9364
9365
9366   GL_GNULIB_EXECVPE=0
9367
9368
9369
9370   GL_GNULIB_FACCESSAT=0
9371
9372
9373
9374   GL_GNULIB_FCHDIR=0
9375
9376
9377
9378   GL_GNULIB_FCHOWNAT=0
9379
9380
9381
9382   GL_GNULIB_FDATASYNC=0
9383
9384
9385
9386   GL_GNULIB_FSYNC=0
9387
9388
9389
9390   GL_GNULIB_FTRUNCATE=0
9391
9392
9393
9394   GL_GNULIB_GETCWD=0
9395
9396
9397
9398   GL_GNULIB_GETDOMAINNAME=0
9399
9400
9401
9402   GL_GNULIB_GETDTABLESIZE=0
9403
9404
9405
9406   GL_GNULIB_GETENTROPY=0
9407
9408
9409
9410   GL_GNULIB_GETGROUPS=0
9411
9412
9413
9414   GL_GNULIB_GETHOSTNAME=0
9415
9416
9417
9418   GL_GNULIB_GETLOGIN=0
9419
9420
9421
9422   GL_GNULIB_GETLOGIN_R=0
9423
9424
9425
9426   GL_GNULIB_GETOPT_POSIX=0
9427
9428
9429
9430   GL_GNULIB_GETPAGESIZE=0
9431
9432
9433
9434   GL_GNULIB_GETPASS=0
9435
9436
9437
9438   GL_GNULIB_GETUSERSHELL=0
9439
9440
9441
9442   GL_GNULIB_GROUP_MEMBER=0
9443
9444
9445
9446   GL_GNULIB_ISATTY=0
9447
9448
9449
9450   GL_GNULIB_LCHOWN=0
9451
9452
9453
9454   GL_GNULIB_LINK=0
9455
9456
9457
9458   GL_GNULIB_LINKAT=0
9459
9460
9461
9462   GL_GNULIB_LSEEK=0
9463
9464
9465
9466   GL_GNULIB_PIPE=0
9467
9468
9469
9470   GL_GNULIB_PIPE2=0
9471
9472
9473
9474   GL_GNULIB_PREAD=0
9475
9476
9477
9478   GL_GNULIB_PWRITE=0
9479
9480
9481
9482   GL_GNULIB_READ=0
9483
9484
9485
9486   GL_GNULIB_READLINK=0
9487
9488
9489
9490   GL_GNULIB_READLINKAT=0
9491
9492
9493
9494   GL_GNULIB_RMDIR=0
9495
9496
9497
9498   GL_GNULIB_SETHOSTNAME=0
9499
9500
9501
9502   GL_GNULIB_SLEEP=0
9503
9504
9505
9506   GL_GNULIB_SYMLINK=0
9507
9508
9509
9510   GL_GNULIB_SYMLINKAT=0
9511
9512
9513
9514   GL_GNULIB_TRUNCATE=0
9515
9516
9517
9518   GL_GNULIB_TTYNAME_R=0
9519
9520
9521
9522   GL_GNULIB_UNISTD_H_GETOPT=0
9523
9524
9525
9526   GL_GNULIB_UNISTD_H_NONBLOCKING=0
9527
9528
9529
9530   GL_GNULIB_UNISTD_H_SIGPIPE=0
9531
9532
9533
9534   GL_GNULIB_UNLINK=0
9535
9536
9537
9538   GL_GNULIB_UNLINKAT=0
9539
9540
9541
9542   GL_GNULIB_USLEEP=0
9543
9544
9545
9546   GL_GNULIB_WRITE=0
9547
9548
9549
9550   GL_GNULIB_MDA_ACCESS=1
9551
9552
9553
9554   GL_GNULIB_MDA_CHDIR=1
9555
9556
9557
9558   GL_GNULIB_MDA_CLOSE=1
9559
9560
9561
9562   GL_GNULIB_MDA_DUP=1
9563
9564
9565
9566   GL_GNULIB_MDA_DUP2=1
9567
9568
9569
9570   GL_GNULIB_MDA_EXECL=1
9571
9572
9573
9574   GL_GNULIB_MDA_EXECLE=1
9575
9576
9577
9578   GL_GNULIB_MDA_EXECLP=1
9579
9580
9581
9582   GL_GNULIB_MDA_EXECV=1
9583
9584
9585
9586   GL_GNULIB_MDA_EXECVE=1
9587
9588
9589
9590   GL_GNULIB_MDA_EXECVP=1
9591
9592
9593
9594   GL_GNULIB_MDA_EXECVPE=1
9595
9596
9597
9598   GL_GNULIB_MDA_GETCWD=1
9599
9600
9601
9602   GL_GNULIB_MDA_GETPID=1
9603
9604
9605
9606   GL_GNULIB_MDA_ISATTY=1
9607
9608
9609
9610   GL_GNULIB_MDA_LSEEK=1
9611
9612
9613
9614   GL_GNULIB_MDA_READ=1
9615
9616
9617
9618   GL_GNULIB_MDA_RMDIR=1
9619
9620
9621
9622   GL_GNULIB_MDA_SWAB=1
9623
9624
9625
9626   GL_GNULIB_MDA_UNLINK=1
9627
9628
9629
9630   GL_GNULIB_MDA_WRITE=1
9631
9632
9633
9634
9635     HAVE_ISBLANK=1;
9636
9637
9638
9639   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9640 printf %s "checking whether the preprocessor supports include_next... " >&6; }
9641 if test ${gl_cv_have_include_next+y}
9642 then :
9643   printf %s "(cached) " >&6
9644 else $as_nop
9645   rm -rf conftestd1a conftestd1b conftestd2
9646      mkdir conftestd1a conftestd1b conftestd2
9647                                                   cat <<EOF > conftestd1a/conftest.h
9648 #define DEFINED_IN_CONFTESTD1
9649 #include_next <conftest.h>
9650 #ifdef DEFINED_IN_CONFTESTD2
9651 int foo;
9652 #else
9653 #error "include_next doesn't work"
9654 #endif
9655 EOF
9656      cat <<EOF > conftestd1b/conftest.h
9657 #define DEFINED_IN_CONFTESTD1
9658 #include <stdio.h>
9659 #include_next <conftest.h>
9660 #ifdef DEFINED_IN_CONFTESTD2
9661 int foo;
9662 #else
9663 #error "include_next doesn't work"
9664 #endif
9665 EOF
9666      cat <<EOF > conftestd2/conftest.h
9667 #ifndef DEFINED_IN_CONFTESTD1
9668 #error "include_next test doesn't work"
9669 #endif
9670 #define DEFINED_IN_CONFTESTD2
9671 EOF
9672      gl_save_CPPFLAGS="$CPPFLAGS"
9673      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9674      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9675 /* end confdefs.h.  */
9676 #include <conftest.h>
9677 _ACEOF
9678 if ac_fn_c_try_compile "$LINENO"
9679 then :
9680   gl_cv_have_include_next=yes
9681 else $as_nop
9682   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9683         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9684 /* end confdefs.h.  */
9685 #include <conftest.h>
9686 _ACEOF
9687 if ac_fn_c_try_compile "$LINENO"
9688 then :
9689   gl_cv_have_include_next=buggy
9690 else $as_nop
9691   gl_cv_have_include_next=no
9692 fi
9693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9694
9695 fi
9696 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9697      CPPFLAGS="$gl_save_CPPFLAGS"
9698      rm -rf conftestd1a conftestd1b conftestd2
9699
9700 fi
9701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9702 printf "%s\n" "$gl_cv_have_include_next" >&6; }
9703   PRAGMA_SYSTEM_HEADER=
9704   if test $gl_cv_have_include_next = yes; then
9705     INCLUDE_NEXT=include_next
9706     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9707     if test -n "$GCC"; then
9708       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9709     fi
9710   else
9711     if test $gl_cv_have_include_next = buggy; then
9712       INCLUDE_NEXT=include
9713       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9714     else
9715       INCLUDE_NEXT=include
9716       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9717     fi
9718   fi
9719
9720
9721
9722
9723       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
9724 printf %s "checking whether source code line length is unlimited... " >&6; }
9725 if test ${gl_cv_source_line_length_unlimited+y}
9726 then :
9727   printf %s "(cached) " >&6
9728 else $as_nop
9729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730 /* end confdefs.h.  */
9731
9732 #ifdef __TANDEM
9733 choke me
9734 #endif
9735
9736 _ACEOF
9737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9738   $EGREP "choke me" >/dev/null 2>&1
9739 then :
9740   gl_cv_source_line_length_unlimited=no
9741 else $as_nop
9742   gl_cv_source_line_length_unlimited=yes
9743 fi
9744 rm -rf conftest*
9745
9746
9747 fi
9748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
9749 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
9750   if test $gl_cv_source_line_length_unlimited = no; then
9751     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9752   else
9753     PRAGMA_COLUMNS=
9754   fi
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768      if test $gl_cv_have_include_next = yes; then
9769        gl_cv_next_ctype_h='<'ctype.h'>'
9770      else
9771        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
9772 printf %s "checking absolute name of <ctype.h>... " >&6; }
9773 if test ${gl_cv_next_ctype_h+y}
9774 then :
9775   printf %s "(cached) " >&6
9776 else $as_nop
9777
9778
9779
9780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781 /* end confdefs.h.  */
9782 #include <ctype.h>
9783 _ACEOF
9784                 case "$host_os" in
9785     aix*) gl_absname_cpp="$ac_cpp -C" ;;
9786     *)    gl_absname_cpp="$ac_cpp" ;;
9787   esac
9788
9789   case "$host_os" in
9790     mingw*)
9791                                           gl_dirsep_regex='[/\\]'
9792       ;;
9793     *)
9794       gl_dirsep_regex='\/'
9795       ;;
9796   esac
9797       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9798   gl_header_literal_regex=`echo 'ctype.h' \
9799                            | sed -e "$gl_make_literal_regex_sed"`
9800   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9801       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9802       s|^/[^/]|//&|
9803       p
9804       q
9805     }'
9806
9807         gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9808   sed -n "$gl_absolute_header_sed"`
9809
9810            gl_header=$gl_cv_absolute_ctype_h
9811            gl_cv_next_ctype_h='"'$gl_header'"'
9812
9813
9814 fi
9815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
9816 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
9817      fi
9818      NEXT_CTYPE_H=$gl_cv_next_ctype_h
9819
9820      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9821        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9822        gl_next_as_first_directive='<'ctype.h'>'
9823      else
9824        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9825        gl_next_as_first_directive=$gl_cv_next_ctype_h
9826      fi
9827      NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839   GL_GNULIB_ISBLANK=0
9840
9841
9842
9843 gl_mda_defines='
9844 #if defined _WIN32 && !defined __CYGWIN__
9845 #define access    _access
9846 #define chdir     _chdir
9847 #define chmod     _chmod
9848 #define close     _close
9849 #define creat     _creat
9850 #define dup       _dup
9851 #define dup2      _dup2
9852 #define ecvt      _ecvt
9853 #define execl     _execl
9854 #define execle    _execle
9855 #define execlp    _execlp
9856 #define execv     _execv
9857 #define execve    _execve
9858 #define execvp    _execvp
9859 #define execvpe   _execvpe
9860 #define fcloseall _fcloseall
9861 #define fcvt      _fcvt
9862 #define fdopen    _fdopen
9863 #define fileno    _fileno
9864 #define gcvt      _gcvt
9865 #define getcwd    _getcwd
9866 #define getpid    _getpid
9867 #define getw      _getw
9868 #define isatty    _isatty
9869 #define j0        _j0
9870 #define j1        _j1
9871 #define jn        _jn
9872 #define lfind     _lfind
9873 #define lsearch   _lsearch
9874 #define lseek     _lseek
9875 #define memccpy   _memccpy
9876 #define mkdir     _mkdir
9877 #define mktemp    _mktemp
9878 #define open      _open
9879 #define putenv    _putenv
9880 #define putw      _putw
9881 #define read      _read
9882 #define rmdir     _rmdir
9883 #define strdup    _strdup
9884 #define swab      _swab
9885 #define tempnam   _tempnam
9886 #define tzset     _tzset
9887 #define umask     _umask
9888 #define unlink    _unlink
9889 #define utime     _utime
9890 #define wcsdup    _wcsdup
9891 #define write     _write
9892 #define y0        _y0
9893 #define y1        _y1
9894 #define yn        _yn
9895 #endif
9896 '
9897
9898
9899
9900
9901
9902
9903
9904
9905   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9906 printf %s "checking if environ is properly declared... " >&6; }
9907 if test ${gt_cv_var_environ_declaration+y}
9908 then :
9909   printf %s "(cached) " >&6
9910 else $as_nop
9911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912 /* end confdefs.h.  */
9913 #if HAVE_UNISTD_H
9914      #include <unistd.h>
9915      #endif
9916      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9917      #include <stdlib.h>
9918
9919             typedef struct { int foo; } foo_t;
9920             extern foo_t environ;
9921 int
9922 main (void)
9923 {
9924 environ.foo = 1;
9925   ;
9926   return 0;
9927 }
9928 _ACEOF
9929 if ac_fn_c_try_compile "$LINENO"
9930 then :
9931   gt_cv_var_environ_declaration=no
9932 else $as_nop
9933   gt_cv_var_environ_declaration=yes
9934 fi
9935 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9936 fi
9937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9938 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
9939   if test $gt_cv_var_environ_declaration = yes; then
9940
9941 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9942
9943   fi
9944
9945
9946   if test $gt_cv_var_environ_declaration != yes; then
9947     HAVE_DECL_ENVIRON=0
9948   fi
9949
9950
9951
9952   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9953 printf %s "checking for complete errno.h... " >&6; }
9954 if test ${gl_cv_header_errno_h_complete+y}
9955 then :
9956   printf %s "(cached) " >&6
9957 else $as_nop
9958
9959     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9960 /* end confdefs.h.  */
9961
9962 #include <errno.h>
9963 #if !defined ETXTBSY
9964 booboo
9965 #endif
9966 #if !defined ENOMSG
9967 booboo
9968 #endif
9969 #if !defined EIDRM
9970 booboo
9971 #endif
9972 #if !defined ENOLINK
9973 booboo
9974 #endif
9975 #if !defined EPROTO
9976 booboo
9977 #endif
9978 #if !defined EMULTIHOP
9979 booboo
9980 #endif
9981 #if !defined EBADMSG
9982 booboo
9983 #endif
9984 #if !defined EOVERFLOW
9985 booboo
9986 #endif
9987 #if !defined ENOTSUP
9988 booboo
9989 #endif
9990 #if !defined ENETRESET
9991 booboo
9992 #endif
9993 #if !defined ECONNABORTED
9994 booboo
9995 #endif
9996 #if !defined ESTALE
9997 booboo
9998 #endif
9999 #if !defined EDQUOT
10000 booboo
10001 #endif
10002 #if !defined ECANCELED
10003 booboo
10004 #endif
10005 #if !defined EOWNERDEAD
10006 booboo
10007 #endif
10008 #if !defined ENOTRECOVERABLE
10009 booboo
10010 #endif
10011 #if !defined EILSEQ
10012 booboo
10013 #endif
10014
10015 _ACEOF
10016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10017   $EGREP "booboo" >/dev/null 2>&1
10018 then :
10019   gl_cv_header_errno_h_complete=no
10020 else $as_nop
10021   gl_cv_header_errno_h_complete=yes
10022 fi
10023 rm -rf conftest*
10024
10025
10026 fi
10027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10028 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
10029   if test $gl_cv_header_errno_h_complete = yes; then
10030     ERRNO_H=''
10031   else
10032
10033
10034
10035
10036
10037
10038
10039
10040      if test $gl_cv_have_include_next = yes; then
10041        gl_cv_next_errno_h='<'errno.h'>'
10042      else
10043        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10044 printf %s "checking absolute name of <errno.h>... " >&6; }
10045 if test ${gl_cv_next_errno_h+y}
10046 then :
10047   printf %s "(cached) " >&6
10048 else $as_nop
10049
10050
10051
10052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10053 /* end confdefs.h.  */
10054 #include <errno.h>
10055 _ACEOF
10056                 case "$host_os" in
10057     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10058     *)    gl_absname_cpp="$ac_cpp" ;;
10059   esac
10060
10061   case "$host_os" in
10062     mingw*)
10063                                           gl_dirsep_regex='[/\\]'
10064       ;;
10065     *)
10066       gl_dirsep_regex='\/'
10067       ;;
10068   esac
10069       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10070   gl_header_literal_regex=`echo 'errno.h' \
10071                            | sed -e "$gl_make_literal_regex_sed"`
10072   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10073       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10074       s|^/[^/]|//&|
10075       p
10076       q
10077     }'
10078
10079         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10080   sed -n "$gl_absolute_header_sed"`
10081
10082            gl_header=$gl_cv_absolute_errno_h
10083            gl_cv_next_errno_h='"'$gl_header'"'
10084
10085
10086 fi
10087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10088 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
10089      fi
10090      NEXT_ERRNO_H=$gl_cv_next_errno_h
10091
10092      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10093        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10094        gl_next_as_first_directive='<'errno.h'>'
10095      else
10096        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10097        gl_next_as_first_directive=$gl_cv_next_errno_h
10098      fi
10099      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10100
10101
10102
10103
10104     ERRNO_H='errno.h'
10105   fi
10106
10107    if test -n "$ERRNO_H"; then
10108   GL_GENERATE_ERRNO_H_TRUE=
10109   GL_GENERATE_ERRNO_H_FALSE='#'
10110 else
10111   GL_GENERATE_ERRNO_H_TRUE='#'
10112   GL_GENERATE_ERRNO_H_FALSE=
10113 fi
10114
10115
10116   if test -n "$ERRNO_H"; then
10117     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10118 printf %s "checking for EMULTIHOP value... " >&6; }
10119 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
10120 then :
10121   printf %s "(cached) " >&6
10122 else $as_nop
10123
10124       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126
10127 #include <errno.h>
10128 #ifdef EMULTIHOP
10129 yes
10130 #endif
10131
10132 _ACEOF
10133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10134   $EGREP "yes" >/dev/null 2>&1
10135 then :
10136   gl_cv_header_errno_h_EMULTIHOP=yes
10137 else $as_nop
10138   gl_cv_header_errno_h_EMULTIHOP=no
10139 fi
10140 rm -rf conftest*
10141
10142       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10143         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10144 /* end confdefs.h.  */
10145
10146 #define _XOPEN_SOURCE_EXTENDED 1
10147 #include <errno.h>
10148 #ifdef EMULTIHOP
10149 yes
10150 #endif
10151
10152 _ACEOF
10153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10154   $EGREP "yes" >/dev/null 2>&1
10155 then :
10156   gl_cv_header_errno_h_EMULTIHOP=hidden
10157 fi
10158 rm -rf conftest*
10159
10160         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10161                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10162 #define _XOPEN_SOURCE_EXTENDED 1
10163 #include <errno.h>
10164 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10165 #include <stdio.h>
10166 #include <stdlib.h>
10167 "
10168 then :
10169
10170 fi
10171
10172         fi
10173       fi
10174
10175 fi
10176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10177 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10178     case $gl_cv_header_errno_h_EMULTIHOP in
10179       yes | no)
10180         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10181         ;;
10182       *)
10183         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10184         ;;
10185     esac
10186
10187
10188   fi
10189
10190
10191   if test -n "$ERRNO_H"; then
10192     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10193 printf %s "checking for ENOLINK value... " >&6; }
10194 if test ${gl_cv_header_errno_h_ENOLINK+y}
10195 then :
10196   printf %s "(cached) " >&6
10197 else $as_nop
10198
10199       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200 /* end confdefs.h.  */
10201
10202 #include <errno.h>
10203 #ifdef ENOLINK
10204 yes
10205 #endif
10206
10207 _ACEOF
10208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10209   $EGREP "yes" >/dev/null 2>&1
10210 then :
10211   gl_cv_header_errno_h_ENOLINK=yes
10212 else $as_nop
10213   gl_cv_header_errno_h_ENOLINK=no
10214 fi
10215 rm -rf conftest*
10216
10217       if test $gl_cv_header_errno_h_ENOLINK = no; then
10218         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10219 /* end confdefs.h.  */
10220
10221 #define _XOPEN_SOURCE_EXTENDED 1
10222 #include <errno.h>
10223 #ifdef ENOLINK
10224 yes
10225 #endif
10226
10227 _ACEOF
10228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10229   $EGREP "yes" >/dev/null 2>&1
10230 then :
10231   gl_cv_header_errno_h_ENOLINK=hidden
10232 fi
10233 rm -rf conftest*
10234
10235         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10236                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10237 #define _XOPEN_SOURCE_EXTENDED 1
10238 #include <errno.h>
10239 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10240 #include <stdio.h>
10241 #include <stdlib.h>
10242 "
10243 then :
10244
10245 fi
10246
10247         fi
10248       fi
10249
10250 fi
10251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10252 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
10253     case $gl_cv_header_errno_h_ENOLINK in
10254       yes | no)
10255         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10256         ;;
10257       *)
10258         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10259         ;;
10260     esac
10261
10262
10263   fi
10264
10265
10266   if test -n "$ERRNO_H"; then
10267     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10268 printf %s "checking for EOVERFLOW value... " >&6; }
10269 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
10270 then :
10271   printf %s "(cached) " >&6
10272 else $as_nop
10273
10274       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10275 /* end confdefs.h.  */
10276
10277 #include <errno.h>
10278 #ifdef EOVERFLOW
10279 yes
10280 #endif
10281
10282 _ACEOF
10283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10284   $EGREP "yes" >/dev/null 2>&1
10285 then :
10286   gl_cv_header_errno_h_EOVERFLOW=yes
10287 else $as_nop
10288   gl_cv_header_errno_h_EOVERFLOW=no
10289 fi
10290 rm -rf conftest*
10291
10292       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10293         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10294 /* end confdefs.h.  */
10295
10296 #define _XOPEN_SOURCE_EXTENDED 1
10297 #include <errno.h>
10298 #ifdef EOVERFLOW
10299 yes
10300 #endif
10301
10302 _ACEOF
10303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10304   $EGREP "yes" >/dev/null 2>&1
10305 then :
10306   gl_cv_header_errno_h_EOVERFLOW=hidden
10307 fi
10308 rm -rf conftest*
10309
10310         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10311                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10312 #define _XOPEN_SOURCE_EXTENDED 1
10313 #include <errno.h>
10314 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10315 #include <stdio.h>
10316 #include <stdlib.h>
10317 "
10318 then :
10319
10320 fi
10321
10322         fi
10323       fi
10324
10325 fi
10326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10327 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10328     case $gl_cv_header_errno_h_EOVERFLOW in
10329       yes | no)
10330         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10331         ;;
10332       *)
10333         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10334         ;;
10335     esac
10336
10337
10338   fi
10339
10340
10341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10342 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10343 if test ${ac_cv_c_undeclared_builtin_options+y}
10344 then :
10345   printf %s "(cached) " >&6
10346 else $as_nop
10347   ac_save_CFLAGS=$CFLAGS
10348    ac_cv_c_undeclared_builtin_options='cannot detect'
10349    for ac_arg in '' -fno-builtin; do
10350      CFLAGS="$ac_save_CFLAGS $ac_arg"
10351      # This test program should *not* compile successfully.
10352      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10353 /* end confdefs.h.  */
10354
10355 int
10356 main (void)
10357 {
10358 (void) strchr;
10359   ;
10360   return 0;
10361 }
10362 _ACEOF
10363 if ac_fn_c_try_compile "$LINENO"
10364 then :
10365
10366 else $as_nop
10367   # This test program should compile successfully.
10368         # No library function is consistently available on
10369         # freestanding implementations, so test against a dummy
10370         # declaration.  Include always-available headers on the
10371         # off chance that they somehow elicit warnings.
10372         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10373 /* end confdefs.h.  */
10374 #include <float.h>
10375 #include <limits.h>
10376 #include <stdarg.h>
10377 #include <stddef.h>
10378 extern void ac_decl (int, char *);
10379
10380 int
10381 main (void)
10382 {
10383 (void) ac_decl (0, (char *) 0);
10384   (void) ac_decl;
10385
10386   ;
10387   return 0;
10388 }
10389 _ACEOF
10390 if ac_fn_c_try_compile "$LINENO"
10391 then :
10392   if test x"$ac_arg" = x
10393 then :
10394   ac_cv_c_undeclared_builtin_options='none needed'
10395 else $as_nop
10396   ac_cv_c_undeclared_builtin_options=$ac_arg
10397 fi
10398           break
10399 fi
10400 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10401 fi
10402 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10403     done
10404     CFLAGS=$ac_save_CFLAGS
10405
10406 fi
10407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10408 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10409   case $ac_cv_c_undeclared_builtin_options in #(
10410   'cannot detect') :
10411     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10412 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10413 as_fn_error $? "cannot make $CC report undeclared builtins
10414 See \`config.log' for more details" "$LINENO" 5; } ;; #(
10415   'none needed') :
10416     ac_c_undeclared_builtin_options='' ;; #(
10417   *) :
10418     ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10419 esac
10420
10421 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
10422 if test "x$ac_cv_have_decl_strerror_r" = xyes
10423 then :
10424   ac_have_decl=1
10425 else $as_nop
10426   ac_have_decl=0
10427 fi
10428 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
10429
10430
10431 if test $ac_cv_have_decl_strerror_r = yes; then
10432   # For backward compatibility's sake, define HAVE_STRERROR_R.
10433   # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
10434   # as AC_CHECK_DECLS_ONCE.)
10435
10436 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
10437
10438 fi
10439
10440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10441 printf %s "checking whether strerror_r returns char *... " >&6; }
10442 if test ${ac_cv_func_strerror_r_char_p+y}
10443 then :
10444   printf %s "(cached) " >&6
10445 else $as_nop
10446
10447     ac_cv_func_strerror_r_char_p=no
10448     if test $ac_cv_have_decl_strerror_r = yes; then
10449       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10450 /* end confdefs.h.  */
10451 #include <string.h>
10452 int
10453 main (void)
10454 {
10455
10456           char buf[100];
10457           char x = *strerror_r (0, buf, sizeof buf);
10458           char *p = strerror_r (0, buf, sizeof buf);
10459           return !p || x;
10460
10461   ;
10462   return 0;
10463 }
10464 _ACEOF
10465 if ac_fn_c_try_compile "$LINENO"
10466 then :
10467   ac_cv_func_strerror_r_char_p=yes
10468 fi
10469 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10470
10471     fi
10472
10473 fi
10474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10475 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
10476 if test $ac_cv_func_strerror_r_char_p = yes; then
10477
10478 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10479
10480 fi
10481
10482
10483   XGETTEXT_EXTRA_OPTIONS=
10484
10485
10486
10487
10488
10489     HAVE_FCNTL=1;
10490   HAVE_OPENAT=1;
10491   REPLACE_CREAT=0;
10492   REPLACE_FCNTL=0;
10493   REPLACE_OPEN=0;
10494   REPLACE_OPENAT=0;
10495
10496
10497
10498
10499   GL_GNULIB_CREAT=0
10500
10501
10502
10503   GL_GNULIB_FCNTL=0
10504
10505
10506
10507   GL_GNULIB_NONBLOCKING=0
10508
10509
10510
10511   GL_GNULIB_OPEN=0
10512
10513
10514
10515   GL_GNULIB_OPENAT=0
10516
10517
10518
10519   GL_GNULIB_MDA_CREAT=1
10520
10521
10522
10523   GL_GNULIB_MDA_OPEN=1
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10534 printf %s "checking for working fcntl.h... " >&6; }
10535 if test ${gl_cv_header_working_fcntl_h+y}
10536 then :
10537   printf %s "(cached) " >&6
10538 else $as_nop
10539   if test "$cross_compiling" = yes
10540 then :
10541   case "$host_os" in
10542                   # Guess 'no' on native Windows.
10543           mingw*) gl_cv_header_working_fcntl_h='no' ;;
10544           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
10545         esac
10546
10547 else $as_nop
10548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549 /* end confdefs.h.  */
10550 #include <sys/types.h>
10551            #include <sys/stat.h>
10552            #if HAVE_UNISTD_H
10553            # include <unistd.h>
10554            #else /* on Windows with MSVC */
10555            # include <io.h>
10556            # include <stdlib.h>
10557            # defined sleep(n) _sleep ((n) * 1000)
10558            #endif
10559            #include <fcntl.h>
10560
10561
10562 $gl_mda_defines
10563
10564            #ifndef O_NOATIME
10565             #define O_NOATIME 0
10566            #endif
10567            #ifndef O_NOFOLLOW
10568             #define O_NOFOLLOW 0
10569            #endif
10570            static int const constants[] =
10571             {
10572               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10573               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10574             };
10575
10576 int
10577 main (void)
10578 {
10579
10580             int result = !constants;
10581             #if HAVE_SYMLINK
10582             {
10583               static char const sym[] = "conftest.sym";
10584               if (symlink ("/dev/null", sym) != 0)
10585                 result |= 2;
10586               else
10587                 {
10588                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10589                   if (fd >= 0)
10590                     {
10591                       close (fd);
10592                       result |= 4;
10593                     }
10594                 }
10595               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10596                 result |= 2;
10597               else
10598                 {
10599                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10600                   if (fd >= 0)
10601                     {
10602                       close (fd);
10603                       result |= 4;
10604                     }
10605                 }
10606               unlink (sym);
10607             }
10608             #endif
10609             {
10610               static char const file[] = "confdefs.h";
10611               int fd = open (file, O_RDONLY | O_NOATIME);
10612               if (fd < 0)
10613                 result |= 8;
10614               else
10615                 {
10616                   struct stat st0;
10617                   if (fstat (fd, &st0) != 0)
10618                     result |= 16;
10619                   else
10620                     {
10621                       char c;
10622                       sleep (1);
10623                       if (read (fd, &c, 1) != 1)
10624                         result |= 24;
10625                       else
10626                         {
10627                           if (close (fd) != 0)
10628                             result |= 32;
10629                           else
10630                             {
10631                               struct stat st1;
10632                               if (stat (file, &st1) != 0)
10633                                 result |= 40;
10634                               else
10635                                 if (st0.st_atime != st1.st_atime)
10636                                   result |= 64;
10637                             }
10638                         }
10639                     }
10640                 }
10641             }
10642             return result;
10643   ;
10644   return 0;
10645 }
10646 _ACEOF
10647 if ac_fn_c_try_run "$LINENO"
10648 then :
10649   gl_cv_header_working_fcntl_h=yes
10650 else $as_nop
10651   case $? in #(
10652         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10653         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10654         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10655          *) gl_cv_header_working_fcntl_h='no';;
10656         esac
10657 fi
10658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10659   conftest.$ac_objext conftest.beam conftest.$ac_ext
10660 fi
10661
10662
10663 fi
10664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10665 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
10666
10667   case $gl_cv_header_working_fcntl_h in #(
10668   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10669   *) ac_val=1;;
10670   esac
10671
10672 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
10673
10674
10675   case $gl_cv_header_working_fcntl_h in #(
10676   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10677   *) ac_val=1;;
10678   esac
10679
10680 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
10681
10682
10683
10684   ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
10685 "
10686 if test "x$ac_cv_type_pid_t" = xyes
10687 then :
10688
10689 else $as_nop
10690                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691 /* end confdefs.h.  */
10692
10693           #if defined _WIN64 && !defined __CYGWIN__
10694           LLP64
10695           #endif
10696
10697 int
10698 main (void)
10699 {
10700
10701   ;
10702   return 0;
10703 }
10704
10705 _ACEOF
10706 if ac_fn_c_try_compile "$LINENO"
10707 then :
10708   ac_pid_type='int'
10709 else $as_nop
10710   ac_pid_type='__int64'
10711 fi
10712 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10713
10714 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
10715
10716
10717 fi
10718
10719
10720 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10721 if test "x$ac_cv_type_mode_t" = xyes
10722 then :
10723
10724 else $as_nop
10725
10726 printf "%s\n" "#define mode_t int" >>confdefs.h
10727
10728 fi
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741      if test $gl_cv_have_include_next = yes; then
10742        gl_cv_next_fcntl_h='<'fcntl.h'>'
10743      else
10744        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
10745 printf %s "checking absolute name of <fcntl.h>... " >&6; }
10746 if test ${gl_cv_next_fcntl_h+y}
10747 then :
10748   printf %s "(cached) " >&6
10749 else $as_nop
10750
10751
10752
10753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754 /* end confdefs.h.  */
10755 #include <fcntl.h>
10756 _ACEOF
10757                 case "$host_os" in
10758     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10759     *)    gl_absname_cpp="$ac_cpp" ;;
10760   esac
10761
10762   case "$host_os" in
10763     mingw*)
10764                                           gl_dirsep_regex='[/\\]'
10765       ;;
10766     *)
10767       gl_dirsep_regex='\/'
10768       ;;
10769   esac
10770       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10771   gl_header_literal_regex=`echo 'fcntl.h' \
10772                            | sed -e "$gl_make_literal_regex_sed"`
10773   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10774       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10775       s|^/[^/]|//&|
10776       p
10777       q
10778     }'
10779
10780         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10781   sed -n "$gl_absolute_header_sed"`
10782
10783            gl_header=$gl_cv_absolute_fcntl_h
10784            gl_cv_next_fcntl_h='"'$gl_header'"'
10785
10786
10787 fi
10788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
10789 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
10790      fi
10791      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
10792
10793      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10794        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10795        gl_next_as_first_directive='<'fcntl.h'>'
10796      else
10797        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10798        gl_next_as_first_directive=$gl_cv_next_fcntl_h
10799      fi
10800      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819     HAVE_FNMATCH=1;
10820   REPLACE_FNMATCH=0;
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836      if test $gl_cv_have_include_next = yes; then
10837        gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10838      else
10839        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
10840 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
10841 if test ${gl_cv_next_fnmatch_h+y}
10842 then :
10843   printf %s "(cached) " >&6
10844 else $as_nop
10845
10846              if test $ac_cv_header_fnmatch_h = yes; then
10847
10848
10849
10850
10851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852 /* end confdefs.h.  */
10853 #include <fnmatch.h>
10854 _ACEOF
10855                 case "$host_os" in
10856     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10857     *)    gl_absname_cpp="$ac_cpp" ;;
10858   esac
10859
10860   case "$host_os" in
10861     mingw*)
10862                                           gl_dirsep_regex='[/\\]'
10863       ;;
10864     *)
10865       gl_dirsep_regex='\/'
10866       ;;
10867   esac
10868       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10869   gl_header_literal_regex=`echo 'fnmatch.h' \
10870                            | sed -e "$gl_make_literal_regex_sed"`
10871   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10872       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10873       s|^/[^/]|//&|
10874       p
10875       q
10876     }'
10877
10878         gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10879   sed -n "$gl_absolute_header_sed"`
10880
10881            gl_header=$gl_cv_absolute_fnmatch_h
10882            gl_cv_next_fnmatch_h='"'$gl_header'"'
10883           else
10884                gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10885              fi
10886
10887
10888 fi
10889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
10890 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
10891      fi
10892      NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
10893
10894      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10895        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10896        gl_next_as_first_directive='<'fnmatch.h'>'
10897      else
10898        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10899        gl_next_as_first_directive=$gl_cv_next_fnmatch_h
10900      fi
10901      NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
10902
10903
10904
10905
10906
10907
10908
10909   if test $ac_cv_header_fnmatch_h = yes; then
10910     HAVE_FNMATCH_H=1
10911   else
10912     HAVE_FNMATCH_H=0
10913   fi
10914
10915
10916   FNMATCH_H=''
10917      if false; then
10918               FNMATCH_H=fnmatch.h
10919      else
10920        if test $ac_cv_header_fnmatch_h != yes; then
10921                   FNMATCH_H=fnmatch.h
10922        fi
10923      fi
10924
10925
10926    if test -n "$FNMATCH_H"; then
10927   GL_GENERATE_FNMATCH_H_TRUE=
10928   GL_GENERATE_FNMATCH_H_FALSE='#'
10929 else
10930   GL_GENERATE_FNMATCH_H_TRUE='#'
10931   GL_GENERATE_FNMATCH_H_FALSE=
10932 fi
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942   GL_GNULIB_FNMATCH=0
10943
10944
10945
10946
10947
10948    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10949 printf %s "checking for mbstate_t... " >&6; }
10950 if test ${ac_cv_type_mbstate_t+y}
10951 then :
10952   printf %s "(cached) " >&6
10953 else $as_nop
10954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10955 /* end confdefs.h.  */
10956 $ac_includes_default
10957              #include <wchar.h>
10958 int
10959 main (void)
10960 {
10961 mbstate_t x; return sizeof x;
10962   ;
10963   return 0;
10964 }
10965 _ACEOF
10966 if ac_fn_c_try_compile "$LINENO"
10967 then :
10968   ac_cv_type_mbstate_t=yes
10969 else $as_nop
10970   ac_cv_type_mbstate_t=no
10971 fi
10972 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10973 fi
10974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10975 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
10976    if test $ac_cv_type_mbstate_t = yes; then
10977
10978 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
10979
10980    else
10981
10982 printf "%s\n" "#define mbstate_t int" >>confdefs.h
10983
10984    fi
10985
10986
10987
10988     HAVE_DECL_FCLOSEALL=1;
10989   HAVE_DECL_FPURGE=1;
10990   HAVE_DECL_FSEEKO=1;
10991   HAVE_DECL_FTELLO=1;
10992   HAVE_DECL_GETDELIM=1;
10993   HAVE_DECL_GETLINE=1;
10994   HAVE_DECL_OBSTACK_PRINTF=1;
10995   HAVE_DECL_SNPRINTF=1;
10996   HAVE_DECL_VSNPRINTF=1;
10997   HAVE_DPRINTF=1;
10998   HAVE_FSEEKO=1;
10999   HAVE_FTELLO=1;
11000   HAVE_PCLOSE=1;
11001   HAVE_POPEN=1;
11002   HAVE_RENAMEAT=1;
11003   HAVE_VASPRINTF=1;
11004   HAVE_VDPRINTF=1;
11005   REPLACE_DPRINTF=0;
11006   REPLACE_FCLOSE=0;
11007   REPLACE_FDOPEN=0;
11008   REPLACE_FFLUSH=0;
11009   REPLACE_FOPEN=0;
11010   REPLACE_FPRINTF=0;
11011   REPLACE_FPURGE=0;
11012   REPLACE_FREOPEN=0;
11013   REPLACE_FSEEK=0;
11014   REPLACE_FSEEKO=0;
11015   REPLACE_FTELL=0;
11016   REPLACE_FTELLO=0;
11017   REPLACE_GETDELIM=0;
11018   REPLACE_GETLINE=0;
11019   REPLACE_OBSTACK_PRINTF=0;
11020   REPLACE_PERROR=0;
11021   REPLACE_POPEN=0;
11022   REPLACE_PRINTF=0;
11023   REPLACE_REMOVE=0;
11024   REPLACE_RENAME=0;
11025   REPLACE_RENAMEAT=0;
11026   REPLACE_SNPRINTF=0;
11027   REPLACE_SPRINTF=0;
11028   REPLACE_STDIO_READ_FUNCS=0;
11029   REPLACE_STDIO_WRITE_FUNCS=0;
11030   REPLACE_TMPFILE=0;
11031   REPLACE_VASPRINTF=0;
11032   REPLACE_VDPRINTF=0;
11033   REPLACE_VFPRINTF=0;
11034   REPLACE_VPRINTF=0;
11035   REPLACE_VSNPRINTF=0;
11036   REPLACE_VSPRINTF=0;
11037
11038
11039
11040   GL_GNULIB_DPRINTF=0
11041
11042
11043
11044   GL_GNULIB_FCLOSE=0
11045
11046
11047
11048   GL_GNULIB_FDOPEN=0
11049
11050
11051
11052   GL_GNULIB_FFLUSH=0
11053
11054
11055
11056   GL_GNULIB_FGETC=0
11057
11058
11059
11060   GL_GNULIB_FGETS=0
11061
11062
11063
11064   GL_GNULIB_FOPEN=0
11065
11066
11067
11068   GL_GNULIB_FPRINTF=0
11069
11070
11071
11072   GL_GNULIB_FPRINTF_POSIX=0
11073
11074
11075
11076   GL_GNULIB_FPURGE=0
11077
11078
11079
11080   GL_GNULIB_FPUTC=0
11081
11082
11083
11084   GL_GNULIB_FPUTS=0
11085
11086
11087
11088   GL_GNULIB_FREAD=0
11089
11090
11091
11092   GL_GNULIB_FREOPEN=0
11093
11094
11095
11096   GL_GNULIB_FSCANF=0
11097
11098
11099
11100   GL_GNULIB_FSEEK=0
11101
11102
11103
11104   GL_GNULIB_FSEEKO=0
11105
11106
11107
11108   GL_GNULIB_FTELL=0
11109
11110
11111
11112   GL_GNULIB_FTELLO=0
11113
11114
11115
11116   GL_GNULIB_FWRITE=0
11117
11118
11119
11120   GL_GNULIB_GETC=0
11121
11122
11123
11124   GL_GNULIB_GETCHAR=0
11125
11126
11127
11128   GL_GNULIB_GETDELIM=0
11129
11130
11131
11132   GL_GNULIB_GETLINE=0
11133
11134
11135
11136   GL_GNULIB_OBSTACK_PRINTF=0
11137
11138
11139
11140   GL_GNULIB_OBSTACK_PRINTF_POSIX=0
11141
11142
11143
11144   GL_GNULIB_PCLOSE=0
11145
11146
11147
11148   GL_GNULIB_PERROR=0
11149
11150
11151
11152   GL_GNULIB_POPEN=0
11153
11154
11155
11156   GL_GNULIB_PRINTF=0
11157
11158
11159
11160   GL_GNULIB_PRINTF_POSIX=0
11161
11162
11163
11164   GL_GNULIB_PUTC=0
11165
11166
11167
11168   GL_GNULIB_PUTCHAR=0
11169
11170
11171
11172   GL_GNULIB_PUTS=0
11173
11174
11175
11176   GL_GNULIB_REMOVE=0
11177
11178
11179
11180   GL_GNULIB_RENAME=0
11181
11182
11183
11184   GL_GNULIB_RENAMEAT=0
11185
11186
11187
11188   GL_GNULIB_SCANF=0
11189
11190
11191
11192   GL_GNULIB_SNPRINTF=0
11193
11194
11195
11196   GL_GNULIB_SPRINTF_POSIX=0
11197
11198
11199
11200   GL_GNULIB_STDIO_H_NONBLOCKING=0
11201
11202
11203
11204   GL_GNULIB_STDIO_H_SIGPIPE=0
11205
11206
11207
11208   GL_GNULIB_TMPFILE=0
11209
11210
11211
11212   GL_GNULIB_VASPRINTF=0
11213
11214
11215
11216   GL_GNULIB_VFSCANF=0
11217
11218
11219
11220   GL_GNULIB_VSCANF=0
11221
11222
11223
11224   GL_GNULIB_VDPRINTF=0
11225
11226
11227
11228   GL_GNULIB_VFPRINTF=0
11229
11230
11231
11232   GL_GNULIB_VFPRINTF_POSIX=0
11233
11234
11235
11236   GL_GNULIB_VPRINTF=0
11237
11238
11239
11240   GL_GNULIB_VPRINTF_POSIX=0
11241
11242
11243
11244   GL_GNULIB_VSNPRINTF=0
11245
11246
11247
11248   GL_GNULIB_VSPRINTF_POSIX=0
11249
11250
11251
11252   GL_GNULIB_MDA_FCLOSEALL=1
11253
11254
11255
11256   GL_GNULIB_MDA_FDOPEN=1
11257
11258
11259
11260   GL_GNULIB_MDA_FILENO=1
11261
11262
11263
11264   GL_GNULIB_MDA_GETW=1
11265
11266
11267
11268   GL_GNULIB_MDA_PUTW=1
11269
11270
11271
11272   GL_GNULIB_MDA_TEMPNAM=1
11273
11274
11275
11276
11277     HAVE_FCHMODAT=1;
11278   HAVE_FSTATAT=1;
11279   HAVE_FUTIMENS=1;
11280   HAVE_GETUMASK=1;
11281   HAVE_LCHMOD=1;
11282   HAVE_LSTAT=1;
11283   HAVE_MKDIRAT=1;
11284   HAVE_MKFIFO=1;
11285   HAVE_MKFIFOAT=1;
11286   HAVE_MKNOD=1;
11287   HAVE_MKNODAT=1;
11288   HAVE_UTIMENSAT=1;
11289   REPLACE_FCHMODAT=0;
11290   REPLACE_FSTAT=0;
11291   REPLACE_FSTATAT=0;
11292   REPLACE_FUTIMENS=0;
11293   REPLACE_LSTAT=0;
11294   REPLACE_MKDIR=0;
11295   REPLACE_MKFIFO=0;
11296   REPLACE_MKFIFOAT=0;
11297   REPLACE_MKNOD=0;
11298   REPLACE_MKNODAT=0;
11299   REPLACE_STAT=0;
11300   REPLACE_UTIMENSAT=0;
11301
11302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11303 printf %s "checking whether stat file-mode macros are broken... " >&6; }
11304 if test ${ac_cv_header_stat_broken+y}
11305 then :
11306   printf %s "(cached) " >&6
11307 else $as_nop
11308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h.  */
11310 #include <sys/types.h>
11311 #include <sys/stat.h>
11312
11313 #if defined S_ISBLK && defined S_IFDIR
11314 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11315 #endif
11316
11317 #if defined S_ISBLK && defined S_IFCHR
11318 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11319 #endif
11320
11321 #if defined S_ISLNK && defined S_IFREG
11322 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11323 #endif
11324
11325 #if defined S_ISSOCK && defined S_IFREG
11326 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11327 #endif
11328
11329 _ACEOF
11330 if ac_fn_c_try_compile "$LINENO"
11331 then :
11332   ac_cv_header_stat_broken=no
11333 else $as_nop
11334   ac_cv_header_stat_broken=yes
11335 fi
11336 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11337 fi
11338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11339 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
11340 if test $ac_cv_header_stat_broken = yes; then
11341
11342 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11343
11344 fi
11345
11346
11347
11348   case "$host_os" in
11349     mingw*)
11350                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11351 printf %s "checking for 64-bit off_t... " >&6; }
11352 if test ${gl_cv_type_off_t_64+y}
11353 then :
11354   printf %s "(cached) " >&6
11355 else $as_nop
11356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357 /* end confdefs.h.  */
11358 #include <sys/types.h>
11359                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11360
11361 int
11362 main (void)
11363 {
11364
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 if ac_fn_c_try_compile "$LINENO"
11370 then :
11371   gl_cv_type_off_t_64=yes
11372 else $as_nop
11373   gl_cv_type_off_t_64=no
11374 fi
11375 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11376
11377 fi
11378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11379 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
11380       if test $gl_cv_type_off_t_64 = no; then
11381         WINDOWS_64_BIT_OFF_T=1
11382       else
11383         WINDOWS_64_BIT_OFF_T=0
11384       fi
11385                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
11386 printf %s "checking for 64-bit st_size... " >&6; }
11387 if test ${gl_cv_member_st_size_64+y}
11388 then :
11389   printf %s "(cached) " >&6
11390 else $as_nop
11391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392 /* end confdefs.h.  */
11393 #include <sys/types.h>
11394                 struct stat buf;
11395                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
11396
11397 int
11398 main (void)
11399 {
11400
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 if ac_fn_c_try_compile "$LINENO"
11406 then :
11407   gl_cv_member_st_size_64=yes
11408 else $as_nop
11409   gl_cv_member_st_size_64=no
11410 fi
11411 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11412
11413 fi
11414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11415 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
11416       if test $gl_cv_member_st_size_64 = no; then
11417         WINDOWS_64_BIT_ST_SIZE=1
11418       else
11419         WINDOWS_64_BIT_ST_SIZE=0
11420       fi
11421       ;;
11422     *)
11423                                                       WINDOWS_64_BIT_OFF_T=0
11424       WINDOWS_64_BIT_ST_SIZE=0
11425       ;;
11426   esac
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442      if test $gl_cv_have_include_next = yes; then
11443        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11444      else
11445        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11446 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
11447 if test ${gl_cv_next_sys_stat_h+y}
11448 then :
11449   printf %s "(cached) " >&6
11450 else $as_nop
11451
11452              if test $ac_cv_header_sys_stat_h = yes; then
11453
11454
11455
11456
11457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458 /* end confdefs.h.  */
11459 #include <sys/stat.h>
11460 _ACEOF
11461                 case "$host_os" in
11462     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11463     *)    gl_absname_cpp="$ac_cpp" ;;
11464   esac
11465
11466   case "$host_os" in
11467     mingw*)
11468                                           gl_dirsep_regex='[/\\]'
11469       ;;
11470     *)
11471       gl_dirsep_regex='\/'
11472       ;;
11473   esac
11474       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11475   gl_header_literal_regex=`echo 'sys/stat.h' \
11476                            | sed -e "$gl_make_literal_regex_sed"`
11477   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11478       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11479       s|^/[^/]|//&|
11480       p
11481       q
11482     }'
11483
11484         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11485   sed -n "$gl_absolute_header_sed"`
11486
11487            gl_header=$gl_cv_absolute_sys_stat_h
11488            gl_cv_next_sys_stat_h='"'$gl_header'"'
11489           else
11490                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11491              fi
11492
11493
11494 fi
11495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11496 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
11497      fi
11498      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11499
11500      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11501        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11502        gl_next_as_first_directive='<'sys/stat.h'>'
11503      else
11504        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11505        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11506      fi
11507      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11508
11509
11510
11511
11512
11513
11514
11515
11516     WINDOWS_STAT_TIMESPEC=0
11517
11518
11519
11520
11521
11522
11523
11524
11525       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11526      #include <sys/stat.h>
11527 "
11528 if test "x$ac_cv_type_nlink_t" = xyes
11529 then :
11530
11531 else $as_nop
11532
11533 printf "%s\n" "#define nlink_t int" >>confdefs.h
11534
11535 fi
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546   case "$host_os" in
11547     mingw*)
11548       ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
11549 if test "x$ac_cv_header_sdkddkver_h" = xyes
11550 then :
11551   printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
11552
11553 fi
11554
11555       ;;
11556   esac
11557
11558
11559
11560
11561
11562
11563
11564   GL_GNULIB_FCHMODAT=0
11565
11566
11567
11568   GL_GNULIB_FSTAT=0
11569
11570
11571
11572   GL_GNULIB_FSTATAT=0
11573
11574
11575
11576   GL_GNULIB_FUTIMENS=0
11577
11578
11579
11580   GL_GNULIB_GETUMASK=0
11581
11582
11583
11584   GL_GNULIB_LCHMOD=0
11585
11586
11587
11588   GL_GNULIB_LSTAT=0
11589
11590
11591
11592   GL_GNULIB_MKDIR=0
11593
11594
11595
11596   GL_GNULIB_MKDIRAT=0
11597
11598
11599
11600   GL_GNULIB_MKFIFO=0
11601
11602
11603
11604   GL_GNULIB_MKFIFOAT=0
11605
11606
11607
11608   GL_GNULIB_MKNOD=0
11609
11610
11611
11612   GL_GNULIB_MKNODAT=0
11613
11614
11615
11616   GL_GNULIB_STAT=0
11617
11618
11619
11620   GL_GNULIB_UTIMENSAT=0
11621
11622
11623
11624   GL_GNULIB_OVERRIDES_STRUCT_STAT=0
11625
11626
11627
11628   GL_GNULIB_MDA_CHMOD=1
11629
11630
11631
11632   GL_GNULIB_MDA_MKDIR=1
11633
11634
11635
11636   GL_GNULIB_MDA_UMASK=1
11637
11638
11639
11640
11641 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
11642 if test "x$ac_cv_have_decl_getdtablesize" = xyes
11643 then :
11644   ac_have_decl=1
11645 else $as_nop
11646   ac_have_decl=0
11647 fi
11648 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664      if test $gl_cv_have_include_next = yes; then
11665        gl_cv_next_getopt_h='<'getopt.h'>'
11666      else
11667        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11668 printf %s "checking absolute name of <getopt.h>... " >&6; }
11669 if test ${gl_cv_next_getopt_h+y}
11670 then :
11671   printf %s "(cached) " >&6
11672 else $as_nop
11673
11674              if test $ac_cv_header_getopt_h = yes; then
11675
11676
11677
11678
11679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680 /* end confdefs.h.  */
11681 #include <getopt.h>
11682 _ACEOF
11683                 case "$host_os" in
11684     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11685     *)    gl_absname_cpp="$ac_cpp" ;;
11686   esac
11687
11688   case "$host_os" in
11689     mingw*)
11690                                           gl_dirsep_regex='[/\\]'
11691       ;;
11692     *)
11693       gl_dirsep_regex='\/'
11694       ;;
11695   esac
11696       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11697   gl_header_literal_regex=`echo 'getopt.h' \
11698                            | sed -e "$gl_make_literal_regex_sed"`
11699   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11700       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11701       s|^/[^/]|//&|
11702       p
11703       q
11704     }'
11705
11706         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11707   sed -n "$gl_absolute_header_sed"`
11708
11709            gl_header=$gl_cv_absolute_getopt_h
11710            gl_cv_next_getopt_h='"'$gl_header'"'
11711           else
11712                gl_cv_next_getopt_h='<'getopt.h'>'
11713              fi
11714
11715
11716 fi
11717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11718 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
11719      fi
11720      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11721
11722      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11723        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11724        gl_next_as_first_directive='<'getopt.h'>'
11725      else
11726        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11727        gl_next_as_first_directive=$gl_cv_next_getopt_h
11728      fi
11729      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11730
11731
11732
11733
11734   if test $ac_cv_header_getopt_h = yes; then
11735     HAVE_GETOPT_H=1
11736   else
11737     HAVE_GETOPT_H=0
11738   fi
11739
11740
11741   gl_replace_getopt=
11742
11743     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11744            for ac_header in getopt.h
11745 do :
11746   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11747 if test "x$ac_cv_header_getopt_h" = xyes
11748 then :
11749   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
11750
11751 else $as_nop
11752   gl_replace_getopt=yes
11753 fi
11754
11755 done
11756   fi
11757
11758     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11759
11760   for ac_func in getopt_long_only
11761 do :
11762   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11763 if test "x$ac_cv_func_getopt_long_only" = xyes
11764 then :
11765   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
11766
11767 else $as_nop
11768   gl_replace_getopt=yes
11769 fi
11770
11771 done
11772   fi
11773
11774           if test -z "$gl_replace_getopt"; then
11775     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11776 printf %s "checking whether getopt is POSIX compatible... " >&6; }
11777 if test ${gl_cv_func_getopt_posix+y}
11778 then :
11779   printf %s "(cached) " >&6
11780 else $as_nop
11781
11782                                                 if test $cross_compiling = no; then
11783                               if test "$cross_compiling" = yes
11784 then :
11785   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11786 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11787 as_fn_error $? "cannot run test program while cross compiling
11788 See \`config.log' for more details" "$LINENO" 5; }
11789 else $as_nop
11790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791 /* end confdefs.h.  */
11792
11793 #include <unistd.h>
11794 #include <stdlib.h>
11795 #include <string.h>
11796
11797 int
11798 main ()
11799 {
11800   static char program[] = "program";
11801   static char a[] = "-a";
11802   static char foo[] = "foo";
11803   static char bar[] = "bar";
11804   char *argv[] = { program, a, foo, bar, NULL };
11805   int c;
11806
11807   c = getopt (4, argv, "ab");
11808   if (!(c == 'a'))
11809     return 1;
11810   c = getopt (4, argv, "ab");
11811   if (!(c == -1))
11812     return 2;
11813   if (!(optind == 2))
11814     return 3;
11815   return 0;
11816 }
11817
11818 _ACEOF
11819 if ac_fn_c_try_run "$LINENO"
11820 then :
11821   gl_cv_func_getopt_posix=maybe
11822 else $as_nop
11823   gl_cv_func_getopt_posix=no
11824 fi
11825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11826   conftest.$ac_objext conftest.beam conftest.$ac_ext
11827 fi
11828
11829           if test $gl_cv_func_getopt_posix = maybe; then
11830                                     if test "$cross_compiling" = yes
11831 then :
11832   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11833 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11834 as_fn_error $? "cannot run test program while cross compiling
11835 See \`config.log' for more details" "$LINENO" 5; }
11836 else $as_nop
11837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11838 /* end confdefs.h.  */
11839
11840 #include <unistd.h>
11841 #include <stdlib.h>
11842 #include <string.h>
11843
11844 int
11845 main ()
11846 {
11847   static char program[] = "program";
11848   static char donald[] = "donald";
11849   static char p[] = "-p";
11850   static char billy[] = "billy";
11851   static char duck[] = "duck";
11852   static char a[] = "-a";
11853   static char bar[] = "bar";
11854   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11855   int c;
11856
11857   c = getopt (7, argv, "+abp:q:");
11858   if (!(c == -1))
11859     return 4;
11860   if (!(strcmp (argv[0], "program") == 0))
11861     return 5;
11862   if (!(strcmp (argv[1], "donald") == 0))
11863     return 6;
11864   if (!(strcmp (argv[2], "-p") == 0))
11865     return 7;
11866   if (!(strcmp (argv[3], "billy") == 0))
11867     return 8;
11868   if (!(strcmp (argv[4], "duck") == 0))
11869     return 9;
11870   if (!(strcmp (argv[5], "-a") == 0))
11871     return 10;
11872   if (!(strcmp (argv[6], "bar") == 0))
11873     return 11;
11874   if (!(optind == 1))
11875     return 12;
11876   return 0;
11877 }
11878
11879 _ACEOF
11880 if ac_fn_c_try_run "$LINENO"
11881 then :
11882   gl_cv_func_getopt_posix=maybe
11883 else $as_nop
11884   gl_cv_func_getopt_posix=no
11885 fi
11886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11887   conftest.$ac_objext conftest.beam conftest.$ac_ext
11888 fi
11889
11890           fi
11891           if test $gl_cv_func_getopt_posix = maybe; then
11892                         if test "$cross_compiling" = yes
11893 then :
11894   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11895 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11896 as_fn_error $? "cannot run test program while cross compiling
11897 See \`config.log' for more details" "$LINENO" 5; }
11898 else $as_nop
11899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11900 /* end confdefs.h.  */
11901
11902 #include <unistd.h>
11903 #include <stdlib.h>
11904 #include <string.h>
11905
11906 int
11907 main ()
11908 {
11909   static char program[] = "program";
11910   static char ab[] = "-ab";
11911   char *argv[3] = { program, ab, NULL };
11912   if (getopt (2, argv, "ab:") != 'a')
11913     return 13;
11914   if (getopt (2, argv, "ab:") != '?')
11915     return 14;
11916   if (optopt != 'b')
11917     return 15;
11918   if (optind != 2)
11919     return 16;
11920   return 0;
11921 }
11922
11923 _ACEOF
11924 if ac_fn_c_try_run "$LINENO"
11925 then :
11926   gl_cv_func_getopt_posix=yes
11927 else $as_nop
11928   gl_cv_func_getopt_posix=no
11929 fi
11930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11931   conftest.$ac_objext conftest.beam conftest.$ac_ext
11932 fi
11933
11934           fi
11935         else
11936           case "$host_os" in
11937             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11938             *)                       gl_cv_func_getopt_posix="guessing yes";;
11939           esac
11940         fi
11941
11942 fi
11943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11944 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
11945     case "$gl_cv_func_getopt_posix" in
11946       *no) gl_replace_getopt=yes ;;
11947     esac
11948   fi
11949
11950   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11951     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11952 printf %s "checking for working GNU getopt function... " >&6; }
11953 if test ${gl_cv_func_getopt_gnu+y}
11954 then :
11955   printf %s "(cached) " >&6
11956 else $as_nop
11957   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11958        # optstring is necessary for programs like m4 that have POSIX-mandated
11959        # semantics for supporting options interspersed with files.
11960        # Also, since getopt_long is a GNU extension, we require optind=0.
11961        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11962        # so take care to revert to the correct (non-)export state.
11963        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11964        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11965          xx) gl_had_POSIXLY_CORRECT=exported ;;
11966          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11967          *)  gl_had_POSIXLY_CORRECT=         ;;
11968        esac
11969        POSIXLY_CORRECT=1
11970        export POSIXLY_CORRECT
11971        if test "$cross_compiling" = yes
11972 then :
11973                              gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
11974
11975 else $as_nop
11976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977 /* end confdefs.h.  */
11978 #include <getopt.h>
11979                            #include <stddef.h>
11980                            #include <string.h>
11981
11982 #include <stdlib.h>
11983 #if defined __MACH__ && defined __APPLE__
11984 /* Avoid a crash on Mac OS X.  */
11985 #include <mach/mach.h>
11986 #include <mach/mach_error.h>
11987 #include <mach/thread_status.h>
11988 #include <mach/exception.h>
11989 #include <mach/task.h>
11990 #include <pthread.h>
11991 /* The exception port on which our thread listens.  */
11992 static mach_port_t our_exception_port;
11993 /* The main function of the thread listening for exceptions of type
11994    EXC_BAD_ACCESS.  */
11995 static void *
11996 mach_exception_thread (void *arg)
11997 {
11998   /* Buffer for a message to be received.  */
11999   struct {
12000     mach_msg_header_t head;
12001     mach_msg_body_t msgh_body;
12002     char data[1024];
12003   } msg;
12004   mach_msg_return_t retval;
12005   /* Wait for a message on the exception port.  */
12006   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12007                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12008   if (retval != MACH_MSG_SUCCESS)
12009     abort ();
12010   exit (1);
12011 }
12012 static void
12013 nocrash_init (void)
12014 {
12015   mach_port_t self = mach_task_self ();
12016   /* Allocate a port on which the thread shall listen for exceptions.  */
12017   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12018       == KERN_SUCCESS) {
12019     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12020     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12021                                 MACH_MSG_TYPE_MAKE_SEND)
12022         == KERN_SUCCESS) {
12023       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12024          for us.  */
12025       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12026       /* Create the thread listening on the exception port.  */
12027       pthread_attr_t attr;
12028       pthread_t thread;
12029       if (pthread_attr_init (&attr) == 0
12030           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12031           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12032         pthread_attr_destroy (&attr);
12033         /* Replace the exception port info for these exceptions with our own.
12034            Note that we replace the exception port for the entire task, not only
12035            for a particular thread.  This has the effect that when our exception
12036            port gets the message, the thread specific exception port has already
12037            been asked, and we don't need to bother about it.
12038            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12039         task_set_exception_ports (self, mask, our_exception_port,
12040                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12041       }
12042     }
12043   }
12044 }
12045 #elif defined _WIN32 && ! defined __CYGWIN__
12046 /* Avoid a crash on native Windows.  */
12047 #define WIN32_LEAN_AND_MEAN
12048 #include <windows.h>
12049 #include <winerror.h>
12050 static LONG WINAPI
12051 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12052 {
12053   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12054     {
12055     case EXCEPTION_ACCESS_VIOLATION:
12056     case EXCEPTION_IN_PAGE_ERROR:
12057     case EXCEPTION_STACK_OVERFLOW:
12058     case EXCEPTION_GUARD_PAGE:
12059     case EXCEPTION_PRIV_INSTRUCTION:
12060     case EXCEPTION_ILLEGAL_INSTRUCTION:
12061     case EXCEPTION_DATATYPE_MISALIGNMENT:
12062     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12063     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12064       exit (1);
12065     }
12066   return EXCEPTION_CONTINUE_SEARCH;
12067 }
12068 static void
12069 nocrash_init (void)
12070 {
12071   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12072 }
12073 #else
12074 /* Avoid a crash on POSIX systems.  */
12075 #include <signal.h>
12076 #include <unistd.h>
12077 /* A POSIX signal handler.  */
12078 static void
12079 exception_handler (int sig)
12080 {
12081   _exit (1);
12082 }
12083 static void
12084 nocrash_init (void)
12085 {
12086 #ifdef SIGSEGV
12087   signal (SIGSEGV, exception_handler);
12088 #endif
12089 #ifdef SIGBUS
12090   signal (SIGBUS, exception_handler);
12091 #endif
12092 }
12093 #endif
12094
12095
12096 int
12097 main (void)
12098 {
12099
12100              int result = 0;
12101
12102              nocrash_init();
12103
12104              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12105                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12106                 OSF/1 5.1, Solaris 10.  */
12107              {
12108                static char conftest[] = "conftest";
12109                static char plus[] = "-+";
12110                char *argv[3] = { conftest, plus, NULL };
12111                opterr = 0;
12112                if (getopt (2, argv, "+a") != '?')
12113                  result |= 1;
12114              }
12115              /* This code succeeds on glibc 2.8, mingw,
12116                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12117                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
12118              {
12119                static char program[] = "program";
12120                static char p[] = "-p";
12121                static char foo[] = "foo";
12122                static char bar[] = "bar";
12123                char *argv[] = { program, p, foo, bar, NULL };
12124
12125                optind = 1;
12126                if (getopt (4, argv, "p::") != 'p')
12127                  result |= 2;
12128                else if (optarg != NULL)
12129                  result |= 4;
12130                else if (getopt (4, argv, "p::") != -1)
12131                  result |= 6;
12132                else if (optind != 2)
12133                  result |= 8;
12134              }
12135              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
12136              {
12137                static char program[] = "program";
12138                static char foo[] = "foo";
12139                static char p[] = "-p";
12140                char *argv[] = { program, foo, p, NULL };
12141                optind = 0;
12142                if (getopt (3, argv, "-p") != 1)
12143                  result |= 16;
12144                else if (getopt (3, argv, "-p") != 'p')
12145                  result |= 16;
12146              }
12147              /* This code fails on glibc 2.11.  */
12148              {
12149                static char program[] = "program";
12150                static char b[] = "-b";
12151                static char a[] = "-a";
12152                char *argv[] = { program, b, a, NULL };
12153                optind = opterr = 0;
12154                if (getopt (3, argv, "+:a:b") != 'b')
12155                  result |= 32;
12156                else if (getopt (3, argv, "+:a:b") != ':')
12157                  result |= 32;
12158              }
12159              /* This code dumps core on glibc 2.14.  */
12160              {
12161                static char program[] = "program";
12162                static char w[] = "-W";
12163                static char dummy[] = "dummy";
12164                char *argv[] = { program, w, dummy, NULL };
12165                optind = opterr = 1;
12166                if (getopt (3, argv, "W;") != 'W')
12167                  result |= 64;
12168              }
12169              return result;
12170
12171   ;
12172   return 0;
12173 }
12174 _ACEOF
12175 if ac_fn_c_try_run "$LINENO"
12176 then :
12177   gl_cv_func_getopt_gnu=yes
12178 else $as_nop
12179   gl_cv_func_getopt_gnu=no
12180 fi
12181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12182   conftest.$ac_objext conftest.beam conftest.$ac_ext
12183 fi
12184
12185        case $gl_had_POSIXLY_CORRECT in
12186          exported) ;;
12187          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12188          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12189        esac
12190
12191 fi
12192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12193 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
12194     if test "$gl_cv_func_getopt_gnu" != yes; then
12195       gl_replace_getopt=yes
12196     else
12197       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12198 printf %s "checking for working GNU getopt_long function... " >&6; }
12199 if test ${gl_cv_func_getopt_long_gnu+y}
12200 then :
12201   printf %s "(cached) " >&6
12202 else $as_nop
12203   if test "$cross_compiling" = yes
12204 then :
12205               case "$host_os" in
12206               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12207               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
12208             esac
12209
12210 else $as_nop
12211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h.  */
12213 #include <getopt.h>
12214                 #include <stddef.h>
12215                 #include <string.h>
12216
12217 int
12218 main (void)
12219 {
12220 static const struct option long_options[] =
12221                   {
12222                     { "xtremely-",no_argument,       NULL, 1003 },
12223                     { "xtra",     no_argument,       NULL, 1001 },
12224                     { "xtreme",   no_argument,       NULL, 1002 },
12225                     { "xtremely", no_argument,       NULL, 1003 },
12226                     { NULL,       0,                 NULL, 0 }
12227                   };
12228                 /* This code fails on OpenBSD 5.0.  */
12229                 {
12230                   static char program[] = "program";
12231                   static char xtremel[] = "--xtremel";
12232                   char *argv[] = { program, xtremel, NULL };
12233                   int option_index;
12234                   optind = 1; opterr = 0;
12235                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12236                     return 1;
12237                 }
12238                 return 0;
12239
12240   ;
12241   return 0;
12242 }
12243 _ACEOF
12244 if ac_fn_c_try_run "$LINENO"
12245 then :
12246   gl_cv_func_getopt_long_gnu=yes
12247 else $as_nop
12248   gl_cv_func_getopt_long_gnu=no
12249 fi
12250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251   conftest.$ac_objext conftest.beam conftest.$ac_ext
12252 fi
12253
12254
12255 fi
12256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12257 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
12258       case "$gl_cv_func_getopt_long_gnu" in
12259         *yes) ;;
12260         *) gl_replace_getopt=yes ;;
12261       esac
12262     fi
12263   fi
12264
12265
12266
12267
12268
12269     HAVE_GETRANDOM=1;
12270   REPLACE_GETRANDOM=0;
12271
12272
12273
12274
12275   GL_GNULIB_GETRANDOM=0
12276
12277
12278
12279 :
12280
12281
12282     HAVE_GETTIMEOFDAY=1;
12283   HAVE_STRUCT_TIMEVAL=1;
12284   HAVE_SYS_TIME_H=1;
12285   REPLACE_GETTIMEOFDAY=0;
12286   REPLACE_STRUCT_TIMEVAL=0;
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302      if test $gl_cv_have_include_next = yes; then
12303        gl_cv_next_sys_time_h='<'sys/time.h'>'
12304      else
12305        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12306 printf %s "checking absolute name of <sys/time.h>... " >&6; }
12307 if test ${gl_cv_next_sys_time_h+y}
12308 then :
12309   printf %s "(cached) " >&6
12310 else $as_nop
12311
12312              if test $ac_cv_header_sys_time_h = yes; then
12313
12314
12315
12316
12317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318 /* end confdefs.h.  */
12319 #include <sys/time.h>
12320 _ACEOF
12321                 case "$host_os" in
12322     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12323     *)    gl_absname_cpp="$ac_cpp" ;;
12324   esac
12325
12326   case "$host_os" in
12327     mingw*)
12328                                           gl_dirsep_regex='[/\\]'
12329       ;;
12330     *)
12331       gl_dirsep_regex='\/'
12332       ;;
12333   esac
12334       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12335   gl_header_literal_regex=`echo 'sys/time.h' \
12336                            | sed -e "$gl_make_literal_regex_sed"`
12337   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12338       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12339       s|^/[^/]|//&|
12340       p
12341       q
12342     }'
12343
12344         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12345   sed -n "$gl_absolute_header_sed"`
12346
12347            gl_header=$gl_cv_absolute_sys_time_h
12348            gl_cv_next_sys_time_h='"'$gl_header'"'
12349           else
12350                gl_cv_next_sys_time_h='<'sys/time.h'>'
12351              fi
12352
12353
12354 fi
12355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12356 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
12357      fi
12358      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12359
12360      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12361        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12362        gl_next_as_first_directive='<'sys/time.h'>'
12363      else
12364        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12365        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12366      fi
12367      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12368
12369
12370
12371
12372
12373   if test $ac_cv_header_sys_time_h != yes; then
12374     HAVE_SYS_TIME_H=0
12375   fi
12376
12377
12378
12379
12380
12381   if test $ac_cv_header_sys_socket_h != yes; then
12382                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12383 if test "x$ac_cv_header_winsock2_h" = xyes
12384 then :
12385   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
12386
12387 fi
12388
12389   fi
12390   if test "$ac_cv_header_winsock2_h" = yes; then
12391     HAVE_WINSOCK2_H=1
12392     UNISTD_H_HAVE_WINSOCK2_H=1
12393     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12394   else
12395     HAVE_WINSOCK2_H=0
12396   fi
12397
12398
12399   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12400 printf %s "checking for struct timeval... " >&6; }
12401 if test ${gl_cv_sys_struct_timeval+y}
12402 then :
12403   printf %s "(cached) " >&6
12404 else $as_nop
12405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12406 /* end confdefs.h.  */
12407 #if HAVE_SYS_TIME_H
12408              #include <sys/time.h>
12409             #endif
12410             #include <time.h>
12411             #if HAVE_WINSOCK2_H
12412             # include <winsock2.h>
12413             #endif
12414
12415 int
12416 main (void)
12417 {
12418 static struct timeval x; x.tv_sec = x.tv_usec;
12419   ;
12420   return 0;
12421 }
12422 _ACEOF
12423 if ac_fn_c_try_compile "$LINENO"
12424 then :
12425   gl_cv_sys_struct_timeval=yes
12426 else $as_nop
12427   gl_cv_sys_struct_timeval=no
12428 fi
12429 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12430
12431 fi
12432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12433 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
12434   if test $gl_cv_sys_struct_timeval != yes; then
12435     HAVE_STRUCT_TIMEVAL=0
12436   else
12437                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12438 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12439 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
12440 then :
12441   printf %s "(cached) " >&6
12442 else $as_nop
12443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12444 /* end confdefs.h.  */
12445 #if HAVE_SYS_TIME_H
12446                #include <sys/time.h>
12447               #endif
12448               #include <time.h>
12449               #if HAVE_WINSOCK2_H
12450               # include <winsock2.h>
12451               #endif
12452
12453 int
12454 main (void)
12455 {
12456 static struct timeval x;
12457               typedef int verify_tv_sec_type[
12458                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12459               ];
12460
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 if ac_fn_c_try_compile "$LINENO"
12466 then :
12467   gl_cv_sys_struct_timeval_tv_sec=yes
12468 else $as_nop
12469   gl_cv_sys_struct_timeval_tv_sec=no
12470 fi
12471 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12472
12473 fi
12474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12475 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12476     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12477       REPLACE_STRUCT_TIMEVAL=1
12478     fi
12479   fi
12480
12481
12482
12483
12484
12485
12486
12487   GL_GNULIB_GETTIMEOFDAY=0
12488
12489
12490
12491
12492
12493
12494
12495   if test -z "$gl_pthreadlib_body_done"; then
12496     gl_pthread_api=no
12497     LIBPTHREAD=
12498     LIBPMULTITHREAD=
12499     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12500     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
12501     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12502 if test "x$ac_cv_header_pthread_h" = xyes
12503 then :
12504   gl_have_pthread_h=yes
12505 else $as_nop
12506   gl_have_pthread_h=no
12507 fi
12508
12509     if test "$gl_have_pthread_h" = yes; then
12510       # Other possible tests:
12511       #   -lpthreads (FSU threads, PCthreads)
12512       #   -lgthreads
12513       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12514       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12515       # the second one only in libpthread, and lock.c needs it.
12516       #
12517       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12518       # needs -pthread for some reason.  See:
12519       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
12520       save_LIBS=$LIBS
12521       for gl_pthread in '' '-pthread'; do
12522         LIBS="$LIBS $gl_pthread"
12523         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524 /* end confdefs.h.  */
12525 #include <pthread.h>
12526                pthread_mutex_t m;
12527                pthread_mutexattr_t ma;
12528
12529 int
12530 main (void)
12531 {
12532 pthread_mutex_lock (&m);
12533                pthread_mutexattr_init (&ma);
12534   ;
12535   return 0;
12536 }
12537 _ACEOF
12538 if ac_fn_c_try_link "$LINENO"
12539 then :
12540   gl_pthread_api=yes
12541            LIBPTHREAD=$gl_pthread
12542            LIBPMULTITHREAD=$gl_pthread
12543 fi
12544 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12545     conftest$ac_exeext conftest.$ac_ext
12546         LIBS=$save_LIBS
12547         test $gl_pthread_api = yes && break
12548       done
12549       echo "$as_me:12549: gl_pthread_api=$gl_pthread_api" >&5
12550       echo "$as_me:12550: LIBPTHREAD=$LIBPTHREAD" >&5
12551
12552       gl_pthread_in_glibc=no
12553       # On Linux with glibc >= 2.34, libc contains the fully functional
12554       # pthread functions.
12555       case "$host_os" in
12556         linux*)
12557           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12558 /* end confdefs.h.  */
12559 #include <features.h>
12560              #ifdef __GNU_LIBRARY__
12561               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
12562                Lucky user
12563               #endif
12564              #endif
12565
12566 _ACEOF
12567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12568   $EGREP "Lucky user" >/dev/null 2>&1
12569 then :
12570   gl_pthread_in_glibc=yes
12571 fi
12572 rm -rf conftest*
12573
12574           ;;
12575       esac
12576       echo "$as_me:12576: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
12577
12578       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12579       # since it is defined as a macro on OSF/1.)
12580       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
12581         # The program links fine without libpthread. But it may actually
12582         # need to link with libpthread in order to create multiple threads.
12583         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12584 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12585 if test ${ac_cv_lib_pthread_pthread_kill+y}
12586 then :
12587   printf %s "(cached) " >&6
12588 else $as_nop
12589   ac_check_lib_save_LIBS=$LIBS
12590 LIBS="-lpthread  $LIBS"
12591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592 /* end confdefs.h.  */
12593
12594 /* Override any GCC internal prototype to avoid an error.
12595    Use char because int might match the return type of a GCC
12596    builtin and then its argument prototype would still apply.  */
12597 char pthread_kill ();
12598 int
12599 main (void)
12600 {
12601 return pthread_kill ();
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 if ac_fn_c_try_link "$LINENO"
12607 then :
12608   ac_cv_lib_pthread_pthread_kill=yes
12609 else $as_nop
12610   ac_cv_lib_pthread_pthread_kill=no
12611 fi
12612 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12613     conftest$ac_exeext conftest.$ac_ext
12614 LIBS=$ac_check_lib_save_LIBS
12615 fi
12616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12617 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12618 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12619 then :
12620   if test $gl_pthread_in_glibc = yes; then
12621              LIBPMULTITHREAD=
12622            else
12623              LIBPMULTITHREAD=-lpthread
12624              # On Solaris and HP-UX, most pthread functions exist also in libc.
12625              # Therefore pthread_in_use() needs to actually try to create a
12626              # thread: pthread_create from libc will fail, whereas
12627              # pthread_create will actually create a thread.
12628              # On Solaris 10 or newer, this test is no longer needed, because
12629              # libc contains the fully functional pthread functions.
12630              case "$host_os" in
12631                solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
12632
12633 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12634
12635              esac
12636            fi
12637
12638 fi
12639
12640       elif test $gl_pthread_api != yes; then
12641         # Some library is needed. Try libpthread and libc_r.
12642         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12643 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12644 if test ${ac_cv_lib_pthread_pthread_kill+y}
12645 then :
12646   printf %s "(cached) " >&6
12647 else $as_nop
12648   ac_check_lib_save_LIBS=$LIBS
12649 LIBS="-lpthread  $LIBS"
12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12651 /* end confdefs.h.  */
12652
12653 /* Override any GCC internal prototype to avoid an error.
12654    Use char because int might match the return type of a GCC
12655    builtin and then its argument prototype would still apply.  */
12656 char pthread_kill ();
12657 int
12658 main (void)
12659 {
12660 return pthread_kill ();
12661   ;
12662   return 0;
12663 }
12664 _ACEOF
12665 if ac_fn_c_try_link "$LINENO"
12666 then :
12667   ac_cv_lib_pthread_pthread_kill=yes
12668 else $as_nop
12669   ac_cv_lib_pthread_pthread_kill=no
12670 fi
12671 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12672     conftest$ac_exeext conftest.$ac_ext
12673 LIBS=$ac_check_lib_save_LIBS
12674 fi
12675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12676 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12677 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12678 then :
12679   gl_pthread_api=yes
12680            LIBPTHREAD=-lpthread
12681            LIBPMULTITHREAD=-lpthread
12682 fi
12683
12684         if test $gl_pthread_api != yes; then
12685           # For FreeBSD 4.
12686           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12687 printf %s "checking for pthread_kill in -lc_r... " >&6; }
12688 if test ${ac_cv_lib_c_r_pthread_kill+y}
12689 then :
12690   printf %s "(cached) " >&6
12691 else $as_nop
12692   ac_check_lib_save_LIBS=$LIBS
12693 LIBS="-lc_r  $LIBS"
12694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12695 /* end confdefs.h.  */
12696
12697 /* Override any GCC internal prototype to avoid an error.
12698    Use char because int might match the return type of a GCC
12699    builtin and then its argument prototype would still apply.  */
12700 char pthread_kill ();
12701 int
12702 main (void)
12703 {
12704 return pthread_kill ();
12705   ;
12706   return 0;
12707 }
12708 _ACEOF
12709 if ac_fn_c_try_link "$LINENO"
12710 then :
12711   ac_cv_lib_c_r_pthread_kill=yes
12712 else $as_nop
12713   ac_cv_lib_c_r_pthread_kill=no
12714 fi
12715 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12716     conftest$ac_exeext conftest.$ac_ext
12717 LIBS=$ac_check_lib_save_LIBS
12718 fi
12719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
12720 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
12721 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
12722 then :
12723   gl_pthread_api=yes
12724              LIBPTHREAD=-lc_r
12725              LIBPMULTITHREAD=-lc_r
12726 fi
12727
12728         fi
12729       fi
12730       echo "$as_me:12730: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
12731     fi
12732     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
12733 printf %s "checking whether POSIX threads API is available... " >&6; }
12734     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
12735 printf "%s\n" "$gl_pthread_api" >&6; }
12736
12737
12738     if test $gl_pthread_api = yes; then
12739
12740 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
12741
12742     fi
12743
12744         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12745 /* end confdefs.h.  */
12746 #include <sched.h>
12747 int
12748 main (void)
12749 {
12750 sched_yield ();
12751   ;
12752   return 0;
12753 }
12754 _ACEOF
12755 if ac_fn_c_try_link "$LINENO"
12756 then :
12757   LIB_SCHED_YIELD=
12758
12759 else $as_nop
12760          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
12761 printf %s "checking for sched_yield in -lrt... " >&6; }
12762 if test ${ac_cv_lib_rt_sched_yield+y}
12763 then :
12764   printf %s "(cached) " >&6
12765 else $as_nop
12766   ac_check_lib_save_LIBS=$LIBS
12767 LIBS="-lrt  $LIBS"
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769 /* end confdefs.h.  */
12770
12771 /* Override any GCC internal prototype to avoid an error.
12772    Use char because int might match the return type of a GCC
12773    builtin and then its argument prototype would still apply.  */
12774 char sched_yield ();
12775 int
12776 main (void)
12777 {
12778 return sched_yield ();
12779   ;
12780   return 0;
12781 }
12782 _ACEOF
12783 if ac_fn_c_try_link "$LINENO"
12784 then :
12785   ac_cv_lib_rt_sched_yield=yes
12786 else $as_nop
12787   ac_cv_lib_rt_sched_yield=no
12788 fi
12789 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12790     conftest$ac_exeext conftest.$ac_ext
12791 LIBS=$ac_check_lib_save_LIBS
12792 fi
12793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
12794 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
12795 if test "x$ac_cv_lib_rt_sched_yield" = xyes
12796 then :
12797   LIB_SCHED_YIELD=-lrt
12798 else $as_nop
12799             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
12800 printf %s "checking for sched_yield in -lposix4... " >&6; }
12801 if test ${ac_cv_lib_posix4_sched_yield+y}
12802 then :
12803   printf %s "(cached) " >&6
12804 else $as_nop
12805   ac_check_lib_save_LIBS=$LIBS
12806 LIBS="-lposix4  $LIBS"
12807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12808 /* end confdefs.h.  */
12809
12810 /* Override any GCC internal prototype to avoid an error.
12811    Use char because int might match the return type of a GCC
12812    builtin and then its argument prototype would still apply.  */
12813 char sched_yield ();
12814 int
12815 main (void)
12816 {
12817 return sched_yield ();
12818   ;
12819   return 0;
12820 }
12821 _ACEOF
12822 if ac_fn_c_try_link "$LINENO"
12823 then :
12824   ac_cv_lib_posix4_sched_yield=yes
12825 else $as_nop
12826   ac_cv_lib_posix4_sched_yield=no
12827 fi
12828 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12829     conftest$ac_exeext conftest.$ac_ext
12830 LIBS=$ac_check_lib_save_LIBS
12831 fi
12832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
12833 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
12834 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
12835 then :
12836   LIB_SCHED_YIELD=-lposix4
12837 fi
12838
12839 fi
12840
12841
12842 fi
12843 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12844     conftest$ac_exeext conftest.$ac_ext
12845
12846
12847     gl_pthreadlib_body_done=done
12848   fi
12849
12850
12851
12852
12853
12854
12855
12856
12857   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
12858 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
12859 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
12860 then :
12861   printf %s "(cached) " >&6
12862 else $as_nop
12863   case "$host_os" in
12864        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
12865        *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
12866          gl_cv_func_setlocale_null_all_mtsafe=no ;;
12867        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
12868        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
12869          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
12870        # If we don't know, obey --enable-cross-guesses.
12871        *)
12872          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
12873      esac
12874
12875 fi
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
12877 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
12878     case "$host_os" in
12879     mingw*) ;;
12880     *)
12881       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12882         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
12883       fi
12884       ;;
12885   esac
12886   case "$gl_cv_func_setlocale_null_all_mtsafe" in
12887     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
12888     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
12889   esac
12890
12891 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
12892
12893
12894     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
12895 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
12896 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
12897 then :
12898   printf %s "(cached) " >&6
12899 else $as_nop
12900   case "$host_os" in
12901        # Guess no on OpenBSD, AIX.
12902        openbsd* | aix*)
12903          gl_cv_func_setlocale_null_one_mtsafe=no ;;
12904        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
12905        *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
12906          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
12907        # If we don't know, obey --enable-cross-guesses.
12908        *)
12909          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
12910      esac
12911
12912 fi
12913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
12914 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
12915     case "$host_os" in
12916     mingw*) ;;
12917     *)
12918       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12919         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
12920       fi
12921       ;;
12922   esac
12923   case "$gl_cv_func_setlocale_null_one_mtsafe" in
12924     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
12925     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
12926   esac
12927
12928 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
12929
12930
12931     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
12932     case "$host_os" in
12933       mingw*) LIB_SETLOCALE_NULL= ;;
12934       *)
12935
12936
12937   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12938 printf %s "checking whether imported symbols can be declared weak... " >&6; }
12939 if test ${gl_cv_have_weak+y}
12940 then :
12941   printf %s "(cached) " >&6
12942 else $as_nop
12943   gl_cv_have_weak=no
12944           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12945 /* end confdefs.h.  */
12946 extern void xyzzy ();
12947 #pragma weak xyzzy
12948 int
12949 main (void)
12950 {
12951 xyzzy();
12952   ;
12953   return 0;
12954 }
12955 _ACEOF
12956 if ac_fn_c_try_link "$LINENO"
12957 then :
12958   gl_cv_have_weak=maybe
12959 fi
12960 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12961     conftest$ac_exeext conftest.$ac_ext
12962      if test $gl_cv_have_weak = maybe; then
12963                      if test "$cross_compiling" = yes
12964 then :
12965                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966 /* end confdefs.h.  */
12967 #ifdef __ELF__
12968              Extensible Linking Format
12969              #endif
12970
12971 _ACEOF
12972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12973   $EGREP "Extensible Linking Format" >/dev/null 2>&1
12974 then :
12975   gl_cv_have_weak="guessing yes"
12976 else $as_nop
12977   gl_cv_have_weak="guessing no"
12978 fi
12979 rm -rf conftest*
12980
12981
12982 else $as_nop
12983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984 /* end confdefs.h.  */
12985
12986 #include <stdio.h>
12987 #pragma weak fputs
12988 int main ()
12989 {
12990   return (fputs == NULL);
12991 }
12992 _ACEOF
12993 if ac_fn_c_try_run "$LINENO"
12994 then :
12995   gl_cv_have_weak=yes
12996 else $as_nop
12997   gl_cv_have_weak=no
12998 fi
12999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13000   conftest.$ac_objext conftest.beam conftest.$ac_ext
13001 fi
13002
13003      fi
13004           case " $LDFLAGS " in
13005        *" -static "*) gl_cv_have_weak=no ;;
13006      esac
13007                     case "$gl_cv_have_weak" in
13008        *yes)
13009          case "$host_os" in
13010            freebsd* | dragonfly* | midnightbsd*)
13011              : > conftest1.c
13012              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
13013              cat <<EOF > conftest2.c
13014 #include <pthread.h>
13015 #pragma weak pthread_mutexattr_gettype
13016 int main ()
13017 {
13018   return (pthread_mutexattr_gettype != NULL);
13019 }
13020 EOF
13021              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
13022                || gl_cv_have_weak=no
13023              rm -f conftest1.c libempty.so conftest2.c conftest
13024              ;;
13025          esac
13026          ;;
13027      esac
13028
13029 fi
13030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13031 printf "%s\n" "$gl_cv_have_weak" >&6; }
13032   case "$gl_cv_have_weak" in
13033     *yes)
13034
13035 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
13036
13037       ;;
13038   esac
13039
13040         case "$gl_cv_have_weak" in
13041           *yes) LIB_SETLOCALE_NULL= ;;
13042           *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
13043         esac
13044         ;;
13045     esac
13046   else
13047     LIB_SETLOCALE_NULL=
13048   fi
13049
13050
13051
13052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h.  */
13054
13055 #ifdef _MSC_VER
13056 MicrosoftCompiler
13057 #endif
13058
13059 _ACEOF
13060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13061   $EGREP "MicrosoftCompiler" >/dev/null 2>&1
13062 then :
13063             rm -f conftest*
13064      echo 'int dummy;' > conftest.c
13065      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
13066   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13067   (eval $ac_try) 2>&5
13068   ac_status=$?
13069   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13070   test $ac_status = 0; }; } >/dev/null 2>&1
13071      if test -f conftest.o; then
13072        gl_asmext='s'
13073        gl_c_asm_opt='-S'
13074      else
13075        gl_asmext='asm'
13076        gl_c_asm_opt='-c -Fa'
13077      fi
13078      rm -f conftest*
13079
13080 else $as_nop
13081   gl_asmext='s'
13082      gl_c_asm_opt='-S'
13083
13084 fi
13085 rm -rf conftest*
13086
13087
13088
13089
13090
13091   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
13092 printf %s "checking host CPU and C ABI... " >&6; }
13093 if test ${gl_cv_host_cpu_c_abi+y}
13094 then :
13095   printf %s "(cached) " >&6
13096 else $as_nop
13097   case "$host_cpu" in
13098
13099        i[34567]86 )
13100          gl_cv_host_cpu_c_abi=i386
13101          ;;
13102
13103        x86_64 )
13104          # On x86_64 systems, the C compiler may be generating code in one of
13105          # these ABIs:
13106          # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
13107          # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
13108          #   with native Windows (mingw, MSVC).
13109          # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
13110          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
13111          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h.  */
13113 #if (defined __x86_64__ || defined __amd64__ \
13114                      || defined _M_X64 || defined _M_AMD64)
13115                  int ok;
13116                 #else
13117                  error fail
13118                 #endif
13119
13120 _ACEOF
13121 if ac_fn_c_try_compile "$LINENO"
13122 then :
13123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13124 /* end confdefs.h.  */
13125 #if defined __ILP32__ || defined _ILP32
13126                     int ok;
13127                    #else
13128                     error fail
13129                    #endif
13130
13131 _ACEOF
13132 if ac_fn_c_try_compile "$LINENO"
13133 then :
13134   gl_cv_host_cpu_c_abi=x86_64-x32
13135 else $as_nop
13136   gl_cv_host_cpu_c_abi=x86_64
13137 fi
13138 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13139 else $as_nop
13140   gl_cv_host_cpu_c_abi=i386
13141 fi
13142 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13143          ;;
13144
13145        alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
13146          gl_cv_host_cpu_c_abi=alpha
13147          ;;
13148
13149        arm* | aarch64 )
13150          # Assume arm with EABI.
13151          # On arm64 systems, the C compiler may be generating code in one of
13152          # these ABIs:
13153          # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
13154          # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
13155          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
13156          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 /* end confdefs.h.  */
13158 #ifdef __aarch64__
13159                  int ok;
13160                 #else
13161                  error fail
13162                 #endif
13163
13164 _ACEOF
13165 if ac_fn_c_try_compile "$LINENO"
13166 then :
13167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168 /* end confdefs.h.  */
13169 #if defined __ILP32__ || defined _ILP32
13170                    int ok;
13171                   #else
13172                    error fail
13173                   #endif
13174
13175 _ACEOF
13176 if ac_fn_c_try_compile "$LINENO"
13177 then :
13178   gl_cv_host_cpu_c_abi=arm64-ilp32
13179 else $as_nop
13180   gl_cv_host_cpu_c_abi=arm64
13181 fi
13182 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13183 else $as_nop
13184   # Don't distinguish little-endian and big-endian arm, since they
13185             # don't require different machine code for simple operations and
13186             # since the user can distinguish them through the preprocessor
13187             # defines __ARMEL__ vs. __ARMEB__.
13188             # But distinguish arm which passes floating-point arguments and
13189             # return values in integer registers (r0, r1, ...) - this is
13190             # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
13191             # passes them in float registers (s0, s1, ...) and double registers
13192             # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
13193             # sets the preprocessor defines __ARM_PCS (for the first case) and
13194             # __ARM_PCS_VFP (for the second case), but older GCC does not.
13195             echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
13196             # Look for a reference to the register d0 in the .s file.
13197             { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
13198   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13199   (eval $ac_try) 2>&5
13200   ac_status=$?
13201   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13202   test $ac_status = 0; }; } >/dev/null 2>&1
13203             if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
13204               gl_cv_host_cpu_c_abi=armhf
13205             else
13206               gl_cv_host_cpu_c_abi=arm
13207             fi
13208             rm -f conftest*
13209
13210 fi
13211 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13212          ;;
13213
13214        hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
13215          # On hppa, the C compiler may be generating 32-bit code or 64-bit
13216          # code. In the latter case, it defines _LP64 and __LP64__.
13217          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13218 /* end confdefs.h.  */
13219 #ifdef __LP64__
13220                  int ok;
13221                 #else
13222                  error fail
13223                 #endif
13224
13225 _ACEOF
13226 if ac_fn_c_try_compile "$LINENO"
13227 then :
13228   gl_cv_host_cpu_c_abi=hppa64
13229 else $as_nop
13230   gl_cv_host_cpu_c_abi=hppa
13231 fi
13232 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13233          ;;
13234
13235        ia64* )
13236          # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
13237          # 32-bit code. In the latter case, it defines _ILP32.
13238          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13239 /* end confdefs.h.  */
13240 #ifdef _ILP32
13241                  int ok;
13242                 #else
13243                  error fail
13244                 #endif
13245
13246 _ACEOF
13247 if ac_fn_c_try_compile "$LINENO"
13248 then :
13249   gl_cv_host_cpu_c_abi=ia64-ilp32
13250 else $as_nop
13251   gl_cv_host_cpu_c_abi=ia64
13252 fi
13253 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13254          ;;
13255
13256        mips* )
13257          # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
13258          # at 32.
13259          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260 /* end confdefs.h.  */
13261 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
13262                  int ok;
13263                 #else
13264                  error fail
13265                 #endif
13266
13267 _ACEOF
13268 if ac_fn_c_try_compile "$LINENO"
13269 then :
13270   gl_cv_host_cpu_c_abi=mips64
13271 else $as_nop
13272   # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
13273             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
13274             # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
13275             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
13276             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h.  */
13278 #if (_MIPS_SIM == _ABIN32)
13279                     int ok;
13280                    #else
13281                     error fail
13282                    #endif
13283
13284 _ACEOF
13285 if ac_fn_c_try_compile "$LINENO"
13286 then :
13287   gl_cv_host_cpu_c_abi=mipsn32
13288 else $as_nop
13289   gl_cv_host_cpu_c_abi=mips
13290 fi
13291 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13292 fi
13293 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13294          ;;
13295
13296        powerpc* )
13297          # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
13298          # No need to distinguish them here; the caller may distinguish
13299          # them based on the OS.
13300          # On powerpc64 systems, the C compiler may still be generating
13301          # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
13302          # be generating 64-bit code.
13303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13304 /* end confdefs.h.  */
13305 #if defined __powerpc64__ || defined __LP64__
13306                  int ok;
13307                 #else
13308                  error fail
13309                 #endif
13310
13311 _ACEOF
13312 if ac_fn_c_try_compile "$LINENO"
13313 then :
13314   # On powerpc64, there are two ABIs on Linux: The AIX compatible
13315             # one and the ELFv2 one. The latter defines _CALL_ELF=2.
13316             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13317 /* end confdefs.h.  */
13318 #if defined _CALL_ELF && _CALL_ELF == 2
13319                     int ok;
13320                    #else
13321                     error fail
13322                    #endif
13323
13324 _ACEOF
13325 if ac_fn_c_try_compile "$LINENO"
13326 then :
13327   gl_cv_host_cpu_c_abi=powerpc64-elfv2
13328 else $as_nop
13329   gl_cv_host_cpu_c_abi=powerpc64
13330 fi
13331 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13332
13333 else $as_nop
13334   gl_cv_host_cpu_c_abi=powerpc
13335 fi
13336 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13337          ;;
13338
13339        rs6000 )
13340          gl_cv_host_cpu_c_abi=powerpc
13341          ;;
13342
13343        riscv32 | riscv64 )
13344          # There are 2 architectures (with variants): rv32* and rv64*.
13345          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13346 /* end confdefs.h.  */
13347 #if __riscv_xlen == 64
13348                   int ok;
13349                 #else
13350                   error fail
13351                 #endif
13352
13353 _ACEOF
13354 if ac_fn_c_try_compile "$LINENO"
13355 then :
13356   cpu=riscv64
13357 else $as_nop
13358   cpu=riscv32
13359 fi
13360 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13361          # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
13362          # Size of 'long' and 'void *':
13363          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13364 /* end confdefs.h.  */
13365 #if defined __LP64__
13366                   int ok;
13367                 #else
13368                   error fail
13369                 #endif
13370
13371 _ACEOF
13372 if ac_fn_c_try_compile "$LINENO"
13373 then :
13374   main_abi=lp64
13375 else $as_nop
13376   main_abi=ilp32
13377 fi
13378 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13379          # Float ABIs:
13380          # __riscv_float_abi_double:
13381          #   'float' and 'double' are passed in floating-point registers.
13382          # __riscv_float_abi_single:
13383          #   'float' are passed in floating-point registers.
13384          # __riscv_float_abi_soft:
13385          #   No values are passed in floating-point registers.
13386          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h.  */
13388 #if defined __riscv_float_abi_double
13389                   int ok;
13390                 #else
13391                   error fail
13392                 #endif
13393
13394 _ACEOF
13395 if ac_fn_c_try_compile "$LINENO"
13396 then :
13397   float_abi=d
13398 else $as_nop
13399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h.  */
13401 #if defined __riscv_float_abi_single
13402                      int ok;
13403                    #else
13404                      error fail
13405                    #endif
13406
13407 _ACEOF
13408 if ac_fn_c_try_compile "$LINENO"
13409 then :
13410   float_abi=f
13411 else $as_nop
13412   float_abi=''
13413 fi
13414 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13415
13416 fi
13417 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13418          gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
13419          ;;
13420
13421        s390* )
13422          # On s390x, the C compiler may be generating 64-bit (= s390x) code
13423          # or 31-bit (= s390) code.
13424          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h.  */
13426 #if defined __LP64__ || defined __s390x__
13427                   int ok;
13428                 #else
13429                   error fail
13430                 #endif
13431
13432 _ACEOF
13433 if ac_fn_c_try_compile "$LINENO"
13434 then :
13435   gl_cv_host_cpu_c_abi=s390x
13436 else $as_nop
13437   gl_cv_host_cpu_c_abi=s390
13438 fi
13439 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13440          ;;
13441
13442        sparc | sparc64 )
13443          # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
13444          # C compiler still generates 32-bit code.
13445          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446 /* end confdefs.h.  */
13447 #if defined __sparcv9 || defined __arch64__
13448                  int ok;
13449                 #else
13450                  error fail
13451                 #endif
13452
13453 _ACEOF
13454 if ac_fn_c_try_compile "$LINENO"
13455 then :
13456   gl_cv_host_cpu_c_abi=sparc64
13457 else $as_nop
13458   gl_cv_host_cpu_c_abi=sparc
13459 fi
13460 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13461          ;;
13462
13463        *)
13464          gl_cv_host_cpu_c_abi="$host_cpu"
13465          ;;
13466      esac
13467
13468 fi
13469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
13470 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
13471
13472     HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
13473   HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
13474
13475
13476
13477   # This was
13478   #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
13479   #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
13480   # earlier, but KAI C++ 3.2d doesn't like this.
13481   sed -e 's/-/_/g' >> confdefs.h <<EOF
13482 #ifndef __${HOST_CPU}__
13483 #define __${HOST_CPU}__ 1
13484 #endif
13485 #ifndef __${HOST_CPU_C_ABI}__
13486 #define __${HOST_CPU_C_ABI}__ 1
13487 #endif
13488 EOF
13489
13490
13491
13492
13493       if test "X$prefix" = "XNONE"; then
13494     acl_final_prefix="$ac_default_prefix"
13495   else
13496     acl_final_prefix="$prefix"
13497   fi
13498   if test "X$exec_prefix" = "XNONE"; then
13499     acl_final_exec_prefix='${prefix}'
13500   else
13501     acl_final_exec_prefix="$exec_prefix"
13502   fi
13503   acl_save_prefix="$prefix"
13504   prefix="$acl_final_prefix"
13505   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13506   prefix="$acl_save_prefix"
13507
13508
13509
13510 # Check whether --with-gnu-ld was given.
13511 if test ${with_gnu_ld+y}
13512 then :
13513   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13514 else $as_nop
13515   with_gnu_ld=no
13516 fi
13517
13518 # Prepare PATH_SEPARATOR.
13519 # The user is always right.
13520 if test "${PATH_SEPARATOR+set}" != set; then
13521   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13522   # contains only /bin. Note that ksh looks also at the FPATH variable,
13523   # so we have to set that as well for the test.
13524   PATH_SEPARATOR=:
13525   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13526     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13527            || PATH_SEPARATOR=';'
13528        }
13529 fi
13530
13531 if test -n "$LD"; then
13532   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
13533 printf %s "checking for ld... " >&6; }
13534 elif test "$GCC" = yes; then
13535   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13536 printf %s "checking for ld used by $CC... " >&6; }
13537 elif test "$with_gnu_ld" = yes; then
13538   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13539 printf %s "checking for GNU ld... " >&6; }
13540 else
13541   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13542 printf %s "checking for non-GNU ld... " >&6; }
13543 fi
13544 if test -n "$LD"; then
13545   # Let the user override the test with a path.
13546   :
13547 else
13548   if test ${acl_cv_path_LD+y}
13549 then :
13550   printf %s "(cached) " >&6
13551 else $as_nop
13552
13553     acl_cv_path_LD= # Final result of this test
13554     ac_prog=ld # Program to search in $PATH
13555     if test "$GCC" = yes; then
13556       # Check if gcc -print-prog-name=ld gives a path.
13557       case $host in
13558         *-*-mingw*)
13559           # gcc leaves a trailing carriage return which upsets mingw
13560           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13561         *)
13562           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
13563       esac
13564       case $acl_output in
13565         # Accept absolute paths.
13566         [\\/]* | ?:[\\/]*)
13567           re_direlt='/[^/][^/]*/\.\./'
13568           # Canonicalize the pathname of ld
13569           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
13570           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
13571             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
13572           done
13573           # Got the pathname. No search in PATH is needed.
13574           acl_cv_path_LD="$acl_output"
13575           ac_prog=
13576           ;;
13577         "")
13578           # If it fails, then pretend we aren't using GCC.
13579           ;;
13580         *)
13581           # If it is relative, then search for the first ld in PATH.
13582           with_gnu_ld=unknown
13583           ;;
13584       esac
13585     fi
13586     if test -n "$ac_prog"; then
13587       # Search for $ac_prog in $PATH.
13588       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13589       for ac_dir in $PATH; do
13590         IFS="$acl_save_ifs"
13591         test -z "$ac_dir" && ac_dir=.
13592         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13593           acl_cv_path_LD="$ac_dir/$ac_prog"
13594           # Check to see if the program is GNU ld.  I'd rather use --version,
13595           # but apparently some variants of GNU ld only accept -v.
13596           # Break only if it was the GNU/non-GNU ld that we prefer.
13597           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13598             *GNU* | *'with BFD'*)
13599               test "$with_gnu_ld" != no && break
13600               ;;
13601             *)
13602               test "$with_gnu_ld" != yes && break
13603               ;;
13604           esac
13605         fi
13606       done
13607       IFS="$acl_save_ifs"
13608     fi
13609     case $host in
13610       *-*-aix*)
13611         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612 /* end confdefs.h.  */
13613 #if defined __powerpc64__ || defined __LP64__
13614                 int ok;
13615                #else
13616                 error fail
13617                #endif
13618
13619 _ACEOF
13620 if ac_fn_c_try_compile "$LINENO"
13621 then :
13622   # The compiler produces 64-bit code. Add option '-b64' so that the
13623            # linker groks 64-bit object files.
13624            case "$acl_cv_path_LD " in
13625              *" -b64 "*) ;;
13626              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
13627            esac
13628
13629 fi
13630 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13631         ;;
13632       sparc64-*-netbsd*)
13633         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13634 /* end confdefs.h.  */
13635 #if defined __sparcv9 || defined __arch64__
13636                 int ok;
13637                #else
13638                 error fail
13639                #endif
13640
13641 _ACEOF
13642 if ac_fn_c_try_compile "$LINENO"
13643 then :
13644
13645 else $as_nop
13646   # The compiler produces 32-bit code. Add option '-m elf32_sparc'
13647            # so that the linker groks 32-bit object files.
13648            case "$acl_cv_path_LD " in
13649              *" -m elf32_sparc "*) ;;
13650              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
13651            esac
13652
13653 fi
13654 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13655         ;;
13656     esac
13657
13658 fi
13659
13660   LD="$acl_cv_path_LD"
13661 fi
13662 if test -n "$LD"; then
13663   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13664 printf "%s\n" "$LD" >&6; }
13665 else
13666   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13667 printf "%s\n" "no" >&6; }
13668   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13669 fi
13670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13671 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13672 if test ${acl_cv_prog_gnu_ld+y}
13673 then :
13674   printf %s "(cached) " >&6
13675 else $as_nop
13676   # I'd rather use --version here, but apparently some GNU lds only accept -v.
13677 case `$LD -v 2>&1 </dev/null` in
13678 *GNU* | *'with BFD'*)
13679   acl_cv_prog_gnu_ld=yes
13680   ;;
13681 *)
13682   acl_cv_prog_gnu_ld=no
13683   ;;
13684 esac
13685 fi
13686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13687 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
13688 with_gnu_ld=$acl_cv_prog_gnu_ld
13689
13690
13691
13692
13693
13694                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13695 printf %s "checking for shared library run path origin... " >&6; }
13696 if test ${acl_cv_rpath+y}
13697 then :
13698   printf %s "(cached) " >&6
13699 else $as_nop
13700
13701     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13702     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13703     . ./conftest.sh
13704     rm -f ./conftest.sh
13705     acl_cv_rpath=done
13706
13707 fi
13708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13709 printf "%s\n" "$acl_cv_rpath" >&6; }
13710   wl="$acl_cv_wl"
13711   acl_libext="$acl_cv_libext"
13712   acl_shlibext="$acl_cv_shlibext"
13713   acl_libname_spec="$acl_cv_libname_spec"
13714   acl_library_names_spec="$acl_cv_library_names_spec"
13715   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13716   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13717   acl_hardcode_direct="$acl_cv_hardcode_direct"
13718   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13719     # Check whether --enable-rpath was given.
13720 if test ${enable_rpath+y}
13721 then :
13722   enableval=$enable_rpath; :
13723 else $as_nop
13724   enable_rpath=yes
13725 fi
13726
13727
13728
13729
13730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
13731 printf %s "checking 32-bit host C ABI... " >&6; }
13732 if test ${gl_cv_host_cpu_c_abi_32bit+y}
13733 then :
13734   printf %s "(cached) " >&6
13735 else $as_nop
13736   if test -n "$gl_cv_host_cpu_c_abi"; then
13737        case "$gl_cv_host_cpu_c_abi" in
13738          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
13739            gl_cv_host_cpu_c_abi_32bit=yes ;;
13740          x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
13741            gl_cv_host_cpu_c_abi_32bit=no ;;
13742          *)
13743            gl_cv_host_cpu_c_abi_32bit=unknown ;;
13744        esac
13745      else
13746        case "$host_cpu" in
13747
13748          # CPUs that only support a 32-bit ABI.
13749          arc \
13750          | bfin \
13751          | cris* \
13752          | csky \
13753          | epiphany \
13754          | ft32 \
13755          | h8300 \
13756          | m68k \
13757          | microblaze | microblazeel \
13758          | nds32 | nds32le | nds32be \
13759          | nios2 | nios2eb | nios2el \
13760          | or1k* \
13761          | or32 \
13762          | sh | sh1234 | sh1234elb \
13763          | tic6x \
13764          | xtensa* )
13765            gl_cv_host_cpu_c_abi_32bit=yes
13766            ;;
13767
13768          # CPUs that only support a 64-bit ABI.
13769          alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
13770          | mmix )
13771            gl_cv_host_cpu_c_abi_32bit=no
13772            ;;
13773
13774          i[34567]86 )
13775            gl_cv_host_cpu_c_abi_32bit=yes
13776            ;;
13777
13778          x86_64 )
13779            # On x86_64 systems, the C compiler may be generating code in one of
13780            # these ABIs:
13781            # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
13782            # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
13783            #   with native Windows (mingw, MSVC).
13784            # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
13785            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
13786            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13787 /* end confdefs.h.  */
13788 #if (defined __x86_64__ || defined __amd64__ \
13789                        || defined _M_X64 || defined _M_AMD64) \
13790                       && !(defined __ILP32__ || defined _ILP32)
13791                    int ok;
13792                   #else
13793                    error fail
13794                   #endif
13795
13796 _ACEOF
13797 if ac_fn_c_try_compile "$LINENO"
13798 then :
13799   gl_cv_host_cpu_c_abi_32bit=no
13800 else $as_nop
13801   gl_cv_host_cpu_c_abi_32bit=yes
13802 fi
13803 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13804            ;;
13805
13806          arm* | aarch64 )
13807            # Assume arm with EABI.
13808            # On arm64 systems, the C compiler may be generating code in one of
13809            # these ABIs:
13810            # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
13811            # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
13812            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
13813            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814 /* end confdefs.h.  */
13815 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
13816                    int ok;
13817                   #else
13818                    error fail
13819                   #endif
13820
13821 _ACEOF
13822 if ac_fn_c_try_compile "$LINENO"
13823 then :
13824   gl_cv_host_cpu_c_abi_32bit=no
13825 else $as_nop
13826   gl_cv_host_cpu_c_abi_32bit=yes
13827 fi
13828 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13829            ;;
13830
13831          hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
13832            # On hppa, the C compiler may be generating 32-bit code or 64-bit
13833            # code. In the latter case, it defines _LP64 and __LP64__.
13834            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835 /* end confdefs.h.  */
13836 #ifdef __LP64__
13837                    int ok;
13838                   #else
13839                    error fail
13840                   #endif
13841
13842 _ACEOF
13843 if ac_fn_c_try_compile "$LINENO"
13844 then :
13845   gl_cv_host_cpu_c_abi_32bit=no
13846 else $as_nop
13847   gl_cv_host_cpu_c_abi_32bit=yes
13848 fi
13849 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13850            ;;
13851
13852          ia64* )
13853            # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
13854            # 32-bit code. In the latter case, it defines _ILP32.
13855            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13856 /* end confdefs.h.  */
13857 #ifdef _ILP32
13858                    int ok;
13859                   #else
13860                    error fail
13861                   #endif
13862
13863 _ACEOF
13864 if ac_fn_c_try_compile "$LINENO"
13865 then :
13866   gl_cv_host_cpu_c_abi_32bit=yes
13867 else $as_nop
13868   gl_cv_host_cpu_c_abi_32bit=no
13869 fi
13870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13871            ;;
13872
13873          mips* )
13874            # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
13875            # at 32.
13876            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13877 /* end confdefs.h.  */
13878 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
13879                    int ok;
13880                   #else
13881                    error fail
13882                   #endif
13883
13884 _ACEOF
13885 if ac_fn_c_try_compile "$LINENO"
13886 then :
13887   gl_cv_host_cpu_c_abi_32bit=no
13888 else $as_nop
13889   gl_cv_host_cpu_c_abi_32bit=yes
13890 fi
13891 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13892            ;;
13893
13894          powerpc* )
13895            # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
13896            # No need to distinguish them here; the caller may distinguish
13897            # them based on the OS.
13898            # On powerpc64 systems, the C compiler may still be generating
13899            # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
13900            # be generating 64-bit code.
13901            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902 /* end confdefs.h.  */
13903 #if defined __powerpc64__ || defined __LP64__
13904                    int ok;
13905                   #else
13906                    error fail
13907                   #endif
13908
13909 _ACEOF
13910 if ac_fn_c_try_compile "$LINENO"
13911 then :
13912   gl_cv_host_cpu_c_abi_32bit=no
13913 else $as_nop
13914   gl_cv_host_cpu_c_abi_32bit=yes
13915 fi
13916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13917            ;;
13918
13919          rs6000 )
13920            gl_cv_host_cpu_c_abi_32bit=yes
13921            ;;
13922
13923          riscv32 | riscv64 )
13924            # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
13925            # Size of 'long' and 'void *':
13926            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13927 /* end confdefs.h.  */
13928 #if defined __LP64__
13929                     int ok;
13930                   #else
13931                     error fail
13932                   #endif
13933
13934 _ACEOF
13935 if ac_fn_c_try_compile "$LINENO"
13936 then :
13937   gl_cv_host_cpu_c_abi_32bit=no
13938 else $as_nop
13939   gl_cv_host_cpu_c_abi_32bit=yes
13940 fi
13941 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13942            ;;
13943
13944          s390* )
13945            # On s390x, the C compiler may be generating 64-bit (= s390x) code
13946            # or 31-bit (= s390) code.
13947            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13948 /* end confdefs.h.  */
13949 #if defined __LP64__ || defined __s390x__
13950                     int ok;
13951                   #else
13952                     error fail
13953                   #endif
13954
13955 _ACEOF
13956 if ac_fn_c_try_compile "$LINENO"
13957 then :
13958   gl_cv_host_cpu_c_abi_32bit=no
13959 else $as_nop
13960   gl_cv_host_cpu_c_abi_32bit=yes
13961 fi
13962 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13963            ;;
13964
13965          sparc | sparc64 )
13966            # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
13967            # C compiler still generates 32-bit code.
13968            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13969 /* end confdefs.h.  */
13970 #if defined __sparcv9 || defined __arch64__
13971                    int ok;
13972                   #else
13973                    error fail
13974                   #endif
13975
13976 _ACEOF
13977 if ac_fn_c_try_compile "$LINENO"
13978 then :
13979   gl_cv_host_cpu_c_abi_32bit=no
13980 else $as_nop
13981   gl_cv_host_cpu_c_abi_32bit=yes
13982 fi
13983 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13984            ;;
13985
13986          *)
13987            gl_cv_host_cpu_c_abi_32bit=unknown
13988            ;;
13989        esac
13990      fi
13991
13992 fi
13993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
13994 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
13995
13996   HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
13997
13998
13999
14000
14001
14002   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
14003 printf %s "checking for ELF binary format... " >&6; }
14004 if test ${gl_cv_elf+y}
14005 then :
14006   printf %s "(cached) " >&6
14007 else $as_nop
14008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14009 /* end confdefs.h.  */
14010 #ifdef __ELF__
14011         Extensible Linking Format
14012         #endif
14013
14014 _ACEOF
14015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14016   $EGREP "Extensible Linking Format" >/dev/null 2>&1
14017 then :
14018   gl_cv_elf=yes
14019 else $as_nop
14020   gl_cv_elf=no
14021 fi
14022 rm -rf conftest*
14023
14024
14025 fi
14026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
14027 printf "%s\n" "$gl_cv_elf" >&6; }
14028   if test $gl_cv_elf = yes; then
14029     # Extract the ELF class of a file (5th byte) in decimal.
14030     # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
14031     if od -A x < /dev/null >/dev/null 2>/dev/null; then
14032       # Use POSIX od.
14033       func_elfclass ()
14034       {
14035         od -A n -t d1 -j 4 -N 1
14036       }
14037     else
14038       # Use BSD hexdump.
14039       func_elfclass ()
14040       {
14041         dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
14042         echo
14043       }
14044     fi
14045     # Use 'expr', not 'test', to compare the values of func_elfclass, because on
14046     # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
14047     # not 1 or 2.
14048     case $HOST_CPU_C_ABI_32BIT in
14049       yes)
14050         # 32-bit ABI.
14051         acl_is_expected_elfclass ()
14052         {
14053           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 1 > /dev/null
14054         }
14055         ;;
14056       no)
14057         # 64-bit ABI.
14058         acl_is_expected_elfclass ()
14059         {
14060           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 2 > /dev/null
14061         }
14062         ;;
14063       *)
14064         # Unknown.
14065         acl_is_expected_elfclass ()
14066         {
14067           :
14068         }
14069         ;;
14070     esac
14071   else
14072     acl_is_expected_elfclass ()
14073     {
14074       :
14075     }
14076   fi
14077
14078     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
14079 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
14080 if test ${acl_cv_libdirstems+y}
14081 then :
14082   printf %s "(cached) " >&6
14083 else $as_nop
14084             acl_libdirstem=lib
14085      acl_libdirstem2=
14086      acl_libdirstem3=
14087      case "$host_os" in
14088        solaris*)
14089                                                       if test $HOST_CPU_C_ABI_32BIT = no; then
14090            acl_libdirstem2=lib/64
14091            case "$host_cpu" in
14092              sparc*)        acl_libdirstem3=lib/sparcv9 ;;
14093              i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
14094            esac
14095          fi
14096          ;;
14097        *)
14098                                                                                  searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
14099                      | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14100          if test $HOST_CPU_C_ABI_32BIT != no; then
14101            # 32-bit or unknown ABI.
14102            if test -d /usr/lib32; then
14103              acl_libdirstem2=lib32
14104            fi
14105          fi
14106          if test $HOST_CPU_C_ABI_32BIT != yes; then
14107            # 64-bit or unknown ABI.
14108            if test -d /usr/lib64; then
14109              acl_libdirstem3=lib64
14110            fi
14111          fi
14112          if test -n "$searchpath"; then
14113            acl_save_IFS="${IFS=         }"; IFS=":"
14114            for searchdir in $searchpath; do
14115              if test -d "$searchdir"; then
14116                case "$searchdir" in
14117                  */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
14118                  */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
14119                  */../ | */.. )
14120                    # Better ignore directories of this form. They are misleading.
14121                    ;;
14122                  *) searchdir=`cd "$searchdir" && pwd`
14123                     case "$searchdir" in
14124                       */lib32 ) acl_libdirstem2=lib32 ;;
14125                       */lib64 ) acl_libdirstem3=lib64 ;;
14126                     esac ;;
14127                esac
14128              fi
14129            done
14130            IFS="$acl_save_IFS"
14131            if test $HOST_CPU_C_ABI_32BIT = yes; then
14132              # 32-bit ABI.
14133              acl_libdirstem3=
14134            fi
14135            if test $HOST_CPU_C_ABI_32BIT = no; then
14136              # 64-bit ABI.
14137              acl_libdirstem2=
14138            fi
14139          fi
14140          ;;
14141      esac
14142      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14143      test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
14144      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
14145
14146 fi
14147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
14148 printf "%s\n" "$acl_cv_libdirstems" >&6; }
14149       acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
14150   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
14151   acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163     use_additional=yes
14164
14165   acl_save_prefix="$prefix"
14166   prefix="$acl_final_prefix"
14167   acl_save_exec_prefix="$exec_prefix"
14168   exec_prefix="$acl_final_exec_prefix"
14169
14170     eval additional_includedir=\"$includedir\"
14171     eval additional_libdir=\"$libdir\"
14172     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
14173     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
14174
14175   exec_prefix="$acl_save_exec_prefix"
14176   prefix="$acl_save_prefix"
14177
14178
14179 # Check whether --with-libiconv-prefix was given.
14180 if test ${with_libiconv_prefix+y}
14181 then :
14182   withval=$with_libiconv_prefix;
14183     if test "X$withval" = "Xno"; then
14184       use_additional=no
14185     else
14186       if test "X$withval" = "X"; then
14187
14188   acl_save_prefix="$prefix"
14189   prefix="$acl_final_prefix"
14190   acl_save_exec_prefix="$exec_prefix"
14191   exec_prefix="$acl_final_exec_prefix"
14192
14193           eval additional_includedir=\"$includedir\"
14194           eval additional_libdir=\"$libdir\"
14195           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
14196           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
14197
14198   exec_prefix="$acl_save_exec_prefix"
14199   prefix="$acl_save_prefix"
14200
14201       else
14202         additional_includedir="$withval/include"
14203         additional_libdir="$withval/$acl_libdirstem"
14204         additional_libdir2="$withval/$acl_libdirstem2"
14205         additional_libdir3="$withval/$acl_libdirstem3"
14206       fi
14207     fi
14208
14209 fi
14210
14211   if test "X$additional_libdir2" = "X$additional_libdir"; then
14212     additional_libdir2=
14213   fi
14214   if test "X$additional_libdir3" = "X$additional_libdir"; then
14215     additional_libdir3=
14216   fi
14217       LIBICONV=
14218   LTLIBICONV=
14219   INCICONV=
14220   LIBICONV_PREFIX=
14221       HAVE_LIBICONV=
14222   rpathdirs=
14223   ltrpathdirs=
14224   names_already_handled=
14225   names_next_round='iconv '
14226   while test -n "$names_next_round"; do
14227     names_this_round="$names_next_round"
14228     names_next_round=
14229     for name in $names_this_round; do
14230       already_handled=
14231       for n in $names_already_handled; do
14232         if test "$n" = "$name"; then
14233           already_handled=yes
14234           break
14235         fi
14236       done
14237       if test -z "$already_handled"; then
14238         names_already_handled="$names_already_handled $name"
14239                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14240         eval value=\"\$HAVE_LIB$uppername\"
14241         if test -n "$value"; then
14242           if test "$value" = yes; then
14243             eval value=\"\$LIB$uppername\"
14244             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
14245             eval value=\"\$LTLIB$uppername\"
14246             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
14247           else
14248                                     :
14249           fi
14250         else
14251                               found_dir=
14252           found_la=
14253           found_so=
14254           found_a=
14255           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
14256           if test -n "$acl_shlibext"; then
14257             shrext=".$acl_shlibext"             # typically: shrext=.so
14258           else
14259             shrext=
14260           fi
14261           if test $use_additional = yes; then
14262             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
14263               if test "X$found_dir" = "X"; then
14264                 eval dir=\$$additional_libdir_variable
14265                 if test -n "$dir"; then
14266                                                       if test -n "$acl_shlibext"; then
14267                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
14268                       found_dir="$dir"
14269                       found_so="$dir/$libname$shrext"
14270                     else
14271                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14272                         ver=`(cd "$dir" && \
14273                               for f in "$libname$shrext".*; do echo "$f"; done \
14274                               | sed -e "s,^$libname$shrext\\\\.,," \
14275                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14276                               | sed 1q ) 2>/dev/null`
14277                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
14278                           found_dir="$dir"
14279                           found_so="$dir/$libname$shrext.$ver"
14280                         fi
14281                       else
14282                         eval library_names=\"$acl_library_names_spec\"
14283                         for f in $library_names; do
14284                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
14285                             found_dir="$dir"
14286                             found_so="$dir/$f"
14287                             break
14288                           fi
14289                         done
14290                       fi
14291                     fi
14292                   fi
14293                                     if test "X$found_dir" = "X"; then
14294                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
14295                       found_dir="$dir"
14296                       found_a="$dir/$libname.$acl_libext"
14297                     fi
14298                   fi
14299                   if test "X$found_dir" != "X"; then
14300                     if test -f "$dir/$libname.la"; then
14301                       found_la="$dir/$libname.la"
14302                     fi
14303                   fi
14304                 fi
14305               fi
14306             done
14307           fi
14308           if test "X$found_dir" = "X"; then
14309             for x in $LDFLAGS $LTLIBICONV; do
14310
14311   acl_save_prefix="$prefix"
14312   prefix="$acl_final_prefix"
14313   acl_save_exec_prefix="$exec_prefix"
14314   exec_prefix="$acl_final_exec_prefix"
14315   eval x=\"$x\"
14316   exec_prefix="$acl_save_exec_prefix"
14317   prefix="$acl_save_prefix"
14318
14319               case "$x" in
14320                 -L*)
14321                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14322                                     if test -n "$acl_shlibext"; then
14323                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
14324                       found_dir="$dir"
14325                       found_so="$dir/$libname$shrext"
14326                     else
14327                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14328                         ver=`(cd "$dir" && \
14329                               for f in "$libname$shrext".*; do echo "$f"; done \
14330                               | sed -e "s,^$libname$shrext\\\\.,," \
14331                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14332                               | sed 1q ) 2>/dev/null`
14333                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
14334                           found_dir="$dir"
14335                           found_so="$dir/$libname$shrext.$ver"
14336                         fi
14337                       else
14338                         eval library_names=\"$acl_library_names_spec\"
14339                         for f in $library_names; do
14340                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
14341                             found_dir="$dir"
14342                             found_so="$dir/$f"
14343                             break
14344                           fi
14345                         done
14346                       fi
14347                     fi
14348                   fi
14349                                     if test "X$found_dir" = "X"; then
14350                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
14351                       found_dir="$dir"
14352                       found_a="$dir/$libname.$acl_libext"
14353                     fi
14354                   fi
14355                   if test "X$found_dir" != "X"; then
14356                     if test -f "$dir/$libname.la"; then
14357                       found_la="$dir/$libname.la"
14358                     fi
14359                   fi
14360                   ;;
14361               esac
14362               if test "X$found_dir" != "X"; then
14363                 break
14364               fi
14365             done
14366           fi
14367           if test "X$found_dir" != "X"; then
14368                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
14369             if test "X$found_so" != "X"; then
14370                                                         if test "$enable_rpath" = no \
14371                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14372                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
14373                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
14374                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14375               else
14376                                                                                 haveit=
14377                 for x in $ltrpathdirs; do
14378                   if test "X$x" = "X$found_dir"; then
14379                     haveit=yes
14380                     break
14381                   fi
14382                 done
14383                 if test -z "$haveit"; then
14384                   ltrpathdirs="$ltrpathdirs $found_dir"
14385                 fi
14386                                 if test "$acl_hardcode_direct" = yes; then
14387                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14388                 else
14389                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14390                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14391                                                             haveit=
14392                     for x in $rpathdirs; do
14393                       if test "X$x" = "X$found_dir"; then
14394                         haveit=yes
14395                         break
14396                       fi
14397                     done
14398                     if test -z "$haveit"; then
14399                       rpathdirs="$rpathdirs $found_dir"
14400                     fi
14401                   else
14402                                                                                 haveit=
14403                     for x in $LDFLAGS $LIBICONV; do
14404
14405   acl_save_prefix="$prefix"
14406   prefix="$acl_final_prefix"
14407   acl_save_exec_prefix="$exec_prefix"
14408   exec_prefix="$acl_final_exec_prefix"
14409   eval x=\"$x\"
14410   exec_prefix="$acl_save_exec_prefix"
14411   prefix="$acl_save_prefix"
14412
14413                       if test "X$x" = "X-L$found_dir"; then
14414                         haveit=yes
14415                         break
14416                       fi
14417                     done
14418                     if test -z "$haveit"; then
14419                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
14420                     fi
14421                     if test "$acl_hardcode_minus_L" != no; then
14422                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14423                     else
14424                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14425                     fi
14426                   fi
14427                 fi
14428               fi
14429             else
14430               if test "X$found_a" != "X"; then
14431                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
14432               else
14433                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
14434               fi
14435             fi
14436                         additional_includedir=
14437             case "$found_dir" in
14438               */$acl_libdirstem | */$acl_libdirstem/)
14439                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14440                 if test "$name" = 'iconv'; then
14441                   LIBICONV_PREFIX="$basedir"
14442                 fi
14443                 additional_includedir="$basedir/include"
14444                 ;;
14445               */$acl_libdirstem2 | */$acl_libdirstem2/)
14446                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14447                 if test "$name" = 'iconv'; then
14448                   LIBICONV_PREFIX="$basedir"
14449                 fi
14450                 additional_includedir="$basedir/include"
14451                 ;;
14452               */$acl_libdirstem3 | */$acl_libdirstem3/)
14453                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
14454                 if test "$name" = 'iconv'; then
14455                   LIBICONV_PREFIX="$basedir"
14456                 fi
14457                 additional_includedir="$basedir/include"
14458                 ;;
14459             esac
14460             if test "X$additional_includedir" != "X"; then
14461                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14462                 haveit=
14463                 if test "X$additional_includedir" = "X/usr/local/include"; then
14464                   if test -n "$GCC"; then
14465                     case $host_os in
14466                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14467                     esac
14468                   fi
14469                 fi
14470                 if test -z "$haveit"; then
14471                   for x in $CPPFLAGS $INCICONV; do
14472
14473   acl_save_prefix="$prefix"
14474   prefix="$acl_final_prefix"
14475   acl_save_exec_prefix="$exec_prefix"
14476   exec_prefix="$acl_final_exec_prefix"
14477   eval x=\"$x\"
14478   exec_prefix="$acl_save_exec_prefix"
14479   prefix="$acl_save_prefix"
14480
14481                     if test "X$x" = "X-I$additional_includedir"; then
14482                       haveit=yes
14483                       break
14484                     fi
14485                   done
14486                   if test -z "$haveit"; then
14487                     if test -d "$additional_includedir"; then
14488                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
14489                     fi
14490                   fi
14491                 fi
14492               fi
14493             fi
14494                         if test -n "$found_la"; then
14495                                                         save_libdir="$libdir"
14496               case "$found_la" in
14497                 */* | *\\*) . "$found_la" ;;
14498                 *) . "./$found_la" ;;
14499               esac
14500               libdir="$save_libdir"
14501                             for dep in $dependency_libs; do
14502                 case "$dep" in
14503                   -L*)
14504                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14505                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
14506                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
14507                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
14508                       haveit=
14509                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
14510                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
14511                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
14512                         if test -n "$GCC"; then
14513                           case $host_os in
14514                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14515                           esac
14516                         fi
14517                       fi
14518                       if test -z "$haveit"; then
14519                         haveit=
14520                         for x in $LDFLAGS $LIBICONV; do
14521
14522   acl_save_prefix="$prefix"
14523   prefix="$acl_final_prefix"
14524   acl_save_exec_prefix="$exec_prefix"
14525   exec_prefix="$acl_final_exec_prefix"
14526   eval x=\"$x\"
14527   exec_prefix="$acl_save_exec_prefix"
14528   prefix="$acl_save_prefix"
14529
14530                           if test "X$x" = "X-L$dependency_libdir"; then
14531                             haveit=yes
14532                             break
14533                           fi
14534                         done
14535                         if test -z "$haveit"; then
14536                           if test -d "$dependency_libdir"; then
14537                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
14538                           fi
14539                         fi
14540                         haveit=
14541                         for x in $LDFLAGS $LTLIBICONV; do
14542
14543   acl_save_prefix="$prefix"
14544   prefix="$acl_final_prefix"
14545   acl_save_exec_prefix="$exec_prefix"
14546   exec_prefix="$acl_final_exec_prefix"
14547   eval x=\"$x\"
14548   exec_prefix="$acl_save_exec_prefix"
14549   prefix="$acl_save_prefix"
14550
14551                           if test "X$x" = "X-L$dependency_libdir"; then
14552                             haveit=yes
14553                             break
14554                           fi
14555                         done
14556                         if test -z "$haveit"; then
14557                           if test -d "$dependency_libdir"; then
14558                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
14559                           fi
14560                         fi
14561                       fi
14562                     fi
14563                     ;;
14564                   -R*)
14565                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14566                     if test "$enable_rpath" != no; then
14567                                                                   haveit=
14568                       for x in $rpathdirs; do
14569                         if test "X$x" = "X$dir"; then
14570                           haveit=yes
14571                           break
14572                         fi
14573                       done
14574                       if test -z "$haveit"; then
14575                         rpathdirs="$rpathdirs $dir"
14576                       fi
14577                                                                   haveit=
14578                       for x in $ltrpathdirs; do
14579                         if test "X$x" = "X$dir"; then
14580                           haveit=yes
14581                           break
14582                         fi
14583                       done
14584                       if test -z "$haveit"; then
14585                         ltrpathdirs="$ltrpathdirs $dir"
14586                       fi
14587                     fi
14588                     ;;
14589                   -l*)
14590                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
14591                     if test "X$dep" != Xc \
14592                        || case $host_os in
14593                             linux* | gnu* | k*bsd*-gnu) false ;;
14594                             *)                          true ;;
14595                           esac; then
14596                       names_next_round="$names_next_round $dep"
14597                     fi
14598                     ;;
14599                   *.la)
14600                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14601                     ;;
14602                   *)
14603                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
14604                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
14605                     ;;
14606                 esac
14607               done
14608             fi
14609           else
14610                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14611             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
14612           fi
14613         fi
14614       fi
14615     done
14616   done
14617   if test "X$rpathdirs" != "X"; then
14618     if test -n "$acl_hardcode_libdir_separator"; then
14619                         alldirs=
14620       for found_dir in $rpathdirs; do
14621         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14622       done
14623             acl_save_libdir="$libdir"
14624       libdir="$alldirs"
14625       eval flag=\"$acl_hardcode_libdir_flag_spec\"
14626       libdir="$acl_save_libdir"
14627       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14628     else
14629             for found_dir in $rpathdirs; do
14630         acl_save_libdir="$libdir"
14631         libdir="$found_dir"
14632         eval flag=\"$acl_hardcode_libdir_flag_spec\"
14633         libdir="$acl_save_libdir"
14634         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14635       done
14636     fi
14637   fi
14638   if test "X$ltrpathdirs" != "X"; then
14639             for found_dir in $ltrpathdirs; do
14640       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
14641     done
14642   fi
14643
14644
14645
14646
14647
14648
14649
14650
14651     ICONV_CONST=;
14652   REPLACE_ICONV=0;
14653   REPLACE_ICONV_OPEN=0;
14654   REPLACE_ICONV_UTF=0;
14655   ICONV_H='';
14656   if false; then
14657               ICONV_H='iconv.h'
14658      fi
14659
14660    if test -n "$ICONV_H"; then
14661   GL_GENERATE_ICONV_H_TRUE=
14662   GL_GENERATE_ICONV_H_FALSE='#'
14663 else
14664   GL_GENERATE_ICONV_H_TRUE='#'
14665   GL_GENERATE_ICONV_H_FALSE=
14666 fi
14667
14668
14669
14670
14671
14672
14673
14674           am_save_CPPFLAGS="$CPPFLAGS"
14675
14676   for element in $INCICONV; do
14677     haveit=
14678     for x in $CPPFLAGS; do
14679
14680   acl_save_prefix="$prefix"
14681   prefix="$acl_final_prefix"
14682   acl_save_exec_prefix="$exec_prefix"
14683   exec_prefix="$acl_final_exec_prefix"
14684   eval x=\"$x\"
14685   exec_prefix="$acl_save_exec_prefix"
14686   prefix="$acl_save_prefix"
14687
14688       if test "X$x" = "X$element"; then
14689         haveit=yes
14690         break
14691       fi
14692     done
14693     if test -z "$haveit"; then
14694       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14695     fi
14696   done
14697
14698
14699   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14700 printf %s "checking for iconv... " >&6; }
14701 if test ${am_cv_func_iconv+y}
14702 then :
14703   printf %s "(cached) " >&6
14704 else $as_nop
14705
14706     am_cv_func_iconv="no, consider installing GNU libiconv"
14707     am_cv_lib_iconv=no
14708     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h.  */
14710
14711 #include <stdlib.h>
14712 #include <iconv.h>
14713
14714 int
14715 main (void)
14716 {
14717 iconv_t cd = iconv_open("","");
14718            iconv(cd,NULL,NULL,NULL,NULL);
14719            iconv_close(cd);
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 if ac_fn_c_try_link "$LINENO"
14725 then :
14726   am_cv_func_iconv=yes
14727 fi
14728 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14729     conftest$ac_exeext conftest.$ac_ext
14730     if test "$am_cv_func_iconv" != yes; then
14731       am_save_LIBS="$LIBS"
14732       LIBS="$LIBS $LIBICONV"
14733       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734 /* end confdefs.h.  */
14735
14736 #include <stdlib.h>
14737 #include <iconv.h>
14738
14739 int
14740 main (void)
14741 {
14742 iconv_t cd = iconv_open("","");
14743              iconv(cd,NULL,NULL,NULL,NULL);
14744              iconv_close(cd);
14745   ;
14746   return 0;
14747 }
14748 _ACEOF
14749 if ac_fn_c_try_link "$LINENO"
14750 then :
14751   am_cv_lib_iconv=yes
14752         am_cv_func_iconv=yes
14753 fi
14754 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14755     conftest$ac_exeext conftest.$ac_ext
14756       LIBS="$am_save_LIBS"
14757     fi
14758
14759 fi
14760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14761 printf "%s\n" "$am_cv_func_iconv" >&6; }
14762   if test "$am_cv_func_iconv" = yes; then
14763     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14764 printf %s "checking for working iconv... " >&6; }
14765 if test ${am_cv_func_iconv_works+y}
14766 then :
14767   printf %s "(cached) " >&6
14768 else $as_nop
14769
14770                   am_save_LIBS="$LIBS"
14771       if test $am_cv_lib_iconv = yes; then
14772         LIBS="$LIBS $LIBICONV"
14773       fi
14774       am_cv_func_iconv_works=no
14775       for ac_iconv_const in '' 'const'; do
14776         if test "$cross_compiling" = yes
14777 then :
14778   case "$host_os" in
14779              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14780              *)            am_cv_func_iconv_works="guessing yes" ;;
14781            esac
14782 else $as_nop
14783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h.  */
14785
14786 #include <iconv.h>
14787 #include <string.h>
14788
14789 #ifndef ICONV_CONST
14790 # define ICONV_CONST $ac_iconv_const
14791 #endif
14792
14793 int
14794 main (void)
14795 {
14796 int result = 0;
14797   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14798      successful returns.  This is even documented in
14799      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14800   {
14801     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14802     if (cd_utf8_to_88591 != (iconv_t)(-1))
14803       {
14804         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14805         char buf[10];
14806         ICONV_CONST char *inptr = input;
14807         size_t inbytesleft = strlen (input);
14808         char *outptr = buf;
14809         size_t outbytesleft = sizeof (buf);
14810         size_t res = iconv (cd_utf8_to_88591,
14811                             &inptr, &inbytesleft,
14812                             &outptr, &outbytesleft);
14813         if (res == 0)
14814           result |= 1;
14815         iconv_close (cd_utf8_to_88591);
14816       }
14817   }
14818   /* Test against Solaris 10 bug: Failures are not distinguishable from
14819      successful returns.  */
14820   {
14821     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14822     if (cd_ascii_to_88591 != (iconv_t)(-1))
14823       {
14824         static ICONV_CONST char input[] = "\263";
14825         char buf[10];
14826         ICONV_CONST char *inptr = input;
14827         size_t inbytesleft = strlen (input);
14828         char *outptr = buf;
14829         size_t outbytesleft = sizeof (buf);
14830         size_t res = iconv (cd_ascii_to_88591,
14831                             &inptr, &inbytesleft,
14832                             &outptr, &outbytesleft);
14833         if (res == 0)
14834           result |= 2;
14835         iconv_close (cd_ascii_to_88591);
14836       }
14837   }
14838   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
14839   {
14840     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14841     if (cd_88591_to_utf8 != (iconv_t)(-1))
14842       {
14843         static ICONV_CONST char input[] = "\304";
14844         static char buf[2] = { (char)0xDE, (char)0xAD };
14845         ICONV_CONST char *inptr = input;
14846         size_t inbytesleft = 1;
14847         char *outptr = buf;
14848         size_t outbytesleft = 1;
14849         size_t res = iconv (cd_88591_to_utf8,
14850                             &inptr, &inbytesleft,
14851                             &outptr, &outbytesleft);
14852         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14853           result |= 4;
14854         iconv_close (cd_88591_to_utf8);
14855       }
14856   }
14857 #if 0 /* This bug could be worked around by the caller.  */
14858   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
14859   {
14860     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14861     if (cd_88591_to_utf8 != (iconv_t)(-1))
14862       {
14863         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14864         char buf[50];
14865         ICONV_CONST char *inptr = input;
14866         size_t inbytesleft = strlen (input);
14867         char *outptr = buf;
14868         size_t outbytesleft = sizeof (buf);
14869         size_t res = iconv (cd_88591_to_utf8,
14870                             &inptr, &inbytesleft,
14871                             &outptr, &outbytesleft);
14872         if ((int)res > 0)
14873           result |= 8;
14874         iconv_close (cd_88591_to_utf8);
14875       }
14876   }
14877 #endif
14878   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14879      provided.  */
14880   {
14881     /* Try standardized names.  */
14882     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14883     /* Try IRIX, OSF/1 names.  */
14884     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14885     /* Try AIX names.  */
14886     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14887     /* Try HP-UX names.  */
14888     iconv_t cd4 = iconv_open ("utf8", "eucJP");
14889     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14890         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14891       result |= 16;
14892     if (cd1 != (iconv_t)(-1))
14893       iconv_close (cd1);
14894     if (cd2 != (iconv_t)(-1))
14895       iconv_close (cd2);
14896     if (cd3 != (iconv_t)(-1))
14897       iconv_close (cd3);
14898     if (cd4 != (iconv_t)(-1))
14899       iconv_close (cd4);
14900   }
14901   return result;
14902
14903   ;
14904   return 0;
14905 }
14906 _ACEOF
14907 if ac_fn_c_try_run "$LINENO"
14908 then :
14909   am_cv_func_iconv_works=yes
14910 fi
14911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14912   conftest.$ac_objext conftest.beam conftest.$ac_ext
14913 fi
14914
14915         test "$am_cv_func_iconv_works" = no || break
14916       done
14917       LIBS="$am_save_LIBS"
14918
14919 fi
14920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14921 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
14922     case "$am_cv_func_iconv_works" in
14923       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14924       *)   am_func_iconv=yes ;;
14925     esac
14926   else
14927     am_func_iconv=no am_cv_lib_iconv=no
14928   fi
14929   if test "$am_func_iconv" = yes; then
14930
14931 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
14932
14933   fi
14934   if test "$am_cv_lib_iconv" = yes; then
14935     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14936 printf %s "checking how to link with libiconv... " >&6; }
14937     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14938 printf "%s\n" "$LIBICONV" >&6; }
14939   else
14940             CPPFLAGS="$am_save_CPPFLAGS"
14941     LIBICONV=
14942     LTLIBICONV=
14943   fi
14944
14945
14946
14947   if test "$am_cv_func_iconv" = yes; then
14948     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
14949 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
14950 if test ${gl_cv_iconv_nonconst+y}
14951 then :
14952   printf %s "(cached) " >&6
14953 else $as_nop
14954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955 /* end confdefs.h.  */
14956
14957 #include <stdlib.h>
14958 #include <iconv.h>
14959 extern
14960 #ifdef __cplusplus
14961 "C"
14962 #endif
14963 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14964
14965 int
14966 main (void)
14967 {
14968
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 if ac_fn_c_try_compile "$LINENO"
14974 then :
14975   gl_cv_iconv_nonconst=yes
14976 else $as_nop
14977   gl_cv_iconv_nonconst=no
14978 fi
14979 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14980
14981 fi
14982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
14983 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
14984   else
14985             gl_cv_iconv_nonconst=yes
14986   fi
14987   if test $gl_cv_iconv_nonconst = yes; then
14988     iconv_arg1=""
14989   else
14990     iconv_arg1="const"
14991   fi
14992
14993 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
14994
14995
14996      if test $gl_cv_iconv_nonconst != yes; then
14997        ICONV_CONST="const"
14998      fi
14999
15000
15001
15002
15003   GL_GNULIB_ICONV=0
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020      if test $gl_cv_have_include_next = yes; then
15021        gl_cv_next_iconv_h='<'iconv.h'>'
15022      else
15023        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
15024 printf %s "checking absolute name of <iconv.h>... " >&6; }
15025 if test ${gl_cv_next_iconv_h+y}
15026 then :
15027   printf %s "(cached) " >&6
15028 else $as_nop
15029
15030              if test $ac_cv_header_iconv_h = yes; then
15031
15032
15033
15034
15035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h.  */
15037 #include <iconv.h>
15038 _ACEOF
15039                 case "$host_os" in
15040     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15041     *)    gl_absname_cpp="$ac_cpp" ;;
15042   esac
15043
15044   case "$host_os" in
15045     mingw*)
15046                                           gl_dirsep_regex='[/\\]'
15047       ;;
15048     *)
15049       gl_dirsep_regex='\/'
15050       ;;
15051   esac
15052       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15053   gl_header_literal_regex=`echo 'iconv.h' \
15054                            | sed -e "$gl_make_literal_regex_sed"`
15055   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15056       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15057       s|^/[^/]|//&|
15058       p
15059       q
15060     }'
15061
15062         gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15063   sed -n "$gl_absolute_header_sed"`
15064
15065            gl_header=$gl_cv_absolute_iconv_h
15066            gl_cv_next_iconv_h='"'$gl_header'"'
15067           else
15068                gl_cv_next_iconv_h='<'iconv.h'>'
15069              fi
15070
15071
15072 fi
15073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
15074 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
15075      fi
15076      NEXT_ICONV_H=$gl_cv_next_iconv_h
15077
15078      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15079        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15080        gl_next_as_first_directive='<'iconv.h'>'
15081      else
15082        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15083        gl_next_as_first_directive=$gl_cv_next_iconv_h
15084      fi
15085      NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15098 printf %s "checking for inline... " >&6; }
15099 if test ${ac_cv_c_inline+y}
15100 then :
15101   printf %s "(cached) " >&6
15102 else $as_nop
15103   ac_cv_c_inline=no
15104 for ac_kw in inline __inline__ __inline; do
15105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15106 /* end confdefs.h.  */
15107 #ifndef __cplusplus
15108 typedef int foo_t;
15109 static $ac_kw foo_t static_foo (void) {return 0; }
15110 $ac_kw foo_t foo (void) {return 0; }
15111 #endif
15112
15113 _ACEOF
15114 if ac_fn_c_try_compile "$LINENO"
15115 then :
15116   ac_cv_c_inline=$ac_kw
15117 fi
15118 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15119   test "$ac_cv_c_inline" != no && break
15120 done
15121
15122 fi
15123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15124 printf "%s\n" "$ac_cv_c_inline" >&6; }
15125
15126 case $ac_cv_c_inline in
15127   inline | yes) ;;
15128   *)
15129     case $ac_cv_c_inline in
15130       no) ac_val=;;
15131       *) ac_val=$ac_cv_c_inline;;
15132     esac
15133     cat >>confdefs.h <<_ACEOF
15134 #ifndef __cplusplus
15135 #define inline $ac_val
15136 #endif
15137 _ACEOF
15138     ;;
15139 esac
15140
15141 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15142 if test "x$ac_cv_type_off_t" = xyes
15143 then :
15144
15145 else $as_nop
15146
15147 printf "%s\n" "#define off_t long int" >>confdefs.h
15148
15149 fi
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162      if test $gl_cv_have_include_next = yes; then
15163        gl_cv_next_limits_h='<'limits.h'>'
15164      else
15165        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
15166 printf %s "checking absolute name of <limits.h>... " >&6; }
15167 if test ${gl_cv_next_limits_h+y}
15168 then :
15169   printf %s "(cached) " >&6
15170 else $as_nop
15171
15172              if test $ac_cv_header_limits_h = yes; then
15173
15174
15175
15176
15177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15178 /* end confdefs.h.  */
15179 #include <limits.h>
15180 _ACEOF
15181                 case "$host_os" in
15182     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15183     *)    gl_absname_cpp="$ac_cpp" ;;
15184   esac
15185
15186   case "$host_os" in
15187     mingw*)
15188                                           gl_dirsep_regex='[/\\]'
15189       ;;
15190     *)
15191       gl_dirsep_regex='\/'
15192       ;;
15193   esac
15194       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15195   gl_header_literal_regex=`echo 'limits.h' \
15196                            | sed -e "$gl_make_literal_regex_sed"`
15197   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15198       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15199       s|^/[^/]|//&|
15200       p
15201       q
15202     }'
15203
15204         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15205   sed -n "$gl_absolute_header_sed"`
15206
15207            gl_header=$gl_cv_absolute_limits_h
15208            gl_cv_next_limits_h='"'$gl_header'"'
15209           else
15210                gl_cv_next_limits_h='<'limits.h'>'
15211              fi
15212
15213
15214 fi
15215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
15216 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
15217      fi
15218      NEXT_LIMITS_H=$gl_cv_next_limits_h
15219
15220      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15221        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15222        gl_next_as_first_directive='<'limits.h'>'
15223      else
15224        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15225        gl_next_as_first_directive=$gl_cv_next_limits_h
15226      fi
15227      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
15228
15229
15230
15231
15232
15233   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
15234 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
15235 if test ${gl_cv_header_limits_width+y}
15236 then :
15237   printf %s "(cached) " >&6
15238 else $as_nop
15239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15240 /* end confdefs.h.  */
15241 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15242              #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15243             #endif
15244             #include <limits.h>
15245             long long llm = LLONG_MAX;
15246             int wb = WORD_BIT;
15247             int ullw = ULLONG_WIDTH;
15248             int bw = BOOL_WIDTH;
15249
15250 int
15251 main (void)
15252 {
15253
15254   ;
15255   return 0;
15256 }
15257 _ACEOF
15258 if ac_fn_c_try_compile "$LINENO"
15259 then :
15260   gl_cv_header_limits_width=yes
15261 else $as_nop
15262   gl_cv_header_limits_width=no
15263 fi
15264 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15265 fi
15266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
15267 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
15268   if test "$gl_cv_header_limits_width" = yes; then
15269     LIMITS_H=
15270   else
15271     LIMITS_H=limits.h
15272   fi
15273
15274    if test -n "$LIMITS_H"; then
15275   GL_GENERATE_LIMITS_H_TRUE=
15276   GL_GENERATE_LIMITS_H_FALSE='#'
15277 else
15278   GL_GENERATE_LIMITS_H_TRUE='#'
15279   GL_GENERATE_LIMITS_H_FALSE=
15280 fi
15281
15282
15283
15284   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
15285 printf %s "checking for wint_t... " >&6; }
15286 if test ${gt_cv_c_wint_t+y}
15287 then :
15288   printf %s "(cached) " >&6
15289 else $as_nop
15290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15291 /* end confdefs.h.  */
15292 #include <wchar.h>
15293             wint_t foo = (wchar_t)'\0';
15294 int
15295 main (void)
15296 {
15297
15298   ;
15299   return 0;
15300 }
15301 _ACEOF
15302 if ac_fn_c_try_compile "$LINENO"
15303 then :
15304   gt_cv_c_wint_t=yes
15305 else $as_nop
15306   gt_cv_c_wint_t=no
15307 fi
15308 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15309 fi
15310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
15311 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
15312   if test $gt_cv_c_wint_t = yes; then
15313
15314 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
15315
15316
15317             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
15318 printf %s "checking whether wint_t is large enough... " >&6; }
15319 if test ${gl_cv_type_wint_t_large_enough+y}
15320 then :
15321   printf %s "(cached) " >&6
15322 else $as_nop
15323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15324 /* end confdefs.h.  */
15325 #include <wchar.h>
15326               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
15327
15328 int
15329 main (void)
15330 {
15331
15332   ;
15333   return 0;
15334 }
15335 _ACEOF
15336 if ac_fn_c_try_compile "$LINENO"
15337 then :
15338   gl_cv_type_wint_t_large_enough=yes
15339 else $as_nop
15340   gl_cv_type_wint_t_large_enough=no
15341 fi
15342 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15343 fi
15344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
15345 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
15346     if test $gl_cv_type_wint_t_large_enough = no; then
15347       GNULIBHEADERS_OVERRIDE_WINT_T=1
15348     else
15349       GNULIBHEADERS_OVERRIDE_WINT_T=0
15350     fi
15351   else
15352     GNULIBHEADERS_OVERRIDE_WINT_T=0
15353   fi
15354
15355
15356
15357     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
15358 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
15359 if test ${gl_cv_c_multiarch+y}
15360 then :
15361   printf %s "(cached) " >&6
15362 else $as_nop
15363   gl_cv_c_multiarch=no
15364      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h.  */
15366 #ifndef __APPLE_CC__
15367             not a universal capable compiler
15368            #endif
15369            typedef int dummy;
15370
15371 _ACEOF
15372 if ac_fn_c_try_compile "$LINENO"
15373 then :
15374
15375                         arch=
15376         prev=
15377         for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
15378           if test -n "$prev"; then
15379             case $word in
15380               i?86 | x86_64 | ppc | ppc64 | arm | arm64)
15381                 if test -z "$arch" || test "$arch" = "$word"; then
15382                   arch="$word"
15383                 else
15384                   gl_cv_c_multiarch=yes
15385                 fi
15386                 ;;
15387             esac
15388             prev=
15389           else
15390             if test "x$word" = "x-arch"; then
15391               prev=arch
15392             fi
15393           fi
15394         done
15395
15396 fi
15397 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15398
15399 fi
15400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
15401 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
15402   if test $gl_cv_c_multiarch = yes; then
15403     APPLE_UNIVERSAL_BUILD=1
15404   else
15405     APPLE_UNIVERSAL_BUILD=0
15406   fi
15407
15408
15409
15410
15411
15412
15413
15414
15415 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
15416
15417
15418 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
15419
15420
15421
15422   if test $ac_cv_header_wchar_h = yes; then
15423     HAVE_WCHAR_H=1
15424   else
15425     HAVE_WCHAR_H=0
15426   fi
15427
15428
15429
15430   if test $ac_cv_header_inttypes_h = yes; then
15431     HAVE_INTTYPES_H=1
15432   else
15433     HAVE_INTTYPES_H=0
15434   fi
15435
15436
15437
15438   if test $ac_cv_header_sys_types_h = yes; then
15439     HAVE_SYS_TYPES_H=1
15440   else
15441     HAVE_SYS_TYPES_H=0
15442   fi
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454      if test $gl_cv_have_include_next = yes; then
15455        gl_cv_next_stdint_h='<'stdint.h'>'
15456      else
15457        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
15458 printf %s "checking absolute name of <stdint.h>... " >&6; }
15459 if test ${gl_cv_next_stdint_h+y}
15460 then :
15461   printf %s "(cached) " >&6
15462 else $as_nop
15463
15464              if test $ac_cv_header_stdint_h = yes; then
15465
15466
15467
15468
15469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470 /* end confdefs.h.  */
15471 #include <stdint.h>
15472 _ACEOF
15473                 case "$host_os" in
15474     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15475     *)    gl_absname_cpp="$ac_cpp" ;;
15476   esac
15477
15478   case "$host_os" in
15479     mingw*)
15480                                           gl_dirsep_regex='[/\\]'
15481       ;;
15482     *)
15483       gl_dirsep_regex='\/'
15484       ;;
15485   esac
15486       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15487   gl_header_literal_regex=`echo 'stdint.h' \
15488                            | sed -e "$gl_make_literal_regex_sed"`
15489   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15490       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15491       s|^/[^/]|//&|
15492       p
15493       q
15494     }'
15495
15496         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15497   sed -n "$gl_absolute_header_sed"`
15498
15499            gl_header=$gl_cv_absolute_stdint_h
15500            gl_cv_next_stdint_h='"'$gl_header'"'
15501           else
15502                gl_cv_next_stdint_h='<'stdint.h'>'
15503              fi
15504
15505
15506 fi
15507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
15508 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
15509      fi
15510      NEXT_STDINT_H=$gl_cv_next_stdint_h
15511
15512      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15513        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15514        gl_next_as_first_directive='<'stdint.h'>'
15515      else
15516        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15517        gl_next_as_first_directive=$gl_cv_next_stdint_h
15518      fi
15519      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
15520
15521
15522
15523
15524   if test $ac_cv_header_stdint_h = yes; then
15525     HAVE_STDINT_H=1
15526   else
15527     HAVE_STDINT_H=0
15528   fi
15529
15530
15531     if test $ac_cv_header_stdint_h = yes; then
15532     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
15533 printf %s "checking whether stdint.h conforms to C99... " >&6; }
15534 if test ${gl_cv_header_working_stdint_h+y}
15535 then :
15536   printf %s "(cached) " >&6
15537 else $as_nop
15538   gl_cv_header_working_stdint_h=no
15539        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15540 /* end confdefs.h.  */
15541
15542
15543 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15544 #define __STDC_CONSTANT_MACROS 1
15545 #define __STDC_LIMIT_MACROS 1
15546 #include <stdint.h>
15547 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
15548 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
15549 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
15550 #endif
15551
15552
15553   #include <stddef.h>
15554   #include <signal.h>
15555   #if HAVE_WCHAR_H
15556   # include <wchar.h>
15557   #endif
15558
15559
15560 #ifdef INT8_MAX
15561 int8_t a1 = INT8_MAX;
15562 int8_t a1min = INT8_MIN;
15563 #endif
15564 #ifdef INT16_MAX
15565 int16_t a2 = INT16_MAX;
15566 int16_t a2min = INT16_MIN;
15567 #endif
15568 #ifdef INT32_MAX
15569 int32_t a3 = INT32_MAX;
15570 int32_t a3min = INT32_MIN;
15571 #endif
15572 #ifdef INT64_MAX
15573 int64_t a4 = INT64_MAX;
15574 int64_t a4min = INT64_MIN;
15575 #endif
15576 #ifdef UINT8_MAX
15577 uint8_t b1 = UINT8_MAX;
15578 #else
15579 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
15580 #endif
15581 #ifdef UINT16_MAX
15582 uint16_t b2 = UINT16_MAX;
15583 #endif
15584 #ifdef UINT32_MAX
15585 uint32_t b3 = UINT32_MAX;
15586 #endif
15587 #ifdef UINT64_MAX
15588 uint64_t b4 = UINT64_MAX;
15589 #endif
15590 int_least8_t c1 = INT8_C (0x7f);
15591 int_least8_t c1max = INT_LEAST8_MAX;
15592 int_least8_t c1min = INT_LEAST8_MIN;
15593 int_least16_t c2 = INT16_C (0x7fff);
15594 int_least16_t c2max = INT_LEAST16_MAX;
15595 int_least16_t c2min = INT_LEAST16_MIN;
15596 int_least32_t c3 = INT32_C (0x7fffffff);
15597 int_least32_t c3max = INT_LEAST32_MAX;
15598 int_least32_t c3min = INT_LEAST32_MIN;
15599 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
15600 int_least64_t c4max = INT_LEAST64_MAX;
15601 int_least64_t c4min = INT_LEAST64_MIN;
15602 uint_least8_t d1 = UINT8_C (0xff);
15603 uint_least8_t d1max = UINT_LEAST8_MAX;
15604 uint_least16_t d2 = UINT16_C (0xffff);
15605 uint_least16_t d2max = UINT_LEAST16_MAX;
15606 uint_least32_t d3 = UINT32_C (0xffffffff);
15607 uint_least32_t d3max = UINT_LEAST32_MAX;
15608 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
15609 uint_least64_t d4max = UINT_LEAST64_MAX;
15610 int_fast8_t e1 = INT_FAST8_MAX;
15611 int_fast8_t e1min = INT_FAST8_MIN;
15612 int_fast16_t e2 = INT_FAST16_MAX;
15613 int_fast16_t e2min = INT_FAST16_MIN;
15614 int_fast32_t e3 = INT_FAST32_MAX;
15615 int_fast32_t e3min = INT_FAST32_MIN;
15616 int_fast64_t e4 = INT_FAST64_MAX;
15617 int_fast64_t e4min = INT_FAST64_MIN;
15618 uint_fast8_t f1 = UINT_FAST8_MAX;
15619 uint_fast16_t f2 = UINT_FAST16_MAX;
15620 uint_fast32_t f3 = UINT_FAST32_MAX;
15621 uint_fast64_t f4 = UINT_FAST64_MAX;
15622 #ifdef INTPTR_MAX
15623 intptr_t g = INTPTR_MAX;
15624 intptr_t gmin = INTPTR_MIN;
15625 #endif
15626 #ifdef UINTPTR_MAX
15627 uintptr_t h = UINTPTR_MAX;
15628 #endif
15629 intmax_t i = INTMAX_MAX;
15630 uintmax_t j = UINTMAX_MAX;
15631
15632 /* Check that SIZE_MAX has the correct type, if possible.  */
15633 #if 201112 <= __STDC_VERSION__
15634 int k = _Generic (SIZE_MAX, size_t: 0);
15635 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
15636        || (0x5110 <= __SUNPRO_C && !__STDC__))
15637 extern size_t k;
15638 extern __typeof__ (SIZE_MAX) k;
15639 #endif
15640
15641 #include <limits.h> /* for CHAR_BIT */
15642 #define TYPE_MINIMUM(t) \
15643   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
15644 #define TYPE_MAXIMUM(t) \
15645   ((t) ((t) 0 < (t) -1 \
15646         ? (t) -1 \
15647         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
15648 struct s {
15649   int check_PTRDIFF:
15650       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
15651       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
15652       ? 1 : -1;
15653   /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
15654   int check_SIG_ATOMIC:
15655       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
15656       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
15657       ? 1 : -1;
15658   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
15659   int check_WCHAR:
15660       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
15661       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
15662       ? 1 : -1;
15663   /* Detect bug in mingw.  */
15664   int check_WINT:
15665       WINT_MIN == TYPE_MINIMUM (wint_t)
15666       && WINT_MAX == TYPE_MAXIMUM (wint_t)
15667       ? 1 : -1;
15668
15669   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
15670   int check_UINT8_C:
15671         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
15672   int check_UINT16_C:
15673         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
15674
15675   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
15676 #ifdef UINT8_MAX
15677   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
15678 #endif
15679 #ifdef UINT16_MAX
15680   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
15681 #endif
15682 #ifdef UINT32_MAX
15683   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
15684 #endif
15685 #ifdef UINT64_MAX
15686   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
15687 #endif
15688   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
15689   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
15690   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
15691   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
15692   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
15693   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
15694   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
15695   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
15696   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
15697   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
15698   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
15699 };
15700
15701 int
15702 main (void)
15703 {
15704
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 if ac_fn_c_try_compile "$LINENO"
15710 then :
15711                                                     if test "$cross_compiling" = yes
15712 then :
15713   case "$host_os" in
15714                          # Guess yes on native Windows.
15715                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
15716                          # In general, assume it works.
15717                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
15718                esac
15719
15720 else $as_nop
15721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722 /* end confdefs.h.  */
15723
15724
15725 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15726 #define __STDC_CONSTANT_MACROS 1
15727 #define __STDC_LIMIT_MACROS 1
15728 #include <stdint.h>
15729
15730
15731   #include <stddef.h>
15732   #include <signal.h>
15733   #if HAVE_WCHAR_H
15734   # include <wchar.h>
15735   #endif
15736
15737
15738 #include <stdio.h>
15739 #include <string.h>
15740 #define MVAL(macro) MVAL1(macro)
15741 #define MVAL1(expression) #expression
15742 static const char *macro_values[] =
15743   {
15744 #ifdef INT8_MAX
15745     MVAL (INT8_MAX),
15746 #endif
15747 #ifdef INT16_MAX
15748     MVAL (INT16_MAX),
15749 #endif
15750 #ifdef INT32_MAX
15751     MVAL (INT32_MAX),
15752 #endif
15753 #ifdef INT64_MAX
15754     MVAL (INT64_MAX),
15755 #endif
15756 #ifdef UINT8_MAX
15757     MVAL (UINT8_MAX),
15758 #endif
15759 #ifdef UINT16_MAX
15760     MVAL (UINT16_MAX),
15761 #endif
15762 #ifdef UINT32_MAX
15763     MVAL (UINT32_MAX),
15764 #endif
15765 #ifdef UINT64_MAX
15766     MVAL (UINT64_MAX),
15767 #endif
15768     NULL
15769   };
15770
15771 int
15772 main (void)
15773 {
15774
15775   const char **mv;
15776   for (mv = macro_values; *mv != NULL; mv++)
15777     {
15778       const char *value = *mv;
15779       /* Test whether it looks like a cast expression.  */
15780       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
15781           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
15782           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
15783           || strncmp (value, "((int)"/*)*/, 6) == 0
15784           || strncmp (value, "((signed short)"/*)*/, 15) == 0
15785           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
15786         return mv - macro_values + 1;
15787     }
15788   return 0;
15789
15790   ;
15791   return 0;
15792 }
15793 _ACEOF
15794 if ac_fn_c_try_run "$LINENO"
15795 then :
15796   gl_cv_header_working_stdint_h=yes
15797 fi
15798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15799   conftest.$ac_objext conftest.beam conftest.$ac_ext
15800 fi
15801
15802
15803 fi
15804 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15805
15806 fi
15807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
15808 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
15809   fi
15810
15811   HAVE_C99_STDINT_H=0
15812   HAVE_SYS_BITYPES_H=0
15813   HAVE_SYS_INTTYPES_H=0
15814   STDINT_H=stdint.h
15815   case "$gl_cv_header_working_stdint_h" in
15816     *yes)
15817       HAVE_C99_STDINT_H=1
15818                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
15819 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
15820 if test ${gl_cv_header_stdint_without_STDC_macros+y}
15821 then :
15822   printf %s "(cached) " >&6
15823 else $as_nop
15824   gl_cv_header_stdint_without_STDC_macros=no
15825          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15826 /* end confdefs.h.  */
15827
15828
15829 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15830 #include <stdint.h>
15831
15832
15833   #include <stddef.h>
15834   #include <signal.h>
15835   #if HAVE_WCHAR_H
15836   # include <wchar.h>
15837   #endif
15838
15839
15840 intmax_t im = INTMAX_MAX;
15841 int32_t i32 = INT32_C (0x7fffffff);
15842
15843 int
15844 main (void)
15845 {
15846
15847   ;
15848   return 0;
15849 }
15850 _ACEOF
15851 if ac_fn_c_try_compile "$LINENO"
15852 then :
15853   gl_cv_header_stdint_without_STDC_macros=yes
15854 fi
15855 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15856
15857 fi
15858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
15859 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
15860
15861       if test $gl_cv_header_stdint_without_STDC_macros = no; then
15862
15863 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15864
15865
15866 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
15867
15868       fi
15869       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
15870 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
15871 if test ${gl_cv_header_stdint_width+y}
15872 then :
15873   printf %s "(cached) " >&6
15874 else $as_nop
15875   gl_cv_header_stdint_width=no
15876          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h.  */
15878
15879               /* Work if build is not clean.  */
15880               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
15881               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15882                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15883               #endif
15884               #include <stdint.h>
15885
15886   #include <stddef.h>
15887   #include <signal.h>
15888   #if HAVE_WCHAR_H
15889   # include <wchar.h>
15890   #endif
15891
15892               int iw = UINTMAX_WIDTH;
15893
15894 int
15895 main (void)
15896 {
15897
15898   ;
15899   return 0;
15900 }
15901 _ACEOF
15902 if ac_fn_c_try_compile "$LINENO"
15903 then :
15904   gl_cv_header_stdint_width=yes
15905 fi
15906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15907 fi
15908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
15909 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
15910       if test "$gl_cv_header_stdint_width" = yes; then
15911         STDINT_H=
15912       fi
15913       ;;
15914     *)
15915                   ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
15916 if test "x$ac_cv_header_sys_inttypes_h" = xyes
15917 then :
15918   printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
15919
15920 fi
15921 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
15922 if test "x$ac_cv_header_sys_bitypes_h" = xyes
15923 then :
15924   printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
15925
15926 fi
15927
15928       if test $ac_cv_header_sys_inttypes_h = yes; then
15929         HAVE_SYS_INTTYPES_H=1
15930       fi
15931       if test $ac_cv_header_sys_bitypes_h = yes; then
15932         HAVE_SYS_BITYPES_H=1
15933       fi
15934
15935
15936   if test $APPLE_UNIVERSAL_BUILD = 0; then
15937
15938
15939   for gltype in ptrdiff_t size_t ; do
15940     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15941 printf %s "checking for bit size of $gltype... " >&6; }
15942 if eval test \${gl_cv_bitsizeof_${gltype}+y}
15943 then :
15944   printf %s "(cached) " >&6
15945 else $as_nop
15946   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
15947   #include <stddef.h>
15948   #include <signal.h>
15949   #if HAVE_WCHAR_H
15950   # include <wchar.h>
15951   #endif
15952
15953 #include <limits.h>"
15954 then :
15955
15956 else $as_nop
15957   result=unknown
15958 fi
15959
15960        eval gl_cv_bitsizeof_${gltype}=\$result
15961
15962 fi
15963 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15964                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15965 printf "%s\n" "$ac_res" >&6; }
15966     eval result=\$gl_cv_bitsizeof_${gltype}
15967     if test $result = unknown; then
15968                                                 result=0
15969     fi
15970     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15971     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
15972
15973     eval BITSIZEOF_${GLTYPE}=\$result
15974   done
15975
15976
15977   fi
15978
15979
15980   for gltype in sig_atomic_t wchar_t wint_t ; do
15981     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15982 printf %s "checking for bit size of $gltype... " >&6; }
15983 if eval test \${gl_cv_bitsizeof_${gltype}+y}
15984 then :
15985   printf %s "(cached) " >&6
15986 else $as_nop
15987   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
15988   #include <stddef.h>
15989   #include <signal.h>
15990   #if HAVE_WCHAR_H
15991   # include <wchar.h>
15992   #endif
15993
15994 #include <limits.h>"
15995 then :
15996
15997 else $as_nop
15998   result=unknown
15999 fi
16000
16001        eval gl_cv_bitsizeof_${gltype}=\$result
16002
16003 fi
16004 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16005                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16006 printf "%s\n" "$ac_res" >&6; }
16007     eval result=\$gl_cv_bitsizeof_${gltype}
16008     if test $result = unknown; then
16009                                                 result=0
16010     fi
16011     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16012     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
16013
16014     eval BITSIZEOF_${GLTYPE}=\$result
16015   done
16016
16017
16018
16019
16020   for gltype in sig_atomic_t wchar_t wint_t ; do
16021     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16022 printf %s "checking whether $gltype is signed... " >&6; }
16023 if eval test \${gl_cv_type_${gltype}_signed+y}
16024 then :
16025   printf %s "(cached) " >&6
16026 else $as_nop
16027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028 /* end confdefs.h.  */
16029
16030   #include <stddef.h>
16031   #include <signal.h>
16032   #if HAVE_WCHAR_H
16033   # include <wchar.h>
16034   #endif
16035
16036             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16037 int
16038 main (void)
16039 {
16040
16041   ;
16042   return 0;
16043 }
16044 _ACEOF
16045 if ac_fn_c_try_compile "$LINENO"
16046 then :
16047   result=yes
16048 else $as_nop
16049   result=no
16050 fi
16051 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16052        eval gl_cv_type_${gltype}_signed=\$result
16053
16054 fi
16055 eval ac_res=\$gl_cv_type_${gltype}_signed
16056                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16057 printf "%s\n" "$ac_res" >&6; }
16058     eval result=\$gl_cv_type_${gltype}_signed
16059     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16060     if test "$result" = yes; then
16061       printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
16062
16063       eval HAVE_SIGNED_${GLTYPE}=1
16064     else
16065       eval HAVE_SIGNED_${GLTYPE}=0
16066     fi
16067   done
16068
16069
16070   gl_cv_type_ptrdiff_t_signed=yes
16071   gl_cv_type_size_t_signed=no
16072   if test $APPLE_UNIVERSAL_BUILD = 0; then
16073
16074
16075   for gltype in ptrdiff_t size_t ; do
16076     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16077 printf %s "checking for $gltype integer literal suffix... " >&6; }
16078 if eval test \${gl_cv_type_${gltype}_suffix+y}
16079 then :
16080   printf %s "(cached) " >&6
16081 else $as_nop
16082   eval gl_cv_type_${gltype}_suffix=no
16083        eval result=\$gl_cv_type_${gltype}_signed
16084        if test "$result" = yes; then
16085          glsufu=
16086        else
16087          glsufu=u
16088        fi
16089        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16090          case $glsuf in
16091            '')  gltype1='int';;
16092            l)   gltype1='long int';;
16093            ll)  gltype1='long long int';;
16094            i64) gltype1='__int64';;
16095            u)   gltype1='unsigned int';;
16096            ul)  gltype1='unsigned long int';;
16097            ull) gltype1='unsigned long long int';;
16098            ui64)gltype1='unsigned __int64';;
16099          esac
16100          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16101 /* end confdefs.h.  */
16102
16103   #include <stddef.h>
16104   #include <signal.h>
16105   #if HAVE_WCHAR_H
16106   # include <wchar.h>
16107   #endif
16108
16109               extern $gltype foo;
16110               extern $gltype1 foo;
16111 int
16112 main (void)
16113 {
16114
16115   ;
16116   return 0;
16117 }
16118 _ACEOF
16119 if ac_fn_c_try_compile "$LINENO"
16120 then :
16121   eval gl_cv_type_${gltype}_suffix=\$glsuf
16122 fi
16123 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16124          eval result=\$gl_cv_type_${gltype}_suffix
16125          test "$result" != no && break
16126        done
16127 fi
16128 eval ac_res=\$gl_cv_type_${gltype}_suffix
16129                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16130 printf "%s\n" "$ac_res" >&6; }
16131     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16132     eval result=\$gl_cv_type_${gltype}_suffix
16133     test "$result" = no && result=
16134     eval ${GLTYPE}_SUFFIX=\$result
16135     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
16136
16137   done
16138
16139
16140   fi
16141
16142
16143   for gltype in sig_atomic_t wchar_t wint_t ; do
16144     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16145 printf %s "checking for $gltype integer literal suffix... " >&6; }
16146 if eval test \${gl_cv_type_${gltype}_suffix+y}
16147 then :
16148   printf %s "(cached) " >&6
16149 else $as_nop
16150   eval gl_cv_type_${gltype}_suffix=no
16151        eval result=\$gl_cv_type_${gltype}_signed
16152        if test "$result" = yes; then
16153          glsufu=
16154        else
16155          glsufu=u
16156        fi
16157        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16158          case $glsuf in
16159            '')  gltype1='int';;
16160            l)   gltype1='long int';;
16161            ll)  gltype1='long long int';;
16162            i64) gltype1='__int64';;
16163            u)   gltype1='unsigned int';;
16164            ul)  gltype1='unsigned long int';;
16165            ull) gltype1='unsigned long long int';;
16166            ui64)gltype1='unsigned __int64';;
16167          esac
16168          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170
16171   #include <stddef.h>
16172   #include <signal.h>
16173   #if HAVE_WCHAR_H
16174   # include <wchar.h>
16175   #endif
16176
16177               extern $gltype foo;
16178               extern $gltype1 foo;
16179 int
16180 main (void)
16181 {
16182
16183   ;
16184   return 0;
16185 }
16186 _ACEOF
16187 if ac_fn_c_try_compile "$LINENO"
16188 then :
16189   eval gl_cv_type_${gltype}_suffix=\$glsuf
16190 fi
16191 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16192          eval result=\$gl_cv_type_${gltype}_suffix
16193          test "$result" != no && break
16194        done
16195 fi
16196 eval ac_res=\$gl_cv_type_${gltype}_suffix
16197                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16198 printf "%s\n" "$ac_res" >&6; }
16199     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16200     eval result=\$gl_cv_type_${gltype}_suffix
16201     test "$result" = no && result=
16202     eval ${GLTYPE}_SUFFIX=\$result
16203     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
16204
16205   done
16206
16207
16208
16209           if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
16210     BITSIZEOF_WINT_T=32
16211   fi
16212
16213       ;;
16214   esac
16215
16216
16217
16218   LIMITS_H='limits.h'
16219    if test -n "$LIMITS_H"; then
16220   GL_GENERATE_LIMITS_H_TRUE=
16221   GL_GENERATE_LIMITS_H_FALSE='#'
16222 else
16223   GL_GENERATE_LIMITS_H_TRUE='#'
16224   GL_GENERATE_LIMITS_H_FALSE=
16225 fi
16226
16227
16228
16229
16230
16231
16232
16233    if test -n "$STDINT_H"; then
16234   GL_GENERATE_STDINT_H_TRUE=
16235   GL_GENERATE_STDINT_H_FALSE='#'
16236 else
16237   GL_GENERATE_STDINT_H_TRUE='#'
16238   GL_GENERATE_STDINT_H_FALSE=
16239 fi
16240
16241
16242
16243     HAVE_DECL_IMAXABS=1;
16244   HAVE_DECL_IMAXDIV=1;
16245   HAVE_DECL_STRTOIMAX=1;
16246   HAVE_DECL_STRTOUMAX=1;
16247   HAVE_IMAXDIV_T=1;
16248   REPLACE_STRTOIMAX=0;
16249   REPLACE_STRTOUMAX=0;
16250   INT32_MAX_LT_INTMAX_MAX=1;
16251   INT64_MAX_EQ_LONG_MAX='defined _LP64';
16252   PRIPTR_PREFIX=__PRIPTR_PREFIX;
16253   UINT32_MAX_LT_UINTMAX_MAX=1;
16254   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270      if test $gl_cv_have_include_next = yes; then
16271        gl_cv_next_inttypes_h='<'inttypes.h'>'
16272      else
16273        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
16274 printf %s "checking absolute name of <inttypes.h>... " >&6; }
16275 if test ${gl_cv_next_inttypes_h+y}
16276 then :
16277   printf %s "(cached) " >&6
16278 else $as_nop
16279
16280              if test $ac_cv_header_inttypes_h = yes; then
16281
16282
16283
16284
16285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286 /* end confdefs.h.  */
16287 #include <inttypes.h>
16288 _ACEOF
16289                 case "$host_os" in
16290     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16291     *)    gl_absname_cpp="$ac_cpp" ;;
16292   esac
16293
16294   case "$host_os" in
16295     mingw*)
16296                                           gl_dirsep_regex='[/\\]'
16297       ;;
16298     *)
16299       gl_dirsep_regex='\/'
16300       ;;
16301   esac
16302       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16303   gl_header_literal_regex=`echo 'inttypes.h' \
16304                            | sed -e "$gl_make_literal_regex_sed"`
16305   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16306       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16307       s|^/[^/]|//&|
16308       p
16309       q
16310     }'
16311
16312         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16313   sed -n "$gl_absolute_header_sed"`
16314
16315            gl_header=$gl_cv_absolute_inttypes_h
16316            gl_cv_next_inttypes_h='"'$gl_header'"'
16317           else
16318                gl_cv_next_inttypes_h='<'inttypes.h'>'
16319              fi
16320
16321
16322 fi
16323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
16324 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
16325      fi
16326      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
16327
16328      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16329        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16330        gl_next_as_first_directive='<'inttypes.h'>'
16331      else
16332        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16333        gl_next_as_first_directive=$gl_cv_next_inttypes_h
16334      fi
16335      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352   PRIPTR_PREFIX=
16353   if test -n "$STDINT_H"; then
16354             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355 /* end confdefs.h.  */
16356
16357          #ifdef _WIN64
16358          LLP64
16359          #endif
16360
16361 int
16362 main (void)
16363 {
16364
16365   ;
16366   return 0;
16367 }
16368
16369 _ACEOF
16370 if ac_fn_c_try_compile "$LINENO"
16371 then :
16372   PRIPTR_PREFIX='"l"'
16373 else $as_nop
16374   PRIPTR_PREFIX='"ll"'
16375 fi
16376 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16377   else
16378         for glpfx in '' l ll I64; do
16379       case $glpfx in
16380         '')  gltype1='int';;
16381         l)   gltype1='long int';;
16382         ll)  gltype1='long long int';;
16383         I64) gltype1='__int64';;
16384       esac
16385       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386 /* end confdefs.h.  */
16387 #include <stdint.h>
16388            extern intptr_t foo;
16389            extern $gltype1 foo;
16390 int
16391 main (void)
16392 {
16393
16394   ;
16395   return 0;
16396 }
16397 _ACEOF
16398 if ac_fn_c_try_compile "$LINENO"
16399 then :
16400   PRIPTR_PREFIX='"'$glpfx'"'
16401 fi
16402 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16403       test -n "$PRIPTR_PREFIX" && break
16404     done
16405   fi
16406
16407
16408
16409   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
16410 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
16411 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
16412 then :
16413   printf %s "(cached) " >&6
16414 else $as_nop
16415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416 /* end confdefs.h.  */
16417 /* Work also in C++ mode.  */
16418             #define __STDC_LIMIT_MACROS 1
16419
16420             /* Work if build is not clean.  */
16421             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16422
16423             #include <limits.h>
16424             #if HAVE_STDINT_H
16425              #include <stdint.h>
16426             #endif
16427
16428             #if defined INT32_MAX && defined INTMAX_MAX
16429              #define CONDITION (INT32_MAX < INTMAX_MAX)
16430             #else
16431              #define CONDITION (sizeof (int) < sizeof (long long int))
16432             #endif
16433             int test[CONDITION ? 1 : -1];
16434 int
16435 main (void)
16436 {
16437
16438   ;
16439   return 0;
16440 }
16441 _ACEOF
16442 if ac_fn_c_try_compile "$LINENO"
16443 then :
16444   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
16445 else $as_nop
16446   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
16447 fi
16448 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16449 fi
16450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
16451 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
16452   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
16453     INT32_MAX_LT_INTMAX_MAX=1;
16454   else
16455     INT32_MAX_LT_INTMAX_MAX=0;
16456   fi
16457
16458
16459   if test $APPLE_UNIVERSAL_BUILD = 0; then
16460
16461   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
16462 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
16463 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
16464 then :
16465   printf %s "(cached) " >&6
16466 else $as_nop
16467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468 /* end confdefs.h.  */
16469 /* Work also in C++ mode.  */
16470             #define __STDC_LIMIT_MACROS 1
16471
16472             /* Work if build is not clean.  */
16473             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16474
16475             #include <limits.h>
16476             #if HAVE_STDINT_H
16477              #include <stdint.h>
16478             #endif
16479
16480             #if defined INT64_MAX
16481              #define CONDITION (INT64_MAX == LONG_MAX)
16482             #else
16483              #define CONDITION (sizeof (long long int) == sizeof (long int))
16484             #endif
16485             int test[CONDITION ? 1 : -1];
16486 int
16487 main (void)
16488 {
16489
16490   ;
16491   return 0;
16492 }
16493 _ACEOF
16494 if ac_fn_c_try_compile "$LINENO"
16495 then :
16496   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
16497 else $as_nop
16498   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
16499 fi
16500 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16501 fi
16502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
16503 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
16504   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
16505     INT64_MAX_EQ_LONG_MAX=1;
16506   else
16507     INT64_MAX_EQ_LONG_MAX=0;
16508   fi
16509
16510
16511   else
16512     INT64_MAX_EQ_LONG_MAX=-1
16513   fi
16514
16515   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
16516 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
16517 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
16518 then :
16519   printf %s "(cached) " >&6
16520 else $as_nop
16521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522 /* end confdefs.h.  */
16523 /* Work also in C++ mode.  */
16524             #define __STDC_LIMIT_MACROS 1
16525
16526             /* Work if build is not clean.  */
16527             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16528
16529             #include <limits.h>
16530             #if HAVE_STDINT_H
16531              #include <stdint.h>
16532             #endif
16533
16534             #if defined UINT32_MAX && defined UINTMAX_MAX
16535              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
16536             #else
16537              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
16538             #endif
16539             int test[CONDITION ? 1 : -1];
16540 int
16541 main (void)
16542 {
16543
16544   ;
16545   return 0;
16546 }
16547 _ACEOF
16548 if ac_fn_c_try_compile "$LINENO"
16549 then :
16550   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
16551 else $as_nop
16552   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
16553 fi
16554 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16555 fi
16556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
16557 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
16558   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
16559     UINT32_MAX_LT_UINTMAX_MAX=1;
16560   else
16561     UINT32_MAX_LT_UINTMAX_MAX=0;
16562   fi
16563
16564
16565   if test $APPLE_UNIVERSAL_BUILD = 0; then
16566
16567   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
16568 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
16569 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
16570 then :
16571   printf %s "(cached) " >&6
16572 else $as_nop
16573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574 /* end confdefs.h.  */
16575 /* Work also in C++ mode.  */
16576             #define __STDC_LIMIT_MACROS 1
16577
16578             /* Work if build is not clean.  */
16579             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16580
16581             #include <limits.h>
16582             #if HAVE_STDINT_H
16583              #include <stdint.h>
16584             #endif
16585
16586             #if defined UINT64_MAX
16587              #define CONDITION (UINT64_MAX == ULONG_MAX)
16588             #else
16589              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
16590             #endif
16591             int test[CONDITION ? 1 : -1];
16592 int
16593 main (void)
16594 {
16595
16596   ;
16597   return 0;
16598 }
16599 _ACEOF
16600 if ac_fn_c_try_compile "$LINENO"
16601 then :
16602   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
16603 else $as_nop
16604   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
16605 fi
16606 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16607 fi
16608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
16609 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
16610   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
16611     UINT64_MAX_EQ_ULONG_MAX=1;
16612   else
16613     UINT64_MAX_EQ_ULONG_MAX=0;
16614   fi
16615
16616
16617   else
16618     UINT64_MAX_EQ_ULONG_MAX=-1
16619   fi
16620
16621
16622
16623
16624   GL_GNULIB_IMAXABS=0
16625
16626
16627
16628   GL_GNULIB_IMAXDIV=0
16629
16630
16631
16632   GL_GNULIB_STRTOIMAX=0
16633
16634
16635
16636   GL_GNULIB_STRTOUMAX=0
16637
16638
16639
16640
16641
16642     HAVE_ISWBLANK=1;
16643   HAVE_WCTYPE_T=1;
16644   HAVE_WCTRANS_T=1;
16645   REPLACE_ISWBLANK=0;
16646   REPLACE_ISWDIGIT=0;
16647   REPLACE_ISWXDIGIT=0;
16648
16649
16650
16651
16652
16653   if test $ac_cv_header_crtdefs_h = yes; then
16654     HAVE_CRTDEFS_H=1
16655   else
16656     HAVE_CRTDEFS_H=0
16657   fi
16658
16659
16660
16661
16662
16663
16664
16665
16666   if test $ac_cv_func_iswcntrl = yes; then
16667     HAVE_ISWCNTRL=1
16668   else
16669     HAVE_ISWCNTRL=0
16670   fi
16671
16672
16673
16674   if test $gt_cv_c_wint_t = yes; then
16675     HAVE_WINT_T=1
16676   else
16677     HAVE_WINT_T=0
16678   fi
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692      if test $gl_cv_have_include_next = yes; then
16693        gl_cv_next_wctype_h='<'wctype.h'>'
16694      else
16695        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
16696 printf %s "checking absolute name of <wctype.h>... " >&6; }
16697 if test ${gl_cv_next_wctype_h+y}
16698 then :
16699   printf %s "(cached) " >&6
16700 else $as_nop
16701
16702              if test $ac_cv_header_wctype_h = yes; then
16703
16704
16705
16706
16707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708 /* end confdefs.h.  */
16709 #include <wctype.h>
16710 _ACEOF
16711                 case "$host_os" in
16712     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16713     *)    gl_absname_cpp="$ac_cpp" ;;
16714   esac
16715
16716   case "$host_os" in
16717     mingw*)
16718                                           gl_dirsep_regex='[/\\]'
16719       ;;
16720     *)
16721       gl_dirsep_regex='\/'
16722       ;;
16723   esac
16724       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16725   gl_header_literal_regex=`echo 'wctype.h' \
16726                            | sed -e "$gl_make_literal_regex_sed"`
16727   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16728       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16729       s|^/[^/]|//&|
16730       p
16731       q
16732     }'
16733
16734         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16735   sed -n "$gl_absolute_header_sed"`
16736
16737            gl_header=$gl_cv_absolute_wctype_h
16738            gl_cv_next_wctype_h='"'$gl_header'"'
16739           else
16740                gl_cv_next_wctype_h='<'wctype.h'>'
16741              fi
16742
16743
16744 fi
16745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
16746 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
16747      fi
16748      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
16749
16750      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16751        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16752        gl_next_as_first_directive='<'wctype.h'>'
16753      else
16754        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16755        gl_next_as_first_directive=$gl_cv_next_wctype_h
16756      fi
16757      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
16758
16759
16760
16761
16762   if test $ac_cv_header_wctype_h = yes; then
16763     if test $ac_cv_func_iswcntrl = yes; then
16764                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
16765 printf %s "checking whether iswcntrl works... " >&6; }
16766 if test ${gl_cv_func_iswcntrl_works+y}
16767 then :
16768   printf %s "(cached) " >&6
16769 else $as_nop
16770
16771           if test "$cross_compiling" = yes
16772 then :
16773                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774 /* end confdefs.h.  */
16775 #include <stdlib.h>
16776                           #if __GNU_LIBRARY__ == 1
16777                           Linux libc5 i18n is broken.
16778                           #endif
16779 int
16780 main (void)
16781 {
16782
16783   ;
16784   return 0;
16785 }
16786 _ACEOF
16787 if ac_fn_c_try_compile "$LINENO"
16788 then :
16789   gl_cv_func_iswcntrl_works="guessing yes"
16790 else $as_nop
16791   gl_cv_func_iswcntrl_works="guessing no"
16792 fi
16793 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16794
16795 else $as_nop
16796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797 /* end confdefs.h.  */
16798
16799                #include <wchar.h>
16800                #include <wctype.h>
16801                int main () { return iswprint ('x') == 0; }
16802
16803 _ACEOF
16804 if ac_fn_c_try_run "$LINENO"
16805 then :
16806   gl_cv_func_iswcntrl_works=yes
16807 else $as_nop
16808   gl_cv_func_iswcntrl_works=no
16809 fi
16810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16811   conftest.$ac_objext conftest.beam conftest.$ac_ext
16812 fi
16813
16814
16815 fi
16816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
16817 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
16818     fi
16819     HAVE_WCTYPE_H=1
16820   else
16821     HAVE_WCTYPE_H=0
16822   fi
16823
16824
16825   if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
16826     REPLACE_ISWCNTRL=1
16827   else
16828     case "$gl_cv_func_iswcntrl_works" in
16829       *yes) REPLACE_ISWCNTRL=0 ;;
16830       *)    REPLACE_ISWCNTRL=1 ;;
16831     esac
16832   fi
16833
16834
16835   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
16836         :
16837   fi
16838
16839   if test $REPLACE_ISWCNTRL = 1; then
16840     REPLACE_TOWLOWER=1
16841   else
16842     ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
16843 if test "x$ac_cv_func_towlower" = xyes
16844 then :
16845   printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
16846
16847 fi
16848
16849     if test $ac_cv_func_towlower = yes; then
16850       REPLACE_TOWLOWER=0
16851     else
16852       ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
16853           #if HAVE_WCTYPE_H
16854           # include <wctype.h>
16855           #endif
16856
16857 " "$ac_c_undeclared_builtin_options" "CFLAGS"
16858 if test "x$ac_cv_have_decl_towlower" = xyes
16859 then :
16860   ac_have_decl=1
16861 else $as_nop
16862   ac_have_decl=0
16863 fi
16864 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
16865
16866       if test $ac_cv_have_decl_towlower = yes; then
16867                                 REPLACE_TOWLOWER=1
16868       else
16869         REPLACE_TOWLOWER=0
16870       fi
16871     fi
16872   fi
16873
16874
16875   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
16876         :
16877   fi
16878
16879           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
16880 printf %s "checking for wctype_t... " >&6; }
16881 if test ${gl_cv_type_wctype_t+y}
16882 then :
16883   printf %s "(cached) " >&6
16884 else $as_nop
16885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16886 /* end confdefs.h.  */
16887 #include <wchar.h>
16888             #if HAVE_WCTYPE_H
16889             # include <wctype.h>
16890             #endif
16891             wctype_t a;
16892
16893 int
16894 main (void)
16895 {
16896
16897   ;
16898   return 0;
16899 }
16900 _ACEOF
16901 if ac_fn_c_try_compile "$LINENO"
16902 then :
16903   gl_cv_type_wctype_t=yes
16904 else $as_nop
16905   gl_cv_type_wctype_t=no
16906 fi
16907 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16908
16909 fi
16910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
16911 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
16912   if test $gl_cv_type_wctype_t = no; then
16913     HAVE_WCTYPE_T=0
16914   fi
16915
16916       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
16917 printf %s "checking for wctrans_t... " >&6; }
16918 if test ${gl_cv_type_wctrans_t+y}
16919 then :
16920   printf %s "(cached) " >&6
16921 else $as_nop
16922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16923 /* end confdefs.h.  */
16924 #include <wchar.h>
16925             #include <wctype.h>
16926             wctrans_t a;
16927
16928 int
16929 main (void)
16930 {
16931
16932   ;
16933   return 0;
16934 }
16935 _ACEOF
16936 if ac_fn_c_try_compile "$LINENO"
16937 then :
16938   gl_cv_type_wctrans_t=yes
16939 else $as_nop
16940   gl_cv_type_wctrans_t=no
16941 fi
16942 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16943
16944 fi
16945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
16946 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
16947   if test $gl_cv_type_wctrans_t = no; then
16948     HAVE_WCTRANS_T=0
16949   fi
16950
16951
16952
16953
16954
16955
16956
16957
16958   GL_GNULIB_ISWBLANK=0
16959
16960
16961
16962   GL_GNULIB_ISWDIGIT=0
16963
16964
16965
16966   GL_GNULIB_ISWXDIGIT=0
16967
16968
16969
16970   GL_GNULIB_WCTYPE=0
16971
16972
16973
16974   GL_GNULIB_ISWCTYPE=0
16975
16976
16977
16978   GL_GNULIB_WCTRANS=0
16979
16980
16981
16982   GL_GNULIB_TOWCTRANS=0
16983
16984
16985
16986
16987
16988
16989   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
16990 printf %s "checking for a traditional japanese locale... " >&6; }
16991 if test ${gt_cv_locale_ja+y}
16992 then :
16993   printf %s "(cached) " >&6
16994 else $as_nop
16995
16996     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997 /* end confdefs.h.  */
16998
16999 #include <locale.h>
17000 #include <time.h>
17001 #if HAVE_LANGINFO_CODESET
17002 # include <langinfo.h>
17003 #endif
17004 #include <stdlib.h>
17005 #include <string.h>
17006 struct tm t;
17007 char buf[16];
17008 int main ()
17009 {
17010   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
17011      imitates locale dependent behaviour by looking at the environment
17012      variables, and all locales use the UTF-8 encoding.  */
17013 #if defined __BEOS__ || defined __HAIKU__
17014   return 1;
17015 #else
17016   /* Check whether the given locale name is recognized by the system.  */
17017 # if defined _WIN32 && !defined __CYGWIN__
17018   /* On native Windows, setlocale(category, "") looks at the system settings,
17019      not at the environment variables.  Also, when an encoding suffix such
17020      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17021      category of the locale to "C".  */
17022   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17023       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17024     return 1;
17025 # else
17026   if (setlocale (LC_ALL, "") == NULL) return 1;
17027 # endif
17028   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17029      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17030      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17031      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17032      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17033      some unit tests fail.
17034      On MirBSD 10, when an unsupported locale is specified, setlocale()
17035      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
17036 # if HAVE_LANGINFO_CODESET
17037   {
17038     const char *cs = nl_langinfo (CODESET);
17039     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17040         || strcmp (cs, "UTF-8") == 0)
17041       return 1;
17042   }
17043 # endif
17044 # ifdef __CYGWIN__
17045   /* On Cygwin, avoid locale names without encoding suffix, because the
17046      locale_charset() function relies on the encoding suffix.  Note that
17047      LC_ALL is set on the command line.  */
17048   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17049 # endif
17050   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
17051      on Cygwin 1.5.x.  */
17052   if (MB_CUR_MAX == 1)
17053     return 1;
17054   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17055      This excludes the UTF-8 encoding (except on MirBSD).  */
17056   {
17057     const char *p;
17058     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17059     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17060     for (p = buf; *p != '\0'; p++)
17061       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17062         return 1;
17063   }
17064   return 0;
17065 #endif
17066 }
17067
17068 _ACEOF
17069     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17070   (eval $ac_link) 2>&5
17071   ac_status=$?
17072   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17073   test $ac_status = 0; } && test -s conftest$ac_exeext; then
17074       case "$host_os" in
17075         # Handle native Windows specially, because there setlocale() interprets
17076         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17077         # "fr" or "fra" as "French" or "French_France.1252",
17078         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17079         # "ja" as "Japanese" or "Japanese_Japan.932",
17080         # and similar.
17081         mingw*)
17082           # Note that on native Windows, the Japanese locale is
17083           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
17084           # cannot use it here.
17085           gt_cv_locale_ja=none
17086           ;;
17087         *)
17088           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17089           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17090           # configure script would override the LC_ALL setting. Likewise for
17091           # LC_CTYPE, which is also set at the beginning of the configure script.
17092           # Test for the AIX locale name.
17093           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17094             gt_cv_locale_ja=ja_JP
17095           else
17096             # Test for the locale name with explicit encoding suffix.
17097             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17098               gt_cv_locale_ja=ja_JP.EUC-JP
17099             else
17100               # Test for the HP-UX, OSF/1, NetBSD locale name.
17101               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17102                 gt_cv_locale_ja=ja_JP.eucJP
17103               else
17104                 # Test for the IRIX, FreeBSD locale name.
17105                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17106                   gt_cv_locale_ja=ja_JP.EUC
17107                 else
17108                   # Test for the Solaris 7 locale name.
17109                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17110                     gt_cv_locale_ja=ja
17111                   else
17112                     # Special test for NetBSD 1.6.
17113                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
17114                       gt_cv_locale_ja=ja_JP.eucJP
17115                     else
17116                       # None found.
17117                       gt_cv_locale_ja=none
17118                     fi
17119                   fi
17120                 fi
17121               fi
17122             fi
17123           fi
17124           ;;
17125       esac
17126     fi
17127     rm -fr conftest*
17128
17129 fi
17130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
17131 printf "%s\n" "$gt_cv_locale_ja" >&6; }
17132   LOCALE_JA=$gt_cv_locale_ja
17133
17134
17135
17136
17137   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
17138 printf %s "checking for a french Unicode locale... " >&6; }
17139 if test ${gt_cv_locale_fr_utf8+y}
17140 then :
17141   printf %s "(cached) " >&6
17142 else $as_nop
17143
17144     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h.  */
17146
17147 #include <locale.h>
17148 #include <time.h>
17149 #if HAVE_LANGINFO_CODESET
17150 # include <langinfo.h>
17151 #endif
17152 #include <stdlib.h>
17153 #include <string.h>
17154 struct tm t;
17155 char buf[16];
17156 int main () {
17157   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
17158      imitates locale dependent behaviour by looking at the environment
17159      variables, and all locales use the UTF-8 encoding.  */
17160 #if !(defined __BEOS__ || defined __HAIKU__)
17161   /* Check whether the given locale name is recognized by the system.  */
17162 # if defined _WIN32 && !defined __CYGWIN__
17163   /* On native Windows, setlocale(category, "") looks at the system settings,
17164      not at the environment variables.  Also, when an encoding suffix such
17165      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17166      category of the locale to "C".  */
17167   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17168       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17169     return 1;
17170 # else
17171   if (setlocale (LC_ALL, "") == NULL) return 1;
17172 # endif
17173   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17174      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17175      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17176      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17177      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17178      some unit tests fail.  */
17179 # if HAVE_LANGINFO_CODESET
17180   {
17181     const char *cs = nl_langinfo (CODESET);
17182     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
17183       return 1;
17184   }
17185 # endif
17186 # ifdef __CYGWIN__
17187   /* On Cygwin, avoid locale names without encoding suffix, because the
17188      locale_charset() function relies on the encoding suffix.  Note that
17189      LC_ALL is set on the command line.  */
17190   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17191 # endif
17192   /* Check whether in the abbreviation of the second month, the second
17193      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
17194      two bytes long, with UTF-8 encoding.  */
17195   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17196   if (strftime (buf, sizeof (buf), "%b", &t) < 4
17197       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
17198     return 1;
17199 #endif
17200 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
17201   /* Check whether the decimal separator is a comma.
17202      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
17203      are nl_langinfo(RADIXCHAR) are both ".".  */
17204   if (localeconv () ->decimal_point[0] != ',') return 1;
17205 #endif
17206   return 0;
17207 }
17208
17209 _ACEOF
17210     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17211   (eval $ac_link) 2>&5
17212   ac_status=$?
17213   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17214   test $ac_status = 0; } && test -s conftest$ac_exeext; then
17215       case "$host_os" in
17216         # Handle native Windows specially, because there setlocale() interprets
17217         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17218         # "fr" or "fra" as "French" or "French_France.1252",
17219         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17220         # "ja" as "Japanese" or "Japanese_Japan.932",
17221         # and similar.
17222         mingw*)
17223           # Test for the hypothetical native Windows locale name.
17224           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17225             gt_cv_locale_fr_utf8=French_France.65001
17226           else
17227             # None found.
17228             gt_cv_locale_fr_utf8=none
17229           fi
17230           ;;
17231         *)
17232           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17233           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17234           # configure script would override the LC_ALL setting. Likewise for
17235           # LC_CTYPE, which is also set at the beginning of the configure script.
17236           # Test for the usual locale name.
17237           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17238             gt_cv_locale_fr_utf8=fr_FR
17239           else
17240             # Test for the locale name with explicit encoding suffix.
17241             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17242               gt_cv_locale_fr_utf8=fr_FR.UTF-8
17243             else
17244               # Test for the Solaris 7 locale name.
17245               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17246                 gt_cv_locale_fr_utf8=fr.UTF-8
17247               else
17248                 # None found.
17249                 gt_cv_locale_fr_utf8=none
17250               fi
17251             fi
17252           fi
17253           ;;
17254       esac
17255     fi
17256     rm -fr conftest*
17257
17258 fi
17259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
17260 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
17261   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
17262
17263
17264
17265
17266
17267   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
17268 printf %s "checking for a transitional chinese locale... " >&6; }
17269 if test ${gt_cv_locale_zh_CN+y}
17270 then :
17271   printf %s "(cached) " >&6
17272 else $as_nop
17273
17274     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17275 /* end confdefs.h.  */
17276
17277 #include <locale.h>
17278 #include <stdlib.h>
17279 #include <time.h>
17280 #if HAVE_LANGINFO_CODESET
17281 # include <langinfo.h>
17282 #endif
17283 #include <stdlib.h>
17284 #include <string.h>
17285 struct tm t;
17286 char buf[16];
17287 int main ()
17288 {
17289   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
17290      imitates locale dependent behaviour by looking at the environment
17291      variables, and all locales use the UTF-8 encoding.  */
17292 #if defined __BEOS__ || defined __HAIKU__
17293   return 1;
17294 #else
17295   /* Check whether the given locale name is recognized by the system.  */
17296 # if defined _WIN32 && !defined __CYGWIN__
17297   /* On native Windows, setlocale(category, "") looks at the system settings,
17298      not at the environment variables.  Also, when an encoding suffix such
17299      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17300      category of the locale to "C".  */
17301   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17302       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17303     return 1;
17304 # else
17305   if (setlocale (LC_ALL, "") == NULL) return 1;
17306 # endif
17307   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17308      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17309      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17310      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17311      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17312      some unit tests fail.
17313      On MirBSD 10, when an unsupported locale is specified, setlocale()
17314      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
17315 # if HAVE_LANGINFO_CODESET
17316   {
17317     const char *cs = nl_langinfo (CODESET);
17318     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17319         || strcmp (cs, "UTF-8") == 0)
17320       return 1;
17321   }
17322 # endif
17323 # ifdef __CYGWIN__
17324   /* On Cygwin, avoid locale names without encoding suffix, because the
17325      locale_charset() function relies on the encoding suffix.  Note that
17326      LC_ALL is set on the command line.  */
17327   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17328 # endif
17329   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17330      This excludes the UTF-8 encoding (except on MirBSD).  */
17331   {
17332     const char *p;
17333     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17334     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17335     for (p = buf; *p != '\0'; p++)
17336       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17337         return 1;
17338   }
17339   /* Check whether a typical GB18030 multibyte sequence is recognized as a
17340      single wide character.  This excludes the GB2312 and GBK encodings.  */
17341   if (mblen ("\203\062\332\066", 5) != 4)
17342     return 1;
17343   return 0;
17344 #endif
17345 }
17346
17347 _ACEOF
17348     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17349   (eval $ac_link) 2>&5
17350   ac_status=$?
17351   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17352   test $ac_status = 0; } && test -s conftest$ac_exeext; then
17353       case "$host_os" in
17354         # Handle native Windows specially, because there setlocale() interprets
17355         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17356         # "fr" or "fra" as "French" or "French_France.1252",
17357         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17358         # "ja" as "Japanese" or "Japanese_Japan.932",
17359         # and similar.
17360         mingw*)
17361           # Test for the hypothetical native Windows locale name.
17362           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17363             gt_cv_locale_zh_CN=Chinese_China.54936
17364           else
17365             # None found.
17366             gt_cv_locale_zh_CN=none
17367           fi
17368           ;;
17369         solaris2.8)
17370           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
17371           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
17372           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
17373           gt_cv_locale_zh_CN=none
17374           ;;
17375         *)
17376           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17377           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17378           # configure script would override the LC_ALL setting. Likewise for
17379           # LC_CTYPE, which is also set at the beginning of the configure script.
17380           # Test for the locale name without encoding suffix.
17381           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17382             gt_cv_locale_zh_CN=zh_CN
17383           else
17384             # Test for the locale name with explicit encoding suffix.
17385             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17386               gt_cv_locale_zh_CN=zh_CN.GB18030
17387             else
17388               # None found.
17389               gt_cv_locale_zh_CN=none
17390             fi
17391           fi
17392           ;;
17393       esac
17394     else
17395       # If there was a link error, due to mblen(), the system is so old that
17396       # it certainly doesn't have a chinese locale.
17397       gt_cv_locale_zh_CN=none
17398     fi
17399     rm -fr conftest*
17400
17401 fi
17402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
17403 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
17404   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
17405
17406
17407
17408     HAVE_NL_LANGINFO=1;
17409   REPLACE_NL_LANGINFO=0;
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426      if test $gl_cv_have_include_next = yes; then
17427        gl_cv_next_langinfo_h='<'langinfo.h'>'
17428      else
17429        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
17430 printf %s "checking absolute name of <langinfo.h>... " >&6; }
17431 if test ${gl_cv_next_langinfo_h+y}
17432 then :
17433   printf %s "(cached) " >&6
17434 else $as_nop
17435
17436              if test $ac_cv_header_langinfo_h = yes; then
17437
17438
17439
17440
17441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17442 /* end confdefs.h.  */
17443 #include <langinfo.h>
17444 _ACEOF
17445                 case "$host_os" in
17446     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17447     *)    gl_absname_cpp="$ac_cpp" ;;
17448   esac
17449
17450   case "$host_os" in
17451     mingw*)
17452                                           gl_dirsep_regex='[/\\]'
17453       ;;
17454     *)
17455       gl_dirsep_regex='\/'
17456       ;;
17457   esac
17458       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17459   gl_header_literal_regex=`echo 'langinfo.h' \
17460                            | sed -e "$gl_make_literal_regex_sed"`
17461   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17462       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17463       s|^/[^/]|//&|
17464       p
17465       q
17466     }'
17467
17468         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17469   sed -n "$gl_absolute_header_sed"`
17470
17471            gl_header=$gl_cv_absolute_langinfo_h
17472            gl_cv_next_langinfo_h='"'$gl_header'"'
17473           else
17474                gl_cv_next_langinfo_h='<'langinfo.h'>'
17475              fi
17476
17477
17478 fi
17479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
17480 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
17481      fi
17482      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
17483
17484      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17485        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17486        gl_next_as_first_directive='<'langinfo.h'>'
17487      else
17488        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17489        gl_next_as_first_directive=$gl_cv_next_langinfo_h
17490      fi
17491      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
17492
17493
17494
17495
17496
17497     HAVE_LANGINFO_CODESET=0
17498   HAVE_LANGINFO_T_FMT_AMPM=0
17499   HAVE_LANGINFO_ALTMON=0
17500   HAVE_LANGINFO_ERA=0
17501   HAVE_LANGINFO_YESEXPR=0
17502
17503   if test $ac_cv_header_langinfo_h = yes; then
17504     HAVE_LANGINFO_H=1
17505                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
17506 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
17507 if test ${gl_cv_header_langinfo_codeset+y}
17508 then :
17509   printf %s "(cached) " >&6
17510 else $as_nop
17511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h.  */
17513 #include <langinfo.h>
17514 int a = CODESET;
17515
17516 int
17517 main (void)
17518 {
17519
17520   ;
17521   return 0;
17522 }
17523 _ACEOF
17524 if ac_fn_c_try_compile "$LINENO"
17525 then :
17526   gl_cv_header_langinfo_codeset=yes
17527 else $as_nop
17528   gl_cv_header_langinfo_codeset=no
17529 fi
17530 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17531
17532 fi
17533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
17534 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
17535     if test $gl_cv_header_langinfo_codeset = yes; then
17536       HAVE_LANGINFO_CODESET=1
17537     fi
17538     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
17539 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
17540 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
17541 then :
17542   printf %s "(cached) " >&6
17543 else $as_nop
17544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17545 /* end confdefs.h.  */
17546 #include <langinfo.h>
17547 int a = T_FMT_AMPM;
17548
17549 int
17550 main (void)
17551 {
17552
17553   ;
17554   return 0;
17555 }
17556 _ACEOF
17557 if ac_fn_c_try_compile "$LINENO"
17558 then :
17559   gl_cv_header_langinfo_t_fmt_ampm=yes
17560 else $as_nop
17561   gl_cv_header_langinfo_t_fmt_ampm=no
17562 fi
17563 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17564
17565 fi
17566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
17567 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
17568     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
17569       HAVE_LANGINFO_T_FMT_AMPM=1
17570     fi
17571     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
17572 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
17573 if test ${gl_cv_header_langinfo_altmon+y}
17574 then :
17575   printf %s "(cached) " >&6
17576 else $as_nop
17577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578 /* end confdefs.h.  */
17579 #include <langinfo.h>
17580 int a = ALTMON_1;
17581
17582 int
17583 main (void)
17584 {
17585
17586   ;
17587   return 0;
17588 }
17589 _ACEOF
17590 if ac_fn_c_try_compile "$LINENO"
17591 then :
17592   gl_cv_header_langinfo_altmon=yes
17593 else $as_nop
17594   gl_cv_header_langinfo_altmon=no
17595 fi
17596 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17597
17598 fi
17599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
17600 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
17601     if test $gl_cv_header_langinfo_altmon = yes; then
17602       HAVE_LANGINFO_ALTMON=1
17603     fi
17604     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
17605 printf %s "checking whether langinfo.h defines ERA... " >&6; }
17606 if test ${gl_cv_header_langinfo_era+y}
17607 then :
17608   printf %s "(cached) " >&6
17609 else $as_nop
17610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h.  */
17612 #include <langinfo.h>
17613 int a = ERA;
17614
17615 int
17616 main (void)
17617 {
17618
17619   ;
17620   return 0;
17621 }
17622 _ACEOF
17623 if ac_fn_c_try_compile "$LINENO"
17624 then :
17625   gl_cv_header_langinfo_era=yes
17626 else $as_nop
17627   gl_cv_header_langinfo_era=no
17628 fi
17629 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17630
17631 fi
17632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
17633 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
17634     if test $gl_cv_header_langinfo_era = yes; then
17635       HAVE_LANGINFO_ERA=1
17636     fi
17637     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
17638 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
17639 if test ${gl_cv_header_langinfo_yesexpr+y}
17640 then :
17641   printf %s "(cached) " >&6
17642 else $as_nop
17643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17644 /* end confdefs.h.  */
17645 #include <langinfo.h>
17646 int a = YESEXPR;
17647
17648 int
17649 main (void)
17650 {
17651
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 if ac_fn_c_try_compile "$LINENO"
17657 then :
17658   gl_cv_header_langinfo_yesexpr=yes
17659 else $as_nop
17660   gl_cv_header_langinfo_yesexpr=no
17661 fi
17662 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17663
17664 fi
17665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
17666 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
17667     if test $gl_cv_header_langinfo_yesexpr = yes; then
17668       HAVE_LANGINFO_YESEXPR=1
17669     fi
17670   else
17671     HAVE_LANGINFO_H=0
17672   fi
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686   GL_GNULIB_NL_LANGINFO=0
17687
17688
17689
17690
17691     HAVE_NEWLOCALE=1;
17692   HAVE_DUPLOCALE=1;
17693   HAVE_FREELOCALE=1;
17694   REPLACE_LOCALECONV=0;
17695   REPLACE_SETLOCALE=0;
17696   REPLACE_NEWLOCALE=0;
17697   REPLACE_DUPLOCALE=0;
17698   REPLACE_FREELOCALE=0;
17699   REPLACE_STRUCT_LCONV=0;
17700   LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
17701
17702
17703     REPLACE_NULL=0;
17704   HAVE_MAX_ALIGN_T=1;
17705   HAVE_WCHAR_T=1;
17706
17707
17708   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
17709 printf %s "checking for wchar_t... " >&6; }
17710 if test ${gt_cv_c_wchar_t+y}
17711 then :
17712   printf %s "(cached) " >&6
17713 else $as_nop
17714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17715 /* end confdefs.h.  */
17716 #include <stddef.h>
17717             wchar_t foo = (wchar_t)'\0';
17718 int
17719 main (void)
17720 {
17721
17722   ;
17723   return 0;
17724 }
17725 _ACEOF
17726 if ac_fn_c_try_compile "$LINENO"
17727 then :
17728   gt_cv_c_wchar_t=yes
17729 else $as_nop
17730   gt_cv_c_wchar_t=no
17731 fi
17732 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17733 fi
17734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
17735 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
17736   if test $gt_cv_c_wchar_t = yes; then
17737
17738 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
17739
17740   fi
17741
17742
17743
17744
17745
17746
17747
17748   STDDEF_H=
17749
17750       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
17751 printf %s "checking for good max_align_t... " >&6; }
17752 if test ${gl_cv_type_max_align_t+y}
17753 then :
17754   printf %s "(cached) " >&6
17755 else $as_nop
17756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17757 /* end confdefs.h.  */
17758 #include <stddef.h>
17759             unsigned int s = sizeof (max_align_t);
17760             #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
17761             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
17762             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
17763             #endif
17764             typedef struct { char a; max_align_t b; } max_helper;
17765             typedef struct { char a; long b; } long_helper;
17766             typedef struct { char a; double b; } double_helper;
17767             typedef struct { char a; long double b; } long_double_helper;
17768             int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
17769             int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
17770             int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
17771
17772 int
17773 main (void)
17774 {
17775
17776   ;
17777   return 0;
17778 }
17779 _ACEOF
17780 if ac_fn_c_try_compile "$LINENO"
17781 then :
17782   gl_cv_type_max_align_t=yes
17783 else $as_nop
17784   gl_cv_type_max_align_t=no
17785 fi
17786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17787
17788 fi
17789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
17790 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
17791   if test $gl_cv_type_max_align_t = no; then
17792     HAVE_MAX_ALIGN_T=0
17793     STDDEF_H=stddef.h
17794   fi
17795
17796   if test $gt_cv_c_wchar_t = no; then
17797     HAVE_WCHAR_T=0
17798     STDDEF_H=stddef.h
17799   fi
17800
17801   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17802 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
17803 if test ${gl_cv_decl_null_works+y}
17804 then :
17805   printf %s "(cached) " >&6
17806 else $as_nop
17807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17808 /* end confdefs.h.  */
17809 #include <stddef.h>
17810       int test[2 * (sizeof NULL == sizeof (void *)) -1];
17811
17812 int
17813 main (void)
17814 {
17815
17816   ;
17817   return 0;
17818 }
17819 _ACEOF
17820 if ac_fn_c_try_compile "$LINENO"
17821 then :
17822   gl_cv_decl_null_works=yes
17823 else $as_nop
17824   gl_cv_decl_null_works=no
17825 fi
17826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17827 fi
17828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17829 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
17830   if test $gl_cv_decl_null_works = no; then
17831     REPLACE_NULL=1
17832     STDDEF_H=stddef.h
17833   fi
17834
17835
17836    if test -n "$STDDEF_H"; then
17837   GL_GENERATE_STDDEF_H_TRUE=
17838   GL_GENERATE_STDDEF_H_FALSE='#'
17839 else
17840   GL_GENERATE_STDDEF_H_TRUE='#'
17841   GL_GENERATE_STDDEF_H_FALSE=
17842 fi
17843
17844   if test -n "$STDDEF_H"; then
17845
17846
17847
17848
17849
17850
17851
17852
17853      if test $gl_cv_have_include_next = yes; then
17854        gl_cv_next_stddef_h='<'stddef.h'>'
17855      else
17856        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17857 printf %s "checking absolute name of <stddef.h>... " >&6; }
17858 if test ${gl_cv_next_stddef_h+y}
17859 then :
17860   printf %s "(cached) " >&6
17861 else $as_nop
17862
17863
17864
17865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17866 /* end confdefs.h.  */
17867 #include <stddef.h>
17868 _ACEOF
17869                 case "$host_os" in
17870     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17871     *)    gl_absname_cpp="$ac_cpp" ;;
17872   esac
17873
17874   case "$host_os" in
17875     mingw*)
17876                                           gl_dirsep_regex='[/\\]'
17877       ;;
17878     *)
17879       gl_dirsep_regex='\/'
17880       ;;
17881   esac
17882       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17883   gl_header_literal_regex=`echo 'stddef.h' \
17884                            | sed -e "$gl_make_literal_regex_sed"`
17885   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17886       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17887       s|^/[^/]|//&|
17888       p
17889       q
17890     }'
17891
17892         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17893   sed -n "$gl_absolute_header_sed"`
17894
17895            gl_header=$gl_cv_absolute_stddef_h
17896            gl_cv_next_stddef_h='"'$gl_header'"'
17897
17898
17899 fi
17900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17901 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
17902      fi
17903      NEXT_STDDEF_H=$gl_cv_next_stddef_h
17904
17905      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17906        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17907        gl_next_as_first_directive='<'stddef.h'>'
17908      else
17909        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17910        gl_next_as_first_directive=$gl_cv_next_stddef_h
17911      fi
17912      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17913
17914
17915
17916
17917   fi
17918
17919
17920
17921
17922
17923         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
17924 printf %s "checking whether locale.h defines locale_t... " >&6; }
17925 if test ${gl_cv_header_locale_has_locale_t+y}
17926 then :
17927   printf %s "(cached) " >&6
17928 else $as_nop
17929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17930 /* end confdefs.h.  */
17931 #include <locale.h>
17932             locale_t x;
17933 int
17934 main (void)
17935 {
17936
17937   ;
17938   return 0;
17939 }
17940 _ACEOF
17941 if ac_fn_c_try_compile "$LINENO"
17942 then :
17943   gl_cv_header_locale_has_locale_t=yes
17944 else $as_nop
17945   gl_cv_header_locale_has_locale_t=no
17946 fi
17947 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17948
17949 fi
17950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
17951 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
17952
17953
17954   if test $ac_cv_header_xlocale_h = yes; then
17955     HAVE_XLOCALE_H=1
17956     if test $gl_cv_header_locale_has_locale_t = yes; then
17957       gl_cv_header_locale_h_needs_xlocale_h=no
17958     else
17959       gl_cv_header_locale_h_needs_xlocale_h=yes
17960     fi
17961     HAVE_LOCALE_T=1
17962   else
17963     HAVE_XLOCALE_H=0
17964     gl_cv_header_locale_h_needs_xlocale_h=no
17965     if test $gl_cv_header_locale_has_locale_t = yes; then
17966       HAVE_LOCALE_T=1
17967     else
17968       HAVE_LOCALE_T=0
17969     fi
17970   fi
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983   case "$host_os" in
17984     solaris*)
17985
17986 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
17987
17988       ;;
17989   esac
17990
17991   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
17992 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
17993 if test ${gl_cv_header_locale_h_posix2001+y}
17994 then :
17995   printf %s "(cached) " >&6
17996 else $as_nop
17997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17998 /* end confdefs.h.  */
17999 #include <locale.h>
18000             int x = LC_MESSAGES;
18001             int y = sizeof (((struct lconv *) 0)->decimal_point);
18002 int
18003 main (void)
18004 {
18005
18006   ;
18007   return 0;
18008 }
18009 _ACEOF
18010 if ac_fn_c_try_compile "$LINENO"
18011 then :
18012   gl_cv_header_locale_h_posix2001=yes
18013 else $as_nop
18014   gl_cv_header_locale_h_posix2001=no
18015 fi
18016 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18017 fi
18018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
18019 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
18020
18021           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
18022 printf %s "checking whether struct lconv is properly defined... " >&6; }
18023 if test ${gl_cv_sys_struct_lconv_ok+y}
18024 then :
18025   printf %s "(cached) " >&6
18026 else $as_nop
18027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18028 /* end confdefs.h.  */
18029 #include <locale.h>
18030             struct lconv l;
18031             int x = sizeof (l.decimal_point);
18032             int y = sizeof (l.int_p_cs_precedes);
18033 int
18034 main (void)
18035 {
18036
18037   ;
18038   return 0;
18039 }
18040 _ACEOF
18041 if ac_fn_c_try_compile "$LINENO"
18042 then :
18043   gl_cv_sys_struct_lconv_ok=yes
18044 else $as_nop
18045   gl_cv_sys_struct_lconv_ok=no
18046 fi
18047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18048
18049 fi
18050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
18051 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
18052   if test $gl_cv_sys_struct_lconv_ok = no; then
18053             case "$host_os" in
18054       mingw*)
18055         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18056 /* end confdefs.h.  */
18057
18058 #ifdef _MSC_VER
18059  Special
18060 #endif
18061
18062 _ACEOF
18063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18064   $EGREP "Special" >/dev/null 2>&1
18065 then :
18066
18067 else $as_nop
18068   REPLACE_STRUCT_LCONV=1
18069 fi
18070 rm -rf conftest*
18071
18072         ;;
18073       *) REPLACE_STRUCT_LCONV=1 ;;
18074     esac
18075   fi
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085      if test $gl_cv_have_include_next = yes; then
18086        gl_cv_next_locale_h='<'locale.h'>'
18087      else
18088        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
18089 printf %s "checking absolute name of <locale.h>... " >&6; }
18090 if test ${gl_cv_next_locale_h+y}
18091 then :
18092   printf %s "(cached) " >&6
18093 else $as_nop
18094
18095
18096
18097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18098 /* end confdefs.h.  */
18099 #include <locale.h>
18100 _ACEOF
18101                 case "$host_os" in
18102     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18103     *)    gl_absname_cpp="$ac_cpp" ;;
18104   esac
18105
18106   case "$host_os" in
18107     mingw*)
18108                                           gl_dirsep_regex='[/\\]'
18109       ;;
18110     *)
18111       gl_dirsep_regex='\/'
18112       ;;
18113   esac
18114       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18115   gl_header_literal_regex=`echo 'locale.h' \
18116                            | sed -e "$gl_make_literal_regex_sed"`
18117   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18118       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18119       s|^/[^/]|//&|
18120       p
18121       q
18122     }'
18123
18124         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18125   sed -n "$gl_absolute_header_sed"`
18126
18127            gl_header=$gl_cv_absolute_locale_h
18128            gl_cv_next_locale_h='"'$gl_header'"'
18129
18130
18131 fi
18132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
18133 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
18134      fi
18135      NEXT_LOCALE_H=$gl_cv_next_locale_h
18136
18137      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18138        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18139        gl_next_as_first_directive='<'locale.h'>'
18140      else
18141        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18142        gl_next_as_first_directive=$gl_cv_next_locale_h
18143      fi
18144      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156   GL_GNULIB_LOCALECONV=0
18157
18158
18159
18160   GL_GNULIB_SETLOCALE=0
18161
18162
18163
18164   GL_GNULIB_SETLOCALE_NULL=0
18165
18166
18167
18168   GL_GNULIB_DUPLOCALE=0
18169
18170
18171
18172   GL_GNULIB_LOCALENAME=0
18173
18174
18175
18176
18177
18178   gl_threads_api=none
18179   LIBTHREAD=
18180   LTLIBTHREAD=
18181   LIBMULTITHREAD=
18182   LTLIBMULTITHREAD=
18183   if test "$gl_use_threads" != no; then
18184
18185
18186   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
18187 printf %s "checking whether imported symbols can be declared weak... " >&6; }
18188 if test ${gl_cv_have_weak+y}
18189 then :
18190   printf %s "(cached) " >&6
18191 else $as_nop
18192   gl_cv_have_weak=no
18193           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194 /* end confdefs.h.  */
18195 extern void xyzzy ();
18196 #pragma weak xyzzy
18197 int
18198 main (void)
18199 {
18200 xyzzy();
18201   ;
18202   return 0;
18203 }
18204 _ACEOF
18205 if ac_fn_c_try_link "$LINENO"
18206 then :
18207   gl_cv_have_weak=maybe
18208 fi
18209 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18210     conftest$ac_exeext conftest.$ac_ext
18211      if test $gl_cv_have_weak = maybe; then
18212                      if test "$cross_compiling" = yes
18213 then :
18214                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18215 /* end confdefs.h.  */
18216 #ifdef __ELF__
18217              Extensible Linking Format
18218              #endif
18219
18220 _ACEOF
18221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18222   $EGREP "Extensible Linking Format" >/dev/null 2>&1
18223 then :
18224   gl_cv_have_weak="guessing yes"
18225 else $as_nop
18226   gl_cv_have_weak="guessing no"
18227 fi
18228 rm -rf conftest*
18229
18230
18231 else $as_nop
18232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18233 /* end confdefs.h.  */
18234
18235 #include <stdio.h>
18236 #pragma weak fputs
18237 int main ()
18238 {
18239   return (fputs == NULL);
18240 }
18241 _ACEOF
18242 if ac_fn_c_try_run "$LINENO"
18243 then :
18244   gl_cv_have_weak=yes
18245 else $as_nop
18246   gl_cv_have_weak=no
18247 fi
18248 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18249   conftest.$ac_objext conftest.beam conftest.$ac_ext
18250 fi
18251
18252      fi
18253           case " $LDFLAGS " in
18254        *" -static "*) gl_cv_have_weak=no ;;
18255      esac
18256                     case "$gl_cv_have_weak" in
18257        *yes)
18258          case "$host_os" in
18259            freebsd* | dragonfly* | midnightbsd*)
18260              : > conftest1.c
18261              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
18262              cat <<EOF > conftest2.c
18263 #include <pthread.h>
18264 #pragma weak pthread_mutexattr_gettype
18265 int main ()
18266 {
18267   return (pthread_mutexattr_gettype != NULL);
18268 }
18269 EOF
18270              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
18271                || gl_cv_have_weak=no
18272              rm -f conftest1.c libempty.so conftest2.c conftest
18273              ;;
18274          esac
18275          ;;
18276      esac
18277
18278 fi
18279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
18280 printf "%s\n" "$gl_cv_have_weak" >&6; }
18281   case "$gl_cv_have_weak" in
18282     *yes)
18283
18284 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
18285
18286       ;;
18287   esac
18288
18289     if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18290
18291       :
18292     fi
18293     if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
18294
18295       gl_have_isoc_threads="$ac_cv_header_threads_h"
18296     fi
18297     if test "$gl_use_threads" = yes \
18298        || test "$gl_use_threads" = posix \
18299        || test "$gl_use_threads" = isoc+posix; then
18300
18301
18302   if test -z "$gl_pthreadlib_body_done"; then
18303     gl_pthread_api=no
18304     LIBPTHREAD=
18305     LIBPMULTITHREAD=
18306     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
18307     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
18308     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
18309 if test "x$ac_cv_header_pthread_h" = xyes
18310 then :
18311   gl_have_pthread_h=yes
18312 else $as_nop
18313   gl_have_pthread_h=no
18314 fi
18315
18316     if test "$gl_have_pthread_h" = yes; then
18317       # Other possible tests:
18318       #   -lpthreads (FSU threads, PCthreads)
18319       #   -lgthreads
18320       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
18321       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
18322       # the second one only in libpthread, and lock.c needs it.
18323       #
18324       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
18325       # needs -pthread for some reason.  See:
18326       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
18327       save_LIBS=$LIBS
18328       for gl_pthread in '' '-pthread'; do
18329         LIBS="$LIBS $gl_pthread"
18330         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18331 /* end confdefs.h.  */
18332 #include <pthread.h>
18333                pthread_mutex_t m;
18334                pthread_mutexattr_t ma;
18335
18336 int
18337 main (void)
18338 {
18339 pthread_mutex_lock (&m);
18340                pthread_mutexattr_init (&ma);
18341   ;
18342   return 0;
18343 }
18344 _ACEOF
18345 if ac_fn_c_try_link "$LINENO"
18346 then :
18347   gl_pthread_api=yes
18348            LIBPTHREAD=$gl_pthread
18349            LIBPMULTITHREAD=$gl_pthread
18350 fi
18351 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18352     conftest$ac_exeext conftest.$ac_ext
18353         LIBS=$save_LIBS
18354         test $gl_pthread_api = yes && break
18355       done
18356       echo "$as_me:18356: gl_pthread_api=$gl_pthread_api" >&5
18357       echo "$as_me:18357: LIBPTHREAD=$LIBPTHREAD" >&5
18358
18359       gl_pthread_in_glibc=no
18360       # On Linux with glibc >= 2.34, libc contains the fully functional
18361       # pthread functions.
18362       case "$host_os" in
18363         linux*)
18364           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18365 /* end confdefs.h.  */
18366 #include <features.h>
18367              #ifdef __GNU_LIBRARY__
18368               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
18369                Lucky user
18370               #endif
18371              #endif
18372
18373 _ACEOF
18374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18375   $EGREP "Lucky user" >/dev/null 2>&1
18376 then :
18377   gl_pthread_in_glibc=yes
18378 fi
18379 rm -rf conftest*
18380
18381           ;;
18382       esac
18383       echo "$as_me:18383: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
18384
18385       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
18386       # since it is defined as a macro on OSF/1.)
18387       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
18388         # The program links fine without libpthread. But it may actually
18389         # need to link with libpthread in order to create multiple threads.
18390         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18391 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18392 if test ${ac_cv_lib_pthread_pthread_kill+y}
18393 then :
18394   printf %s "(cached) " >&6
18395 else $as_nop
18396   ac_check_lib_save_LIBS=$LIBS
18397 LIBS="-lpthread  $LIBS"
18398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18399 /* end confdefs.h.  */
18400
18401 /* Override any GCC internal prototype to avoid an error.
18402    Use char because int might match the return type of a GCC
18403    builtin and then its argument prototype would still apply.  */
18404 char pthread_kill ();
18405 int
18406 main (void)
18407 {
18408 return pthread_kill ();
18409   ;
18410   return 0;
18411 }
18412 _ACEOF
18413 if ac_fn_c_try_link "$LINENO"
18414 then :
18415   ac_cv_lib_pthread_pthread_kill=yes
18416 else $as_nop
18417   ac_cv_lib_pthread_pthread_kill=no
18418 fi
18419 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18420     conftest$ac_exeext conftest.$ac_ext
18421 LIBS=$ac_check_lib_save_LIBS
18422 fi
18423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18424 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18425 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18426 then :
18427   if test $gl_pthread_in_glibc = yes; then
18428              LIBPMULTITHREAD=
18429            else
18430              LIBPMULTITHREAD=-lpthread
18431              # On Solaris and HP-UX, most pthread functions exist also in libc.
18432              # Therefore pthread_in_use() needs to actually try to create a
18433              # thread: pthread_create from libc will fail, whereas
18434              # pthread_create will actually create a thread.
18435              # On Solaris 10 or newer, this test is no longer needed, because
18436              # libc contains the fully functional pthread functions.
18437              case "$host_os" in
18438                solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
18439
18440 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18441
18442              esac
18443            fi
18444
18445 fi
18446
18447       elif test $gl_pthread_api != yes; then
18448         # Some library is needed. Try libpthread and libc_r.
18449         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18450 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18451 if test ${ac_cv_lib_pthread_pthread_kill+y}
18452 then :
18453   printf %s "(cached) " >&6
18454 else $as_nop
18455   ac_check_lib_save_LIBS=$LIBS
18456 LIBS="-lpthread  $LIBS"
18457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458 /* end confdefs.h.  */
18459
18460 /* Override any GCC internal prototype to avoid an error.
18461    Use char because int might match the return type of a GCC
18462    builtin and then its argument prototype would still apply.  */
18463 char pthread_kill ();
18464 int
18465 main (void)
18466 {
18467 return pthread_kill ();
18468   ;
18469   return 0;
18470 }
18471 _ACEOF
18472 if ac_fn_c_try_link "$LINENO"
18473 then :
18474   ac_cv_lib_pthread_pthread_kill=yes
18475 else $as_nop
18476   ac_cv_lib_pthread_pthread_kill=no
18477 fi
18478 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18479     conftest$ac_exeext conftest.$ac_ext
18480 LIBS=$ac_check_lib_save_LIBS
18481 fi
18482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18483 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18484 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18485 then :
18486   gl_pthread_api=yes
18487            LIBPTHREAD=-lpthread
18488            LIBPMULTITHREAD=-lpthread
18489 fi
18490
18491         if test $gl_pthread_api != yes; then
18492           # For FreeBSD 4.
18493           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
18494 printf %s "checking for pthread_kill in -lc_r... " >&6; }
18495 if test ${ac_cv_lib_c_r_pthread_kill+y}
18496 then :
18497   printf %s "(cached) " >&6
18498 else $as_nop
18499   ac_check_lib_save_LIBS=$LIBS
18500 LIBS="-lc_r  $LIBS"
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18502 /* end confdefs.h.  */
18503
18504 /* Override any GCC internal prototype to avoid an error.
18505    Use char because int might match the return type of a GCC
18506    builtin and then its argument prototype would still apply.  */
18507 char pthread_kill ();
18508 int
18509 main (void)
18510 {
18511 return pthread_kill ();
18512   ;
18513   return 0;
18514 }
18515 _ACEOF
18516 if ac_fn_c_try_link "$LINENO"
18517 then :
18518   ac_cv_lib_c_r_pthread_kill=yes
18519 else $as_nop
18520   ac_cv_lib_c_r_pthread_kill=no
18521 fi
18522 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18523     conftest$ac_exeext conftest.$ac_ext
18524 LIBS=$ac_check_lib_save_LIBS
18525 fi
18526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
18527 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
18528 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
18529 then :
18530   gl_pthread_api=yes
18531              LIBPTHREAD=-lc_r
18532              LIBPMULTITHREAD=-lc_r
18533 fi
18534
18535         fi
18536       fi
18537       echo "$as_me:18537: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
18538     fi
18539     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
18540 printf %s "checking whether POSIX threads API is available... " >&6; }
18541     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
18542 printf "%s\n" "$gl_pthread_api" >&6; }
18543
18544
18545     if test $gl_pthread_api = yes; then
18546
18547 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
18548
18549     fi
18550
18551         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18552 /* end confdefs.h.  */
18553 #include <sched.h>
18554 int
18555 main (void)
18556 {
18557 sched_yield ();
18558   ;
18559   return 0;
18560 }
18561 _ACEOF
18562 if ac_fn_c_try_link "$LINENO"
18563 then :
18564   LIB_SCHED_YIELD=
18565
18566 else $as_nop
18567          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
18568 printf %s "checking for sched_yield in -lrt... " >&6; }
18569 if test ${ac_cv_lib_rt_sched_yield+y}
18570 then :
18571   printf %s "(cached) " >&6
18572 else $as_nop
18573   ac_check_lib_save_LIBS=$LIBS
18574 LIBS="-lrt  $LIBS"
18575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18576 /* end confdefs.h.  */
18577
18578 /* Override any GCC internal prototype to avoid an error.
18579    Use char because int might match the return type of a GCC
18580    builtin and then its argument prototype would still apply.  */
18581 char sched_yield ();
18582 int
18583 main (void)
18584 {
18585 return sched_yield ();
18586   ;
18587   return 0;
18588 }
18589 _ACEOF
18590 if ac_fn_c_try_link "$LINENO"
18591 then :
18592   ac_cv_lib_rt_sched_yield=yes
18593 else $as_nop
18594   ac_cv_lib_rt_sched_yield=no
18595 fi
18596 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18597     conftest$ac_exeext conftest.$ac_ext
18598 LIBS=$ac_check_lib_save_LIBS
18599 fi
18600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
18601 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
18602 if test "x$ac_cv_lib_rt_sched_yield" = xyes
18603 then :
18604   LIB_SCHED_YIELD=-lrt
18605 else $as_nop
18606             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
18607 printf %s "checking for sched_yield in -lposix4... " >&6; }
18608 if test ${ac_cv_lib_posix4_sched_yield+y}
18609 then :
18610   printf %s "(cached) " >&6
18611 else $as_nop
18612   ac_check_lib_save_LIBS=$LIBS
18613 LIBS="-lposix4  $LIBS"
18614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18615 /* end confdefs.h.  */
18616
18617 /* Override any GCC internal prototype to avoid an error.
18618    Use char because int might match the return type of a GCC
18619    builtin and then its argument prototype would still apply.  */
18620 char sched_yield ();
18621 int
18622 main (void)
18623 {
18624 return sched_yield ();
18625   ;
18626   return 0;
18627 }
18628 _ACEOF
18629 if ac_fn_c_try_link "$LINENO"
18630 then :
18631   ac_cv_lib_posix4_sched_yield=yes
18632 else $as_nop
18633   ac_cv_lib_posix4_sched_yield=no
18634 fi
18635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18636     conftest$ac_exeext conftest.$ac_ext
18637 LIBS=$ac_check_lib_save_LIBS
18638 fi
18639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
18640 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
18641 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
18642 then :
18643   LIB_SCHED_YIELD=-lposix4
18644 fi
18645
18646 fi
18647
18648
18649 fi
18650 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18651     conftest$ac_exeext conftest.$ac_ext
18652
18653
18654     gl_pthreadlib_body_done=done
18655   fi
18656
18657       LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
18658       LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
18659       if test $gl_pthread_api = yes; then
18660         if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
18661           gl_threads_api='isoc+posix'
18662
18663 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
18664
18665           LIBTHREAD= LTLIBTHREAD=
18666         else
18667           gl_threads_api=posix
18668
18669 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
18670
18671           if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
18672
18673 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
18674
18675           else
18676             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18677
18678 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
18679
18680               LIBTHREAD= LTLIBTHREAD=
18681             else
18682               case "$host_os" in
18683                 freebsd* | dragonfly* | midnightbsd*)
18684                   if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
18685
18686 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18687
18688                   fi
18689                   ;;
18690               esac
18691             fi
18692           fi
18693         fi
18694       fi
18695     fi
18696     if test $gl_threads_api = none; then
18697       if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
18698
18699
18700
18701   if test -z "$gl_stdthreadlib_body_done"; then
18702
18703
18704     case "$host_os" in
18705       mingw*)
18706         LIBSTDTHREAD=
18707         ;;
18708       *)
18709
18710
18711   if test -z "$gl_pthreadlib_body_done"; then
18712     gl_pthread_api=no
18713     LIBPTHREAD=
18714     LIBPMULTITHREAD=
18715     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
18716     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
18717     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
18718 if test "x$ac_cv_header_pthread_h" = xyes
18719 then :
18720   gl_have_pthread_h=yes
18721 else $as_nop
18722   gl_have_pthread_h=no
18723 fi
18724
18725     if test "$gl_have_pthread_h" = yes; then
18726       # Other possible tests:
18727       #   -lpthreads (FSU threads, PCthreads)
18728       #   -lgthreads
18729       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
18730       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
18731       # the second one only in libpthread, and lock.c needs it.
18732       #
18733       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
18734       # needs -pthread for some reason.  See:
18735       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
18736       save_LIBS=$LIBS
18737       for gl_pthread in '' '-pthread'; do
18738         LIBS="$LIBS $gl_pthread"
18739         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h.  */
18741 #include <pthread.h>
18742                pthread_mutex_t m;
18743                pthread_mutexattr_t ma;
18744
18745 int
18746 main (void)
18747 {
18748 pthread_mutex_lock (&m);
18749                pthread_mutexattr_init (&ma);
18750   ;
18751   return 0;
18752 }
18753 _ACEOF
18754 if ac_fn_c_try_link "$LINENO"
18755 then :
18756   gl_pthread_api=yes
18757            LIBPTHREAD=$gl_pthread
18758            LIBPMULTITHREAD=$gl_pthread
18759 fi
18760 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18761     conftest$ac_exeext conftest.$ac_ext
18762         LIBS=$save_LIBS
18763         test $gl_pthread_api = yes && break
18764       done
18765       echo "$as_me:18765: gl_pthread_api=$gl_pthread_api" >&5
18766       echo "$as_me:18766: LIBPTHREAD=$LIBPTHREAD" >&5
18767
18768       gl_pthread_in_glibc=no
18769       # On Linux with glibc >= 2.34, libc contains the fully functional
18770       # pthread functions.
18771       case "$host_os" in
18772         linux*)
18773           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18774 /* end confdefs.h.  */
18775 #include <features.h>
18776              #ifdef __GNU_LIBRARY__
18777               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
18778                Lucky user
18779               #endif
18780              #endif
18781
18782 _ACEOF
18783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18784   $EGREP "Lucky user" >/dev/null 2>&1
18785 then :
18786   gl_pthread_in_glibc=yes
18787 fi
18788 rm -rf conftest*
18789
18790           ;;
18791       esac
18792       echo "$as_me:18792: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
18793
18794       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
18795       # since it is defined as a macro on OSF/1.)
18796       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
18797         # The program links fine without libpthread. But it may actually
18798         # need to link with libpthread in order to create multiple threads.
18799         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18800 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18801 if test ${ac_cv_lib_pthread_pthread_kill+y}
18802 then :
18803   printf %s "(cached) " >&6
18804 else $as_nop
18805   ac_check_lib_save_LIBS=$LIBS
18806 LIBS="-lpthread  $LIBS"
18807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18808 /* end confdefs.h.  */
18809
18810 /* Override any GCC internal prototype to avoid an error.
18811    Use char because int might match the return type of a GCC
18812    builtin and then its argument prototype would still apply.  */
18813 char pthread_kill ();
18814 int
18815 main (void)
18816 {
18817 return pthread_kill ();
18818   ;
18819   return 0;
18820 }
18821 _ACEOF
18822 if ac_fn_c_try_link "$LINENO"
18823 then :
18824   ac_cv_lib_pthread_pthread_kill=yes
18825 else $as_nop
18826   ac_cv_lib_pthread_pthread_kill=no
18827 fi
18828 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18829     conftest$ac_exeext conftest.$ac_ext
18830 LIBS=$ac_check_lib_save_LIBS
18831 fi
18832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18833 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18834 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18835 then :
18836   if test $gl_pthread_in_glibc = yes; then
18837              LIBPMULTITHREAD=
18838            else
18839              LIBPMULTITHREAD=-lpthread
18840              # On Solaris and HP-UX, most pthread functions exist also in libc.
18841              # Therefore pthread_in_use() needs to actually try to create a
18842              # thread: pthread_create from libc will fail, whereas
18843              # pthread_create will actually create a thread.
18844              # On Solaris 10 or newer, this test is no longer needed, because
18845              # libc contains the fully functional pthread functions.
18846              case "$host_os" in
18847                solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
18848
18849 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18850
18851              esac
18852            fi
18853
18854 fi
18855
18856       elif test $gl_pthread_api != yes; then
18857         # Some library is needed. Try libpthread and libc_r.
18858         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18859 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18860 if test ${ac_cv_lib_pthread_pthread_kill+y}
18861 then :
18862   printf %s "(cached) " >&6
18863 else $as_nop
18864   ac_check_lib_save_LIBS=$LIBS
18865 LIBS="-lpthread  $LIBS"
18866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18867 /* end confdefs.h.  */
18868
18869 /* Override any GCC internal prototype to avoid an error.
18870    Use char because int might match the return type of a GCC
18871    builtin and then its argument prototype would still apply.  */
18872 char pthread_kill ();
18873 int
18874 main (void)
18875 {
18876 return pthread_kill ();
18877   ;
18878   return 0;
18879 }
18880 _ACEOF
18881 if ac_fn_c_try_link "$LINENO"
18882 then :
18883   ac_cv_lib_pthread_pthread_kill=yes
18884 else $as_nop
18885   ac_cv_lib_pthread_pthread_kill=no
18886 fi
18887 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18888     conftest$ac_exeext conftest.$ac_ext
18889 LIBS=$ac_check_lib_save_LIBS
18890 fi
18891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18892 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18893 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18894 then :
18895   gl_pthread_api=yes
18896            LIBPTHREAD=-lpthread
18897            LIBPMULTITHREAD=-lpthread
18898 fi
18899
18900         if test $gl_pthread_api != yes; then
18901           # For FreeBSD 4.
18902           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
18903 printf %s "checking for pthread_kill in -lc_r... " >&6; }
18904 if test ${ac_cv_lib_c_r_pthread_kill+y}
18905 then :
18906   printf %s "(cached) " >&6
18907 else $as_nop
18908   ac_check_lib_save_LIBS=$LIBS
18909 LIBS="-lc_r  $LIBS"
18910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18911 /* end confdefs.h.  */
18912
18913 /* Override any GCC internal prototype to avoid an error.
18914    Use char because int might match the return type of a GCC
18915    builtin and then its argument prototype would still apply.  */
18916 char pthread_kill ();
18917 int
18918 main (void)
18919 {
18920 return pthread_kill ();
18921   ;
18922   return 0;
18923 }
18924 _ACEOF
18925 if ac_fn_c_try_link "$LINENO"
18926 then :
18927   ac_cv_lib_c_r_pthread_kill=yes
18928 else $as_nop
18929   ac_cv_lib_c_r_pthread_kill=no
18930 fi
18931 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18932     conftest$ac_exeext conftest.$ac_ext
18933 LIBS=$ac_check_lib_save_LIBS
18934 fi
18935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
18936 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
18937 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
18938 then :
18939   gl_pthread_api=yes
18940              LIBPTHREAD=-lc_r
18941              LIBPMULTITHREAD=-lc_r
18942 fi
18943
18944         fi
18945       fi
18946       echo "$as_me:18946: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
18947     fi
18948     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
18949 printf %s "checking whether POSIX threads API is available... " >&6; }
18950     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
18951 printf "%s\n" "$gl_pthread_api" >&6; }
18952
18953
18954     if test $gl_pthread_api = yes; then
18955
18956 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
18957
18958     fi
18959
18960         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18961 /* end confdefs.h.  */
18962 #include <sched.h>
18963 int
18964 main (void)
18965 {
18966 sched_yield ();
18967   ;
18968   return 0;
18969 }
18970 _ACEOF
18971 if ac_fn_c_try_link "$LINENO"
18972 then :
18973   LIB_SCHED_YIELD=
18974
18975 else $as_nop
18976          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
18977 printf %s "checking for sched_yield in -lrt... " >&6; }
18978 if test ${ac_cv_lib_rt_sched_yield+y}
18979 then :
18980   printf %s "(cached) " >&6
18981 else $as_nop
18982   ac_check_lib_save_LIBS=$LIBS
18983 LIBS="-lrt  $LIBS"
18984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18985 /* end confdefs.h.  */
18986
18987 /* Override any GCC internal prototype to avoid an error.
18988    Use char because int might match the return type of a GCC
18989    builtin and then its argument prototype would still apply.  */
18990 char sched_yield ();
18991 int
18992 main (void)
18993 {
18994 return sched_yield ();
18995   ;
18996   return 0;
18997 }
18998 _ACEOF
18999 if ac_fn_c_try_link "$LINENO"
19000 then :
19001   ac_cv_lib_rt_sched_yield=yes
19002 else $as_nop
19003   ac_cv_lib_rt_sched_yield=no
19004 fi
19005 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19006     conftest$ac_exeext conftest.$ac_ext
19007 LIBS=$ac_check_lib_save_LIBS
19008 fi
19009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19010 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
19011 if test "x$ac_cv_lib_rt_sched_yield" = xyes
19012 then :
19013   LIB_SCHED_YIELD=-lrt
19014 else $as_nop
19015             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
19016 printf %s "checking for sched_yield in -lposix4... " >&6; }
19017 if test ${ac_cv_lib_posix4_sched_yield+y}
19018 then :
19019   printf %s "(cached) " >&6
19020 else $as_nop
19021   ac_check_lib_save_LIBS=$LIBS
19022 LIBS="-lposix4  $LIBS"
19023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19024 /* end confdefs.h.  */
19025
19026 /* Override any GCC internal prototype to avoid an error.
19027    Use char because int might match the return type of a GCC
19028    builtin and then its argument prototype would still apply.  */
19029 char sched_yield ();
19030 int
19031 main (void)
19032 {
19033 return sched_yield ();
19034   ;
19035   return 0;
19036 }
19037 _ACEOF
19038 if ac_fn_c_try_link "$LINENO"
19039 then :
19040   ac_cv_lib_posix4_sched_yield=yes
19041 else $as_nop
19042   ac_cv_lib_posix4_sched_yield=no
19043 fi
19044 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19045     conftest$ac_exeext conftest.$ac_ext
19046 LIBS=$ac_check_lib_save_LIBS
19047 fi
19048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
19049 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
19050 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
19051 then :
19052   LIB_SCHED_YIELD=-lposix4
19053 fi
19054
19055 fi
19056
19057
19058 fi
19059 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19060     conftest$ac_exeext conftest.$ac_ext
19061
19062
19063     gl_pthreadlib_body_done=done
19064   fi
19065
19066         if test $ac_cv_header_threads_h = yes; then
19067                                                             ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
19068 if test "x$ac_cv_func_thrd_create" = xyes
19069 then :
19070   printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
19071
19072 fi
19073
19074           if test $ac_cv_func_thrd_create = yes; then
19075             LIBSTDTHREAD=
19076           else
19077             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
19078 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
19079 if test ${ac_cv_lib_stdthreads_thrd_create+y}
19080 then :
19081   printf %s "(cached) " >&6
19082 else $as_nop
19083   ac_check_lib_save_LIBS=$LIBS
19084 LIBS="-lstdthreads  $LIBS"
19085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19086 /* end confdefs.h.  */
19087
19088 /* Override any GCC internal prototype to avoid an error.
19089    Use char because int might match the return type of a GCC
19090    builtin and then its argument prototype would still apply.  */
19091 char thrd_create ();
19092 int
19093 main (void)
19094 {
19095 return thrd_create ();
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 if ac_fn_c_try_link "$LINENO"
19101 then :
19102   ac_cv_lib_stdthreads_thrd_create=yes
19103 else $as_nop
19104   ac_cv_lib_stdthreads_thrd_create=no
19105 fi
19106 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19107     conftest$ac_exeext conftest.$ac_ext
19108 LIBS=$ac_check_lib_save_LIBS
19109 fi
19110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
19111 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
19112 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
19113 then :
19114
19115               LIBSTDTHREAD='-lstdthreads -lpthread'
19116
19117 else $as_nop
19118
19119                             LIBSTDTHREAD="$LIBPMULTITHREAD"
19120
19121 fi
19122
19123           fi
19124         else
19125                     LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
19126         fi
19127         ;;
19128     esac
19129
19130
19131     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
19132 printf %s "checking whether ISO C threads API is available... " >&6; }
19133     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
19134 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
19135     gl_stdthreadlib_body_done=done
19136   fi
19137
19138         LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
19139         LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
19140         gl_threads_api=isoc
19141
19142 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
19143
19144       fi
19145     fi
19146     if test $gl_threads_api = none; then
19147       case "$gl_use_threads" in
19148         yes | windows | win32) # The 'win32' is for backward compatibility.
19149           if { case "$host_os" in
19150                  mingw*) true;;
19151                  *) false;;
19152                esac
19153              }; then
19154             gl_threads_api=windows
19155
19156 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
19157
19158           fi
19159           ;;
19160       esac
19161     fi
19162   fi
19163   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
19164 printf %s "checking for multithread API to use... " >&6; }
19165   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
19166 printf "%s\n" "$gl_threads_api" >&6; }
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19179 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
19180 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
19181 then :
19182   printf %s "(cached) " >&6
19183 else $as_nop
19184   rm -f conftest.sym conftest.file
19185      echo >conftest.file
19186      if test "$cross_compiling" = yes
19187 then :
19188   case "$host_os" in
19189           linux-* | linux)
19190             # Guess yes on Linux systems.
19191             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19192           *-gnu* | gnu*)
19193             # Guess yes on glibc systems.
19194             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19195           mingw*)
19196             # Guess no on native Windows.
19197             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19198           *)
19199             # If we don't know, obey --enable-cross-guesses.
19200             gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
19201         esac
19202
19203 else $as_nop
19204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19205 /* end confdefs.h.  */
19206 $ac_includes_default
19207 int
19208 main (void)
19209 {
19210 struct stat sbuf;
19211             if (symlink ("conftest.file", "conftest.sym") != 0)
19212               return 1;
19213             /* Linux will dereference the symlink and fail, as required by
19214                POSIX.  That is better in the sense that it means we will not
19215                have to compile and use the lstat wrapper.  */
19216             return lstat ("conftest.sym/", &sbuf) == 0;
19217
19218   ;
19219   return 0;
19220 }
19221 _ACEOF
19222 if ac_fn_c_try_run "$LINENO"
19223 then :
19224   gl_cv_func_lstat_dereferences_slashed_symlink=yes
19225 else $as_nop
19226   gl_cv_func_lstat_dereferences_slashed_symlink=no
19227 fi
19228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19229   conftest.$ac_objext conftest.beam conftest.$ac_ext
19230 fi
19231
19232      rm -f conftest.sym conftest.file
19233
19234 fi
19235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19236 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19237   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19238     *yes)
19239
19240 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
19241
19242       ;;
19243   esac
19244
19245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
19246 printf %s "checking for a sed that does not truncate output... " >&6; }
19247 if test ${ac_cv_path_SED+y}
19248 then :
19249   printf %s "(cached) " >&6
19250 else $as_nop
19251             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
19252      for ac_i in 1 2 3 4 5 6 7; do
19253        ac_script="$ac_script$as_nl$ac_script"
19254      done
19255      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
19256      { ac_script=; unset ac_script;}
19257      if test -z "$SED"; then
19258   ac_path_SED_found=false
19259   # Loop through the user's path and test for each of PROGNAME-LIST
19260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19261 for as_dir in $PATH
19262 do
19263   IFS=$as_save_IFS
19264   case $as_dir in #(((
19265     '') as_dir=./ ;;
19266     */) ;;
19267     *) as_dir=$as_dir/ ;;
19268   esac
19269     for ac_prog in sed gsed
19270    do
19271     for ac_exec_ext in '' $ac_executable_extensions; do
19272       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
19273       as_fn_executable_p "$ac_path_SED" || continue
19274 # Check for GNU ac_path_SED and select it if it is found.
19275   # Check for GNU $ac_path_SED
19276 case `"$ac_path_SED" --version 2>&1` in
19277 *GNU*)
19278   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
19279 *)
19280   ac_count=0
19281   printf %s 0123456789 >"conftest.in"
19282   while :
19283   do
19284     cat "conftest.in" "conftest.in" >"conftest.tmp"
19285     mv "conftest.tmp" "conftest.in"
19286     cp "conftest.in" "conftest.nl"
19287     printf "%s\n" '' >> "conftest.nl"
19288     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
19289     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
19290     as_fn_arith $ac_count + 1 && ac_count=$as_val
19291     if test $ac_count -gt ${ac_path_SED_max-0}; then
19292       # Best one so far, save it but keep looking for a better one
19293       ac_cv_path_SED="$ac_path_SED"
19294       ac_path_SED_max=$ac_count
19295     fi
19296     # 10*(2^10) chars as input seems more than enough
19297     test $ac_count -gt 10 && break
19298   done
19299   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
19300 esac
19301
19302       $ac_path_SED_found && break 3
19303     done
19304   done
19305   done
19306 IFS=$as_save_IFS
19307   if test -z "$ac_cv_path_SED"; then
19308     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
19309   fi
19310 else
19311   ac_cv_path_SED=$SED
19312 fi
19313
19314 fi
19315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
19316 printf "%s\n" "$ac_cv_path_SED" >&6; }
19317  SED="$ac_cv_path_SED"
19318   rm -f conftest.sed
19319
19320
19321
19322     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
19323 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
19324 if test ${ac_cv_func_malloc_0_nonnull+y}
19325 then :
19326   printf %s "(cached) " >&6
19327 else $as_nop
19328   if test "$cross_compiling" = yes
19329 then :
19330   case "$host_os" in
19331           # Guess yes on platforms where we know the result.
19332           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
19333           | gnu* | *-musl* | midnightbsd* \
19334           | hpux* | solaris* | cygwin* | mingw* | msys* )
19335             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
19336           # If we don't know, obey --enable-cross-guesses.
19337           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
19338         esac
19339
19340 else $as_nop
19341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19342 /* end confdefs.h.  */
19343 #include <stdlib.h>
19344
19345 int
19346 main (void)
19347 {
19348 void *p = malloc (0);
19349             int result = !p;
19350             free (p);
19351             return result;
19352   ;
19353   return 0;
19354 }
19355
19356 _ACEOF
19357 if ac_fn_c_try_run "$LINENO"
19358 then :
19359   ac_cv_func_malloc_0_nonnull=yes
19360 else $as_nop
19361   ac_cv_func_malloc_0_nonnull=no
19362 fi
19363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19364   conftest.$ac_objext conftest.beam conftest.$ac_ext
19365 fi
19366
19367
19368 fi
19369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
19370 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
19371   case $ac_cv_func_malloc_0_nonnull in #(
19372   *yes) :
19373     gl_cv_func_malloc_0_nonnull=1 ;; #(
19374   *) :
19375     gl_cv_func_malloc_0_nonnull=0 ;;
19376 esac
19377
19378
19379 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
19380
19381
19382
19383
19384
19385
19386   GL_GNULIB_EXPLICIT_BZERO=0
19387
19388
19389
19390   GL_GNULIB_FFSL=0
19391
19392
19393
19394   GL_GNULIB_FFSLL=0
19395
19396
19397
19398   GL_GNULIB_MEMCHR=0
19399
19400
19401
19402   GL_GNULIB_MEMMEM=0
19403
19404
19405
19406   GL_GNULIB_MEMPCPY=0
19407
19408
19409
19410   GL_GNULIB_MEMRCHR=0
19411
19412
19413
19414   GL_GNULIB_RAWMEMCHR=0
19415
19416
19417
19418   GL_GNULIB_STPCPY=0
19419
19420
19421
19422   GL_GNULIB_STPNCPY=0
19423
19424
19425
19426   GL_GNULIB_STRCHRNUL=0
19427
19428
19429
19430   GL_GNULIB_STRDUP=0
19431
19432
19433
19434   GL_GNULIB_STRNCAT=0
19435
19436
19437
19438   GL_GNULIB_STRNDUP=0
19439
19440
19441
19442   GL_GNULIB_STRNLEN=0
19443
19444
19445
19446   GL_GNULIB_STRPBRK=0
19447
19448
19449
19450   GL_GNULIB_STRSEP=0
19451
19452
19453
19454   GL_GNULIB_STRSTR=0
19455
19456
19457
19458   GL_GNULIB_STRCASESTR=0
19459
19460
19461
19462   GL_GNULIB_STRTOK_R=0
19463
19464
19465
19466   GL_GNULIB_MBSLEN=0
19467
19468
19469
19470   GL_GNULIB_MBSNLEN=0
19471
19472
19473
19474   GL_GNULIB_MBSCHR=0
19475
19476
19477
19478   GL_GNULIB_MBSRCHR=0
19479
19480
19481
19482   GL_GNULIB_MBSSTR=0
19483
19484
19485
19486   GL_GNULIB_MBSCASECMP=0
19487
19488
19489
19490   GL_GNULIB_MBSNCASECMP=0
19491
19492
19493
19494   GL_GNULIB_MBSPCASECMP=0
19495
19496
19497
19498   GL_GNULIB_MBSCASESTR=0
19499
19500
19501
19502   GL_GNULIB_MBSCSPN=0
19503
19504
19505
19506   GL_GNULIB_MBSPBRK=0
19507
19508
19509
19510   GL_GNULIB_MBSSPN=0
19511
19512
19513
19514   GL_GNULIB_MBSSEP=0
19515
19516
19517
19518   GL_GNULIB_MBSTOK_R=0
19519
19520
19521
19522   GL_GNULIB_STRERROR=0
19523
19524
19525
19526   GL_GNULIB_STRERROR_R=0
19527
19528
19529
19530   GL_GNULIB_STRERRORNAME_NP=0
19531
19532
19533
19534   GL_GNULIB_SIGABBREV_NP=0
19535
19536
19537
19538   GL_GNULIB_SIGDESCR_NP=0
19539
19540
19541
19542   GL_GNULIB_STRSIGNAL=0
19543
19544
19545
19546   GL_GNULIB_STRVERSCMP=0
19547
19548
19549
19550   GL_GNULIB_MDA_MEMCCPY=1
19551
19552
19553
19554   GL_GNULIB_MDA_STRDUP=1
19555
19556
19557
19558
19559   HAVE_MBSLEN=0;
19560     HAVE_EXPLICIT_BZERO=1;
19561   HAVE_FFSL=1;
19562   HAVE_FFSLL=1;
19563   HAVE_DECL_MEMMEM=1;
19564   HAVE_MEMPCPY=1;
19565   HAVE_DECL_MEMRCHR=1;
19566   HAVE_RAWMEMCHR=1;
19567   HAVE_STPCPY=1;
19568   HAVE_STPNCPY=1;
19569   HAVE_STRCHRNUL=1;
19570   HAVE_DECL_STRDUP=1;
19571   HAVE_DECL_STRNDUP=1;
19572   HAVE_DECL_STRNLEN=1;
19573   HAVE_STRPBRK=1;
19574   HAVE_STRSEP=1;
19575   HAVE_STRCASESTR=1;
19576   HAVE_DECL_STRTOK_R=1;
19577   HAVE_DECL_STRERROR_R=1;
19578   HAVE_STRERRORNAME_NP=1;
19579   HAVE_SIGABBREV_NP=1;
19580   HAVE_SIGDESCR_NP=1;
19581   HAVE_DECL_STRSIGNAL=1;
19582   HAVE_STRVERSCMP=1;
19583   REPLACE_FFSLL=0;
19584   REPLACE_MEMCHR=0;
19585   REPLACE_MEMMEM=0;
19586   REPLACE_STPNCPY=0;
19587   REPLACE_STRCHRNUL=0;
19588   REPLACE_STRDUP=0;
19589   REPLACE_STRNCAT=0;
19590   REPLACE_STRNDUP=0;
19591   REPLACE_STRNLEN=0;
19592   REPLACE_STRSTR=0;
19593   REPLACE_STRCASESTR=0;
19594   REPLACE_STRTOK_R=0;
19595   REPLACE_STRERROR=0;
19596   REPLACE_STRERROR_R=0;
19597   REPLACE_STRERRORNAME_NP=0;
19598   REPLACE_STRSIGNAL=0;
19599   UNDEFINE_STRTOK_R=0;
19600
19601
19602
19603
19604
19605   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
19606   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
19607   # irrelevant for anonymous mappings.
19608   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
19609 if test "x$ac_cv_func_mmap" = xyes
19610 then :
19611   gl_have_mmap=yes
19612 else $as_nop
19613   gl_have_mmap=no
19614 fi
19615
19616
19617   # Try to allow MAP_ANONYMOUS.
19618   gl_have_mmap_anonymous=no
19619   if test $gl_have_mmap = yes; then
19620     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
19621 printf %s "checking for MAP_ANONYMOUS... " >&6; }
19622     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19623 /* end confdefs.h.  */
19624
19625 #include <sys/mman.h>
19626 #ifdef MAP_ANONYMOUS
19627     I cannot identify this map
19628 #endif
19629
19630 _ACEOF
19631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19632   $EGREP "I cannot identify this map" >/dev/null 2>&1
19633 then :
19634   gl_have_mmap_anonymous=yes
19635 fi
19636 rm -rf conftest*
19637
19638     if test $gl_have_mmap_anonymous != yes; then
19639       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19640 /* end confdefs.h.  */
19641
19642 #include <sys/mman.h>
19643 #ifdef MAP_ANON
19644     I cannot identify this map
19645 #endif
19646
19647 _ACEOF
19648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19649   $EGREP "I cannot identify this map" >/dev/null 2>&1
19650 then :
19651
19652 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
19653
19654          gl_have_mmap_anonymous=yes
19655 fi
19656 rm -rf conftest*
19657
19658     fi
19659     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
19660 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
19661     if test $gl_have_mmap_anonymous = yes; then
19662
19663 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
19664
19665     fi
19666   fi
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677   # Detect platform-specific bugs in some versions of glibc:
19678   # memchr should not dereference anything with length 0
19679   #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
19680   # memchr should not dereference overestimated length after a match
19681   #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
19682   #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
19683   # memchr should cast the second argument to 'unsigned char'.
19684   #   This bug exists in Android 4.3.
19685   # Assume that memchr works on platforms that lack mprotect.
19686   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
19687 printf %s "checking whether memchr works... " >&6; }
19688 if test ${gl_cv_func_memchr_works+y}
19689 then :
19690   printf %s "(cached) " >&6
19691 else $as_nop
19692   if test "$cross_compiling" = yes
19693 then :
19694   case "$host_os" in
19695                            # Guess no on Android.
19696           linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
19697                            # Guess yes on native Windows.
19698           mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
19699                            # If we don't know, obey --enable-cross-guesses.
19700           *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
19701         esac
19702
19703 else $as_nop
19704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19705 /* end confdefs.h.  */
19706
19707 #include <string.h>
19708 #if HAVE_SYS_MMAN_H
19709 # include <fcntl.h>
19710 # include <unistd.h>
19711 # include <sys/types.h>
19712 # include <sys/mman.h>
19713 # ifndef MAP_FILE
19714 #  define MAP_FILE 0
19715 # endif
19716 #endif
19717
19718 int
19719 main (void)
19720 {
19721
19722   int result = 0;
19723   char *fence = NULL;
19724 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
19725 # if HAVE_MAP_ANONYMOUS
19726   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
19727   const int fd = -1;
19728 # else /* !HAVE_MAP_ANONYMOUS */
19729   const int flags = MAP_FILE | MAP_PRIVATE;
19730   int fd = open ("/dev/zero", O_RDONLY, 0666);
19731   if (fd >= 0)
19732 # endif
19733     {
19734       int pagesize = getpagesize ();
19735       char *two_pages =
19736         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
19737                        flags, fd, 0);
19738       if (two_pages != (char *)(-1)
19739           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
19740         fence = two_pages + pagesize;
19741     }
19742 #endif
19743   if (fence)
19744     {
19745       /* Test against bugs on glibc systems.  */
19746       if (memchr (fence, 0, 0))
19747         result |= 1;
19748       strcpy (fence - 9, "12345678");
19749       if (memchr (fence - 9, 0, 79) != fence - 1)
19750         result |= 2;
19751       if (memchr (fence - 1, 0, 3) != fence - 1)
19752         result |= 4;
19753       /* Test against bug on AIX 7.2.  */
19754       if (memchr (fence - 4, '6', 16) != fence - 4)
19755         result |= 8;
19756     }
19757   /* Test against bug on Android 4.3.  */
19758   {
19759     char input[3];
19760     input[0] = 'a';
19761     input[1] = 'b';
19762     input[2] = 'c';
19763     if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
19764       result |= 16;
19765   }
19766   return result;
19767
19768   ;
19769   return 0;
19770 }
19771 _ACEOF
19772 if ac_fn_c_try_run "$LINENO"
19773 then :
19774   gl_cv_func_memchr_works=yes
19775 else $as_nop
19776   gl_cv_func_memchr_works=no
19777 fi
19778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19779   conftest.$ac_objext conftest.beam conftest.$ac_ext
19780 fi
19781
19782
19783 fi
19784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
19785 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
19786   case "$gl_cv_func_memchr_works" in
19787     *yes) ;;
19788     *) REPLACE_MEMCHR=1 ;;
19789   esac
19790
19791
19792
19793
19794
19795   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19796 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
19797 if test ${gl_cv_minmax_in_limits_h+y}
19798 then :
19799   printf %s "(cached) " >&6
19800 else $as_nop
19801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19802 /* end confdefs.h.  */
19803 #include <limits.h>
19804             int x = MIN (42, 17);
19805 int
19806 main (void)
19807 {
19808
19809   ;
19810   return 0;
19811 }
19812 _ACEOF
19813 if ac_fn_c_try_compile "$LINENO"
19814 then :
19815   gl_cv_minmax_in_limits_h=yes
19816 else $as_nop
19817   gl_cv_minmax_in_limits_h=no
19818 fi
19819 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19820 fi
19821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19822 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
19823   if test $gl_cv_minmax_in_limits_h = yes; then
19824
19825 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19826
19827   fi
19828
19829
19830
19831
19832
19833
19834   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19835 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19836 if test ${gl_cv_minmax_in_sys_param_h+y}
19837 then :
19838   printf %s "(cached) " >&6
19839 else $as_nop
19840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19841 /* end confdefs.h.  */
19842 #include <sys/param.h>
19843             int x = MIN (42, 17);
19844 int
19845 main (void)
19846 {
19847
19848   ;
19849   return 0;
19850 }
19851 _ACEOF
19852 if ac_fn_c_try_compile "$LINENO"
19853 then :
19854   gl_cv_minmax_in_sys_param_h=yes
19855 else $as_nop
19856   gl_cv_minmax_in_sys_param_h=no
19857 fi
19858 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19859 fi
19860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
19861 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
19862   if test $gl_cv_minmax_in_sys_param_h = yes; then
19863
19864 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
19865
19866   fi
19867
19868
19869
19870
19871
19872
19873     HAVE_DECL_LOCALTIME_R=1;
19874   HAVE_NANOSLEEP=1;
19875   HAVE_STRPTIME=1;
19876   HAVE_TIMEGM=1;
19877   HAVE_TIMESPEC_GET=1;
19878     HAVE_TIMEZONE_T=0;
19879         REPLACE_CTIME=GNULIB_PORTCHECK;
19880   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19881   REPLACE_MKTIME=GNULIB_PORTCHECK;
19882   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19883   REPLACE_STRFTIME=GNULIB_PORTCHECK;
19884   REPLACE_TIMEGM=GNULIB_PORTCHECK;
19885   REPLACE_TZSET=GNULIB_PORTCHECK;
19886
19887       : ${GNULIB_GETTIMEOFDAY=0};
19888         REPLACE_GMTIME=0;
19889   REPLACE_LOCALTIME=0;
19890
19891
19892   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
19893 printf %s "checking whether time_t is signed... " >&6; }
19894 if test ${gl_cv_time_t_is_signed+y}
19895 then :
19896   printf %s "(cached) " >&6
19897 else $as_nop
19898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19899 /* end confdefs.h.  */
19900 #include <time.h>
19901                           char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
19902 int
19903 main (void)
19904 {
19905
19906   ;
19907   return 0;
19908 }
19909 _ACEOF
19910 if ac_fn_c_try_compile "$LINENO"
19911 then :
19912   gl_cv_time_t_is_signed=yes
19913 else $as_nop
19914   gl_cv_time_t_is_signed=no
19915 fi
19916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19917 fi
19918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
19919 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
19920   if test $gl_cv_time_t_is_signed = yes; then
19921
19922 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
19923
19924   fi
19925
19926 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19927 if test "x$ac_cv_have_decl_alarm" = xyes
19928 then :
19929   ac_have_decl=1
19930 else $as_nop
19931   ac_have_decl=0
19932 fi
19933 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
19934
19935
19936
19937
19938
19939
19940
19941   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
19942 printf %s "checking for working mktime... " >&6; }
19943 if test ${gl_cv_func_working_mktime+y}
19944 then :
19945   printf %s "(cached) " >&6
19946 else $as_nop
19947   if test $APPLE_UNIVERSAL_BUILD = 1; then
19948        # A universal build on Apple Mac OS X platforms.
19949        # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
19950        # But we need a configuration result that is valid in both modes.
19951        gl_cv_func_working_mktime="guessing no"
19952      else
19953        if test "$cross_compiling" = yes
19954 then :
19955   case "$host_os" in
19956                     # Guess no on native Windows.
19957             mingw*) gl_cv_func_working_mktime="guessing no" ;;
19958             *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
19959           esac
19960
19961 else $as_nop
19962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19963 /* end confdefs.h.  */
19964 /* Test program from Paul Eggert and Tony Leneis.  */
19965 #include <limits.h>
19966 #include <stdlib.h>
19967 #include <time.h>
19968
19969 #ifdef HAVE_UNISTD_H
19970 # include <unistd.h>
19971 #endif
19972
19973 #if HAVE_DECL_ALARM
19974 # include <signal.h>
19975 #endif
19976
19977
19978
19979 $gl_mda_defines
19980
19981
19982 #ifndef TIME_T_IS_SIGNED
19983 # define TIME_T_IS_SIGNED 0
19984 #endif
19985
19986 static time_t time_t_max;
19987 static time_t time_t_min;
19988
19989 /* Values we'll use to set the TZ environment variable.  */
19990 static char *tz_strings[] = {
19991   (char *) 0, "TZ=GMT0", "TZ=JST-9",
19992   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
19993 };
19994 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
19995
19996 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
19997    Based on a problem report from Andreas Jaeger.  */
19998 static int
19999 spring_forward_gap ()
20000 {
20001   /* glibc (up to about 1998-10-07) failed this test. */
20002   struct tm tm;
20003
20004   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20005      instead of "TZ=America/Vancouver" in order to detect the bug even
20006      on systems that don't support the Olson extension, or don't have the
20007      full zoneinfo tables installed.  */
20008   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20009
20010   tm.tm_year = 98;
20011   tm.tm_mon = 3;
20012   tm.tm_mday = 5;
20013   tm.tm_hour = 2;
20014   tm.tm_min = 0;
20015   tm.tm_sec = 0;
20016   tm.tm_isdst = -1;
20017   return mktime (&tm) != (time_t) -1;
20018 }
20019
20020 static int
20021 mktime_test1 (time_t now)
20022 {
20023   struct tm *lt;
20024   return ! (lt = localtime (&now)) || mktime (lt) == now;
20025 }
20026
20027 static int
20028 mktime_test (time_t now)
20029 {
20030   return (mktime_test1 (now)
20031           && mktime_test1 ((time_t) (time_t_max - now))
20032           && mktime_test1 ((time_t) (time_t_min + now)));
20033 }
20034
20035 static int
20036 irix_6_4_bug ()
20037 {
20038   /* Based on code from Ariel Faigon.  */
20039   struct tm tm;
20040   tm.tm_year = 96;
20041   tm.tm_mon = 3;
20042   tm.tm_mday = 0;
20043   tm.tm_hour = 0;
20044   tm.tm_min = 0;
20045   tm.tm_sec = 0;
20046   tm.tm_isdst = -1;
20047   mktime (&tm);
20048   return tm.tm_mon == 2 && tm.tm_mday == 31;
20049 }
20050
20051 static int
20052 bigtime_test (int j)
20053 {
20054   struct tm tm;
20055   time_t now;
20056   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
20057   now = mktime (&tm);
20058   if (now != (time_t) -1)
20059     {
20060       struct tm *lt = localtime (&now);
20061       if (! (lt
20062              && lt->tm_year == tm.tm_year
20063              && lt->tm_mon == tm.tm_mon
20064              && lt->tm_mday == tm.tm_mday
20065              && lt->tm_hour == tm.tm_hour
20066              && lt->tm_min == tm.tm_min
20067              && lt->tm_sec == tm.tm_sec
20068              && lt->tm_yday == tm.tm_yday
20069              && lt->tm_wday == tm.tm_wday
20070              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
20071                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
20072         return 0;
20073     }
20074   return 1;
20075 }
20076
20077 static int
20078 year_2050_test ()
20079 {
20080   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
20081      ignoring leap seconds.  */
20082   unsigned long int answer = 2527315200UL;
20083
20084   struct tm tm;
20085   time_t t;
20086   tm.tm_year = 2050 - 1900;
20087   tm.tm_mon = 2 - 1;
20088   tm.tm_mday = 1;
20089   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
20090   tm.tm_isdst = -1;
20091
20092   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20093      instead of "TZ=America/Vancouver" in order to detect the bug even
20094      on systems that don't support the Olson extension, or don't have the
20095      full zoneinfo tables installed.  */
20096   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20097
20098   t = mktime (&tm);
20099
20100   /* Check that the result is either a failure, or close enough
20101      to the correct answer that we can assume the discrepancy is
20102      due to leap seconds.  */
20103   return (t == (time_t) -1
20104           || (0 < t && answer - 120 <= t && t <= answer + 120));
20105 }
20106
20107 int
20108 main ()
20109 {
20110   int result = 0;
20111   time_t t, delta;
20112   int i, j;
20113   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
20114
20115 #if HAVE_DECL_ALARM
20116   /* This test makes some buggy mktime implementations loop.
20117      Give up after 60 seconds; a mktime slower than that
20118      isn't worth using anyway.  */
20119   signal (SIGALRM, SIG_DFL);
20120   alarm (60);
20121 #endif
20122
20123   time_t_max = (! TIME_T_IS_SIGNED
20124                 ? (time_t) -1
20125                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
20126                    * 2 + 1));
20127   time_t_min = (! TIME_T_IS_SIGNED
20128                 ? (time_t) 0
20129                 : time_t_signed_magnitude
20130                 ? ~ (time_t) 0
20131                 : ~ time_t_max);
20132
20133   delta = time_t_max / 997; /* a suitable prime number */
20134   for (i = 0; i < N_STRINGS; i++)
20135     {
20136       if (tz_strings[i])
20137         putenv (tz_strings[i]);
20138
20139       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
20140         if (! mktime_test (t))
20141           result |= 1;
20142       if ((result & 2) == 0
20143           && ! (mktime_test ((time_t) 1)
20144                 && mktime_test ((time_t) (60 * 60))
20145                 && mktime_test ((time_t) (60 * 60 * 24))))
20146         result |= 2;
20147
20148       for (j = 1; (result & 4) == 0; j <<= 1)
20149         {
20150           if (! bigtime_test (j))
20151             result |= 4;
20152           if (INT_MAX / 2 < j)
20153             break;
20154         }
20155       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
20156         result |= 8;
20157     }
20158   if (! irix_6_4_bug ())
20159     result |= 16;
20160   if (! spring_forward_gap ())
20161     result |= 32;
20162   if (! year_2050_test ())
20163     result |= 64;
20164   return result;
20165 }
20166 _ACEOF
20167 if ac_fn_c_try_run "$LINENO"
20168 then :
20169   gl_cv_func_working_mktime=yes
20170 else $as_nop
20171   gl_cv_func_working_mktime=no
20172 fi
20173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20174   conftest.$ac_objext conftest.beam conftest.$ac_ext
20175 fi
20176
20177      fi
20178
20179 fi
20180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
20181 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
20182
20183
20184
20185   GL_GNULIB_CTIME=0
20186
20187
20188
20189   GL_GNULIB_MKTIME=0
20190
20191
20192
20193   GL_GNULIB_LOCALTIME=0
20194
20195
20196
20197   GL_GNULIB_NANOSLEEP=0
20198
20199
20200
20201   GL_GNULIB_STRFTIME=0
20202
20203
20204
20205   GL_GNULIB_STRPTIME=0
20206
20207
20208
20209   GL_GNULIB_TIMEGM=0
20210
20211
20212
20213   GL_GNULIB_TIMESPEC_GET=0
20214
20215
20216
20217   GL_GNULIB_TIME_R=0
20218
20219
20220
20221   GL_GNULIB_TIME_RZ=0
20222
20223
20224
20225   GL_GNULIB_TZSET=0
20226
20227
20228
20229   GL_GNULIB_MDA_TZSET=1
20230
20231
20232
20233
20234
20235
20236
20237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
20238 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
20239 if test ${ac_cv_struct_tm+y}
20240 then :
20241   printf %s "(cached) " >&6
20242 else $as_nop
20243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20244 /* end confdefs.h.  */
20245 #include <sys/types.h>
20246 #include <time.h>
20247
20248 int
20249 main (void)
20250 {
20251 struct tm tm;
20252                                      int *p = &tm.tm_sec;
20253                                      return !p;
20254   ;
20255   return 0;
20256 }
20257 _ACEOF
20258 if ac_fn_c_try_compile "$LINENO"
20259 then :
20260   ac_cv_struct_tm=time.h
20261 else $as_nop
20262   ac_cv_struct_tm=sys/time.h
20263 fi
20264 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20265 fi
20266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
20267 printf "%s\n" "$ac_cv_struct_tm" >&6; }
20268 if test $ac_cv_struct_tm = sys/time.h; then
20269
20270 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
20271
20272 fi
20273
20274 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
20275 #include <$ac_cv_struct_tm>
20276
20277 "
20278 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
20279 then :
20280
20281 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
20282
20283
20284 fi
20285
20286 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20287
20288 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
20289
20290 else
20291   ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20292 " "$ac_c_undeclared_builtin_options" "CFLAGS"
20293 if test "x$ac_cv_have_decl_tzname" = xyes
20294 then :
20295   ac_have_decl=1
20296 else $as_nop
20297   ac_have_decl=0
20298 fi
20299 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
20300
20301   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20302 printf %s "checking for tzname... " >&6; }
20303 if test ${ac_cv_var_tzname+y}
20304 then :
20305   printf %s "(cached) " >&6
20306 else $as_nop
20307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20308 /* end confdefs.h.  */
20309 #include <time.h>
20310 #if !HAVE_DECL_TZNAME
20311 extern char *tzname[];
20312 #endif
20313
20314 int
20315 main (void)
20316 {
20317 return tzname[0][0];
20318   ;
20319   return 0;
20320 }
20321 _ACEOF
20322 if ac_fn_c_try_link "$LINENO"
20323 then :
20324   ac_cv_var_tzname=yes
20325 else $as_nop
20326   ac_cv_var_tzname=no
20327 fi
20328 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20329     conftest$ac_exeext conftest.$ac_ext
20330 fi
20331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20332 printf "%s\n" "$ac_cv_var_tzname" >&6; }
20333   if test $ac_cv_var_tzname = yes; then
20334
20335 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
20336
20337   fi
20338 fi
20339
20340
20341  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20342 "
20343 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
20344 then :
20345
20346 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
20347
20348 fi
20349
20350
20351
20352   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
20353 printf %s "checking for O_CLOEXEC... " >&6; }
20354 if test ${gl_cv_macro_O_CLOEXEC+y}
20355 then :
20356   printf %s "(cached) " >&6
20357 else $as_nop
20358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359 /* end confdefs.h.  */
20360 #include <fcntl.h>
20361                           #ifndef O_CLOEXEC
20362                             choke me;
20363                           #endif
20364
20365 int
20366 main (void)
20367 {
20368 return O_CLOEXEC;
20369   ;
20370   return 0;
20371 }
20372 _ACEOF
20373 if ac_fn_c_try_compile "$LINENO"
20374 then :
20375   gl_cv_macro_O_CLOEXEC=yes
20376 else $as_nop
20377   gl_cv_macro_O_CLOEXEC=no
20378 fi
20379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20380 fi
20381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
20382 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
20383
20384
20385
20386   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
20387 printf %s "checking for promoted mode_t type... " >&6; }
20388 if test ${gl_cv_promoted_mode_t+y}
20389 then :
20390   printf %s "(cached) " >&6
20391 else $as_nop
20392
20393                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20394 /* end confdefs.h.  */
20395 #include <sys/types.h>
20396 int
20397 main (void)
20398 {
20399 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 if ac_fn_c_try_compile "$LINENO"
20405 then :
20406   gl_cv_promoted_mode_t='int'
20407 else $as_nop
20408   gl_cv_promoted_mode_t='mode_t'
20409 fi
20410 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20411
20412 fi
20413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
20414 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
20415
20416 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
20417
20418
20419
20420
20421     HAVE_POSIX_SIGNALBLOCKING=1;
20422   HAVE_PTHREAD_SIGMASK=1;
20423   HAVE_RAISE=1;
20424   HAVE_SIGSET_T=1;
20425   HAVE_SIGINFO_T=1;
20426   HAVE_SIGACTION=1;
20427   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20428
20429   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20430
20431   HAVE_SIGHANDLER_T=1;
20432   REPLACE_PTHREAD_SIGMASK=0;
20433   REPLACE_RAISE=0;
20434
20435
20436   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20437       #include <signal.h>
20438       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
20439       #include <sys/types.h>
20440
20441 "
20442 if test "x$ac_cv_type_sigset_t" = xyes
20443 then :
20444
20445 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
20446
20447 gl_cv_type_sigset_t=yes
20448 else $as_nop
20449   gl_cv_type_sigset_t=no
20450 fi
20451
20452   if test $gl_cv_type_sigset_t != yes; then
20453     HAVE_SIGSET_T=0
20454   fi
20455
20456
20457
20458   GL_GNULIB_PTHREAD_SIGMASK=0
20459
20460
20461
20462   GL_GNULIB_RAISE=0
20463
20464
20465
20466   GL_GNULIB_SIGNAL_H_SIGPIPE=0
20467
20468
20469
20470   GL_GNULIB_SIGPROCMASK=0
20471
20472
20473
20474   GL_GNULIB_SIGACTION=0
20475
20476
20477
20478
20479
20480
20481
20482   if test $REPLACE_MALLOC = 1; then
20483     REPLACE_REALLOC=1
20484   fi
20485
20486
20487
20488 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20489 if test "x$ac_cv_have_decl_setenv" = xyes
20490 then :
20491   ac_have_decl=1
20492 else $as_nop
20493   ac_have_decl=0
20494 fi
20495 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
20496
20497
20498
20499
20500
20501   if test $ac_cv_have_decl_setenv = no; then
20502     HAVE_DECL_SETENV=0
20503   fi
20504
20505
20506
20507
20508
20509   ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
20510 if test "x$ac_cv_header_search_h" = xyes
20511 then :
20512   printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
20513
20514 fi
20515
20516   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
20517 if test "x$ac_cv_func_tsearch" = xyes
20518 then :
20519   printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
20520
20521 fi
20522
20523
20524
20525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
20526 printf %s "checking for uid_t in sys/types.h... " >&6; }
20527 if test ${ac_cv_type_uid_t+y}
20528 then :
20529   printf %s "(cached) " >&6
20530 else $as_nop
20531   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20532 /* end confdefs.h.  */
20533 #include <sys/types.h>
20534
20535 _ACEOF
20536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20537   $EGREP "uid_t" >/dev/null 2>&1
20538 then :
20539   ac_cv_type_uid_t=yes
20540 else $as_nop
20541   ac_cv_type_uid_t=no
20542 fi
20543 rm -rf conftest*
20544
20545 fi
20546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
20547 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
20548 if test $ac_cv_type_uid_t = no; then
20549
20550 printf "%s\n" "#define uid_t int" >>confdefs.h
20551
20552
20553 printf "%s\n" "#define gid_t int" >>confdefs.h
20554
20555 fi
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568      if test $gl_cv_have_include_next = yes; then
20569        gl_cv_next_signal_h='<'signal.h'>'
20570      else
20571        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20572 printf %s "checking absolute name of <signal.h>... " >&6; }
20573 if test ${gl_cv_next_signal_h+y}
20574 then :
20575   printf %s "(cached) " >&6
20576 else $as_nop
20577
20578
20579
20580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581 /* end confdefs.h.  */
20582 #include <signal.h>
20583 _ACEOF
20584                 case "$host_os" in
20585     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20586     *)    gl_absname_cpp="$ac_cpp" ;;
20587   esac
20588
20589   case "$host_os" in
20590     mingw*)
20591                                           gl_dirsep_regex='[/\\]'
20592       ;;
20593     *)
20594       gl_dirsep_regex='\/'
20595       ;;
20596   esac
20597       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20598   gl_header_literal_regex=`echo 'signal.h' \
20599                            | sed -e "$gl_make_literal_regex_sed"`
20600   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20601       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20602       s|^/[^/]|//&|
20603       p
20604       q
20605     }'
20606
20607         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20608   sed -n "$gl_absolute_header_sed"`
20609
20610            gl_header=$gl_cv_absolute_signal_h
20611            gl_cv_next_signal_h='"'$gl_header'"'
20612
20613
20614 fi
20615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20616 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
20617      fi
20618      NEXT_SIGNAL_H=$gl_cv_next_signal_h
20619
20620      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20621        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20622        gl_next_as_first_directive='<'signal.h'>'
20623      else
20624        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20625        gl_next_as_first_directive=$gl_cv_next_signal_h
20626      fi
20627      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20628
20629
20630
20631
20632
20633 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
20634 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
20635   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20636 #include <signal.h>
20637
20638 "
20639 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
20640 then :
20641
20642 else $as_nop
20643   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20644 fi
20645
20646
20647
20648
20649
20650
20651
20652   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20653 #include <signal.h>
20654
20655 "
20656 if test "x$ac_cv_type_sighandler_t" = xyes
20657 then :
20658
20659 else $as_nop
20660   HAVE_SIGHANDLER_T=0
20661 fi
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20674 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
20675 if test ${ac_cv_header_stdbool_h+y}
20676 then :
20677   printf %s "(cached) " >&6
20678 else $as_nop
20679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20680 /* end confdefs.h.  */
20681
20682              #include <stdbool.h>
20683
20684              #ifdef __cplusplus
20685               typedef bool Bool;
20686              #else
20687               typedef _Bool Bool;
20688               #ifndef bool
20689                "error: bool is not defined"
20690               #endif
20691               #ifndef false
20692                "error: false is not defined"
20693               #endif
20694               #if false
20695                "error: false is not 0"
20696               #endif
20697               #ifndef true
20698                "error: true is not defined"
20699               #endif
20700               #if true != 1
20701                "error: true is not 1"
20702               #endif
20703              #endif
20704
20705              #ifndef __bool_true_false_are_defined
20706               "error: __bool_true_false_are_defined is not defined"
20707              #endif
20708
20709              struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
20710
20711              char a[true == 1 ? 1 : -1];
20712              char b[false == 0 ? 1 : -1];
20713              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20714              char d[(bool) 0.5 == true ? 1 : -1];
20715              /* See body of main program for 'e'.  */
20716              char f[(Bool) 0.0 == false ? 1 : -1];
20717              char g[true];
20718              char h[sizeof (Bool)];
20719              char i[sizeof s.t];
20720              enum { j = false, k = true, l = false * true, m = true * 256 };
20721              /* The following fails for
20722                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20723              Bool n[m];
20724              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20725              char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20726              /* Catch a bug in an HP-UX C compiler.  See
20727                 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20728                 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
20729               */
20730              Bool q = true;
20731              Bool *pq = &q;
20732              bool *qq = &q;
20733
20734 int
20735 main (void)
20736 {
20737
20738              bool e = &s;
20739              *pq |= q; *pq |= ! q;
20740              *qq |= q; *qq |= ! q;
20741              /* Refer to every declared value, to avoid compiler optimizations.  */
20742              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20743                      + !m + !n + !o + !p + !q + !pq + !qq);
20744
20745   ;
20746   return 0;
20747 }
20748 _ACEOF
20749 if ac_fn_c_try_compile "$LINENO"
20750 then :
20751   ac_cv_header_stdbool_h=yes
20752 else $as_nop
20753   ac_cv_header_stdbool_h=no
20754 fi
20755 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20756 fi
20757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20758 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
20759    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20760 if test "x$ac_cv_type__Bool" = xyes
20761 then :
20762
20763 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
20764
20765
20766 fi
20767
20768
20769
20770
20771 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20772 if test "x$ac_cv_have_decl_fcloseall" = xyes
20773 then :
20774   ac_have_decl=1
20775 else $as_nop
20776   ac_have_decl=0
20777 fi
20778 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
20779
20780
20781
20782
20783   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793      if test $gl_cv_have_include_next = yes; then
20794        gl_cv_next_stdio_h='<'stdio.h'>'
20795      else
20796        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20797 printf %s "checking absolute name of <stdio.h>... " >&6; }
20798 if test ${gl_cv_next_stdio_h+y}
20799 then :
20800   printf %s "(cached) " >&6
20801 else $as_nop
20802
20803
20804
20805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20806 /* end confdefs.h.  */
20807 #include <stdio.h>
20808 _ACEOF
20809                 case "$host_os" in
20810     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20811     *)    gl_absname_cpp="$ac_cpp" ;;
20812   esac
20813
20814   case "$host_os" in
20815     mingw*)
20816                                           gl_dirsep_regex='[/\\]'
20817       ;;
20818     *)
20819       gl_dirsep_regex='\/'
20820       ;;
20821   esac
20822       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20823   gl_header_literal_regex=`echo 'stdio.h' \
20824                            | sed -e "$gl_make_literal_regex_sed"`
20825   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20826       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20827       s|^/[^/]|//&|
20828       p
20829       q
20830     }'
20831
20832         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20833   sed -n "$gl_absolute_header_sed"`
20834
20835            gl_header=$gl_cv_absolute_stdio_h
20836            gl_cv_next_stdio_h='"'$gl_header'"'
20837
20838
20839 fi
20840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20841 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
20842      fi
20843      NEXT_STDIO_H=$gl_cv_next_stdio_h
20844
20845      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20846        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20847        gl_next_as_first_directive='<'stdio.h'>'
20848      else
20849        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20850        gl_next_as_first_directive=$gl_cv_next_stdio_h
20851      fi
20852      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
20853
20854
20855
20856
20857
20858         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
20859 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
20860 if test ${gl_cv_func_printf_attribute_flavor+y}
20861 then :
20862   printf %s "(cached) " >&6
20863 else $as_nop
20864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20865 /* end confdefs.h.  */
20866
20867        #define __STDC_FORMAT_MACROS 1
20868        #include <stdio.h>
20869        #include <inttypes.h>
20870        /* For non-mingw systems, compilation will trivially succeed.
20871           For mingw, compilation will succeed for older mingw (system
20872           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
20873        #if (defined _WIN32 && ! defined __CYGWIN__) && \
20874          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
20875        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
20876        #endif
20877
20878 int
20879 main (void)
20880 {
20881
20882   ;
20883   return 0;
20884 }
20885 _ACEOF
20886 if ac_fn_c_try_compile "$LINENO"
20887 then :
20888   gl_cv_func_printf_attribute_flavor=system
20889 else $as_nop
20890   gl_cv_func_printf_attribute_flavor=gnu
20891 fi
20892 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20893 fi
20894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
20895 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
20896   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
20897
20898 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
20899
20900   fi
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914   if test $ac_cv_have_decl_fcloseall = no; then
20915     HAVE_DECL_FCLOSEALL=0
20916   fi
20917
20918 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20919 if test "x$ac_cv_have_decl_ecvt" = xyes
20920 then :
20921   ac_have_decl=1
20922 else $as_nop
20923   ac_have_decl=0
20924 fi
20925 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
20926
20927 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20928 if test "x$ac_cv_have_decl_fcvt" = xyes
20929 then :
20930   ac_have_decl=1
20931 else $as_nop
20932   ac_have_decl=0
20933 fi
20934 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
20935
20936 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20937 if test "x$ac_cv_have_decl_gcvt" = xyes
20938 then :
20939   ac_have_decl=1
20940 else $as_nop
20941   ac_have_decl=0
20942 fi
20943 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955      if test $gl_cv_have_include_next = yes; then
20956        gl_cv_next_stdlib_h='<'stdlib.h'>'
20957      else
20958        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20959 printf %s "checking absolute name of <stdlib.h>... " >&6; }
20960 if test ${gl_cv_next_stdlib_h+y}
20961 then :
20962   printf %s "(cached) " >&6
20963 else $as_nop
20964
20965
20966
20967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20968 /* end confdefs.h.  */
20969 #include <stdlib.h>
20970 _ACEOF
20971                 case "$host_os" in
20972     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20973     *)    gl_absname_cpp="$ac_cpp" ;;
20974   esac
20975
20976   case "$host_os" in
20977     mingw*)
20978                                           gl_dirsep_regex='[/\\]'
20979       ;;
20980     *)
20981       gl_dirsep_regex='\/'
20982       ;;
20983   esac
20984       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20985   gl_header_literal_regex=`echo 'stdlib.h' \
20986                            | sed -e "$gl_make_literal_regex_sed"`
20987   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20988       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20989       s|^/[^/]|//&|
20990       p
20991       q
20992     }'
20993
20994         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20995   sed -n "$gl_absolute_header_sed"`
20996
20997            gl_header=$gl_cv_absolute_stdlib_h
20998            gl_cv_next_stdlib_h='"'$gl_header'"'
20999
21000
21001 fi
21002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21003 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
21004      fi
21005      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21006
21007      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21008        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21009        gl_next_as_first_directive='<'stdlib.h'>'
21010      else
21011        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21012        gl_next_as_first_directive=$gl_cv_next_stdlib_h
21013      fi
21014      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027   if test $ac_cv_have_decl_ecvt = no; then
21028     HAVE_DECL_ECVT=0
21029   fi
21030
21031   if test $ac_cv_have_decl_fcvt = no; then
21032     HAVE_DECL_FCVT=0
21033   fi
21034
21035   if test $ac_cv_have_decl_gcvt = no; then
21036     HAVE_DECL_GCVT=0
21037   fi
21038
21039
21040     HAVE_FFS=1;
21041   HAVE_STRCASECMP=1;
21042   HAVE_DECL_STRNCASECMP=1;
21043
21044
21045      REPLACE_STRERROR_0=0
21046   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
21047 printf %s "checking whether strerror(0) succeeds... " >&6; }
21048 if test ${gl_cv_func_strerror_0_works+y}
21049 then :
21050   printf %s "(cached) " >&6
21051 else $as_nop
21052   if test "$cross_compiling" = yes
21053 then :
21054   case "$host_os" in
21055                         # Guess yes on glibc systems.
21056          *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
21057                         # Guess yes on musl systems.
21058          *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
21059                         # Guess yes on native Windows.
21060          mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
21061                         # If we don't know, obey --enable-cross-guesses.
21062          *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
21063        esac
21064
21065 else $as_nop
21066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21067 /* end confdefs.h.  */
21068 #include <string.h>
21069            #include <errno.h>
21070
21071 int
21072 main (void)
21073 {
21074 int result = 0;
21075            char *str;
21076            errno = 0;
21077            str = strerror (0);
21078            if (!*str) result |= 1;
21079            if (errno) result |= 2;
21080            if (strstr (str, "nknown") || strstr (str, "ndefined"))
21081              result |= 4;
21082            return result;
21083   ;
21084   return 0;
21085 }
21086 _ACEOF
21087 if ac_fn_c_try_run "$LINENO"
21088 then :
21089   gl_cv_func_strerror_0_works=yes
21090 else $as_nop
21091   gl_cv_func_strerror_0_works=no
21092 fi
21093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21094   conftest.$ac_objext conftest.beam conftest.$ac_ext
21095 fi
21096
21097
21098 fi
21099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
21100 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
21101   case "$gl_cv_func_strerror_0_works" in
21102     *yes) ;;
21103     *)
21104       REPLACE_STRERROR_0=1
21105
21106 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
21107
21108       ;;
21109   esac
21110
21111
21112
21113
21114
21115
21116
21117
21118   if test $ac_cv_func_strerror_r = yes; then
21119     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21120                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
21121 printf %s "checking for strerror_r with POSIX signature... " >&6; }
21122 if test ${gl_cv_func_strerror_r_posix_signature+y}
21123 then :
21124   printf %s "(cached) " >&6
21125 else $as_nop
21126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21127 /* end confdefs.h.  */
21128 #include <string.h>
21129                 int strerror_r (int, char *, size_t);
21130
21131 int
21132 main (void)
21133 {
21134
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 if ac_fn_c_try_compile "$LINENO"
21140 then :
21141   gl_cv_func_strerror_r_posix_signature=yes
21142 else $as_nop
21143   gl_cv_func_strerror_r_posix_signature=no
21144 fi
21145 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21146
21147 fi
21148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
21149 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
21150       if test $gl_cv_func_strerror_r_posix_signature = yes; then
21151                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
21152 printf %s "checking whether strerror_r works... " >&6; }
21153 if test ${gl_cv_func_strerror_r_works+y}
21154 then :
21155   printf %s "(cached) " >&6
21156 else $as_nop
21157   if test "$cross_compiling" = yes
21158 then :
21159
21160               case "$host_os" in
21161                        # Guess no on AIX.
21162                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
21163                        # Guess no on HP-UX.
21164                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
21165                        # Guess no on BSD variants.
21166                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
21167                        # Guess yes otherwise.
21168                 *)     gl_cv_func_strerror_r_works="guessing yes";;
21169               esac
21170
21171 else $as_nop
21172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21173 /* end confdefs.h.  */
21174 #include <errno.h>
21175                   #include <string.h>
21176
21177 int
21178 main (void)
21179 {
21180 int result = 0;
21181                   char buf[79];
21182                   if (strerror_r (EACCES, buf, 0) < 0)
21183                     result |= 1;
21184                   errno = 0;
21185                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
21186                     result |= 2;
21187                   strcpy (buf, "Unknown");
21188                   if (strerror_r (0, buf, sizeof buf) != 0)
21189                     result |= 4;
21190                   if (errno)
21191                     result |= 8;
21192                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
21193                     result |= 0x10;
21194                   errno = 0;
21195                   *buf = 0;
21196                   if (strerror_r (-3, buf, sizeof buf) < 0)
21197                     result |= 0x20;
21198                   if (errno)
21199                     result |= 0x40;
21200                   if (!*buf)
21201                     result |= 0x80;
21202                   return result;
21203
21204   ;
21205   return 0;
21206 }
21207 _ACEOF
21208 if ac_fn_c_try_run "$LINENO"
21209 then :
21210   gl_cv_func_strerror_r_works=yes
21211 else $as_nop
21212   gl_cv_func_strerror_r_works=no
21213 fi
21214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21215   conftest.$ac_objext conftest.beam conftest.$ac_ext
21216 fi
21217
21218
21219 fi
21220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
21221 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
21222       else
21223
21224                         if test $ac_cv_func___xpg_strerror_r = yes; then
21225           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
21226 printf %s "checking whether __xpg_strerror_r works... " >&6; }
21227 if test ${gl_cv_func_strerror_r_works+y}
21228 then :
21229   printf %s "(cached) " >&6
21230 else $as_nop
21231   if test "$cross_compiling" = yes
21232 then :
21233                                   gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
21234
21235 else $as_nop
21236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21237 /* end confdefs.h.  */
21238 #include <errno.h>
21239                     #include <string.h>
21240                     extern
21241                     #ifdef __cplusplus
21242                     "C"
21243                     #endif
21244                     int __xpg_strerror_r(int, char *, size_t);
21245
21246 int
21247 main (void)
21248 {
21249 int result = 0;
21250                     char buf[256] = "^";
21251                     char copy[256];
21252                     char *str = strerror (-1);
21253                     strcpy (copy, str);
21254                     if (__xpg_strerror_r (-2, buf, 1) == 0)
21255                       result |= 1;
21256                     if (*buf)
21257                       result |= 2;
21258                     __xpg_strerror_r (-2, buf, 256);
21259                     if (strcmp (str, copy))
21260                       result |= 4;
21261                     return result;
21262
21263   ;
21264   return 0;
21265 }
21266 _ACEOF
21267 if ac_fn_c_try_run "$LINENO"
21268 then :
21269   gl_cv_func_strerror_r_works=yes
21270 else $as_nop
21271   gl_cv_func_strerror_r_works=no
21272 fi
21273 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21274   conftest.$ac_objext conftest.beam conftest.$ac_ext
21275 fi
21276
21277
21278 fi
21279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
21280 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
21281         fi
21282       fi
21283     fi
21284   fi
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296      if test $gl_cv_have_include_next = yes; then
21297        gl_cv_next_string_h='<'string.h'>'
21298      else
21299        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21300 printf %s "checking absolute name of <string.h>... " >&6; }
21301 if test ${gl_cv_next_string_h+y}
21302 then :
21303   printf %s "(cached) " >&6
21304 else $as_nop
21305
21306
21307
21308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21309 /* end confdefs.h.  */
21310 #include <string.h>
21311 _ACEOF
21312                 case "$host_os" in
21313     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21314     *)    gl_absname_cpp="$ac_cpp" ;;
21315   esac
21316
21317   case "$host_os" in
21318     mingw*)
21319                                           gl_dirsep_regex='[/\\]'
21320       ;;
21321     *)
21322       gl_dirsep_regex='\/'
21323       ;;
21324   esac
21325       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21326   gl_header_literal_regex=`echo 'string.h' \
21327                            | sed -e "$gl_make_literal_regex_sed"`
21328   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21329       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21330       s|^/[^/]|//&|
21331       p
21332       q
21333     }'
21334
21335         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21336   sed -n "$gl_absolute_header_sed"`
21337
21338            gl_header=$gl_cv_absolute_string_h
21339            gl_cv_next_string_h='"'$gl_header'"'
21340
21341
21342 fi
21343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21344 printf "%s\n" "$gl_cv_next_string_h" >&6; }
21345      fi
21346      NEXT_STRING_H=$gl_cv_next_string_h
21347
21348      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21349        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21350        gl_next_as_first_directive='<'string.h'>'
21351      else
21352        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21353        gl_next_as_first_directive=$gl_cv_next_string_h
21354      fi
21355      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379      if test $gl_cv_have_include_next = yes; then
21380        gl_cv_next_strings_h='<'strings.h'>'
21381      else
21382        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
21383 printf %s "checking absolute name of <strings.h>... " >&6; }
21384 if test ${gl_cv_next_strings_h+y}
21385 then :
21386   printf %s "(cached) " >&6
21387 else $as_nop
21388
21389              if test $ac_cv_header_strings_h = yes; then
21390
21391
21392
21393
21394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21395 /* end confdefs.h.  */
21396 #include <strings.h>
21397 _ACEOF
21398                 case "$host_os" in
21399     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21400     *)    gl_absname_cpp="$ac_cpp" ;;
21401   esac
21402
21403   case "$host_os" in
21404     mingw*)
21405                                           gl_dirsep_regex='[/\\]'
21406       ;;
21407     *)
21408       gl_dirsep_regex='\/'
21409       ;;
21410   esac
21411       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21412   gl_header_literal_regex=`echo 'strings.h' \
21413                            | sed -e "$gl_make_literal_regex_sed"`
21414   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21415       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21416       s|^/[^/]|//&|
21417       p
21418       q
21419     }'
21420
21421         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21422   sed -n "$gl_absolute_header_sed"`
21423
21424            gl_header=$gl_cv_absolute_strings_h
21425            gl_cv_next_strings_h='"'$gl_header'"'
21426           else
21427                gl_cv_next_strings_h='<'strings.h'>'
21428              fi
21429
21430
21431 fi
21432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
21433 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
21434      fi
21435      NEXT_STRINGS_H=$gl_cv_next_strings_h
21436
21437      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21438        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21439        gl_next_as_first_directive='<'strings.h'>'
21440      else
21441        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21442        gl_next_as_first_directive=$gl_cv_next_strings_h
21443      fi
21444      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
21445
21446
21447
21448
21449   if test $ac_cv_header_strings_h = yes; then
21450     HAVE_STRINGS_H=1
21451   else
21452     HAVE_STRINGS_H=0
21453   fi
21454
21455
21456
21457
21458
21459
21460
21461
21462   GL_GNULIB_FFS=0
21463
21464
21465
21466 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21467 if test "x$ac_cv_have_decl_strnlen" = xyes
21468 then :
21469   ac_have_decl=1
21470 else $as_nop
21471   ac_have_decl=0
21472 fi
21473 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
21474
21475
21476
21477 ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21478 if test "x$ac_cv_have_decl_strtoimax" = xyes
21479 then :
21480   ac_have_decl=1
21481 else $as_nop
21482   ac_have_decl=0
21483 fi
21484 printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498      if test $gl_cv_have_include_next = yes; then
21499        gl_cv_next_sys_random_h='<'sys/random.h'>'
21500      else
21501        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
21502 printf %s "checking absolute name of <sys/random.h>... " >&6; }
21503 if test ${gl_cv_next_sys_random_h+y}
21504 then :
21505   printf %s "(cached) " >&6
21506 else $as_nop
21507
21508              if test $ac_cv_header_sys_random_h = yes; then
21509
21510
21511
21512
21513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21514 /* end confdefs.h.  */
21515 #include <sys/random.h>
21516 _ACEOF
21517                 case "$host_os" in
21518     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21519     *)    gl_absname_cpp="$ac_cpp" ;;
21520   esac
21521
21522   case "$host_os" in
21523     mingw*)
21524                                           gl_dirsep_regex='[/\\]'
21525       ;;
21526     *)
21527       gl_dirsep_regex='\/'
21528       ;;
21529   esac
21530       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21531   gl_header_literal_regex=`echo 'sys/random.h' \
21532                            | sed -e "$gl_make_literal_regex_sed"`
21533   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21534       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21535       s|^/[^/]|//&|
21536       p
21537       q
21538     }'
21539
21540         gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21541   sed -n "$gl_absolute_header_sed"`
21542
21543            gl_header=$gl_cv_absolute_sys_random_h
21544            gl_cv_next_sys_random_h='"'$gl_header'"'
21545           else
21546                gl_cv_next_sys_random_h='<'sys/random.h'>'
21547              fi
21548
21549
21550 fi
21551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
21552 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
21553      fi
21554      NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
21555
21556      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21557        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21558        gl_next_as_first_directive='<'sys/random.h'>'
21559      else
21560        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21561        gl_next_as_first_directive=$gl_cv_next_sys_random_h
21562      fi
21563      NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
21564
21565
21566
21567
21568   if test $ac_cv_header_sys_random_h = yes; then
21569     HAVE_SYS_RANDOM_H=1
21570   else
21571     HAVE_SYS_RANDOM_H=0
21572   fi
21573
21574
21575
21576   if test $ac_cv_header_sys_random_h = yes; then
21577     UNISTD_H_HAVE_SYS_RANDOM_H=1
21578   fi
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607      if test $gl_cv_have_include_next = yes; then
21608        gl_cv_next_sys_types_h='<'sys/types.h'>'
21609      else
21610        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21611 printf %s "checking absolute name of <sys/types.h>... " >&6; }
21612 if test ${gl_cv_next_sys_types_h+y}
21613 then :
21614   printf %s "(cached) " >&6
21615 else $as_nop
21616
21617
21618
21619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21620 /* end confdefs.h.  */
21621 #include <sys/types.h>
21622 _ACEOF
21623                 case "$host_os" in
21624     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21625     *)    gl_absname_cpp="$ac_cpp" ;;
21626   esac
21627
21628   case "$host_os" in
21629     mingw*)
21630                                           gl_dirsep_regex='[/\\]'
21631       ;;
21632     *)
21633       gl_dirsep_regex='\/'
21634       ;;
21635   esac
21636       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21637   gl_header_literal_regex=`echo 'sys/types.h' \
21638                            | sed -e "$gl_make_literal_regex_sed"`
21639   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21640       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21641       s|^/[^/]|//&|
21642       p
21643       q
21644     }'
21645
21646         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21647   sed -n "$gl_absolute_header_sed"`
21648
21649            gl_header=$gl_cv_absolute_sys_types_h
21650            gl_cv_next_sys_types_h='"'$gl_header'"'
21651
21652
21653 fi
21654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21655 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
21656      fi
21657      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21658
21659      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21660        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21661        gl_next_as_first_directive='<'sys/types.h'>'
21662      else
21663        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21664        gl_next_as_first_directive=$gl_cv_next_sys_types_h
21665      fi
21666      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679     WINDOWS_STAT_INODES=0
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700      if test $gl_cv_have_include_next = yes; then
21701        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21702      else
21703        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
21704 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
21705 if test ${gl_cv_next_sys_wait_h+y}
21706 then :
21707   printf %s "(cached) " >&6
21708 else $as_nop
21709
21710              if test $ac_cv_header_sys_wait_h = yes; then
21711
21712
21713
21714
21715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716 /* end confdefs.h.  */
21717 #include <sys/wait.h>
21718 _ACEOF
21719                 case "$host_os" in
21720     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21721     *)    gl_absname_cpp="$ac_cpp" ;;
21722   esac
21723
21724   case "$host_os" in
21725     mingw*)
21726                                           gl_dirsep_regex='[/\\]'
21727       ;;
21728     *)
21729       gl_dirsep_regex='\/'
21730       ;;
21731   esac
21732       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21733   gl_header_literal_regex=`echo 'sys/wait.h' \
21734                            | sed -e "$gl_make_literal_regex_sed"`
21735   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21736       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21737       s|^/[^/]|//&|
21738       p
21739       q
21740     }'
21741
21742         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21743   sed -n "$gl_absolute_header_sed"`
21744
21745            gl_header=$gl_cv_absolute_sys_wait_h
21746            gl_cv_next_sys_wait_h='"'$gl_header'"'
21747           else
21748                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21749              fi
21750
21751
21752 fi
21753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
21754 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
21755      fi
21756      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
21757
21758      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21759        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21760        gl_next_as_first_directive='<'sys/wait.h'>'
21761      else
21762        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21763        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
21764      fi
21765      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779   GL_GNULIB_WAITPID=0
21780
21781
21782
21783
21784
21785   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21786 printf %s "checking for struct timespec in <time.h>... " >&6; }
21787 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
21788 then :
21789   printf %s "(cached) " >&6
21790 else $as_nop
21791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h.  */
21793 #include <time.h>
21794
21795 int
21796 main (void)
21797 {
21798 static struct timespec x; x.tv_sec = x.tv_nsec;
21799   ;
21800   return 0;
21801 }
21802 _ACEOF
21803 if ac_fn_c_try_compile "$LINENO"
21804 then :
21805   gl_cv_sys_struct_timespec_in_time_h=yes
21806 else $as_nop
21807   gl_cv_sys_struct_timespec_in_time_h=no
21808 fi
21809 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21810 fi
21811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21812 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21813
21814   TIME_H_DEFINES_STRUCT_TIMESPEC=0
21815   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21816   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21817   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
21818   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21819     TIME_H_DEFINES_STRUCT_TIMESPEC=1
21820   else
21821     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21822 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
21823 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
21824 then :
21825   printf %s "(cached) " >&6
21826 else $as_nop
21827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21828 /* end confdefs.h.  */
21829 #include <sys/time.h>
21830
21831 int
21832 main (void)
21833 {
21834 static struct timespec x; x.tv_sec = x.tv_nsec;
21835   ;
21836   return 0;
21837 }
21838 _ACEOF
21839 if ac_fn_c_try_compile "$LINENO"
21840 then :
21841   gl_cv_sys_struct_timespec_in_sys_time_h=yes
21842 else $as_nop
21843   gl_cv_sys_struct_timespec_in_sys_time_h=no
21844 fi
21845 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21846 fi
21847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21848 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21849     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21850       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21851     else
21852       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21853 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
21854 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
21855 then :
21856   printf %s "(cached) " >&6
21857 else $as_nop
21858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21859 /* end confdefs.h.  */
21860 #include <pthread.h>
21861
21862 int
21863 main (void)
21864 {
21865 static struct timespec x; x.tv_sec = x.tv_nsec;
21866   ;
21867   return 0;
21868 }
21869 _ACEOF
21870 if ac_fn_c_try_compile "$LINENO"
21871 then :
21872   gl_cv_sys_struct_timespec_in_pthread_h=yes
21873 else $as_nop
21874   gl_cv_sys_struct_timespec_in_pthread_h=no
21875 fi
21876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21877 fi
21878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21879 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21880       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21881         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21882       else
21883         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
21884 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
21885 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
21886 then :
21887   printf %s "(cached) " >&6
21888 else $as_nop
21889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21890 /* end confdefs.h.  */
21891 #include <unistd.h>
21892
21893 int
21894 main (void)
21895 {
21896 static struct timespec x; x.tv_sec = x.tv_nsec;
21897   ;
21898   return 0;
21899 }
21900 _ACEOF
21901 if ac_fn_c_try_compile "$LINENO"
21902 then :
21903   gl_cv_sys_struct_timespec_in_unistd_h=yes
21904 else $as_nop
21905   gl_cv_sys_struct_timespec_in_unistd_h=no
21906 fi
21907 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21908 fi
21909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
21910 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
21911         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
21912           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
21913         fi
21914       fi
21915     fi
21916   fi
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933      if test $gl_cv_have_include_next = yes; then
21934        gl_cv_next_time_h='<'time.h'>'
21935      else
21936        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21937 printf %s "checking absolute name of <time.h>... " >&6; }
21938 if test ${gl_cv_next_time_h+y}
21939 then :
21940   printf %s "(cached) " >&6
21941 else $as_nop
21942
21943
21944
21945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21946 /* end confdefs.h.  */
21947 #include <time.h>
21948 _ACEOF
21949                 case "$host_os" in
21950     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21951     *)    gl_absname_cpp="$ac_cpp" ;;
21952   esac
21953
21954   case "$host_os" in
21955     mingw*)
21956                                           gl_dirsep_regex='[/\\]'
21957       ;;
21958     *)
21959       gl_dirsep_regex='\/'
21960       ;;
21961   esac
21962       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21963   gl_header_literal_regex=`echo 'time.h' \
21964                            | sed -e "$gl_make_literal_regex_sed"`
21965   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21966       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21967       s|^/[^/]|//&|
21968       p
21969       q
21970     }'
21971
21972         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21973   sed -n "$gl_absolute_header_sed"`
21974
21975            gl_header=$gl_cv_absolute_time_h
21976            gl_cv_next_time_h='"'$gl_header'"'
21977
21978
21979 fi
21980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21981 printf "%s\n" "$gl_cv_next_time_h" >&6; }
21982      fi
21983      NEXT_TIME_H=$gl_cv_next_time_h
21984
21985      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21986        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21987        gl_next_as_first_directive='<'time.h'>'
21988      else
21989        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21990        gl_next_as_first_directive=$gl_cv_next_time_h
21991      fi
21992      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21993
21994
21995
21996
21997
21998
21999
22000
22001   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
22002 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
22003 if test ${gl_cv_time_h_has_TIME_UTC+y}
22004 then :
22005   printf %s "(cached) " >&6
22006 else $as_nop
22007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22008 /* end confdefs.h.  */
22009 #include <time.h>
22010
22011 int
22012 main (void)
22013 {
22014 static int x = TIME_UTC; x++;
22015   ;
22016   return 0;
22017 }
22018 _ACEOF
22019 if ac_fn_c_try_compile "$LINENO"
22020 then :
22021   gl_cv_time_h_has_TIME_UTC=yes
22022 else $as_nop
22023   gl_cv_time_h_has_TIME_UTC=no
22024 fi
22025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22026 fi
22027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
22028 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
22029   if test $gl_cv_time_h_has_TIME_UTC = yes; then
22030     TIME_H_DEFINES_TIME_UTC=1
22031   else
22032     TIME_H_DEFINES_TIME_UTC=0
22033   fi
22034
22035
22036
22037
22038 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22039 if test "x$ac_cv_have_decl_execvpe" = xyes
22040 then :
22041   ac_have_decl=1
22042 else $as_nop
22043   ac_have_decl=0
22044 fi
22045 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059      if test $gl_cv_have_include_next = yes; then
22060        gl_cv_next_unistd_h='<'unistd.h'>'
22061      else
22062        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22063 printf %s "checking absolute name of <unistd.h>... " >&6; }
22064 if test ${gl_cv_next_unistd_h+y}
22065 then :
22066   printf %s "(cached) " >&6
22067 else $as_nop
22068
22069              if test $ac_cv_header_unistd_h = yes; then
22070
22071
22072
22073
22074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22075 /* end confdefs.h.  */
22076 #include <unistd.h>
22077 _ACEOF
22078                 case "$host_os" in
22079     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22080     *)    gl_absname_cpp="$ac_cpp" ;;
22081   esac
22082
22083   case "$host_os" in
22084     mingw*)
22085                                           gl_dirsep_regex='[/\\]'
22086       ;;
22087     *)
22088       gl_dirsep_regex='\/'
22089       ;;
22090   esac
22091       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22092   gl_header_literal_regex=`echo 'unistd.h' \
22093                            | sed -e "$gl_make_literal_regex_sed"`
22094   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22095       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22096       s|^/[^/]|//&|
22097       p
22098       q
22099     }'
22100
22101         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22102   sed -n "$gl_absolute_header_sed"`
22103
22104            gl_header=$gl_cv_absolute_unistd_h
22105            gl_cv_next_unistd_h='"'$gl_header'"'
22106           else
22107                gl_cv_next_unistd_h='<'unistd.h'>'
22108              fi
22109
22110
22111 fi
22112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22113 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
22114      fi
22115      NEXT_UNISTD_H=$gl_cv_next_unistd_h
22116
22117      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22118        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22119        gl_next_as_first_directive='<'unistd.h'>'
22120      else
22121        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22122        gl_next_as_first_directive=$gl_cv_next_unistd_h
22123      fi
22124      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22125
22126
22127
22128
22129   if test $ac_cv_header_unistd_h = yes; then
22130     HAVE_UNISTD_H=1
22131   else
22132     HAVE_UNISTD_H=0
22133   fi
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147   if test $ac_cv_have_decl_execvpe = no; then
22148     HAVE_DECL_EXECVPE=0
22149   fi
22150
22151
22152
22153
22154
22155
22156
22157 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
22158 i\
22159 0
22160 q
22161 '
22162 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
22163 i\
22164 0
22165 q
22166 '
22167 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
22168 i\
22169 0
22170 q
22171 '
22172
22173
22174   if test "$HAVE_LIBUNISTRING" = yes; then
22175     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
22176     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
22177     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
22178   fi
22179
22180 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22181 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
22182 then :
22183   ac_have_decl=1
22184 else $as_nop
22185   ac_have_decl=0
22186 fi
22187 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
22188
22189 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22190 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
22191 then :
22192   ac_have_decl=1
22193 else $as_nop
22194   ac_have_decl=0
22195 fi
22196 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
22197
22198 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22199 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
22200 then :
22201   ac_have_decl=1
22202 else $as_nop
22203   ac_have_decl=0
22204 fi
22205 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
22206
22207 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22208 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
22209 then :
22210   ac_have_decl=1
22211 else $as_nop
22212   ac_have_decl=0
22213 fi
22214 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
22215
22216 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22217 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
22218 then :
22219   ac_have_decl=1
22220 else $as_nop
22221   ac_have_decl=0
22222 fi
22223 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
22224
22225 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22226 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
22227 then :
22228   ac_have_decl=1
22229 else $as_nop
22230   ac_have_decl=0
22231 fi
22232 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
22233
22234 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22235 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
22236 then :
22237   ac_have_decl=1
22238 else $as_nop
22239   ac_have_decl=0
22240 fi
22241 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
22242
22243 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22244 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
22245 then :
22246   ac_have_decl=1
22247 else $as_nop
22248   ac_have_decl=0
22249 fi
22250 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
22251
22252 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22253 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
22254 then :
22255   ac_have_decl=1
22256 else $as_nop
22257   ac_have_decl=0
22258 fi
22259 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
22260
22261 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22262 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
22263 then :
22264   ac_have_decl=1
22265 else $as_nop
22266   ac_have_decl=0
22267 fi
22268 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
22269
22270 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22271 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
22272 then :
22273   ac_have_decl=1
22274 else $as_nop
22275   ac_have_decl=0
22276 fi
22277 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
22278
22279 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22280 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
22281 then :
22282   ac_have_decl=1
22283 else $as_nop
22284   ac_have_decl=0
22285 fi
22286 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
22287
22288 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22289 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
22290 then :
22291   ac_have_decl=1
22292 else $as_nop
22293   ac_have_decl=0
22294 fi
22295 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
22296
22297 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22298 if test "x$ac_cv_have_decl_unsetenv" = xyes
22299 then :
22300   ac_have_decl=1
22301 else $as_nop
22302   ac_have_decl=0
22303 fi
22304 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
22305
22306
22307
22308
22309
22310   if test $ac_cv_header_features_h = yes; then
22311     HAVE_FEATURES_H=1
22312   else
22313     HAVE_FEATURES_H=0
22314   fi
22315
22316
22317
22318   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
22319 printf %s "checking for inttypes.h... " >&6; }
22320 if test ${gl_cv_header_inttypes_h+y}
22321 then :
22322   printf %s "(cached) " >&6
22323 else $as_nop
22324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22325 /* end confdefs.h.  */
22326
22327 #include <sys/types.h>
22328 #include <inttypes.h>
22329
22330 int
22331 main (void)
22332 {
22333 uintmax_t i = (uintmax_t) -1; return !i;
22334   ;
22335   return 0;
22336 }
22337 _ACEOF
22338 if ac_fn_c_try_compile "$LINENO"
22339 then :
22340   gl_cv_header_inttypes_h=yes
22341 else $as_nop
22342   gl_cv_header_inttypes_h=no
22343 fi
22344 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22345 fi
22346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
22347 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
22348   if test $gl_cv_header_inttypes_h = yes; then
22349
22350 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
22351
22352   fi
22353
22354
22355   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
22356 printf %s "checking for stdint.h... " >&6; }
22357 if test ${gl_cv_header_stdint_h+y}
22358 then :
22359   printf %s "(cached) " >&6
22360 else $as_nop
22361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h.  */
22363 #include <sys/types.h>
22364             #include <stdint.h>
22365 int
22366 main (void)
22367 {
22368 uintmax_t i = (uintmax_t) -1; return !i;
22369   ;
22370   return 0;
22371 }
22372 _ACEOF
22373 if ac_fn_c_try_compile "$LINENO"
22374 then :
22375   gl_cv_header_stdint_h=yes
22376 else $as_nop
22377   gl_cv_header_stdint_h=no
22378 fi
22379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22380 fi
22381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
22382 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
22383   if test $gl_cv_header_stdint_h = yes; then
22384
22385 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
22386
22387   fi
22388
22389
22390
22391
22392   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
22393 printf %s "checking for intmax_t... " >&6; }
22394 if test ${gt_cv_c_intmax_t+y}
22395 then :
22396   printf %s "(cached) " >&6
22397 else $as_nop
22398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22399 /* end confdefs.h.  */
22400
22401 #include <stddef.h>
22402 #include <stdlib.h>
22403 #if HAVE_STDINT_H_WITH_UINTMAX
22404 #include <stdint.h>
22405 #endif
22406 #if HAVE_INTTYPES_H_WITH_UINTMAX
22407 #include <inttypes.h>
22408 #endif
22409
22410 int
22411 main (void)
22412 {
22413 intmax_t x = -1; return !x;
22414   ;
22415   return 0;
22416 }
22417 _ACEOF
22418 if ac_fn_c_try_compile "$LINENO"
22419 then :
22420   gt_cv_c_intmax_t=yes
22421 else $as_nop
22422   gt_cv_c_intmax_t=no
22423 fi
22424 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22425 fi
22426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
22427 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
22428   if test $gt_cv_c_intmax_t = yes; then
22429
22430 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
22431
22432   else
22433
22434 printf "%s\n" "#define intmax_t long long" >>confdefs.h
22435
22436   fi
22437
22438
22439   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
22440 printf %s "checking where to find the exponent in a 'double'... " >&6; }
22441 if test ${gl_cv_cc_double_expbit0+y}
22442 then :
22443   printf %s "(cached) " >&6
22444 else $as_nop
22445
22446       if test "$cross_compiling" = yes
22447 then :
22448
22449                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22450 /* end confdefs.h.  */
22451
22452 #if defined arm || defined __arm || defined __arm__
22453   mixed_endianness
22454 #endif
22455
22456 _ACEOF
22457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22458   $EGREP "mixed_endianness" >/dev/null 2>&1
22459 then :
22460   gl_cv_cc_double_expbit0="unknown"
22461 else $as_nop
22462
22463                                                          :
22464 if test ${ac_cv_c_bigendian+y}
22465 then :
22466   printf %s "(cached) " >&6
22467 else $as_nop
22468   ac_cv_c_bigendian=unknown
22469     # See if we're dealing with a universal compiler.
22470     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22471 /* end confdefs.h.  */
22472 #ifndef __APPLE_CC__
22473                not a universal capable compiler
22474              #endif
22475              typedef int dummy;
22476
22477 _ACEOF
22478 if ac_fn_c_try_compile "$LINENO"
22479 then :
22480
22481         # Check for potential -arch flags.  It is not universal unless
22482         # there are at least two -arch flags with different values.
22483         ac_arch=
22484         ac_prev=
22485         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22486          if test -n "$ac_prev"; then
22487            case $ac_word in
22488              i?86 | x86_64 | ppc | ppc64)
22489                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22490                  ac_arch=$ac_word
22491                else
22492                  ac_cv_c_bigendian=universal
22493                  break
22494                fi
22495                ;;
22496            esac
22497            ac_prev=
22498          elif test "x$ac_word" = "x-arch"; then
22499            ac_prev=arch
22500          fi
22501        done
22502 fi
22503 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22504     if test $ac_cv_c_bigendian = unknown; then
22505       # See if sys/param.h defines the BYTE_ORDER macro.
22506       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22507 /* end confdefs.h.  */
22508 #include <sys/types.h>
22509              #include <sys/param.h>
22510
22511 int
22512 main (void)
22513 {
22514 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
22515                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
22516                      && LITTLE_ENDIAN)
22517               bogus endian macros
22518              #endif
22519
22520   ;
22521   return 0;
22522 }
22523 _ACEOF
22524 if ac_fn_c_try_compile "$LINENO"
22525 then :
22526   # It does; now see whether it defined to BIG_ENDIAN or not.
22527          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22528 /* end confdefs.h.  */
22529 #include <sys/types.h>
22530                 #include <sys/param.h>
22531
22532 int
22533 main (void)
22534 {
22535 #if BYTE_ORDER != BIG_ENDIAN
22536                  not big endian
22537                 #endif
22538
22539   ;
22540   return 0;
22541 }
22542 _ACEOF
22543 if ac_fn_c_try_compile "$LINENO"
22544 then :
22545   ac_cv_c_bigendian=yes
22546 else $as_nop
22547   ac_cv_c_bigendian=no
22548 fi
22549 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22550 fi
22551 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22552     fi
22553     if test $ac_cv_c_bigendian = unknown; then
22554       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
22555       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22556 /* end confdefs.h.  */
22557 #include <limits.h>
22558
22559 int
22560 main (void)
22561 {
22562 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
22563               bogus endian macros
22564              #endif
22565
22566   ;
22567   return 0;
22568 }
22569 _ACEOF
22570 if ac_fn_c_try_compile "$LINENO"
22571 then :
22572   # It does; now see whether it defined to _BIG_ENDIAN or not.
22573          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22574 /* end confdefs.h.  */
22575 #include <limits.h>
22576
22577 int
22578 main (void)
22579 {
22580 #ifndef _BIG_ENDIAN
22581                  not big endian
22582                 #endif
22583
22584   ;
22585   return 0;
22586 }
22587 _ACEOF
22588 if ac_fn_c_try_compile "$LINENO"
22589 then :
22590   ac_cv_c_bigendian=yes
22591 else $as_nop
22592   ac_cv_c_bigendian=no
22593 fi
22594 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22595 fi
22596 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22597     fi
22598     if test $ac_cv_c_bigendian = unknown; then
22599       # Compile a test program.
22600       if test "$cross_compiling" = yes
22601 then :
22602   # Try to guess by grepping values from an object file.
22603          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22604 /* end confdefs.h.  */
22605 unsigned short int ascii_mm[] =
22606                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22607                 unsigned short int ascii_ii[] =
22608                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
22609                 int use_ascii (int i) {
22610                   return ascii_mm[i] + ascii_ii[i];
22611                 }
22612                 unsigned short int ebcdic_ii[] =
22613                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22614                 unsigned short int ebcdic_mm[] =
22615                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
22616                 int use_ebcdic (int i) {
22617                   return ebcdic_mm[i] + ebcdic_ii[i];
22618                 }
22619                 extern int foo;
22620
22621 int
22622 main (void)
22623 {
22624 return use_ascii (foo) == use_ebcdic (foo);
22625   ;
22626   return 0;
22627 }
22628 _ACEOF
22629 if ac_fn_c_try_compile "$LINENO"
22630 then :
22631   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
22632               ac_cv_c_bigendian=yes
22633             fi
22634             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
22635               if test "$ac_cv_c_bigendian" = unknown; then
22636                 ac_cv_c_bigendian=no
22637               else
22638                 # finding both strings is unlikely to happen, but who knows?
22639                 ac_cv_c_bigendian=unknown
22640               fi
22641             fi
22642 fi
22643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22644 else $as_nop
22645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22646 /* end confdefs.h.  */
22647 $ac_includes_default
22648 int
22649 main (void)
22650 {
22651
22652              /* Are we little or big endian?  From Harbison&Steele.  */
22653              union
22654              {
22655                long int l;
22656                char c[sizeof (long int)];
22657              } u;
22658              u.l = 1;
22659              return u.c[sizeof (long int) - 1] == 1;
22660
22661   ;
22662   return 0;
22663 }
22664 _ACEOF
22665 if ac_fn_c_try_run "$LINENO"
22666 then :
22667   ac_cv_c_bigendian=no
22668 else $as_nop
22669   ac_cv_c_bigendian=yes
22670 fi
22671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22672   conftest.$ac_objext conftest.beam conftest.$ac_ext
22673 fi
22674
22675     fi
22676 fi
22677 :
22678  case $ac_cv_c_bigendian in #(
22679    yes)
22680      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
22681    no)
22682      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
22683    universal)
22684
22685 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
22686
22687      ;; #(
22688    *)
22689      gl_cv_cc_double_expbit0="unknown" ;;
22690  esac
22691
22692
22693 fi
22694 rm -rf conftest*
22695
22696
22697 else $as_nop
22698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22699 /* end confdefs.h.  */
22700
22701 #include <float.h>
22702 #include <stddef.h>
22703 #include <stdio.h>
22704 #include <string.h>
22705 #define NWORDS \
22706   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22707 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
22708 static unsigned int ored_words[NWORDS];
22709 static unsigned int anded_words[NWORDS];
22710 static void add_to_ored_words (double x)
22711 {
22712   memory_double m;
22713   size_t i;
22714   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
22715   memset (&m, 0, sizeof (memory_double));
22716   m.value = x;
22717   for (i = 0; i < NWORDS; i++)
22718     {
22719       ored_words[i] |= m.word[i];
22720       anded_words[i] &= m.word[i];
22721     }
22722 }
22723 int main ()
22724 {
22725   size_t j;
22726   FILE *fp = fopen ("conftest.out", "w");
22727   if (fp == NULL)
22728     return 1;
22729   for (j = 0; j < NWORDS; j++)
22730     anded_words[j] = ~ (unsigned int) 0;
22731   add_to_ored_words (0.25);
22732   add_to_ored_words (0.5);
22733   add_to_ored_words (1.0);
22734   add_to_ored_words (2.0);
22735   add_to_ored_words (4.0);
22736   /* Remove bits that are common (e.g. if representation of the first mantissa
22737      bit is explicit).  */
22738   for (j = 0; j < NWORDS; j++)
22739     ored_words[j] &= ~anded_words[j];
22740   /* Now find the nonzero word.  */
22741   for (j = 0; j < NWORDS; j++)
22742     if (ored_words[j] != 0)
22743       break;
22744   if (j < NWORDS)
22745     {
22746       size_t i;
22747       for (i = j + 1; i < NWORDS; i++)
22748         if (ored_words[i] != 0)
22749           {
22750             fprintf (fp, "unknown");
22751             return (fclose (fp) != 0);
22752           }
22753       for (i = 0; ; i++)
22754         if ((ored_words[j] >> i) & 1)
22755           {
22756             fprintf (fp, "word %d bit %d", (int) j, (int) i);
22757             return (fclose (fp) != 0);
22758           }
22759     }
22760   fprintf (fp, "unknown");
22761   return (fclose (fp) != 0);
22762 }
22763
22764 _ACEOF
22765 if ac_fn_c_try_run "$LINENO"
22766 then :
22767   gl_cv_cc_double_expbit0=`cat conftest.out`
22768 else $as_nop
22769   gl_cv_cc_double_expbit0="unknown"
22770 fi
22771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22772   conftest.$ac_objext conftest.beam conftest.$ac_ext
22773 fi
22774
22775       rm -f conftest.out
22776
22777 fi
22778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
22779 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
22780   case "$gl_cv_cc_double_expbit0" in
22781     word*bit*)
22782       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22783       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
22784
22785 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
22786
22787
22788 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
22789
22790       ;;
22791   esac
22792
22793
22794
22795
22796
22797
22798
22799
22800   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
22801 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
22802 if test ${gl_cv_func_snprintf_retval_c99+y}
22803 then :
22804   printf %s "(cached) " >&6
22805 else $as_nop
22806
22807       if test "$cross_compiling" = yes
22808 then :
22809   case "$host_os" in
22810                                  # Guess yes on glibc systems.
22811            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
22812                                  # Guess yes on musl systems.
22813            *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
22814                                  # Guess yes on FreeBSD >= 5.
22815            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
22816            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22817            midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
22818                                  # Guess yes on Mac OS X >= 10.3.
22819            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
22820            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
22821                                  # Guess yes on OpenBSD >= 3.9.
22822            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
22823                                  gl_cv_func_snprintf_retval_c99="guessing no";;
22824            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
22825                                  # Guess yes on Solaris >= 2.10.
22826            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
22827            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
22828                                  # Guess yes on AIX >= 4.
22829            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
22830            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
22831                                  # Guess yes on NetBSD >= 3.
22832            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
22833                                  gl_cv_func_snprintf_retval_c99="guessing no";;
22834            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
22835                                  # Guess yes on BeOS.
22836            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
22837                                  # Guess yes on Android.
22838            linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
22839                                  # Guess yes on MSVC, no on mingw.
22840            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22841 /* end confdefs.h.  */
22842
22843 #ifdef _MSC_VER
22844  Known
22845 #endif
22846
22847 _ACEOF
22848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22849   $EGREP "Known" >/dev/null 2>&1
22850 then :
22851   gl_cv_func_snprintf_retval_c99="guessing yes"
22852 else $as_nop
22853   gl_cv_func_snprintf_retval_c99="guessing no"
22854 fi
22855 rm -rf conftest*
22856
22857                                  ;;
22858                                  # If we don't know, obey --enable-cross-guesses.
22859            *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
22860          esac
22861
22862 else $as_nop
22863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22864 /* end confdefs.h.  */
22865
22866 #include <stdio.h>
22867 #include <string.h>
22868 #if HAVE_SNPRINTF
22869 # define my_snprintf snprintf
22870 #else
22871 # include <stdarg.h>
22872 static int my_snprintf (char *buf, int size, const char *format, ...)
22873 {
22874   va_list args;
22875   int ret;
22876   va_start (args, format);
22877   ret = vsnprintf (buf, size, format, args);
22878   va_end (args);
22879   return ret;
22880 }
22881 #endif
22882 static char buf[100];
22883 int main ()
22884 {
22885   strcpy (buf, "ABCDEF");
22886   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
22887     return 1;
22888   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
22889     return 2;
22890   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
22891     return 3;
22892   return 0;
22893 }
22894 _ACEOF
22895 if ac_fn_c_try_run "$LINENO"
22896 then :
22897   gl_cv_func_snprintf_retval_c99=yes
22898 else $as_nop
22899   gl_cv_func_snprintf_retval_c99=no
22900 fi
22901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22902   conftest.$ac_objext conftest.beam conftest.$ac_ext
22903 fi
22904
22905
22906 fi
22907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
22908 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
22909
22910
22911
22912
22913   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
22914 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
22915 if test ${gl_cv_func_snprintf_truncation_c99+y}
22916 then :
22917   printf %s "(cached) " >&6
22918 else $as_nop
22919
22920       if test "$cross_compiling" = yes
22921 then :
22922
22923          case "$host_os" in
22924                                  # Guess yes on glibc systems.
22925            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
22926                                  # Guess yes on musl systems.
22927            *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
22928                                  # Guess yes on FreeBSD >= 5.
22929            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
22930            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22931            midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
22932                                  # Guess yes on Mac OS X >= 10.3.
22933            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
22934            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
22935                                  # Guess yes on OpenBSD >= 3.9.
22936            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
22937                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
22938            openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
22939                                  # Guess yes on Solaris >= 2.6.
22940            solaris2.[0-5] | solaris2.[0-5].*)
22941                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
22942            solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
22943                                  # Guess yes on AIX >= 4.
22944            aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
22945            aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
22946                                  # Guess yes on HP-UX >= 11.
22947            hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22948            hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
22949                                  # Guess yes on IRIX >= 6.5.
22950            irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
22951                                  # Guess yes on OSF/1 >= 5.
22952            osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
22953            osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
22954                                  # Guess yes on NetBSD >= 3.
22955            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
22956                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
22957            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
22958                                  # Guess yes on BeOS.
22959            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
22960                                  # Guess yes on Android.
22961            linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
22962                                  # Guess no on native Windows.
22963            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
22964                                  # If we don't know, obey --enable-cross-guesses.
22965            *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
22966          esac
22967
22968 else $as_nop
22969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22970 /* end confdefs.h.  */
22971
22972 #include <stdio.h>
22973 #include <string.h>
22974 #if HAVE_SNPRINTF
22975 # define my_snprintf snprintf
22976 #else
22977 # include <stdarg.h>
22978 static int my_snprintf (char *buf, int size, const char *format, ...)
22979 {
22980   va_list args;
22981   int ret;
22982   va_start (args, format);
22983   ret = vsnprintf (buf, size, format, args);
22984   va_end (args);
22985   return ret;
22986 }
22987 #endif
22988 static char buf[100];
22989 int main ()
22990 {
22991   strcpy (buf, "ABCDEF");
22992   my_snprintf (buf, 3, "%d %d", 4567, 89);
22993   if (memcmp (buf, "45\0DEF", 6) != 0)
22994     return 1;
22995   return 0;
22996 }
22997 _ACEOF
22998 if ac_fn_c_try_run "$LINENO"
22999 then :
23000   gl_cv_func_snprintf_truncation_c99=yes
23001 else $as_nop
23002   gl_cv_func_snprintf_truncation_c99=no
23003 fi
23004 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23005   conftest.$ac_objext conftest.beam conftest.$ac_ext
23006 fi
23007
23008
23009 fi
23010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
23011 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
23012
23013
23014
23015
23016
23017   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23018 if test "x$ac_cv_func_snprintf" = xyes
23019 then :
23020   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23021
23022 fi
23023 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
23024 if test "x$ac_cv_func_strnlen" = xyes
23025 then :
23026   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
23027
23028 fi
23029 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
23030 if test "x$ac_cv_func_wcslen" = xyes
23031 then :
23032   printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
23033
23034 fi
23035 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
23036 if test "x$ac_cv_func_wcsnlen" = xyes
23037 then :
23038   printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
23039
23040 fi
23041 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
23042 if test "x$ac_cv_func_mbrtowc" = xyes
23043 then :
23044   printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
23045
23046 fi
23047 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
23048 if test "x$ac_cv_func_wcrtomb" = xyes
23049 then :
23050   printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
23051
23052 fi
23053
23054       ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
23055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23056 if test "x$ac_cv_have_decl__snprintf" = xyes
23057 then :
23058   ac_have_decl=1
23059 else $as_nop
23060   ac_have_decl=0
23061 fi
23062 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
23063
23064
23065
23066   case "$gl_cv_func_snprintf_retval_c99" in
23067     *yes)
23068
23069 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
23070
23071       ;;
23072   esac
23073
23074   case "$gl_cv_func_snprintf_truncation_c99" in
23075     *yes)
23076
23077 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
23078
23079       ;;
23080   esac
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094      if test $gl_cv_have_include_next = yes; then
23095        gl_cv_next_wchar_h='<'wchar.h'>'
23096      else
23097        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
23098 printf %s "checking absolute name of <wchar.h>... " >&6; }
23099 if test ${gl_cv_next_wchar_h+y}
23100 then :
23101   printf %s "(cached) " >&6
23102 else $as_nop
23103
23104              if test $ac_cv_header_wchar_h = yes; then
23105
23106
23107
23108
23109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23110 /* end confdefs.h.  */
23111 #include <wchar.h>
23112 _ACEOF
23113                 case "$host_os" in
23114     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23115     *)    gl_absname_cpp="$ac_cpp" ;;
23116   esac
23117
23118   case "$host_os" in
23119     mingw*)
23120                                           gl_dirsep_regex='[/\\]'
23121       ;;
23122     *)
23123       gl_dirsep_regex='\/'
23124       ;;
23125   esac
23126       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23127   gl_header_literal_regex=`echo 'wchar.h' \
23128                            | sed -e "$gl_make_literal_regex_sed"`
23129   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23130       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23131       s|^/[^/]|//&|
23132       p
23133       q
23134     }'
23135
23136         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23137   sed -n "$gl_absolute_header_sed"`
23138
23139            gl_header=$gl_cv_absolute_wchar_h
23140            gl_cv_next_wchar_h='"'$gl_header'"'
23141           else
23142                gl_cv_next_wchar_h='<'wchar.h'>'
23143              fi
23144
23145
23146 fi
23147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
23148 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
23149      fi
23150      NEXT_WCHAR_H=$gl_cv_next_wchar_h
23151
23152      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23153        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23154        gl_next_as_first_directive='<'wchar.h'>'
23155      else
23156        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23157        gl_next_as_first_directive=$gl_cv_next_wchar_h
23158      fi
23159      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
23160
23161
23162
23163
23164   if test $ac_cv_header_wchar_h = yes; then
23165     HAVE_WCHAR_H=1
23166   else
23167     HAVE_WCHAR_H=0
23168   fi
23169
23170
23171
23172
23173
23174   if test $gt_cv_c_wint_t = yes; then
23175     HAVE_WINT_T=1
23176   else
23177     HAVE_WINT_T=0
23178   fi
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189   ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
23190       #include <wchar.h>
23191
23192 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23193 if test "x$ac_cv_have_decl_wcsdup" = xyes
23194 then :
23195   ac_have_decl=1
23196 else $as_nop
23197   ac_have_decl=0
23198 fi
23199 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
23200
23201   if test $ac_cv_have_decl_wcsdup = no; then
23202     HAVE_DECL_WCSDUP=0
23203   fi
23204
23205
23206
23207
23208
23209
23210   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
23211 printf %s "checking for C compiler option to allow warnings... " >&6; }
23212 if test ${gl_cv_cc_wallow+y}
23213 then :
23214   printf %s "(cached) " >&6
23215 else $as_nop
23216   rm -f conftest*
23217      echo 'int dummy;' > conftest.c
23218      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
23219   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23220   (eval $ac_try) 2>&5
23221   ac_status=$?
23222   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23223   test $ac_status = 0; }; } >/dev/null
23224      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
23225   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23226   (eval $ac_try) 2>&5
23227   ac_status=$?
23228   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23229   test $ac_status = 0; }; } >/dev/null
23230                          if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
23231        gl_cv_cc_wallow='-Wno-error'
23232      else
23233        gl_cv_cc_wallow=none
23234      fi
23235      rm -f conftest*
23236
23237 fi
23238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
23239 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
23240   case "$gl_cv_cc_wallow" in
23241     none) GL_CFLAG_ALLOW_WARNINGS='' ;;
23242     *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
23243   esac
23244
23245
23246
23247     if test -n "$CXX" && test "$CXX" != no; then
23248     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler option to allow warnings" >&5
23249 printf %s "checking for C++ compiler option to allow warnings... " >&6; }
23250 if test ${gl_cv_cxx_wallow+y}
23251 then :
23252   printf %s "(cached) " >&6
23253 else $as_nop
23254   rm -f conftest*
23255        echo 'int dummy;' > conftest.cc
23256        { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
23257   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23258   (eval $ac_try) 2>&5
23259   ac_status=$?
23260   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23261   test $ac_status = 0; }; } >/dev/null
23262        { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
23263   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23264   (eval $ac_try) 2>&5
23265   ac_status=$?
23266   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23267   test $ac_status = 0; }; } >/dev/null
23268                                    if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
23269          gl_cv_cxx_wallow='-Wno-error'
23270        else
23271          gl_cv_cxx_wallow=none
23272        fi
23273        rm -f conftest*
23274
23275 fi
23276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
23277 printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
23278     case "$gl_cv_cxx_wallow" in
23279       none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
23280       *)    GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
23281     esac
23282   else
23283     GL_CXXFLAG_ALLOW_WARNINGS=''
23284   fi
23285
23286
23287
23288   HAVE_STRUCT_SOCKADDR_STORAGE=1;
23289   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
23290
23291   HAVE_SA_FAMILY_T=1;
23292   HAVE_ACCEPT4=1;
23293
23294
23295    if test $ac_cv_header_sys_socket_h = no; then
23296                          ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
23297 if test "x$ac_cv_header_ws2tcpip_h" = xyes
23298 then :
23299   printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
23300
23301 fi
23302
23303    fi
23304
23305
23306
23307
23308
23309         case "$host_os" in
23310     osf*)
23311
23312 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
23313
23314       ;;
23315   esac
23316
23317   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
23318 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
23319 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
23320 then :
23321   printf %s "(cached) " >&6
23322 else $as_nop
23323
23324       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23325 /* end confdefs.h.  */
23326 #include <sys/socket.h>
23327 int
23328 main (void)
23329 {
23330
23331   ;
23332   return 0;
23333 }
23334 _ACEOF
23335 if ac_fn_c_try_compile "$LINENO"
23336 then :
23337   gl_cv_header_sys_socket_h_selfcontained=yes
23338 else $as_nop
23339   gl_cv_header_sys_socket_h_selfcontained=no
23340 fi
23341 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23342
23343 fi
23344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
23345 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
23346   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
23347             ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
23348 if test "x$ac_cv_func_shutdown" = xyes
23349 then :
23350   printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
23351
23352 fi
23353
23354     if test $ac_cv_func_shutdown = yes; then
23355       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
23356 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
23357 if test ${gl_cv_header_sys_socket_h_shut+y}
23358 then :
23359   printf %s "(cached) " >&6
23360 else $as_nop
23361
23362           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23363 /* end confdefs.h.  */
23364 #include <sys/socket.h>
23365 int
23366 main (void)
23367 {
23368 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
23369   ;
23370   return 0;
23371 }
23372 _ACEOF
23373 if ac_fn_c_try_compile "$LINENO"
23374 then :
23375   gl_cv_header_sys_socket_h_shut=yes
23376 else $as_nop
23377   gl_cv_header_sys_socket_h_shut=no
23378 fi
23379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23380
23381 fi
23382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
23383 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
23384       if test $gl_cv_header_sys_socket_h_shut = no; then
23385         SYS_SOCKET_H='sys/socket.h'
23386       fi
23387     fi
23388   fi
23389   # We need to check for ws2tcpip.h now.
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401      if test $gl_cv_have_include_next = yes; then
23402        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
23403      else
23404        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
23405 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
23406 if test ${gl_cv_next_sys_socket_h+y}
23407 then :
23408   printf %s "(cached) " >&6
23409 else $as_nop
23410
23411              if test $ac_cv_header_sys_socket_h = yes; then
23412
23413
23414
23415
23416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23417 /* end confdefs.h.  */
23418 #include <sys/socket.h>
23419 _ACEOF
23420                 case "$host_os" in
23421     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23422     *)    gl_absname_cpp="$ac_cpp" ;;
23423   esac
23424
23425   case "$host_os" in
23426     mingw*)
23427                                           gl_dirsep_regex='[/\\]'
23428       ;;
23429     *)
23430       gl_dirsep_regex='\/'
23431       ;;
23432   esac
23433       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23434   gl_header_literal_regex=`echo 'sys/socket.h' \
23435                            | sed -e "$gl_make_literal_regex_sed"`
23436   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23437       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23438       s|^/[^/]|//&|
23439       p
23440       q
23441     }'
23442
23443         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23444   sed -n "$gl_absolute_header_sed"`
23445
23446            gl_header=$gl_cv_absolute_sys_socket_h
23447            gl_cv_next_sys_socket_h='"'$gl_header'"'
23448           else
23449                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
23450              fi
23451
23452
23453 fi
23454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
23455 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
23456      fi
23457      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
23458
23459      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23460        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23461        gl_next_as_first_directive='<'sys/socket.h'>'
23462      else
23463        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23464        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
23465      fi
23466      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
23467
23468
23469
23470
23471   if test $ac_cv_header_sys_socket_h = yes; then
23472     HAVE_SYS_SOCKET_H=1
23473   else
23474     HAVE_SYS_SOCKET_H=0
23475   fi
23476
23477
23478
23479   if test $ac_cv_header_sys_socket_h = yes; then
23480     HAVE_WS2TCPIP_H=0
23481   else
23482     if test $ac_cv_header_ws2tcpip_h = yes; then
23483       HAVE_WS2TCPIP_H=1
23484     else
23485       HAVE_WS2TCPIP_H=0
23486     fi
23487   fi
23488
23489
23490
23491   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
23492   /* sys/types.h is not needed according to POSIX, but the
23493      sys/socket.h in i386-unknown-freebsd4.10 and
23494      powerpc-apple-darwin5.5 required it. */
23495 #include <sys/types.h>
23496 #ifdef HAVE_SYS_SOCKET_H
23497 #include <sys/socket.h>
23498 #endif
23499 #ifdef HAVE_WS2TCPIP_H
23500 #include <ws2tcpip.h>
23501 #endif
23502
23503 "
23504 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
23505 then :
23506
23507 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
23508
23509
23510 fi
23511 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
23512   /* sys/types.h is not needed according to POSIX, but the
23513      sys/socket.h in i386-unknown-freebsd4.10 and
23514      powerpc-apple-darwin5.5 required it. */
23515 #include <sys/types.h>
23516 #ifdef HAVE_SYS_SOCKET_H
23517 #include <sys/socket.h>
23518 #endif
23519 #ifdef HAVE_WS2TCPIP_H
23520 #include <ws2tcpip.h>
23521 #endif
23522
23523 "
23524 if test "x$ac_cv_type_sa_family_t" = xyes
23525 then :
23526
23527 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
23528
23529
23530 fi
23531
23532   if test $ac_cv_type_struct_sockaddr_storage = no; then
23533     HAVE_STRUCT_SOCKADDR_STORAGE=0
23534   fi
23535   if test $ac_cv_type_sa_family_t = no; then
23536     HAVE_SA_FAMILY_T=0
23537   fi
23538   if test $ac_cv_type_struct_sockaddr_storage != no; then
23539     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
23540        #ifdef HAVE_SYS_SOCKET_H
23541        #include <sys/socket.h>
23542        #endif
23543        #ifdef HAVE_WS2TCPIP_H
23544        #include <ws2tcpip.h>
23545        #endif
23546
23547 "
23548 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
23549 then :
23550
23551 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
23552
23553
23554 else $as_nop
23555   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
23556 fi
23557
23558   fi
23559   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
23560      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
23561     SYS_SOCKET_H='sys/socket.h'
23562   fi
23563
23564
23565
23566
23567   if test $ac_cv_header_sys_socket_h != yes; then
23568                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23569 if test "x$ac_cv_header_winsock2_h" = xyes
23570 then :
23571   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
23572
23573 fi
23574
23575   fi
23576   if test "$ac_cv_header_winsock2_h" = yes; then
23577     HAVE_WINSOCK2_H=1
23578     UNISTD_H_HAVE_WINSOCK2_H=1
23579     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23580   else
23581     HAVE_WINSOCK2_H=0
23582   fi
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594   GL_GNULIB_SOCKET=0
23595
23596
23597
23598   GL_GNULIB_CONNECT=0
23599
23600
23601
23602   GL_GNULIB_ACCEPT=0
23603
23604
23605
23606   GL_GNULIB_BIND=0
23607
23608
23609
23610   GL_GNULIB_GETPEERNAME=0
23611
23612
23613
23614   GL_GNULIB_GETSOCKNAME=0
23615
23616
23617
23618   GL_GNULIB_GETSOCKOPT=0
23619
23620
23621
23622   GL_GNULIB_LISTEN=0
23623
23624
23625
23626   GL_GNULIB_RECV=0
23627
23628
23629
23630   GL_GNULIB_SEND=0
23631
23632
23633
23634   GL_GNULIB_RECVFROM=0
23635
23636
23637
23638   GL_GNULIB_SENDTO=0
23639
23640
23641
23642   GL_GNULIB_SETSOCKOPT=0
23643
23644
23645
23646   GL_GNULIB_SHUTDOWN=0
23647
23648
23649
23650   GL_GNULIB_ACCEPT4=0
23651
23652
23653
23654
23655     HAVE_DECL_INET_NTOP=1;
23656   HAVE_DECL_INET_PTON=1;
23657   REPLACE_INET_NTOP=0;
23658   REPLACE_INET_PTON=0;
23659
23660
23661
23662
23663
23664
23665   if test $ac_cv_header_arpa_inet_h = yes; then
23666     HAVE_ARPA_INET_H=1
23667   else
23668     HAVE_ARPA_INET_H=0
23669   fi
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680      if test $gl_cv_have_include_next = yes; then
23681        gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23682      else
23683        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
23684 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
23685 if test ${gl_cv_next_arpa_inet_h+y}
23686 then :
23687   printf %s "(cached) " >&6
23688 else $as_nop
23689
23690              if test $ac_cv_header_arpa_inet_h = yes; then
23691
23692
23693
23694
23695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23696 /* end confdefs.h.  */
23697 #include <arpa/inet.h>
23698 _ACEOF
23699                 case "$host_os" in
23700     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23701     *)    gl_absname_cpp="$ac_cpp" ;;
23702   esac
23703
23704   case "$host_os" in
23705     mingw*)
23706                                           gl_dirsep_regex='[/\\]'
23707       ;;
23708     *)
23709       gl_dirsep_regex='\/'
23710       ;;
23711   esac
23712       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23713   gl_header_literal_regex=`echo 'arpa/inet.h' \
23714                            | sed -e "$gl_make_literal_regex_sed"`
23715   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23716       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23717       s|^/[^/]|//&|
23718       p
23719       q
23720     }'
23721
23722         gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23723   sed -n "$gl_absolute_header_sed"`
23724
23725            gl_header=$gl_cv_absolute_arpa_inet_h
23726            gl_cv_next_arpa_inet_h='"'$gl_header'"'
23727           else
23728                gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23729              fi
23730
23731
23732 fi
23733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
23734 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
23735      fi
23736      NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
23737
23738      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23739        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23740        gl_next_as_first_directive='<'arpa/inet.h'>'
23741      else
23742        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23743        gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
23744      fi
23745      NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755   if test $ac_cv_header_sys_socket_h = yes; then
23756     HAVE_WS2TCPIP_H=0
23757   else
23758     if test $ac_cv_header_ws2tcpip_h = yes; then
23759       HAVE_WS2TCPIP_H=1
23760     else
23761       HAVE_WS2TCPIP_H=0
23762     fi
23763   fi
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773   GL_GNULIB_INET_NTOP=0
23774
23775
23776
23777   GL_GNULIB_INET_PTON=0
23778
23779
23780
23781
23782
23783
23784    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
23785 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
23786 if test ${gl_cv_func_getcwd_null+y}
23787 then :
23788   printf %s "(cached) " >&6
23789 else $as_nop
23790   if test "$cross_compiling" = yes
23791 then :
23792   case "$host_os" in
23793                            # Guess yes on glibc systems.
23794             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
23795                            # Guess yes on musl systems.
23796             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
23797                            # Guess yes on Cygwin.
23798             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
23799                            # If we don't know, obey --enable-cross-guesses.
23800             *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
23801           esac
23802
23803 else $as_nop
23804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23805 /* end confdefs.h.  */
23806
23807 #        include <stdlib.h>
23808 #        if HAVE_UNISTD_H
23809 #         include <unistd.h>
23810 #        else /* on Windows with MSVC */
23811 #         include <direct.h>
23812 #        endif
23813
23814
23815 $gl_mda_defines
23816
23817 #        ifndef getcwd
23818          char *getcwd ();
23819 #        endif
23820
23821 int
23822 main (void)
23823 {
23824
23825 #if defined _WIN32 && ! defined __CYGWIN__
23826 /* mingw cwd does not start with '/', but _getcwd does allocate.
23827    However, mingw fails to honor non-zero size.  */
23828 #else
23829            if (chdir ("/") != 0)
23830              return 1;
23831            else
23832              {
23833                char *f = getcwd (NULL, 0);
23834                if (! f)
23835                  return 2;
23836                if (f[0] != '/')
23837                  { free (f); return 3; }
23838                if (f[1] != '\0')
23839                  { free (f); return 4; }
23840                free (f);
23841                return 0;
23842              }
23843 #endif
23844
23845   ;
23846   return 0;
23847 }
23848 _ACEOF
23849 if ac_fn_c_try_run "$LINENO"
23850 then :
23851   gl_cv_func_getcwd_null=yes
23852 else $as_nop
23853   gl_cv_func_getcwd_null=no
23854 fi
23855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23856   conftest.$ac_objext conftest.beam conftest.$ac_ext
23857 fi
23858
23859 fi
23860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
23861 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
23862
23863
23864   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
23865 printf %s "checking for getcwd with POSIX signature... " >&6; }
23866 if test ${gl_cv_func_getcwd_posix_signature+y}
23867 then :
23868   printf %s "(cached) " >&6
23869 else $as_nop
23870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23871 /* end confdefs.h.  */
23872 #include <unistd.h>
23873
23874
23875 $gl_mda_defines
23876
23877 int
23878 main (void)
23879 {
23880 extern
23881            #ifdef __cplusplus
23882            "C"
23883            #endif
23884            char *getcwd (char *, size_t);
23885
23886   ;
23887   return 0;
23888 }
23889
23890 _ACEOF
23891 if ac_fn_c_try_compile "$LINENO"
23892 then :
23893   gl_cv_func_getcwd_posix_signature=yes
23894 else $as_nop
23895   gl_cv_func_getcwd_posix_signature=no
23896 fi
23897 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23898
23899 fi
23900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
23901 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
23902
23903
23904
23905   case "$host_os" in
23906     *-musl*)
23907 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
23908  ;;
23909   esac
23910
23911
23912
23913
23914
23915
23916
23917
23918   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
23919 printf %s "checking for IPv4 sockets... " >&6; }
23920 if test ${gl_cv_socket_ipv4+y}
23921 then :
23922   printf %s "(cached) " >&6
23923 else $as_nop
23924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23925 /* end confdefs.h.  */
23926 #include <sys/types.h>
23927 #ifdef HAVE_SYS_SOCKET_H
23928 #include <sys/socket.h>
23929 #endif
23930 #ifdef HAVE_NETINET_IN_H
23931 #include <netinet/in.h>
23932 #endif
23933 #ifdef HAVE_WINSOCK2_H
23934 #include <winsock2.h>
23935 #endif
23936 int
23937 main (void)
23938 {
23939 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
23940  if (&x && &y && &z) return 0;
23941   ;
23942   return 0;
23943 }
23944 _ACEOF
23945 if ac_fn_c_try_compile "$LINENO"
23946 then :
23947   gl_cv_socket_ipv4=yes
23948 else $as_nop
23949   gl_cv_socket_ipv4=no
23950 fi
23951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23952 fi
23953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
23954 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
23955   if test $gl_cv_socket_ipv4 = yes; then
23956
23957 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
23958
23959   fi
23960
23961   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
23962 printf %s "checking for IPv6 sockets... " >&6; }
23963 if test ${gl_cv_socket_ipv6+y}
23964 then :
23965   printf %s "(cached) " >&6
23966 else $as_nop
23967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23968 /* end confdefs.h.  */
23969 #include <sys/types.h>
23970 #ifdef HAVE_SYS_SOCKET_H
23971 #include <sys/socket.h>
23972 #endif
23973 #ifdef HAVE_NETINET_IN_H
23974 #include <netinet/in.h>
23975 #endif
23976 #ifdef HAVE_WINSOCK2_H
23977 #include <winsock2.h>
23978 #endif
23979 #ifdef HAVE_WS2TCPIP_H
23980 #include <ws2tcpip.h>
23981 #endif
23982 int
23983 main (void)
23984 {
23985 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
23986  if (&x && &y && &z) return 0;
23987   ;
23988   return 0;
23989 }
23990 _ACEOF
23991 if ac_fn_c_try_compile "$LINENO"
23992 then :
23993   gl_cv_socket_ipv6=yes
23994 else $as_nop
23995   gl_cv_socket_ipv6=no
23996 fi
23997 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23998 fi
23999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
24000 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
24001   if test $gl_cv_socket_ipv6 = yes; then
24002
24003 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
24004
24005   fi
24006
24007
24008
24009   GL_GNULIB_IOCTL=0
24010
24011
24012
24013
24014
24015     HAVE_PSELECT=1;
24016   REPLACE_PSELECT=0;
24017   REPLACE_SELECT=0;
24018
24019
24020
24021
24022
24023   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24024 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
24025 if test ${gl_cv_header_sys_select_h_selfcontained+y}
24026 then :
24027   printf %s "(cached) " >&6
24028 else $as_nop
24029
24030                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24031 /* end confdefs.h.  */
24032 #include <sys/select.h>
24033 int
24034 main (void)
24035 {
24036 struct timeval b;
24037   ;
24038   return 0;
24039 }
24040 _ACEOF
24041 if ac_fn_c_try_compile "$LINENO"
24042 then :
24043   gl_cv_header_sys_select_h_selfcontained=yes
24044 else $as_nop
24045   gl_cv_header_sys_select_h_selfcontained=no
24046 fi
24047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24048                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24049         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24050 /* end confdefs.h.  */
24051 #include <sys/select.h>
24052 int
24053 main (void)
24054 {
24055 int memset; int bzero;
24056   ;
24057   return 0;
24058 }
24059
24060 _ACEOF
24061 if ac_fn_c_try_compile "$LINENO"
24062 then :
24063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24064 /* end confdefs.h.  */
24065 #include <sys/select.h>
24066 int
24067 main (void)
24068 {
24069
24070                   #undef memset
24071                   #define memset nonexistent_memset
24072                   extern
24073                   #ifdef __cplusplus
24074                   "C"
24075                   #endif
24076                   void *memset (void *, int, unsigned long);
24077                   #undef bzero
24078                   #define bzero nonexistent_bzero
24079                   extern
24080                   #ifdef __cplusplus
24081                   "C"
24082                   #endif
24083                   void bzero (void *, unsigned long);
24084                   fd_set fds;
24085                   FD_ZERO (&fds);
24086
24087   ;
24088   return 0;
24089 }
24090
24091 _ACEOF
24092 if ac_fn_c_try_link "$LINENO"
24093 then :
24094
24095 else $as_nop
24096   gl_cv_header_sys_select_h_selfcontained=no
24097 fi
24098 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24099     conftest$ac_exeext conftest.$ac_ext
24100
24101 fi
24102 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24103       fi
24104
24105 fi
24106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24107 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117      if test $gl_cv_have_include_next = yes; then
24118        gl_cv_next_sys_select_h='<'sys/select.h'>'
24119      else
24120        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24121 printf %s "checking absolute name of <sys/select.h>... " >&6; }
24122 if test ${gl_cv_next_sys_select_h+y}
24123 then :
24124   printf %s "(cached) " >&6
24125 else $as_nop
24126
24127              if test $ac_cv_header_sys_select_h = yes; then
24128
24129
24130
24131
24132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24133 /* end confdefs.h.  */
24134 #include <sys/select.h>
24135 _ACEOF
24136                 case "$host_os" in
24137     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24138     *)    gl_absname_cpp="$ac_cpp" ;;
24139   esac
24140
24141   case "$host_os" in
24142     mingw*)
24143                                           gl_dirsep_regex='[/\\]'
24144       ;;
24145     *)
24146       gl_dirsep_regex='\/'
24147       ;;
24148   esac
24149       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24150   gl_header_literal_regex=`echo 'sys/select.h' \
24151                            | sed -e "$gl_make_literal_regex_sed"`
24152   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24153       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24154       s|^/[^/]|//&|
24155       p
24156       q
24157     }'
24158
24159         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24160   sed -n "$gl_absolute_header_sed"`
24161
24162            gl_header=$gl_cv_absolute_sys_select_h
24163            gl_cv_next_sys_select_h='"'$gl_header'"'
24164           else
24165                gl_cv_next_sys_select_h='<'sys/select.h'>'
24166              fi
24167
24168
24169 fi
24170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24171 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
24172      fi
24173      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24174
24175      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24176        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24177        gl_next_as_first_directive='<'sys/select.h'>'
24178      else
24179        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24180        gl_next_as_first_directive=$gl_cv_next_sys_select_h
24181      fi
24182      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24183
24184
24185
24186
24187   if test $ac_cv_header_sys_select_h = yes; then
24188     HAVE_SYS_SELECT_H=1
24189   else
24190     HAVE_SYS_SELECT_H=0
24191   fi
24192
24193
24194
24195
24196
24197   if test $ac_cv_header_sys_socket_h != yes; then
24198                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24199 if test "x$ac_cv_header_winsock2_h" = xyes
24200 then :
24201   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
24202
24203 fi
24204
24205   fi
24206   if test "$ac_cv_header_winsock2_h" = yes; then
24207     HAVE_WINSOCK2_H=1
24208     UNISTD_H_HAVE_WINSOCK2_H=1
24209     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24210   else
24211     HAVE_WINSOCK2_H=0
24212   fi
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225   if test $ac_cv_header_sys_socket_h != yes; then
24226                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24227 if test "x$ac_cv_header_winsock2_h" = xyes
24228 then :
24229   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
24230
24231 fi
24232
24233   fi
24234   if test "$ac_cv_header_winsock2_h" = yes; then
24235     HAVE_WINSOCK2_H=1
24236     UNISTD_H_HAVE_WINSOCK2_H=1
24237     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24238   else
24239     HAVE_WINSOCK2_H=0
24240   fi
24241
24242    LIBSOCKET=
24243   if test $HAVE_WINSOCK2_H = 1; then
24244                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
24245 printf %s "checking for WSAStartup... " >&6; }
24246 if test ${gl_cv_func_wsastartup+y}
24247 then :
24248   printf %s "(cached) " >&6
24249 else $as_nop
24250
24251        gl_save_LIBS="$LIBS"
24252        LIBS="$LIBS -lws2_32"
24253        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24254 /* end confdefs.h.  */
24255
24256 #ifdef HAVE_WINSOCK2_H
24257 # include <winsock2.h>
24258 #endif
24259 int
24260 main (void)
24261 {
24262
24263             WORD wVersionRequested = MAKEWORD(1, 1);
24264             WSADATA wsaData;
24265             int err = WSAStartup(wVersionRequested, &wsaData);
24266             WSACleanup ();
24267
24268   ;
24269   return 0;
24270 }
24271
24272 _ACEOF
24273 if ac_fn_c_try_link "$LINENO"
24274 then :
24275   gl_cv_func_wsastartup=yes
24276 else $as_nop
24277   gl_cv_func_wsastartup=no
24278 fi
24279 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24280     conftest$ac_exeext conftest.$ac_ext
24281        LIBS="$gl_save_LIBS"
24282
24283 fi
24284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
24285 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
24286     if test "$gl_cv_func_wsastartup" = "yes"; then
24287
24288 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
24289
24290       LIBSOCKET='-lws2_32'
24291     fi
24292   else
24293                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
24294 printf %s "checking for library containing setsockopt... " >&6; }
24295 if test ${gl_cv_lib_socket+y}
24296 then :
24297   printf %s "(cached) " >&6
24298 else $as_nop
24299
24300       gl_cv_lib_socket=
24301       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24302 /* end confdefs.h.  */
24303 extern
24304 #ifdef __cplusplus
24305 "C"
24306 #endif
24307 char setsockopt();
24308 int
24309 main (void)
24310 {
24311 setsockopt();
24312   ;
24313   return 0;
24314 }
24315 _ACEOF
24316 if ac_fn_c_try_link "$LINENO"
24317 then :
24318
24319 else $as_nop
24320   gl_save_LIBS="$LIBS"
24321          LIBS="$gl_save_LIBS -lsocket"
24322          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24323 /* end confdefs.h.  */
24324 extern
24325 #ifdef __cplusplus
24326 "C"
24327 #endif
24328 char setsockopt();
24329 int
24330 main (void)
24331 {
24332 setsockopt();
24333   ;
24334   return 0;
24335 }
24336 _ACEOF
24337 if ac_fn_c_try_link "$LINENO"
24338 then :
24339   gl_cv_lib_socket="-lsocket"
24340 fi
24341 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24342     conftest$ac_exeext conftest.$ac_ext
24343          if test -z "$gl_cv_lib_socket"; then
24344            LIBS="$gl_save_LIBS -lnetwork"
24345            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24346 /* end confdefs.h.  */
24347 extern
24348 #ifdef __cplusplus
24349 "C"
24350 #endif
24351 char setsockopt();
24352 int
24353 main (void)
24354 {
24355 setsockopt();
24356   ;
24357   return 0;
24358 }
24359 _ACEOF
24360 if ac_fn_c_try_link "$LINENO"
24361 then :
24362   gl_cv_lib_socket="-lnetwork"
24363 fi
24364 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24365     conftest$ac_exeext conftest.$ac_ext
24366            if test -z "$gl_cv_lib_socket"; then
24367              LIBS="$gl_save_LIBS -lnet"
24368              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24369 /* end confdefs.h.  */
24370 extern
24371 #ifdef __cplusplus
24372 "C"
24373 #endif
24374 char setsockopt();
24375 int
24376 main (void)
24377 {
24378 setsockopt();
24379   ;
24380   return 0;
24381 }
24382 _ACEOF
24383 if ac_fn_c_try_link "$LINENO"
24384 then :
24385   gl_cv_lib_socket="-lnet"
24386 fi
24387 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24388     conftest$ac_exeext conftest.$ac_ext
24389            fi
24390          fi
24391          LIBS="$gl_save_LIBS"
24392
24393 fi
24394 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24395     conftest$ac_exeext conftest.$ac_ext
24396       if test -z "$gl_cv_lib_socket"; then
24397         gl_cv_lib_socket="none needed"
24398       fi
24399
24400 fi
24401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
24402 printf "%s\n" "$gl_cv_lib_socket" >&6; }
24403     if test "$gl_cv_lib_socket" != "none needed"; then
24404       LIBSOCKET="$gl_cv_lib_socket"
24405     fi
24406   fi
24407
24408
24409
24410
24411
24412
24413   :
24414
24415
24416
24417
24418
24419
24420   if test "$ac_cv_header_winsock2_h" = yes; then
24421     REPLACE_SELECT=1
24422   else
24423
24424     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
24425 printf %s "checking whether select supports a 0 argument... " >&6; }
24426 if test ${gl_cv_func_select_supports0+y}
24427 then :
24428   printf %s "(cached) " >&6
24429 else $as_nop
24430
24431         if test "$cross_compiling" = yes
24432 then :
24433
24434            case "$host_os" in
24435                        # Guess no on Interix.
24436              interix*) gl_cv_func_select_supports0="guessing no";;
24437                        # Guess yes otherwise.
24438              *)        gl_cv_func_select_supports0="guessing yes";;
24439            esac
24440
24441 else $as_nop
24442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24443 /* end confdefs.h.  */
24444
24445 #include <sys/types.h>
24446 #include <sys/time.h>
24447 #if HAVE_SYS_SELECT_H
24448 #include <sys/select.h>
24449 #endif
24450 int main ()
24451 {
24452   struct timeval timeout;
24453   timeout.tv_sec = 0;
24454   timeout.tv_usec = 5;
24455   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
24456 }
24457 _ACEOF
24458 if ac_fn_c_try_run "$LINENO"
24459 then :
24460   gl_cv_func_select_supports0=yes
24461 else $as_nop
24462   gl_cv_func_select_supports0=no
24463 fi
24464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24465   conftest.$ac_objext conftest.beam conftest.$ac_ext
24466 fi
24467
24468
24469 fi
24470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
24471 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
24472     case "$gl_cv_func_select_supports0" in
24473       *yes) ;;
24474       *) REPLACE_SELECT=1 ;;
24475     esac
24476
24477         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
24478 printf %s "checking whether select detects invalid fds... " >&6; }
24479 if test ${gl_cv_func_select_detects_ebadf+y}
24480 then :
24481   printf %s "(cached) " >&6
24482 else $as_nop
24483
24484         if test "$cross_compiling" = yes
24485 then :
24486
24487            case "$host_os" in
24488                              # Guess yes on Linux systems.
24489             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
24490                              # Guess yes on glibc systems.
24491             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
24492                              # If we don't know, obey --enable-cross-guesses.
24493             *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
24494            esac
24495
24496 else $as_nop
24497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24498 /* end confdefs.h.  */
24499
24500 #include <sys/types.h>
24501 #include <sys/time.h>
24502 #if HAVE_SYS_SELECT_H
24503 # include <sys/select.h>
24504 #endif
24505 #include <unistd.h>
24506 #include <errno.h>
24507
24508
24509 $gl_mda_defines
24510
24511 int
24512 main (void)
24513 {
24514
24515   fd_set set;
24516   dup2(0, 16);
24517   FD_ZERO(&set);
24518   FD_SET(16, &set);
24519   close(16);
24520   struct timeval timeout;
24521   timeout.tv_sec = 0;
24522   timeout.tv_usec = 5;
24523   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
24524
24525   ;
24526   return 0;
24527 }
24528 _ACEOF
24529 if ac_fn_c_try_run "$LINENO"
24530 then :
24531   gl_cv_func_select_detects_ebadf=yes
24532 else $as_nop
24533   gl_cv_func_select_detects_ebadf=no
24534 fi
24535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24536   conftest.$ac_objext conftest.beam conftest.$ac_ext
24537 fi
24538
24539
24540 fi
24541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
24542 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
24543     case $gl_cv_func_select_detects_ebadf in
24544       *yes) ;;
24545       *) REPLACE_SELECT=1 ;;
24546     esac
24547   fi
24548
24549     LIB_SELECT="$LIBSOCKET"
24550   if test $REPLACE_SELECT = 1; then
24551     case "$host_os" in
24552       mingw*)
24553                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554 /* end confdefs.h.  */
24555
24556 #define WIN32_LEAN_AND_MEAN
24557 #include <windows.h>
24558 int
24559 main ()
24560 {
24561   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
24562   return 0;
24563 }
24564 _ACEOF
24565 if ac_fn_c_try_link "$LINENO"
24566 then :
24567
24568 else $as_nop
24569   LIB_SELECT="$LIB_SELECT -luser32"
24570 fi
24571 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24572     conftest$ac_exeext conftest.$ac_ext
24573         ;;
24574     esac
24575   fi
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585   if test $ac_cv_have_decl_strerror_r = no; then
24586     HAVE_DECL_STRERROR_R=0
24587   fi
24588
24589   if test $ac_cv_func_strerror_r = yes; then
24590     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24591       if test $gl_cv_func_strerror_r_posix_signature = yes; then
24592         case "$gl_cv_func_strerror_r_works" in
24593                     *no) REPLACE_STRERROR_R=1 ;;
24594         esac
24595       else
24596                 REPLACE_STRERROR_R=1
24597       fi
24598     else
24599                   REPLACE_STRERROR_R=1
24600     fi
24601   fi
24602
24603
24604
24605     HAVE_PTHREAD_T=1;
24606   HAVE_PTHREAD_SPINLOCK_T=1;
24607   HAVE_PTHREAD_CREATE_DETACHED=1;
24608   HAVE_PTHREAD_MUTEX_RECURSIVE=1;
24609   HAVE_PTHREAD_MUTEX_ROBUST=1;
24610   HAVE_PTHREAD_PROCESS_SHARED=1;
24611   HAVE_PTHREAD_CREATE=1;
24612   HAVE_PTHREAD_ATTR_INIT=1;
24613   HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
24614   HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
24615   HAVE_PTHREAD_ATTR_DESTROY=1;
24616   HAVE_PTHREAD_SELF=1;
24617   HAVE_PTHREAD_EQUAL=1;
24618   HAVE_PTHREAD_DETACH=1;
24619   HAVE_PTHREAD_JOIN=1;
24620   HAVE_PTHREAD_EXIT=1;
24621   HAVE_PTHREAD_ONCE=1;
24622   HAVE_PTHREAD_MUTEX_INIT=1;
24623   HAVE_PTHREAD_MUTEXATTR_INIT=1;
24624   HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
24625   HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
24626   HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
24627   HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
24628   HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
24629   HAVE_PTHREAD_MUTEX_LOCK=1;
24630   HAVE_PTHREAD_MUTEX_TRYLOCK=1;
24631   HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
24632   HAVE_PTHREAD_MUTEX_UNLOCK=1;
24633   HAVE_PTHREAD_MUTEX_DESTROY=1;
24634   HAVE_PTHREAD_RWLOCK_INIT=1;
24635   HAVE_PTHREAD_RWLOCKATTR_INIT=1;
24636   HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
24637   HAVE_PTHREAD_RWLOCK_RDLOCK=1;
24638   HAVE_PTHREAD_RWLOCK_WRLOCK=1;
24639   HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
24640   HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
24641   HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
24642   HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
24643   HAVE_PTHREAD_RWLOCK_UNLOCK=1;
24644   HAVE_PTHREAD_RWLOCK_DESTROY=1;
24645   HAVE_PTHREAD_COND_INIT=1;
24646   HAVE_PTHREAD_CONDATTR_INIT=1;
24647   HAVE_PTHREAD_CONDATTR_DESTROY=1;
24648   HAVE_PTHREAD_COND_WAIT=1;
24649   HAVE_PTHREAD_COND_TIMEDWAIT=1;
24650   HAVE_PTHREAD_COND_SIGNAL=1;
24651   HAVE_PTHREAD_COND_BROADCAST=1;
24652   HAVE_PTHREAD_COND_DESTROY=1;
24653   HAVE_PTHREAD_KEY_CREATE=1;
24654   HAVE_PTHREAD_SETSPECIFIC=1;
24655   HAVE_PTHREAD_GETSPECIFIC=1;
24656   HAVE_PTHREAD_KEY_DELETE=1;
24657   HAVE_PTHREAD_SPIN_INIT=1;
24658   HAVE_PTHREAD_SPIN_LOCK=1;
24659   HAVE_PTHREAD_SPIN_TRYLOCK=1;
24660   HAVE_PTHREAD_SPIN_UNLOCK=1;
24661   HAVE_PTHREAD_SPIN_DESTROY=1;
24662   REPLACE_PTHREAD_CREATE=0;
24663   REPLACE_PTHREAD_ATTR_INIT=0;
24664   REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
24665   REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
24666   REPLACE_PTHREAD_ATTR_DESTROY=0;
24667   REPLACE_PTHREAD_SELF=0;
24668   REPLACE_PTHREAD_EQUAL=0;
24669   REPLACE_PTHREAD_DETACH=0;
24670   REPLACE_PTHREAD_JOIN=0;
24671   REPLACE_PTHREAD_EXIT=0;
24672   REPLACE_PTHREAD_ONCE=0;
24673   REPLACE_PTHREAD_MUTEX_INIT=0;
24674   REPLACE_PTHREAD_MUTEXATTR_INIT=0;
24675   REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
24676   REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
24677   REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
24678   REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
24679   REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
24680   REPLACE_PTHREAD_MUTEX_LOCK=0;
24681   REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
24682   REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
24683   REPLACE_PTHREAD_MUTEX_UNLOCK=0;
24684   REPLACE_PTHREAD_MUTEX_DESTROY=0;
24685   REPLACE_PTHREAD_RWLOCK_INIT=0;
24686   REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
24687   REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
24688   REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
24689   REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
24690   REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
24691   REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
24692   REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
24693   REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
24694   REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
24695   REPLACE_PTHREAD_RWLOCK_DESTROY=0;
24696   REPLACE_PTHREAD_COND_INIT=0;
24697   REPLACE_PTHREAD_CONDATTR_INIT=0;
24698   REPLACE_PTHREAD_CONDATTR_DESTROY=0;
24699   REPLACE_PTHREAD_COND_WAIT=0;
24700   REPLACE_PTHREAD_COND_TIMEDWAIT=0;
24701   REPLACE_PTHREAD_COND_SIGNAL=0;
24702   REPLACE_PTHREAD_COND_BROADCAST=0;
24703   REPLACE_PTHREAD_COND_DESTROY=0;
24704   REPLACE_PTHREAD_KEY_CREATE=0;
24705   REPLACE_PTHREAD_SETSPECIFIC=0;
24706   REPLACE_PTHREAD_GETSPECIFIC=0;
24707   REPLACE_PTHREAD_KEY_DELETE=0;
24708   REPLACE_PTHREAD_SPIN_INIT=0;
24709   REPLACE_PTHREAD_SPIN_LOCK=0;
24710   REPLACE_PTHREAD_SPIN_TRYLOCK=0;
24711   REPLACE_PTHREAD_SPIN_UNLOCK=0;
24712   REPLACE_PTHREAD_SPIN_DESTROY=0;
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730      if test $gl_cv_have_include_next = yes; then
24731        gl_cv_next_pthread_h='<'pthread.h'>'
24732      else
24733        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
24734 printf %s "checking absolute name of <pthread.h>... " >&6; }
24735 if test ${gl_cv_next_pthread_h+y}
24736 then :
24737   printf %s "(cached) " >&6
24738 else $as_nop
24739
24740              if test $ac_cv_header_pthread_h = yes; then
24741
24742
24743
24744
24745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24746 /* end confdefs.h.  */
24747 #include <pthread.h>
24748 _ACEOF
24749                 case "$host_os" in
24750     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24751     *)    gl_absname_cpp="$ac_cpp" ;;
24752   esac
24753
24754   case "$host_os" in
24755     mingw*)
24756                                           gl_dirsep_regex='[/\\]'
24757       ;;
24758     *)
24759       gl_dirsep_regex='\/'
24760       ;;
24761   esac
24762       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24763   gl_header_literal_regex=`echo 'pthread.h' \
24764                            | sed -e "$gl_make_literal_regex_sed"`
24765   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24766       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24767       s|^/[^/]|//&|
24768       p
24769       q
24770     }'
24771
24772         gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24773   sed -n "$gl_absolute_header_sed"`
24774
24775            gl_header=$gl_cv_absolute_pthread_h
24776            gl_cv_next_pthread_h='"'$gl_header'"'
24777           else
24778                gl_cv_next_pthread_h='<'pthread.h'>'
24779              fi
24780
24781
24782 fi
24783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
24784 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
24785      fi
24786      NEXT_PTHREAD_H=$gl_cv_next_pthread_h
24787
24788      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24789        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24790        gl_next_as_first_directive='<'pthread.h'>'
24791      else
24792        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24793        gl_next_as_first_directive=$gl_cv_next_pthread_h
24794      fi
24795      NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
24796
24797
24798
24799
24800   if test $ac_cv_header_pthread_h = yes; then
24801     HAVE_PTHREAD_H=1
24802
24803
24804       if { case "$host_os" in mingw*) true;; *) false;; esac; } \
24805          && test $gl_threads_api = windows; then
24806         HAVE_PTHREAD_H=0
24807       fi
24808
24809   else
24810     HAVE_PTHREAD_H=0
24811   fi
24812
24813
24814   ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
24815      #if HAVE_PTHREAD_H
24816       #include <pthread.h>
24817      #endif
24818 "
24819 if test "x$ac_cv_type_pthread_t" = xyes
24820 then :
24821
24822 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
24823
24824
24825 fi
24826 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
24827      #if HAVE_PTHREAD_H
24828       #include <pthread.h>
24829      #endif
24830 "
24831 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
24832 then :
24833
24834 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
24835
24836
24837 fi
24838
24839   if test $ac_cv_type_pthread_t != yes; then
24840     HAVE_PTHREAD_T=0
24841   fi
24842   if test $ac_cv_type_pthread_spinlock_t != yes; then
24843     HAVE_PTHREAD_SPINLOCK_T=0
24844   fi
24845
24846
24847   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
24848 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
24849 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
24850 then :
24851   printf %s "(cached) " >&6
24852 else $as_nop
24853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24854 /* end confdefs.h.  */
24855 #include <pthread.h>
24856             int x = PTHREAD_CREATE_DETACHED;
24857
24858 int
24859 main (void)
24860 {
24861
24862   ;
24863   return 0;
24864 }
24865 _ACEOF
24866 if ac_fn_c_try_compile "$LINENO"
24867 then :
24868   gl_cv_const_PTHREAD_CREATE_DETACHED=yes
24869 else $as_nop
24870   gl_cv_const_PTHREAD_CREATE_DETACHED=no
24871 fi
24872 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24873
24874 fi
24875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
24876 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
24877   if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
24878     HAVE_PTHREAD_CREATE_DETACHED=0
24879   fi
24880
24881   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
24882 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
24883 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
24884 then :
24885   printf %s "(cached) " >&6
24886 else $as_nop
24887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24888 /* end confdefs.h.  */
24889 #include <pthread.h>
24890             int x = PTHREAD_MUTEX_RECURSIVE;
24891
24892 int
24893 main (void)
24894 {
24895
24896   ;
24897   return 0;
24898 }
24899 _ACEOF
24900 if ac_fn_c_try_compile "$LINENO"
24901 then :
24902   gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
24903 else $as_nop
24904   gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
24905 fi
24906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24907
24908 fi
24909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
24910 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
24911   if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
24912     HAVE_PTHREAD_MUTEX_RECURSIVE=0
24913   fi
24914
24915   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
24916 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
24917 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
24918 then :
24919   printf %s "(cached) " >&6
24920 else $as_nop
24921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24922 /* end confdefs.h.  */
24923 #include <pthread.h>
24924             int x = PTHREAD_MUTEX_ROBUST;
24925
24926 int
24927 main (void)
24928 {
24929
24930   ;
24931   return 0;
24932 }
24933 _ACEOF
24934 if ac_fn_c_try_compile "$LINENO"
24935 then :
24936   gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
24937 else $as_nop
24938   gl_cv_const_PTHREAD_MUTEX_ROBUST=no
24939 fi
24940 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24941
24942 fi
24943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
24944 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
24945   if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
24946     HAVE_PTHREAD_MUTEX_ROBUST=0
24947   fi
24948
24949   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
24950 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
24951 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
24952 then :
24953   printf %s "(cached) " >&6
24954 else $as_nop
24955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24956 /* end confdefs.h.  */
24957 #include <pthread.h>
24958             int x = PTHREAD_PROCESS_SHARED;
24959
24960 int
24961 main (void)
24962 {
24963
24964   ;
24965   return 0;
24966 }
24967 _ACEOF
24968 if ac_fn_c_try_compile "$LINENO"
24969 then :
24970   gl_cv_const_PTHREAD_PROCESS_SHARED=yes
24971 else $as_nop
24972   gl_cv_const_PTHREAD_PROCESS_SHARED=no
24973 fi
24974 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24975
24976 fi
24977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
24978 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
24979   if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
24980     HAVE_PTHREAD_PROCESS_SHARED=0
24981   fi
24982
24983
24984
24985
24986
24987
24988
24989     LIB_PTHREAD="$LIBPMULTITHREAD"
24990
24991
24992
24993
24994   GL_GNULIB_PTHREAD_THREAD=0
24995
24996
24997
24998   GL_GNULIB_PTHREAD_ONCE=0
24999
25000
25001
25002   GL_GNULIB_PTHREAD_MUTEX=0
25003
25004
25005
25006   GL_GNULIB_PTHREAD_RWLOCK=0
25007
25008
25009
25010   GL_GNULIB_PTHREAD_COND=0
25011
25012
25013
25014   GL_GNULIB_PTHREAD_TSS=0
25015
25016
25017
25018   GL_GNULIB_PTHREAD_SPIN=0
25019
25020
25021
25022   GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
25023
25024
25025
25026
25027
25028     HAVE_SCHED_YIELD=1;
25029   REPLACE_SCHED_YIELD=0;
25030
25031
25032
25033
25034
25035
25036
25037   ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
25038        #include <sys/cdefs.h>
25039       #endif
25040
25041 "
25042 if test "x$ac_cv_header_sched_h" = xyes
25043 then :
25044   printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
25045
25046 fi
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056      if test $gl_cv_have_include_next = yes; then
25057        gl_cv_next_sched_h='<'sched.h'>'
25058      else
25059        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
25060 printf %s "checking absolute name of <sched.h>... " >&6; }
25061 if test ${gl_cv_next_sched_h+y}
25062 then :
25063   printf %s "(cached) " >&6
25064 else $as_nop
25065
25066
25067
25068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25069 /* end confdefs.h.  */
25070 #include <sched.h>
25071 _ACEOF
25072                 case "$host_os" in
25073     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25074     *)    gl_absname_cpp="$ac_cpp" ;;
25075   esac
25076
25077   case "$host_os" in
25078     mingw*)
25079                                           gl_dirsep_regex='[/\\]'
25080       ;;
25081     *)
25082       gl_dirsep_regex='\/'
25083       ;;
25084   esac
25085       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25086   gl_header_literal_regex=`echo 'sched.h' \
25087                            | sed -e "$gl_make_literal_regex_sed"`
25088   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25089       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25090       s|^/[^/]|//&|
25091       p
25092       q
25093     }'
25094
25095         gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25096   sed -n "$gl_absolute_header_sed"`
25097
25098            gl_header=$gl_cv_absolute_sched_h
25099            gl_cv_next_sched_h='"'$gl_header'"'
25100
25101
25102 fi
25103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
25104 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
25105      fi
25106      NEXT_SCHED_H=$gl_cv_next_sched_h
25107
25108      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25109        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25110        gl_next_as_first_directive='<'sched.h'>'
25111      else
25112        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25113        gl_next_as_first_directive=$gl_cv_next_sched_h
25114      fi
25115      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
25116
25117
25118
25119
25120
25121   if test "$ac_cv_header_sched_h" = yes; then
25122     HAVE_SCHED_H=1
25123   else
25124     HAVE_SCHED_H=0
25125   fi
25126
25127
25128   if test "$HAVE_SCHED_H" = 1; then
25129     ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
25130          #include <sys/cdefs.h>
25131         #endif
25132         #include <sched.h>
25133
25134 "
25135 if test "x$ac_cv_type_struct_sched_param" = xyes
25136 then :
25137   HAVE_STRUCT_SCHED_PARAM=1
25138 else $as_nop
25139   HAVE_STRUCT_SCHED_PARAM=0
25140 fi
25141
25142   else
25143     HAVE_STRUCT_SCHED_PARAM=0
25144     case "$host_os" in
25145       os2*)
25146                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
25147 "
25148 if test "x$ac_cv_type_struct_sched_param" = xyes
25149 then :
25150   HAVE_STRUCT_SCHED_PARAM=1
25151 fi
25152
25153         ;;
25154       vms)
25155                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
25156 "
25157 if test "x$ac_cv_type_struct_sched_param" = xyes
25158 then :
25159   HAVE_STRUCT_SCHED_PARAM=1
25160 fi
25161
25162         ;;
25163     esac
25164   fi
25165
25166
25167   if test "$ac_cv_header_sys_cdefs_h" = yes; then
25168     HAVE_SYS_CDEFS_H=1
25169   else
25170     HAVE_SYS_CDEFS_H=0
25171   fi
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182   GL_GNULIB_SCHED_YIELD=0
25183
25184
25185
25186
25187
25188   GL_GNULIB_PSELECT=0
25189
25190
25191
25192   GL_GNULIB_SELECT=0
25193
25194
25195
25196
25197
25198
25199 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25200 if test "x$ac_cv_have_decl_snprintf" = xyes
25201 then :
25202   ac_have_decl=1
25203 else $as_nop
25204   ac_have_decl=0
25205 fi
25206 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
25207
25208
25209
25210
25211
25212
25213
25214   if test $ac_cv_header_sys_ioctl_h = yes; then
25215     HAVE_SYS_IOCTL_H=1
25216             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
25217 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
25218 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
25219 then :
25220   printf %s "(cached) " >&6
25221 else $as_nop
25222          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25223 /* end confdefs.h.  */
25224 #include <sys/ioctl.h>
25225 int
25226 main (void)
25227 {
25228 (void) ioctl;
25229   ;
25230   return 0;
25231 }
25232 _ACEOF
25233 if ac_fn_c_try_compile "$LINENO"
25234 then :
25235   gl_cv_decl_ioctl_in_sys_ioctl_h=yes
25236 else $as_nop
25237   gl_cv_decl_ioctl_in_sys_ioctl_h=no
25238 fi
25239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25240
25241 fi
25242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
25243 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
25244   else
25245     HAVE_SYS_IOCTL_H=0
25246   fi
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257      if test $gl_cv_have_include_next = yes; then
25258        gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
25259      else
25260        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
25261 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
25262 if test ${gl_cv_next_sys_ioctl_h+y}
25263 then :
25264   printf %s "(cached) " >&6
25265 else $as_nop
25266
25267              if test $ac_cv_header_sys_ioctl_h = yes; then
25268
25269
25270
25271
25272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25273 /* end confdefs.h.  */
25274 #include <sys/ioctl.h>
25275 _ACEOF
25276                 case "$host_os" in
25277     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25278     *)    gl_absname_cpp="$ac_cpp" ;;
25279   esac
25280
25281   case "$host_os" in
25282     mingw*)
25283                                           gl_dirsep_regex='[/\\]'
25284       ;;
25285     *)
25286       gl_dirsep_regex='\/'
25287       ;;
25288   esac
25289       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25290   gl_header_literal_regex=`echo 'sys/ioctl.h' \
25291                            | sed -e "$gl_make_literal_regex_sed"`
25292   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25293       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25294       s|^/[^/]|//&|
25295       p
25296       q
25297     }'
25298
25299         gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25300   sed -n "$gl_absolute_header_sed"`
25301
25302            gl_header=$gl_cv_absolute_sys_ioctl_h
25303            gl_cv_next_sys_ioctl_h='"'$gl_header'"'
25304           else
25305                gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
25306              fi
25307
25308
25309 fi
25310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
25311 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
25312      fi
25313      NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
25314
25315      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25316        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25317        gl_next_as_first_directive='<'sys/ioctl.h'>'
25318      else
25319        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25320        gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
25321      fi
25322      NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347      if test $gl_cv_have_include_next = yes; then
25348        gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25349      else
25350        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
25351 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
25352 if test ${gl_cv_next_sys_uio_h+y}
25353 then :
25354   printf %s "(cached) " >&6
25355 else $as_nop
25356
25357              if test $ac_cv_header_sys_uio_h = yes; then
25358
25359
25360
25361
25362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25363 /* end confdefs.h.  */
25364 #include <sys/uio.h>
25365 _ACEOF
25366                 case "$host_os" in
25367     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25368     *)    gl_absname_cpp="$ac_cpp" ;;
25369   esac
25370
25371   case "$host_os" in
25372     mingw*)
25373                                           gl_dirsep_regex='[/\\]'
25374       ;;
25375     *)
25376       gl_dirsep_regex='\/'
25377       ;;
25378   esac
25379       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25380   gl_header_literal_regex=`echo 'sys/uio.h' \
25381                            | sed -e "$gl_make_literal_regex_sed"`
25382   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25383       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25384       s|^/[^/]|//&|
25385       p
25386       q
25387     }'
25388
25389         gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25390   sed -n "$gl_absolute_header_sed"`
25391
25392            gl_header=$gl_cv_absolute_sys_uio_h
25393            gl_cv_next_sys_uio_h='"'$gl_header'"'
25394           else
25395                gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25396              fi
25397
25398
25399 fi
25400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
25401 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
25402      fi
25403      NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
25404
25405      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25406        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25407        gl_next_as_first_directive='<'sys/uio.h'>'
25408      else
25409        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25410        gl_next_as_first_directive=$gl_cv_next_sys_uio_h
25411      fi
25412      NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
25413
25414
25415
25416
25417   if test $ac_cv_header_sys_uio_h = yes; then
25418     HAVE_SYS_UIO_H=1
25419   else
25420     HAVE_SYS_UIO_H=0
25421   fi
25422
25423
25424
25425
25426
25427
25428    if false; then
25429   GL_COND_LIBTOOL_TRUE=
25430   GL_COND_LIBTOOL_FALSE='#'
25431 else
25432   GL_COND_LIBTOOL_TRUE='#'
25433   GL_COND_LIBTOOL_FALSE=
25434 fi
25435
25436   gl_cond_libtool=false
25437   gl_libdeps=
25438   gl_ltlibdeps=
25439   gl_m4_base='m4'
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452   gl_source_base='lib'
25453
25454
25455   if test $ac_cv_func_alloca_works = no; then
25456     :
25457   fi
25458
25459   # Define an additional variable used in the Makefile substitution.
25460   if test $ac_cv_working_alloca_h = yes; then
25461     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
25462 printf %s "checking for alloca as a compiler built-in... " >&6; }
25463 if test ${gl_cv_rpl_alloca+y}
25464 then :
25465   printf %s "(cached) " >&6
25466 else $as_nop
25467
25468       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25469 /* end confdefs.h.  */
25470
25471 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
25472         Need own alloca
25473 #endif
25474
25475 _ACEOF
25476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25477   $EGREP "Need own alloca" >/dev/null 2>&1
25478 then :
25479   gl_cv_rpl_alloca=yes
25480 else $as_nop
25481   gl_cv_rpl_alloca=no
25482 fi
25483 rm -rf conftest*
25484
25485
25486 fi
25487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
25488 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
25489     if test $gl_cv_rpl_alloca = yes; then
25490
25491 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
25492
25493       ALLOCA_H=alloca.h
25494     else
25495                   ALLOCA_H=
25496     fi
25497   else
25498     ALLOCA_H=alloca.h
25499   fi
25500
25501    if test -n "$ALLOCA_H"; then
25502   GL_GENERATE_ALLOCA_H_TRUE=
25503   GL_GENERATE_ALLOCA_H_FALSE='#'
25504 else
25505   GL_GENERATE_ALLOCA_H_TRUE='#'
25506   GL_GENERATE_ALLOCA_H_FALSE=
25507 fi
25508
25509
25510   if test $ac_cv_working_alloca_h = yes; then
25511     HAVE_ALLOCA_H=1
25512   else
25513     HAVE_ALLOCA_H=0
25514   fi
25515
25516
25517
25518
25519
25520
25521
25522
25523   if test $ac_cv_func_btowc = no; then
25524     HAVE_BTOWC=0
25525   else
25526
25527
25528
25529
25530         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
25531 printf %s "checking whether btowc(0) is correct... " >&6; }
25532 if test ${gl_cv_func_btowc_nul+y}
25533 then :
25534   printf %s "(cached) " >&6
25535 else $as_nop
25536
25537         if test "$cross_compiling" = yes
25538 then :
25539
25540            case "$host_os" in
25541                       # Guess no on Cygwin.
25542              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
25543                       # Guess yes on native Windows.
25544              mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
25545                       # Guess yes otherwise.
25546              *)       gl_cv_func_btowc_nul="guessing yes" ;;
25547            esac
25548
25549 else $as_nop
25550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25551 /* end confdefs.h.  */
25552
25553 #include <wchar.h>
25554 int main ()
25555 {
25556   if (btowc ('\0') != 0)
25557     return 1;
25558   return 0;
25559 }
25560 _ACEOF
25561 if ac_fn_c_try_run "$LINENO"
25562 then :
25563   gl_cv_func_btowc_nul=yes
25564 else $as_nop
25565   gl_cv_func_btowc_nul=no
25566 fi
25567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25568   conftest.$ac_objext conftest.beam conftest.$ac_ext
25569 fi
25570
25571
25572 fi
25573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
25574 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
25575
25576         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
25577 printf %s "checking whether btowc(EOF) is correct... " >&6; }
25578 if test ${gl_cv_func_btowc_eof+y}
25579 then :
25580   printf %s "(cached) " >&6
25581 else $as_nop
25582
25583                         case "$host_os" in
25584                   # Guess no on IRIX.
25585           irix*)  gl_cv_func_btowc_eof="guessing no" ;;
25586                   # Guess yes on native Windows.
25587           mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
25588                   # Guess yes otherwise.
25589           *)      gl_cv_func_btowc_eof="guessing yes" ;;
25590         esac
25591         if test $LOCALE_FR != none; then
25592           if test "$cross_compiling" = yes
25593 then :
25594   :
25595 else $as_nop
25596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25597 /* end confdefs.h.  */
25598
25599 #include <locale.h>
25600 #include <stdio.h>
25601 #include <wchar.h>
25602 int main ()
25603 {
25604   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25605     {
25606       if (btowc (EOF) != WEOF)
25607         return 1;
25608     }
25609   return 0;
25610 }
25611 _ACEOF
25612 if ac_fn_c_try_run "$LINENO"
25613 then :
25614   gl_cv_func_btowc_eof=yes
25615 else $as_nop
25616   gl_cv_func_btowc_eof=no
25617 fi
25618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25619   conftest.$ac_objext conftest.beam conftest.$ac_ext
25620 fi
25621
25622         fi
25623
25624 fi
25625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
25626 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
25627
25628     case "$gl_cv_func_btowc_nul" in
25629       *yes) ;;
25630       *) REPLACE_BTOWC=1 ;;
25631     esac
25632     case "$gl_cv_func_btowc_eof" in
25633       *yes) ;;
25634       *) REPLACE_BTOWC=1 ;;
25635     esac
25636   fi
25637
25638   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
25639
25640
25641
25642
25643
25644
25645
25646
25647   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
25648
25649
25650   :
25651
25652   fi
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662           GL_GNULIB_BTOWC=1
25663
25664
25665
25666
25667
25668 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
25669
25670
25671
25672
25673   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
25674 printf %s "checking for __builtin_expect... " >&6; }
25675 if test ${gl_cv___builtin_expect+y}
25676 then :
25677   printf %s "(cached) " >&6
25678 else $as_nop
25679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25680 /* end confdefs.h.  */
25681
25682          int
25683          main (int argc, char **argv)
25684          {
25685            argc = __builtin_expect (argc, 100);
25686            return argv[argc != 100][0];
25687          }
25688 _ACEOF
25689 if ac_fn_c_try_link "$LINENO"
25690 then :
25691   gl_cv___builtin_expect=yes
25692 else $as_nop
25693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25694 /* end confdefs.h.  */
25695
25696              #include <builtins.h>
25697              int
25698              main (int argc, char **argv)
25699              {
25700                argc = __builtin_expect (argc, 100);
25701                return argv[argc != 100][0];
25702              }
25703 _ACEOF
25704 if ac_fn_c_try_link "$LINENO"
25705 then :
25706   gl_cv___builtin_expect="in <builtins.h>"
25707 else $as_nop
25708   gl_cv___builtin_expect=no
25709 fi
25710 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25711     conftest$ac_exeext conftest.$ac_ext
25712 fi
25713 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25714     conftest$ac_exeext conftest.$ac_ext
25715 fi
25716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
25717 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
25718   if test "$gl_cv___builtin_expect" = yes; then
25719     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
25720
25721   elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
25722     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
25723
25724   fi
25725
25726
25727
25728     if test "$with_libsigsegv" = yes; then
25729     if test "$gl_cv_lib_sigsegv" = yes; then
25730       LIBCSTACK=$LIBSIGSEGV
25731
25732       LTLIBCSTACK=$LTLIBSIGSEGV
25733
25734     fi
25735   fi
25736
25737
25738
25739
25740   if test $REPLACE_CALLOC = 0; then
25741
25742      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
25743 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
25744 if test ${ac_cv_func_calloc_0_nonnull+y}
25745 then :
25746   printf %s "(cached) " >&6
25747 else $as_nop
25748   if test $cross_compiling != yes; then
25749        ac_cv_func_calloc_0_nonnull=yes
25750        if test "$cross_compiling" = yes
25751 then :
25752   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25753 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25754 as_fn_error $? "cannot run test program while cross compiling
25755 See \`config.log' for more details" "$LINENO" 5; }
25756 else $as_nop
25757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25758 /* end confdefs.h.  */
25759 $ac_includes_default
25760 int
25761 main (void)
25762 {
25763 int result = 0;
25764               char * volatile p = calloc (0, 0);
25765               if (!p)
25766                 result |= 1;
25767               free (p);
25768               return result;
25769
25770   ;
25771   return 0;
25772 }
25773 _ACEOF
25774 if ac_fn_c_try_run "$LINENO"
25775 then :
25776
25777 else $as_nop
25778   ac_cv_func_calloc_0_nonnull=no
25779 fi
25780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25781   conftest.$ac_objext conftest.beam conftest.$ac_ext
25782 fi
25783
25784      else
25785        case "$host_os" in
25786                         # Guess yes on glibc systems.
25787          *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25788                         # Guess yes on musl systems.
25789          *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25790                         # Guess yes on native Windows.
25791          mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25792                         # If we don't know, obey --enable-cross-guesses.
25793          *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
25794        esac
25795      fi
25796
25797 fi
25798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
25799 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
25800   case $ac_cv_func_calloc_0_nonnull in #(
25801   *yes) :
25802      ;; #(
25803   *) :
25804     REPLACE_CALLOC=1 ;;
25805 esac
25806
25807   fi
25808
25809   if test $REPLACE_CALLOC = 1; then
25810
25811
25812
25813
25814
25815
25816
25817
25818   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25819
25820   fi
25821
25822
25823
25824   if test $REPLACE_MALLOC = 1; then
25825     REPLACE_CALLOC=1
25826   fi
25827
25828   if test $REPLACE_CALLOC = 1; then
25829
25830
25831
25832
25833
25834
25835
25836
25837   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25838
25839   fi
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849           GL_GNULIB_CALLOC_POSIX=1
25850
25851
25852
25853
25854
25855 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
25856
25857
25858
25859
25860
25861
25862
25863
25864   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
25865   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
25866
25867   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
25868   # programs in the package would end up linked with that potentially-shared
25869   # library, inducing unnecessary run-time overhead.
25870   LIB_CLOCK_GETTIME=
25871
25872   gl_saved_libs=$LIBS
25873     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
25874 printf %s "checking for library containing clock_gettime... " >&6; }
25875 if test ${ac_cv_search_clock_gettime+y}
25876 then :
25877   printf %s "(cached) " >&6
25878 else $as_nop
25879   ac_func_search_save_LIBS=$LIBS
25880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881 /* end confdefs.h.  */
25882
25883 /* Override any GCC internal prototype to avoid an error.
25884    Use char because int might match the return type of a GCC
25885    builtin and then its argument prototype would still apply.  */
25886 char clock_gettime ();
25887 int
25888 main (void)
25889 {
25890 return clock_gettime ();
25891   ;
25892   return 0;
25893 }
25894 _ACEOF
25895 for ac_lib in '' rt posix4
25896 do
25897   if test -z "$ac_lib"; then
25898     ac_res="none required"
25899   else
25900     ac_res=-l$ac_lib
25901     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25902   fi
25903   if ac_fn_c_try_link "$LINENO"
25904 then :
25905   ac_cv_search_clock_gettime=$ac_res
25906 fi
25907 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25908     conftest$ac_exeext
25909   if test ${ac_cv_search_clock_gettime+y}
25910 then :
25911   break
25912 fi
25913 done
25914 if test ${ac_cv_search_clock_gettime+y}
25915 then :
25916
25917 else $as_nop
25918   ac_cv_search_clock_gettime=no
25919 fi
25920 rm conftest.$ac_ext
25921 LIBS=$ac_func_search_save_LIBS
25922 fi
25923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
25924 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
25925 ac_res=$ac_cv_search_clock_gettime
25926 if test "$ac_res" != no
25927 then :
25928   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25929   test "$ac_cv_search_clock_gettime" = "none required" ||
25930                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
25931 fi
25932
25933     ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
25934 if test "x$ac_cv_func_clock_gettime" = xyes
25935 then :
25936   printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
25937
25938 fi
25939 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
25940 if test "x$ac_cv_func_clock_settime" = xyes
25941 then :
25942   printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
25943
25944 fi
25945
25946   LIBS=$gl_saved_libs
25947
25948
25949
25950 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
25951
25952
25953
25954
25955
25956
25957     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25958       REPLACE_CLOSE=1
25959     fi
25960
25961
25962
25963
25964
25965
25966   if test $ac_cv_header_sys_socket_h != yes; then
25967                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25968 if test "x$ac_cv_header_winsock2_h" = xyes
25969 then :
25970   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
25971
25972 fi
25973
25974   fi
25975   if test "$ac_cv_header_winsock2_h" = yes; then
25976     HAVE_WINSOCK2_H=1
25977     UNISTD_H_HAVE_WINSOCK2_H=1
25978     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25979   else
25980     HAVE_WINSOCK2_H=0
25981   fi
25982
25983
25984     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
25985                         REPLACE_CLOSE=1
25986     fi
25987
25988
25989
25990   if test $REPLACE_CLOSE = 1; then
25991
25992
25993
25994
25995
25996
25997
25998
25999   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
26000
26001   fi
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011           GL_GNULIB_CLOSE=1
26012
26013
26014
26015
26016
26017 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
26031
26032
26033
26034
26035   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
26036 printf %s "checking whether // is distinct from /... " >&6; }
26037 if test ${gl_cv_double_slash_root+y}
26038 then :
26039   printf %s "(cached) " >&6
26040 else $as_nop
26041    if test x"$cross_compiling" = xyes ; then
26042         # When cross-compiling, there is no way to tell whether // is special
26043         # short of a list of hosts.  However, the only known hosts to date
26044         # that have a distinct // are Apollo DomainOS (too old to port to),
26045         # Cygwin, and z/OS.  If anyone knows of another system for which // has
26046         # special semantics and is distinct from /, please report it to
26047         # <bug-gnulib@gnu.org>.
26048         case $host in
26049           *-cygwin | i370-ibm-openedition)
26050             gl_cv_double_slash_root=yes ;;
26051           *)
26052             # Be optimistic and assume that / and // are the same when we
26053             # don't know.
26054             gl_cv_double_slash_root='unknown, assuming no' ;;
26055         esac
26056       else
26057         set x `ls -di / // 2>/dev/null`
26058         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
26059           gl_cv_double_slash_root=no
26060         else
26061           gl_cv_double_slash_root=yes
26062         fi
26063       fi
26064 fi
26065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
26066 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
26067   if test "$gl_cv_double_slash_root" = yes; then
26068
26069 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
26070
26071   fi
26072
26073
26074
26075
26076   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
26077 printf %s "checking whether dup2 works... " >&6; }
26078 if test ${gl_cv_func_dup2_works+y}
26079 then :
26080   printf %s "(cached) " >&6
26081 else $as_nop
26082   if test "$cross_compiling" = yes
26083 then :
26084   case "$host_os" in
26085          mingw*) # on this platform, dup2 always returns 0 for success
26086            gl_cv_func_dup2_works="guessing no" ;;
26087          cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
26088            gl_cv_func_dup2_works="guessing no" ;;
26089          aix* | freebsd*)
26090                  # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
26091                  # not EBADF.
26092            gl_cv_func_dup2_works="guessing no" ;;
26093          haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
26094            gl_cv_func_dup2_works="guessing no" ;;
26095          *-android*) # implemented using dup3(), which fails if oldfd == newfd
26096            gl_cv_func_dup2_works="guessing no" ;;
26097          os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
26098            gl_cv_func_dup2_works="guessing no" ;;
26099          *) gl_cv_func_dup2_works="guessing yes" ;;
26100        esac
26101 else $as_nop
26102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26103 /* end confdefs.h.  */
26104
26105        #include <errno.h>
26106            #include <fcntl.h>
26107            #include <limits.h>
26108            #include <sys/resource.h>
26109            #include <unistd.h>
26110
26111
26112 $gl_mda_defines
26113
26114            #ifndef RLIM_SAVED_CUR
26115            # define RLIM_SAVED_CUR RLIM_INFINITY
26116            #endif
26117            #ifndef RLIM_SAVED_MAX
26118            # define RLIM_SAVED_MAX RLIM_INFINITY
26119            #endif
26120
26121 int
26122 main (void)
26123 {
26124 int result = 0;
26125            int bad_fd = INT_MAX;
26126            struct rlimit rlim;
26127            if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
26128                && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
26129                && rlim.rlim_cur != RLIM_INFINITY
26130                && rlim.rlim_cur != RLIM_SAVED_MAX
26131                && rlim.rlim_cur != RLIM_SAVED_CUR)
26132              bad_fd = rlim.rlim_cur;
26133            #ifdef FD_CLOEXEC
26134              if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
26135                result |= 1;
26136            #endif
26137            if (dup2 (1, 1) != 1)
26138              result |= 2;
26139            #ifdef FD_CLOEXEC
26140              if (fcntl (1, F_GETFD) != FD_CLOEXEC)
26141                result |= 4;
26142            #endif
26143            close (0);
26144            if (dup2 (0, 0) != -1)
26145              result |= 8;
26146            /* Many gnulib modules require POSIX conformance of EBADF.  */
26147            if (dup2 (2, bad_fd) == -1 && errno != EBADF)
26148              result |= 16;
26149            /* Flush out some cygwin core dumps.  */
26150            if (dup2 (2, -1) != -1 || errno != EBADF)
26151              result |= 32;
26152            dup2 (2, 255);
26153            dup2 (2, 256);
26154            /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
26155            {
26156              int fd = open (".", O_RDONLY);
26157              if (fd == -1)
26158                result |= 64;
26159              else if (dup2 (fd, fd + 1) == -1)
26160                result |= 128;
26161              close (fd);
26162            }
26163            return result;
26164   ;
26165   return 0;
26166 }
26167
26168 _ACEOF
26169 if ac_fn_c_try_run "$LINENO"
26170 then :
26171   gl_cv_func_dup2_works=yes
26172 else $as_nop
26173   gl_cv_func_dup2_works=no
26174 fi
26175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26176   conftest.$ac_objext conftest.beam conftest.$ac_ext
26177 fi
26178
26179
26180 fi
26181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
26182 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
26183   case "$gl_cv_func_dup2_works" in
26184     *yes) ;;
26185     *)
26186       REPLACE_DUP2=1
26187       ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
26188 if test "x$ac_cv_func_setdtablesize" = xyes
26189 then :
26190   printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
26191
26192 fi
26193
26194       ;;
26195   esac
26196
26197
26198   if test $REPLACE_DUP2 = 1; then
26199
26200
26201
26202
26203
26204
26205
26206
26207   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
26208
26209
26210   fi
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220           GL_GNULIB_DUP2=1
26221
26222
26223
26224
26225
26226 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241           GL_GNULIB_ENVIRON=1
26242
26243
26244
26245
26246
26247 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
26248
26249
26250
26251
26252
26253       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
26254 printf %s "checking for error_at_line... " >&6; }
26255 if test ${ac_cv_lib_error_at_line+y}
26256 then :
26257   printf %s "(cached) " >&6
26258 else $as_nop
26259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26260 /* end confdefs.h.  */
26261 #include <error.h>
26262 int
26263 main (void)
26264 {
26265 error_at_line (0, 0, "", 0, "an error occurred");
26266   ;
26267   return 0;
26268 }
26269 _ACEOF
26270 if ac_fn_c_try_link "$LINENO"
26271 then :
26272   ac_cv_lib_error_at_line=yes
26273 else $as_nop
26274   ac_cv_lib_error_at_line=no
26275 fi
26276 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26277     conftest$ac_exeext conftest.$ac_ext
26278 fi
26279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
26280 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
26281
26282   if test $ac_cv_lib_error_at_line = no; then
26283
26284
26285
26286
26287
26288
26289
26290
26291   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
26292
26293
26294
26295   :
26296
26297   fi
26298
26299
26300   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
26301
26302
26303
26304   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
26305
26306
26307
26308
26309
26310
26311
26312   if test $ac_cv_func_fcntl = no; then
26313
26314
26315
26316   if test $ac_cv_func_fcntl = no; then
26317     HAVE_FCNTL=0
26318   else
26319     REPLACE_FCNTL=1
26320   fi
26321
26322   else
26323             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
26324 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
26325 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
26326 then :
26327   printf %s "(cached) " >&6
26328 else $as_nop
26329   if test "$cross_compiling" = yes
26330 then :
26331   case $host_os in
26332             aix* | cygwin* | haiku*)
26333                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
26334             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
26335           esac
26336 else $as_nop
26337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26338 /* end confdefs.h.  */
26339 #include <errno.h>
26340               #include <fcntl.h>
26341               #include <limits.h>
26342               #include <sys/resource.h>
26343               #include <unistd.h>
26344
26345
26346 $gl_mda_defines
26347
26348               #ifndef RLIM_SAVED_CUR
26349               # define RLIM_SAVED_CUR RLIM_INFINITY
26350               #endif
26351               #ifndef RLIM_SAVED_MAX
26352               # define RLIM_SAVED_MAX RLIM_INFINITY
26353               #endif
26354
26355 int
26356 main (void)
26357 {
26358 int result = 0;
26359               int bad_fd = INT_MAX;
26360               struct rlimit rlim;
26361               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
26362                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
26363                   && rlim.rlim_cur != RLIM_INFINITY
26364                   && rlim.rlim_cur != RLIM_SAVED_MAX
26365                   && rlim.rlim_cur != RLIM_SAVED_CUR)
26366                 bad_fd = rlim.rlim_cur;
26367               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
26368               if (errno != EINVAL) result |= 2;
26369               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
26370               if (errno != EINVAL) result |= 8;
26371               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
26372               {
26373                 int fd;
26374                 fd = open (".", O_RDONLY);
26375                 if (fd == -1)
26376                   result |= 16;
26377                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
26378                   result |= 32;
26379
26380                 close (fd);
26381               }
26382               return result;
26383   ;
26384   return 0;
26385 }
26386 _ACEOF
26387 if ac_fn_c_try_run "$LINENO"
26388 then :
26389   gl_cv_func_fcntl_f_dupfd_works=yes
26390 else $as_nop
26391   gl_cv_func_fcntl_f_dupfd_works=no
26392 fi
26393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26394   conftest.$ac_objext conftest.beam conftest.$ac_ext
26395 fi
26396
26397 fi
26398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
26399 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
26400     case $gl_cv_func_fcntl_f_dupfd_works in
26401       *yes) ;;
26402       *)
26403
26404
26405   if test $ac_cv_func_fcntl = no; then
26406     HAVE_FCNTL=0
26407   else
26408     REPLACE_FCNTL=1
26409   fi
26410
26411
26412 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
26413  ;;
26414     esac
26415
26416             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
26417 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
26418 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
26419 then :
26420   printf %s "(cached) " >&6
26421 else $as_nop
26422   if test "$cross_compiling" = yes
26423 then :
26424   case "$host_os" in
26425                      # Guess no on NetBSD.
26426             netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
26427             *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
26428           esac
26429
26430 else $as_nop
26431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26432 /* end confdefs.h.  */
26433 #include <fcntl.h>
26434               #include <unistd.h>
26435               int main (int argc, char *argv[])
26436               {
26437                 if (argc == 1)
26438                   /* parent process */
26439                   {
26440                     if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
26441                       return 1;
26442                     return execl ("./conftest", "./conftest", "child", NULL);
26443                   }
26444                 else
26445                   /* child process */
26446                   return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
26447               }
26448
26449
26450 _ACEOF
26451 if ac_fn_c_try_run "$LINENO"
26452 then :
26453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26454 /* end confdefs.h.  */
26455
26456 #ifdef __linux__
26457 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
26458    it to support the semantics on older kernels that failed with EINVAL.  */
26459 choke me
26460 #endif
26461
26462 int
26463 main (void)
26464 {
26465
26466   ;
26467   return 0;
26468 }
26469 _ACEOF
26470 if ac_fn_c_try_compile "$LINENO"
26471 then :
26472   gl_cv_func_fcntl_f_dupfd_cloexec=yes
26473 else $as_nop
26474   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
26475 fi
26476 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26477
26478 else $as_nop
26479   gl_cv_func_fcntl_f_dupfd_cloexec=no
26480 fi
26481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26482   conftest.$ac_objext conftest.beam conftest.$ac_ext
26483 fi
26484
26485
26486 fi
26487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
26488 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
26489     case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
26490       *yes) ;;
26491       *)
26492
26493
26494   if test $ac_cv_func_fcntl = no; then
26495     HAVE_FCNTL=0
26496   else
26497     REPLACE_FCNTL=1
26498   fi
26499
26500                         ;;
26501     esac
26502   fi
26503
26504
26505   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
26506
26507
26508
26509
26510
26511
26512
26513
26514   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
26515
26516   fi
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526           GL_GNULIB_FCNTL=1
26527
26528
26529
26530
26531
26532 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
26548
26549
26550
26551
26552
26553
26554   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
26555 printf %s "checking for flexible array member... " >&6; }
26556 if test ${ac_cv_c_flexmember+y}
26557 then :
26558   printf %s "(cached) " >&6
26559 else $as_nop
26560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26561 /* end confdefs.h.  */
26562 #include <stdlib.h>
26563             #include <stdio.h>
26564             #include <stddef.h>
26565             struct m { struct m *next, **list; char name[]; };
26566             struct s { struct s *p; struct m *m; int n; double d[]; };
26567 int
26568 main (void)
26569 {
26570 int m = getchar ();
26571             size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
26572             nbytes += sizeof (struct s) - 1;
26573             nbytes -= nbytes % sizeof (struct s);
26574             struct s *p = malloc (nbytes);
26575             p->p = p;
26576             p->m = NULL;
26577             p->d[0] = 0.0;
26578             return p->d != (double *) NULL;
26579   ;
26580   return 0;
26581 }
26582 _ACEOF
26583 if ac_fn_c_try_compile "$LINENO"
26584 then :
26585   ac_cv_c_flexmember=yes
26586 else $as_nop
26587   ac_cv_c_flexmember=no
26588 fi
26589 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26590 fi
26591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
26592 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
26593   if test $ac_cv_c_flexmember = yes; then
26594
26595 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
26596
26597   else
26598     printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
26599
26600   fi
26601
26602
26603
26604
26605   FLOAT_H=
26606   REPLACE_FLOAT_LDBL=0
26607   case "$host_os" in
26608     aix* | beos* | openbsd* | mirbsd* | irix*)
26609       FLOAT_H=float.h
26610       ;;
26611     freebsd* | dragonfly*)
26612       case "$host_cpu" in
26613         i[34567]86 )
26614           FLOAT_H=float.h
26615           ;;
26616         x86_64 )
26617           # On x86_64 systems, the C compiler may still be generating
26618           # 32-bit code.
26619           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26620 /* end confdefs.h.  */
26621 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
26622                   int ok;
26623                  #else
26624                   error fail
26625                  #endif
26626
26627 _ACEOF
26628 if ac_fn_c_try_compile "$LINENO"
26629 then :
26630
26631 else $as_nop
26632   FLOAT_H=float.h
26633 fi
26634 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26635           ;;
26636       esac
26637       ;;
26638     linux*)
26639       case "$host_cpu" in
26640         powerpc*)
26641           FLOAT_H=float.h
26642           ;;
26643       esac
26644       ;;
26645   esac
26646   case "$host_os" in
26647     aix* | freebsd* | dragonfly* | linux*)
26648       if test -n "$FLOAT_H"; then
26649         REPLACE_FLOAT_LDBL=1
26650       fi
26651       ;;
26652   esac
26653
26654     REPLACE_ITOLD=0
26655   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
26656 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
26657 if test ${gl_cv_func_itold_works+y}
26658 then :
26659   printf %s "(cached) " >&6
26660 else $as_nop
26661
26662       if test "$cross_compiling" = yes
26663 then :
26664   case "$host" in
26665            sparc*-*-linux*)
26666              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26667 /* end confdefs.h.  */
26668 #if defined __LP64__ || defined __arch64__
26669                     int ok;
26670                    #else
26671                     error fail
26672                    #endif
26673
26674 _ACEOF
26675 if ac_fn_c_try_compile "$LINENO"
26676 then :
26677   gl_cv_func_itold_works="guessing no"
26678 else $as_nop
26679   gl_cv_func_itold_works="guessing yes"
26680 fi
26681 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26682              ;;
26683                    # Guess yes on native Windows.
26684            mingw*) gl_cv_func_itold_works="guessing yes" ;;
26685            *)      gl_cv_func_itold_works="guessing yes" ;;
26686          esac
26687
26688 else $as_nop
26689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26690 /* end confdefs.h.  */
26691
26692 int i = -1;
26693 volatile long double ld;
26694 int main ()
26695 {
26696   ld += i * 1.0L;
26697   if (ld > 0)
26698     return 1;
26699   return 0;
26700 }
26701 _ACEOF
26702 if ac_fn_c_try_run "$LINENO"
26703 then :
26704   gl_cv_func_itold_works=yes
26705 else $as_nop
26706   gl_cv_func_itold_works=no
26707 fi
26708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26709   conftest.$ac_objext conftest.beam conftest.$ac_ext
26710 fi
26711
26712
26713 fi
26714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
26715 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
26716   case "$gl_cv_func_itold_works" in
26717     *no)
26718       REPLACE_ITOLD=1
26719                   FLOAT_H=float.h
26720       ;;
26721   esac
26722
26723   if test -n "$FLOAT_H"; then
26724
26725
26726
26727
26728
26729
26730
26731
26732      if test $gl_cv_have_include_next = yes; then
26733        gl_cv_next_float_h='<'float.h'>'
26734      else
26735        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
26736 printf %s "checking absolute name of <float.h>... " >&6; }
26737 if test ${gl_cv_next_float_h+y}
26738 then :
26739   printf %s "(cached) " >&6
26740 else $as_nop
26741
26742
26743
26744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26745 /* end confdefs.h.  */
26746 #include <float.h>
26747 _ACEOF
26748                 case "$host_os" in
26749     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26750     *)    gl_absname_cpp="$ac_cpp" ;;
26751   esac
26752
26753   case "$host_os" in
26754     mingw*)
26755                                           gl_dirsep_regex='[/\\]'
26756       ;;
26757     *)
26758       gl_dirsep_regex='\/'
26759       ;;
26760   esac
26761       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26762   gl_header_literal_regex=`echo 'float.h' \
26763                            | sed -e "$gl_make_literal_regex_sed"`
26764   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26765       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26766       s|^/[^/]|//&|
26767       p
26768       q
26769     }'
26770
26771         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26772   sed -n "$gl_absolute_header_sed"`
26773
26774            gl_header=$gl_cv_absolute_float_h
26775            gl_cv_next_float_h='"'$gl_header'"'
26776
26777
26778 fi
26779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
26780 printf "%s\n" "$gl_cv_next_float_h" >&6; }
26781      fi
26782      NEXT_FLOAT_H=$gl_cv_next_float_h
26783
26784      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26785        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26786        gl_next_as_first_directive='<'float.h'>'
26787      else
26788        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26789        gl_next_as_first_directive=$gl_cv_next_float_h
26790      fi
26791      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
26792
26793
26794
26795
26796   fi
26797
26798    if test -n "$FLOAT_H"; then
26799   GL_GENERATE_FLOAT_H_TRUE=
26800   GL_GENERATE_FLOAT_H_FALSE='#'
26801 else
26802   GL_GENERATE_FLOAT_H_TRUE='#'
26803   GL_GENERATE_FLOAT_H_FALSE=
26804 fi
26805
26806
26807
26808   if test $REPLACE_FLOAT_LDBL = 1; then
26809
26810
26811
26812
26813
26814
26815
26816
26817   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
26818
26819   fi
26820   if test $REPLACE_ITOLD = 1; then
26821
26822
26823
26824
26825
26826
26827
26828
26829   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
26830
26831   fi
26832
26833
26834
26835
26836      gl_fnmatch_required_lowercase=`
26837     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
26838   `
26839
26840   if test $ac_cv_func_fnmatch = no; then
26841     HAVE_FNMATCH=0
26842   else
26843     gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
26844     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
26845 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
26846 if eval test \${$gl_fnmatch_cache_var+y}
26847 then :
26848   printf %s "(cached) " >&6
26849 else $as_nop
26850                                      if test $gl_fnmatch_required = GNU; then
26851          gl_fnmatch_gnu_start=
26852          gl_fnmatch_gnu_end=
26853        else
26854          gl_fnmatch_gnu_start='#if 0'
26855          gl_fnmatch_gnu_end='#endif'
26856        fi
26857        if test "$cross_compiling" = yes
26858 then :
26859   case "$host_os" in
26860                      # Guess yes on musl systems.
26861             *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
26862                      # Guess no otherwise, even on glibc systems.
26863             *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
26864           esac
26865
26866 else $as_nop
26867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26868 /* end confdefs.h.  */
26869 #include <fnmatch.h>
26870               static int
26871               y (char const *pattern, char const *string, int flags)
26872               {
26873                 return fnmatch (pattern, string, flags) == 0;
26874               }
26875               static int
26876               n (char const *pattern, char const *string, int flags)
26877               {
26878                 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
26879               }
26880
26881 int
26882 main (void)
26883 {
26884 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
26885               char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
26886               static char const A_1[] = { 'A' - 1, 0 };
26887               static char const A01[] = { 'A' + 1, 0 };
26888               static char const a_1[] = { 'a' - 1, 0 };
26889               static char const a01[] = { 'a' + 1, 0 };
26890               static char const bs_1[] = { '\\\\' - 1, 0 };
26891               static char const bs01[] = { '\\\\' + 1, 0 };
26892               int result = 0;
26893               if (!n ("a*", "", 0))
26894                 return 1;
26895               if (!y ("a*", "abc", 0))
26896                 return 1;
26897               if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
26898                 return 1;
26899               if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
26900                 return 2;
26901               if (!y ("a\\\\bc", "abc", 0))
26902                 return 3;
26903               if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
26904                 return 3;
26905               if (!y ("*x", ".x", 0))
26906                 return 4;
26907               if (!n ("*x", ".x", FNM_PERIOD))
26908                 return 4;
26909               if (!y (Apat, "\\\\", 0))
26910                 return 5;
26911               if (!y (Apat, "A", 0))
26912                 return 5;
26913               if (!y (apat, "\\\\", 0))
26914                 return 5;
26915               if (!y (apat, "a", 0))
26916                 return 5;
26917               if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
26918                 return 5;
26919               if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
26920                 return 5;
26921               if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
26922                 return 5;
26923               if (!(y (apat, a01, 0) == ('a' < '\\\\')))
26924                 return 5;
26925               if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
26926                 return 5;
26927               if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
26928                 return 5;
26929               if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
26930                 return 5;
26931               if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
26932                 return 5;
26933               $gl_fnmatch_gnu_start
26934               if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
26935                 result |= 8;
26936               if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
26937                 result |= 16;
26938               if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
26939                 result |= 32;
26940               if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
26941                 result |= 64;
26942               if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
26943                 result |= 64;
26944               if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
26945                 result |= 64;
26946               $gl_fnmatch_gnu_end
26947               return result;
26948
26949   ;
26950   return 0;
26951 }
26952 _ACEOF
26953 if ac_fn_c_try_run "$LINENO"
26954 then :
26955   eval "$gl_fnmatch_cache_var=yes"
26956 else $as_nop
26957   eval "$gl_fnmatch_cache_var=no"
26958 fi
26959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26960   conftest.$ac_objext conftest.beam conftest.$ac_ext
26961 fi
26962
26963
26964 fi
26965 eval ac_res=\$$gl_fnmatch_cache_var
26966                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26967 printf "%s\n" "$ac_res" >&6; }
26968     eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
26969     case "$gl_fnmatch_result" in
26970       *yes) ;;
26971       *) REPLACE_FNMATCH=1 ;;
26972     esac
26973   fi
26974   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
26975
26976
26977
26978
26979
26980
26981   FNMATCH_H='fnmatch.h'
26982    if test -n "$FNMATCH_H"; then
26983   GL_GENERATE_FNMATCH_H_TRUE=
26984   GL_GENERATE_FNMATCH_H_FALSE='#'
26985 else
26986   GL_GENERATE_FNMATCH_H_TRUE='#'
26987   GL_GENERATE_FNMATCH_H_FALSE=
26988 fi
26989
26990
26991   fi
26992
26993   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
26994
26995
26996
26997
26998
26999
27000
27001
27002   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27003
27004
27005
27006
27007
27008   fi
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018           GL_GNULIB_FNMATCH=1
27019
27020
27021
27022
27023
27024 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
27025
27026
27027
27028
27029
27030
27031
27032
27033   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27034
27035
27036
27037
27038
27039
27040
27041
27042   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27043
27044
27045
27046
27047
27048   fi
27049
27050
27051 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063   case "$host_os" in
27064     mingw* | pw*)
27065             REPLACE_FOPEN=1
27066             gl_cv_func_fopen_slash="guessing no"
27067       ;;
27068     *)
27069                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
27070 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
27071 if test ${gl_cv_func_fopen_slash+y}
27072 then :
27073   printf %s "(cached) " >&6
27074 else $as_nop
27075
27076           if test "$cross_compiling" = yes
27077 then :
27078
27079              case "$host_os" in
27080                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27081                  gl_cv_func_fopen_slash="guessing no" ;;
27082                *)
27083                  gl_cv_func_fopen_slash="guessing yes" ;;
27084              esac
27085
27086 else $as_nop
27087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27088 /* end confdefs.h.  */
27089
27090 #include <stddef.h>
27091 #include <stdio.h>
27092 int main ()
27093 {
27094   FILE *fp = fopen ("conftest.sl/", "w");
27095   int result = (fp != NULL);
27096   if (fp != NULL)
27097     fclose (fp);
27098   return result;
27099 }
27100 _ACEOF
27101 if ac_fn_c_try_run "$LINENO"
27102 then :
27103   gl_cv_func_fopen_slash=yes
27104 else $as_nop
27105   gl_cv_func_fopen_slash=no
27106 fi
27107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27108   conftest.$ac_objext conftest.beam conftest.$ac_ext
27109 fi
27110
27111           rm -f conftest.sl
27112
27113 fi
27114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
27115 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
27116       ;;
27117   esac
27118   case "$gl_cv_func_fopen_slash" in
27119     *no)
27120
27121 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27122
27123       REPLACE_FOPEN=1
27124       ;;
27125   esac
27126
27127   if test $REPLACE_FOPEN = 1; then
27128
27129
27130
27131
27132
27133
27134
27135
27136   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27137
27138     :
27139   fi
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149           GL_GNULIB_FOPEN=1
27150
27151
27152
27153
27154
27155 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
27156
27157
27158
27159
27160
27161   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
27162 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
27163 if test ${gl_cv_func_fopen_mode_x+y}
27164 then :
27165   printf %s "(cached) " >&6
27166 else $as_nop
27167   rm -f conftest.x
27168      if test "$cross_compiling" = yes
27169 then :
27170   case "$host_os" in
27171           # Guess yes on glibc and musl systems.
27172           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27173             gl_cv_func_fopen_mode_x="guessing yes" ;;
27174           # If we don't know, obey --enable-cross-guesses.
27175           *)
27176             gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
27177         esac
27178
27179 else $as_nop
27180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27181 /* end confdefs.h.  */
27182
27183 #include <stdio.h>
27184 #include <errno.h>
27185 int main ()
27186 {
27187   FILE *fp;
27188   fp = fopen ("conftest.x", "w");
27189   fclose (fp);
27190   fp = fopen ("conftest.x", "wx");
27191   if (fp != NULL)
27192     /* 'x' ignored */
27193     return 1;
27194   else if (errno == EEXIST)
27195     return 0;
27196   else
27197     /* 'x' rejected */
27198     return 2;
27199 }
27200 _ACEOF
27201 if ac_fn_c_try_run "$LINENO"
27202 then :
27203   gl_cv_func_fopen_mode_x=yes
27204 else $as_nop
27205   gl_cv_func_fopen_mode_x=no
27206 fi
27207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27208   conftest.$ac_objext conftest.beam conftest.$ac_ext
27209 fi
27210
27211      rm -f conftest.x
27212
27213 fi
27214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
27215 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
27216   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
27217 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
27218 if test ${gl_cv_func_fopen_mode_e+y}
27219 then :
27220   printf %s "(cached) " >&6
27221 else $as_nop
27222   echo foo > conftest.x
27223      if test "$cross_compiling" = yes
27224 then :
27225   case "$host_os" in
27226           # Guess yes on glibc and musl systems.
27227           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27228             gl_cv_func_fopen_mode_e="guessing yes" ;;
27229           # Guess no on native Windows.
27230           mingw*)
27231             gl_cv_func_fopen_mode_e="guessing no" ;;
27232           # If we don't know, obey --enable-cross-guesses.
27233           *)
27234             gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
27235         esac
27236
27237 else $as_nop
27238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27239 /* end confdefs.h.  */
27240
27241 #include <stdio.h>
27242 #include <errno.h>
27243 #include <fcntl.h>
27244
27245
27246 $gl_mda_defines
27247
27248 int main ()
27249 {
27250   FILE *fp = fopen ("conftest.x", "re");
27251   if (fp != NULL)
27252     {
27253       if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
27254         return 0;
27255       else
27256         /* 'e' ignored */
27257         return 1;
27258     }
27259   else
27260     /* 'e' rejected */
27261     return 2;
27262 }
27263 _ACEOF
27264 if ac_fn_c_try_run "$LINENO"
27265 then :
27266   gl_cv_func_fopen_mode_e=yes
27267 else $as_nop
27268   gl_cv_func_fopen_mode_e=no
27269 fi
27270 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27271   conftest.$ac_objext conftest.beam conftest.$ac_ext
27272 fi
27273
27274      rm -f conftest.x
27275
27276 fi
27277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
27278 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
27279   case "$gl_cv_func_fopen_mode_x" in
27280     *no) REPLACE_FOPEN=1 ;;
27281   esac
27282   case "$gl_cv_func_fopen_mode_e" in
27283     *no) REPLACE_FOPEN=1 ;;
27284   esac
27285
27286   if test $REPLACE_FOPEN = 1; then
27287
27288
27289
27290
27291
27292
27293
27294
27295   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27296
27297     :
27298   fi
27299
27300
27301 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
27302
27303
27304
27305
27306
27307                           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
27308 printf %s "checking whether free is known to preserve errno... " >&6; }
27309 if test ${gl_cv_func_free_preserves_errno+y}
27310 then :
27311   printf %s "(cached) " >&6
27312 else $as_nop
27313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27314 /* end confdefs.h.  */
27315 #include <stdlib.h>
27316
27317 int
27318 main (void)
27319 {
27320 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
27321             #elif defined __OpenBSD__
27322             #elif defined __sun
27323             #else
27324               #error "'free' is not known to preserve errno"
27325             #endif
27326
27327   ;
27328   return 0;
27329 }
27330 _ACEOF
27331 if ac_fn_c_try_compile "$LINENO"
27332 then :
27333   gl_cv_func_free_preserves_errno=yes
27334 else $as_nop
27335   gl_cv_func_free_preserves_errno=no
27336 fi
27337 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27338
27339 fi
27340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
27341 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
27342
27343   case $gl_cv_func_free_preserves_errno in
27344    *yes)
27345
27346 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
27347
27348     ;;
27349    *) REPLACE_FREE=1 ;;
27350   esac
27351
27352   if test $REPLACE_FREE = 1; then
27353
27354
27355
27356
27357
27358
27359
27360
27361   gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
27362
27363     :
27364   fi
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374           GL_GNULIB_FREE_POSIX=1
27375
27376
27377
27378
27379
27380 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
27381
27382
27383
27384
27385
27386
27387   case "$host_os" in
27388     mingw* | pw* | os2*)
27389       REPLACE_FREOPEN=1
27390       ;;
27391     *)
27392       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
27393 printf %s "checking whether freopen works on closed fds... " >&6; }
27394 if test ${gl_cv_func_freopen_works_on_closed+y}
27395 then :
27396   printf %s "(cached) " >&6
27397 else $as_nop
27398   if test "$cross_compiling" = yes
27399 then :
27400   case $host_os in
27401               *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
27402               *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
27403             esac
27404 else $as_nop
27405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27406 /* end confdefs.h.  */
27407 #include <stdio.h>
27408                 #include <unistd.h>
27409
27410
27411 $gl_mda_defines
27412
27413 int
27414 main (void)
27415 {
27416 close (0);
27417                 return !(freopen ("/dev/null", "r", stdin)
27418                          && getchar () == EOF
27419                          && !ferror (stdin) && feof (stdin));
27420   ;
27421   return 0;
27422 }
27423 _ACEOF
27424 if ac_fn_c_try_run "$LINENO"
27425 then :
27426   gl_cv_func_freopen_works_on_closed=yes
27427 else $as_nop
27428   gl_cv_func_freopen_works_on_closed=no
27429 fi
27430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27431   conftest.$ac_objext conftest.beam conftest.$ac_ext
27432 fi
27433
27434 fi
27435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
27436 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
27437       case $gl_cv_func_freopen_works_on_closed in
27438         *no) REPLACE_FREOPEN=1;;
27439       esac
27440   esac
27441
27442   if test $REPLACE_FREOPEN = 1; then
27443
27444
27445
27446
27447
27448
27449
27450
27451   gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
27452
27453     :
27454   fi
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464           GL_GNULIB_FREOPEN=1
27465
27466
27467
27468
27469
27470 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
27471
27472
27473
27474
27475
27476
27477
27478   case "$host_os" in
27479     mingw* | solaris*)
27480                         REPLACE_FSTAT=1
27481       ;;
27482   esac
27483
27484
27485
27486   if test $REPLACE_FSTAT = 1; then
27487
27488
27489
27490
27491
27492
27493
27494
27495   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
27496
27497     case "$host_os" in
27498       mingw*)
27499
27500
27501
27502
27503
27504
27505
27506
27507   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27508
27509         ;;
27510     esac
27511
27512
27513
27514   :
27515
27516   fi
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526           GL_GNULIB_FSTAT=1
27527
27528
27529
27530
27531
27532 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
27533
27534
27535
27536
27537
27538
27539
27540
27541   if test $ac_cv_func_getdtablesize = yes &&
27542      test $ac_cv_have_decl_getdtablesize = yes; then
27543     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
27544 printf %s "checking whether getdtablesize works... " >&6; }
27545 if test ${gl_cv_func_getdtablesize_works+y}
27546 then :
27547   printf %s "(cached) " >&6
27548 else $as_nop
27549                                                    case "$host_os" in
27550          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
27551          *)
27552                                                        if test "$cross_compiling" = yes
27553 then :
27554   case "$host_os" in
27555                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
27556                   gl_cv_func_getdtablesize_works="guessing no" ;;
27557                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
27558               esac
27559
27560 else $as_nop
27561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27562 /* end confdefs.h.  */
27563
27564              #include <unistd.h>
27565
27566
27567 $gl_mda_defines
27568
27569
27570 int
27571 main (void)
27572 {
27573 int size = getdtablesize();
27574                  if (dup2 (0, getdtablesize()) != -1)
27575                    return 1;
27576                  if (size != getdtablesize())
27577                    return 2;
27578
27579   ;
27580   return 0;
27581 }
27582 _ACEOF
27583 if ac_fn_c_try_run "$LINENO"
27584 then :
27585   gl_cv_func_getdtablesize_works=yes
27586 else $as_nop
27587   gl_cv_func_getdtablesize_works=no
27588 fi
27589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27590   conftest.$ac_objext conftest.beam conftest.$ac_ext
27591 fi
27592
27593            ;;
27594        esac
27595
27596 fi
27597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
27598 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
27599     case "$gl_cv_func_getdtablesize_works" in
27600       *yes | "no (limitation)") ;;
27601       *) REPLACE_GETDTABLESIZE=1 ;;
27602     esac
27603   else
27604     HAVE_GETDTABLESIZE=0
27605   fi
27606
27607   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
27608
27609
27610
27611
27612
27613
27614
27615
27616   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
27617
27618     :
27619   fi
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629           GL_GNULIB_GETDTABLESIZE=1
27630
27631
27632
27633
27634
27635 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648     REPLACE_GETOPT=0
27649     if test -n "$gl_replace_getopt"; then
27650       REPLACE_GETOPT=1
27651     fi
27652
27653   if test $REPLACE_GETOPT = 1; then
27654
27655
27656   if test $ac_cv_header_sys_cdefs_h = yes; then
27657     HAVE_SYS_CDEFS_H=1
27658   else
27659     HAVE_SYS_CDEFS_H=0
27660   fi
27661
27662
27663
27664 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
27665
27666   GETOPT_H=getopt.h
27667   GETOPT_CDEFS_H=getopt-cdefs.h
27668
27669
27670
27671   fi
27672
27673   if test $REPLACE_GETOPT = 1; then
27674
27675
27676
27677
27678
27679
27680
27681
27682   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
27693
27694
27695
27696
27697
27698
27699
27700   GL_GNULIB_UNISTD_H_GETOPT=1
27701
27702
27703   fi
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713           GL_GNULIB_GETOPT_POSIX=1
27714
27715
27716
27717
27718
27719 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
27720
27721
27722
27723
27724
27725
27726
27727       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
27728 printf %s "checking for getpagesize... " >&6; }
27729 if test ${gl_cv_func_getpagesize+y}
27730 then :
27731   printf %s "(cached) " >&6
27732 else $as_nop
27733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27734 /* end confdefs.h.  */
27735 #include <unistd.h>
27736 int
27737 main (void)
27738 {
27739 return getpagesize();
27740   ;
27741   return 0;
27742 }
27743
27744 _ACEOF
27745 if ac_fn_c_try_link "$LINENO"
27746 then :
27747   gl_cv_func_getpagesize=yes
27748 else $as_nop
27749   gl_cv_func_getpagesize=no
27750 fi
27751 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27752     conftest$ac_exeext conftest.$ac_ext
27753
27754 fi
27755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
27756 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
27757
27758   if test $gl_cv_func_getpagesize = no; then
27759     HAVE_GETPAGESIZE=0
27760     ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
27761 if test "x$ac_cv_header_OS_h" = xyes
27762 then :
27763   printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
27764
27765 fi
27766
27767     if test $ac_cv_header_OS_h = yes; then
27768       HAVE_OS_H=1
27769     fi
27770     ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
27771 if test "x$ac_cv_header_sys_param_h" = xyes
27772 then :
27773   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
27774
27775 fi
27776
27777     if test $ac_cv_header_sys_param_h = yes; then
27778       HAVE_SYS_PARAM_H=1
27779     fi
27780   fi
27781   case "$host_os" in
27782     mingw*)
27783       REPLACE_GETPAGESIZE=1
27784       ;;
27785   esac
27786       ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27787 if test "x$ac_cv_have_decl_getpagesize" = xyes
27788 then :
27789
27790 else $as_nop
27791   HAVE_DECL_GETPAGESIZE=0
27792 fi
27793
27794   if test $REPLACE_GETPAGESIZE = 1; then
27795
27796
27797
27798
27799
27800
27801
27802
27803   gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
27804
27805   fi
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815           GL_GNULIB_GETPAGESIZE=1
27816
27817
27818
27819
27820
27821 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
27822
27823
27824
27825
27826
27827
27828   ac_found=0
27829   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
27830 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27831 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
27832 then :
27833   ac_have_decl=1
27834 else $as_nop
27835   ac_have_decl=0
27836 fi
27837 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
27838 if test $ac_have_decl = 1
27839 then :
27840   ac_found=1
27841 fi
27842
27843   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
27844 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27845 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
27846 then :
27847   ac_have_decl=1
27848 else $as_nop
27849   ac_have_decl=0
27850 fi
27851 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
27852 if test $ac_have_decl = 1
27853 then :
27854   ac_found=1
27855 fi
27856
27857   ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
27858 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27859 if test "x$ac_cv_have_decl___argv" = xyes
27860 then :
27861   ac_have_decl=1
27862 else $as_nop
27863   ac_have_decl=0
27864 fi
27865 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
27866 if test $ac_have_decl = 1
27867 then :
27868   ac_found=1
27869 fi
27870
27871
27872   # Incur the cost of this test only if none of the above worked.
27873   if test $ac_found = 0; then
27874     # On OpenBSD 5.1, using the global __progname variable appears to be
27875     # the only way to implement getprogname.
27876     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
27877 printf %s "checking whether __progname is defined in default libraries... " >&6; }
27878 if test ${gl_cv_var___progname+y}
27879 then :
27880   printf %s "(cached) " >&6
27881 else $as_nop
27882
27883         gl_cv_var___progname=
27884         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27885 /* end confdefs.h.  */
27886 extern char *__progname;
27887 int
27888 main (void)
27889 {
27890 return *__progname;
27891
27892   ;
27893   return 0;
27894 }
27895 _ACEOF
27896 if ac_fn_c_try_link "$LINENO"
27897 then :
27898   gl_cv_var___progname=yes
27899
27900 fi
27901 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27902     conftest$ac_exeext conftest.$ac_ext
27903
27904
27905 fi
27906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
27907 printf "%s\n" "$gl_cv_var___progname" >&6; }
27908     if test "$gl_cv_var___progname" = yes; then
27909
27910 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
27911
27912     fi
27913   fi
27914
27915
27916
27917
27918
27919   if test "$ac_cv_func_getrandom" != yes; then
27920     HAVE_GETRANDOM=0
27921   else
27922         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
27923 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
27924 if test ${gl_cv_func_getrandom_ok+y}
27925 then :
27926   printf %s "(cached) " >&6
27927 else $as_nop
27928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27929 /* end confdefs.h.  */
27930 /* Additional includes are needed before <sys/random.h> on uClibc
27931                  and Mac OS X.  */
27932               #include <sys/types.h>
27933               #include <stdlib.h>
27934               #include <sys/random.h>
27935               ssize_t getrandom (void *, size_t, unsigned int);
27936
27937 int
27938 main (void)
27939 {
27940
27941   ;
27942   return 0;
27943 }
27944
27945 _ACEOF
27946 if ac_fn_c_try_compile "$LINENO"
27947 then :
27948   gl_cv_func_getrandom_ok=yes
27949 else $as_nop
27950   gl_cv_func_getrandom_ok=no
27951 fi
27952 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27953
27954 fi
27955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
27956 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
27957     if test $gl_cv_func_getrandom_ok = no; then
27958       REPLACE_GETRANDOM=1
27959     fi
27960   fi
27961
27962   case "$host_os" in
27963     mingw*)
27964       ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
27965
27966 "
27967 if test "x$ac_cv_header_bcrypt_h" = xyes
27968 then :
27969   printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
27970
27971 fi
27972
27973       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
27974 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
27975 if test ${gl_cv_lib_assume_bcrypt+y}
27976 then :
27977   printf %s "(cached) " >&6
27978 else $as_nop
27979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27980 /* end confdefs.h.  */
27981 #include <windows.h>
27982 int
27983 main (void)
27984 {
27985 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
27986                   cannot assume it
27987                 #endif
27988
27989   ;
27990   return 0;
27991 }
27992
27993 _ACEOF
27994 if ac_fn_c_try_compile "$LINENO"
27995 then :
27996   gl_cv_lib_assume_bcrypt=yes
27997 else $as_nop
27998   gl_cv_lib_assume_bcrypt=no
27999 fi
28000 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28001
28002 fi
28003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
28004 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
28005       if test $gl_cv_lib_assume_bcrypt = yes; then
28006
28007 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
28008
28009         LIB_GETRANDOM='-lbcrypt'
28010       else
28011         LIB_GETRANDOM='-ladvapi32'
28012       fi
28013       ;;
28014     *)
28015       LIB_GETRANDOM= ;;
28016   esac
28017
28018
28019   if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
28020
28021
28022
28023
28024
28025
28026
28027
28028   gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
28029
28030   fi
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040           GL_GNULIB_GETRANDOM=1
28041
28042
28043
28044
28045
28046 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064   gl_gettimeofday_timezone=void
28065   if test $ac_cv_func_gettimeofday != yes; then
28066     HAVE_GETTIMEOFDAY=0
28067   else
28068     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
28069 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
28070 if test ${gl_cv_func_gettimeofday_posix_signature+y}
28071 then :
28072   printf %s "(cached) " >&6
28073 else $as_nop
28074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28075 /* end confdefs.h.  */
28076 #include <sys/time.h>
28077               struct timeval c;
28078               int gettimeofday (struct timeval *restrict, void *restrict);
28079
28080 int
28081 main (void)
28082 {
28083 /* glibc uses struct timezone * rather than the POSIX void *
28084                  if _GNU_SOURCE is defined.  However, since the only portable
28085                  use of gettimeofday uses NULL as the second parameter, and
28086                  since the glibc definition is actually more typesafe, it is
28087                  not worth wrapping this to get a compliant signature.  */
28088               int (*f) (struct timeval *restrict, void *restrict)
28089                 = gettimeofday;
28090               int x = f (&c, 0);
28091               return !(x | c.tv_sec | c.tv_usec);
28092
28093   ;
28094   return 0;
28095 }
28096 _ACEOF
28097 if ac_fn_c_try_compile "$LINENO"
28098 then :
28099   gl_cv_func_gettimeofday_posix_signature=yes
28100 else $as_nop
28101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28102 /* end confdefs.h.  */
28103 #include <sys/time.h>
28104 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
28105
28106 int
28107 main (void)
28108 {
28109
28110   ;
28111   return 0;
28112 }
28113 _ACEOF
28114 if ac_fn_c_try_compile "$LINENO"
28115 then :
28116   gl_cv_func_gettimeofday_posix_signature=almost
28117 else $as_nop
28118   gl_cv_func_gettimeofday_posix_signature=no
28119 fi
28120 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28121 fi
28122 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28123 fi
28124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
28125 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
28126     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
28127       gl_gettimeofday_timezone='struct timezone'
28128     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
28129       REPLACE_GETTIMEOFDAY=1
28130     fi
28131         if test $REPLACE_STRUCT_TIMEVAL = 1; then
28132       REPLACE_GETTIMEOFDAY=1
28133     fi
28134             case "$host_os" in
28135       mingw*) REPLACE_GETTIMEOFDAY=1 ;;
28136     esac
28137   fi
28138
28139 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
28140
28141
28142   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
28143
28144
28145
28146
28147
28148
28149
28150
28151   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
28152
28153     :
28154   fi
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164           GL_GNULIB_GETTIMEOFDAY=1
28165
28166
28167
28168
28169
28170 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
28171
28172
28173
28174
28175    if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
28176   GNU_MAKE_TRUE=
28177   GNU_MAKE_FALSE='#'
28178 else
28179   GNU_MAKE_TRUE='#'
28180   GNU_MAKE_FALSE=
28181 fi
28182
28183
28184   # Autoconf 2.61a.99 and earlier don't support linking a file only
28185   # in VPATH builds.  But since GNUmakefile is for maintainer use
28186   # only, it does not matter if we skip the link with older autoconf.
28187   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
28188   # builds, so use a shell variable to bypass this.
28189   GNUmakefile=GNUmakefile
28190   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
28191
28192
28193   LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207           GL_GNULIB_ICONV=1
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222   if test "$am_cv_func_iconv" = yes; then
28223
28224
28225
28226
28227
28228
28229   ICONV_H='iconv.h'
28230    if test -n "$ICONV_H"; then
28231   GL_GENERATE_ICONV_H_TRUE=
28232   GL_GENERATE_ICONV_H_FALSE='#'
28233 else
28234   GL_GENERATE_ICONV_H_TRUE='#'
28235   GL_GENERATE_ICONV_H_FALSE=
28236 fi
28237
28238
28239             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28240 /* end confdefs.h.  */
28241
28242       #include <iconv.h>
28243       #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
28244        gnu_iconv
28245       #endif
28246
28247 _ACEOF
28248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28249   $EGREP "gnu_iconv" >/dev/null 2>&1
28250 then :
28251   gl_func_iconv_gnu=yes
28252 else $as_nop
28253   gl_func_iconv_gnu=no
28254 fi
28255 rm -rf conftest*
28256
28257     if test $gl_func_iconv_gnu = no; then
28258       iconv_flavor=
28259       case "$host_os" in
28260         aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
28261         irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
28262         hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
28263         osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
28264         solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
28265         openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
28266       esac
28267       if test -n "$iconv_flavor"; then
28268
28269 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
28270
28271
28272
28273
28274
28275
28276
28277
28278   ICONV_H='iconv.h'
28279    if test -n "$ICONV_H"; then
28280   GL_GENERATE_ICONV_H_TRUE=
28281   GL_GENERATE_ICONV_H_FALSE='#'
28282 else
28283   GL_GENERATE_ICONV_H_TRUE='#'
28284   GL_GENERATE_ICONV_H_FALSE=
28285 fi
28286
28287
28288   REPLACE_ICONV_OPEN=1
28289
28290       fi
28291     fi
28292
28293   fi
28294
28295   if test $REPLACE_ICONV_OPEN = 1; then
28296
28297
28298
28299
28300
28301
28302
28303
28304   gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
28305
28306   fi
28307   if test $REPLACE_ICONV = 1; then
28308
28309
28310
28311
28312
28313
28314
28315
28316   gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326   gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
28327
28328   fi
28329
28330
28331   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
28332 printf %s "checking whether the compiler generally respects inline... " >&6; }
28333 if test ${gl_cv_c_inline_effective+y}
28334 then :
28335   printf %s "(cached) " >&6
28336 else $as_nop
28337   if test $ac_cv_c_inline = no; then
28338        gl_cv_c_inline_effective=no
28339      else
28340                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28341 /* end confdefs.h.  */
28342
28343 int
28344 main (void)
28345 {
28346 #ifdef __NO_INLINE__
28347                #error "inline is not effective"
28348              #endif
28349   ;
28350   return 0;
28351 }
28352 _ACEOF
28353 if ac_fn_c_try_compile "$LINENO"
28354 then :
28355   gl_cv_c_inline_effective=yes
28356 else $as_nop
28357   gl_cv_c_inline_effective=no
28358 fi
28359 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28360      fi
28361
28362 fi
28363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
28364 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
28365   if test $gl_cv_c_inline_effective = yes; then
28366
28367 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
28368
28369   fi
28370
28371
28372
28373
28374   :
28375
28376   :
28377   :
28378   :
28379   :
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393   if test $ac_cv_func_isblank = no; then
28394     HAVE_ISBLANK=0
28395   fi
28396
28397   if test $HAVE_ISBLANK = 0; then
28398
28399
28400
28401
28402
28403
28404
28405
28406   gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
28407
28408   fi
28409
28410
28411 printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423           GL_GNULIB_ISBLANK=1
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433   ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
28434     #include <wchar.h>
28435     #include <wctype.h>
28436
28437 " "$ac_c_undeclared_builtin_options" "CFLAGS"
28438 if test "x$ac_cv_have_decl_iswblank" = xyes
28439 then :
28440   ac_have_decl=1
28441 else $as_nop
28442   ac_have_decl=0
28443 fi
28444 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
28445
28446   if test $ac_cv_func_iswblank = no; then
28447     HAVE_ISWBLANK=0
28448     if test $ac_cv_have_decl_iswblank = yes; then
28449       REPLACE_ISWBLANK=1
28450     fi
28451   fi
28452   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28453         :
28454   else
28455     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28456             :
28457     fi
28458   fi
28459
28460
28461   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28462     :
28463   else
28464     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28465
28466
28467
28468
28469
28470
28471
28472
28473   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
28474
28475     fi
28476   fi
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486           GL_GNULIB_ISWBLANK=1
28487
28488
28489
28490
28491
28492 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28505         REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
28506   else
28507     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
28508 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
28509 if test ${gl_cv_func_iswdigit_works+y}
28510 then :
28511   printf %s "(cached) " >&6
28512 else $as_nop
28513
28514                      case "$host_os" in
28515          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
28516          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
28517            gl_cv_func_iswdigit_works="guessing no" ;;
28518          # Guess yes otherwise.
28519          *) gl_cv_func_iswdigit_works="guessing yes" ;;
28520        esac
28521        if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
28522          if test "$cross_compiling" = yes
28523 then :
28524   :
28525 else $as_nop
28526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28527 /* end confdefs.h.  */
28528
28529 #include <locale.h>
28530 #include <stdlib.h>
28531 #include <string.h>
28532 #include <wchar.h>
28533 #include <wctype.h>
28534
28535 /* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
28536 static int
28537 for_character (const char *s, size_t n)
28538 {
28539   mbstate_t state;
28540   wchar_t wc;
28541   size_t ret;
28542
28543   memset (&state, '\0', sizeof (mbstate_t));
28544   wc = (wchar_t) 0xBADFACE;
28545   ret = mbrtowc (&wc, s, n, &state);
28546   if (ret != n)
28547     abort ();
28548
28549   return iswdigit (wc);
28550 }
28551
28552 int
28553 main (int argc, char *argv[])
28554 {
28555   int is;
28556   int result = 0;
28557
28558   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28559     {
28560       /* This fails on mingw, MSVC 14.  */
28561       /* U+00B2 SUPERSCRIPT TWO */
28562       is = for_character ("\262", 1);
28563       if (!(is == 0))
28564         result |= 1;
28565     }
28566   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28567     {
28568       /* This fails on NetBSD 8.0.  */
28569       /* U+FF11 FULLWIDTH DIGIT ONE */
28570       is = for_character ("\243\261", 2);
28571       if (!(is == 0))
28572         result |= 2;
28573     }
28574   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28575     {
28576       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
28577       /* U+0663 ARABIC-INDIC DIGIT THREE */
28578       is = for_character ("\331\243", 2);
28579       if (!(is == 0))
28580         result |= 4;
28581       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
28582       /* U+FF11 FULLWIDTH DIGIT ONE */
28583       is = for_character ("\357\274\221", 3);
28584       if (!(is == 0))
28585         result |= 8;
28586     }
28587   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28588     {
28589       /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
28590       /* U+FF11 FULLWIDTH DIGIT ONE */
28591       is = for_character ("\243\261", 2);
28592       if (!(is == 0))
28593         result |= 16;
28594     }
28595   return result;
28596 }
28597 _ACEOF
28598 if ac_fn_c_try_run "$LINENO"
28599 then :
28600   gl_cv_func_iswdigit_works=yes
28601 else $as_nop
28602   gl_cv_func_iswdigit_works=no
28603 fi
28604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28605   conftest.$ac_objext conftest.beam conftest.$ac_ext
28606 fi
28607
28608        fi
28609
28610 fi
28611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
28612 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
28613     case "$gl_cv_func_iswdigit_works" in
28614       *yes) ;;
28615       *) REPLACE_ISWDIGIT=1 ;;
28616     esac
28617   fi
28618
28619   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28620     :
28621   else
28622     if test $REPLACE_ISWDIGIT = 1; then
28623
28624
28625
28626
28627
28628
28629
28630
28631   gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
28632
28633     fi
28634   fi
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644           GL_GNULIB_ISWDIGIT=1
28645
28646
28647
28648
28649
28650 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28662         REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
28663   else
28664     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
28665 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
28666 if test ${gl_cv_func_iswxdigit_works+y}
28667 then :
28668   printf %s "(cached) " >&6
28669 else $as_nop
28670
28671                      case "$host_os" in
28672          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
28673          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
28674            gl_cv_func_iswxdigit_works="guessing no" ;;
28675          # Guess yes otherwise.
28676          *) gl_cv_func_iswxdigit_works="guessing yes" ;;
28677        esac
28678        if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
28679          if test "$cross_compiling" = yes
28680 then :
28681   :
28682 else $as_nop
28683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28684 /* end confdefs.h.  */
28685
28686 #include <locale.h>
28687 #include <stdlib.h>
28688 #include <string.h>
28689 #include <wchar.h>
28690 #include <wctype.h>
28691
28692 /* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
28693 static int
28694 for_character (const char *s, size_t n)
28695 {
28696   mbstate_t state;
28697   wchar_t wc;
28698   size_t ret;
28699
28700   memset (&state, '\0', sizeof (mbstate_t));
28701   wc = (wchar_t) 0xBADFACE;
28702   ret = mbrtowc (&wc, s, n, &state);
28703   if (ret != n)
28704     abort ();
28705
28706   return iswxdigit (wc);
28707 }
28708
28709 int
28710 main (int argc, char *argv[])
28711 {
28712   int is;
28713   int result = 0;
28714
28715   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28716     {
28717       /* This fails on NetBSD 8.0.  */
28718       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
28719       is = for_character ("\243\301", 2);
28720       if (!(is == 0))
28721         result |= 1;
28722     }
28723   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28724     {
28725       /* This fails on FreeBSD 13.0.  */
28726       /* U+0663 ARABIC-INDIC DIGIT THREE */
28727       is = for_character ("\331\243", 2);
28728       if (!(is == 0))
28729         result |= 2;
28730       /* This fails on MSVC 14.  */
28731       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
28732       is = for_character ("\357\274\241", 3);
28733       if (!(is == 0))
28734         result |= 4;
28735     }
28736   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28737     {
28738       /* This fails on Solaris 10, Solaris 11.4.  */
28739       /* U+FF11 FULLWIDTH DIGIT ONE */
28740       is = for_character ("\243\261", 2);
28741       if (!(is == 0))
28742         result |= 8;
28743     }
28744   return result;
28745 }
28746 _ACEOF
28747 if ac_fn_c_try_run "$LINENO"
28748 then :
28749   gl_cv_func_iswxdigit_works=yes
28750 else $as_nop
28751   gl_cv_func_iswxdigit_works=no
28752 fi
28753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28754   conftest.$ac_objext conftest.beam conftest.$ac_ext
28755 fi
28756
28757        fi
28758
28759 fi
28760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
28761 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
28762     case "$gl_cv_func_iswxdigit_works" in
28763       *yes) ;;
28764       *) REPLACE_ISWXDIGIT=1 ;;
28765     esac
28766   fi
28767
28768   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28769     :
28770   else
28771     if test $REPLACE_ISWXDIGIT = 1; then
28772
28773
28774
28775
28776
28777
28778
28779
28780   gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
28781
28782     fi
28783   fi
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793           GL_GNULIB_ISWXDIGIT=1
28794
28795
28796
28797
28798
28799 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
28812 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
28813 if test ${gl_cv_c___inline+y}
28814 then :
28815   printf %s "(cached) " >&6
28816 else $as_nop
28817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28818 /* end confdefs.h.  */
28819 typedef int foo_t;
28820            static __inline foo_t foo (void) { return 0; }
28821 int
28822 main (void)
28823 {
28824 return foo ();
28825   ;
28826   return 0;
28827 }
28828 _ACEOF
28829 if ac_fn_c_try_compile "$LINENO"
28830 then :
28831   gl_cv_c___inline=yes
28832 else $as_nop
28833   gl_cv_c___inline=no
28834 fi
28835 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28836 fi
28837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
28838 printf "%s\n" "$gl_cv_c___inline" >&6; }
28839   if test $gl_cv_c___inline = yes; then
28840
28841 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
28842
28843   fi
28844
28845
28846
28847
28848
28849     LOCALCHARSET_TESTS_ENVIRONMENT=
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861   if test $REPLACE_STRUCT_LCONV = 1; then
28862     REPLACE_LOCALECONV=1
28863   fi
28864
28865   if test $REPLACE_LOCALECONV = 1; then
28866
28867
28868
28869
28870
28871
28872
28873
28874   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
28875
28876
28877   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
28878 "
28879 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
28880 then :
28881
28882 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
28883
28884
28885 fi
28886
28887
28888   fi
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898           GL_GNULIB_LOCALECONV=1
28899
28900
28901
28902
28903
28904 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
28905
28906
28907
28908
28909
28910   if test "$gl_threads_api" = posix; then
28911     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
28912     # pthread_rwlock_* functions.
28913     has_rwlock=false
28914     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28915 "
28916 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
28917 then :
28918   has_rwlock=true
28919
28920 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28921
28922 fi
28923
28924     if $has_rwlock; then
28925
28926
28927      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
28928 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
28929 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
28930 then :
28931   printf %s "(cached) " >&6
28932 else $as_nop
28933   save_LIBS="$LIBS"
28934      LIBS="$LIBS $LIBMULTITHREAD"
28935      if test "$cross_compiling" = yes
28936 then :
28937   case "$host_os" in
28938                          # Guess no on glibc systems.
28939           *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28940                          # Guess no on musl systems.
28941           *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28942                          # Guess no on bionic systems.
28943           *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28944                          # Guess yes on native Windows with the mingw-w64 winpthreads library.
28945                          # Guess no on native Windows with the gnulib windows-rwlock module.
28946           mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
28947                            gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
28948                          else
28949                            gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
28950                          fi
28951                          ;;
28952                          # If we don't know, obey --enable-cross-guesses.
28953           *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
28954          esac
28955
28956 else $as_nop
28957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28958 /* end confdefs.h.  */
28959
28960 #include <errno.h>
28961 #include <pthread.h>
28962 #include <stdlib.h>
28963 #include <unistd.h>
28964
28965 #define SUCCEED() exit (0)
28966 #define FAILURE() exit (1)
28967 #define UNEXPECTED(n) (exit (10 + (n)))
28968
28969 /* The main thread creates the waiting writer and the requesting reader threads
28970    in the default way; this guarantees that they have the same priority.
28971    We can reuse the main thread as first reader thread.  */
28972
28973 static pthread_rwlock_t lock;
28974 static pthread_t reader1;
28975 static pthread_t writer;
28976 static pthread_t reader2;
28977 static pthread_t timer;
28978 /* Used to pass control from writer to reader2 and from reader2 to timer,
28979    as in a relay race.
28980    Passing control from one running thread to another running thread
28981    is most likely faster than to create the second thread.  */
28982 static pthread_mutex_t baton;
28983
28984 static void *
28985 timer_func (void *ignored)
28986 {
28987   /* Step 13 (can be before or after step 12):
28988      The timer thread takes the baton, then waits a moment to make sure
28989      it can tell whether the second reader thread is blocked at step 12.  */
28990   if (pthread_mutex_lock (&baton))
28991     UNEXPECTED (13);
28992   usleep (100000);
28993   /* By the time we get here, it's clear that the second reader thread is
28994      blocked at step 12.  This is the desired behaviour.  */
28995   SUCCEED ();
28996 }
28997
28998 static void *
28999 reader2_func (void *ignored)
29000 {
29001   int err;
29002
29003   /* Step 8 (can be before or after step 7):
29004      The second reader thread takes the baton, then waits a moment to make sure
29005      the writer thread has reached step 7.  */
29006   if (pthread_mutex_lock (&baton))
29007     UNEXPECTED (8);
29008   usleep (100000);
29009   /* Step 9: The second reader thread requests the lock.  */
29010   err = pthread_rwlock_tryrdlock (&lock);
29011   if (err == 0)
29012     FAILURE ();
29013   else if (err != EBUSY)
29014     UNEXPECTED (9);
29015   /* Step 10: Launch a timer, to test whether the next call blocks.  */
29016   if (pthread_create (&timer, NULL, timer_func, NULL))
29017     UNEXPECTED (10);
29018   /* Step 11: Release the baton.  */
29019   if (pthread_mutex_unlock (&baton))
29020     UNEXPECTED (11);
29021   /* Step 12: The second reader thread requests the lock.  */
29022   err = pthread_rwlock_rdlock (&lock);
29023   if (err == 0)
29024     FAILURE ();
29025   else
29026     UNEXPECTED (12);
29027 }
29028
29029 static void *
29030 writer_func (void *ignored)
29031 {
29032   /* Step 4: Take the baton, so that the second reader thread does not go ahead
29033      too early.  */
29034   if (pthread_mutex_lock (&baton))
29035     UNEXPECTED (4);
29036   /* Step 5: Create the second reader thread.  */
29037   if (pthread_create (&reader2, NULL, reader2_func, NULL))
29038     UNEXPECTED (5);
29039   /* Step 6: Release the baton.  */
29040   if (pthread_mutex_unlock (&baton))
29041     UNEXPECTED (6);
29042   /* Step 7: The writer thread requests the lock.  */
29043   if (pthread_rwlock_wrlock (&lock))
29044     UNEXPECTED (7);
29045   return NULL;
29046 }
29047
29048 int
29049 main ()
29050 {
29051   reader1 = pthread_self ();
29052
29053   /* Step 1: The main thread initializes the lock and the baton.  */
29054   if (pthread_rwlock_init (&lock, NULL))
29055     UNEXPECTED (1);
29056   if (pthread_mutex_init (&baton, NULL))
29057     UNEXPECTED (1);
29058   /* Step 2: The main thread acquires the lock as a reader.  */
29059   if (pthread_rwlock_rdlock (&lock))
29060     UNEXPECTED (2);
29061   /* Step 3: Create the writer thread.  */
29062   if (pthread_create (&writer, NULL, writer_func, NULL))
29063     UNEXPECTED (3);
29064   /* Job done.  Go to sleep.  */
29065   for (;;)
29066     {
29067       sleep (1);
29068     }
29069 }
29070
29071 _ACEOF
29072 if ac_fn_c_try_run "$LINENO"
29073 then :
29074   gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
29075 else $as_nop
29076   gl_cv_pthread_rwlock_rdlock_prefer_writer=no
29077 fi
29078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29079   conftest.$ac_objext conftest.beam conftest.$ac_ext
29080 fi
29081
29082      LIBS="$save_LIBS"
29083
29084 fi
29085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
29086 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
29087   case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
29088     *yes)
29089
29090 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
29091
29092       ;;
29093   esac
29094
29095     fi
29096     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
29097     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29098 /* end confdefs.h.  */
29099
29100       #include <pthread.h>
29101 int
29102 main (void)
29103 {
29104
29105 #if __FreeBSD__ == 4
29106 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
29107 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
29108        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
29109 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
29110 #else
29111 int x = (int)PTHREAD_MUTEX_RECURSIVE;
29112 return !x;
29113 #endif
29114
29115   ;
29116   return 0;
29117 }
29118 _ACEOF
29119 if ac_fn_c_try_compile "$LINENO"
29120 then :
29121
29122 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
29123
29124 fi
29125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29126   fi
29127   :
29128
29129
29130
29131 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
29132
29133
29134
29135
29136
29137
29138   if test $ac_cv_func_lstat = yes; then
29139
29140     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
29141       solaris* | *no)
29142         REPLACE_LSTAT=1
29143         ;;
29144     esac
29145   else
29146     HAVE_LSTAT=0
29147   fi
29148
29149   if test $REPLACE_LSTAT = 1; then
29150
29151
29152
29153
29154
29155
29156
29157
29158   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
29159
29160     :
29161   fi
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171           GL_GNULIB_LSTAT=1
29172
29173
29174
29175
29176
29177 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187   if test $REPLACE_MALLOC = 0; then
29188
29189     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
29190 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
29191 if test ${ac_cv_func_malloc_0_nonnull+y}
29192 then :
29193   printf %s "(cached) " >&6
29194 else $as_nop
29195   if test "$cross_compiling" = yes
29196 then :
29197   case "$host_os" in
29198           # Guess yes on platforms where we know the result.
29199           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
29200           | gnu* | *-musl* | midnightbsd* \
29201           | hpux* | solaris* | cygwin* | mingw* | msys* )
29202             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
29203           # If we don't know, obey --enable-cross-guesses.
29204           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
29205         esac
29206
29207 else $as_nop
29208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29209 /* end confdefs.h.  */
29210 #include <stdlib.h>
29211
29212 int
29213 main (void)
29214 {
29215 void *p = malloc (0);
29216             int result = !p;
29217             free (p);
29218             return result;
29219   ;
29220   return 0;
29221 }
29222
29223 _ACEOF
29224 if ac_fn_c_try_run "$LINENO"
29225 then :
29226   ac_cv_func_malloc_0_nonnull=yes
29227 else $as_nop
29228   ac_cv_func_malloc_0_nonnull=no
29229 fi
29230 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29231   conftest.$ac_objext conftest.beam conftest.$ac_ext
29232 fi
29233
29234
29235 fi
29236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
29237 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
29238   case $ac_cv_func_malloc_0_nonnull in #(
29239   *yes) :
29240      ;; #(
29241   *) :
29242     REPLACE_MALLOC=1 ;;
29243 esac
29244
29245   fi
29246
29247   if test $REPLACE_MALLOC = 1; then
29248
29249
29250
29251
29252
29253
29254
29255
29256   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29257
29258   fi
29259
29260   if test $REPLACE_MALLOC = 1; then
29261
29262
29263
29264
29265
29266
29267
29268
29269   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29270
29271   fi
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281           GL_GNULIB_MALLOC_POSIX=1
29282
29283
29284
29285
29286
29287 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299   :
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314         if case "$host_os" in
29315        mingw*) true ;;
29316        *) test $ac_cv_func_mbsinit = yes ;;
29317      esac \
29318     && test $ac_cv_func_mbrtowc = yes; then
29319
29320
29321
29322
29323      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29324 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
29325 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
29326 then :
29327   printf %s "(cached) " >&6
29328 else $as_nop
29329
29330                   case "$host_os" in
29331                      # Guess no on AIX and OSF/1.
29332         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29333                      # Guess yes otherwise.
29334         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29335       esac
29336       if test $LOCALE_JA != none; then
29337         if test "$cross_compiling" = yes
29338 then :
29339   :
29340 else $as_nop
29341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29342 /* end confdefs.h.  */
29343
29344 #include <locale.h>
29345 #include <string.h>
29346 #include <wchar.h>
29347 int main ()
29348 {
29349   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29350     {
29351       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29352       mbstate_t state;
29353       wchar_t wc;
29354
29355       memset (&state, '\0', sizeof (mbstate_t));
29356       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29357         if (mbsinit (&state))
29358           return 2;
29359     }
29360   return 0;
29361 }
29362 _ACEOF
29363 if ac_fn_c_try_run "$LINENO"
29364 then :
29365   gl_cv_func_mbrtowc_incomplete_state=yes
29366 else $as_nop
29367   gl_cv_func_mbrtowc_incomplete_state=no
29368 fi
29369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29370   conftest.$ac_objext conftest.beam conftest.$ac_ext
29371 fi
29372
29373       else
29374         if test $LOCALE_FR_UTF8 != none; then
29375           if test "$cross_compiling" = yes
29376 then :
29377   :
29378 else $as_nop
29379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29380 /* end confdefs.h.  */
29381
29382 #include <locale.h>
29383 #include <string.h>
29384 #include <wchar.h>
29385 int main ()
29386 {
29387   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29388     {
29389       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29390       mbstate_t state;
29391       wchar_t wc;
29392
29393       memset (&state, '\0', sizeof (mbstate_t));
29394       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29395         if (mbsinit (&state))
29396           return 2;
29397     }
29398   return 0;
29399 }
29400 _ACEOF
29401 if ac_fn_c_try_run "$LINENO"
29402 then :
29403   gl_cv_func_mbrtowc_incomplete_state=yes
29404 else $as_nop
29405   gl_cv_func_mbrtowc_incomplete_state=no
29406 fi
29407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29408   conftest.$ac_objext conftest.beam conftest.$ac_ext
29409 fi
29410
29411         fi
29412       fi
29413
29414 fi
29415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29416 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29417
29418
29419
29420
29421      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29422 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
29423 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
29424 then :
29425   printf %s "(cached) " >&6
29426 else $as_nop
29427
29428                   case "$host_os" in
29429                     # Guess no on Solaris 8.
29430         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29431                     # Guess yes otherwise.
29432         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29433       esac
29434       if test $LOCALE_ZH_CN != none; then
29435         if test "$cross_compiling" = yes
29436 then :
29437   :
29438 else $as_nop
29439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29440 /* end confdefs.h.  */
29441
29442 #include <locale.h>
29443 #include <stdlib.h>
29444 #include <string.h>
29445 #include <wchar.h>
29446 int main ()
29447 {
29448   /* This fails on Solaris 8:
29449      mbrtowc returns 2, and sets wc to 0x00F0.
29450      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29451   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29452     {
29453       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29454       mbstate_t state;
29455       wchar_t wc;
29456
29457       memset (&state, '\0', sizeof (mbstate_t));
29458       if (mbrtowc (&wc, input + 3, 6, &state) != 4
29459           && mbtowc (&wc, input + 3, 6) == 4)
29460         return 2;
29461     }
29462   return 0;
29463 }
29464 _ACEOF
29465 if ac_fn_c_try_run "$LINENO"
29466 then :
29467   gl_cv_func_mbrtowc_sanitycheck=yes
29468 else $as_nop
29469   gl_cv_func_mbrtowc_sanitycheck=no
29470 fi
29471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29472   conftest.$ac_objext conftest.beam conftest.$ac_ext
29473 fi
29474
29475       fi
29476
29477 fi
29478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29479 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29480
29481     REPLACE_MBSTATE_T=0
29482     case "$gl_cv_func_mbrtowc_incomplete_state" in
29483       *yes) ;;
29484       *) REPLACE_MBSTATE_T=1 ;;
29485     esac
29486     case "$gl_cv_func_mbrtowc_sanitycheck" in
29487       *yes) ;;
29488       *) REPLACE_MBSTATE_T=1 ;;
29489     esac
29490   else
29491     REPLACE_MBSTATE_T=1
29492   fi
29493
29494
29495
29496   if test $ac_cv_func_mbrtowc = no; then
29497     HAVE_MBRTOWC=0
29498     ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
29499       #include <wchar.h>
29500
29501 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29502 if test "x$ac_cv_have_decl_mbrtowc" = xyes
29503 then :
29504   ac_have_decl=1
29505 else $as_nop
29506   ac_have_decl=0
29507 fi
29508 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
29509
29510     if test $ac_cv_have_decl_mbrtowc = yes; then
29511                         REPLACE_MBRTOWC=1
29512     fi
29513   else
29514     if test $REPLACE_MBSTATE_T = 1; then
29515       REPLACE_MBRTOWC=1
29516     else
29517
29518
29519
29520      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
29521 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
29522 if test ${gl_cv_func_mbrtowc_null_arg1+y}
29523 then :
29524   printf %s "(cached) " >&6
29525 else $as_nop
29526
29527                   case "$host_os" in
29528                   # Guess no on Solaris.
29529         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
29530                   # Guess yes otherwise.
29531         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
29532       esac
29533       if test $LOCALE_FR_UTF8 != none; then
29534         if test "$cross_compiling" = yes
29535 then :
29536   :
29537 else $as_nop
29538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29539 /* end confdefs.h.  */
29540
29541 #include <locale.h>
29542 #include <stdlib.h>
29543 #include <string.h>
29544 #include <wchar.h>
29545 int main ()
29546 {
29547   int result = 0;
29548
29549   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29550     {
29551       char input[] = "\303\237er";
29552       mbstate_t state;
29553       wchar_t wc;
29554       size_t ret;
29555
29556       memset (&state, '\0', sizeof (mbstate_t));
29557       wc = (wchar_t) 0xBADFACE;
29558       ret = mbrtowc (&wc, input, 5, &state);
29559       if (ret != 2)
29560         result |= 1;
29561       if (!mbsinit (&state))
29562         result |= 2;
29563
29564       memset (&state, '\0', sizeof (mbstate_t));
29565       ret = mbrtowc (NULL, input, 5, &state);
29566       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
29567         result |= 4;
29568       if (!mbsinit (&state))
29569         result |= 8;
29570     }
29571   return result;
29572 }
29573 _ACEOF
29574 if ac_fn_c_try_run "$LINENO"
29575 then :
29576   gl_cv_func_mbrtowc_null_arg1=yes
29577 else $as_nop
29578   gl_cv_func_mbrtowc_null_arg1=no
29579 fi
29580 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29581   conftest.$ac_objext conftest.beam conftest.$ac_ext
29582 fi
29583
29584       fi
29585
29586 fi
29587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
29588 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
29589
29590
29591
29592
29593      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
29594 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
29595 if test ${gl_cv_func_mbrtowc_null_arg2+y}
29596 then :
29597   printf %s "(cached) " >&6
29598 else $as_nop
29599
29600                   case "$host_os" in
29601               # Guess no on OSF/1.
29602         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
29603               # Guess yes otherwise.
29604         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
29605       esac
29606       if test $LOCALE_FR_UTF8 != none; then
29607         if test "$cross_compiling" = yes
29608 then :
29609   :
29610 else $as_nop
29611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29612 /* end confdefs.h.  */
29613
29614 #include <locale.h>
29615 #include <string.h>
29616 #include <wchar.h>
29617 int main ()
29618 {
29619   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29620     {
29621       mbstate_t state;
29622       wchar_t wc;
29623       int ret;
29624
29625       memset (&state, '\0', sizeof (mbstate_t));
29626       wc = (wchar_t) 0xBADFACE;
29627       mbrtowc (&wc, NULL, 5, &state);
29628       /* Check that wc was not modified.  */
29629       if (wc != (wchar_t) 0xBADFACE)
29630         return 2;
29631     }
29632   return 0;
29633 }
29634 _ACEOF
29635 if ac_fn_c_try_run "$LINENO"
29636 then :
29637   gl_cv_func_mbrtowc_null_arg2=yes
29638 else $as_nop
29639   gl_cv_func_mbrtowc_null_arg2=no
29640 fi
29641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29642   conftest.$ac_objext conftest.beam conftest.$ac_ext
29643 fi
29644
29645       fi
29646
29647 fi
29648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
29649 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
29650
29651
29652
29653
29654
29655
29656   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
29657 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
29658 if test ${gl_cv_func_mbrtowc_retval+y}
29659 then :
29660   printf %s "(cached) " >&6
29661 else $as_nop
29662
29663                   case "$host_os" in
29664                                    # Guess no on HP-UX, Solaris, native Windows.
29665         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
29666                                    # Guess yes otherwise.
29667         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
29668       esac
29669       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
29670          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
29671         if test "$cross_compiling" = yes
29672 then :
29673   :
29674 else $as_nop
29675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29676 /* end confdefs.h.  */
29677
29678 #include <locale.h>
29679 #include <string.h>
29680 #include <wchar.h>
29681 int main ()
29682 {
29683   int result = 0;
29684   int found_some_locale = 0;
29685   /* This fails on Solaris.  */
29686   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29687     {
29688       char input[] = "B\303\274\303\237er"; /* "Büßer" */
29689       mbstate_t state;
29690       wchar_t wc;
29691
29692       memset (&state, '\0', sizeof (mbstate_t));
29693       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29694         {
29695           input[1] = '\0';
29696           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
29697             result |= 1;
29698         }
29699       found_some_locale = 1;
29700     }
29701   /* This fails on HP-UX 11.11.  */
29702   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29703     {
29704       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29705       mbstate_t state;
29706       wchar_t wc;
29707
29708       memset (&state, '\0', sizeof (mbstate_t));
29709       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29710         {
29711           input[1] = '\0';
29712           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
29713             result |= 2;
29714         }
29715       found_some_locale = 1;
29716     }
29717   /* This fails on native Windows.  */
29718   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29719     {
29720       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
29721       mbstate_t state;
29722       wchar_t wc;
29723
29724       memset (&state, '\0', sizeof (mbstate_t));
29725       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29726         {
29727           input[3] = '\0';
29728           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29729             result |= 4;
29730         }
29731       found_some_locale = 1;
29732     }
29733   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29734     {
29735       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
29736       mbstate_t state;
29737       wchar_t wc;
29738
29739       memset (&state, '\0', sizeof (mbstate_t));
29740       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29741         {
29742           input[3] = '\0';
29743           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29744             result |= 8;
29745         }
29746       found_some_locale = 1;
29747     }
29748   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29749     {
29750       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
29751       mbstate_t state;
29752       wchar_t wc;
29753
29754       memset (&state, '\0', sizeof (mbstate_t));
29755       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29756         {
29757           input[3] = '\0';
29758           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29759             result |= 16;
29760         }
29761       found_some_locale = 1;
29762     }
29763   return (found_some_locale ? result : 77);
29764 }
29765 _ACEOF
29766 if ac_fn_c_try_run "$LINENO"
29767 then :
29768   gl_cv_func_mbrtowc_retval=yes
29769 else $as_nop
29770   if test $? != 77; then
29771              gl_cv_func_mbrtowc_retval=no
29772            fi
29773
29774 fi
29775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29776   conftest.$ac_objext conftest.beam conftest.$ac_ext
29777 fi
29778
29779       fi
29780
29781 fi
29782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
29783 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
29784
29785
29786
29787
29788      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
29789 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
29790 if test ${gl_cv_func_mbrtowc_nul_retval+y}
29791 then :
29792   printf %s "(cached) " >&6
29793 else $as_nop
29794
29795                   case "$host_os" in
29796                        # Guess no on Solaris 8 and 9.
29797         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
29798                        # Guess yes otherwise.
29799         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
29800       esac
29801       if test $LOCALE_ZH_CN != none; then
29802         if test "$cross_compiling" = yes
29803 then :
29804   :
29805 else $as_nop
29806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29807 /* end confdefs.h.  */
29808
29809 #include <locale.h>
29810 #include <string.h>
29811 #include <wchar.h>
29812 int main ()
29813 {
29814   /* This fails on Solaris 8 and 9.  */
29815   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29816     {
29817       mbstate_t state;
29818       wchar_t wc;
29819
29820       memset (&state, '\0', sizeof (mbstate_t));
29821       if (mbrtowc (&wc, "", 1, &state) != 0)
29822         return 2;
29823     }
29824   return 0;
29825 }
29826 _ACEOF
29827 if ac_fn_c_try_run "$LINENO"
29828 then :
29829   gl_cv_func_mbrtowc_nul_retval=yes
29830 else $as_nop
29831   gl_cv_func_mbrtowc_nul_retval=no
29832 fi
29833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29834   conftest.$ac_objext conftest.beam conftest.$ac_ext
29835 fi
29836
29837       fi
29838
29839 fi
29840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
29841 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
29842
29843
29844
29845      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
29846 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
29847 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
29848 then :
29849   printf %s "(cached) " >&6
29850 else $as_nop
29851
29852                case "$host_os" in
29853                # Guess yes on native Windows.
29854        mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
29855        *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
29856      esac
29857      case "$host_os" in
29858        mingw*)
29859          if test "$cross_compiling" = yes
29860 then :
29861   :
29862 else $as_nop
29863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29864 /* end confdefs.h.  */
29865
29866 #include <locale.h>
29867 #include <string.h>
29868 #include <wchar.h>
29869 int main ()
29870 {
29871   int result = 0;
29872   if (setlocale (LC_ALL, "French_France.65001") != NULL)
29873     {
29874       wchar_t wc = (wchar_t) 0xBADFACE;
29875       mbstate_t state;
29876
29877       memset (&state, '\0', sizeof (mbstate_t));
29878       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
29879           && wc != (wchar_t) 0xBADFACE)
29880         result |= 1;
29881     }
29882   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29883     {
29884       wchar_t wc = (wchar_t) 0xBADFACE;
29885       mbstate_t state;
29886
29887       memset (&state, '\0', sizeof (mbstate_t));
29888       if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
29889           && wc != (wchar_t) 0xBADFACE)
29890         result |= 2;
29891     }
29892   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29893     {
29894       wchar_t wc = (wchar_t) 0xBADFACE;
29895       mbstate_t state;
29896
29897       memset (&state, '\0', sizeof (mbstate_t));
29898       if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
29899           && wc != (wchar_t) 0xBADFACE)
29900         result |= 4;
29901     }
29902   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29903     {
29904       wchar_t wc = (wchar_t) 0xBADFACE;
29905       mbstate_t state;
29906
29907       memset (&state, '\0', sizeof (mbstate_t));
29908       if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
29909           && wc != (wchar_t) 0xBADFACE)
29910         result |= 8;
29911     }
29912   return result;
29913 }
29914 _ACEOF
29915 if ac_fn_c_try_run "$LINENO"
29916 then :
29917   gl_cv_func_mbrtowc_stores_incomplete=no
29918 else $as_nop
29919   gl_cv_func_mbrtowc_stores_incomplete=yes
29920 fi
29921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29922   conftest.$ac_objext conftest.beam conftest.$ac_ext
29923 fi
29924
29925          ;;
29926        *)
29927
29928          if test $LOCALE_FR_UTF8 != none; then
29929            if test "$cross_compiling" = yes
29930 then :
29931   :
29932 else $as_nop
29933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29934 /* end confdefs.h.  */
29935
29936 #include <locale.h>
29937 #include <string.h>
29938 #include <wchar.h>
29939 int main ()
29940 {
29941   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29942     {
29943       wchar_t wc = (wchar_t) 0xBADFACE;
29944       mbstate_t state;
29945
29946       memset (&state, '\0', sizeof (mbstate_t));
29947       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
29948           && wc != (wchar_t) 0xBADFACE)
29949         return 1;
29950     }
29951   return 0;
29952 }
29953 _ACEOF
29954 if ac_fn_c_try_run "$LINENO"
29955 then :
29956   gl_cv_func_mbrtowc_stores_incomplete=no
29957 else $as_nop
29958   gl_cv_func_mbrtowc_stores_incomplete=yes
29959 fi
29960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29961   conftest.$ac_objext conftest.beam conftest.$ac_ext
29962 fi
29963
29964          fi
29965          ;;
29966      esac
29967
29968 fi
29969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
29970 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
29971
29972
29973
29974      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
29975 printf %s "checking whether mbrtowc works on empty input... " >&6; }
29976 if test ${gl_cv_func_mbrtowc_empty_input+y}
29977 then :
29978   printf %s "(cached) " >&6
29979 else $as_nop
29980
29981                   case "$host_os" in
29982                               # Guess no on AIX and glibc systems.
29983         aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
29984                               # Guess yes on native Windows.
29985         mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29986         *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29987       esac
29988       if test "$cross_compiling" = yes
29989 then :
29990   :
29991 else $as_nop
29992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29993 /* end confdefs.h.  */
29994
29995            #include <wchar.h>
29996            static wchar_t wc;
29997            static mbstate_t mbs;
29998            int
29999            main (void)
30000            {
30001              return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
30002            }
30003 _ACEOF
30004 if ac_fn_c_try_run "$LINENO"
30005 then :
30006   gl_cv_func_mbrtowc_empty_input=yes
30007 else $as_nop
30008   gl_cv_func_mbrtowc_empty_input=no
30009 fi
30010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30011   conftest.$ac_objext conftest.beam conftest.$ac_ext
30012 fi
30013
30014
30015 fi
30016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
30017 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
30018
30019
30020      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
30021 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
30022 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
30023 then :
30024   printf %s "(cached) " >&6
30025 else $as_nop
30026
30027                gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
30028
30029      if test "$cross_compiling" = yes
30030 then :
30031   case "$host_os" in
30032                  # Guess yes on native Windows.
30033          mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
30034        esac
30035
30036 else $as_nop
30037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30038 /* end confdefs.h.  */
30039 #include <limits.h>
30040             #include <locale.h>
30041             #include <wchar.h>
30042
30043 int
30044 main (void)
30045 {
30046
30047             int i;
30048             char *locale = setlocale (LC_ALL, "C");
30049             if (! locale)
30050               return 2;
30051             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
30052               {
30053                 char c = i;
30054                 wchar_t wc;
30055                 mbstate_t mbs = { 0, };
30056                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
30057                 if (1 < ss)
30058                   return 3;
30059               }
30060             return 0;
30061
30062   ;
30063   return 0;
30064 }
30065 _ACEOF
30066 if ac_fn_c_try_run "$LINENO"
30067 then :
30068   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
30069 else $as_nop
30070   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
30071 fi
30072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30073   conftest.$ac_objext conftest.beam conftest.$ac_ext
30074 fi
30075
30076
30077 fi
30078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
30079 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
30080
30081       case "$gl_cv_func_mbrtowc_null_arg1" in
30082         *yes) ;;
30083         *)
30084 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
30085
30086            REPLACE_MBRTOWC=1
30087            ;;
30088       esac
30089       case "$gl_cv_func_mbrtowc_null_arg2" in
30090         *yes) ;;
30091         *)
30092 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
30093
30094            REPLACE_MBRTOWC=1
30095            ;;
30096       esac
30097       case "$gl_cv_func_mbrtowc_retval" in
30098         *yes) ;;
30099         *)
30100 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
30101
30102            REPLACE_MBRTOWC=1
30103            ;;
30104       esac
30105       case "$gl_cv_func_mbrtowc_nul_retval" in
30106         *yes) ;;
30107         *)
30108 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
30109
30110            REPLACE_MBRTOWC=1
30111            ;;
30112       esac
30113       case "$gl_cv_func_mbrtowc_stores_incomplete" in
30114         *no) ;;
30115         *)
30116 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
30117
30118            REPLACE_MBRTOWC=1
30119            ;;
30120       esac
30121       case "$gl_cv_func_mbrtowc_empty_input" in
30122         *yes) ;;
30123         *)
30124 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
30125
30126            REPLACE_MBRTOWC=1
30127            ;;
30128       esac
30129       case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
30130         *yes) ;;
30131         *)
30132 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
30133
30134            REPLACE_MBRTOWC=1
30135            ;;
30136       esac
30137     fi
30138   fi
30139   if test $REPLACE_MBSTATE_T = 1; then
30140     case "$host_os" in
30141       mingw*) LIB_MBRTOWC= ;;
30142       *)
30143
30144
30145   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
30146 printf %s "checking whether imported symbols can be declared weak... " >&6; }
30147 if test ${gl_cv_have_weak+y}
30148 then :
30149   printf %s "(cached) " >&6
30150 else $as_nop
30151   gl_cv_have_weak=no
30152           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30153 /* end confdefs.h.  */
30154 extern void xyzzy ();
30155 #pragma weak xyzzy
30156 int
30157 main (void)
30158 {
30159 xyzzy();
30160   ;
30161   return 0;
30162 }
30163 _ACEOF
30164 if ac_fn_c_try_link "$LINENO"
30165 then :
30166   gl_cv_have_weak=maybe
30167 fi
30168 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30169     conftest$ac_exeext conftest.$ac_ext
30170      if test $gl_cv_have_weak = maybe; then
30171                      if test "$cross_compiling" = yes
30172 then :
30173                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30174 /* end confdefs.h.  */
30175 #ifdef __ELF__
30176              Extensible Linking Format
30177              #endif
30178
30179 _ACEOF
30180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30181   $EGREP "Extensible Linking Format" >/dev/null 2>&1
30182 then :
30183   gl_cv_have_weak="guessing yes"
30184 else $as_nop
30185   gl_cv_have_weak="guessing no"
30186 fi
30187 rm -rf conftest*
30188
30189
30190 else $as_nop
30191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30192 /* end confdefs.h.  */
30193
30194 #include <stdio.h>
30195 #pragma weak fputs
30196 int main ()
30197 {
30198   return (fputs == NULL);
30199 }
30200 _ACEOF
30201 if ac_fn_c_try_run "$LINENO"
30202 then :
30203   gl_cv_have_weak=yes
30204 else $as_nop
30205   gl_cv_have_weak=no
30206 fi
30207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30208   conftest.$ac_objext conftest.beam conftest.$ac_ext
30209 fi
30210
30211      fi
30212           case " $LDFLAGS " in
30213        *" -static "*) gl_cv_have_weak=no ;;
30214      esac
30215                     case "$gl_cv_have_weak" in
30216        *yes)
30217          case "$host_os" in
30218            freebsd* | dragonfly* | midnightbsd*)
30219              : > conftest1.c
30220              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
30221              cat <<EOF > conftest2.c
30222 #include <pthread.h>
30223 #pragma weak pthread_mutexattr_gettype
30224 int main ()
30225 {
30226   return (pthread_mutexattr_gettype != NULL);
30227 }
30228 EOF
30229              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
30230                || gl_cv_have_weak=no
30231              rm -f conftest1.c libempty.so conftest2.c conftest
30232              ;;
30233          esac
30234          ;;
30235      esac
30236
30237 fi
30238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
30239 printf "%s\n" "$gl_cv_have_weak" >&6; }
30240   case "$gl_cv_have_weak" in
30241     *yes)
30242
30243 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
30244
30245       ;;
30246   esac
30247
30248         case "$gl_cv_have_weak" in
30249           *yes) LIB_MBRTOWC= ;;
30250           *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
30251         esac
30252         ;;
30253     esac
30254   else
30255     LIB_MBRTOWC=
30256   fi
30257
30258
30259   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
30260
30261
30262
30263
30264
30265
30266
30267
30268   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
30269
30270     if test $REPLACE_MBSTATE_T = 1; then
30271
30272
30273
30274
30275
30276
30277
30278
30279   gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289   gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
30290
30291
30292
30293
30294   CFLAG_VISIBILITY=
30295   HAVE_VISIBILITY=0
30296   if test -n "$GCC"; then
30297                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
30298 printf %s "checking whether the -Werror option is usable... " >&6; }
30299 if test ${gl_cv_cc_vis_werror+y}
30300 then :
30301   printf %s "(cached) " >&6
30302 else $as_nop
30303   gl_save_CFLAGS="$CFLAGS"
30304        CFLAGS="$CFLAGS -Werror"
30305        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30306 /* end confdefs.h.  */
30307
30308 int
30309 main (void)
30310 {
30311
30312   ;
30313   return 0;
30314 }
30315 _ACEOF
30316 if ac_fn_c_try_compile "$LINENO"
30317 then :
30318   gl_cv_cc_vis_werror=yes
30319 else $as_nop
30320   gl_cv_cc_vis_werror=no
30321 fi
30322 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30323        CFLAGS="$gl_save_CFLAGS"
30324
30325 fi
30326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
30327 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
30328         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
30329 printf %s "checking for simple visibility declarations... " >&6; }
30330 if test ${gl_cv_cc_visibility+y}
30331 then :
30332   printf %s "(cached) " >&6
30333 else $as_nop
30334   gl_save_CFLAGS="$CFLAGS"
30335        CFLAGS="$CFLAGS -fvisibility=hidden"
30336                                           if test $gl_cv_cc_vis_werror = yes; then
30337          CFLAGS="$CFLAGS -Werror"
30338        fi
30339        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30340 /* end confdefs.h.  */
30341 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
30342               extern __attribute__((__visibility__("default"))) int exportedvar;
30343               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
30344               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
30345               void dummyfunc (void);
30346               int hiddenvar;
30347               int exportedvar;
30348               int hiddenfunc (void) { return 51; }
30349               int exportedfunc (void) { return 1225736919; }
30350               void dummyfunc (void) {}
30351
30352 int
30353 main (void)
30354 {
30355
30356   ;
30357   return 0;
30358 }
30359 _ACEOF
30360 if ac_fn_c_try_compile "$LINENO"
30361 then :
30362   gl_cv_cc_visibility=yes
30363 else $as_nop
30364   gl_cv_cc_visibility=no
30365 fi
30366 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30367        CFLAGS="$gl_save_CFLAGS"
30368
30369 fi
30370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
30371 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
30372     if test $gl_cv_cc_visibility = yes; then
30373       CFLAG_VISIBILITY="-fvisibility=hidden"
30374       HAVE_VISIBILITY=1
30375     fi
30376   fi
30377
30378
30379
30380 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
30381
30382
30383
30384     fi
30385
30386
30387   :
30388
30389   fi
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399           GL_GNULIB_MBRTOWC=1
30400
30401
30402
30403
30404
30405 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418           GL_GNULIB_MBSCASECMP=1
30419
30420
30421
30422
30423
30424 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440         if case "$host_os" in
30441        mingw*) true ;;
30442        *) test $ac_cv_func_mbsinit = yes ;;
30443      esac \
30444     && test $ac_cv_func_mbrtowc = yes; then
30445
30446
30447
30448
30449      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30450 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
30451 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
30452 then :
30453   printf %s "(cached) " >&6
30454 else $as_nop
30455
30456                   case "$host_os" in
30457                      # Guess no on AIX and OSF/1.
30458         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30459                      # Guess yes otherwise.
30460         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30461       esac
30462       if test $LOCALE_JA != none; then
30463         if test "$cross_compiling" = yes
30464 then :
30465   :
30466 else $as_nop
30467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30468 /* end confdefs.h.  */
30469
30470 #include <locale.h>
30471 #include <string.h>
30472 #include <wchar.h>
30473 int main ()
30474 {
30475   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30476     {
30477       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30478       mbstate_t state;
30479       wchar_t wc;
30480
30481       memset (&state, '\0', sizeof (mbstate_t));
30482       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30483         if (mbsinit (&state))
30484           return 2;
30485     }
30486   return 0;
30487 }
30488 _ACEOF
30489 if ac_fn_c_try_run "$LINENO"
30490 then :
30491   gl_cv_func_mbrtowc_incomplete_state=yes
30492 else $as_nop
30493   gl_cv_func_mbrtowc_incomplete_state=no
30494 fi
30495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30496   conftest.$ac_objext conftest.beam conftest.$ac_ext
30497 fi
30498
30499       else
30500         if test $LOCALE_FR_UTF8 != none; then
30501           if test "$cross_compiling" = yes
30502 then :
30503   :
30504 else $as_nop
30505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506 /* end confdefs.h.  */
30507
30508 #include <locale.h>
30509 #include <string.h>
30510 #include <wchar.h>
30511 int main ()
30512 {
30513   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30514     {
30515       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
30516       mbstate_t state;
30517       wchar_t wc;
30518
30519       memset (&state, '\0', sizeof (mbstate_t));
30520       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30521         if (mbsinit (&state))
30522           return 2;
30523     }
30524   return 0;
30525 }
30526 _ACEOF
30527 if ac_fn_c_try_run "$LINENO"
30528 then :
30529   gl_cv_func_mbrtowc_incomplete_state=yes
30530 else $as_nop
30531   gl_cv_func_mbrtowc_incomplete_state=no
30532 fi
30533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30534   conftest.$ac_objext conftest.beam conftest.$ac_ext
30535 fi
30536
30537         fi
30538       fi
30539
30540 fi
30541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30542 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30543
30544
30545
30546
30547      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30548 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
30549 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
30550 then :
30551   printf %s "(cached) " >&6
30552 else $as_nop
30553
30554                   case "$host_os" in
30555                     # Guess no on Solaris 8.
30556         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30557                     # Guess yes otherwise.
30558         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30559       esac
30560       if test $LOCALE_ZH_CN != none; then
30561         if test "$cross_compiling" = yes
30562 then :
30563   :
30564 else $as_nop
30565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30566 /* end confdefs.h.  */
30567
30568 #include <locale.h>
30569 #include <stdlib.h>
30570 #include <string.h>
30571 #include <wchar.h>
30572 int main ()
30573 {
30574   /* This fails on Solaris 8:
30575      mbrtowc returns 2, and sets wc to 0x00F0.
30576      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
30577   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30578     {
30579       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30580       mbstate_t state;
30581       wchar_t wc;
30582
30583       memset (&state, '\0', sizeof (mbstate_t));
30584       if (mbrtowc (&wc, input + 3, 6, &state) != 4
30585           && mbtowc (&wc, input + 3, 6) == 4)
30586         return 2;
30587     }
30588   return 0;
30589 }
30590 _ACEOF
30591 if ac_fn_c_try_run "$LINENO"
30592 then :
30593   gl_cv_func_mbrtowc_sanitycheck=yes
30594 else $as_nop
30595   gl_cv_func_mbrtowc_sanitycheck=no
30596 fi
30597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30598   conftest.$ac_objext conftest.beam conftest.$ac_ext
30599 fi
30600
30601       fi
30602
30603 fi
30604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30605 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30606
30607     REPLACE_MBSTATE_T=0
30608     case "$gl_cv_func_mbrtowc_incomplete_state" in
30609       *yes) ;;
30610       *) REPLACE_MBSTATE_T=1 ;;
30611     esac
30612     case "$gl_cv_func_mbrtowc_sanitycheck" in
30613       *yes) ;;
30614       *) REPLACE_MBSTATE_T=1 ;;
30615     esac
30616   else
30617     REPLACE_MBSTATE_T=1
30618   fi
30619
30620
30621
30622   if test $ac_cv_func_mbsinit = no; then
30623     HAVE_MBSINIT=0
30624     ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
30625       #include <wchar.h>
30626
30627 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30628 if test "x$ac_cv_have_decl_mbsinit" = xyes
30629 then :
30630   ac_have_decl=1
30631 else $as_nop
30632   ac_have_decl=0
30633 fi
30634 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
30635
30636     if test $ac_cv_have_decl_mbsinit = yes; then
30637                         REPLACE_MBSINIT=1
30638     fi
30639   else
30640     if test $REPLACE_MBSTATE_T = 1; then
30641       REPLACE_MBSINIT=1
30642     else
30643                         case "$host_os" in
30644         mingw*) REPLACE_MBSINIT=1 ;;
30645       esac
30646     fi
30647   fi
30648
30649   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
30650
30651
30652
30653
30654
30655
30656
30657
30658   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
30659
30660
30661   :
30662
30663   fi
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673           GL_GNULIB_MBSINIT=1
30674
30675
30676
30677
30678
30679 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
30680
30681
30682
30683
30684
30685
30686   if test $ac_cv_func_mbslen = yes; then
30687     HAVE_MBSLEN=1
30688   else
30689     HAVE_MBSLEN=0
30690   fi
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701           GL_GNULIB_MBSLEN=1
30702
30703
30704
30705
30706
30707 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722         if case "$host_os" in
30723        mingw*) true ;;
30724        *) test $ac_cv_func_mbsinit = yes ;;
30725      esac \
30726     && test $ac_cv_func_mbrtowc = yes; then
30727
30728
30729
30730
30731      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30732 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
30733 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
30734 then :
30735   printf %s "(cached) " >&6
30736 else $as_nop
30737
30738                   case "$host_os" in
30739                      # Guess no on AIX and OSF/1.
30740         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30741                      # Guess yes otherwise.
30742         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30743       esac
30744       if test $LOCALE_JA != none; then
30745         if test "$cross_compiling" = yes
30746 then :
30747   :
30748 else $as_nop
30749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750 /* end confdefs.h.  */
30751
30752 #include <locale.h>
30753 #include <string.h>
30754 #include <wchar.h>
30755 int main ()
30756 {
30757   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30758     {
30759       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30760       mbstate_t state;
30761       wchar_t wc;
30762
30763       memset (&state, '\0', sizeof (mbstate_t));
30764       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30765         if (mbsinit (&state))
30766           return 2;
30767     }
30768   return 0;
30769 }
30770 _ACEOF
30771 if ac_fn_c_try_run "$LINENO"
30772 then :
30773   gl_cv_func_mbrtowc_incomplete_state=yes
30774 else $as_nop
30775   gl_cv_func_mbrtowc_incomplete_state=no
30776 fi
30777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30778   conftest.$ac_objext conftest.beam conftest.$ac_ext
30779 fi
30780
30781       else
30782         if test $LOCALE_FR_UTF8 != none; then
30783           if test "$cross_compiling" = yes
30784 then :
30785   :
30786 else $as_nop
30787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30788 /* end confdefs.h.  */
30789
30790 #include <locale.h>
30791 #include <string.h>
30792 #include <wchar.h>
30793 int main ()
30794 {
30795   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30796     {
30797       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
30798       mbstate_t state;
30799       wchar_t wc;
30800
30801       memset (&state, '\0', sizeof (mbstate_t));
30802       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30803         if (mbsinit (&state))
30804           return 2;
30805     }
30806   return 0;
30807 }
30808 _ACEOF
30809 if ac_fn_c_try_run "$LINENO"
30810 then :
30811   gl_cv_func_mbrtowc_incomplete_state=yes
30812 else $as_nop
30813   gl_cv_func_mbrtowc_incomplete_state=no
30814 fi
30815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30816   conftest.$ac_objext conftest.beam conftest.$ac_ext
30817 fi
30818
30819         fi
30820       fi
30821
30822 fi
30823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30824 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30825
30826
30827
30828
30829      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30830 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
30831 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
30832 then :
30833   printf %s "(cached) " >&6
30834 else $as_nop
30835
30836                   case "$host_os" in
30837                     # Guess no on Solaris 8.
30838         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30839                     # Guess yes otherwise.
30840         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30841       esac
30842       if test $LOCALE_ZH_CN != none; then
30843         if test "$cross_compiling" = yes
30844 then :
30845   :
30846 else $as_nop
30847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30848 /* end confdefs.h.  */
30849
30850 #include <locale.h>
30851 #include <stdlib.h>
30852 #include <string.h>
30853 #include <wchar.h>
30854 int main ()
30855 {
30856   /* This fails on Solaris 8:
30857      mbrtowc returns 2, and sets wc to 0x00F0.
30858      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
30859   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30860     {
30861       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30862       mbstate_t state;
30863       wchar_t wc;
30864
30865       memset (&state, '\0', sizeof (mbstate_t));
30866       if (mbrtowc (&wc, input + 3, 6, &state) != 4
30867           && mbtowc (&wc, input + 3, 6) == 4)
30868         return 2;
30869     }
30870   return 0;
30871 }
30872 _ACEOF
30873 if ac_fn_c_try_run "$LINENO"
30874 then :
30875   gl_cv_func_mbrtowc_sanitycheck=yes
30876 else $as_nop
30877   gl_cv_func_mbrtowc_sanitycheck=no
30878 fi
30879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30880   conftest.$ac_objext conftest.beam conftest.$ac_ext
30881 fi
30882
30883       fi
30884
30885 fi
30886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30887 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30888
30889     REPLACE_MBSTATE_T=0
30890     case "$gl_cv_func_mbrtowc_incomplete_state" in
30891       *yes) ;;
30892       *) REPLACE_MBSTATE_T=1 ;;
30893     esac
30894     case "$gl_cv_func_mbrtowc_sanitycheck" in
30895       *yes) ;;
30896       *) REPLACE_MBSTATE_T=1 ;;
30897     esac
30898   else
30899     REPLACE_MBSTATE_T=1
30900   fi
30901
30902
30903
30904   if test $ac_cv_func_mbsrtowcs = no; then
30905     HAVE_MBSRTOWCS=0
30906     ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
30907       #include <wchar.h>
30908
30909 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30910 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
30911 then :
30912   ac_have_decl=1
30913 else $as_nop
30914   ac_have_decl=0
30915 fi
30916 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
30917
30918     if test $ac_cv_have_decl_mbsrtowcs = yes; then
30919                         REPLACE_MBSRTOWCS=1
30920     fi
30921   else
30922     if test $REPLACE_MBSTATE_T = 1; then
30923       REPLACE_MBSRTOWCS=1
30924     else
30925
30926
30927
30928
30929
30930
30931      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
30932 printf %s "checking whether mbsrtowcs works... " >&6; }
30933 if test ${gl_cv_func_mbsrtowcs_works+y}
30934 then :
30935   printf %s "(cached) " >&6
30936 else $as_nop
30937
30938                   case "$host_os" in
30939                                    # Guess no on HP-UX, Solaris, mingw.
30940         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
30941                                    # Guess yes otherwise.
30942         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
30943       esac
30944       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
30945         if test "$cross_compiling" = yes
30946 then :
30947   :
30948 else $as_nop
30949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30950 /* end confdefs.h.  */
30951
30952 #include <locale.h>
30953 #include <string.h>
30954 #include <wchar.h>
30955 int main ()
30956 {
30957   int result = 0;
30958   /* Test whether the function supports a NULL destination argument.
30959      This fails on native Windows.  */
30960   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
30961     {
30962       const char input[] = "\337er";
30963       const char *src = input;
30964       mbstate_t state;
30965
30966       memset (&state, '\0', sizeof (mbstate_t));
30967       if (mbsrtowcs (NULL, &src, 1, &state) != 3
30968           || src != input)
30969         result |= 1;
30970     }
30971   /* Test whether the function works when started with a conversion state
30972      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
30973   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30974     {
30975       const char input[] = "B\303\274\303\237er";
30976       mbstate_t state;
30977
30978       memset (&state, '\0', sizeof (mbstate_t));
30979       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30980         if (!mbsinit (&state))
30981           {
30982             const char *src = input + 2;
30983             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30984               result |= 2;
30985           }
30986     }
30987   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30988     {
30989       const char input[] = "<\306\374\313\334\270\354>";
30990       mbstate_t state;
30991
30992       memset (&state, '\0', sizeof (mbstate_t));
30993       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30994         if (!mbsinit (&state))
30995           {
30996             const char *src = input + 4;
30997             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
30998               result |= 4;
30999           }
31000     }
31001   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31002     {
31003       const char input[] = "B\250\271\201\060\211\070er";
31004       mbstate_t state;
31005
31006       memset (&state, '\0', sizeof (mbstate_t));
31007       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
31008         if (!mbsinit (&state))
31009           {
31010             const char *src = input + 2;
31011             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
31012               result |= 8;
31013           }
31014     }
31015   return result;
31016 }
31017 _ACEOF
31018 if ac_fn_c_try_run "$LINENO"
31019 then :
31020   gl_cv_func_mbsrtowcs_works=yes
31021 else $as_nop
31022   gl_cv_func_mbsrtowcs_works=no
31023 fi
31024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31025   conftest.$ac_objext conftest.beam conftest.$ac_ext
31026 fi
31027
31028       fi
31029
31030 fi
31031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
31032 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
31033
31034       case "$gl_cv_func_mbsrtowcs_works" in
31035         *yes) ;;
31036         *) REPLACE_MBSRTOWCS=1 ;;
31037       esac
31038     fi
31039   fi
31040
31041   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
31042
31043
31044
31045
31046
31047
31048
31049
31050   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
31061
31062
31063   :
31064
31065   fi
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075           GL_GNULIB_MBSRTOWCS=1
31076
31077
31078
31079
31080
31081 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094           GL_GNULIB_MBSSTR=1
31095
31096
31097
31098
31099
31100 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
31101
31102
31103
31104
31105
31106
31107   ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
31108 if test "x$ac_cv_func_mbtowc" = xyes
31109 then :
31110   printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
31111
31112 fi
31113
31114   if test $ac_cv_func_mbtowc = no; then
31115     HAVE_MBTOWC=0
31116   else
31117     if false; then
31118       REPLACE_MBTOWC=1
31119     fi
31120   fi
31121
31122   if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
31123
31124
31125
31126
31127
31128
31129
31130
31131   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
31132
31133
31134   :
31135
31136   fi
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146           GL_GNULIB_MBTOWC=1
31147
31148
31149
31150
31151
31152 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
31153
31154
31155
31156
31157
31158   :
31159
31160
31161   if test $REPLACE_MEMCHR = 1; then
31162
31163
31164
31165
31166
31167
31168
31169
31170   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
31171
31172
31173   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
31174 if test "x$ac_cv_header_bp_sym_h" = xyes
31175 then :
31176   printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
31177
31178 fi
31179
31180
31181   fi
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191           GL_GNULIB_MEMCHR=1
31192
31193
31194
31195
31196
31197 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
31208 if test "x$ac_cv_func_mempcpy" = xyes
31209 then :
31210   printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
31211
31212 fi
31213
31214   if test $ac_cv_func_mempcpy = no; then
31215     HAVE_MEMPCPY=0
31216   fi
31217
31218   if test $HAVE_MEMPCPY = 0; then
31219
31220
31221
31222
31223
31224
31225
31226
31227   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
31228
31229
31230   :
31231
31232   fi
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242           GL_GNULIB_MEMPCPY=1
31243
31244
31245
31246
31247
31248 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
31249
31250
31251
31252
31253
31254
31255
31256
31257   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
31258 printf %s "checking whether mkdir handles trailing slash... " >&6; }
31259 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
31260 then :
31261   printf %s "(cached) " >&6
31262 else $as_nop
31263   rm -rf conftest.dir
31264      if test "$cross_compiling" = yes
31265 then :
31266   case "$host_os" in
31267                            # Guess yes on Linux systems.
31268           linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
31269                            # Guess yes on glibc systems.
31270           *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
31271                            # Guess yes on MSVC, no on mingw.
31272           mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31273 /* end confdefs.h.  */
31274
31275 #ifdef _MSC_VER
31276  Known
31277 #endif
31278
31279 _ACEOF
31280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31281   $EGREP "Known" >/dev/null 2>&1
31282 then :
31283   gl_cv_func_mkdir_trailing_slash_works="guessing yes"
31284 else $as_nop
31285   gl_cv_func_mkdir_trailing_slash_works="guessing no"
31286 fi
31287 rm -rf conftest*
31288
31289                            ;;
31290                            # If we don't know, obey --enable-cross-guesses.
31291           *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
31292         esac
31293
31294 else $as_nop
31295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31296 /* end confdefs.h.  */
31297
31298           #include <sys/types.h>
31299           #include <sys/stat.h>
31300
31301
31302 $gl_mda_defines
31303
31304 int
31305 main (void)
31306 {
31307 return mkdir ("conftest.dir/", 0700);
31308   ;
31309   return 0;
31310 }
31311 _ACEOF
31312 if ac_fn_c_try_run "$LINENO"
31313 then :
31314   gl_cv_func_mkdir_trailing_slash_works=yes
31315 else $as_nop
31316   gl_cv_func_mkdir_trailing_slash_works=no
31317 fi
31318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31319   conftest.$ac_objext conftest.beam conftest.$ac_ext
31320 fi
31321
31322      rm -rf conftest.dir
31323
31324 fi
31325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
31326 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
31327   case "$gl_cv_func_mkdir_trailing_slash_works" in
31328     *yes) ;;
31329     *)
31330       REPLACE_MKDIR=1
31331       ;;
31332   esac
31333
31334   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
31335 printf %s "checking whether mkdir handles trailing dot... " >&6; }
31336 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
31337 then :
31338   printf %s "(cached) " >&6
31339 else $as_nop
31340   rm -rf conftest.dir
31341      if test "$cross_compiling" = yes
31342 then :
31343   case "$host_os" in
31344                          # Guess yes on glibc systems.
31345           *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
31346                          # Guess yes on musl systems.
31347           *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
31348                          # Guess no on native Windows.
31349           mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
31350                          # If we don't know, obey --enable-cross-guesses.
31351           *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
31352         esac
31353
31354 else $as_nop
31355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31356 /* end confdefs.h.  */
31357
31358           #include <sys/types.h>
31359           #include <sys/stat.h>
31360
31361
31362 $gl_mda_defines
31363
31364 int
31365 main (void)
31366 {
31367 return !mkdir ("conftest.dir/./", 0700);
31368   ;
31369   return 0;
31370 }
31371 _ACEOF
31372 if ac_fn_c_try_run "$LINENO"
31373 then :
31374   gl_cv_func_mkdir_trailing_dot_works=yes
31375 else $as_nop
31376   gl_cv_func_mkdir_trailing_dot_works=no
31377 fi
31378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31379   conftest.$ac_objext conftest.beam conftest.$ac_ext
31380 fi
31381
31382      rm -rf conftest.dir
31383
31384
31385 fi
31386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
31387 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
31388   case "$gl_cv_func_mkdir_trailing_dot_works" in
31389     *yes) ;;
31390     *)
31391       REPLACE_MKDIR=1
31392
31393 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
31394
31395       ;;
31396   esac
31397
31398   if test $REPLACE_MKDIR = 1; then
31399
31400
31401
31402
31403
31404
31405
31406
31407   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
31408
31409   fi
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419           GL_GNULIB_MKDIR=1
31420
31421
31422
31423
31424
31425 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
31426
31427
31428
31429
31430
31431
31432
31433   if test $ac_cv_func_mkstemp = yes; then
31434     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
31435 printf %s "checking for working mkstemp... " >&6; }
31436 if test ${gl_cv_func_working_mkstemp+y}
31437 then :
31438   printf %s "(cached) " >&6
31439 else $as_nop
31440
31441         mkdir conftest.mkstemp
31442         if test "$cross_compiling" = yes
31443 then :
31444   case "$host_os" in
31445                             # Guess yes on glibc systems.
31446              *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
31447                             # Guess yes on musl systems.
31448              *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
31449                             # Guess no on native Windows.
31450              mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
31451                             # If we don't know, obey --enable-cross-guesses.
31452              *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
31453            esac
31454
31455 else $as_nop
31456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31457 /* end confdefs.h.  */
31458 $ac_includes_default
31459
31460
31461 $gl_mda_defines
31462
31463 int
31464 main (void)
31465 {
31466 int result = 0;
31467               int i;
31468               off_t large = (off_t) 4294967295u;
31469               if (large < 0)
31470                 large = 2147483647;
31471               umask (0);
31472               for (i = 0; i < 70; i++)
31473                 {
31474                   char templ[] = "conftest.mkstemp/coXXXXXX";
31475                   int (*mkstemp_function) (char *) = mkstemp;
31476                   int fd = mkstemp_function (templ);
31477                   if (fd < 0)
31478                     result |= 1;
31479                   else
31480                     {
31481                       struct stat st;
31482                       if (lseek (fd, large, SEEK_SET) != large)
31483                         result |= 2;
31484                       if (fstat (fd, &st) < 0)
31485                         result |= 4;
31486                       else if (st.st_mode & 0077)
31487                         result |= 8;
31488                       if (close (fd))
31489                         result |= 16;
31490                     }
31491                 }
31492               return result;
31493   ;
31494   return 0;
31495 }
31496 _ACEOF
31497 if ac_fn_c_try_run "$LINENO"
31498 then :
31499   gl_cv_func_working_mkstemp=yes
31500 else $as_nop
31501   gl_cv_func_working_mkstemp=no
31502 fi
31503 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31504   conftest.$ac_objext conftest.beam conftest.$ac_ext
31505 fi
31506
31507         rm -rf conftest.mkstemp
31508
31509 fi
31510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
31511 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
31512     case "$gl_cv_func_working_mkstemp" in
31513       *yes) ;;
31514       *)
31515         REPLACE_MKSTEMP=1
31516         ;;
31517     esac
31518   else
31519     HAVE_MKSTEMP=0
31520   fi
31521
31522   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
31523
31524
31525
31526
31527
31528
31529
31530
31531   gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
31532
31533
31534
31535   fi
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545           GL_GNULIB_MKSTEMP=1
31546
31547
31548
31549
31550
31551 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
31552
31553
31554
31555
31556
31557
31558
31559
31560   REPLACE_MKTIME=0
31561   if test "$gl_cv_func_working_mktime" != yes; then
31562     REPLACE_MKTIME=1
31563
31564 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
31565
31566   fi
31567   case "$host_os" in
31568     mingw*)
31569       REPLACE_MKTIME=1
31570
31571 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
31572
31573       ;;
31574   esac
31575
31576   if test $REPLACE_MKTIME = 1; then
31577
31578
31579
31580
31581
31582
31583
31584
31585   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
31586
31587     :
31588   fi
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598           GL_GNULIB_MKTIME=1
31599
31600
31601
31602
31603
31604 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
31605
31606
31607
31608
31609
31610
31611   WANT_MKTIME_INTERNAL=0
31612     ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
31613 if test "x$ac_cv_func___mktime_internal" = xyes
31614 then :
31615
31616 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
31617
31618
31619 else $as_nop
31620             WANT_MKTIME_INTERNAL=1
31621
31622 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
31623
31624
31625 fi
31626
31627
31628   if test $WANT_MKTIME_INTERNAL = 1; then
31629
31630
31631
31632
31633
31634
31635
31636
31637   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
31638
31639     :
31640   fi
31641
31642   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31643
31644
31645
31646
31647
31648
31649
31650
31651   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
31652
31653   fi
31654
31655   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31656
31657
31658
31659
31660
31661
31662
31663
31664   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
31665
31666   fi
31667
31668
31669 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681   if test $ac_cv_func_nl_langinfo = yes; then
31682     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
31683     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
31684 printf %s "checking whether YESEXPR works... " >&6; }
31685 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
31686 then :
31687   printf %s "(cached) " >&6
31688 else $as_nop
31689   if test "$cross_compiling" = yes
31690 then :
31691
31692          case "$host_os" in
31693                    # Guess no on irix systems.
31694            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
31695                    # Guess yes elsewhere.
31696            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
31697          esac
31698
31699 else $as_nop
31700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701 /* end confdefs.h.  */
31702 #include <langinfo.h>
31703
31704 int
31705 main (void)
31706 {
31707 return !*nl_langinfo(YESEXPR);
31708
31709   ;
31710   return 0;
31711 }
31712 _ACEOF
31713 if ac_fn_c_try_run "$LINENO"
31714 then :
31715   gl_cv_func_nl_langinfo_yesexpr_works=yes
31716 else $as_nop
31717   gl_cv_func_nl_langinfo_yesexpr_works=no
31718 fi
31719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31720   conftest.$ac_objext conftest.beam conftest.$ac_ext
31721 fi
31722
31723
31724 fi
31725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
31726 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
31727     case $gl_cv_func_nl_langinfo_yesexpr_works in
31728       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
31729       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
31730     esac
31731
31732 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
31733
31734     # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
31735     case "$host_os" in
31736       solaris*) NL_LANGINFO_MTSAFE=0 ;;
31737       *)        NL_LANGINFO_MTSAFE=1 ;;
31738     esac
31739
31740 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
31741
31742     if test $HAVE_LANGINFO_CODESET = 1 \
31743        && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
31744        && test $HAVE_LANGINFO_ALTMON = 1 \
31745        && test $HAVE_LANGINFO_ERA = 1 \
31746        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
31747        && test $NL_LANGINFO_MTSAFE = 1; then
31748       :
31749     else
31750       REPLACE_NL_LANGINFO=1
31751
31752 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
31753
31754     fi
31755   else
31756     HAVE_NL_LANGINFO=0
31757   fi
31758   if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
31759     LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
31760   else
31761     LIB_NL_LANGINFO=
31762   fi
31763
31764
31765   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
31766
31767
31768
31769
31770
31771
31772
31773
31774   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
31775
31776   fi
31777   if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
31778
31779
31780
31781
31782
31783
31784
31785
31786   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
31787
31788
31789
31790
31791   CFLAG_VISIBILITY=
31792   HAVE_VISIBILITY=0
31793   if test -n "$GCC"; then
31794                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
31795 printf %s "checking whether the -Werror option is usable... " >&6; }
31796 if test ${gl_cv_cc_vis_werror+y}
31797 then :
31798   printf %s "(cached) " >&6
31799 else $as_nop
31800   gl_save_CFLAGS="$CFLAGS"
31801        CFLAGS="$CFLAGS -Werror"
31802        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803 /* end confdefs.h.  */
31804
31805 int
31806 main (void)
31807 {
31808
31809   ;
31810   return 0;
31811 }
31812 _ACEOF
31813 if ac_fn_c_try_compile "$LINENO"
31814 then :
31815   gl_cv_cc_vis_werror=yes
31816 else $as_nop
31817   gl_cv_cc_vis_werror=no
31818 fi
31819 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31820        CFLAGS="$gl_save_CFLAGS"
31821
31822 fi
31823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
31824 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
31825         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
31826 printf %s "checking for simple visibility declarations... " >&6; }
31827 if test ${gl_cv_cc_visibility+y}
31828 then :
31829   printf %s "(cached) " >&6
31830 else $as_nop
31831   gl_save_CFLAGS="$CFLAGS"
31832        CFLAGS="$CFLAGS -fvisibility=hidden"
31833                                           if test $gl_cv_cc_vis_werror = yes; then
31834          CFLAGS="$CFLAGS -Werror"
31835        fi
31836        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31837 /* end confdefs.h.  */
31838 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
31839               extern __attribute__((__visibility__("default"))) int exportedvar;
31840               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
31841               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
31842               void dummyfunc (void);
31843               int hiddenvar;
31844               int exportedvar;
31845               int hiddenfunc (void) { return 51; }
31846               int exportedfunc (void) { return 1225736919; }
31847               void dummyfunc (void) {}
31848
31849 int
31850 main (void)
31851 {
31852
31853   ;
31854   return 0;
31855 }
31856 _ACEOF
31857 if ac_fn_c_try_compile "$LINENO"
31858 then :
31859   gl_cv_cc_visibility=yes
31860 else $as_nop
31861   gl_cv_cc_visibility=no
31862 fi
31863 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31864        CFLAGS="$gl_save_CFLAGS"
31865
31866 fi
31867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
31868 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
31869     if test $gl_cv_cc_visibility = yes; then
31870       CFLAG_VISIBILITY="-fvisibility=hidden"
31871       HAVE_VISIBILITY=1
31872     fi
31873   fi
31874
31875
31876
31877 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
31878
31879
31880
31881   fi
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891           GL_GNULIB_NL_LANGINFO=1
31892
31893
31894
31895
31896
31897 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
31898
31899
31900
31901
31902
31903
31904  # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
31905
31906
31907
31908
31909
31910 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
31911
31912
31913
31914
31915
31916   case "$host_os" in
31917     mingw* | pw*)
31918       REPLACE_OPEN=1
31919       ;;
31920     *)
31921
31922       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
31923         REPLACE_OPEN=1
31924       fi
31925
31926
31927   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
31928 printf %s "checking whether open recognizes a trailing slash... " >&6; }
31929 if test ${gl_cv_func_open_slash+y}
31930 then :
31931   printf %s "(cached) " >&6
31932 else $as_nop
31933   # Assume that if we have lstat, we can also check symlinks.
31934      if test $ac_cv_func_lstat = yes; then
31935        touch conftest.tmp
31936        ln -s conftest.tmp conftest.lnk
31937      fi
31938      if test "$cross_compiling" = yes
31939 then :
31940
31941         case "$host_os" in
31942           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31943             gl_cv_func_open_slash="guessing no" ;;
31944           *)
31945             gl_cv_func_open_slash="guessing yes" ;;
31946         esac
31947
31948 else $as_nop
31949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31950 /* end confdefs.h.  */
31951
31952 #include <fcntl.h>
31953 #if HAVE_UNISTD_H
31954 # include <unistd.h>
31955 #endif
31956
31957
31958 $gl_mda_defines
31959
31960 int main ()
31961 {
31962   int result = 0;
31963 #if HAVE_LSTAT
31964   if (open ("conftest.lnk/", O_RDONLY) != -1)
31965     result |= 1;
31966 #endif
31967   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
31968     result |= 2;
31969   return result;
31970 }
31971 _ACEOF
31972 if ac_fn_c_try_run "$LINENO"
31973 then :
31974   gl_cv_func_open_slash=yes
31975 else $as_nop
31976   gl_cv_func_open_slash=no
31977 fi
31978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31979   conftest.$ac_objext conftest.beam conftest.$ac_ext
31980 fi
31981
31982      rm -f conftest.sl conftest.tmp conftest.lnk
31983
31984 fi
31985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
31986 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
31987   case "$gl_cv_func_open_slash" in
31988     *no)
31989
31990 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
31991
31992       ;;
31993   esac
31994
31995       case "$gl_cv_func_open_slash" in
31996         *no)
31997           REPLACE_OPEN=1
31998           ;;
31999       esac
32000       ;;
32001   esac
32002
32003
32004
32005   if test $REPLACE_OPEN = 1; then
32006
32007
32008
32009
32010
32011
32012
32013
32014   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32015
32016
32017
32018   :
32019
32020   fi
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030           GL_GNULIB_OPEN=1
32031
32032
32033
32034
32035
32036 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
32037
32038
32039
32040
32041
32042
32043   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
32044 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32045 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
32046 then :
32047   ac_have_decl=1
32048 else $as_nop
32049   ac_have_decl=0
32050 fi
32051 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
32052
32053   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
32054 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32055 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
32056 then :
32057   ac_have_decl=1
32058 else $as_nop
32059   ac_have_decl=0
32060 fi
32061 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
32062
32063
32064
32065   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
32066
32067
32068
32069   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
32070
32071
32072       :
32073
32074
32075
32076   :
32077
32078
32079
32080
32081   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
32082 if test "x$ac_cv_func_raise" = xyes
32083 then :
32084   printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
32085
32086 fi
32087
32088   if test $ac_cv_func_raise = no; then
32089     HAVE_RAISE=0
32090   else
32091
32092
32093       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32094         REPLACE_RAISE=1
32095       fi
32096
32097
32098
32099
32100
32101   HAVE_POSIX_SIGNALBLOCKING=0
32102   if test "$gl_cv_type_sigset_t" = yes; then
32103     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
32104 if test "x$ac_cv_func_sigprocmask" = xyes
32105 then :
32106   HAVE_POSIX_SIGNALBLOCKING=1
32107 fi
32108
32109   fi
32110
32111       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
32112         :
32113       fi
32114
32115   fi
32116
32117   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
32118
32119
32120
32121
32122
32123
32124
32125
32126   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
32127
32128     :
32129   fi
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139           GL_GNULIB_RAISE=1
32140
32141
32142
32143
32144
32145 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
32146
32147
32148
32149
32150
32151
32152
32153   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
32154 if test "x$ac_cv_func_rawmemchr" = xyes
32155 then :
32156   printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
32157
32158 fi
32159
32160   if test $ac_cv_func_rawmemchr = no; then
32161     HAVE_RAWMEMCHR=0
32162   fi
32163
32164   if test $HAVE_RAWMEMCHR = 0; then
32165
32166
32167
32168
32169
32170
32171
32172
32173   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
32174
32175     :
32176   fi
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186           GL_GNULIB_RAWMEMCHR=1
32187
32188
32189
32190
32191
32192 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
32193
32194
32195
32196
32197
32198
32199   if test $ac_cv_func_readlink = no; then
32200     HAVE_READLINK=0
32201   else
32202     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
32203 printf %s "checking whether readlink signature is correct... " >&6; }
32204 if test ${gl_cv_decl_readlink_works+y}
32205 then :
32206   printf %s "(cached) " >&6
32207 else $as_nop
32208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32209 /* end confdefs.h.  */
32210 #include <unistd.h>
32211       /* Cause compilation failure if original declaration has wrong type.  */
32212       ssize_t readlink (const char *, char *, size_t);
32213 int
32214 main (void)
32215 {
32216
32217   ;
32218   return 0;
32219 }
32220 _ACEOF
32221 if ac_fn_c_try_compile "$LINENO"
32222 then :
32223   gl_cv_decl_readlink_works=yes
32224 else $as_nop
32225   gl_cv_decl_readlink_works=no
32226 fi
32227 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32228 fi
32229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
32230 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
32231             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
32232 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
32233 if test ${gl_cv_func_readlink_trailing_slash+y}
32234 then :
32235   printf %s "(cached) " >&6
32236 else $as_nop
32237   # We have readlink, so assume ln -s works.
32238        ln -s conftest.no-such conftest.link
32239        ln -s conftest.link conftest.lnk2
32240        if test "$cross_compiling" = yes
32241 then :
32242   case "$host_os" in
32243             # Guess yes on Linux or glibc systems.
32244             linux-* | linux | *-gnu* | gnu*)
32245               gl_cv_func_readlink_trailing_slash="guessing yes" ;;
32246             # Guess no on AIX or HP-UX.
32247             aix* | hpux*)
32248               gl_cv_func_readlink_trailing_slash="guessing no" ;;
32249             # If we don't know, obey --enable-cross-guesses.
32250             *)
32251               gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
32252           esac
32253
32254 else $as_nop
32255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32256 /* end confdefs.h.  */
32257 #include <unistd.h>
32258
32259 int
32260 main (void)
32261 {
32262 char buf[20];
32263       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
32264   ;
32265   return 0;
32266 }
32267 _ACEOF
32268 if ac_fn_c_try_run "$LINENO"
32269 then :
32270   gl_cv_func_readlink_trailing_slash=yes
32271 else $as_nop
32272   gl_cv_func_readlink_trailing_slash=no
32273 fi
32274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32275   conftest.$ac_objext conftest.beam conftest.$ac_ext
32276 fi
32277
32278       rm -f conftest.link conftest.lnk2
32279 fi
32280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
32281 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
32282     case "$gl_cv_func_readlink_trailing_slash" in
32283       *yes)
32284         if test "$gl_cv_decl_readlink_works" != yes; then
32285           REPLACE_READLINK=1
32286         fi
32287         ;;
32288       *)
32289
32290 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
32291
32292         REPLACE_READLINK=1
32293         ;;
32294     esac
32295
32296     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
32297 printf %s "checking whether readlink truncates results correctly... " >&6; }
32298 if test ${gl_cv_func_readlink_truncate+y}
32299 then :
32300   printf %s "(cached) " >&6
32301 else $as_nop
32302   # We have readlink, so assume ln -s works.
32303        ln -s ab conftest.link
32304        if test "$cross_compiling" = yes
32305 then :
32306   case "$host_os" in
32307             # Guess yes on Linux or glibc systems.
32308             linux-* | linux | *-gnu* | gnu*)
32309               gl_cv_func_readlink_truncate="guessing yes" ;;
32310             # Guess no on AIX or HP-UX.
32311             aix* | hpux*)
32312               gl_cv_func_readlink_truncate="guessing no" ;;
32313             # If we don't know, obey --enable-cross-guesses.
32314             *)
32315               gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
32316           esac
32317
32318 else $as_nop
32319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32320 /* end confdefs.h.  */
32321 #include <unistd.h>
32322
32323 int
32324 main (void)
32325 {
32326 char c;
32327       return readlink ("conftest.link", &c, 1) != 1;
32328   ;
32329   return 0;
32330 }
32331 _ACEOF
32332 if ac_fn_c_try_run "$LINENO"
32333 then :
32334   gl_cv_func_readlink_truncate=yes
32335 else $as_nop
32336   gl_cv_func_readlink_truncate=no
32337 fi
32338 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32339   conftest.$ac_objext conftest.beam conftest.$ac_ext
32340 fi
32341
32342       rm -f conftest.link conftest.lnk2
32343 fi
32344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
32345 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
32346     case $gl_cv_func_readlink_truncate in
32347       *yes)
32348         if test "$gl_cv_decl_readlink_works" != yes; then
32349           REPLACE_READLINK=1
32350         fi
32351         ;;
32352       *)
32353
32354 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
32355
32356         REPLACE_READLINK=1
32357         ;;
32358     esac
32359   fi
32360
32361   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
32362
32363
32364
32365
32366
32367
32368
32369
32370   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
32371
32372
32373   :
32374
32375   fi
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385           GL_GNULIB_READLINK=1
32386
32387
32388
32389
32390
32391 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
32392
32393
32394
32395
32396
32397
32398   if test $REPLACE_REALLOC = 0; then
32399
32400     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
32401 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
32402 if test ${ac_cv_func_realloc_0_nonnull+y}
32403 then :
32404   printf %s "(cached) " >&6
32405 else $as_nop
32406   if test "$cross_compiling" = yes
32407 then :
32408   case "$host_os" in
32409           # Guess yes on platforms where we know the result.
32410           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
32411           | gnu* | *-musl* | midnightbsd* \
32412           | hpux* | solaris* | cygwin* | mingw* | msys* )
32413             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
32414           # If we don't know, obey --enable-cross-guesses.
32415           *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
32416         esac
32417
32418 else $as_nop
32419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32420 /* end confdefs.h.  */
32421 #include <stdlib.h>
32422
32423 int
32424 main (void)
32425 {
32426 void *p = realloc (0, 0);
32427             int result = !p;
32428             free (p);
32429             return result;
32430   ;
32431   return 0;
32432 }
32433
32434 _ACEOF
32435 if ac_fn_c_try_run "$LINENO"
32436 then :
32437   ac_cv_func_realloc_0_nonnull=yes
32438 else $as_nop
32439   ac_cv_func_realloc_0_nonnull=no
32440 fi
32441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32442   conftest.$ac_objext conftest.beam conftest.$ac_ext
32443 fi
32444
32445
32446 fi
32447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
32448 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
32449   case $ac_cv_func_realloc_0_nonnull in #(
32450   *yes) :
32451      ;; #(
32452   *) :
32453     REPLACE_REALLOC=1 ;;
32454 esac
32455
32456   fi
32457
32458   if test $REPLACE_REALLOC = 1; then
32459
32460
32461
32462
32463
32464
32465
32466
32467   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32468
32469   fi
32470
32471
32472
32473   if test $REPLACE_MALLOC = 1; then
32474     REPLACE_REALLOC=1
32475   fi
32476
32477   if test $REPLACE_REALLOC = 1; then
32478
32479
32480
32481
32482
32483
32484
32485
32486   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32487
32488   fi
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498           GL_GNULIB_REALLOC_POSIX=1
32499
32500
32501
32502
32503
32504 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
32505
32506
32507
32508
32509
32510
32511
32512
32513   ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
32514 if test "x$ac_cv_func_reallocarray" = xyes
32515 then :
32516   printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
32517
32518 fi
32519
32520   if test "$ac_cv_func_reallocarray" = no; then
32521     HAVE_REALLOCARRAY=0
32522   elif test "$gl_cv_malloc_ptrdiff" = no; then
32523     REPLACE_REALLOCARRAY=1
32524   fi
32525
32526   if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
32527
32528
32529
32530
32531
32532
32533
32534
32535   gl_LIBOBJS="$gl_LIBOBJS reallocarray.$ac_objext"
32536
32537     :
32538   fi
32539
32540
32541 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553           GL_GNULIB_REALLOCARRAY=1
32554
32555
32556
32557
32558
32559 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
32560
32561
32562
32563
32564
32565 # Check whether --with-included-regex was given.
32566 if test ${with_included_regex+y}
32567 then :
32568   withval=$with_included_regex;
32569 fi
32570
32571
32572   case $with_included_regex in #(
32573   yes|no) ac_use_included_regex=$with_included_regex
32574         ;;
32575   '')
32576     # If the system regex support is good enough that it passes the
32577     # following run test, then default to *not* using the included regex.c.
32578     # If cross compiling, assume the test would fail and use the included
32579     # regex.c.
32580
32581
32582     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
32583 printf %s "checking for working re_compile_pattern... " >&6; }
32584 if test ${gl_cv_func_re_compile_pattern_working+y}
32585 then :
32586   printf %s "(cached) " >&6
32587 else $as_nop
32588   if test "$cross_compiling" = yes
32589 then :
32590   case "$host_os" in
32591                    # Guess no on native Windows.
32592            mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
32593                    # Otherwise obey --enable-cross-guesses.
32594            *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
32595          esac
32596
32597 else $as_nop
32598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32599 /* end confdefs.h.  */
32600 #include <regex.h>
32601
32602             #include <locale.h>
32603             #include <limits.h>
32604             #include <string.h>
32605
32606             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
32607             # include <signal.h>
32608             # include <unistd.h>
32609             #endif
32610
32611             #if HAVE_MALLOC_H
32612             # include <malloc.h>
32613             #endif
32614
32615             #ifdef M_CHECK_ACTION
32616             /* Exit with distinguishable exit code.  */
32617             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
32618             #endif
32619
32620 int
32621 main (void)
32622 {
32623 int result = 0;
32624             static struct re_pattern_buffer regex;
32625             unsigned char folded_chars[UCHAR_MAX + 1];
32626             int i;
32627             const char *s;
32628             struct re_registers regs;
32629
32630             /* Some builds of glibc go into an infinite loop on this
32631                test.  Use alarm to force death, and mallopt to avoid
32632                malloc recursion in diagnosing the corrupted heap. */
32633 #if HAVE_DECL_ALARM
32634             signal (SIGALRM, SIG_DFL);
32635             alarm (2);
32636 #endif
32637 #ifdef M_CHECK_ACTION
32638             signal (SIGABRT, sigabrt_no_core);
32639             mallopt (M_CHECK_ACTION, 2);
32640 #endif
32641
32642             if (setlocale (LC_ALL, "en_US.UTF-8"))
32643               {
32644                 {
32645                   /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
32646                      This test needs valgrind to catch the bug on Debian
32647                      GNU/Linux 3.1 x86, but it might catch the bug better
32648                      on other platforms and it shouldn't hurt to try the
32649                      test here.  */
32650                   static char const pat[] = "insert into";
32651                   static char const data[] =
32652                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
32653                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
32654                                  | RE_ICASE);
32655                   memset (&regex, 0, sizeof regex);
32656                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32657                   if (s)
32658                     result |= 1;
32659                   else
32660                     {
32661                       if (re_search (&regex, data, sizeof data - 1,
32662                                      0, sizeof data - 1, &regs)
32663                           != -1)
32664                         result |= 1;
32665                       regfree (&regex);
32666                     }
32667                 }
32668
32669                 {
32670                   /* This test is from glibc bug 15078.
32671                      The test case is from Andreas Schwab in
32672                      <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
32673                      */
32674                   static char const pat[] = "[^x]x";
32675                   static char const data[] =
32676                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
32677                     "\xe1\x80\x80"
32678                     "\xe1\x80\xbb"
32679                     "\xe1\x80\xbd"
32680                     "\xe1\x80\x94"
32681                     "\xe1\x80\xba"
32682                     "\xe1\x80\xaf"
32683                     "\xe1\x80\x95"
32684                     "\xe1\x80\xba"
32685                     "x";
32686                   re_set_syntax (0);
32687                   memset (&regex, 0, sizeof regex);
32688                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32689                   if (s)
32690                     result |= 1;
32691                   else
32692                     {
32693                       i = re_search (&regex, data, sizeof data - 1,
32694                                      0, sizeof data - 1, 0);
32695                       if (i != 0 && i != 21)
32696                         result |= 1;
32697                       regfree (&regex);
32698                     }
32699                 }
32700
32701                 if (! setlocale (LC_ALL, "C"))
32702                   return 1;
32703               }
32704
32705             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
32706             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
32707             memset (&regex, 0, sizeof regex);
32708             s = re_compile_pattern ("a[^x]b", 6, &regex);
32709             if (s)
32710               result |= 2;
32711             else
32712               {
32713                 /* This should fail, but succeeds for glibc-2.5.  */
32714                 if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
32715                   result |= 2;
32716                 regfree (&regex);
32717               }
32718
32719             /* This regular expression is from Spencer ere test number 75
32720                in grep-2.3.  */
32721             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32722             memset (&regex, 0, sizeof regex);
32723             for (i = 0; i <= UCHAR_MAX; i++)
32724               folded_chars[i] = i;
32725             regex.translate = folded_chars;
32726             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
32727             /* This should fail with _Invalid character class name_ error.  */
32728             if (!s)
32729               {
32730                 result |= 4;
32731                 regfree (&regex);
32732               }
32733
32734             /* Ensure that [b-a] is diagnosed as invalid, when
32735                using RE_NO_EMPTY_RANGES. */
32736             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
32737             memset (&regex, 0, sizeof regex);
32738             s = re_compile_pattern ("a[b-a]", 6, &regex);
32739             if (s == 0)
32740               {
32741                 result |= 8;
32742                 regfree (&regex);
32743               }
32744
32745             /* This should succeed, but does not for glibc-2.1.3.  */
32746             memset (&regex, 0, sizeof regex);
32747             s = re_compile_pattern ("{1", 2, &regex);
32748             if (s)
32749               result |= 8;
32750             else
32751               regfree (&regex);
32752
32753             /* The following example is derived from a problem report
32754                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
32755             memset (&regex, 0, sizeof regex);
32756             s = re_compile_pattern ("[an\371]*n", 7, &regex);
32757             if (s)
32758               result |= 8;
32759             else
32760               {
32761                 /* This should match, but does not for glibc-2.2.1.  */
32762                 if (re_match (&regex, "an", 2, 0, &regs) != 2)
32763                   result |= 8;
32764                 else
32765                   {
32766                     free (regs.start);
32767                     free (regs.end);
32768                   }
32769                 regfree (&regex);
32770               }
32771
32772             memset (&regex, 0, sizeof regex);
32773             s = re_compile_pattern ("x", 1, &regex);
32774             if (s)
32775               result |= 8;
32776             else
32777               {
32778                 /* glibc-2.2.93 does not work with a negative RANGE argument.  */
32779                 if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
32780                   result |= 8;
32781                 else
32782                   {
32783                     free (regs.start);
32784                     free (regs.end);
32785                   }
32786                 regfree (&regex);
32787               }
32788
32789             /* The version of regex.c in older versions of gnulib
32790                ignored RE_ICASE.  Detect that problem too.  */
32791             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
32792             memset (&regex, 0, sizeof regex);
32793             s = re_compile_pattern ("x", 1, &regex);
32794             if (s)
32795               result |= 16;
32796             else
32797               {
32798                 if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
32799                   result |= 16;
32800                 else
32801                   {
32802                     free (regs.start);
32803                     free (regs.end);
32804                   }
32805                 regfree (&regex);
32806               }
32807
32808             /* Catch a bug reported by Vin Shelton in
32809                https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
32810                */
32811             re_set_syntax (RE_SYNTAX_POSIX_BASIC
32812                            & ~RE_CONTEXT_INVALID_DUP
32813                            & ~RE_NO_EMPTY_RANGES);
32814             memset (&regex, 0, sizeof regex);
32815             s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
32816             if (s)
32817               result |= 32;
32818             else
32819               regfree (&regex);
32820
32821             /* REG_STARTEND was added to glibc on 2004-01-15.
32822                Reject older versions.  */
32823             if (! REG_STARTEND)
32824               result |= 64;
32825
32826             /* Matching with the compiled form of this regexp would provoke
32827                an assertion failure prior to glibc-2.28:
32828                  regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
32829                With glibc-2.28, compilation fails and reports the invalid
32830                back reference.  */
32831             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32832             memset (&regex, 0, sizeof regex);
32833             s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
32834             if (!s)
32835               {
32836                 memset (&regs, 0, sizeof regs);
32837                 i = re_search (&regex, "x", 1, 0, 1, &regs);
32838                 if (i != -1)
32839                   result |= 64;
32840                 if (0 <= i)
32841                   {
32842                     free (regs.start);
32843                     free (regs.end);
32844                   }
32845                 regfree (&regex);
32846               }
32847             else
32848               {
32849                 if (strcmp (s, "Invalid back reference"))
32850                   result |= 64;
32851               }
32852
32853             /* glibc bug 11053.  */
32854             re_set_syntax (RE_SYNTAX_POSIX_BASIC);
32855             memset (&regex, 0, sizeof regex);
32856             static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
32857             s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
32858             if (s)
32859               result |= 64;
32860             else
32861               {
32862                 memset (&regs, 0, sizeof regs);
32863                 static char const data[] = "a";
32864                 int datalen = sizeof data - 1;
32865                 i = re_search (&regex, data, datalen, 0, datalen, &regs);
32866                 if (i != 0)
32867                   result |= 64;
32868                 else if (regs.num_regs < 2)
32869                   result |= 64;
32870                 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
32871                   result |= 64;
32872                 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
32873                   result |= 64;
32874                 regfree (&regex);
32875                 free (regs.start);
32876                 free (regs.end);
32877               }
32878
32879 #if 0
32880             /* It would be nice to reject hosts whose regoff_t values are too
32881                narrow (including glibc on hosts with 64-bit ptrdiff_t and
32882                32-bit int), but we should wait until glibc implements this
32883                feature.  Otherwise, support for equivalence classes and
32884                multibyte collation symbols would always be broken except
32885                when compiling --without-included-regex.   */
32886             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
32887                 || sizeof (regoff_t) < sizeof (ssize_t))
32888               result |= 64;
32889 #endif
32890
32891             return result;
32892
32893   ;
32894   return 0;
32895 }
32896 _ACEOF
32897 if ac_fn_c_try_run "$LINENO"
32898 then :
32899   gl_cv_func_re_compile_pattern_working=yes
32900 else $as_nop
32901   gl_cv_func_re_compile_pattern_working=no
32902 fi
32903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32904   conftest.$ac_objext conftest.beam conftest.$ac_ext
32905 fi
32906
32907
32908 fi
32909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
32910 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
32911     case "$gl_cv_func_re_compile_pattern_working" in #(
32912       *yes) ac_use_included_regex=no;; #(
32913       *no) ac_use_included_regex=yes;;
32914     esac
32915     ;;
32916   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
32917     ;;
32918   esac
32919
32920   if test $ac_use_included_regex = yes; then
32921
32922 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
32923
32924
32925 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
32926
32927
32928 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
32929
32930
32931 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
32932
32933
32934 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
32935
32936
32937 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
32938
32939
32940 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
32941
32942
32943 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
32944
32945
32946 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
32947
32948
32949 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
32950
32951
32952 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
32953
32954
32955 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
32956
32957
32958 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
32959
32960
32961 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
32962
32963
32964 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
32965
32966
32967 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
32968
32969
32970 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
32971
32972   fi
32973
32974   if test $ac_use_included_regex = yes; then
32975
32976
32977
32978
32979
32980
32981
32982
32983   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
32984
32985
32986
32987
32988
32989
32990
32991   ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
32992 if test "x$ac_cv_header_libintl_h" = xyes
32993 then :
32994   printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
32995
32996 fi
32997
32998
32999   ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
33000 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33001 if test "x$ac_cv_have_decl_isblank" = xyes
33002 then :
33003   ac_have_decl=1
33004 else $as_nop
33005   ac_have_decl=0
33006 fi
33007 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
33008
33009
33010   fi
33011
33012
33013      if test $ac_cv_func_setenv = no; then
33014     HAVE_SETENV=0
33015   else
33016     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
33017 printf %s "checking whether setenv validates arguments... " >&6; }
33018 if test ${gl_cv_func_setenv_works+y}
33019 then :
33020   printf %s "(cached) " >&6
33021 else $as_nop
33022   if test "$cross_compiling" = yes
33023 then :
33024   case "$host_os" in
33025                         # Guess yes on glibc systems.
33026          *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
33027                         # Guess yes on musl systems.
33028          *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
33029                         # If we don't know, obey --enable-cross-guesses.
33030          *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
33031        esac
33032
33033 else $as_nop
33034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33035 /* end confdefs.h.  */
33036
33037        #include <stdlib.h>
33038        #include <errno.h>
33039        #include <string.h>
33040
33041 int
33042 main (void)
33043 {
33044
33045        int result = 0;
33046        {
33047          if (setenv ("", "", 0) != -1)
33048            result |= 1;
33049          else if (errno != EINVAL)
33050            result |= 2;
33051        }
33052        {
33053          if (setenv ("a", "=", 1) != 0)
33054            result |= 4;
33055          else if (strcmp (getenv ("a"), "=") != 0)
33056            result |= 8;
33057        }
33058        return result;
33059
33060   ;
33061   return 0;
33062 }
33063 _ACEOF
33064 if ac_fn_c_try_run "$LINENO"
33065 then :
33066   gl_cv_func_setenv_works=yes
33067 else $as_nop
33068   gl_cv_func_setenv_works=no
33069 fi
33070 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33071   conftest.$ac_objext conftest.beam conftest.$ac_ext
33072 fi
33073
33074 fi
33075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
33076 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
33077     case "$gl_cv_func_setenv_works" in
33078       *yes) ;;
33079       *)
33080         REPLACE_SETENV=1
33081         ;;
33082     esac
33083   fi
33084
33085   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
33086
33087
33088
33089
33090
33091
33092
33093
33094   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
33095
33096   fi
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106           GL_GNULIB_SETENV=1
33107
33108
33109
33110
33111
33112 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
33113
33114
33115
33116
33117
33118
33119
33120
33121   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
33122 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
33123 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
33124 then :
33125   printf %s "(cached) " >&6
33126 else $as_nop
33127   case "$host_os" in
33128        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
33129        *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
33130          gl_cv_func_setlocale_null_all_mtsafe=no ;;
33131        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
33132        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
33133          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
33134        # If we don't know, obey --enable-cross-guesses.
33135        *)
33136          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
33137      esac
33138
33139 fi
33140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
33141 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
33142     case "$host_os" in
33143     mingw*) ;;
33144     *)
33145       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33146         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
33147       fi
33148       ;;
33149   esac
33150   case "$gl_cv_func_setlocale_null_all_mtsafe" in
33151     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
33152     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
33153   esac
33154
33155 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
33156
33157
33158     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
33159 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
33160 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
33161 then :
33162   printf %s "(cached) " >&6
33163 else $as_nop
33164   case "$host_os" in
33165        # Guess no on OpenBSD, AIX.
33166        openbsd* | aix*)
33167          gl_cv_func_setlocale_null_one_mtsafe=no ;;
33168        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
33169        *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
33170          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
33171        # If we don't know, obey --enable-cross-guesses.
33172        *)
33173          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
33174      esac
33175
33176 fi
33177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
33178 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
33179     case "$host_os" in
33180     mingw*) ;;
33181     *)
33182       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33183         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
33184       fi
33185       ;;
33186   esac
33187   case "$gl_cv_func_setlocale_null_one_mtsafe" in
33188     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
33189     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
33190   esac
33191
33192 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
33193
33194
33195     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33196     case "$host_os" in
33197       mingw*) LIB_SETLOCALE_NULL= ;;
33198       *)
33199
33200
33201   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
33202 printf %s "checking whether imported symbols can be declared weak... " >&6; }
33203 if test ${gl_cv_have_weak+y}
33204 then :
33205   printf %s "(cached) " >&6
33206 else $as_nop
33207   gl_cv_have_weak=no
33208           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33209 /* end confdefs.h.  */
33210 extern void xyzzy ();
33211 #pragma weak xyzzy
33212 int
33213 main (void)
33214 {
33215 xyzzy();
33216   ;
33217   return 0;
33218 }
33219 _ACEOF
33220 if ac_fn_c_try_link "$LINENO"
33221 then :
33222   gl_cv_have_weak=maybe
33223 fi
33224 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33225     conftest$ac_exeext conftest.$ac_ext
33226      if test $gl_cv_have_weak = maybe; then
33227                      if test "$cross_compiling" = yes
33228 then :
33229                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33230 /* end confdefs.h.  */
33231 #ifdef __ELF__
33232              Extensible Linking Format
33233              #endif
33234
33235 _ACEOF
33236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33237   $EGREP "Extensible Linking Format" >/dev/null 2>&1
33238 then :
33239   gl_cv_have_weak="guessing yes"
33240 else $as_nop
33241   gl_cv_have_weak="guessing no"
33242 fi
33243 rm -rf conftest*
33244
33245
33246 else $as_nop
33247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33248 /* end confdefs.h.  */
33249
33250 #include <stdio.h>
33251 #pragma weak fputs
33252 int main ()
33253 {
33254   return (fputs == NULL);
33255 }
33256 _ACEOF
33257 if ac_fn_c_try_run "$LINENO"
33258 then :
33259   gl_cv_have_weak=yes
33260 else $as_nop
33261   gl_cv_have_weak=no
33262 fi
33263 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33264   conftest.$ac_objext conftest.beam conftest.$ac_ext
33265 fi
33266
33267      fi
33268           case " $LDFLAGS " in
33269        *" -static "*) gl_cv_have_weak=no ;;
33270      esac
33271                     case "$gl_cv_have_weak" in
33272        *yes)
33273          case "$host_os" in
33274            freebsd* | dragonfly* | midnightbsd*)
33275              : > conftest1.c
33276              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
33277              cat <<EOF > conftest2.c
33278 #include <pthread.h>
33279 #pragma weak pthread_mutexattr_gettype
33280 int main ()
33281 {
33282   return (pthread_mutexattr_gettype != NULL);
33283 }
33284 EOF
33285              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
33286                || gl_cv_have_weak=no
33287              rm -f conftest1.c libempty.so conftest2.c conftest
33288              ;;
33289          esac
33290          ;;
33291      esac
33292
33293 fi
33294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
33295 printf "%s\n" "$gl_cv_have_weak" >&6; }
33296   case "$gl_cv_have_weak" in
33297     *yes)
33298
33299 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
33300
33301       ;;
33302   esac
33303
33304         case "$gl_cv_have_weak" in
33305           *yes) LIB_SETLOCALE_NULL= ;;
33306           *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
33307         esac
33308         ;;
33309     esac
33310   else
33311     LIB_SETLOCALE_NULL=
33312   fi
33313
33314
33315   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33316
33317
33318
33319
33320
33321
33322
33323
33324   gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
33325
33326
33327
33328
33329   CFLAG_VISIBILITY=
33330   HAVE_VISIBILITY=0
33331   if test -n "$GCC"; then
33332                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
33333 printf %s "checking whether the -Werror option is usable... " >&6; }
33334 if test ${gl_cv_cc_vis_werror+y}
33335 then :
33336   printf %s "(cached) " >&6
33337 else $as_nop
33338   gl_save_CFLAGS="$CFLAGS"
33339        CFLAGS="$CFLAGS -Werror"
33340        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33341 /* end confdefs.h.  */
33342
33343 int
33344 main (void)
33345 {
33346
33347   ;
33348   return 0;
33349 }
33350 _ACEOF
33351 if ac_fn_c_try_compile "$LINENO"
33352 then :
33353   gl_cv_cc_vis_werror=yes
33354 else $as_nop
33355   gl_cv_cc_vis_werror=no
33356 fi
33357 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33358        CFLAGS="$gl_save_CFLAGS"
33359
33360 fi
33361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
33362 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
33363         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
33364 printf %s "checking for simple visibility declarations... " >&6; }
33365 if test ${gl_cv_cc_visibility+y}
33366 then :
33367   printf %s "(cached) " >&6
33368 else $as_nop
33369   gl_save_CFLAGS="$CFLAGS"
33370        CFLAGS="$CFLAGS -fvisibility=hidden"
33371                                           if test $gl_cv_cc_vis_werror = yes; then
33372          CFLAGS="$CFLAGS -Werror"
33373        fi
33374        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33375 /* end confdefs.h.  */
33376 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
33377               extern __attribute__((__visibility__("default"))) int exportedvar;
33378               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
33379               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
33380               void dummyfunc (void);
33381               int hiddenvar;
33382               int exportedvar;
33383               int hiddenfunc (void) { return 51; }
33384               int exportedfunc (void) { return 1225736919; }
33385               void dummyfunc (void) {}
33386
33387 int
33388 main (void)
33389 {
33390
33391   ;
33392   return 0;
33393 }
33394 _ACEOF
33395 if ac_fn_c_try_compile "$LINENO"
33396 then :
33397   gl_cv_cc_visibility=yes
33398 else $as_nop
33399   gl_cv_cc_visibility=no
33400 fi
33401 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33402        CFLAGS="$gl_save_CFLAGS"
33403
33404 fi
33405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
33406 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
33407     if test $gl_cv_cc_visibility = yes; then
33408       CFLAG_VISIBILITY="-fvisibility=hidden"
33409       HAVE_VISIBILITY=1
33410     fi
33411   fi
33412
33413
33414
33415 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
33416
33417
33418
33419   fi
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429           GL_GNULIB_SETLOCALE_NULL=1
33430
33431
33432
33433
33434
33435 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447 # Check whether --with-libsigsegv was given.
33448 if test ${with_libsigsegv+y}
33449 then :
33450   withval=$with_libsigsegv;
33451 fi
33452
33453   SIGSEGV_H=sigsegv.h
33454   if test "$with_libsigsegv" = yes; then
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468     use_additional=yes
33469
33470   acl_save_prefix="$prefix"
33471   prefix="$acl_final_prefix"
33472   acl_save_exec_prefix="$exec_prefix"
33473   exec_prefix="$acl_final_exec_prefix"
33474
33475     eval additional_includedir=\"$includedir\"
33476     eval additional_libdir=\"$libdir\"
33477     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33478     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33479
33480   exec_prefix="$acl_save_exec_prefix"
33481   prefix="$acl_save_prefix"
33482
33483
33484 # Check whether --with-libsigsegv-prefix was given.
33485 if test ${with_libsigsegv_prefix+y}
33486 then :
33487   withval=$with_libsigsegv_prefix;
33488     if test "X$withval" = "Xno"; then
33489       use_additional=no
33490     else
33491       if test "X$withval" = "X"; then
33492
33493   acl_save_prefix="$prefix"
33494   prefix="$acl_final_prefix"
33495   acl_save_exec_prefix="$exec_prefix"
33496   exec_prefix="$acl_final_exec_prefix"
33497
33498           eval additional_includedir=\"$includedir\"
33499           eval additional_libdir=\"$libdir\"
33500           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33501           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33502
33503   exec_prefix="$acl_save_exec_prefix"
33504   prefix="$acl_save_prefix"
33505
33506       else
33507         additional_includedir="$withval/include"
33508         additional_libdir="$withval/$acl_libdirstem"
33509         additional_libdir2="$withval/$acl_libdirstem2"
33510         additional_libdir3="$withval/$acl_libdirstem3"
33511       fi
33512     fi
33513
33514 fi
33515
33516   if test "X$additional_libdir2" = "X$additional_libdir"; then
33517     additional_libdir2=
33518   fi
33519   if test "X$additional_libdir3" = "X$additional_libdir"; then
33520     additional_libdir3=
33521   fi
33522       LIBSIGSEGV=
33523   LTLIBSIGSEGV=
33524   INCSIGSEGV=
33525   LIBSIGSEGV_PREFIX=
33526       HAVE_LIBSIGSEGV=
33527   rpathdirs=
33528   ltrpathdirs=
33529   names_already_handled=
33530   names_next_round='sigsegv '
33531   while test -n "$names_next_round"; do
33532     names_this_round="$names_next_round"
33533     names_next_round=
33534     for name in $names_this_round; do
33535       already_handled=
33536       for n in $names_already_handled; do
33537         if test "$n" = "$name"; then
33538           already_handled=yes
33539           break
33540         fi
33541       done
33542       if test -z "$already_handled"; then
33543         names_already_handled="$names_already_handled $name"
33544                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
33545         eval value=\"\$HAVE_LIB$uppername\"
33546         if test -n "$value"; then
33547           if test "$value" = yes; then
33548             eval value=\"\$LIB$uppername\"
33549             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
33550             eval value=\"\$LTLIB$uppername\"
33551             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
33552           else
33553                                     :
33554           fi
33555         else
33556                               found_dir=
33557           found_la=
33558           found_so=
33559           found_a=
33560           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
33561           if test -n "$acl_shlibext"; then
33562             shrext=".$acl_shlibext"             # typically: shrext=.so
33563           else
33564             shrext=
33565           fi
33566           if test $use_additional = yes; then
33567             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
33568               if test "X$found_dir" = "X"; then
33569                 eval dir=\$$additional_libdir_variable
33570                 if test -n "$dir"; then
33571                                                       if test -n "$acl_shlibext"; then
33572                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33573                       found_dir="$dir"
33574                       found_so="$dir/$libname$shrext"
33575                     else
33576                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33577                         ver=`(cd "$dir" && \
33578                               for f in "$libname$shrext".*; do echo "$f"; done \
33579                               | sed -e "s,^$libname$shrext\\\\.,," \
33580                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33581                               | sed 1q ) 2>/dev/null`
33582                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33583                           found_dir="$dir"
33584                           found_so="$dir/$libname$shrext.$ver"
33585                         fi
33586                       else
33587                         eval library_names=\"$acl_library_names_spec\"
33588                         for f in $library_names; do
33589                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33590                             found_dir="$dir"
33591                             found_so="$dir/$f"
33592                             break
33593                           fi
33594                         done
33595                       fi
33596                     fi
33597                   fi
33598                                     if test "X$found_dir" = "X"; then
33599                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33600                       found_dir="$dir"
33601                       found_a="$dir/$libname.$acl_libext"
33602                     fi
33603                   fi
33604                   if test "X$found_dir" != "X"; then
33605                     if test -f "$dir/$libname.la"; then
33606                       found_la="$dir/$libname.la"
33607                     fi
33608                   fi
33609                 fi
33610               fi
33611             done
33612           fi
33613           if test "X$found_dir" = "X"; then
33614             for x in $LDFLAGS $LTLIBSIGSEGV; do
33615
33616   acl_save_prefix="$prefix"
33617   prefix="$acl_final_prefix"
33618   acl_save_exec_prefix="$exec_prefix"
33619   exec_prefix="$acl_final_exec_prefix"
33620   eval x=\"$x\"
33621   exec_prefix="$acl_save_exec_prefix"
33622   prefix="$acl_save_prefix"
33623
33624               case "$x" in
33625                 -L*)
33626                   dir=`echo "X$x" | sed -e 's/^X-L//'`
33627                                     if test -n "$acl_shlibext"; then
33628                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33629                       found_dir="$dir"
33630                       found_so="$dir/$libname$shrext"
33631                     else
33632                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33633                         ver=`(cd "$dir" && \
33634                               for f in "$libname$shrext".*; do echo "$f"; done \
33635                               | sed -e "s,^$libname$shrext\\\\.,," \
33636                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33637                               | sed 1q ) 2>/dev/null`
33638                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33639                           found_dir="$dir"
33640                           found_so="$dir/$libname$shrext.$ver"
33641                         fi
33642                       else
33643                         eval library_names=\"$acl_library_names_spec\"
33644                         for f in $library_names; do
33645                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33646                             found_dir="$dir"
33647                             found_so="$dir/$f"
33648                             break
33649                           fi
33650                         done
33651                       fi
33652                     fi
33653                   fi
33654                                     if test "X$found_dir" = "X"; then
33655                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33656                       found_dir="$dir"
33657                       found_a="$dir/$libname.$acl_libext"
33658                     fi
33659                   fi
33660                   if test "X$found_dir" != "X"; then
33661                     if test -f "$dir/$libname.la"; then
33662                       found_la="$dir/$libname.la"
33663                     fi
33664                   fi
33665                   ;;
33666               esac
33667               if test "X$found_dir" != "X"; then
33668                 break
33669               fi
33670             done
33671           fi
33672           if test "X$found_dir" != "X"; then
33673                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
33674             if test "X$found_so" != "X"; then
33675                                                         if test "$enable_rpath" = no \
33676                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
33677                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
33678                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
33679                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33680               else
33681                                                                                 haveit=
33682                 for x in $ltrpathdirs; do
33683                   if test "X$x" = "X$found_dir"; then
33684                     haveit=yes
33685                     break
33686                   fi
33687                 done
33688                 if test -z "$haveit"; then
33689                   ltrpathdirs="$ltrpathdirs $found_dir"
33690                 fi
33691                                 if test "$acl_hardcode_direct" = yes; then
33692                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33693                 else
33694                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
33695                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33696                                                             haveit=
33697                     for x in $rpathdirs; do
33698                       if test "X$x" = "X$found_dir"; then
33699                         haveit=yes
33700                         break
33701                       fi
33702                     done
33703                     if test -z "$haveit"; then
33704                       rpathdirs="$rpathdirs $found_dir"
33705                     fi
33706                   else
33707                                                                                 haveit=
33708                     for x in $LDFLAGS $LIBSIGSEGV; do
33709
33710   acl_save_prefix="$prefix"
33711   prefix="$acl_final_prefix"
33712   acl_save_exec_prefix="$exec_prefix"
33713   exec_prefix="$acl_final_exec_prefix"
33714   eval x=\"$x\"
33715   exec_prefix="$acl_save_exec_prefix"
33716   prefix="$acl_save_prefix"
33717
33718                       if test "X$x" = "X-L$found_dir"; then
33719                         haveit=yes
33720                         break
33721                       fi
33722                     done
33723                     if test -z "$haveit"; then
33724                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
33725                     fi
33726                     if test "$acl_hardcode_minus_L" != no; then
33727                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33728                     else
33729                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
33730                     fi
33731                   fi
33732                 fi
33733               fi
33734             else
33735               if test "X$found_a" != "X"; then
33736                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
33737               else
33738                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
33739               fi
33740             fi
33741                         additional_includedir=
33742             case "$found_dir" in
33743               */$acl_libdirstem | */$acl_libdirstem/)
33744                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
33745                 if test "$name" = 'sigsegv'; then
33746                   LIBSIGSEGV_PREFIX="$basedir"
33747                 fi
33748                 additional_includedir="$basedir/include"
33749                 ;;
33750               */$acl_libdirstem2 | */$acl_libdirstem2/)
33751                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
33752                 if test "$name" = 'sigsegv'; then
33753                   LIBSIGSEGV_PREFIX="$basedir"
33754                 fi
33755                 additional_includedir="$basedir/include"
33756                 ;;
33757               */$acl_libdirstem3 | */$acl_libdirstem3/)
33758                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
33759                 if test "$name" = 'sigsegv'; then
33760                   LIBSIGSEGV_PREFIX="$basedir"
33761                 fi
33762                 additional_includedir="$basedir/include"
33763                 ;;
33764             esac
33765             if test "X$additional_includedir" != "X"; then
33766                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
33767                 haveit=
33768                 if test "X$additional_includedir" = "X/usr/local/include"; then
33769                   if test -n "$GCC"; then
33770                     case $host_os in
33771                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33772                     esac
33773                   fi
33774                 fi
33775                 if test -z "$haveit"; then
33776                   for x in $CPPFLAGS $INCSIGSEGV; do
33777
33778   acl_save_prefix="$prefix"
33779   prefix="$acl_final_prefix"
33780   acl_save_exec_prefix="$exec_prefix"
33781   exec_prefix="$acl_final_exec_prefix"
33782   eval x=\"$x\"
33783   exec_prefix="$acl_save_exec_prefix"
33784   prefix="$acl_save_prefix"
33785
33786                     if test "X$x" = "X-I$additional_includedir"; then
33787                       haveit=yes
33788                       break
33789                     fi
33790                   done
33791                   if test -z "$haveit"; then
33792                     if test -d "$additional_includedir"; then
33793                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
33794                     fi
33795                   fi
33796                 fi
33797               fi
33798             fi
33799                         if test -n "$found_la"; then
33800                                                         save_libdir="$libdir"
33801               case "$found_la" in
33802                 */* | *\\*) . "$found_la" ;;
33803                 *) . "./$found_la" ;;
33804               esac
33805               libdir="$save_libdir"
33806                             for dep in $dependency_libs; do
33807                 case "$dep" in
33808                   -L*)
33809                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33810                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
33811                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
33812                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
33813                       haveit=
33814                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
33815                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
33816                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
33817                         if test -n "$GCC"; then
33818                           case $host_os in
33819                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33820                           esac
33821                         fi
33822                       fi
33823                       if test -z "$haveit"; then
33824                         haveit=
33825                         for x in $LDFLAGS $LIBSIGSEGV; do
33826
33827   acl_save_prefix="$prefix"
33828   prefix="$acl_final_prefix"
33829   acl_save_exec_prefix="$exec_prefix"
33830   exec_prefix="$acl_final_exec_prefix"
33831   eval x=\"$x\"
33832   exec_prefix="$acl_save_exec_prefix"
33833   prefix="$acl_save_prefix"
33834
33835                           if test "X$x" = "X-L$dependency_libdir"; then
33836                             haveit=yes
33837                             break
33838                           fi
33839                         done
33840                         if test -z "$haveit"; then
33841                           if test -d "$dependency_libdir"; then
33842                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
33843                           fi
33844                         fi
33845                         haveit=
33846                         for x in $LDFLAGS $LTLIBSIGSEGV; do
33847
33848   acl_save_prefix="$prefix"
33849   prefix="$acl_final_prefix"
33850   acl_save_exec_prefix="$exec_prefix"
33851   exec_prefix="$acl_final_exec_prefix"
33852   eval x=\"$x\"
33853   exec_prefix="$acl_save_exec_prefix"
33854   prefix="$acl_save_prefix"
33855
33856                           if test "X$x" = "X-L$dependency_libdir"; then
33857                             haveit=yes
33858                             break
33859                           fi
33860                         done
33861                         if test -z "$haveit"; then
33862                           if test -d "$dependency_libdir"; then
33863                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
33864                           fi
33865                         fi
33866                       fi
33867                     fi
33868                     ;;
33869                   -R*)
33870                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
33871                     if test "$enable_rpath" != no; then
33872                                                                   haveit=
33873                       for x in $rpathdirs; do
33874                         if test "X$x" = "X$dir"; then
33875                           haveit=yes
33876                           break
33877                         fi
33878                       done
33879                       if test -z "$haveit"; then
33880                         rpathdirs="$rpathdirs $dir"
33881                       fi
33882                                                                   haveit=
33883                       for x in $ltrpathdirs; do
33884                         if test "X$x" = "X$dir"; then
33885                           haveit=yes
33886                           break
33887                         fi
33888                       done
33889                       if test -z "$haveit"; then
33890                         ltrpathdirs="$ltrpathdirs $dir"
33891                       fi
33892                     fi
33893                     ;;
33894                   -l*)
33895                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
33896                     if test "X$dep" != Xc \
33897                        || case $host_os in
33898                             linux* | gnu* | k*bsd*-gnu) false ;;
33899                             *)                          true ;;
33900                           esac; then
33901                       names_next_round="$names_next_round $dep"
33902                     fi
33903                     ;;
33904                   *.la)
33905                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
33906                     ;;
33907                   *)
33908                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
33909                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
33910                     ;;
33911                 esac
33912               done
33913             fi
33914           else
33915                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
33916             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
33917           fi
33918         fi
33919       fi
33920     done
33921   done
33922   if test "X$rpathdirs" != "X"; then
33923     if test -n "$acl_hardcode_libdir_separator"; then
33924                         alldirs=
33925       for found_dir in $rpathdirs; do
33926         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
33927       done
33928             acl_save_libdir="$libdir"
33929       libdir="$alldirs"
33930       eval flag=\"$acl_hardcode_libdir_flag_spec\"
33931       libdir="$acl_save_libdir"
33932       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
33933     else
33934             for found_dir in $rpathdirs; do
33935         acl_save_libdir="$libdir"
33936         libdir="$found_dir"
33937         eval flag=\"$acl_hardcode_libdir_flag_spec\"
33938         libdir="$acl_save_libdir"
33939         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
33940       done
33941     fi
33942   fi
33943   if test "X$ltrpathdirs" != "X"; then
33944             for found_dir in $ltrpathdirs; do
33945       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
33946     done
33947   fi
33948
33949
33950
33951
33952
33953
33954         ac_save_CPPFLAGS="$CPPFLAGS"
33955
33956   for element in $INCSIGSEGV; do
33957     haveit=
33958     for x in $CPPFLAGS; do
33959
33960   acl_save_prefix="$prefix"
33961   prefix="$acl_final_prefix"
33962   acl_save_exec_prefix="$exec_prefix"
33963   exec_prefix="$acl_final_exec_prefix"
33964   eval x=\"$x\"
33965   exec_prefix="$acl_save_exec_prefix"
33966   prefix="$acl_save_prefix"
33967
33968       if test "X$x" = "X$element"; then
33969         haveit=yes
33970         break
33971       fi
33972     done
33973     if test -z "$haveit"; then
33974       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
33975     fi
33976   done
33977
33978
33979   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
33980 printf %s "checking for libsigsegv... " >&6; }
33981 if test ${ac_cv_libsigsegv+y}
33982 then :
33983   printf %s "(cached) " >&6
33984 else $as_nop
33985
33986     ac_save_LIBS="$LIBS"
33987                                 case " $LIBSIGSEGV" in
33988       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
33989       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
33990     esac
33991     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33992 /* end confdefs.h.  */
33993 #include <sigsegv.h>
33994 int
33995 main (void)
33996 {
33997 sigsegv_deinstall_handler();
33998   ;
33999   return 0;
34000 }
34001 _ACEOF
34002 if ac_fn_c_try_link "$LINENO"
34003 then :
34004   ac_cv_libsigsegv=yes
34005 else $as_nop
34006   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
34007 fi
34008 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34009     conftest$ac_exeext conftest.$ac_ext
34010     LIBS="$ac_save_LIBS"
34011
34012 fi
34013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
34014 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
34015   if test "$ac_cv_libsigsegv" = yes; then
34016     HAVE_LIBSIGSEGV=yes
34017
34018 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
34019
34020     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
34021 printf %s "checking how to link with libsigsegv... " >&6; }
34022     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
34023 printf "%s\n" "$LIBSIGSEGV" >&6; }
34024   else
34025     HAVE_LIBSIGSEGV=no
34026             CPPFLAGS="$ac_save_CPPFLAGS"
34027     LIBSIGSEGV=
34028     LTLIBSIGSEGV=
34029     LIBSIGSEGV_PREFIX=
34030   fi
34031
34032
34033
34034
34035
34036
34037
34038     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
34039
34040     if test "$gl_cv_lib_sigsegv" = yes; then
34041       SIGSEGV_H=
34042     fi
34043   fi
34044
34045    if test -n "$SIGSEGV_H"; then
34046   GL_GENERATE_SIGSEGV_H_TRUE=
34047   GL_GENERATE_SIGSEGV_H_FALSE='#'
34048 else
34049   GL_GENERATE_SIGSEGV_H_TRUE='#'
34050   GL_GENERATE_SIGSEGV_H_FALSE=
34051 fi
34052
34053   if test -n "$SIGSEGV_H"; then
34054
34055
34056     case "$host_os" in
34057       solaris2.11)
34058
34059 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
34060
34061         ;;
34062     esac
34063
34064
34065
34066   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
34067 printf %s "checking for stack direction... " >&6; }
34068 if test ${sv_cv_stack_direction_msg+y}
34069 then :
34070   printf %s "(cached) " >&6
34071 else $as_nop
34072
34073     case "$host_cpu" in
34074             a29k | \
34075       aarch64* | \
34076       alpha* | \
34077       arc | \
34078       arm* | strongarm* | xscale* | \
34079       avr | avr32 | \
34080       bfin | \
34081       c1 | c2 | c32 | c34 | c38 | \
34082       clipper | \
34083       cris | \
34084       d30v | \
34085       elxsi | \
34086       fr30 | \
34087       h8300 | \
34088       i?86 | x86_64 | \
34089       i860 | \
34090       ia64 | \
34091       m32r | \
34092       m68* | \
34093       m88k | \
34094       mcore | \
34095       microblaze | \
34096       mips* | \
34097       mmix | \
34098       mn10200 | \
34099       mn10300 | \
34100       nios2 | \
34101       nds32* | \
34102       ns32k | \
34103       pdp11 | \
34104       pj* | \
34105       powerpc* | rs6000 | \
34106       riscv* | \
34107       romp | \
34108       s390* | \
34109       sh* | \
34110       sparc* | \
34111       v850 | \
34112       vax | \
34113       xtensa)
34114         sv_cv_stack_direction=-1 ;;
34115       c4x | \
34116       dsp16xx | \
34117       i960 | \
34118       hppa* | parisc* | \
34119       stormy16 | \
34120       we32k)
34121         sv_cv_stack_direction=1 ;;
34122       *)
34123         if test $cross_compiling = no; then
34124           cat > conftest.c <<EOF
34125 #include <stdio.h>
34126 int
34127 find_stack_direction (int *addr, int depth)
34128 {
34129   int dir, dummy = 0;
34130   if (! addr)
34131     addr = &dummy;
34132   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
34133   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
34134   return dir + dummy;
34135 }
34136 int
34137 main (int argc, char *argv)
34138 {
34139   printf ("%d\n", find_stack_direction (NULL, argc + 20));
34140   return 0;
34141 }
34142 EOF
34143           { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34144   (eval $ac_link) 2>&5
34145   ac_status=$?
34146   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34147   test $ac_status = 0; }
34148           sv_cv_stack_direction=`./conftest`
34149         else
34150           sv_cv_stack_direction=0
34151         fi
34152         ;;
34153     esac
34154     case $sv_cv_stack_direction in
34155       1)  sv_cv_stack_direction_msg="grows up";;
34156       -1) sv_cv_stack_direction_msg="grows down";;
34157       *)  sv_cv_stack_direction_msg="unknown";;
34158     esac
34159
34160 fi
34161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
34162 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
34163
34164 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
34165
34166
34167
34168
34169
34170
34171
34172
34173   if test "$ac_cv_func_sigaltstack" = yes; then
34174     ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
34175 #include <signal.h>
34176 #if HAVE_SYS_SIGNAL_H
34177 # include <sys/signal.h>
34178 #endif
34179
34180 "
34181 if test "x$ac_cv_type_stack_t" = xyes
34182 then :
34183
34184 else $as_nop
34185
34186 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
34187
34188
34189 fi
34190
34191   fi
34192
34193   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
34194 printf %s "checking for working sigaltstack... " >&6; }
34195 if test ${sv_cv_sigaltstack+y}
34196 then :
34197   printf %s "(cached) " >&6
34198 else $as_nop
34199
34200     if test "$ac_cv_func_sigaltstack" = yes; then
34201       case "$host_os" in
34202         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
34203           # On MacOS X 10.2 or newer, just assume that if it compiles, it will
34204           # work. If we were to perform the real test, 1 Crash Report dialog
34205           # window would pop up.
34206           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207 /* end confdefs.h.  */
34208
34209             #include <signal.h>
34210 int
34211 main (void)
34212 {
34213 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
34214   ;
34215   return 0;
34216 }
34217 _ACEOF
34218 if ac_fn_c_try_link "$LINENO"
34219 then :
34220   sv_cv_sigaltstack="guessing yes"
34221 else $as_nop
34222   sv_cv_sigaltstack=no
34223 fi
34224 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34225     conftest$ac_exeext conftest.$ac_ext
34226           ;;
34227         *)
34228           if test "$cross_compiling" = yes
34229 then :
34230
34231                             case "$host_os" in
34232                 *)
34233                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34234 /* end confdefs.h.  */
34235
34236                     #include <signal.h>
34237 int
34238 main (void)
34239 {
34240 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
34241   ;
34242   return 0;
34243 }
34244 _ACEOF
34245 if ac_fn_c_try_link "$LINENO"
34246 then :
34247   sv_cv_sigaltstack="guessing yes"
34248 else $as_nop
34249   sv_cv_sigaltstack=no
34250 fi
34251 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34252     conftest$ac_exeext conftest.$ac_ext
34253                   ;;
34254               esac
34255
34256 else $as_nop
34257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34258 /* end confdefs.h.  */
34259
34260
34261 #include <stdlib.h>
34262 #include <signal.h>
34263 #if HAVE_SYS_SIGNAL_H
34264 # include <sys/signal.h>
34265 #endif
34266 #if HAVE_SETRLIMIT
34267 # include <sys/types.h>
34268 # include <sys/time.h>
34269 # include <sys/resource.h>
34270 #endif
34271 void stackoverflow_handler (int sig)
34272 {
34273   /* If we get here, the stack overflow was caught.  */
34274   exit (0);
34275 }
34276 volatile int * recurse_1 (volatile int n, volatile int *p)
34277 {
34278   if (n >= 0)
34279     *recurse_1 (n + 1, p) += n;
34280   return p;
34281 }
34282 int recurse (volatile int n)
34283 {
34284   int sum = 0;
34285   return *recurse_1 (n, &sum);
34286 }
34287 char mystack[2 * (1 << 24)];
34288 int main ()
34289 {
34290   stack_t altstack;
34291   struct sigaction action;
34292 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
34293   /* Before starting the endless recursion, try to be friendly to the user's
34294      machine.  On some Linux 2.2.x systems, there is no stack limit for user
34295      processes at all.  We don't want to kill such systems.  */
34296   struct rlimit rl;
34297   rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
34298   setrlimit (RLIMIT_STACK, &rl);
34299 #endif
34300   /* Install the alternate stack.  Use the midpoint of mystack, to guard
34301      against a buggy interpretation of ss_sp on IRIX.  */
34302 #ifdef SIGSTKSZ
34303   if (sizeof mystack / 2 < SIGSTKSZ)
34304     exit (3);
34305 #endif
34306   altstack.ss_sp = mystack + sizeof mystack / 2;
34307   altstack.ss_size = sizeof mystack / 2;
34308   altstack.ss_flags = 0; /* no SS_DISABLE */
34309   if (sigaltstack (&altstack, NULL) < 0)
34310     exit (1);
34311   /* Install the SIGSEGV handler.  */
34312   sigemptyset (&action.sa_mask);
34313   action.sa_handler = &stackoverflow_handler;
34314   action.sa_flags = SA_ONSTACK;
34315   sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
34316   sigaction (SIGBUS, &action, (struct sigaction *) NULL);
34317   /* Provoke a stack overflow.  */
34318   recurse (0);
34319   exit (2);
34320 }
34321 _ACEOF
34322 if ac_fn_c_try_run "$LINENO"
34323 then :
34324   sv_cv_sigaltstack=yes
34325 else $as_nop
34326   sv_cv_sigaltstack=no
34327 fi
34328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34329   conftest.$ac_objext conftest.beam conftest.$ac_ext
34330 fi
34331
34332           ;;
34333       esac
34334     else
34335       sv_cv_sigaltstack=no
34336     fi
34337
34338 fi
34339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
34340 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
34341   if test "$sv_cv_sigaltstack" != no; then
34342
34343 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
34344
34345
34346                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
34347 printf %s "checking for correct stack_t interpretation... " >&6; }
34348 if test ${sv_cv_sigaltstack_low_base+y}
34349 then :
34350   printf %s "(cached) " >&6
34351 else $as_nop
34352
34353       if test "$cross_compiling" = yes
34354 then :
34355
34356                 case "$host_os" in
34357           irix5*) sv_cv_sigaltstack_low_base="no" ;;
34358           *)      sv_cv_sigaltstack_low_base="guessing yes" ;;
34359         esac
34360
34361 else $as_nop
34362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34363 /* end confdefs.h.  */
34364
34365
34366 #include <stdlib.h>
34367 #include <signal.h>
34368 #if HAVE_SYS_SIGNAL_H
34369 # include <sys/signal.h>
34370 #endif
34371 volatile char *stack_lower_bound;
34372 volatile char *stack_upper_bound;
34373 static void check_stack_location (volatile char *addr)
34374 {
34375   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
34376     exit (0);
34377   else
34378     exit (1);
34379 }
34380 static void stackoverflow_handler (int sig)
34381 {
34382   char dummy;
34383   check_stack_location (&dummy);
34384 }
34385 char mystack[2 * (1 << 24)];
34386 int main ()
34387 {
34388   stack_t altstack;
34389   struct sigaction action;
34390   /* Install the alternate stack.  */
34391   altstack.ss_sp = mystack + sizeof mystack / 2;
34392   altstack.ss_size = sizeof mystack / 2;
34393   stack_lower_bound = (char *) altstack.ss_sp;
34394   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
34395   altstack.ss_flags = 0; /* no SS_DISABLE */
34396   if (sigaltstack (&altstack, NULL) < 0)
34397     exit (2);
34398   /* Install the SIGSEGV handler.  */
34399   sigemptyset (&action.sa_mask);
34400   action.sa_handler = &stackoverflow_handler;
34401   action.sa_flags = SA_ONSTACK;
34402   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
34403     exit(3);
34404   /* Provoke a SIGSEGV.  */
34405   raise (SIGSEGV);
34406   exit (3);
34407 }
34408 _ACEOF
34409 if ac_fn_c_try_run "$LINENO"
34410 then :
34411   sv_cv_sigaltstack_low_base=yes
34412 else $as_nop
34413   sv_cv_sigaltstack_low_base=no
34414 fi
34415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34416   conftest.$ac_objext conftest.beam conftest.$ac_ext
34417 fi
34418
34419
34420 fi
34421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
34422 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
34423     if test "$sv_cv_sigaltstack_low_base" = no; then
34424
34425 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
34426
34427     fi
34428   fi
34429
34430
34431   fi
34432
34433   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
34434 if test "x$ac_cv_header_stdint_h" = xyes
34435 then :
34436   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
34437
34438 fi
34439
34440     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
34441 printf %s "checking for SIZE_MAX... " >&6; }
34442 if test ${gl_cv_size_max+y}
34443 then :
34444   printf %s "(cached) " >&6
34445 else $as_nop
34446
34447     gl_cv_size_max=no
34448     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34449 /* end confdefs.h.  */
34450
34451 #include <limits.h>
34452 #if HAVE_STDINT_H
34453 #include <stdint.h>
34454 #endif
34455 #ifdef SIZE_MAX
34456 Found it
34457 #endif
34458
34459 _ACEOF
34460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34461   $EGREP "Found it" >/dev/null 2>&1
34462 then :
34463   gl_cv_size_max=yes
34464 fi
34465 rm -rf conftest*
34466
34467     if test $gl_cv_size_max != yes; then
34468                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
34469 #include <limits.h>"
34470 then :
34471
34472 else $as_nop
34473   size_t_bits_minus_1=
34474 fi
34475
34476       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
34477 then :
34478
34479 else $as_nop
34480   fits_in_uint=
34481 fi
34482
34483       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
34484         if test $fits_in_uint = 1; then
34485                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34486 /* end confdefs.h.  */
34487 #include <stddef.h>
34488                  extern size_t foo;
34489                  extern unsigned long foo;
34490
34491 int
34492 main (void)
34493 {
34494
34495   ;
34496   return 0;
34497 }
34498 _ACEOF
34499 if ac_fn_c_try_compile "$LINENO"
34500 then :
34501   fits_in_uint=0
34502 fi
34503 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34504         fi
34505                                 if test $fits_in_uint = 1; then
34506           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
34507         else
34508           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
34509         fi
34510       else
34511                 gl_cv_size_max='((size_t)~(size_t)0)'
34512       fi
34513     fi
34514
34515 fi
34516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
34517 printf "%s\n" "$gl_cv_size_max" >&6; }
34518   if test "$gl_cv_size_max" != yes; then
34519
34520 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
34521
34522   fi
34523
34524
34525
34526   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
34527 printf %s "checking for ssize_t... " >&6; }
34528 if test ${gt_cv_ssize_t+y}
34529 then :
34530   printf %s "(cached) " >&6
34531 else $as_nop
34532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34533 /* end confdefs.h.  */
34534 #include <sys/types.h>
34535 int
34536 main (void)
34537 {
34538 int x = sizeof (ssize_t *) + sizeof (ssize_t);
34539             return !x;
34540   ;
34541   return 0;
34542 }
34543 _ACEOF
34544 if ac_fn_c_try_compile "$LINENO"
34545 then :
34546   gt_cv_ssize_t=yes
34547 else $as_nop
34548   gt_cv_ssize_t=no
34549 fi
34550 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34551 fi
34552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
34553 printf "%s\n" "$gt_cv_ssize_t" >&6; }
34554   if test $gt_cv_ssize_t = no; then
34555
34556 printf "%s\n" "#define ssize_t int" >>confdefs.h
34557
34558   fi
34559
34560
34561
34562
34563
34564   case "$host_os" in
34565     mingw*)
34566                   REPLACE_STAT=1
34567       ;;
34568     *)
34569                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
34570 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
34571 if test ${gl_cv_func_stat_file_slash+y}
34572 then :
34573   printf %s "(cached) " >&6
34574 else $as_nop
34575   touch conftest.tmp
34576          # Assume that if we have lstat, we can also check symlinks.
34577          if test $ac_cv_func_lstat = yes; then
34578            ln -s conftest.tmp conftest.lnk
34579          fi
34580          if test "$cross_compiling" = yes
34581 then :
34582   case "$host_os" in
34583                                # Guess yes on Linux systems.
34584               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
34585                                # Guess yes on glibc systems.
34586               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
34587                                # If we don't know, obey --enable-cross-guesses.
34588               *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
34589             esac
34590
34591 else $as_nop
34592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34593 /* end confdefs.h.  */
34594 #include <sys/stat.h>
34595
34596 int
34597 main (void)
34598 {
34599 int result = 0;
34600                struct stat st;
34601                if (!stat ("conftest.tmp/", &st))
34602                  result |= 1;
34603 #if HAVE_LSTAT
34604                if (!stat ("conftest.lnk/", &st))
34605                  result |= 2;
34606 #endif
34607                return result;
34608
34609   ;
34610   return 0;
34611 }
34612 _ACEOF
34613 if ac_fn_c_try_run "$LINENO"
34614 then :
34615   gl_cv_func_stat_file_slash=yes
34616 else $as_nop
34617   gl_cv_func_stat_file_slash=no
34618 fi
34619 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34620   conftest.$ac_objext conftest.beam conftest.$ac_ext
34621 fi
34622
34623          rm -f conftest.tmp conftest.lnk
34624 fi
34625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
34626 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
34627       case $gl_cv_func_stat_file_slash in
34628         *no)
34629           REPLACE_STAT=1
34630
34631 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
34632 ;;
34633       esac
34634       case $host_os in
34635                 solaris*)
34636           REPLACE_FSTAT=1 ;;
34637       esac
34638       ;;
34639   esac
34640
34641   if test $REPLACE_STAT = 1; then
34642
34643
34644
34645
34646
34647
34648
34649
34650   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
34651
34652     case "$host_os" in
34653       mingw*)
34654
34655
34656
34657
34658
34659
34660
34661
34662   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
34663
34664         ;;
34665     esac
34666
34667
34668
34669   :
34670
34671   fi
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681           GL_GNULIB_STAT=1
34682
34683
34684
34685
34686
34687 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
34688
34689
34690
34691
34692
34693
34694
34695   ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
34696      #include <sys/stat.h>
34697 "
34698 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
34699 then :
34700
34701 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
34702
34703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
34704 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
34705 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
34706 then :
34707   printf %s "(cached) " >&6
34708 else $as_nop
34709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34710 /* end confdefs.h.  */
34711
34712             #include <sys/types.h>
34713             #include <sys/stat.h>
34714             #if HAVE_SYS_TIME_H
34715             # include <sys/time.h>
34716             #endif
34717             #include <time.h>
34718             struct timespec ts;
34719             struct stat st;
34720
34721 int
34722 main (void)
34723 {
34724
34725             st.st_atim = ts;
34726
34727   ;
34728   return 0;
34729 }
34730 _ACEOF
34731 if ac_fn_c_try_compile "$LINENO"
34732 then :
34733   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
34734 else $as_nop
34735   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
34736 fi
34737 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34738 fi
34739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
34740 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
34741      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
34742
34743 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
34744
34745      fi
34746 else $as_nop
34747   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
34748         #include <sys/stat.h>
34749 "
34750 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
34751 then :
34752
34753 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
34754
34755
34756 else $as_nop
34757   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
34758            #include <sys/stat.h>
34759 "
34760 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
34761 then :
34762
34763 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
34764
34765
34766 else $as_nop
34767   ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
34768               #include <sys/stat.h>
34769 "
34770 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
34771 then :
34772
34773 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
34774
34775
34776 fi
34777
34778 fi
34779
34780 fi
34781
34782 fi
34783
34784
34785
34786
34787
34788   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
34789      #include <sys/stat.h>
34790 "
34791 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
34792 then :
34793
34794 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
34795
34796
34797 else $as_nop
34798   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
34799         #include <sys/stat.h>
34800 "
34801 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
34802 then :
34803
34804 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
34805
34806
34807 else $as_nop
34808   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
34809           #include <sys/stat.h>
34810 "
34811 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
34812 then :
34813
34814 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
34815
34816
34817 fi
34818
34819 fi
34820
34821 fi
34822
34823
34824
34825   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
34826 printf %s "checking for working stdalign.h... " >&6; }
34827 if test ${gl_cv_header_working_stdalign_h+y}
34828 then :
34829   printf %s "(cached) " >&6
34830 else $as_nop
34831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34832 /* end confdefs.h.  */
34833 #include <stdint.h>
34834             #include <stdalign.h>
34835             #include <stddef.h>
34836
34837             /* Test that alignof yields a result consistent with offsetof.
34838                This catches GCC bug 52023
34839                <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
34840             #ifdef __cplusplus
34841                template <class t> struct alignof_helper { char a; t b; };
34842             # define ao(type) offsetof (alignof_helper<type>, b)
34843             #else
34844             # define ao(type) offsetof (struct { char a; type b; }, b)
34845             #endif
34846             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
34847             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
34848             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
34849
34850             /* Test _Alignas only on platforms where gnulib can help.  */
34851             #if \
34852                 ((defined __cplusplus && 201103 <= __cplusplus) \
34853                  || (__TINYC__ && defined __attribute__) \
34854                  || (defined __APPLE__ && defined __MACH__ \
34855                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
34856                      : __GNUC__) \
34857                  || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
34858                  || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
34859                  || 1300 <= _MSC_VER)
34860               struct alignas_test { char c; char alignas (8) alignas_8; };
34861               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
34862                                 ? 1 : -1];
34863             #endif
34864
34865 int
34866 main (void)
34867 {
34868
34869   ;
34870   return 0;
34871 }
34872 _ACEOF
34873 if ac_fn_c_try_compile "$LINENO"
34874 then :
34875   gl_cv_header_working_stdalign_h=yes
34876 else $as_nop
34877   gl_cv_header_working_stdalign_h=no
34878 fi
34879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34880 fi
34881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
34882 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
34883
34884   if test $gl_cv_header_working_stdalign_h = yes; then
34885     STDALIGN_H=''
34886   else
34887     STDALIGN_H='stdalign.h'
34888   fi
34889
34890
34891    if test -n "$STDALIGN_H"; then
34892   GL_GENERATE_STDALIGN_H_TRUE=
34893   GL_GENERATE_STDALIGN_H_FALSE='#'
34894 else
34895   GL_GENERATE_STDALIGN_H_TRUE='#'
34896   GL_GENERATE_STDALIGN_H_FALSE=
34897 fi
34898
34899
34900
34901   STDARG_H=''
34902   NEXT_STDARG_H='<stdarg.h>'
34903   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
34904 printf %s "checking for va_copy... " >&6; }
34905 if test ${gl_cv_func_va_copy+y}
34906 then :
34907   printf %s "(cached) " >&6
34908 else $as_nop
34909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34910 /* end confdefs.h.  */
34911 #include <stdarg.h>
34912 int
34913 main (void)
34914 {
34915
34916 #ifndef va_copy
34917 void (*func) (va_list, va_list) = va_copy;
34918 #endif
34919
34920   ;
34921   return 0;
34922 }
34923 _ACEOF
34924 if ac_fn_c_try_compile "$LINENO"
34925 then :
34926   gl_cv_func_va_copy=yes
34927 else $as_nop
34928   gl_cv_func_va_copy=no
34929 fi
34930 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34931
34932 fi
34933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
34934 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
34935   if test $gl_cv_func_va_copy = no; then
34936                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34937 /* end confdefs.h.  */
34938 #if defined _AIX && !defined __GNUC__
34939         AIX vaccine
34940        #endif
34941
34942 _ACEOF
34943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34944   $EGREP "vaccine" >/dev/null 2>&1
34945 then :
34946   gl_aixcc=yes
34947 else $as_nop
34948   gl_aixcc=no
34949 fi
34950 rm -rf conftest*
34951
34952     if test $gl_aixcc = yes; then
34953             STDARG_H=stdarg.h
34954
34955
34956
34957
34958
34959
34960
34961
34962      if test $gl_cv_have_include_next = yes; then
34963        gl_cv_next_stdarg_h='<'stdarg.h'>'
34964      else
34965        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
34966 printf %s "checking absolute name of <stdarg.h>... " >&6; }
34967 if test ${gl_cv_next_stdarg_h+y}
34968 then :
34969   printf %s "(cached) " >&6
34970 else $as_nop
34971
34972
34973
34974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34975 /* end confdefs.h.  */
34976 #include <stdarg.h>
34977 _ACEOF
34978                 case "$host_os" in
34979     aix*) gl_absname_cpp="$ac_cpp -C" ;;
34980     *)    gl_absname_cpp="$ac_cpp" ;;
34981   esac
34982
34983   case "$host_os" in
34984     mingw*)
34985                                           gl_dirsep_regex='[/\\]'
34986       ;;
34987     *)
34988       gl_dirsep_regex='\/'
34989       ;;
34990   esac
34991       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34992   gl_header_literal_regex=`echo 'stdarg.h' \
34993                            | sed -e "$gl_make_literal_regex_sed"`
34994   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34995       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34996       s|^/[^/]|//&|
34997       p
34998       q
34999     }'
35000
35001         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35002   sed -n "$gl_absolute_header_sed"`
35003
35004            gl_header=$gl_cv_absolute_stdarg_h
35005            gl_cv_next_stdarg_h='"'$gl_header'"'
35006
35007
35008 fi
35009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
35010 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
35011      fi
35012      NEXT_STDARG_H=$gl_cv_next_stdarg_h
35013
35014      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35015        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35016        gl_next_as_first_directive='<'stdarg.h'>'
35017      else
35018        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35019        gl_next_as_first_directive=$gl_cv_next_stdarg_h
35020      fi
35021      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
35022
35023
35024
35025
35026             if test "$gl_cv_next_stdarg_h" = '""'; then
35027         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
35028         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
35029       fi
35030     else
35031
35032
35033   exec 9>&6 6>/dev/null
35034
35035     if test ${gl_cv_func___va_copy+y}
35036 then :
35037   printf %s "(cached) " >&6
35038 else $as_nop
35039
35040         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35041 /* end confdefs.h.  */
35042 #include <stdarg.h>
35043 int
35044 main (void)
35045 {
35046
35047 #ifndef __va_copy
35048 error, bail out
35049 #endif
35050
35051   ;
35052   return 0;
35053 }
35054 _ACEOF
35055 if ac_fn_c_try_compile "$LINENO"
35056 then :
35057   gl_cv_func___va_copy=yes
35058 else $as_nop
35059   gl_cv_func___va_copy=no
35060 fi
35061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35062 fi
35063
35064
35065   exec 6>&9 9>&-
35066
35067
35068       if test $gl_cv_func___va_copy = yes; then
35069
35070 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
35071
35072       else
35073
35074
35075 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
35076
35077       fi
35078     fi
35079   fi
35080
35081    if test -n "$STDARG_H"; then
35082   GL_GENERATE_STDARG_H_TRUE=
35083   GL_GENERATE_STDARG_H_FALSE='#'
35084 else
35085   GL_GENERATE_STDARG_H_TRUE='#'
35086   GL_GENERATE_STDARG_H_FALSE=
35087 fi
35088
35089
35090
35091
35092
35093
35094
35095           if test "$ac_cv_header_stdbool_h" = yes; then
35096     case "$host_os" in
35097       solaris*)
35098         if test -z "$GCC"; then
35099           STDBOOL_H='stdbool.h'
35100         else
35101           STDBOOL_H=''
35102         fi
35103         ;;
35104       *)
35105         STDBOOL_H=''
35106         ;;
35107     esac
35108   else
35109     STDBOOL_H='stdbool.h'
35110   fi
35111
35112    if test -n "$STDBOOL_H"; then
35113   GL_GENERATE_STDBOOL_H_TRUE=
35114   GL_GENERATE_STDBOOL_H_FALSE='#'
35115 else
35116   GL_GENERATE_STDBOOL_H_TRUE='#'
35117   GL_GENERATE_STDBOOL_H_FALSE=
35118 fi
35119
35120
35121   if test "$ac_cv_type__Bool" = yes; then
35122     HAVE__BOOL=1
35123   else
35124     HAVE__BOOL=0
35125   fi
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150           GL_GNULIB_FSCANF=1
35151
35152
35153
35154
35155
35156 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
35157
35158
35159
35160
35161
35162 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174           GL_GNULIB_SCANF=1
35175
35176
35177
35178
35179
35180 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
35181
35182
35183
35184
35185
35186 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198           GL_GNULIB_FGETC=1
35199
35200
35201
35202
35203
35204 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217           GL_GNULIB_GETC=1
35218
35219
35220
35221
35222
35223 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236           GL_GNULIB_GETCHAR=1
35237
35238
35239
35240
35241
35242 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255           GL_GNULIB_FGETS=1
35256
35257
35258
35259
35260
35261 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274           GL_GNULIB_FREAD=1
35275
35276
35277
35278
35279
35280 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293           GL_GNULIB_FPRINTF=1
35294
35295
35296
35297
35298
35299 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312           GL_GNULIB_PRINTF=1
35313
35314
35315
35316
35317
35318 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331           GL_GNULIB_VFPRINTF=1
35332
35333
35334
35335
35336
35337 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350           GL_GNULIB_VPRINTF=1
35351
35352
35353
35354
35355
35356 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369           GL_GNULIB_FPUTC=1
35370
35371
35372
35373
35374
35375 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388           GL_GNULIB_PUTC=1
35389
35390
35391
35392
35393
35394 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407           GL_GNULIB_PUTCHAR=1
35408
35409
35410
35411
35412
35413 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426           GL_GNULIB_FPUTS=1
35427
35428
35429
35430
35431
35432 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445           GL_GNULIB_PUTS=1
35446
35447
35448
35449
35450
35451 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464           GL_GNULIB_FWRITE=1
35465
35466
35467
35468
35469
35470 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
35484 if test "x$ac_cv_func_strcasecmp" = xyes
35485 then :
35486   printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
35487
35488 fi
35489
35490   if test $ac_cv_func_strcasecmp = no; then
35491     HAVE_STRCASECMP=0
35492   fi
35493
35494
35495
35496   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
35497 if test "x$ac_cv_func_strncasecmp" = xyes
35498 then :
35499   printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
35500
35501 fi
35502
35503   if test $ac_cv_func_strncasecmp = yes; then
35504     HAVE_STRNCASECMP=1
35505   else
35506     HAVE_STRNCASECMP=0
35507   fi
35508   ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35509 if test "x$ac_cv_have_decl_strncasecmp" = xyes
35510 then :
35511   ac_have_decl=1
35512 else $as_nop
35513   ac_have_decl=0
35514 fi
35515 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
35516
35517   if test $ac_cv_have_decl_strncasecmp = no; then
35518     HAVE_DECL_STRNCASECMP=0
35519   fi
35520
35521
35522   if test $HAVE_STRCASECMP = 0; then
35523
35524
35525
35526
35527
35528
35529
35530
35531   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
35532
35533
35534   :
35535
35536   fi
35537   if test $HAVE_STRNCASECMP = 0; then
35538
35539
35540
35541
35542
35543
35544
35545
35546   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
35547
35548
35549   :
35550
35551   fi
35552
35553
35554
35555
35556
35557
35558
35559   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35560     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
35561 printf %s "checking for working strerror function... " >&6; }
35562 if test ${gl_cv_func_working_strerror+y}
35563 then :
35564   printf %s "(cached) " >&6
35565 else $as_nop
35566   if test "$cross_compiling" = yes
35567 then :
35568   case "$host_os" in
35569                           # Guess yes on glibc systems.
35570            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
35571                           # Guess yes on musl systems.
35572            *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
35573                           # If we don't know, obey --enable-cross-guesses.
35574            *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
35575          esac
35576
35577 else $as_nop
35578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35579 /* end confdefs.h.  */
35580 #include <string.h>
35581
35582 int
35583 main (void)
35584 {
35585 if (!*strerror (-2)) return 1;
35586   ;
35587   return 0;
35588 }
35589 _ACEOF
35590 if ac_fn_c_try_run "$LINENO"
35591 then :
35592   gl_cv_func_working_strerror=yes
35593 else $as_nop
35594   gl_cv_func_working_strerror=no
35595 fi
35596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35597   conftest.$ac_objext conftest.beam conftest.$ac_ext
35598 fi
35599
35600
35601 fi
35602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
35603 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
35604     case "$gl_cv_func_working_strerror" in
35605       *yes) ;;
35606       *)
35607                         REPLACE_STRERROR=1
35608         ;;
35609     esac
35610
35611                   case "$gl_cv_func_strerror_r_works" in
35612         *no) REPLACE_STRERROR=1 ;;
35613       esac
35614
35615   else
35616             REPLACE_STRERROR=1
35617   fi
35618
35619   if test $REPLACE_STRERROR = 1; then
35620
35621
35622
35623
35624
35625
35626
35627
35628   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
35629
35630   fi
35631
35632
35633 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645           GL_GNULIB_STRERROR=1
35646
35647
35648
35649
35650
35651 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
35652
35653
35654
35655
35656
35657   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
35658
35659
35660
35661
35662
35663
35664
35665
35666   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
35667
35668
35669
35670
35671
35672   if test $ac_cv_header_sys_socket_h != yes; then
35673                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35674 if test "x$ac_cv_header_winsock2_h" = xyes
35675 then :
35676   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
35677
35678 fi
35679
35680   fi
35681   if test "$ac_cv_header_winsock2_h" = yes; then
35682     HAVE_WINSOCK2_H=1
35683     UNISTD_H_HAVE_WINSOCK2_H=1
35684     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35685   else
35686     HAVE_WINSOCK2_H=0
35687   fi
35688
35689
35690   fi
35691   if test $gl_cond_libtool = false; then
35692     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
35693     gl_libdeps="$gl_libdeps $LIBICONV"
35694   fi
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713   if test $ac_cv_have_decl_strnlen = no; then
35714     HAVE_DECL_STRNLEN=0
35715   else
35716
35717          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
35718 printf %s "checking for working strnlen... " >&6; }
35719 if test ${ac_cv_func_strnlen_working+y}
35720 then :
35721   printf %s "(cached) " >&6
35722 else $as_nop
35723   if test "$cross_compiling" = yes
35724 then :
35725   # Guess no on AIX systems, yes otherwise.
35726                 case "$host_os" in
35727                   aix*) ac_cv_func_strnlen_working=no;;
35728                   *)    ac_cv_func_strnlen_working=yes;;
35729                 esac
35730 else $as_nop
35731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35732 /* end confdefs.h.  */
35733 $ac_includes_default
35734 int
35735 main (void)
35736 {
35737
35738 #define S "foobar"
35739 #define S_LEN (sizeof S - 1)
35740
35741   /* At least one implementation is buggy: that of AIX 4.3 would
35742      give strnlen (S, 1) == 3.  */
35743
35744   int i;
35745   for (i = 0; i < S_LEN + 1; ++i)
35746     {
35747       int expected = i <= S_LEN ? i : S_LEN;
35748       if (strnlen (S, i) != expected)
35749         return 1;
35750     }
35751   return 0;
35752
35753   ;
35754   return 0;
35755 }
35756 _ACEOF
35757 if ac_fn_c_try_run "$LINENO"
35758 then :
35759   ac_cv_func_strnlen_working=yes
35760 else $as_nop
35761   ac_cv_func_strnlen_working=no
35762 fi
35763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35764   conftest.$ac_objext conftest.beam conftest.$ac_ext
35765 fi
35766
35767 fi
35768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
35769 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
35770 test $ac_cv_func_strnlen_working = no && :
35771
35772
35773     if test $ac_cv_func_strnlen_working = no; then
35774       REPLACE_STRNLEN=1
35775     fi
35776   fi
35777
35778   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
35779
35780
35781
35782
35783
35784
35785
35786
35787   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
35788
35789     :
35790   fi
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800           GL_GNULIB_STRNLEN=1
35801
35802
35803
35804
35805
35806 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
35807
35808
35809
35810
35811
35812
35813
35814   if test $ac_cv_func_strptime != yes; then
35815     HAVE_STRPTIME=0
35816   fi
35817
35818   if test $HAVE_STRPTIME = 0; then
35819
35820
35821
35822
35823
35824
35825
35826
35827   gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
35828
35829
35830
35831   :
35832
35833   fi
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843           GL_GNULIB_STRPTIME=1
35844
35845
35846
35847
35848
35849 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
35850
35851
35852
35853
35854
35855
35856
35857
35858   if test "$ac_cv_have_decl_strtoimax" != yes; then
35859     HAVE_DECL_STRTOIMAX=0
35860   fi
35861
35862   if test "$ac_cv_func_strtoimax" = yes; then
35863     HAVE_STRTOIMAX=1
35864              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
35865 printf %s "checking whether strtoimax works... " >&6; }
35866 if test ${gl_cv_func_strtoimax+y}
35867 then :
35868   printf %s "(cached) " >&6
35869 else $as_nop
35870   if test "$cross_compiling" = yes
35871 then :
35872   case "$host_os" in
35873                     # Guess no on AIX 5.
35874             aix5*)  gl_cv_func_strtoimax="guessing no" ;;
35875                     # Guess yes on native Windows.
35876             mingw*) gl_cv_func_strtoimax="guessing yes" ;;
35877                     # Guess yes otherwise.
35878             *)      gl_cv_func_strtoimax="guessing yes" ;;
35879           esac
35880
35881 else $as_nop
35882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35883 /* end confdefs.h.  */
35884
35885 #include <errno.h>
35886 #include <string.h>
35887 #include <inttypes.h>
35888 int main ()
35889 {
35890   if (sizeof (intmax_t) > sizeof (int))
35891     {
35892       const char *s = "4294967295";
35893       char *p;
35894       intmax_t res;
35895       errno = 0;
35896       res = strtoimax (s, &p, 10);
35897       if (p != s + strlen (s))
35898         return 1;
35899       if (errno != 0)
35900         return 2;
35901       if (res != (intmax_t) 65535 * (intmax_t) 65537)
35902         return 3;
35903     }
35904   else
35905     {
35906       const char *s = "2147483647";
35907       char *p;
35908       intmax_t res;
35909       errno = 0;
35910       res = strtoimax (s, &p, 10);
35911       if (p != s + strlen (s))
35912         return 1;
35913       if (errno != 0)
35914         return 2;
35915       if (res != 2147483647)
35916         return 3;
35917     }
35918   return 0;
35919 }
35920
35921 _ACEOF
35922 if ac_fn_c_try_run "$LINENO"
35923 then :
35924   gl_cv_func_strtoimax=yes
35925 else $as_nop
35926   gl_cv_func_strtoimax=no
35927 fi
35928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35929   conftest.$ac_objext conftest.beam conftest.$ac_ext
35930 fi
35931
35932
35933 fi
35934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
35935 printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
35936     case "$gl_cv_func_strtoimax" in
35937       *no) REPLACE_STRTOIMAX=1 ;;
35938     esac
35939   else
35940     if test "$ac_cv_have_decl_strtoimax" = yes; then
35941       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
35942       REPLACE_STRTOIMAX=1
35943     fi
35944     HAVE_STRTOIMAX=0
35945   fi
35946
35947   if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
35948
35949
35950
35951
35952
35953
35954
35955
35956   gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
35957
35958
35959   ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35960 if test "x$ac_cv_have_decl_strtoll" = xyes
35961 then :
35962   ac_have_decl=1
35963 else $as_nop
35964   ac_have_decl=0
35965 fi
35966 printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
35967
35968
35969   fi
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979           GL_GNULIB_STRTOIMAX=1
35980
35981
35982
35983
35984
35985
35986
35987   ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
35988 if test "x$ac_cv_func_strtoll" = xyes
35989 then :
35990   printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
35991
35992 fi
35993
35994   if test $ac_cv_func_strtoll = yes; then
35995     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
35996 printf %s "checking whether strtoll works... " >&6; }
35997 if test ${gl_cv_func_strtoll_works+y}
35998 then :
35999   printf %s "(cached) " >&6
36000 else $as_nop
36001   if test "$cross_compiling" = yes
36002 then :
36003   case "$host_os" in
36004                     # Guess no on native Windows.
36005             mingw*) gl_cv_func_strtoll_works="guessing no" ;;
36006             *)      gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
36007           esac
36008
36009 else $as_nop
36010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36011 /* end confdefs.h.  */
36012 #include <stdlib.h>
36013 int
36014 main (void)
36015 {
36016 int result = 0;
36017               char *term;
36018               /* This test fails on Minix and native Windows.  */
36019               {
36020                 const char input[] = "0x";
36021                 (void) strtoll (input, &term, 16);
36022                 if (term != input + 1)
36023                   result |= 1;
36024               }
36025               return result;
36026
36027   ;
36028   return 0;
36029 }
36030
36031 _ACEOF
36032 if ac_fn_c_try_run "$LINENO"
36033 then :
36034   gl_cv_func_strtoll_works=yes
36035 else $as_nop
36036   gl_cv_func_strtoll_works=no
36037 fi
36038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36039   conftest.$ac_objext conftest.beam conftest.$ac_ext
36040 fi
36041
36042
36043 fi
36044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
36045 printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
36046     case "$gl_cv_func_strtoll_works" in
36047       *yes) ;;
36048       *)    REPLACE_STRTOLL=1 ;;
36049     esac
36050   else
36051     HAVE_STRTOLL=0
36052   fi
36053
36054   if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
36055
36056
36057
36058
36059
36060
36061
36062
36063   gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
36064
36065
36066   :
36067
36068   fi
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078           GL_GNULIB_STRTOLL=1
36079
36080
36081
36082
36083
36084 printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126   :
36127
36128
36129
36130
36131 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147       ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
36148          gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36149          been included before.  */
36150       #if defined __MINGW32__
36151       # include <unistd.h>
36152       #endif
36153       #include <time.h>
36154
36155 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36156 if test "x$ac_cv_have_decl_localtime_r" = xyes
36157 then :
36158   ac_have_decl=1
36159 else $as_nop
36160   ac_have_decl=0
36161 fi
36162 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
36163
36164   if test $ac_cv_have_decl_localtime_r = no; then
36165     HAVE_DECL_LOCALTIME_R=0
36166   fi
36167
36168
36169   if test $ac_cv_func_localtime_r = yes; then
36170     HAVE_LOCALTIME_R=1
36171     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
36172 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
36173 if test ${gl_cv_time_r_posix+y}
36174 then :
36175   printf %s "(cached) " >&6
36176 else $as_nop
36177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36178 /* end confdefs.h.  */
36179 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
36180                  gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36181                  been included before.  */
36182               #if defined __MINGW32__
36183               # include <unistd.h>
36184               #endif
36185               #include <time.h>
36186
36187 int
36188 main (void)
36189 {
36190 /* We don't need to append 'restrict's to the argument types,
36191                  even though the POSIX signature has the 'restrict's,
36192                  since C99 says they can't affect type compatibility.  */
36193               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
36194               if (ptr) return 0;
36195               /* Check the return type is a pointer.
36196                  On HP-UX 10 it is 'int'.  */
36197               *localtime_r (0, 0);
36198   ;
36199   return 0;
36200 }
36201
36202 _ACEOF
36203 if ac_fn_c_try_compile "$LINENO"
36204 then :
36205   gl_cv_time_r_posix=yes
36206 else $as_nop
36207   gl_cv_time_r_posix=no
36208 fi
36209 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36210
36211 fi
36212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
36213 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
36214     if test $gl_cv_time_r_posix = yes; then
36215       REPLACE_LOCALTIME_R=0
36216     else
36217       REPLACE_LOCALTIME_R=1
36218     fi
36219   else
36220     HAVE_LOCALTIME_R=0
36221                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
36222 printf %s "checking whether localtime_r exists as an inline function... " >&6; }
36223 if test ${gl_cv_func_localtime_r_inline+y}
36224 then :
36225   printf %s "(cached) " >&6
36226 else $as_nop
36227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36228 /* end confdefs.h.  */
36229 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
36230                  gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36231                  been included before.  */
36232               #if defined __MINGW32__
36233               # include <unistd.h>
36234               #endif
36235               #include <time.h>
36236
36237 int
36238 main (void)
36239 {
36240 time_t a;
36241               struct tm r;
36242               localtime_r (&a, &r);
36243
36244   ;
36245   return 0;
36246 }
36247
36248 _ACEOF
36249 if ac_fn_c_try_link "$LINENO"
36250 then :
36251   gl_cv_func_localtime_r_inline=yes
36252 else $as_nop
36253   gl_cv_func_localtime_r_inline=no
36254 fi
36255 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36256     conftest$ac_exeext conftest.$ac_ext
36257
36258 fi
36259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
36260 printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
36261     if test $gl_cv_func_localtime_r_inline = yes; then
36262       REPLACE_LOCALTIME_R=1
36263     fi
36264   fi
36265
36266   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
36267
36268
36269
36270
36271
36272
36273
36274
36275   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
36276
36277
36278   :
36279
36280   fi
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290           GL_GNULIB_TIME_R=1
36291
36292
36293
36294
36295
36296 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
36297
36298
36299
36300
36301
36302
36303
36304
36305   # On Mac OS X 10.6, localtime loops forever with some time_t values.
36306   # See Bug#27706, Bug#27736, and
36307   # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
36308   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
36309 printf %s "checking whether localtime works even near extrema... " >&6; }
36310 if test ${gl_cv_func_localtime_works+y}
36311 then :
36312   printf %s "(cached) " >&6
36313 else $as_nop
36314   gl_cv_func_localtime_works=yes
36315      if test "$cross_compiling" = yes
36316 then :
36317   gl_cv_func_localtime_works="guessing yes"
36318 else $as_nop
36319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36320 /* end confdefs.h.  */
36321 #include <stdlib.h>
36322             #include <string.h>
36323             #include <unistd.h>
36324             #include <time.h>
36325
36326 int
36327 main (void)
36328 {
36329
36330             time_t t = -67768038400666600;
36331             struct tm *tm;
36332             char *tz = getenv ("TZ");
36333             if (! (tz && strcmp (tz, "QQQ0") == 0))
36334               return 0;
36335             alarm (2);
36336             tm = localtime (&t);
36337             /* Use TM and *TM to suppress over-optimization.  */
36338             return tm && tm->tm_isdst;
36339
36340   ;
36341   return 0;
36342 }
36343 _ACEOF
36344 if ac_fn_c_try_run "$LINENO"
36345 then :
36346   (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
36347            gl_cv_func_localtime_works=no
36348 fi
36349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36350   conftest.$ac_objext conftest.beam conftest.$ac_ext
36351 fi
36352
36353 fi
36354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
36355 printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
36356   if test "$gl_cv_func_localtime_works" = no; then
36357
36358 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
36359
36360   fi
36361
36362   ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
36363 "
36364 if test "x$ac_cv_type_timezone_t" = xyes
36365 then :
36366
36367 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
36368
36369
36370 fi
36371
36372   if test "$ac_cv_type_timezone_t" = yes; then
36373     HAVE_TIMEZONE_T=1
36374   fi
36375
36376   if test $HAVE_TIMEZONE_T = 0; then
36377
36378
36379
36380
36381
36382
36383
36384
36385   gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
36386
36387   fi
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397           GL_GNULIB_TIME_RZ=1
36398
36399
36400
36401
36402
36403 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
36404
36405
36406
36407
36408
36409
36410   REPLACE_TIMEGM=0
36411
36412   if test $ac_cv_func_timegm = yes; then
36413     if test "$gl_cv_func_working_mktime" != yes; then
36414       # Assume that timegm is buggy if mktime is.
36415       REPLACE_TIMEGM=1
36416     fi
36417   else
36418     HAVE_TIMEGM=0
36419   fi
36420
36421   if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
36422
36423
36424
36425
36426
36427
36428
36429
36430   gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
36431
36432
36433   :
36434
36435   fi
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445           GL_GNULIB_TIMEGM=1
36446
36447
36448
36449
36450
36451 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
36452
36453
36454
36455   :
36456
36457
36458
36459   REPLACE_TZSET=0
36460   case "$host_os" in
36461     mingw*) REPLACE_TZSET=1 ;;
36462   esac
36463
36464   if test $REPLACE_TZSET = 1; then
36465
36466
36467
36468
36469
36470
36471
36472
36473   gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
36474
36475   fi
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485           GL_GNULIB_TZSET=1
36486
36487
36488
36489
36490
36491 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503       if  { test "$HAVE_LIBUNISTRING" != yes \
36504     || {
36505
36506
36507
36508             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36509             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36510                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36511                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36512                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36513                          }
36514                     }
36515                }
36516
36517
36518
36519
36520        }
36521   }; then
36522     LIBUNISTRING_UNISTR_H='unistr.h'
36523   else
36524     LIBUNISTRING_UNISTR_H=
36525   fi
36526
36527
36528
36529
36530 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
36531
36532
36533
36534
36535        if  { test "$HAVE_LIBUNISTRING" != yes \
36536     || {
36537
36538
36539
36540             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36541             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36542                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36543                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36544                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
36545                          }
36546                     }
36547                }
36548
36549
36550
36551
36552        }
36553   }; then
36554   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
36555   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
36556 else
36557   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
36558   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
36559 fi
36560
36561
36562
36563
36564 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
36565
36566
36567
36568
36569        if  { test "$HAVE_LIBUNISTRING" != yes \
36570     || {
36571
36572
36573
36574             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36575             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36576                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36577                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36578                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
36579                          }
36580                     }
36581                }
36582
36583
36584
36585
36586        }
36587   }; then
36588   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
36589   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
36590 else
36591   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
36592   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
36593 fi
36594
36595
36596
36597
36598       if  { test "$HAVE_LIBUNISTRING" != yes \
36599     || {
36600
36601
36602
36603             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36604             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36605                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36606                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36607                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36608                          }
36609                     }
36610                }
36611
36612
36613
36614
36615        }
36616   }; then
36617     LIBUNISTRING_UNITYPES_H='unitypes.h'
36618   else
36619     LIBUNISTRING_UNITYPES_H=
36620   fi
36621
36622
36623
36624
36625
36626       if  { test "$HAVE_LIBUNISTRING" != yes \
36627     || {
36628
36629
36630
36631             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36632             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36633                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36634                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36635                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36636                          }
36637                     }
36638                }
36639
36640
36641
36642
36643        }
36644   }; then
36645     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
36646   else
36647     LIBUNISTRING_UNIWIDTH_H=
36648   fi
36649
36650
36651
36652
36653        if  { test "$HAVE_LIBUNISTRING" != yes \
36654     || {
36655
36656
36657
36658             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36659             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36660                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36661                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36662                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
36663                          }
36664                     }
36665                }
36666
36667
36668
36669
36670        }
36671   }; then
36672   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
36673   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
36674 else
36675   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
36676   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
36677 fi
36678
36679
36680
36681 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
36682
36683
36684 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706   if test $ac_cv_have_decl_unsetenv = no; then
36707     HAVE_DECL_UNSETENV=0
36708   fi
36709   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
36710 if test "x$ac_cv_func_unsetenv" = xyes
36711 then :
36712   printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
36713
36714 fi
36715
36716   if test $ac_cv_func_unsetenv = no; then
36717     HAVE_UNSETENV=0
36718   else
36719     HAVE_UNSETENV=1
36720         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
36721 printf %s "checking for unsetenv() return type... " >&6; }
36722 if test ${gt_cv_func_unsetenv_ret+y}
36723 then :
36724   printf %s "(cached) " >&6
36725 else $as_nop
36726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36727 /* end confdefs.h.  */
36728
36729 #undef _BSD
36730 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
36731 #include <stdlib.h>
36732 extern
36733 #ifdef __cplusplus
36734 "C"
36735 #endif
36736 int unsetenv (const char *name);
36737
36738 int
36739 main (void)
36740 {
36741
36742   ;
36743   return 0;
36744 }
36745 _ACEOF
36746 if ac_fn_c_try_compile "$LINENO"
36747 then :
36748   gt_cv_func_unsetenv_ret='int'
36749 else $as_nop
36750   gt_cv_func_unsetenv_ret='void'
36751 fi
36752 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36753 fi
36754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
36755 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
36756     if test $gt_cv_func_unsetenv_ret = 'void'; then
36757
36758 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
36759
36760       REPLACE_UNSETENV=1
36761     fi
36762
36763                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
36764 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
36765 if test ${gl_cv_func_unsetenv_works+y}
36766 then :
36767   printf %s "(cached) " >&6
36768 else $as_nop
36769   if test "$cross_compiling" = yes
36770 then :
36771   case "$host_os" in
36772                     # Guess yes on glibc systems.
36773             *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
36774                     # If we don't know, obey --enable-cross-guesses.
36775             *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
36776           esac
36777
36778 else $as_nop
36779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36780 /* end confdefs.h.  */
36781
36782             #include <stdlib.h>
36783             #include <errno.h>
36784             extern char **environ;
36785
36786
36787 $gl_mda_defines
36788
36789 int
36790 main (void)
36791 {
36792
36793             char entry1[] = "a=1";
36794             char entry2[] = "b=2";
36795             char *env[] = { entry1, entry2, NULL };
36796             if (putenv ((char *) "a=1")) return 1;
36797             if (putenv (entry2)) return 2;
36798             entry2[0] = 'a';
36799             unsetenv ("a");
36800             if (getenv ("a")) return 3;
36801             if (!unsetenv ("") || errno != EINVAL) return 4;
36802             entry2[0] = 'b';
36803             environ = env;
36804             if (!getenv ("a")) return 5;
36805             entry2[0] = 'a';
36806             unsetenv ("a");
36807             if (getenv ("a")) return 6;
36808
36809   ;
36810   return 0;
36811 }
36812 _ACEOF
36813 if ac_fn_c_try_run "$LINENO"
36814 then :
36815   gl_cv_func_unsetenv_works=yes
36816 else $as_nop
36817   gl_cv_func_unsetenv_works=no
36818 fi
36819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36820   conftest.$ac_objext conftest.beam conftest.$ac_ext
36821 fi
36822
36823
36824 fi
36825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
36826 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
36827     case "$gl_cv_func_unsetenv_works" in
36828       *yes) ;;
36829       *)
36830         REPLACE_UNSETENV=1
36831         ;;
36832     esac
36833   fi
36834
36835   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
36836
36837
36838
36839
36840
36841
36842
36843
36844   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
36845
36846
36847
36848
36849
36850   fi
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860           GL_GNULIB_UNSETENV=1
36861
36862
36863
36864
36865
36866 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
36867
36868
36869
36870
36871
36872
36873   if test $ac_cv_func_vasnprintf = no; then
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
36915
36916   if test $ac_cv_func_vasnprintf = yes; then
36917
36918 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
36919
36920   fi
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
36931 if test "x$ac_cv_type_ptrdiff_t" = xyes
36932 then :
36933
36934 else $as_nop
36935
36936 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
36937
36938
36939 fi
36940
36941
36942
36943
36944
36945
36946
36947   fi
36948
36949
36950   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
36951 if test "x$ac_cv_func_vasprintf" = xyes
36952 then :
36953   printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
36954
36955 fi
36956
36957   if test $ac_cv_func_vasprintf = no; then
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
36978
36979
36980   if test $ac_cv_func_vasprintf = yes; then
36981     REPLACE_VASPRINTF=1
36982   else
36983     HAVE_VASPRINTF=0
36984   fi
36985
36986
36987
36988
36989
36990
36991
36992
36993   fi
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004           GL_GNULIB_VASPRINTF=1
37005
37006
37007
37008
37009
37010 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
37011
37012
37013
37014
37015
37016   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
37017
37018
37019
37020   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
37021
37022
37023 # Check whether --with-packager was given.
37024 if test ${with_packager+y}
37025 then :
37026   withval=$with_packager;       case $withval in
37027         yes|no) ;;
37028         *)
37029 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
37030  ;;
37031       esac
37032
37033 fi
37034
37035
37036
37037 # Check whether --with-packager-version was given.
37038 if test ${with_packager_version+y}
37039 then :
37040   withval=$with_packager_version;       case $withval in
37041         yes|no) ;;
37042         *)
37043 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
37044  ;;
37045       esac
37046
37047 fi
37048
37049
37050
37051 # Check whether --with-packager-bug-reports was given.
37052 if test ${with_packager_bug_reports+y}
37053 then :
37054   withval=$with_packager_bug_reports;       case $withval in
37055         yes|no) ;;
37056         *)
37057 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
37058  ;;
37059       esac
37060
37061 fi
37062
37063
37064   if test "X$with_packager" = "X" && \
37065      test "X$with_packager_version$with_packager_bug_reports" != "X"
37066   then
37067     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
37068   fi
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087         if case "$host_os" in
37088        mingw*) true ;;
37089        *) test $ac_cv_func_mbsinit = yes ;;
37090      esac \
37091     && test $ac_cv_func_mbrtowc = yes; then
37092
37093
37094
37095
37096      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
37097 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
37098 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
37099 then :
37100   printf %s "(cached) " >&6
37101 else $as_nop
37102
37103                   case "$host_os" in
37104                      # Guess no on AIX and OSF/1.
37105         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
37106                      # Guess yes otherwise.
37107         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
37108       esac
37109       if test $LOCALE_JA != none; then
37110         if test "$cross_compiling" = yes
37111 then :
37112   :
37113 else $as_nop
37114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37115 /* end confdefs.h.  */
37116
37117 #include <locale.h>
37118 #include <string.h>
37119 #include <wchar.h>
37120 int main ()
37121 {
37122   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37123     {
37124       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
37125       mbstate_t state;
37126       wchar_t wc;
37127
37128       memset (&state, '\0', sizeof (mbstate_t));
37129       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37130         if (mbsinit (&state))
37131           return 2;
37132     }
37133   return 0;
37134 }
37135 _ACEOF
37136 if ac_fn_c_try_run "$LINENO"
37137 then :
37138   gl_cv_func_mbrtowc_incomplete_state=yes
37139 else $as_nop
37140   gl_cv_func_mbrtowc_incomplete_state=no
37141 fi
37142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37143   conftest.$ac_objext conftest.beam conftest.$ac_ext
37144 fi
37145
37146       else
37147         if test $LOCALE_FR_UTF8 != none; then
37148           if test "$cross_compiling" = yes
37149 then :
37150   :
37151 else $as_nop
37152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37153 /* end confdefs.h.  */
37154
37155 #include <locale.h>
37156 #include <string.h>
37157 #include <wchar.h>
37158 int main ()
37159 {
37160   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37161     {
37162       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
37163       mbstate_t state;
37164       wchar_t wc;
37165
37166       memset (&state, '\0', sizeof (mbstate_t));
37167       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37168         if (mbsinit (&state))
37169           return 2;
37170     }
37171   return 0;
37172 }
37173 _ACEOF
37174 if ac_fn_c_try_run "$LINENO"
37175 then :
37176   gl_cv_func_mbrtowc_incomplete_state=yes
37177 else $as_nop
37178   gl_cv_func_mbrtowc_incomplete_state=no
37179 fi
37180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37181   conftest.$ac_objext conftest.beam conftest.$ac_ext
37182 fi
37183
37184         fi
37185       fi
37186
37187 fi
37188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
37189 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
37190
37191
37192
37193
37194      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
37195 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
37196 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
37197 then :
37198   printf %s "(cached) " >&6
37199 else $as_nop
37200
37201                   case "$host_os" in
37202                     # Guess no on Solaris 8.
37203         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
37204                     # Guess yes otherwise.
37205         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
37206       esac
37207       if test $LOCALE_ZH_CN != none; then
37208         if test "$cross_compiling" = yes
37209 then :
37210   :
37211 else $as_nop
37212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37213 /* end confdefs.h.  */
37214
37215 #include <locale.h>
37216 #include <stdlib.h>
37217 #include <string.h>
37218 #include <wchar.h>
37219 int main ()
37220 {
37221   /* This fails on Solaris 8:
37222      mbrtowc returns 2, and sets wc to 0x00F0.
37223      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
37224   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37225     {
37226       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
37227       mbstate_t state;
37228       wchar_t wc;
37229
37230       memset (&state, '\0', sizeof (mbstate_t));
37231       if (mbrtowc (&wc, input + 3, 6, &state) != 4
37232           && mbtowc (&wc, input + 3, 6) == 4)
37233         return 2;
37234     }
37235   return 0;
37236 }
37237 _ACEOF
37238 if ac_fn_c_try_run "$LINENO"
37239 then :
37240   gl_cv_func_mbrtowc_sanitycheck=yes
37241 else $as_nop
37242   gl_cv_func_mbrtowc_sanitycheck=no
37243 fi
37244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37245   conftest.$ac_objext conftest.beam conftest.$ac_ext
37246 fi
37247
37248       fi
37249
37250 fi
37251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
37252 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
37253
37254     REPLACE_MBSTATE_T=0
37255     case "$gl_cv_func_mbrtowc_incomplete_state" in
37256       *yes) ;;
37257       *) REPLACE_MBSTATE_T=1 ;;
37258     esac
37259     case "$gl_cv_func_mbrtowc_sanitycheck" in
37260       *yes) ;;
37261       *) REPLACE_MBSTATE_T=1 ;;
37262     esac
37263   else
37264     REPLACE_MBSTATE_T=1
37265   fi
37266
37267
37268
37269   if test $ac_cv_func_wcrtomb = no; then
37270     HAVE_WCRTOMB=0
37271     ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
37272       #include <wchar.h>
37273
37274 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37275 if test "x$ac_cv_have_decl_wcrtomb" = xyes
37276 then :
37277   ac_have_decl=1
37278 else $as_nop
37279   ac_have_decl=0
37280 fi
37281 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
37282
37283     if test $ac_cv_have_decl_wcrtomb = yes; then
37284                         REPLACE_WCRTOMB=1
37285     fi
37286   else
37287                         if test $REPLACE_WCRTOMB = 0; then
37288
37289
37290
37291
37292
37293              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
37294 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
37295 if test ${gl_cv_func_wcrtomb_works+y}
37296 then :
37297   printf %s "(cached) " >&6
37298 else $as_nop
37299   if test "$cross_compiling" = yes
37300 then :
37301   case "$host_os" in
37302                                # Guess no on Android.
37303               linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
37304                                # Guess yes otherwise.
37305               *)               gl_cv_func_wcrtomb_works="guessing yes";;
37306             esac
37307
37308 else $as_nop
37309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37310 /* end confdefs.h.  */
37311
37312 #include <string.h>
37313 #include <stdlib.h>
37314 #include <wchar.h>
37315 int main ()
37316 {
37317   mbstate_t state;
37318   char out[64];
37319   int count;
37320   memset (&state, 0, sizeof (state));
37321   out[0] = 'x';
37322   count = wcrtomb (out, L'a', &state);
37323   return !(count == 1 && out[0] == 'a');
37324 }
37325 _ACEOF
37326 if ac_fn_c_try_run "$LINENO"
37327 then :
37328   gl_cv_func_wcrtomb_works=yes
37329 else $as_nop
37330   gl_cv_func_wcrtomb_works=no
37331 fi
37332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37333   conftest.$ac_objext conftest.beam conftest.$ac_ext
37334 fi
37335
37336
37337 fi
37338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
37339 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
37340       case "$gl_cv_func_wcrtomb_works" in
37341         *yes) ;;
37342         *)
37343 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
37344
37345            REPLACE_WCRTOMB=1 ;;
37346       esac
37347     fi
37348     if test $REPLACE_WCRTOMB = 0; then
37349       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
37350 printf %s "checking whether wcrtomb return value is correct... " >&6; }
37351 if test ${gl_cv_func_wcrtomb_retval+y}
37352 then :
37353   printf %s "(cached) " >&6
37354 else $as_nop
37355
37356                               case "$host_os" in
37357             # Guess no on AIX 4, OSF/1, Solaris, native Windows.
37358             aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
37359             # Guess yes otherwise.
37360             *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
37361           esac
37362           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
37363             if test "$cross_compiling" = yes
37364 then :
37365   :
37366 else $as_nop
37367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37368 /* end confdefs.h.  */
37369
37370 #include <locale.h>
37371 #include <string.h>
37372 #include <wchar.h>
37373 #include <stdlib.h>
37374 int main ()
37375 {
37376   int result = 0;
37377   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
37378     {
37379       if (wcrtomb (NULL, 0, NULL) != 1)
37380         result |= 1;
37381     }
37382   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37383     {
37384       if (wcrtomb (NULL, 0, NULL) != 1)
37385         result |= 2;
37386       {
37387         wchar_t wc = (wchar_t) 0xBADFACE;
37388         if (mbtowc (&wc, "\303\274", 2) == 2)
37389           if (wcrtomb (NULL, wc, NULL) != 1)
37390             result |= 2;
37391       }
37392     }
37393   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37394     {
37395       if (wcrtomb (NULL, 0, NULL) != 1)
37396         result |= 4;
37397     }
37398   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37399     {
37400       if (wcrtomb (NULL, 0, NULL) != 1)
37401         result |= 8;
37402     }
37403   return result;
37404 }
37405 _ACEOF
37406 if ac_fn_c_try_run "$LINENO"
37407 then :
37408   gl_cv_func_wcrtomb_retval=yes
37409 else $as_nop
37410   gl_cv_func_wcrtomb_retval=no
37411 fi
37412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37413   conftest.$ac_objext conftest.beam conftest.$ac_ext
37414 fi
37415
37416           fi
37417
37418 fi
37419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
37420 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
37421       case "$gl_cv_func_wcrtomb_retval" in
37422         *yes) ;;
37423         *)
37424 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
37425
37426            REPLACE_WCRTOMB=1 ;;
37427       esac
37428     fi
37429   fi
37430
37431   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
37432
37433
37434
37435
37436
37437
37438
37439
37440   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
37441
37442
37443   :
37444
37445   fi
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455           GL_GNULIB_WCRTOMB=1
37456
37457
37458
37459
37460
37461 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482   ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
37483     #include <wchar.h>
37484
37485 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37486 if test "x$ac_cv_have_decl_wcwidth" = xyes
37487 then :
37488   ac_have_decl=1
37489 else $as_nop
37490   ac_have_decl=0
37491 fi
37492 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
37493
37494   if test $ac_cv_have_decl_wcwidth != yes; then
37495     HAVE_DECL_WCWIDTH=0
37496   fi
37497
37498   if test $ac_cv_func_wcwidth != yes; then
37499     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
37500 printf %s "checking whether wcwidth is a macro... " >&6; }
37501 if test ${gl_cv_func_wcwidth_macro+y}
37502 then :
37503   printf %s "(cached) " >&6
37504 else $as_nop
37505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37506 /* end confdefs.h.  */
37507
37508 #include <wchar.h>
37509 #ifdef wcwidth
37510  wchar_header_defines_wcwidth
37511 #endif
37512 _ACEOF
37513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37514   $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
37515 then :
37516   gl_cv_func_wcwidth_macro=yes
37517 else $as_nop
37518   gl_cv_func_wcwidth_macro=no
37519 fi
37520 rm -rf conftest*
37521
37522
37523 fi
37524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
37525 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
37526   fi
37527
37528   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
37529     HAVE_WCWIDTH=1
37530                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
37531 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
37532 if test ${gl_cv_func_wcwidth_works+y}
37533 then :
37534   printf %s "(cached) " >&6
37535 else $as_nop
37536
37537         if test "$cross_compiling" = yes
37538 then :
37539
37540            case "$host_os" in
37541                             # Guess yes on glibc systems.
37542              *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
37543                             # Guess yes on musl systems.
37544              *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
37545                             # Guess yes on AIX 7 systems.
37546              aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
37547              *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
37548            esac
37549
37550 else $as_nop
37551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37552 /* end confdefs.h.  */
37553
37554 #include <locale.h>
37555 #include <wchar.h>
37556 #if !HAVE_DECL_WCWIDTH
37557 extern
37558 # ifdef __cplusplus
37559 "C"
37560 # endif
37561 int wcwidth (int);
37562 #endif
37563 int main ()
37564 {
37565   int result = 0;
37566   if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
37567     {
37568       if (wcwidth (0x0301) > 0)
37569         result |= 1;
37570       if (wcwidth (0x05B0) > 0)
37571         result |= 2;
37572       if (wcwidth (0x200B) > 0)
37573         result |= 4;
37574       if (wcwidth (0xFF1A) == 0)
37575         result |= 8;
37576       if (wcwidth (0x2202) > 1)
37577         result |= 16;
37578     }
37579   return result;
37580 }
37581 _ACEOF
37582 if ac_fn_c_try_run "$LINENO"
37583 then :
37584   gl_cv_func_wcwidth_works=yes
37585 else $as_nop
37586   gl_cv_func_wcwidth_works=no
37587 fi
37588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37589   conftest.$ac_objext conftest.beam conftest.$ac_ext
37590 fi
37591
37592
37593 fi
37594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
37595 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
37596     case "$gl_cv_func_wcwidth_works" in
37597       *yes) ;;
37598       *no) REPLACE_WCWIDTH=1 ;;
37599     esac
37600   else
37601     HAVE_WCWIDTH=0
37602   fi
37603
37604   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
37605
37606
37607
37608
37609
37610
37611
37612
37613   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
37614
37615
37616
37617   :
37618
37619   fi
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629           GL_GNULIB_WCWIDTH=1
37630
37631
37632
37633
37634
37635 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
37636
37637
37638
37639
37640   case "$host_os" in
37641     mingw*)
37642
37643
37644
37645
37646
37647
37648
37649
37650   gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
37651
37652       ;;
37653   esac
37654
37655   case "$host_os" in
37656     mingw*)
37657
37658
37659
37660
37661
37662
37663
37664
37665   gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
37666
37667       ;;
37668   esac
37669
37670   case "$host_os" in
37671     mingw*)
37672
37673
37674
37675
37676
37677
37678
37679
37680   gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
37681
37682       ;;
37683   esac
37684
37685   case "$host_os" in
37686     mingw*)
37687
37688
37689
37690
37691
37692
37693
37694
37695   gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
37696
37697       ;;
37698   esac
37699
37700
37701       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
37702 printf %s "checking for wmemchr... " >&6; }
37703 if test ${gl_cv_func_wmemchr+y}
37704 then :
37705   printf %s "(cached) " >&6
37706 else $as_nop
37707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37708 /* end confdefs.h.  */
37709 #include <wchar.h>
37710
37711 int
37712 main (void)
37713 {
37714 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
37715   ;
37716   return 0;
37717 }
37718
37719 _ACEOF
37720 if ac_fn_c_try_link "$LINENO"
37721 then :
37722   gl_cv_func_wmemchr=yes
37723 else $as_nop
37724   gl_cv_func_wmemchr=no
37725 fi
37726 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37727     conftest$ac_exeext conftest.$ac_ext
37728
37729 fi
37730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
37731 printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
37732   if test $gl_cv_func_wmemchr = no; then
37733     HAVE_WMEMCHR=0
37734   fi
37735
37736   if test $HAVE_WMEMCHR = 0; then
37737
37738
37739
37740
37741
37742
37743
37744
37745   gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
37746
37747   fi
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757           GL_GNULIB_WMEMCHR=1
37758
37759
37760
37761
37762
37763 printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775   if test $ac_cv_func_wmempcpy = no; then
37776     HAVE_WMEMPCPY=0
37777   fi
37778
37779   if test $HAVE_WMEMPCPY = 0; then
37780
37781
37782
37783
37784
37785
37786
37787
37788   gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
37789
37790   fi
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800           GL_GNULIB_WMEMPCPY=1
37801
37802
37803
37804
37805
37806 printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
37807
37808
37809
37810   :
37811
37812
37813 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
37814
37815
37816
37817
37818 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
37819
37820
37821
37822
37823   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
37824 if test "x$ac_cv_header_stdint_h" = xyes
37825 then :
37826   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
37827
37828 fi
37829
37830
37831
37832   :
37833
37834   :
37835
37836
37837   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
37838
37839   # End of code from modules
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851   gltests_libdeps=
37852   gltests_ltlibdeps=
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867   gl_source_base='gnulib-tests'
37868   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
37869
37870   gl_module_indicator_condition=$gltests_WITNESS
37871
37872
37873   if test "$ac_cv_header_winsock2_h" = yes; then
37874
37875
37876
37877
37878
37879
37880
37881
37882   gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
37883
37884   fi
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894     if test "$GL_GNULIB_ACCEPT" != 1; then
37895         if test "$GL_GNULIB_ACCEPT" = 0; then
37896       GL_GNULIB_ACCEPT=$gl_module_indicator_condition
37897     else
37898       GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
37899     fi
37900   fi
37901
37902
37903
37904
37905
37906 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919   ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
37920 if test "x$ac_cv_func_atoll" = xyes
37921 then :
37922   printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
37923
37924 fi
37925
37926   if test $ac_cv_func_atoll = no; then
37927     HAVE_ATOLL=0
37928   fi
37929
37930   if test $HAVE_ATOLL = 0; then
37931
37932
37933
37934
37935
37936
37937
37938
37939   gltests_LIBOBJS="$gltests_LIBOBJS atoll.$ac_objext"
37940
37941
37942   :
37943
37944   fi
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954     if test "$GL_GNULIB_ATOLL" != 1; then
37955         if test "$GL_GNULIB_ATOLL" = 0; then
37956       GL_GNULIB_ATOLL=$gl_module_indicator_condition
37957     else
37958       GL_GNULIB_ATOLL="($GL_GNULIB_ATOLL || $gl_module_indicator_condition)"
37959     fi
37960   fi
37961
37962
37963
37964
37965
37966 printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
37967
37968
37969
37970
37971   if test "$ac_cv_header_winsock2_h" = yes; then
37972
37973
37974
37975
37976
37977
37978
37979
37980   gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
37981
37982   fi
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992     if test "$GL_GNULIB_BIND" != 1; then
37993         if test "$GL_GNULIB_BIND" = 0; then
37994       GL_GNULIB_BIND=$gl_module_indicator_condition
37995     else
37996       GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
37997     fi
37998   fi
37999
38000
38001
38002
38003
38004 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
38005
38006
38007
38008
38009
38010
38011   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38012 printf %s "checking for a traditional french locale... " >&6; }
38013 if test ${gt_cv_locale_fr+y}
38014 then :
38015   printf %s "(cached) " >&6
38016 else $as_nop
38017
38018     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38019 /* end confdefs.h.  */
38020
38021 #include <locale.h>
38022 #include <time.h>
38023 #if HAVE_LANGINFO_CODESET
38024 # include <langinfo.h>
38025 #endif
38026 #include <stdlib.h>
38027 #include <string.h>
38028 struct tm t;
38029 char buf[16];
38030 int main () {
38031   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
38032      imitates locale dependent behaviour by looking at the environment
38033      variables, and all locales use the UTF-8 encoding.  */
38034 #if defined __BEOS__ || defined __HAIKU__
38035   return 1;
38036 #else
38037   /* Check whether the given locale name is recognized by the system.  */
38038 # if defined _WIN32 && !defined __CYGWIN__
38039   /* On native Windows, setlocale(category, "") looks at the system settings,
38040      not at the environment variables.  Also, when an encoding suffix such
38041      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38042      category of the locale to "C".  */
38043   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38044       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38045     return 1;
38046 # else
38047   if (setlocale (LC_ALL, "") == NULL) return 1;
38048 # endif
38049   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38050      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38051      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38052      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38053      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38054      some unit tests fail.
38055      On MirBSD 10, when an unsupported locale is specified, setlocale()
38056      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
38057 # if HAVE_LANGINFO_CODESET
38058   {
38059     const char *cs = nl_langinfo (CODESET);
38060     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38061         || strcmp (cs, "UTF-8") == 0)
38062       return 1;
38063   }
38064 # endif
38065 # ifdef __CYGWIN__
38066   /* On Cygwin, avoid locale names without encoding suffix, because the
38067      locale_charset() function relies on the encoding suffix.  Note that
38068      LC_ALL is set on the command line.  */
38069   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38070 # endif
38071   /* Check whether in the abbreviation of the second month, the second
38072      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38073      one byte long. This excludes the UTF-8 encoding.  */
38074   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38075   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38076 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
38077   /* Check whether the decimal separator is a comma.
38078      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38079      are nl_langinfo(RADIXCHAR) are both ".".  */
38080   if (localeconv () ->decimal_point[0] != ',') return 1;
38081 # endif
38082   return 0;
38083 #endif
38084 }
38085
38086 _ACEOF
38087     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38088   (eval $ac_link) 2>&5
38089   ac_status=$?
38090   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38091   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38092       case "$host_os" in
38093         # Handle native Windows specially, because there setlocale() interprets
38094         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38095         # "fr" or "fra" as "French" or "French_France.1252",
38096         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38097         # "ja" as "Japanese" or "Japanese_Japan.932",
38098         # and similar.
38099         mingw*)
38100           # Test for the native Windows locale name.
38101           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38102             gt_cv_locale_fr=French_France.1252
38103           else
38104             # None found.
38105             gt_cv_locale_fr=none
38106           fi
38107           ;;
38108         *)
38109           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38110           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38111           # configure script would override the LC_ALL setting. Likewise for
38112           # LC_CTYPE, which is also set at the beginning of the configure script.
38113           # Test for the usual locale name.
38114           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38115             gt_cv_locale_fr=fr_FR
38116           else
38117             # Test for the locale name with explicit encoding suffix.
38118             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38119               gt_cv_locale_fr=fr_FR.ISO-8859-1
38120             else
38121               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38122               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38123                 gt_cv_locale_fr=fr_FR.ISO8859-1
38124               else
38125                 # Test for the HP-UX locale name.
38126                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38127                   gt_cv_locale_fr=fr_FR.iso88591
38128                 else
38129                   # Test for the Solaris 7 locale name.
38130                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38131                     gt_cv_locale_fr=fr
38132                   else
38133                     # None found.
38134                     gt_cv_locale_fr=none
38135                   fi
38136                 fi
38137               fi
38138             fi
38139           fi
38140           ;;
38141       esac
38142     fi
38143     rm -fr conftest*
38144
38145 fi
38146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38147 printf "%s\n" "$gt_cv_locale_fr" >&6; }
38148   LOCALE_FR=$gt_cv_locale_fr
38149
38150
38151
38152
38153   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38154 printf %s "checking for a french Unicode locale... " >&6; }
38155 if test ${gt_cv_locale_fr_utf8+y}
38156 then :
38157   printf %s "(cached) " >&6
38158 else $as_nop
38159
38160     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38161 /* end confdefs.h.  */
38162
38163 #include <locale.h>
38164 #include <time.h>
38165 #if HAVE_LANGINFO_CODESET
38166 # include <langinfo.h>
38167 #endif
38168 #include <stdlib.h>
38169 #include <string.h>
38170 struct tm t;
38171 char buf[16];
38172 int main () {
38173   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
38174      imitates locale dependent behaviour by looking at the environment
38175      variables, and all locales use the UTF-8 encoding.  */
38176 #if !(defined __BEOS__ || defined __HAIKU__)
38177   /* Check whether the given locale name is recognized by the system.  */
38178 # if defined _WIN32 && !defined __CYGWIN__
38179   /* On native Windows, setlocale(category, "") looks at the system settings,
38180      not at the environment variables.  Also, when an encoding suffix such
38181      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38182      category of the locale to "C".  */
38183   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38184       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38185     return 1;
38186 # else
38187   if (setlocale (LC_ALL, "") == NULL) return 1;
38188 # endif
38189   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38190      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38191      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38192      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38193      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38194      some unit tests fail.  */
38195 # if HAVE_LANGINFO_CODESET
38196   {
38197     const char *cs = nl_langinfo (CODESET);
38198     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38199       return 1;
38200   }
38201 # endif
38202 # ifdef __CYGWIN__
38203   /* On Cygwin, avoid locale names without encoding suffix, because the
38204      locale_charset() function relies on the encoding suffix.  Note that
38205      LC_ALL is set on the command line.  */
38206   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38207 # endif
38208   /* Check whether in the abbreviation of the second month, the second
38209      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38210      two bytes long, with UTF-8 encoding.  */
38211   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38212   if (strftime (buf, sizeof (buf), "%b", &t) < 4
38213       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38214     return 1;
38215 #endif
38216 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
38217   /* Check whether the decimal separator is a comma.
38218      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38219      are nl_langinfo(RADIXCHAR) are both ".".  */
38220   if (localeconv () ->decimal_point[0] != ',') return 1;
38221 #endif
38222   return 0;
38223 }
38224
38225 _ACEOF
38226     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38227   (eval $ac_link) 2>&5
38228   ac_status=$?
38229   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38230   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38231       case "$host_os" in
38232         # Handle native Windows specially, because there setlocale() interprets
38233         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38234         # "fr" or "fra" as "French" or "French_France.1252",
38235         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38236         # "ja" as "Japanese" or "Japanese_Japan.932",
38237         # and similar.
38238         mingw*)
38239           # Test for the hypothetical native Windows locale name.
38240           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38241             gt_cv_locale_fr_utf8=French_France.65001
38242           else
38243             # None found.
38244             gt_cv_locale_fr_utf8=none
38245           fi
38246           ;;
38247         *)
38248           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38249           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38250           # configure script would override the LC_ALL setting. Likewise for
38251           # LC_CTYPE, which is also set at the beginning of the configure script.
38252           # Test for the usual locale name.
38253           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38254             gt_cv_locale_fr_utf8=fr_FR
38255           else
38256             # Test for the locale name with explicit encoding suffix.
38257             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38258               gt_cv_locale_fr_utf8=fr_FR.UTF-8
38259             else
38260               # Test for the Solaris 7 locale name.
38261               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38262                 gt_cv_locale_fr_utf8=fr.UTF-8
38263               else
38264                 # None found.
38265                 gt_cv_locale_fr_utf8=none
38266               fi
38267             fi
38268           fi
38269           ;;
38270       esac
38271     fi
38272     rm -fr conftest*
38273
38274 fi
38275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38276 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
38277   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38278
38279
38280
38281
38282
38283   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38284 printf %s "checking for a traditional french locale... " >&6; }
38285 if test ${gt_cv_locale_fr+y}
38286 then :
38287   printf %s "(cached) " >&6
38288 else $as_nop
38289
38290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38291 /* end confdefs.h.  */
38292
38293 #include <locale.h>
38294 #include <time.h>
38295 #if HAVE_LANGINFO_CODESET
38296 # include <langinfo.h>
38297 #endif
38298 #include <stdlib.h>
38299 #include <string.h>
38300 struct tm t;
38301 char buf[16];
38302 int main () {
38303   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
38304      imitates locale dependent behaviour by looking at the environment
38305      variables, and all locales use the UTF-8 encoding.  */
38306 #if defined __BEOS__ || defined __HAIKU__
38307   return 1;
38308 #else
38309   /* Check whether the given locale name is recognized by the system.  */
38310 # if defined _WIN32 && !defined __CYGWIN__
38311   /* On native Windows, setlocale(category, "") looks at the system settings,
38312      not at the environment variables.  Also, when an encoding suffix such
38313      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38314      category of the locale to "C".  */
38315   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38316       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38317     return 1;
38318 # else
38319   if (setlocale (LC_ALL, "") == NULL) return 1;
38320 # endif
38321   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38322      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38323      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38324      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38325      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38326      some unit tests fail.
38327      On MirBSD 10, when an unsupported locale is specified, setlocale()
38328      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
38329 # if HAVE_LANGINFO_CODESET
38330   {
38331     const char *cs = nl_langinfo (CODESET);
38332     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38333         || strcmp (cs, "UTF-8") == 0)
38334       return 1;
38335   }
38336 # endif
38337 # ifdef __CYGWIN__
38338   /* On Cygwin, avoid locale names without encoding suffix, because the
38339      locale_charset() function relies on the encoding suffix.  Note that
38340      LC_ALL is set on the command line.  */
38341   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38342 # endif
38343   /* Check whether in the abbreviation of the second month, the second
38344      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38345      one byte long. This excludes the UTF-8 encoding.  */
38346   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38347   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38348 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
38349   /* Check whether the decimal separator is a comma.
38350      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38351      are nl_langinfo(RADIXCHAR) are both ".".  */
38352   if (localeconv () ->decimal_point[0] != ',') return 1;
38353 # endif
38354   return 0;
38355 #endif
38356 }
38357
38358 _ACEOF
38359     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38360   (eval $ac_link) 2>&5
38361   ac_status=$?
38362   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38363   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38364       case "$host_os" in
38365         # Handle native Windows specially, because there setlocale() interprets
38366         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38367         # "fr" or "fra" as "French" or "French_France.1252",
38368         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38369         # "ja" as "Japanese" or "Japanese_Japan.932",
38370         # and similar.
38371         mingw*)
38372           # Test for the native Windows locale name.
38373           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38374             gt_cv_locale_fr=French_France.1252
38375           else
38376             # None found.
38377             gt_cv_locale_fr=none
38378           fi
38379           ;;
38380         *)
38381           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38382           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38383           # configure script would override the LC_ALL setting. Likewise for
38384           # LC_CTYPE, which is also set at the beginning of the configure script.
38385           # Test for the usual locale name.
38386           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38387             gt_cv_locale_fr=fr_FR
38388           else
38389             # Test for the locale name with explicit encoding suffix.
38390             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38391               gt_cv_locale_fr=fr_FR.ISO-8859-1
38392             else
38393               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38394               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38395                 gt_cv_locale_fr=fr_FR.ISO8859-1
38396               else
38397                 # Test for the HP-UX locale name.
38398                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38399                   gt_cv_locale_fr=fr_FR.iso88591
38400                 else
38401                   # Test for the Solaris 7 locale name.
38402                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38403                     gt_cv_locale_fr=fr
38404                   else
38405                     # None found.
38406                     gt_cv_locale_fr=none
38407                   fi
38408                 fi
38409               fi
38410             fi
38411           fi
38412           ;;
38413       esac
38414     fi
38415     rm -fr conftest*
38416
38417 fi
38418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38419 printf "%s\n" "$gt_cv_locale_fr" >&6; }
38420   LOCALE_FR=$gt_cv_locale_fr
38421
38422
38423
38424
38425
38426   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
38427 printf %s "checking for a turkish Unicode locale... " >&6; }
38428 if test ${gt_cv_locale_tr_utf8+y}
38429 then :
38430   printf %s "(cached) " >&6
38431 else $as_nop
38432
38433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38434 /* end confdefs.h.  */
38435
38436 #include <locale.h>
38437 #include <time.h>
38438 #if HAVE_LANGINFO_CODESET
38439 # include <langinfo.h>
38440 #endif
38441 #include <stdlib.h>
38442 #include <string.h>
38443 #include <wctype.h>
38444 struct tm t;
38445 char buf[16];
38446 int main () {
38447   /* On BeOS, locales are not implemented in libc.  Rather, libintl
38448      imitates locale dependent behaviour by looking at the environment
38449      variables, and all locales use the UTF-8 encoding.  But BeOS does not
38450      implement the Turkish upper-/lowercase mappings.  Therefore, let this
38451      program return 1 on BeOS.  */
38452   /* Check whether the given locale name is recognized by the system.  */
38453 #if defined _WIN32 && !defined __CYGWIN__
38454   /* On native Windows, setlocale(category, "") looks at the system settings,
38455      not at the environment variables.  Also, when an encoding suffix such
38456      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38457      category of the locale to "C".  */
38458   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38459       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38460     return 1;
38461 #else
38462   if (setlocale (LC_ALL, "") == NULL) return 1;
38463 #endif
38464   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38465      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
38466      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38467      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38468      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38469      some unit tests fail.  */
38470 #if HAVE_LANGINFO_CODESET
38471   {
38472     const char *cs = nl_langinfo (CODESET);
38473     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38474       return 1;
38475   }
38476 #endif
38477 #ifdef __CYGWIN__
38478   /* On Cygwin, avoid locale names without encoding suffix, because the
38479      locale_charset() function relies on the encoding suffix.  Note that
38480      LC_ALL is set on the command line.  */
38481   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38482 #endif
38483   /* Check whether in the abbreviation of the eighth month, the second
38484      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
38485      two bytes long, with UTF-8 encoding.  */
38486   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
38487   if (strftime (buf, sizeof (buf), "%b", &t) < 4
38488       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
38489     return 1;
38490   /* Check whether the upper-/lowercase mappings are as expected for
38491      Turkish.  */
38492   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
38493       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
38494     return 1;
38495   return 0;
38496 }
38497
38498 _ACEOF
38499     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38500   (eval $ac_link) 2>&5
38501   ac_status=$?
38502   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38503   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38504       case "$host_os" in
38505         # Handle native Windows specially, because there setlocale() interprets
38506         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38507         # "fr" or "fra" as "French" or "French_France.1252",
38508         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38509         # "ja" as "Japanese" or "Japanese_Japan.932",
38510         # and similar.
38511         mingw*)
38512           # Test for the hypothetical native Windows locale name.
38513           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38514             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
38515           else
38516             # None found.
38517             gt_cv_locale_tr_utf8=none
38518           fi
38519           ;;
38520         *)
38521           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38522           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38523           # configure script would override the LC_ALL setting. Likewise for
38524           # LC_CTYPE, which is also set at the beginning of the configure script.
38525           # Test for the usual locale name.
38526           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38527             gt_cv_locale_tr_utf8=tr_TR
38528           else
38529             # Test for the locale name with explicit encoding suffix.
38530             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38531               gt_cv_locale_tr_utf8=tr_TR.UTF-8
38532             else
38533               # Test for the Solaris 7 locale name.
38534               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38535                 gt_cv_locale_tr_utf8=tr.UTF-8
38536               else
38537                 # None found.
38538                 gt_cv_locale_tr_utf8=none
38539               fi
38540             fi
38541           fi
38542           ;;
38543       esac
38544     else
38545       gt_cv_locale_tr_utf8=none
38546     fi
38547     rm -fr conftest*
38548
38549 fi
38550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
38551 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
38552   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
38553
38554
38555
38556   if test "$ac_cv_header_winsock2_h" = yes; then
38557
38558
38559
38560
38561
38562
38563
38564
38565   gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
38566
38567   fi
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577     if test "$GL_GNULIB_CONNECT" != 1; then
38578         if test "$GL_GNULIB_CONNECT" = 0; then
38579       GL_GNULIB_CONNECT=$gl_module_indicator_condition
38580     else
38581       GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
38582     fi
38583   fi
38584
38585
38586
38587
38588
38589 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
38590
38591
38592
38593
38594
38595
38596
38597     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
38598       REPLACE_FDOPEN=1
38599     fi
38600
38601   if test $REPLACE_FDOPEN = 0; then
38602         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
38603 printf %s "checking whether fdopen sets errno... " >&6; }
38604 if test ${gl_cv_func_fdopen_works+y}
38605 then :
38606   printf %s "(cached) " >&6
38607 else $as_nop
38608
38609         if test "$cross_compiling" = yes
38610 then :
38611   case "$host_os" in
38612              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
38613              *)      gl_cv_func_fdopen_works="guessing yes" ;;
38614            esac
38615
38616 else $as_nop
38617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38618 /* end confdefs.h.  */
38619
38620 #include <stdio.h>
38621 #include <errno.h>
38622
38623
38624 $gl_mda_defines
38625
38626 int
38627 main (void)
38628 {
38629   FILE *fp;
38630   errno = 0;
38631   fp = fdopen (-1, "r");
38632   if (fp == NULL && errno == 0)
38633     return 1;
38634   return 0;
38635 }
38636 _ACEOF
38637 if ac_fn_c_try_run "$LINENO"
38638 then :
38639   gl_cv_func_fdopen_works=yes
38640 else $as_nop
38641   gl_cv_func_fdopen_works=no
38642 fi
38643 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38644   conftest.$ac_objext conftest.beam conftest.$ac_ext
38645 fi
38646
38647
38648 fi
38649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
38650 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
38651     case "$gl_cv_func_fdopen_works" in
38652       *no) REPLACE_FDOPEN=1 ;;
38653     esac
38654   fi
38655
38656   if test $REPLACE_FDOPEN = 1; then
38657
38658
38659
38660
38661
38662
38663
38664
38665   gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
38666
38667
38668   fi
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678     if test "$GL_GNULIB_FDOPEN" != 1; then
38679         if test "$GL_GNULIB_FDOPEN" = 0; then
38680       GL_GNULIB_FDOPEN=$gl_module_indicator_condition
38681     else
38682       GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
38683     fi
38684   fi
38685
38686
38687
38688
38689
38690 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
38691
38692
38693
38694
38695
38696
38697   if test $ac_cv_func_ftruncate = yes; then
38698
38699
38700       case "$host_os" in
38701         mingw*)
38702                                                                       REPLACE_FTRUNCATE=1
38703           ;;
38704       esac
38705
38706   else
38707     HAVE_FTRUNCATE=0
38708   fi
38709
38710   if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
38711
38712
38713
38714
38715
38716
38717
38718
38719   gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
38720
38721
38722   ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
38723 if test "x$ac_cv_func__chsize" = xyes
38724 then :
38725   printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
38726
38727 fi
38728
38729
38730   fi
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740     if test "$GL_GNULIB_FTRUNCATE" != 1; then
38741         if test "$GL_GNULIB_FTRUNCATE" = 0; then
38742       GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
38743     else
38744       GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
38745     fi
38746   fi
38747
38748
38749
38750
38751
38752 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
38753
38754
38755
38756
38757
38758
38759
38760
38761   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
38762   *yes,yes) ;;
38763   *)
38764         REPLACE_GETCWD=1
38765     ;;
38766   esac
38767
38768   if test $REPLACE_GETCWD = 1; then
38769
38770
38771
38772
38773
38774
38775
38776
38777   gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
38778
38779   fi
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789     if test "$GL_GNULIB_GETCWD" != 1; then
38790         if test "$GL_GNULIB_GETCWD" = 0; then
38791       GL_GNULIB_GETCWD=$gl_module_indicator_condition
38792     else
38793       GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
38794     fi
38795   fi
38796
38797
38798
38799
38800
38801 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814                 HAVE_INET_PTON=1
38815   INET_PTON_LIB=
38816
38817
38818
38819
38820   if test $ac_cv_header_sys_socket_h != yes; then
38821                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
38822 if test "x$ac_cv_header_winsock2_h" = xyes
38823 then :
38824   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
38825
38826 fi
38827
38828   fi
38829   if test "$ac_cv_header_winsock2_h" = yes; then
38830     HAVE_WINSOCK2_H=1
38831     UNISTD_H_HAVE_WINSOCK2_H=1
38832     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
38833   else
38834     HAVE_WINSOCK2_H=0
38835   fi
38836
38837
38838   if test $HAVE_WINSOCK2_H = 1; then
38839                     REPLACE_INET_PTON=1
38840     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
38841 " "$ac_c_undeclared_builtin_options" "CFLAGS"
38842 if test "x$ac_cv_have_decl_inet_pton" = xyes
38843 then :
38844   ac_have_decl=1
38845 else $as_nop
38846   ac_have_decl=0
38847 fi
38848 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
38849
38850     if test $ac_cv_have_decl_inet_pton = yes; then
38851       INET_PTON_LIB="-lws2_32"
38852     else
38853       HAVE_DECL_INET_PTON=0
38854     fi
38855   else
38856     gl_save_LIBS=$LIBS
38857     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
38858 printf %s "checking for library containing inet_pton... " >&6; }
38859 if test ${ac_cv_search_inet_pton+y}
38860 then :
38861   printf %s "(cached) " >&6
38862 else $as_nop
38863   ac_func_search_save_LIBS=$LIBS
38864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38865 /* end confdefs.h.  */
38866
38867 /* Override any GCC internal prototype to avoid an error.
38868    Use char because int might match the return type of a GCC
38869    builtin and then its argument prototype would still apply.  */
38870 char inet_pton ();
38871 int
38872 main (void)
38873 {
38874 return inet_pton ();
38875   ;
38876   return 0;
38877 }
38878 _ACEOF
38879 for ac_lib in '' nsl resolv network
38880 do
38881   if test -z "$ac_lib"; then
38882     ac_res="none required"
38883   else
38884     ac_res=-l$ac_lib
38885     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38886   fi
38887   if ac_fn_c_try_link "$LINENO"
38888 then :
38889   ac_cv_search_inet_pton=$ac_res
38890 fi
38891 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38892     conftest$ac_exeext
38893   if test ${ac_cv_search_inet_pton+y}
38894 then :
38895   break
38896 fi
38897 done
38898 if test ${ac_cv_search_inet_pton+y}
38899 then :
38900
38901 else $as_nop
38902   ac_cv_search_inet_pton=no
38903 fi
38904 rm conftest.$ac_ext
38905 LIBS=$ac_func_search_save_LIBS
38906 fi
38907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
38908 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
38909 ac_res=$ac_cv_search_inet_pton
38910 if test "$ac_res" != no
38911 then :
38912   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38913
38914 else $as_nop
38915   ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
38916 if test "x$ac_cv_func_inet_pton" = xyes
38917 then :
38918   printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
38919
38920 fi
38921
38922        if test $ac_cv_func_inet_pton = no; then
38923          HAVE_INET_PTON=0
38924        fi
38925
38926 fi
38927
38928     LIBS=$gl_save_LIBS
38929
38930     if test "$ac_cv_search_inet_pton" != "no" \
38931        && test "$ac_cv_search_inet_pton" != "none required"; then
38932       INET_PTON_LIB="$ac_cv_search_inet_pton"
38933     fi
38934
38935
38936     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
38937         #if HAVE_NETDB_H
38938         # include <netdb.h>
38939         #endif
38940
38941 " "$ac_c_undeclared_builtin_options" "CFLAGS"
38942 if test "x$ac_cv_have_decl_inet_pton" = xyes
38943 then :
38944   ac_have_decl=1
38945 else $as_nop
38946   ac_have_decl=0
38947 fi
38948 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
38949
38950     if test $ac_cv_have_decl_inet_pton = no; then
38951       HAVE_DECL_INET_PTON=0
38952     fi
38953   fi
38954
38955
38956   if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
38957
38958
38959
38960
38961
38962
38963
38964
38965   gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
38966
38967
38968
38969
38970   fi
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980     if test "$GL_GNULIB_INET_PTON" != 1; then
38981         if test "$GL_GNULIB_INET_PTON" = 0; then
38982       GL_GNULIB_INET_PTON=$gl_module_indicator_condition
38983     else
38984       GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
38985     fi
38986   fi
38987
38988
38989
38990
38991    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
38992 printf %s "checking whether byte ordering is bigendian... " >&6; }
38993 if test ${ac_cv_c_bigendian+y}
38994 then :
38995   printf %s "(cached) " >&6
38996 else $as_nop
38997   ac_cv_c_bigendian=unknown
38998     # See if we're dealing with a universal compiler.
38999     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39000 /* end confdefs.h.  */
39001 #ifndef __APPLE_CC__
39002                not a universal capable compiler
39003              #endif
39004              typedef int dummy;
39005
39006 _ACEOF
39007 if ac_fn_c_try_compile "$LINENO"
39008 then :
39009
39010         # Check for potential -arch flags.  It is not universal unless
39011         # there are at least two -arch flags with different values.
39012         ac_arch=
39013         ac_prev=
39014         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
39015          if test -n "$ac_prev"; then
39016            case $ac_word in
39017              i?86 | x86_64 | ppc | ppc64)
39018                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
39019                  ac_arch=$ac_word
39020                else
39021                  ac_cv_c_bigendian=universal
39022                  break
39023                fi
39024                ;;
39025            esac
39026            ac_prev=
39027          elif test "x$ac_word" = "x-arch"; then
39028            ac_prev=arch
39029          fi
39030        done
39031 fi
39032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39033     if test $ac_cv_c_bigendian = unknown; then
39034       # See if sys/param.h defines the BYTE_ORDER macro.
39035       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39036 /* end confdefs.h.  */
39037 #include <sys/types.h>
39038              #include <sys/param.h>
39039
39040 int
39041 main (void)
39042 {
39043 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
39044                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
39045                      && LITTLE_ENDIAN)
39046               bogus endian macros
39047              #endif
39048
39049   ;
39050   return 0;
39051 }
39052 _ACEOF
39053 if ac_fn_c_try_compile "$LINENO"
39054 then :
39055   # It does; now see whether it defined to BIG_ENDIAN or not.
39056          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39057 /* end confdefs.h.  */
39058 #include <sys/types.h>
39059                 #include <sys/param.h>
39060
39061 int
39062 main (void)
39063 {
39064 #if BYTE_ORDER != BIG_ENDIAN
39065                  not big endian
39066                 #endif
39067
39068   ;
39069   return 0;
39070 }
39071 _ACEOF
39072 if ac_fn_c_try_compile "$LINENO"
39073 then :
39074   ac_cv_c_bigendian=yes
39075 else $as_nop
39076   ac_cv_c_bigendian=no
39077 fi
39078 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39079 fi
39080 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39081     fi
39082     if test $ac_cv_c_bigendian = unknown; then
39083       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
39084       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39085 /* end confdefs.h.  */
39086 #include <limits.h>
39087
39088 int
39089 main (void)
39090 {
39091 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
39092               bogus endian macros
39093              #endif
39094
39095   ;
39096   return 0;
39097 }
39098 _ACEOF
39099 if ac_fn_c_try_compile "$LINENO"
39100 then :
39101   # It does; now see whether it defined to _BIG_ENDIAN or not.
39102          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39103 /* end confdefs.h.  */
39104 #include <limits.h>
39105
39106 int
39107 main (void)
39108 {
39109 #ifndef _BIG_ENDIAN
39110                  not big endian
39111                 #endif
39112
39113   ;
39114   return 0;
39115 }
39116 _ACEOF
39117 if ac_fn_c_try_compile "$LINENO"
39118 then :
39119   ac_cv_c_bigendian=yes
39120 else $as_nop
39121   ac_cv_c_bigendian=no
39122 fi
39123 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39124 fi
39125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39126     fi
39127     if test $ac_cv_c_bigendian = unknown; then
39128       # Compile a test program.
39129       if test "$cross_compiling" = yes
39130 then :
39131   # Try to guess by grepping values from an object file.
39132          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39133 /* end confdefs.h.  */
39134 unsigned short int ascii_mm[] =
39135                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39136                 unsigned short int ascii_ii[] =
39137                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39138                 int use_ascii (int i) {
39139                   return ascii_mm[i] + ascii_ii[i];
39140                 }
39141                 unsigned short int ebcdic_ii[] =
39142                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39143                 unsigned short int ebcdic_mm[] =
39144                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39145                 int use_ebcdic (int i) {
39146                   return ebcdic_mm[i] + ebcdic_ii[i];
39147                 }
39148                 extern int foo;
39149
39150 int
39151 main (void)
39152 {
39153 return use_ascii (foo) == use_ebcdic (foo);
39154   ;
39155   return 0;
39156 }
39157 _ACEOF
39158 if ac_fn_c_try_compile "$LINENO"
39159 then :
39160   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
39161               ac_cv_c_bigendian=yes
39162             fi
39163             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39164               if test "$ac_cv_c_bigendian" = unknown; then
39165                 ac_cv_c_bigendian=no
39166               else
39167                 # finding both strings is unlikely to happen, but who knows?
39168                 ac_cv_c_bigendian=unknown
39169               fi
39170             fi
39171 fi
39172 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39173 else $as_nop
39174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39175 /* end confdefs.h.  */
39176 $ac_includes_default
39177 int
39178 main (void)
39179 {
39180
39181              /* Are we little or big endian?  From Harbison&Steele.  */
39182              union
39183              {
39184                long int l;
39185                char c[sizeof (long int)];
39186              } u;
39187              u.l = 1;
39188              return u.c[sizeof (long int) - 1] == 1;
39189
39190   ;
39191   return 0;
39192 }
39193 _ACEOF
39194 if ac_fn_c_try_run "$LINENO"
39195 then :
39196   ac_cv_c_bigendian=no
39197 else $as_nop
39198   ac_cv_c_bigendian=yes
39199 fi
39200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39201   conftest.$ac_objext conftest.beam conftest.$ac_ext
39202 fi
39203
39204     fi
39205 fi
39206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
39207 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
39208  case $ac_cv_c_bigendian in #(
39209    yes)
39210      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
39211 ;; #(
39212    no)
39213       ;; #(
39214    universal)
39215
39216 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
39217
39218      ;; #(
39219    *)
39220      as_fn_error $? "unknown endianness
39221  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
39222  esac
39223
39224
39225
39226
39227   HAVE_IOCTL=1
39228   if test "$ac_cv_header_winsock2_h" = yes; then
39229                 HAVE_IOCTL=0
39230   else
39231     ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
39232 if test "x$ac_cv_func_ioctl" = xyes
39233 then :
39234   printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
39235
39236 fi
39237
39238                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
39239 printf %s "checking for ioctl with POSIX signature... " >&6; }
39240 if test ${gl_cv_func_ioctl_posix_signature+y}
39241 then :
39242   printf %s "(cached) " >&6
39243 else $as_nop
39244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39245 /* end confdefs.h.  */
39246 #include <sys/ioctl.h>
39247               /* On some platforms, ioctl() is declared in <unistd.h>.  */
39248               #include <unistd.h>
39249
39250 int
39251 main (void)
39252 {
39253 extern
39254               #ifdef __cplusplus
39255               "C"
39256               #endif
39257               int ioctl (int, int, ...);
39258
39259   ;
39260   return 0;
39261 }
39262
39263 _ACEOF
39264 if ac_fn_c_try_compile "$LINENO"
39265 then :
39266   gl_cv_func_ioctl_posix_signature=yes
39267 else $as_nop
39268   gl_cv_func_ioctl_posix_signature=no
39269 fi
39270 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39271
39272 fi
39273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
39274 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
39275     if test $gl_cv_func_ioctl_posix_signature != yes; then
39276       REPLACE_IOCTL=1
39277     fi
39278   fi
39279
39280   if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
39281
39282
39283
39284
39285
39286
39287
39288
39289   gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
39290
39291   fi
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301     if test "$GL_GNULIB_IOCTL" != 1; then
39302         if test "$GL_GNULIB_IOCTL" = 0; then
39303       GL_GNULIB_IOCTL=$gl_module_indicator_condition
39304     else
39305       GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
39306     fi
39307   fi
39308
39309
39310
39311
39312
39313 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
39314
39315
39316
39317
39318
39319
39320   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39321 printf %s "checking for a traditional french locale... " >&6; }
39322 if test ${gt_cv_locale_fr+y}
39323 then :
39324   printf %s "(cached) " >&6
39325 else $as_nop
39326
39327     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39328 /* end confdefs.h.  */
39329
39330 #include <locale.h>
39331 #include <time.h>
39332 #if HAVE_LANGINFO_CODESET
39333 # include <langinfo.h>
39334 #endif
39335 #include <stdlib.h>
39336 #include <string.h>
39337 struct tm t;
39338 char buf[16];
39339 int main () {
39340   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39341      imitates locale dependent behaviour by looking at the environment
39342      variables, and all locales use the UTF-8 encoding.  */
39343 #if defined __BEOS__ || defined __HAIKU__
39344   return 1;
39345 #else
39346   /* Check whether the given locale name is recognized by the system.  */
39347 # if defined _WIN32 && !defined __CYGWIN__
39348   /* On native Windows, setlocale(category, "") looks at the system settings,
39349      not at the environment variables.  Also, when an encoding suffix such
39350      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39351      category of the locale to "C".  */
39352   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39353       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39354     return 1;
39355 # else
39356   if (setlocale (LC_ALL, "") == NULL) return 1;
39357 # endif
39358   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39359      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39360      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39361      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39362      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39363      some unit tests fail.
39364      On MirBSD 10, when an unsupported locale is specified, setlocale()
39365      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
39366 # if HAVE_LANGINFO_CODESET
39367   {
39368     const char *cs = nl_langinfo (CODESET);
39369     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39370         || strcmp (cs, "UTF-8") == 0)
39371       return 1;
39372   }
39373 # endif
39374 # ifdef __CYGWIN__
39375   /* On Cygwin, avoid locale names without encoding suffix, because the
39376      locale_charset() function relies on the encoding suffix.  Note that
39377      LC_ALL is set on the command line.  */
39378   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39379 # endif
39380   /* Check whether in the abbreviation of the second month, the second
39381      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39382      one byte long. This excludes the UTF-8 encoding.  */
39383   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39384   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39385 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
39386   /* Check whether the decimal separator is a comma.
39387      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39388      are nl_langinfo(RADIXCHAR) are both ".".  */
39389   if (localeconv () ->decimal_point[0] != ',') return 1;
39390 # endif
39391   return 0;
39392 #endif
39393 }
39394
39395 _ACEOF
39396     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39397   (eval $ac_link) 2>&5
39398   ac_status=$?
39399   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39400   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39401       case "$host_os" in
39402         # Handle native Windows specially, because there setlocale() interprets
39403         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39404         # "fr" or "fra" as "French" or "French_France.1252",
39405         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39406         # "ja" as "Japanese" or "Japanese_Japan.932",
39407         # and similar.
39408         mingw*)
39409           # Test for the native Windows locale name.
39410           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39411             gt_cv_locale_fr=French_France.1252
39412           else
39413             # None found.
39414             gt_cv_locale_fr=none
39415           fi
39416           ;;
39417         *)
39418           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39419           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39420           # configure script would override the LC_ALL setting. Likewise for
39421           # LC_CTYPE, which is also set at the beginning of the configure script.
39422           # Test for the usual locale name.
39423           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39424             gt_cv_locale_fr=fr_FR
39425           else
39426             # Test for the locale name with explicit encoding suffix.
39427             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39428               gt_cv_locale_fr=fr_FR.ISO-8859-1
39429             else
39430               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39431               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39432                 gt_cv_locale_fr=fr_FR.ISO8859-1
39433               else
39434                 # Test for the HP-UX locale name.
39435                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39436                   gt_cv_locale_fr=fr_FR.iso88591
39437                 else
39438                   # Test for the Solaris 7 locale name.
39439                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39440                     gt_cv_locale_fr=fr
39441                   else
39442                     # None found.
39443                     gt_cv_locale_fr=none
39444                   fi
39445                 fi
39446               fi
39447             fi
39448           fi
39449           ;;
39450       esac
39451     fi
39452     rm -fr conftest*
39453
39454 fi
39455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
39456 printf "%s\n" "$gt_cv_locale_fr" >&6; }
39457   LOCALE_FR=$gt_cv_locale_fr
39458
39459
39460
39461
39462   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
39463 printf %s "checking for a french Unicode locale... " >&6; }
39464 if test ${gt_cv_locale_fr_utf8+y}
39465 then :
39466   printf %s "(cached) " >&6
39467 else $as_nop
39468
39469     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39470 /* end confdefs.h.  */
39471
39472 #include <locale.h>
39473 #include <time.h>
39474 #if HAVE_LANGINFO_CODESET
39475 # include <langinfo.h>
39476 #endif
39477 #include <stdlib.h>
39478 #include <string.h>
39479 struct tm t;
39480 char buf[16];
39481 int main () {
39482   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39483      imitates locale dependent behaviour by looking at the environment
39484      variables, and all locales use the UTF-8 encoding.  */
39485 #if !(defined __BEOS__ || defined __HAIKU__)
39486   /* Check whether the given locale name is recognized by the system.  */
39487 # if defined _WIN32 && !defined __CYGWIN__
39488   /* On native Windows, setlocale(category, "") looks at the system settings,
39489      not at the environment variables.  Also, when an encoding suffix such
39490      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39491      category of the locale to "C".  */
39492   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39493       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39494     return 1;
39495 # else
39496   if (setlocale (LC_ALL, "") == NULL) return 1;
39497 # endif
39498   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39499      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39500      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39501      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39502      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39503      some unit tests fail.  */
39504 # if HAVE_LANGINFO_CODESET
39505   {
39506     const char *cs = nl_langinfo (CODESET);
39507     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
39508       return 1;
39509   }
39510 # endif
39511 # ifdef __CYGWIN__
39512   /* On Cygwin, avoid locale names without encoding suffix, because the
39513      locale_charset() function relies on the encoding suffix.  Note that
39514      LC_ALL is set on the command line.  */
39515   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39516 # endif
39517   /* Check whether in the abbreviation of the second month, the second
39518      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
39519      two bytes long, with UTF-8 encoding.  */
39520   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39521   if (strftime (buf, sizeof (buf), "%b", &t) < 4
39522       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
39523     return 1;
39524 #endif
39525 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
39526   /* Check whether the decimal separator is a comma.
39527      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39528      are nl_langinfo(RADIXCHAR) are both ".".  */
39529   if (localeconv () ->decimal_point[0] != ',') return 1;
39530 #endif
39531   return 0;
39532 }
39533
39534 _ACEOF
39535     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39536   (eval $ac_link) 2>&5
39537   ac_status=$?
39538   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39539   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39540       case "$host_os" in
39541         # Handle native Windows specially, because there setlocale() interprets
39542         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39543         # "fr" or "fra" as "French" or "French_France.1252",
39544         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39545         # "ja" as "Japanese" or "Japanese_Japan.932",
39546         # and similar.
39547         mingw*)
39548           # Test for the hypothetical native Windows locale name.
39549           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39550             gt_cv_locale_fr_utf8=French_France.65001
39551           else
39552             # None found.
39553             gt_cv_locale_fr_utf8=none
39554           fi
39555           ;;
39556         *)
39557           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39558           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39559           # configure script would override the LC_ALL setting. Likewise for
39560           # LC_CTYPE, which is also set at the beginning of the configure script.
39561           # Test for the usual locale name.
39562           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39563             gt_cv_locale_fr_utf8=fr_FR
39564           else
39565             # Test for the locale name with explicit encoding suffix.
39566             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39567               gt_cv_locale_fr_utf8=fr_FR.UTF-8
39568             else
39569               # Test for the Solaris 7 locale name.
39570               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39571                 gt_cv_locale_fr_utf8=fr.UTF-8
39572               else
39573                 # None found.
39574                 gt_cv_locale_fr_utf8=none
39575               fi
39576             fi
39577           fi
39578           ;;
39579       esac
39580     fi
39581     rm -fr conftest*
39582
39583 fi
39584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
39585 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
39586   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
39587
39588
39589
39590
39591
39592   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
39593 printf %s "checking for a traditional japanese locale... " >&6; }
39594 if test ${gt_cv_locale_ja+y}
39595 then :
39596   printf %s "(cached) " >&6
39597 else $as_nop
39598
39599     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39600 /* end confdefs.h.  */
39601
39602 #include <locale.h>
39603 #include <time.h>
39604 #if HAVE_LANGINFO_CODESET
39605 # include <langinfo.h>
39606 #endif
39607 #include <stdlib.h>
39608 #include <string.h>
39609 struct tm t;
39610 char buf[16];
39611 int main ()
39612 {
39613   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39614      imitates locale dependent behaviour by looking at the environment
39615      variables, and all locales use the UTF-8 encoding.  */
39616 #if defined __BEOS__ || defined __HAIKU__
39617   return 1;
39618 #else
39619   /* Check whether the given locale name is recognized by the system.  */
39620 # if defined _WIN32 && !defined __CYGWIN__
39621   /* On native Windows, setlocale(category, "") looks at the system settings,
39622      not at the environment variables.  Also, when an encoding suffix such
39623      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39624      category of the locale to "C".  */
39625   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39626       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39627     return 1;
39628 # else
39629   if (setlocale (LC_ALL, "") == NULL) return 1;
39630 # endif
39631   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39632      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39633      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39634      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39635      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39636      some unit tests fail.
39637      On MirBSD 10, when an unsupported locale is specified, setlocale()
39638      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
39639 # if HAVE_LANGINFO_CODESET
39640   {
39641     const char *cs = nl_langinfo (CODESET);
39642     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39643         || strcmp (cs, "UTF-8") == 0)
39644       return 1;
39645   }
39646 # endif
39647 # ifdef __CYGWIN__
39648   /* On Cygwin, avoid locale names without encoding suffix, because the
39649      locale_charset() function relies on the encoding suffix.  Note that
39650      LC_ALL is set on the command line.  */
39651   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39652 # endif
39653   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
39654      on Cygwin 1.5.x.  */
39655   if (MB_CUR_MAX == 1)
39656     return 1;
39657   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
39658      This excludes the UTF-8 encoding (except on MirBSD).  */
39659   {
39660     const char *p;
39661     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39662     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
39663     for (p = buf; *p != '\0'; p++)
39664       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
39665         return 1;
39666   }
39667   return 0;
39668 #endif
39669 }
39670
39671 _ACEOF
39672     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39673   (eval $ac_link) 2>&5
39674   ac_status=$?
39675   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39676   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39677       case "$host_os" in
39678         # Handle native Windows specially, because there setlocale() interprets
39679         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39680         # "fr" or "fra" as "French" or "French_France.1252",
39681         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39682         # "ja" as "Japanese" or "Japanese_Japan.932",
39683         # and similar.
39684         mingw*)
39685           # Note that on native Windows, the Japanese locale is
39686           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
39687           # cannot use it here.
39688           gt_cv_locale_ja=none
39689           ;;
39690         *)
39691           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39692           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39693           # configure script would override the LC_ALL setting. Likewise for
39694           # LC_CTYPE, which is also set at the beginning of the configure script.
39695           # Test for the AIX locale name.
39696           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39697             gt_cv_locale_ja=ja_JP
39698           else
39699             # Test for the locale name with explicit encoding suffix.
39700             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39701               gt_cv_locale_ja=ja_JP.EUC-JP
39702             else
39703               # Test for the HP-UX, OSF/1, NetBSD locale name.
39704               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39705                 gt_cv_locale_ja=ja_JP.eucJP
39706               else
39707                 # Test for the IRIX, FreeBSD locale name.
39708                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39709                   gt_cv_locale_ja=ja_JP.EUC
39710                 else
39711                   # Test for the Solaris 7 locale name.
39712                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39713                     gt_cv_locale_ja=ja
39714                   else
39715                     # Special test for NetBSD 1.6.
39716                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
39717                       gt_cv_locale_ja=ja_JP.eucJP
39718                     else
39719                       # None found.
39720                       gt_cv_locale_ja=none
39721                     fi
39722                   fi
39723                 fi
39724               fi
39725             fi
39726           fi
39727           ;;
39728       esac
39729     fi
39730     rm -fr conftest*
39731
39732 fi
39733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
39734 printf "%s\n" "$gt_cv_locale_ja" >&6; }
39735   LOCALE_JA=$gt_cv_locale_ja
39736
39737
39738
39739
39740
39741   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
39742 printf %s "checking for a transitional chinese locale... " >&6; }
39743 if test ${gt_cv_locale_zh_CN+y}
39744 then :
39745   printf %s "(cached) " >&6
39746 else $as_nop
39747
39748     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39749 /* end confdefs.h.  */
39750
39751 #include <locale.h>
39752 #include <stdlib.h>
39753 #include <time.h>
39754 #if HAVE_LANGINFO_CODESET
39755 # include <langinfo.h>
39756 #endif
39757 #include <stdlib.h>
39758 #include <string.h>
39759 struct tm t;
39760 char buf[16];
39761 int main ()
39762 {
39763   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39764      imitates locale dependent behaviour by looking at the environment
39765      variables, and all locales use the UTF-8 encoding.  */
39766 #if defined __BEOS__ || defined __HAIKU__
39767   return 1;
39768 #else
39769   /* Check whether the given locale name is recognized by the system.  */
39770 # if defined _WIN32 && !defined __CYGWIN__
39771   /* On native Windows, setlocale(category, "") looks at the system settings,
39772      not at the environment variables.  Also, when an encoding suffix such
39773      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39774      category of the locale to "C".  */
39775   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39776       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39777     return 1;
39778 # else
39779   if (setlocale (LC_ALL, "") == NULL) return 1;
39780 # endif
39781   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39782      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39783      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39784      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39785      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39786      some unit tests fail.
39787      On MirBSD 10, when an unsupported locale is specified, setlocale()
39788      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
39789 # if HAVE_LANGINFO_CODESET
39790   {
39791     const char *cs = nl_langinfo (CODESET);
39792     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39793         || strcmp (cs, "UTF-8") == 0)
39794       return 1;
39795   }
39796 # endif
39797 # ifdef __CYGWIN__
39798   /* On Cygwin, avoid locale names without encoding suffix, because the
39799      locale_charset() function relies on the encoding suffix.  Note that
39800      LC_ALL is set on the command line.  */
39801   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39802 # endif
39803   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
39804      This excludes the UTF-8 encoding (except on MirBSD).  */
39805   {
39806     const char *p;
39807     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39808     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
39809     for (p = buf; *p != '\0'; p++)
39810       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
39811         return 1;
39812   }
39813   /* Check whether a typical GB18030 multibyte sequence is recognized as a
39814      single wide character.  This excludes the GB2312 and GBK encodings.  */
39815   if (mblen ("\203\062\332\066", 5) != 4)
39816     return 1;
39817   return 0;
39818 #endif
39819 }
39820
39821 _ACEOF
39822     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39823   (eval $ac_link) 2>&5
39824   ac_status=$?
39825   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39826   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39827       case "$host_os" in
39828         # Handle native Windows specially, because there setlocale() interprets
39829         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39830         # "fr" or "fra" as "French" or "French_France.1252",
39831         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39832         # "ja" as "Japanese" or "Japanese_Japan.932",
39833         # and similar.
39834         mingw*)
39835           # Test for the hypothetical native Windows locale name.
39836           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39837             gt_cv_locale_zh_CN=Chinese_China.54936
39838           else
39839             # None found.
39840             gt_cv_locale_zh_CN=none
39841           fi
39842           ;;
39843         solaris2.8)
39844           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
39845           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
39846           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
39847           gt_cv_locale_zh_CN=none
39848           ;;
39849         *)
39850           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39851           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39852           # configure script would override the LC_ALL setting. Likewise for
39853           # LC_CTYPE, which is also set at the beginning of the configure script.
39854           # Test for the locale name without encoding suffix.
39855           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39856             gt_cv_locale_zh_CN=zh_CN
39857           else
39858             # Test for the locale name with explicit encoding suffix.
39859             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39860               gt_cv_locale_zh_CN=zh_CN.GB18030
39861             else
39862               # None found.
39863               gt_cv_locale_zh_CN=none
39864             fi
39865           fi
39866           ;;
39867       esac
39868     else
39869       # If there was a link error, due to mblen(), the system is so old that
39870       # it certainly doesn't have a chinese locale.
39871       gt_cv_locale_zh_CN=none
39872     fi
39873     rm -fr conftest*
39874
39875 fi
39876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
39877 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
39878   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
39879
39880
39881
39882
39883
39884   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39885 printf %s "checking for a traditional french locale... " >&6; }
39886 if test ${gt_cv_locale_fr+y}
39887 then :
39888   printf %s "(cached) " >&6
39889 else $as_nop
39890
39891     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39892 /* end confdefs.h.  */
39893
39894 #include <locale.h>
39895 #include <time.h>
39896 #if HAVE_LANGINFO_CODESET
39897 # include <langinfo.h>
39898 #endif
39899 #include <stdlib.h>
39900 #include <string.h>
39901 struct tm t;
39902 char buf[16];
39903 int main () {
39904   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
39905      imitates locale dependent behaviour by looking at the environment
39906      variables, and all locales use the UTF-8 encoding.  */
39907 #if defined __BEOS__ || defined __HAIKU__
39908   return 1;
39909 #else
39910   /* Check whether the given locale name is recognized by the system.  */
39911 # if defined _WIN32 && !defined __CYGWIN__
39912   /* On native Windows, setlocale(category, "") looks at the system settings,
39913      not at the environment variables.  Also, when an encoding suffix such
39914      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39915      category of the locale to "C".  */
39916   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39917       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39918     return 1;
39919 # else
39920   if (setlocale (LC_ALL, "") == NULL) return 1;
39921 # endif
39922   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39923      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39924      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39925      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39926      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39927      some unit tests fail.
39928      On MirBSD 10, when an unsupported locale is specified, setlocale()
39929      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
39930 # if HAVE_LANGINFO_CODESET
39931   {
39932     const char *cs = nl_langinfo (CODESET);
39933     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39934         || strcmp (cs, "UTF-8") == 0)
39935       return 1;
39936   }
39937 # endif
39938 # ifdef __CYGWIN__
39939   /* On Cygwin, avoid locale names without encoding suffix, because the
39940      locale_charset() function relies on the encoding suffix.  Note that
39941      LC_ALL is set on the command line.  */
39942   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39943 # endif
39944   /* Check whether in the abbreviation of the second month, the second
39945      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39946      one byte long. This excludes the UTF-8 encoding.  */
39947   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39948   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39949 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
39950   /* Check whether the decimal separator is a comma.
39951      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39952      are nl_langinfo(RADIXCHAR) are both ".".  */
39953   if (localeconv () ->decimal_point[0] != ',') return 1;
39954 # endif
39955   return 0;
39956 #endif
39957 }
39958
39959 _ACEOF
39960     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39961   (eval $ac_link) 2>&5
39962   ac_status=$?
39963   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39964   test $ac_status = 0; } && test -s conftest$ac_exeext; then
39965       case "$host_os" in
39966         # Handle native Windows specially, because there setlocale() interprets
39967         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39968         # "fr" or "fra" as "French" or "French_France.1252",
39969         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39970         # "ja" as "Japanese" or "Japanese_Japan.932",
39971         # and similar.
39972         mingw*)
39973           # Test for the native Windows locale name.
39974           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39975             gt_cv_locale_fr=French_France.1252
39976           else
39977             # None found.
39978             gt_cv_locale_fr=none
39979           fi
39980           ;;
39981         *)
39982           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39983           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39984           # configure script would override the LC_ALL setting. Likewise for
39985           # LC_CTYPE, which is also set at the beginning of the configure script.
39986           # Test for the usual locale name.
39987           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39988             gt_cv_locale_fr=fr_FR
39989           else
39990             # Test for the locale name with explicit encoding suffix.
39991             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39992               gt_cv_locale_fr=fr_FR.ISO-8859-1
39993             else
39994               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39995               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39996                 gt_cv_locale_fr=fr_FR.ISO8859-1
39997               else
39998                 # Test for the HP-UX locale name.
39999                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40000                   gt_cv_locale_fr=fr_FR.iso88591
40001                 else
40002                   # Test for the Solaris 7 locale name.
40003                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40004                     gt_cv_locale_fr=fr
40005                   else
40006                     # None found.
40007                     gt_cv_locale_fr=none
40008                   fi
40009                 fi
40010               fi
40011             fi
40012           fi
40013           ;;
40014       esac
40015     fi
40016     rm -fr conftest*
40017
40018 fi
40019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40020 printf "%s\n" "$gt_cv_locale_fr" >&6; }
40021   LOCALE_FR=$gt_cv_locale_fr
40022
40023
40024
40025
40026   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
40027 printf %s "checking for a french Unicode locale... " >&6; }
40028 if test ${gt_cv_locale_fr_utf8+y}
40029 then :
40030   printf %s "(cached) " >&6
40031 else $as_nop
40032
40033     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40034 /* end confdefs.h.  */
40035
40036 #include <locale.h>
40037 #include <time.h>
40038 #if HAVE_LANGINFO_CODESET
40039 # include <langinfo.h>
40040 #endif
40041 #include <stdlib.h>
40042 #include <string.h>
40043 struct tm t;
40044 char buf[16];
40045 int main () {
40046   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40047      imitates locale dependent behaviour by looking at the environment
40048      variables, and all locales use the UTF-8 encoding.  */
40049 #if !(defined __BEOS__ || defined __HAIKU__)
40050   /* Check whether the given locale name is recognized by the system.  */
40051 # if defined _WIN32 && !defined __CYGWIN__
40052   /* On native Windows, setlocale(category, "") looks at the system settings,
40053      not at the environment variables.  Also, when an encoding suffix such
40054      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40055      category of the locale to "C".  */
40056   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40057       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40058     return 1;
40059 # else
40060   if (setlocale (LC_ALL, "") == NULL) return 1;
40061 # endif
40062   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40063      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40064      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40065      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40066      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40067      some unit tests fail.  */
40068 # if HAVE_LANGINFO_CODESET
40069   {
40070     const char *cs = nl_langinfo (CODESET);
40071     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40072       return 1;
40073   }
40074 # endif
40075 # ifdef __CYGWIN__
40076   /* On Cygwin, avoid locale names without encoding suffix, because the
40077      locale_charset() function relies on the encoding suffix.  Note that
40078      LC_ALL is set on the command line.  */
40079   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40080 # endif
40081   /* Check whether in the abbreviation of the second month, the second
40082      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
40083      two bytes long, with UTF-8 encoding.  */
40084   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40085   if (strftime (buf, sizeof (buf), "%b", &t) < 4
40086       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
40087     return 1;
40088 #endif
40089 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
40090   /* Check whether the decimal separator is a comma.
40091      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40092      are nl_langinfo(RADIXCHAR) are both ".".  */
40093   if (localeconv () ->decimal_point[0] != ',') return 1;
40094 #endif
40095   return 0;
40096 }
40097
40098 _ACEOF
40099     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40100   (eval $ac_link) 2>&5
40101   ac_status=$?
40102   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40103   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40104       case "$host_os" in
40105         # Handle native Windows specially, because there setlocale() interprets
40106         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40107         # "fr" or "fra" as "French" or "French_France.1252",
40108         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40109         # "ja" as "Japanese" or "Japanese_Japan.932",
40110         # and similar.
40111         mingw*)
40112           # Test for the hypothetical native Windows locale name.
40113           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40114             gt_cv_locale_fr_utf8=French_France.65001
40115           else
40116             # None found.
40117             gt_cv_locale_fr_utf8=none
40118           fi
40119           ;;
40120         *)
40121           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40122           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40123           # configure script would override the LC_ALL setting. Likewise for
40124           # LC_CTYPE, which is also set at the beginning of the configure script.
40125           # Test for the usual locale name.
40126           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40127             gt_cv_locale_fr_utf8=fr_FR
40128           else
40129             # Test for the locale name with explicit encoding suffix.
40130             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40131               gt_cv_locale_fr_utf8=fr_FR.UTF-8
40132             else
40133               # Test for the Solaris 7 locale name.
40134               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40135                 gt_cv_locale_fr_utf8=fr.UTF-8
40136               else
40137                 # None found.
40138                 gt_cv_locale_fr_utf8=none
40139               fi
40140             fi
40141           fi
40142           ;;
40143       esac
40144     fi
40145     rm -fr conftest*
40146
40147 fi
40148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40149 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
40150   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40151
40152
40153
40154
40155
40156   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
40157 printf %s "checking for a traditional japanese locale... " >&6; }
40158 if test ${gt_cv_locale_ja+y}
40159 then :
40160   printf %s "(cached) " >&6
40161 else $as_nop
40162
40163     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40164 /* end confdefs.h.  */
40165
40166 #include <locale.h>
40167 #include <time.h>
40168 #if HAVE_LANGINFO_CODESET
40169 # include <langinfo.h>
40170 #endif
40171 #include <stdlib.h>
40172 #include <string.h>
40173 struct tm t;
40174 char buf[16];
40175 int main ()
40176 {
40177   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40178      imitates locale dependent behaviour by looking at the environment
40179      variables, and all locales use the UTF-8 encoding.  */
40180 #if defined __BEOS__ || defined __HAIKU__
40181   return 1;
40182 #else
40183   /* Check whether the given locale name is recognized by the system.  */
40184 # if defined _WIN32 && !defined __CYGWIN__
40185   /* On native Windows, setlocale(category, "") looks at the system settings,
40186      not at the environment variables.  Also, when an encoding suffix such
40187      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40188      category of the locale to "C".  */
40189   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40190       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40191     return 1;
40192 # else
40193   if (setlocale (LC_ALL, "") == NULL) return 1;
40194 # endif
40195   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40196      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40197      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40198      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40199      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40200      some unit tests fail.
40201      On MirBSD 10, when an unsupported locale is specified, setlocale()
40202      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40203 # if HAVE_LANGINFO_CODESET
40204   {
40205     const char *cs = nl_langinfo (CODESET);
40206     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40207         || strcmp (cs, "UTF-8") == 0)
40208       return 1;
40209   }
40210 # endif
40211 # ifdef __CYGWIN__
40212   /* On Cygwin, avoid locale names without encoding suffix, because the
40213      locale_charset() function relies on the encoding suffix.  Note that
40214      LC_ALL is set on the command line.  */
40215   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40216 # endif
40217   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
40218      on Cygwin 1.5.x.  */
40219   if (MB_CUR_MAX == 1)
40220     return 1;
40221   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40222      This excludes the UTF-8 encoding (except on MirBSD).  */
40223   {
40224     const char *p;
40225     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40226     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40227     for (p = buf; *p != '\0'; p++)
40228       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40229         return 1;
40230   }
40231   return 0;
40232 #endif
40233 }
40234
40235 _ACEOF
40236     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40237   (eval $ac_link) 2>&5
40238   ac_status=$?
40239   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40240   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40241       case "$host_os" in
40242         # Handle native Windows specially, because there setlocale() interprets
40243         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40244         # "fr" or "fra" as "French" or "French_France.1252",
40245         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40246         # "ja" as "Japanese" or "Japanese_Japan.932",
40247         # and similar.
40248         mingw*)
40249           # Note that on native Windows, the Japanese locale is
40250           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
40251           # cannot use it here.
40252           gt_cv_locale_ja=none
40253           ;;
40254         *)
40255           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40256           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40257           # configure script would override the LC_ALL setting. Likewise for
40258           # LC_CTYPE, which is also set at the beginning of the configure script.
40259           # Test for the AIX locale name.
40260           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40261             gt_cv_locale_ja=ja_JP
40262           else
40263             # Test for the locale name with explicit encoding suffix.
40264             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40265               gt_cv_locale_ja=ja_JP.EUC-JP
40266             else
40267               # Test for the HP-UX, OSF/1, NetBSD locale name.
40268               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40269                 gt_cv_locale_ja=ja_JP.eucJP
40270               else
40271                 # Test for the IRIX, FreeBSD locale name.
40272                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40273                   gt_cv_locale_ja=ja_JP.EUC
40274                 else
40275                   # Test for the Solaris 7 locale name.
40276                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40277                     gt_cv_locale_ja=ja
40278                   else
40279                     # Special test for NetBSD 1.6.
40280                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
40281                       gt_cv_locale_ja=ja_JP.eucJP
40282                     else
40283                       # None found.
40284                       gt_cv_locale_ja=none
40285                     fi
40286                   fi
40287                 fi
40288               fi
40289             fi
40290           fi
40291           ;;
40292       esac
40293     fi
40294     rm -fr conftest*
40295
40296 fi
40297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
40298 printf "%s\n" "$gt_cv_locale_ja" >&6; }
40299   LOCALE_JA=$gt_cv_locale_ja
40300
40301
40302
40303
40304
40305   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
40306 printf %s "checking for a transitional chinese locale... " >&6; }
40307 if test ${gt_cv_locale_zh_CN+y}
40308 then :
40309   printf %s "(cached) " >&6
40310 else $as_nop
40311
40312     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40313 /* end confdefs.h.  */
40314
40315 #include <locale.h>
40316 #include <stdlib.h>
40317 #include <time.h>
40318 #if HAVE_LANGINFO_CODESET
40319 # include <langinfo.h>
40320 #endif
40321 #include <stdlib.h>
40322 #include <string.h>
40323 struct tm t;
40324 char buf[16];
40325 int main ()
40326 {
40327   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40328      imitates locale dependent behaviour by looking at the environment
40329      variables, and all locales use the UTF-8 encoding.  */
40330 #if defined __BEOS__ || defined __HAIKU__
40331   return 1;
40332 #else
40333   /* Check whether the given locale name is recognized by the system.  */
40334 # if defined _WIN32 && !defined __CYGWIN__
40335   /* On native Windows, setlocale(category, "") looks at the system settings,
40336      not at the environment variables.  Also, when an encoding suffix such
40337      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40338      category of the locale to "C".  */
40339   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40340       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40341     return 1;
40342 # else
40343   if (setlocale (LC_ALL, "") == NULL) return 1;
40344 # endif
40345   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40346      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40347      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40348      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40349      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40350      some unit tests fail.
40351      On MirBSD 10, when an unsupported locale is specified, setlocale()
40352      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40353 # if HAVE_LANGINFO_CODESET
40354   {
40355     const char *cs = nl_langinfo (CODESET);
40356     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40357         || strcmp (cs, "UTF-8") == 0)
40358       return 1;
40359   }
40360 # endif
40361 # ifdef __CYGWIN__
40362   /* On Cygwin, avoid locale names without encoding suffix, because the
40363      locale_charset() function relies on the encoding suffix.  Note that
40364      LC_ALL is set on the command line.  */
40365   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40366 # endif
40367   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40368      This excludes the UTF-8 encoding (except on MirBSD).  */
40369   {
40370     const char *p;
40371     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40372     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40373     for (p = buf; *p != '\0'; p++)
40374       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40375         return 1;
40376   }
40377   /* Check whether a typical GB18030 multibyte sequence is recognized as a
40378      single wide character.  This excludes the GB2312 and GBK encodings.  */
40379   if (mblen ("\203\062\332\066", 5) != 4)
40380     return 1;
40381   return 0;
40382 #endif
40383 }
40384
40385 _ACEOF
40386     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40387   (eval $ac_link) 2>&5
40388   ac_status=$?
40389   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40390   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40391       case "$host_os" in
40392         # Handle native Windows specially, because there setlocale() interprets
40393         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40394         # "fr" or "fra" as "French" or "French_France.1252",
40395         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40396         # "ja" as "Japanese" or "Japanese_Japan.932",
40397         # and similar.
40398         mingw*)
40399           # Test for the hypothetical native Windows locale name.
40400           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40401             gt_cv_locale_zh_CN=Chinese_China.54936
40402           else
40403             # None found.
40404             gt_cv_locale_zh_CN=none
40405           fi
40406           ;;
40407         solaris2.8)
40408           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
40409           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
40410           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
40411           gt_cv_locale_zh_CN=none
40412           ;;
40413         *)
40414           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40415           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40416           # configure script would override the LC_ALL setting. Likewise for
40417           # LC_CTYPE, which is also set at the beginning of the configure script.
40418           # Test for the locale name without encoding suffix.
40419           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40420             gt_cv_locale_zh_CN=zh_CN
40421           else
40422             # Test for the locale name with explicit encoding suffix.
40423             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40424               gt_cv_locale_zh_CN=zh_CN.GB18030
40425             else
40426               # None found.
40427               gt_cv_locale_zh_CN=none
40428             fi
40429           fi
40430           ;;
40431       esac
40432     else
40433       # If there was a link error, due to mblen(), the system is so old that
40434       # it certainly doesn't have a chinese locale.
40435       gt_cv_locale_zh_CN=none
40436     fi
40437     rm -fr conftest*
40438
40439 fi
40440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
40441 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
40442   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
40443
40444
40445
40446   if test "$ac_cv_header_winsock2_h" = yes; then
40447
40448
40449
40450
40451
40452
40453
40454
40455   gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
40456
40457   fi
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467     if test "$GL_GNULIB_LISTEN" != 1; then
40468         if test "$GL_GNULIB_LISTEN" = 0; then
40469       GL_GNULIB_LISTEN=$gl_module_indicator_condition
40470     else
40471       GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
40472     fi
40473   fi
40474
40475
40476
40477
40478
40479 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
40480
40481
40482
40483
40484
40485
40486
40487   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
40488 printf %s "checking for a traditional french locale... " >&6; }
40489 if test ${gt_cv_locale_fr+y}
40490 then :
40491   printf %s "(cached) " >&6
40492 else $as_nop
40493
40494     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40495 /* end confdefs.h.  */
40496
40497 #include <locale.h>
40498 #include <time.h>
40499 #if HAVE_LANGINFO_CODESET
40500 # include <langinfo.h>
40501 #endif
40502 #include <stdlib.h>
40503 #include <string.h>
40504 struct tm t;
40505 char buf[16];
40506 int main () {
40507   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40508      imitates locale dependent behaviour by looking at the environment
40509      variables, and all locales use the UTF-8 encoding.  */
40510 #if defined __BEOS__ || defined __HAIKU__
40511   return 1;
40512 #else
40513   /* Check whether the given locale name is recognized by the system.  */
40514 # if defined _WIN32 && !defined __CYGWIN__
40515   /* On native Windows, setlocale(category, "") looks at the system settings,
40516      not at the environment variables.  Also, when an encoding suffix such
40517      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40518      category of the locale to "C".  */
40519   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40520       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40521     return 1;
40522 # else
40523   if (setlocale (LC_ALL, "") == NULL) return 1;
40524 # endif
40525   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40526      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40527      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40528      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40529      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40530      some unit tests fail.
40531      On MirBSD 10, when an unsupported locale is specified, setlocale()
40532      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40533 # if HAVE_LANGINFO_CODESET
40534   {
40535     const char *cs = nl_langinfo (CODESET);
40536     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40537         || strcmp (cs, "UTF-8") == 0)
40538       return 1;
40539   }
40540 # endif
40541 # ifdef __CYGWIN__
40542   /* On Cygwin, avoid locale names without encoding suffix, because the
40543      locale_charset() function relies on the encoding suffix.  Note that
40544      LC_ALL is set on the command line.  */
40545   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40546 # endif
40547   /* Check whether in the abbreviation of the second month, the second
40548      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
40549      one byte long. This excludes the UTF-8 encoding.  */
40550   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40551   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
40552 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
40553   /* Check whether the decimal separator is a comma.
40554      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40555      are nl_langinfo(RADIXCHAR) are both ".".  */
40556   if (localeconv () ->decimal_point[0] != ',') return 1;
40557 # endif
40558   return 0;
40559 #endif
40560 }
40561
40562 _ACEOF
40563     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40564   (eval $ac_link) 2>&5
40565   ac_status=$?
40566   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40567   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40568       case "$host_os" in
40569         # Handle native Windows specially, because there setlocale() interprets
40570         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40571         # "fr" or "fra" as "French" or "French_France.1252",
40572         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40573         # "ja" as "Japanese" or "Japanese_Japan.932",
40574         # and similar.
40575         mingw*)
40576           # Test for the native Windows locale name.
40577           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40578             gt_cv_locale_fr=French_France.1252
40579           else
40580             # None found.
40581             gt_cv_locale_fr=none
40582           fi
40583           ;;
40584         *)
40585           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40586           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40587           # configure script would override the LC_ALL setting. Likewise for
40588           # LC_CTYPE, which is also set at the beginning of the configure script.
40589           # Test for the usual locale name.
40590           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40591             gt_cv_locale_fr=fr_FR
40592           else
40593             # Test for the locale name with explicit encoding suffix.
40594             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40595               gt_cv_locale_fr=fr_FR.ISO-8859-1
40596             else
40597               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
40598               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40599                 gt_cv_locale_fr=fr_FR.ISO8859-1
40600               else
40601                 # Test for the HP-UX locale name.
40602                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40603                   gt_cv_locale_fr=fr_FR.iso88591
40604                 else
40605                   # Test for the Solaris 7 locale name.
40606                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40607                     gt_cv_locale_fr=fr
40608                   else
40609                     # None found.
40610                     gt_cv_locale_fr=none
40611                   fi
40612                 fi
40613               fi
40614             fi
40615           fi
40616           ;;
40617       esac
40618     fi
40619     rm -fr conftest*
40620
40621 fi
40622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40623 printf "%s\n" "$gt_cv_locale_fr" >&6; }
40624   LOCALE_FR=$gt_cv_locale_fr
40625
40626
40627
40628
40629   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
40630 printf %s "checking for a french Unicode locale... " >&6; }
40631 if test ${gt_cv_locale_fr_utf8+y}
40632 then :
40633   printf %s "(cached) " >&6
40634 else $as_nop
40635
40636     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40637 /* end confdefs.h.  */
40638
40639 #include <locale.h>
40640 #include <time.h>
40641 #if HAVE_LANGINFO_CODESET
40642 # include <langinfo.h>
40643 #endif
40644 #include <stdlib.h>
40645 #include <string.h>
40646 struct tm t;
40647 char buf[16];
40648 int main () {
40649   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40650      imitates locale dependent behaviour by looking at the environment
40651      variables, and all locales use the UTF-8 encoding.  */
40652 #if !(defined __BEOS__ || defined __HAIKU__)
40653   /* Check whether the given locale name is recognized by the system.  */
40654 # if defined _WIN32 && !defined __CYGWIN__
40655   /* On native Windows, setlocale(category, "") looks at the system settings,
40656      not at the environment variables.  Also, when an encoding suffix such
40657      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40658      category of the locale to "C".  */
40659   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40660       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40661     return 1;
40662 # else
40663   if (setlocale (LC_ALL, "") == NULL) return 1;
40664 # endif
40665   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40666      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40667      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40668      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40669      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40670      some unit tests fail.  */
40671 # if HAVE_LANGINFO_CODESET
40672   {
40673     const char *cs = nl_langinfo (CODESET);
40674     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40675       return 1;
40676   }
40677 # endif
40678 # ifdef __CYGWIN__
40679   /* On Cygwin, avoid locale names without encoding suffix, because the
40680      locale_charset() function relies on the encoding suffix.  Note that
40681      LC_ALL is set on the command line.  */
40682   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40683 # endif
40684   /* Check whether in the abbreviation of the second month, the second
40685      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
40686      two bytes long, with UTF-8 encoding.  */
40687   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40688   if (strftime (buf, sizeof (buf), "%b", &t) < 4
40689       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
40690     return 1;
40691 #endif
40692 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
40693   /* Check whether the decimal separator is a comma.
40694      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40695      are nl_langinfo(RADIXCHAR) are both ".".  */
40696   if (localeconv () ->decimal_point[0] != ',') return 1;
40697 #endif
40698   return 0;
40699 }
40700
40701 _ACEOF
40702     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40703   (eval $ac_link) 2>&5
40704   ac_status=$?
40705   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40706   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40707       case "$host_os" in
40708         # Handle native Windows specially, because there setlocale() interprets
40709         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40710         # "fr" or "fra" as "French" or "French_France.1252",
40711         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40712         # "ja" as "Japanese" or "Japanese_Japan.932",
40713         # and similar.
40714         mingw*)
40715           # Test for the hypothetical native Windows locale name.
40716           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40717             gt_cv_locale_fr_utf8=French_France.65001
40718           else
40719             # None found.
40720             gt_cv_locale_fr_utf8=none
40721           fi
40722           ;;
40723         *)
40724           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40725           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40726           # configure script would override the LC_ALL setting. Likewise for
40727           # LC_CTYPE, which is also set at the beginning of the configure script.
40728           # Test for the usual locale name.
40729           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40730             gt_cv_locale_fr_utf8=fr_FR
40731           else
40732             # Test for the locale name with explicit encoding suffix.
40733             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40734               gt_cv_locale_fr_utf8=fr_FR.UTF-8
40735             else
40736               # Test for the Solaris 7 locale name.
40737               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40738                 gt_cv_locale_fr_utf8=fr.UTF-8
40739               else
40740                 # None found.
40741                 gt_cv_locale_fr_utf8=none
40742               fi
40743             fi
40744           fi
40745           ;;
40746       esac
40747     fi
40748     rm -fr conftest*
40749
40750 fi
40751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40752 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
40753   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40754
40755
40756
40757
40758
40759   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
40760 printf %s "checking for a traditional japanese locale... " >&6; }
40761 if test ${gt_cv_locale_ja+y}
40762 then :
40763   printf %s "(cached) " >&6
40764 else $as_nop
40765
40766     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40767 /* end confdefs.h.  */
40768
40769 #include <locale.h>
40770 #include <time.h>
40771 #if HAVE_LANGINFO_CODESET
40772 # include <langinfo.h>
40773 #endif
40774 #include <stdlib.h>
40775 #include <string.h>
40776 struct tm t;
40777 char buf[16];
40778 int main ()
40779 {
40780   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40781      imitates locale dependent behaviour by looking at the environment
40782      variables, and all locales use the UTF-8 encoding.  */
40783 #if defined __BEOS__ || defined __HAIKU__
40784   return 1;
40785 #else
40786   /* Check whether the given locale name is recognized by the system.  */
40787 # if defined _WIN32 && !defined __CYGWIN__
40788   /* On native Windows, setlocale(category, "") looks at the system settings,
40789      not at the environment variables.  Also, when an encoding suffix such
40790      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40791      category of the locale to "C".  */
40792   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40793       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40794     return 1;
40795 # else
40796   if (setlocale (LC_ALL, "") == NULL) return 1;
40797 # endif
40798   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40799      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40800      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40801      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40802      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40803      some unit tests fail.
40804      On MirBSD 10, when an unsupported locale is specified, setlocale()
40805      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40806 # if HAVE_LANGINFO_CODESET
40807   {
40808     const char *cs = nl_langinfo (CODESET);
40809     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40810         || strcmp (cs, "UTF-8") == 0)
40811       return 1;
40812   }
40813 # endif
40814 # ifdef __CYGWIN__
40815   /* On Cygwin, avoid locale names without encoding suffix, because the
40816      locale_charset() function relies on the encoding suffix.  Note that
40817      LC_ALL is set on the command line.  */
40818   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40819 # endif
40820   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
40821      on Cygwin 1.5.x.  */
40822   if (MB_CUR_MAX == 1)
40823     return 1;
40824   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40825      This excludes the UTF-8 encoding (except on MirBSD).  */
40826   {
40827     const char *p;
40828     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40829     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40830     for (p = buf; *p != '\0'; p++)
40831       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40832         return 1;
40833   }
40834   return 0;
40835 #endif
40836 }
40837
40838 _ACEOF
40839     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40840   (eval $ac_link) 2>&5
40841   ac_status=$?
40842   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40843   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40844       case "$host_os" in
40845         # Handle native Windows specially, because there setlocale() interprets
40846         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40847         # "fr" or "fra" as "French" or "French_France.1252",
40848         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40849         # "ja" as "Japanese" or "Japanese_Japan.932",
40850         # and similar.
40851         mingw*)
40852           # Note that on native Windows, the Japanese locale is
40853           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
40854           # cannot use it here.
40855           gt_cv_locale_ja=none
40856           ;;
40857         *)
40858           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40859           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40860           # configure script would override the LC_ALL setting. Likewise for
40861           # LC_CTYPE, which is also set at the beginning of the configure script.
40862           # Test for the AIX locale name.
40863           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40864             gt_cv_locale_ja=ja_JP
40865           else
40866             # Test for the locale name with explicit encoding suffix.
40867             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40868               gt_cv_locale_ja=ja_JP.EUC-JP
40869             else
40870               # Test for the HP-UX, OSF/1, NetBSD locale name.
40871               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40872                 gt_cv_locale_ja=ja_JP.eucJP
40873               else
40874                 # Test for the IRIX, FreeBSD locale name.
40875                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40876                   gt_cv_locale_ja=ja_JP.EUC
40877                 else
40878                   # Test for the Solaris 7 locale name.
40879                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40880                     gt_cv_locale_ja=ja
40881                   else
40882                     # Special test for NetBSD 1.6.
40883                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
40884                       gt_cv_locale_ja=ja_JP.eucJP
40885                     else
40886                       # None found.
40887                       gt_cv_locale_ja=none
40888                     fi
40889                   fi
40890                 fi
40891               fi
40892             fi
40893           fi
40894           ;;
40895       esac
40896     fi
40897     rm -fr conftest*
40898
40899 fi
40900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
40901 printf "%s\n" "$gt_cv_locale_ja" >&6; }
40902   LOCALE_JA=$gt_cv_locale_ja
40903
40904
40905
40906
40907
40908   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
40909 printf %s "checking for a transitional chinese locale... " >&6; }
40910 if test ${gt_cv_locale_zh_CN+y}
40911 then :
40912   printf %s "(cached) " >&6
40913 else $as_nop
40914
40915     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40916 /* end confdefs.h.  */
40917
40918 #include <locale.h>
40919 #include <stdlib.h>
40920 #include <time.h>
40921 #if HAVE_LANGINFO_CODESET
40922 # include <langinfo.h>
40923 #endif
40924 #include <stdlib.h>
40925 #include <string.h>
40926 struct tm t;
40927 char buf[16];
40928 int main ()
40929 {
40930   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
40931      imitates locale dependent behaviour by looking at the environment
40932      variables, and all locales use the UTF-8 encoding.  */
40933 #if defined __BEOS__ || defined __HAIKU__
40934   return 1;
40935 #else
40936   /* Check whether the given locale name is recognized by the system.  */
40937 # if defined _WIN32 && !defined __CYGWIN__
40938   /* On native Windows, setlocale(category, "") looks at the system settings,
40939      not at the environment variables.  Also, when an encoding suffix such
40940      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40941      category of the locale to "C".  */
40942   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40943       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40944     return 1;
40945 # else
40946   if (setlocale (LC_ALL, "") == NULL) return 1;
40947 # endif
40948   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40949      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40950      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40951      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40952      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40953      some unit tests fail.
40954      On MirBSD 10, when an unsupported locale is specified, setlocale()
40955      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
40956 # if HAVE_LANGINFO_CODESET
40957   {
40958     const char *cs = nl_langinfo (CODESET);
40959     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40960         || strcmp (cs, "UTF-8") == 0)
40961       return 1;
40962   }
40963 # endif
40964 # ifdef __CYGWIN__
40965   /* On Cygwin, avoid locale names without encoding suffix, because the
40966      locale_charset() function relies on the encoding suffix.  Note that
40967      LC_ALL is set on the command line.  */
40968   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40969 # endif
40970   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40971      This excludes the UTF-8 encoding (except on MirBSD).  */
40972   {
40973     const char *p;
40974     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40975     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40976     for (p = buf; *p != '\0'; p++)
40977       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40978         return 1;
40979   }
40980   /* Check whether a typical GB18030 multibyte sequence is recognized as a
40981      single wide character.  This excludes the GB2312 and GBK encodings.  */
40982   if (mblen ("\203\062\332\066", 5) != 4)
40983     return 1;
40984   return 0;
40985 #endif
40986 }
40987
40988 _ACEOF
40989     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40990   (eval $ac_link) 2>&5
40991   ac_status=$?
40992   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40993   test $ac_status = 0; } && test -s conftest$ac_exeext; then
40994       case "$host_os" in
40995         # Handle native Windows specially, because there setlocale() interprets
40996         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40997         # "fr" or "fra" as "French" or "French_France.1252",
40998         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40999         # "ja" as "Japanese" or "Japanese_Japan.932",
41000         # and similar.
41001         mingw*)
41002           # Test for the hypothetical native Windows locale name.
41003           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41004             gt_cv_locale_zh_CN=Chinese_China.54936
41005           else
41006             # None found.
41007             gt_cv_locale_zh_CN=none
41008           fi
41009           ;;
41010         solaris2.8)
41011           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
41012           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
41013           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
41014           gt_cv_locale_zh_CN=none
41015           ;;
41016         *)
41017           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41018           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41019           # configure script would override the LC_ALL setting. Likewise for
41020           # LC_CTYPE, which is also set at the beginning of the configure script.
41021           # Test for the locale name without encoding suffix.
41022           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41023             gt_cv_locale_zh_CN=zh_CN
41024           else
41025             # Test for the locale name with explicit encoding suffix.
41026             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41027               gt_cv_locale_zh_CN=zh_CN.GB18030
41028             else
41029               # None found.
41030               gt_cv_locale_zh_CN=none
41031             fi
41032           fi
41033           ;;
41034       esac
41035     else
41036       # If there was a link error, due to mblen(), the system is so old that
41037       # it certainly doesn't have a chinese locale.
41038       gt_cv_locale_zh_CN=none
41039     fi
41040     rm -fr conftest*
41041
41042 fi
41043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
41044 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
41045   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
41046
41047
41048
41049
41050
41051   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
41052 printf %s "checking for a turkish Unicode locale... " >&6; }
41053 if test ${gt_cv_locale_tr_utf8+y}
41054 then :
41055   printf %s "(cached) " >&6
41056 else $as_nop
41057
41058     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41059 /* end confdefs.h.  */
41060
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 #include <wctype.h>
41069 struct tm t;
41070 char buf[16];
41071 int main () {
41072   /* On BeOS, locales are not implemented in libc.  Rather, libintl
41073      imitates locale dependent behaviour by looking at the environment
41074      variables, and all locales use the UTF-8 encoding.  But BeOS does not
41075      implement the Turkish upper-/lowercase mappings.  Therefore, let this
41076      program return 1 on BeOS.  */
41077   /* Check whether the given locale name is recognized by the system.  */
41078 #if defined _WIN32 && !defined __CYGWIN__
41079   /* On native Windows, setlocale(category, "") looks at the system settings,
41080      not at the environment variables.  Also, when an encoding suffix such
41081      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41082      category of the locale to "C".  */
41083   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41084       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
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 tr_TR locale, nl_langinfo(CODESET)
41091      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41092      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41093      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41094      some unit tests fail.  */
41095 #if HAVE_LANGINFO_CODESET
41096   {
41097     const char *cs = nl_langinfo (CODESET);
41098     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41099       return 1;
41100   }
41101 #endif
41102 #ifdef __CYGWIN__
41103   /* On Cygwin, avoid locale names without encoding suffix, because the
41104      locale_charset() function relies on the encoding suffix.  Note that
41105      LC_ALL is set on the command line.  */
41106   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41107 #endif
41108   /* Check whether in the abbreviation of the eighth month, the second
41109      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
41110      two bytes long, with UTF-8 encoding.  */
41111   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
41112   if (strftime (buf, sizeof (buf), "%b", &t) < 4
41113       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
41114     return 1;
41115   /* Check whether the upper-/lowercase mappings are as expected for
41116      Turkish.  */
41117   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
41118       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
41119     return 1;
41120   return 0;
41121 }
41122
41123 _ACEOF
41124     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41125   (eval $ac_link) 2>&5
41126   ac_status=$?
41127   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41128   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41129       case "$host_os" in
41130         # Handle native Windows specially, because there setlocale() interprets
41131         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41132         # "fr" or "fra" as "French" or "French_France.1252",
41133         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41134         # "ja" as "Japanese" or "Japanese_Japan.932",
41135         # and similar.
41136         mingw*)
41137           # Test for the hypothetical native Windows locale name.
41138           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41139             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
41140           else
41141             # None found.
41142             gt_cv_locale_tr_utf8=none
41143           fi
41144           ;;
41145         *)
41146           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41147           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41148           # configure script would override the LC_ALL setting. Likewise for
41149           # LC_CTYPE, which is also set at the beginning of the configure script.
41150           # Test for the usual locale name.
41151           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41152             gt_cv_locale_tr_utf8=tr_TR
41153           else
41154             # Test for the locale name with explicit encoding suffix.
41155             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41156               gt_cv_locale_tr_utf8=tr_TR.UTF-8
41157             else
41158               # Test for the Solaris 7 locale name.
41159               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41160                 gt_cv_locale_tr_utf8=tr.UTF-8
41161               else
41162                 # None found.
41163                 gt_cv_locale_tr_utf8=none
41164               fi
41165             fi
41166           fi
41167           ;;
41168       esac
41169     else
41170       gt_cv_locale_tr_utf8=none
41171     fi
41172     rm -fr conftest*
41173
41174 fi
41175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
41176 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
41177   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
41178
41179
41180
41181
41182   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41183 printf %s "checking for a french Unicode locale... " >&6; }
41184 if test ${gt_cv_locale_fr_utf8+y}
41185 then :
41186   printf %s "(cached) " >&6
41187 else $as_nop
41188
41189     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41190 /* end confdefs.h.  */
41191
41192 #include <locale.h>
41193 #include <time.h>
41194 #if HAVE_LANGINFO_CODESET
41195 # include <langinfo.h>
41196 #endif
41197 #include <stdlib.h>
41198 #include <string.h>
41199 struct tm t;
41200 char buf[16];
41201 int main () {
41202   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41203      imitates locale dependent behaviour by looking at the environment
41204      variables, and all locales use the UTF-8 encoding.  */
41205 #if !(defined __BEOS__ || defined __HAIKU__)
41206   /* Check whether the given locale name is recognized by the system.  */
41207 # if defined _WIN32 && !defined __CYGWIN__
41208   /* On native Windows, setlocale(category, "") looks at the system settings,
41209      not at the environment variables.  Also, when an encoding suffix such
41210      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41211      category of the locale to "C".  */
41212   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41213       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41214     return 1;
41215 # else
41216   if (setlocale (LC_ALL, "") == NULL) return 1;
41217 # endif
41218   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41219      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41220      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41221      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41222      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41223      some unit tests fail.  */
41224 # if HAVE_LANGINFO_CODESET
41225   {
41226     const char *cs = nl_langinfo (CODESET);
41227     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41228       return 1;
41229   }
41230 # endif
41231 # ifdef __CYGWIN__
41232   /* On Cygwin, avoid locale names without encoding suffix, because the
41233      locale_charset() function relies on the encoding suffix.  Note that
41234      LC_ALL is set on the command line.  */
41235   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41236 # endif
41237   /* Check whether in the abbreviation of the second month, the second
41238      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41239      two bytes long, with UTF-8 encoding.  */
41240   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41241   if (strftime (buf, sizeof (buf), "%b", &t) < 4
41242       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41243     return 1;
41244 #endif
41245 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
41246   /* Check whether the decimal separator is a comma.
41247      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41248      are nl_langinfo(RADIXCHAR) are both ".".  */
41249   if (localeconv () ->decimal_point[0] != ',') return 1;
41250 #endif
41251   return 0;
41252 }
41253
41254 _ACEOF
41255     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41256   (eval $ac_link) 2>&5
41257   ac_status=$?
41258   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41259   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41260       case "$host_os" in
41261         # Handle native Windows specially, because there setlocale() interprets
41262         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41263         # "fr" or "fra" as "French" or "French_France.1252",
41264         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41265         # "ja" as "Japanese" or "Japanese_Japan.932",
41266         # and similar.
41267         mingw*)
41268           # Test for the hypothetical native Windows locale name.
41269           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41270             gt_cv_locale_fr_utf8=French_France.65001
41271           else
41272             # None found.
41273             gt_cv_locale_fr_utf8=none
41274           fi
41275           ;;
41276         *)
41277           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41278           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41279           # configure script would override the LC_ALL setting. Likewise for
41280           # LC_CTYPE, which is also set at the beginning of the configure script.
41281           # Test for the usual locale name.
41282           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41283             gt_cv_locale_fr_utf8=fr_FR
41284           else
41285             # Test for the locale name with explicit encoding suffix.
41286             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41287               gt_cv_locale_fr_utf8=fr_FR.UTF-8
41288             else
41289               # Test for the Solaris 7 locale name.
41290               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41291                 gt_cv_locale_fr_utf8=fr.UTF-8
41292               else
41293                 # None found.
41294                 gt_cv_locale_fr_utf8=none
41295               fi
41296             fi
41297           fi
41298           ;;
41299       esac
41300     fi
41301     rm -fr conftest*
41302
41303 fi
41304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41305 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41306   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
41307
41308
41309
41310
41311
41312   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
41313 printf %s "checking for a traditional french locale... " >&6; }
41314 if test ${gt_cv_locale_fr+y}
41315 then :
41316   printf %s "(cached) " >&6
41317 else $as_nop
41318
41319     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41320 /* end confdefs.h.  */
41321
41322 #include <locale.h>
41323 #include <time.h>
41324 #if HAVE_LANGINFO_CODESET
41325 # include <langinfo.h>
41326 #endif
41327 #include <stdlib.h>
41328 #include <string.h>
41329 struct tm t;
41330 char buf[16];
41331 int main () {
41332   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41333      imitates locale dependent behaviour by looking at the environment
41334      variables, and all locales use the UTF-8 encoding.  */
41335 #if defined __BEOS__ || defined __HAIKU__
41336   return 1;
41337 #else
41338   /* Check whether the given locale name is recognized by the system.  */
41339 # if defined _WIN32 && !defined __CYGWIN__
41340   /* On native Windows, setlocale(category, "") looks at the system settings,
41341      not at the environment variables.  Also, when an encoding suffix such
41342      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41343      category of the locale to "C".  */
41344   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41345       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41346     return 1;
41347 # else
41348   if (setlocale (LC_ALL, "") == NULL) return 1;
41349 # endif
41350   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41351      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41352      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41353      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41354      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41355      some unit tests fail.
41356      On MirBSD 10, when an unsupported locale is specified, setlocale()
41357      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
41358 # if HAVE_LANGINFO_CODESET
41359   {
41360     const char *cs = nl_langinfo (CODESET);
41361     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41362         || strcmp (cs, "UTF-8") == 0)
41363       return 1;
41364   }
41365 # endif
41366 # ifdef __CYGWIN__
41367   /* On Cygwin, avoid locale names without encoding suffix, because the
41368      locale_charset() function relies on the encoding suffix.  Note that
41369      LC_ALL is set on the command line.  */
41370   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41371 # endif
41372   /* Check whether in the abbreviation of the second month, the second
41373      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
41374      one byte long. This excludes the UTF-8 encoding.  */
41375   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41376   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
41377 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
41378   /* Check whether the decimal separator is a comma.
41379      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41380      are nl_langinfo(RADIXCHAR) are both ".".  */
41381   if (localeconv () ->decimal_point[0] != ',') return 1;
41382 # endif
41383   return 0;
41384 #endif
41385 }
41386
41387 _ACEOF
41388     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41389   (eval $ac_link) 2>&5
41390   ac_status=$?
41391   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41392   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41393       case "$host_os" in
41394         # Handle native Windows specially, because there setlocale() interprets
41395         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41396         # "fr" or "fra" as "French" or "French_France.1252",
41397         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41398         # "ja" as "Japanese" or "Japanese_Japan.932",
41399         # and similar.
41400         mingw*)
41401           # Test for the native Windows locale name.
41402           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41403             gt_cv_locale_fr=French_France.1252
41404           else
41405             # None found.
41406             gt_cv_locale_fr=none
41407           fi
41408           ;;
41409         *)
41410           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41411           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41412           # configure script would override the LC_ALL setting. Likewise for
41413           # LC_CTYPE, which is also set at the beginning of the configure script.
41414           # Test for the usual locale name.
41415           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41416             gt_cv_locale_fr=fr_FR
41417           else
41418             # Test for the locale name with explicit encoding suffix.
41419             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41420               gt_cv_locale_fr=fr_FR.ISO-8859-1
41421             else
41422               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
41423               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41424                 gt_cv_locale_fr=fr_FR.ISO8859-1
41425               else
41426                 # Test for the HP-UX locale name.
41427                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41428                   gt_cv_locale_fr=fr_FR.iso88591
41429                 else
41430                   # Test for the Solaris 7 locale name.
41431                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41432                     gt_cv_locale_fr=fr
41433                   else
41434                     # None found.
41435                     gt_cv_locale_fr=none
41436                   fi
41437                 fi
41438               fi
41439             fi
41440           fi
41441           ;;
41442       esac
41443     fi
41444     rm -fr conftest*
41445
41446 fi
41447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
41448 printf "%s\n" "$gt_cv_locale_fr" >&6; }
41449   LOCALE_FR=$gt_cv_locale_fr
41450
41451
41452
41453
41454   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41455 printf %s "checking for a french Unicode locale... " >&6; }
41456 if test ${gt_cv_locale_fr_utf8+y}
41457 then :
41458   printf %s "(cached) " >&6
41459 else $as_nop
41460
41461     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41462 /* end confdefs.h.  */
41463
41464 #include <locale.h>
41465 #include <time.h>
41466 #if HAVE_LANGINFO_CODESET
41467 # include <langinfo.h>
41468 #endif
41469 #include <stdlib.h>
41470 #include <string.h>
41471 struct tm t;
41472 char buf[16];
41473 int main () {
41474   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41475      imitates locale dependent behaviour by looking at the environment
41476      variables, and all locales use the UTF-8 encoding.  */
41477 #if !(defined __BEOS__ || defined __HAIKU__)
41478   /* Check whether the given locale name is recognized by the system.  */
41479 # if defined _WIN32 && !defined __CYGWIN__
41480   /* On native Windows, setlocale(category, "") looks at the system settings,
41481      not at the environment variables.  Also, when an encoding suffix such
41482      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41483      category of the locale to "C".  */
41484   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41485       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41486     return 1;
41487 # else
41488   if (setlocale (LC_ALL, "") == NULL) return 1;
41489 # endif
41490   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41491      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41492      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41493      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41494      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41495      some unit tests fail.  */
41496 # if HAVE_LANGINFO_CODESET
41497   {
41498     const char *cs = nl_langinfo (CODESET);
41499     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41500       return 1;
41501   }
41502 # endif
41503 # ifdef __CYGWIN__
41504   /* On Cygwin, avoid locale names without encoding suffix, because the
41505      locale_charset() function relies on the encoding suffix.  Note that
41506      LC_ALL is set on the command line.  */
41507   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41508 # endif
41509   /* Check whether in the abbreviation of the second month, the second
41510      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41511      two bytes long, with UTF-8 encoding.  */
41512   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41513   if (strftime (buf, sizeof (buf), "%b", &t) < 4
41514       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41515     return 1;
41516 #endif
41517 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
41518   /* Check whether the decimal separator is a comma.
41519      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41520      are nl_langinfo(RADIXCHAR) are both ".".  */
41521   if (localeconv () ->decimal_point[0] != ',') return 1;
41522 #endif
41523   return 0;
41524 }
41525
41526 _ACEOF
41527     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41528   (eval $ac_link) 2>&5
41529   ac_status=$?
41530   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41531   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41532       case "$host_os" in
41533         # Handle native Windows specially, because there setlocale() interprets
41534         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41535         # "fr" or "fra" as "French" or "French_France.1252",
41536         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41537         # "ja" as "Japanese" or "Japanese_Japan.932",
41538         # and similar.
41539         mingw*)
41540           # Test for the hypothetical native Windows locale name.
41541           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41542             gt_cv_locale_fr_utf8=French_France.65001
41543           else
41544             # None found.
41545             gt_cv_locale_fr_utf8=none
41546           fi
41547           ;;
41548         *)
41549           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41550           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41551           # configure script would override the LC_ALL setting. Likewise for
41552           # LC_CTYPE, which is also set at the beginning of the configure script.
41553           # Test for the usual locale name.
41554           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41555             gt_cv_locale_fr_utf8=fr_FR
41556           else
41557             # Test for the locale name with explicit encoding suffix.
41558             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41559               gt_cv_locale_fr_utf8=fr_FR.UTF-8
41560             else
41561               # Test for the Solaris 7 locale name.
41562               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41563                 gt_cv_locale_fr_utf8=fr.UTF-8
41564               else
41565                 # None found.
41566                 gt_cv_locale_fr_utf8=none
41567               fi
41568             fi
41569           fi
41570           ;;
41571       esac
41572     fi
41573     rm -fr conftest*
41574
41575 fi
41576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41577 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41578   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
41579
41580
41581
41582
41583
41584   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
41585 printf %s "checking for a traditional japanese locale... " >&6; }
41586 if test ${gt_cv_locale_ja+y}
41587 then :
41588   printf %s "(cached) " >&6
41589 else $as_nop
41590
41591     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41592 /* end confdefs.h.  */
41593
41594 #include <locale.h>
41595 #include <time.h>
41596 #if HAVE_LANGINFO_CODESET
41597 # include <langinfo.h>
41598 #endif
41599 #include <stdlib.h>
41600 #include <string.h>
41601 struct tm t;
41602 char buf[16];
41603 int main ()
41604 {
41605   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41606      imitates locale dependent behaviour by looking at the environment
41607      variables, and all locales use the UTF-8 encoding.  */
41608 #if defined __BEOS__ || defined __HAIKU__
41609   return 1;
41610 #else
41611   /* Check whether the given locale name is recognized by the system.  */
41612 # if defined _WIN32 && !defined __CYGWIN__
41613   /* On native Windows, setlocale(category, "") looks at the system settings,
41614      not at the environment variables.  Also, when an encoding suffix such
41615      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41616      category of the locale to "C".  */
41617   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41618       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41619     return 1;
41620 # else
41621   if (setlocale (LC_ALL, "") == NULL) return 1;
41622 # endif
41623   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41624      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41625      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41626      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41627      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41628      some unit tests fail.
41629      On MirBSD 10, when an unsupported locale is specified, setlocale()
41630      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
41631 # if HAVE_LANGINFO_CODESET
41632   {
41633     const char *cs = nl_langinfo (CODESET);
41634     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41635         || strcmp (cs, "UTF-8") == 0)
41636       return 1;
41637   }
41638 # endif
41639 # ifdef __CYGWIN__
41640   /* On Cygwin, avoid locale names without encoding suffix, because the
41641      locale_charset() function relies on the encoding suffix.  Note that
41642      LC_ALL is set on the command line.  */
41643   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41644 # endif
41645   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
41646      on Cygwin 1.5.x.  */
41647   if (MB_CUR_MAX == 1)
41648     return 1;
41649   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41650      This excludes the UTF-8 encoding (except on MirBSD).  */
41651   {
41652     const char *p;
41653     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41654     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41655     for (p = buf; *p != '\0'; p++)
41656       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41657         return 1;
41658   }
41659   return 0;
41660 #endif
41661 }
41662
41663 _ACEOF
41664     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41665   (eval $ac_link) 2>&5
41666   ac_status=$?
41667   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41668   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41669       case "$host_os" in
41670         # Handle native Windows specially, because there setlocale() interprets
41671         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41672         # "fr" or "fra" as "French" or "French_France.1252",
41673         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41674         # "ja" as "Japanese" or "Japanese_Japan.932",
41675         # and similar.
41676         mingw*)
41677           # Note that on native Windows, the Japanese locale is
41678           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
41679           # cannot use it here.
41680           gt_cv_locale_ja=none
41681           ;;
41682         *)
41683           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41684           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41685           # configure script would override the LC_ALL setting. Likewise for
41686           # LC_CTYPE, which is also set at the beginning of the configure script.
41687           # Test for the AIX locale name.
41688           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41689             gt_cv_locale_ja=ja_JP
41690           else
41691             # Test for the locale name with explicit encoding suffix.
41692             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41693               gt_cv_locale_ja=ja_JP.EUC-JP
41694             else
41695               # Test for the HP-UX, OSF/1, NetBSD locale name.
41696               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41697                 gt_cv_locale_ja=ja_JP.eucJP
41698               else
41699                 # Test for the IRIX, FreeBSD locale name.
41700                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41701                   gt_cv_locale_ja=ja_JP.EUC
41702                 else
41703                   # Test for the Solaris 7 locale name.
41704                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41705                     gt_cv_locale_ja=ja
41706                   else
41707                     # Special test for NetBSD 1.6.
41708                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
41709                       gt_cv_locale_ja=ja_JP.eucJP
41710                     else
41711                       # None found.
41712                       gt_cv_locale_ja=none
41713                     fi
41714                   fi
41715                 fi
41716               fi
41717             fi
41718           fi
41719           ;;
41720       esac
41721     fi
41722     rm -fr conftest*
41723
41724 fi
41725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
41726 printf "%s\n" "$gt_cv_locale_ja" >&6; }
41727   LOCALE_JA=$gt_cv_locale_ja
41728
41729
41730
41731
41732
41733   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
41734 printf %s "checking for a transitional chinese locale... " >&6; }
41735 if test ${gt_cv_locale_zh_CN+y}
41736 then :
41737   printf %s "(cached) " >&6
41738 else $as_nop
41739
41740     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41741 /* end confdefs.h.  */
41742
41743 #include <locale.h>
41744 #include <stdlib.h>
41745 #include <time.h>
41746 #if HAVE_LANGINFO_CODESET
41747 # include <langinfo.h>
41748 #endif
41749 #include <stdlib.h>
41750 #include <string.h>
41751 struct tm t;
41752 char buf[16];
41753 int main ()
41754 {
41755   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41756      imitates locale dependent behaviour by looking at the environment
41757      variables, and all locales use the UTF-8 encoding.  */
41758 #if defined __BEOS__ || defined __HAIKU__
41759   return 1;
41760 #else
41761   /* Check whether the given locale name is recognized by the system.  */
41762 # if defined _WIN32 && !defined __CYGWIN__
41763   /* On native Windows, setlocale(category, "") looks at the system settings,
41764      not at the environment variables.  Also, when an encoding suffix such
41765      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41766      category of the locale to "C".  */
41767   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41768       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41769     return 1;
41770 # else
41771   if (setlocale (LC_ALL, "") == NULL) return 1;
41772 # endif
41773   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41774      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41775      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41776      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41777      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41778      some unit tests fail.
41779      On MirBSD 10, when an unsupported locale is specified, setlocale()
41780      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
41781 # if HAVE_LANGINFO_CODESET
41782   {
41783     const char *cs = nl_langinfo (CODESET);
41784     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41785         || strcmp (cs, "UTF-8") == 0)
41786       return 1;
41787   }
41788 # endif
41789 # ifdef __CYGWIN__
41790   /* On Cygwin, avoid locale names without encoding suffix, because the
41791      locale_charset() function relies on the encoding suffix.  Note that
41792      LC_ALL is set on the command line.  */
41793   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41794 # endif
41795   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41796      This excludes the UTF-8 encoding (except on MirBSD).  */
41797   {
41798     const char *p;
41799     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41800     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41801     for (p = buf; *p != '\0'; p++)
41802       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41803         return 1;
41804   }
41805   /* Check whether a typical GB18030 multibyte sequence is recognized as a
41806      single wide character.  This excludes the GB2312 and GBK encodings.  */
41807   if (mblen ("\203\062\332\066", 5) != 4)
41808     return 1;
41809   return 0;
41810 #endif
41811 }
41812
41813 _ACEOF
41814     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41815   (eval $ac_link) 2>&5
41816   ac_status=$?
41817   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41818   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41819       case "$host_os" in
41820         # Handle native Windows specially, because there setlocale() interprets
41821         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41822         # "fr" or "fra" as "French" or "French_France.1252",
41823         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41824         # "ja" as "Japanese" or "Japanese_Japan.932",
41825         # and similar.
41826         mingw*)
41827           # Test for the hypothetical native Windows locale name.
41828           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41829             gt_cv_locale_zh_CN=Chinese_China.54936
41830           else
41831             # None found.
41832             gt_cv_locale_zh_CN=none
41833           fi
41834           ;;
41835         solaris2.8)
41836           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
41837           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
41838           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
41839           gt_cv_locale_zh_CN=none
41840           ;;
41841         *)
41842           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41843           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41844           # configure script would override the LC_ALL setting. Likewise for
41845           # LC_CTYPE, which is also set at the beginning of the configure script.
41846           # Test for the locale name without encoding suffix.
41847           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41848             gt_cv_locale_zh_CN=zh_CN
41849           else
41850             # Test for the locale name with explicit encoding suffix.
41851             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41852               gt_cv_locale_zh_CN=zh_CN.GB18030
41853             else
41854               # None found.
41855               gt_cv_locale_zh_CN=none
41856             fi
41857           fi
41858           ;;
41859       esac
41860     else
41861       # If there was a link error, due to mblen(), the system is so old that
41862       # it certainly doesn't have a chinese locale.
41863       gt_cv_locale_zh_CN=none
41864     fi
41865     rm -fr conftest*
41866
41867 fi
41868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
41869 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
41870   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
41871
41872
41873
41874
41875   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41876 printf %s "checking for a french Unicode locale... " >&6; }
41877 if test ${gt_cv_locale_fr_utf8+y}
41878 then :
41879   printf %s "(cached) " >&6
41880 else $as_nop
41881
41882     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41883 /* end confdefs.h.  */
41884
41885 #include <locale.h>
41886 #include <time.h>
41887 #if HAVE_LANGINFO_CODESET
41888 # include <langinfo.h>
41889 #endif
41890 #include <stdlib.h>
41891 #include <string.h>
41892 struct tm t;
41893 char buf[16];
41894 int main () {
41895   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
41896      imitates locale dependent behaviour by looking at the environment
41897      variables, and all locales use the UTF-8 encoding.  */
41898 #if !(defined __BEOS__ || defined __HAIKU__)
41899   /* Check whether the given locale name is recognized by the system.  */
41900 # if defined _WIN32 && !defined __CYGWIN__
41901   /* On native Windows, setlocale(category, "") looks at the system settings,
41902      not at the environment variables.  Also, when an encoding suffix such
41903      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41904      category of the locale to "C".  */
41905   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41906       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41907     return 1;
41908 # else
41909   if (setlocale (LC_ALL, "") == NULL) return 1;
41910 # endif
41911   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41912      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41913      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41914      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41915      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41916      some unit tests fail.  */
41917 # if HAVE_LANGINFO_CODESET
41918   {
41919     const char *cs = nl_langinfo (CODESET);
41920     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41921       return 1;
41922   }
41923 # endif
41924 # ifdef __CYGWIN__
41925   /* On Cygwin, avoid locale names without encoding suffix, because the
41926      locale_charset() function relies on the encoding suffix.  Note that
41927      LC_ALL is set on the command line.  */
41928   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41929 # endif
41930   /* Check whether in the abbreviation of the second month, the second
41931      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41932      two bytes long, with UTF-8 encoding.  */
41933   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41934   if (strftime (buf, sizeof (buf), "%b", &t) < 4
41935       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41936     return 1;
41937 #endif
41938 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
41939   /* Check whether the decimal separator is a comma.
41940      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41941      are nl_langinfo(RADIXCHAR) are both ".".  */
41942   if (localeconv () ->decimal_point[0] != ',') return 1;
41943 #endif
41944   return 0;
41945 }
41946
41947 _ACEOF
41948     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41949   (eval $ac_link) 2>&5
41950   ac_status=$?
41951   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41952   test $ac_status = 0; } && test -s conftest$ac_exeext; then
41953       case "$host_os" in
41954         # Handle native Windows specially, because there setlocale() interprets
41955         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41956         # "fr" or "fra" as "French" or "French_France.1252",
41957         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41958         # "ja" as "Japanese" or "Japanese_Japan.932",
41959         # and similar.
41960         mingw*)
41961           # Test for the hypothetical native Windows locale name.
41962           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41963             gt_cv_locale_fr_utf8=French_France.65001
41964           else
41965             # None found.
41966             gt_cv_locale_fr_utf8=none
41967           fi
41968           ;;
41969         *)
41970           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41971           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41972           # configure script would override the LC_ALL setting. Likewise for
41973           # LC_CTYPE, which is also set at the beginning of the configure script.
41974           # Test for the usual locale name.
41975           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41976             gt_cv_locale_fr_utf8=fr_FR
41977           else
41978             # Test for the locale name with explicit encoding suffix.
41979             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41980               gt_cv_locale_fr_utf8=fr_FR.UTF-8
41981             else
41982               # Test for the Solaris 7 locale name.
41983               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41984                 gt_cv_locale_fr_utf8=fr.UTF-8
41985               else
41986                 # None found.
41987                 gt_cv_locale_fr_utf8=none
41988               fi
41989             fi
41990           fi
41991           ;;
41992       esac
41993     fi
41994     rm -fr conftest*
41995
41996 fi
41997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41998 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41999   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42000
42001
42002
42003
42004
42005   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
42006 printf %s "checking for a transitional chinese locale... " >&6; }
42007 if test ${gt_cv_locale_zh_CN+y}
42008 then :
42009   printf %s "(cached) " >&6
42010 else $as_nop
42011
42012     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42013 /* end confdefs.h.  */
42014
42015 #include <locale.h>
42016 #include <stdlib.h>
42017 #include <time.h>
42018 #if HAVE_LANGINFO_CODESET
42019 # include <langinfo.h>
42020 #endif
42021 #include <stdlib.h>
42022 #include <string.h>
42023 struct tm t;
42024 char buf[16];
42025 int main ()
42026 {
42027   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
42028      imitates locale dependent behaviour by looking at the environment
42029      variables, and all locales use the UTF-8 encoding.  */
42030 #if defined __BEOS__ || defined __HAIKU__
42031   return 1;
42032 #else
42033   /* Check whether the given locale name is recognized by the system.  */
42034 # if defined _WIN32 && !defined __CYGWIN__
42035   /* On native Windows, setlocale(category, "") looks at the system settings,
42036      not at the environment variables.  Also, when an encoding suffix such
42037      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42038      category of the locale to "C".  */
42039   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42040       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42041     return 1;
42042 # else
42043   if (setlocale (LC_ALL, "") == NULL) return 1;
42044 # endif
42045   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42046      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42047      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42048      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42049      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42050      some unit tests fail.
42051      On MirBSD 10, when an unsupported locale is specified, setlocale()
42052      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
42053 # if HAVE_LANGINFO_CODESET
42054   {
42055     const char *cs = nl_langinfo (CODESET);
42056     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42057         || strcmp (cs, "UTF-8") == 0)
42058       return 1;
42059   }
42060 # endif
42061 # ifdef __CYGWIN__
42062   /* On Cygwin, avoid locale names without encoding suffix, because the
42063      locale_charset() function relies on the encoding suffix.  Note that
42064      LC_ALL is set on the command line.  */
42065   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42066 # endif
42067   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
42068      This excludes the UTF-8 encoding (except on MirBSD).  */
42069   {
42070     const char *p;
42071     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42072     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
42073     for (p = buf; *p != '\0'; p++)
42074       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
42075         return 1;
42076   }
42077   /* Check whether a typical GB18030 multibyte sequence is recognized as a
42078      single wide character.  This excludes the GB2312 and GBK encodings.  */
42079   if (mblen ("\203\062\332\066", 5) != 4)
42080     return 1;
42081   return 0;
42082 #endif
42083 }
42084
42085 _ACEOF
42086     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42087   (eval $ac_link) 2>&5
42088   ac_status=$?
42089   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42090   test $ac_status = 0; } && test -s conftest$ac_exeext; then
42091       case "$host_os" in
42092         # Handle native Windows specially, because there setlocale() interprets
42093         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42094         # "fr" or "fra" as "French" or "French_France.1252",
42095         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42096         # "ja" as "Japanese" or "Japanese_Japan.932",
42097         # and similar.
42098         mingw*)
42099           # Test for the hypothetical native Windows locale name.
42100           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42101             gt_cv_locale_zh_CN=Chinese_China.54936
42102           else
42103             # None found.
42104             gt_cv_locale_zh_CN=none
42105           fi
42106           ;;
42107         solaris2.8)
42108           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
42109           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
42110           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
42111           gt_cv_locale_zh_CN=none
42112           ;;
42113         *)
42114           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42115           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42116           # configure script would override the LC_ALL setting. Likewise for
42117           # LC_CTYPE, which is also set at the beginning of the configure script.
42118           # Test for the locale name without encoding suffix.
42119           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42120             gt_cv_locale_zh_CN=zh_CN
42121           else
42122             # Test for the locale name with explicit encoding suffix.
42123             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42124               gt_cv_locale_zh_CN=zh_CN.GB18030
42125             else
42126               # None found.
42127               gt_cv_locale_zh_CN=none
42128             fi
42129           fi
42130           ;;
42131       esac
42132     else
42133       # If there was a link error, due to mblen(), the system is so old that
42134       # it certainly doesn't have a chinese locale.
42135       gt_cv_locale_zh_CN=none
42136     fi
42137     rm -fr conftest*
42138
42139 fi
42140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
42141 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
42142   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158  nanosleep_save_libs=$LIBS
42159
42160  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
42161  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
42162  LIB_NANOSLEEP=
42163
42164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
42165 printf %s "checking for library containing nanosleep... " >&6; }
42166 if test ${ac_cv_search_nanosleep+y}
42167 then :
42168   printf %s "(cached) " >&6
42169 else $as_nop
42170   ac_func_search_save_LIBS=$LIBS
42171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42172 /* end confdefs.h.  */
42173
42174 /* Override any GCC internal prototype to avoid an error.
42175    Use char because int might match the return type of a GCC
42176    builtin and then its argument prototype would still apply.  */
42177 char nanosleep ();
42178 int
42179 main (void)
42180 {
42181 return nanosleep ();
42182   ;
42183   return 0;
42184 }
42185 _ACEOF
42186 for ac_lib in '' rt posix4
42187 do
42188   if test -z "$ac_lib"; then
42189     ac_res="none required"
42190   else
42191     ac_res=-l$ac_lib
42192     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
42193   fi
42194   if ac_fn_c_try_link "$LINENO"
42195 then :
42196   ac_cv_search_nanosleep=$ac_res
42197 fi
42198 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42199     conftest$ac_exeext
42200   if test ${ac_cv_search_nanosleep+y}
42201 then :
42202   break
42203 fi
42204 done
42205 if test ${ac_cv_search_nanosleep+y}
42206 then :
42207
42208 else $as_nop
42209   ac_cv_search_nanosleep=no
42210 fi
42211 rm conftest.$ac_ext
42212 LIBS=$ac_func_search_save_LIBS
42213 fi
42214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
42215 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
42216 ac_res=$ac_cv_search_nanosleep
42217 if test "$ac_res" != no
42218 then :
42219   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
42220   test "$ac_cv_search_nanosleep" = "none required" ||
42221                  LIB_NANOSLEEP=$ac_cv_search_nanosleep
42222 fi
42223
42224  if test "x$ac_cv_search_nanosleep" != xno; then
42225
42226
42227    if test $APPLE_UNIVERSAL_BUILD = 1; then
42228      # A universal build on Apple Mac OS X platforms.
42229      # The test result would be 'no (mishandles large arguments)' in 64-bit
42230      # mode but 'yes' in 32-bit mode. But we need a configuration result that
42231      # is valid in both modes.
42232      gl_cv_func_nanosleep='no (mishandles large arguments)'
42233    fi
42234
42235    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
42236 printf %s "checking for working nanosleep... " >&6; }
42237 if test ${gl_cv_func_nanosleep+y}
42238 then :
42239   printf %s "(cached) " >&6
42240 else $as_nop
42241
42242      if test "$cross_compiling" = yes
42243 then :
42244   case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
42245             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
42246           mingw*) # Guess no on native Windows.
42247             gl_cv_func_nanosleep='guessing no' ;;
42248           *)      # If we don't know, obey --enable-cross-guesses.
42249             gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
42250         esac
42251
42252 else $as_nop
42253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42254 /* end confdefs.h.  */
42255
42256           #include <errno.h>
42257           #include <limits.h>
42258           #include <signal.h>
42259           #if HAVE_SYS_TIME_H
42260            #include <sys/time.h>
42261           #endif
42262           #include <time.h>
42263           #include <unistd.h>
42264           #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
42265           #define TYPE_MAXIMUM(t) \
42266             ((t) (! TYPE_SIGNED (t) \
42267                   ? (t) -1 \
42268                   : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
42269
42270           #if HAVE_DECL_ALARM
42271           static void
42272           check_for_SIGALRM (int sig)
42273           {
42274             if (sig != SIGALRM)
42275               _exit (1);
42276           }
42277           #endif
42278
42279           int
42280           main ()
42281           {
42282             static struct timespec ts_sleep;
42283             static struct timespec ts_remaining;
42284             /* Test for major problems first.  */
42285             if (! nanosleep)
42286               return 2;
42287             ts_sleep.tv_sec = 0;
42288             ts_sleep.tv_nsec = 1;
42289             #if HAVE_DECL_ALARM
42290             {
42291               static struct sigaction act;
42292               act.sa_handler = check_for_SIGALRM;
42293               sigemptyset (&act.sa_mask);
42294               sigaction (SIGALRM, &act, NULL);
42295               alarm (1);
42296               if (nanosleep (&ts_sleep, NULL) != 0)
42297                 return 3;
42298               /* Test for a minor problem: the handling of large arguments.  */
42299               ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
42300               ts_sleep.tv_nsec = 999999999;
42301               alarm (1);
42302               if (nanosleep (&ts_sleep, &ts_remaining) != -1)
42303                 return 4;
42304               if (errno != EINTR)
42305                 return 5;
42306               if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
42307                 return 6;
42308             }
42309             #else /* A simpler test for native Windows.  */
42310             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
42311               return 3;
42312             #endif
42313             return 0;
42314           }
42315 _ACEOF
42316 if ac_fn_c_try_run "$LINENO"
42317 then :
42318   gl_cv_func_nanosleep=yes
42319 else $as_nop
42320   case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
42321         esac
42322 fi
42323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42324   conftest.$ac_objext conftest.beam conftest.$ac_ext
42325 fi
42326
42327
42328 fi
42329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
42330 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
42331    case "$gl_cv_func_nanosleep" in
42332      *yes)
42333        REPLACE_NANOSLEEP=0
42334        ;;
42335      *)
42336        REPLACE_NANOSLEEP=1
42337        case "$gl_cv_func_nanosleep" in
42338          *"mishandles large arguments"*)
42339
42340 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
42341
42342            ;;
42343          *)
42344            # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
42345            for ac_lib in $LIBSOCKET; do
42346              case " $LIB_NANOSLEEP " in
42347                *" $ac_lib "*) ;;
42348                *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
42349              esac
42350            done
42351            ;;
42352        esac
42353        ;;
42354    esac
42355  else
42356    HAVE_NANOSLEEP=0
42357  fi
42358  LIBS=$nanosleep_save_libs
42359
42360   if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
42361
42362
42363
42364
42365
42366
42367
42368
42369   gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
42370
42371
42372
42373   :
42374
42375   fi
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385     if test "$GL_GNULIB_NANOSLEEP" != 1; then
42386         if test "$GL_GNULIB_NANOSLEEP" = 0; then
42387       GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
42388     else
42389       GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
42390     fi
42391   fi
42392
42393
42394
42395
42396
42397 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
42398
42399
42400
42401
42402
42403   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
42404 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
42405 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
42406 then :
42407   printf %s "(cached) " >&6
42408 else $as_nop
42409
42410       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411 /* end confdefs.h.  */
42412 #include <netinet/in.h>
42413 int
42414 main (void)
42415 {
42416
42417   ;
42418   return 0;
42419 }
42420 _ACEOF
42421 if ac_fn_c_try_compile "$LINENO"
42422 then :
42423   gl_cv_header_netinet_in_h_selfcontained=yes
42424 else $as_nop
42425   gl_cv_header_netinet_in_h_selfcontained=no
42426 fi
42427 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42428
42429 fi
42430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
42431 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
42432   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
42433     NETINET_IN_H=''
42434   else
42435     NETINET_IN_H='netinet/in.h'
42436     ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
42437 if test "x$ac_cv_header_netinet_in_h" = xyes
42438 then :
42439   printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
42440
42441 fi
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452      if test $gl_cv_have_include_next = yes; then
42453        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
42454      else
42455        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
42456 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
42457 if test ${gl_cv_next_netinet_in_h+y}
42458 then :
42459   printf %s "(cached) " >&6
42460 else $as_nop
42461
42462              if test $ac_cv_header_netinet_in_h = yes; then
42463
42464
42465
42466
42467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42468 /* end confdefs.h.  */
42469 #include <netinet/in.h>
42470 _ACEOF
42471                 case "$host_os" in
42472     aix*) gl_absname_cpp="$ac_cpp -C" ;;
42473     *)    gl_absname_cpp="$ac_cpp" ;;
42474   esac
42475
42476   case "$host_os" in
42477     mingw*)
42478                                           gl_dirsep_regex='[/\\]'
42479       ;;
42480     *)
42481       gl_dirsep_regex='\/'
42482       ;;
42483   esac
42484       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42485   gl_header_literal_regex=`echo 'netinet/in.h' \
42486                            | sed -e "$gl_make_literal_regex_sed"`
42487   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42488       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42489       s|^/[^/]|//&|
42490       p
42491       q
42492     }'
42493
42494         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42495   sed -n "$gl_absolute_header_sed"`
42496
42497            gl_header=$gl_cv_absolute_netinet_in_h
42498            gl_cv_next_netinet_in_h='"'$gl_header'"'
42499           else
42500                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
42501              fi
42502
42503
42504 fi
42505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
42506 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
42507      fi
42508      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
42509
42510      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42511        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42512        gl_next_as_first_directive='<'netinet/in.h'>'
42513      else
42514        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42515        gl_next_as_first_directive=$gl_cv_next_netinet_in_h
42516      fi
42517      NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
42518
42519
42520
42521
42522     if test $ac_cv_header_netinet_in_h = yes; then
42523       HAVE_NETINET_IN_H=1
42524     else
42525       HAVE_NETINET_IN_H=0
42526     fi
42527
42528   fi
42529
42530    if test -n "$NETINET_IN_H"; then
42531   GL_GENERATE_NETINET_IN_H_TRUE=
42532   GL_GENERATE_NETINET_IN_H_FALSE='#'
42533 else
42534   GL_GENERATE_NETINET_IN_H_TRUE='#'
42535   GL_GENERATE_NETINET_IN_H_FALSE=
42536 fi
42537
42538
42539
42540
42541
42542
42543   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42544 printf %s "checking for a traditional french locale... " >&6; }
42545 if test ${gt_cv_locale_fr+y}
42546 then :
42547   printf %s "(cached) " >&6
42548 else $as_nop
42549
42550     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42551 /* end confdefs.h.  */
42552
42553 #include <locale.h>
42554 #include <time.h>
42555 #if HAVE_LANGINFO_CODESET
42556 # include <langinfo.h>
42557 #endif
42558 #include <stdlib.h>
42559 #include <string.h>
42560 struct tm t;
42561 char buf[16];
42562 int main () {
42563   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
42564      imitates locale dependent behaviour by looking at the environment
42565      variables, and all locales use the UTF-8 encoding.  */
42566 #if defined __BEOS__ || defined __HAIKU__
42567   return 1;
42568 #else
42569   /* Check whether the given locale name is recognized by the system.  */
42570 # if defined _WIN32 && !defined __CYGWIN__
42571   /* On native Windows, setlocale(category, "") looks at the system settings,
42572      not at the environment variables.  Also, when an encoding suffix such
42573      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42574      category of the locale to "C".  */
42575   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42576       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42577     return 1;
42578 # else
42579   if (setlocale (LC_ALL, "") == NULL) return 1;
42580 # endif
42581   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42582      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42583      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42584      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42585      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42586      some unit tests fail.
42587      On MirBSD 10, when an unsupported locale is specified, setlocale()
42588      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
42589 # if HAVE_LANGINFO_CODESET
42590   {
42591     const char *cs = nl_langinfo (CODESET);
42592     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42593         || strcmp (cs, "UTF-8") == 0)
42594       return 1;
42595   }
42596 # endif
42597 # ifdef __CYGWIN__
42598   /* On Cygwin, avoid locale names without encoding suffix, because the
42599      locale_charset() function relies on the encoding suffix.  Note that
42600      LC_ALL is set on the command line.  */
42601   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42602 # endif
42603   /* Check whether in the abbreviation of the second month, the second
42604      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42605      one byte long. This excludes the UTF-8 encoding.  */
42606   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42607   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42608 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
42609   /* Check whether the decimal separator is a comma.
42610      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42611      are nl_langinfo(RADIXCHAR) are both ".".  */
42612   if (localeconv () ->decimal_point[0] != ',') return 1;
42613 # endif
42614   return 0;
42615 #endif
42616 }
42617
42618 _ACEOF
42619     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42620   (eval $ac_link) 2>&5
42621   ac_status=$?
42622   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42623   test $ac_status = 0; } && test -s conftest$ac_exeext; then
42624       case "$host_os" in
42625         # Handle native Windows specially, because there setlocale() interprets
42626         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42627         # "fr" or "fra" as "French" or "French_France.1252",
42628         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42629         # "ja" as "Japanese" or "Japanese_Japan.932",
42630         # and similar.
42631         mingw*)
42632           # Test for the native Windows locale name.
42633           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42634             gt_cv_locale_fr=French_France.1252
42635           else
42636             # None found.
42637             gt_cv_locale_fr=none
42638           fi
42639           ;;
42640         *)
42641           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42642           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42643           # configure script would override the LC_ALL setting. Likewise for
42644           # LC_CTYPE, which is also set at the beginning of the configure script.
42645           # Test for the usual locale name.
42646           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42647             gt_cv_locale_fr=fr_FR
42648           else
42649             # Test for the locale name with explicit encoding suffix.
42650             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42651               gt_cv_locale_fr=fr_FR.ISO-8859-1
42652             else
42653               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42654               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42655                 gt_cv_locale_fr=fr_FR.ISO8859-1
42656               else
42657                 # Test for the HP-UX locale name.
42658                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42659                   gt_cv_locale_fr=fr_FR.iso88591
42660                 else
42661                   # Test for the Solaris 7 locale name.
42662                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42663                     gt_cv_locale_fr=fr
42664                   else
42665                     # None found.
42666                     gt_cv_locale_fr=none
42667                   fi
42668                 fi
42669               fi
42670             fi
42671           fi
42672           ;;
42673       esac
42674     fi
42675     rm -fr conftest*
42676
42677 fi
42678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42679 printf "%s\n" "$gt_cv_locale_fr" >&6; }
42680   LOCALE_FR=$gt_cv_locale_fr
42681
42682
42683
42684
42685   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42686 printf %s "checking for a french Unicode locale... " >&6; }
42687 if test ${gt_cv_locale_fr_utf8+y}
42688 then :
42689   printf %s "(cached) " >&6
42690 else $as_nop
42691
42692     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42693 /* end confdefs.h.  */
42694
42695 #include <locale.h>
42696 #include <time.h>
42697 #if HAVE_LANGINFO_CODESET
42698 # include <langinfo.h>
42699 #endif
42700 #include <stdlib.h>
42701 #include <string.h>
42702 struct tm t;
42703 char buf[16];
42704 int main () {
42705   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
42706      imitates locale dependent behaviour by looking at the environment
42707      variables, and all locales use the UTF-8 encoding.  */
42708 #if !(defined __BEOS__ || defined __HAIKU__)
42709   /* Check whether the given locale name is recognized by the system.  */
42710 # if defined _WIN32 && !defined __CYGWIN__
42711   /* On native Windows, setlocale(category, "") looks at the system settings,
42712      not at the environment variables.  Also, when an encoding suffix such
42713      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42714      category of the locale to "C".  */
42715   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42716       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42717     return 1;
42718 # else
42719   if (setlocale (LC_ALL, "") == NULL) return 1;
42720 # endif
42721   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42722      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42723      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42724      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42725      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42726      some unit tests fail.  */
42727 # if HAVE_LANGINFO_CODESET
42728   {
42729     const char *cs = nl_langinfo (CODESET);
42730     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42731       return 1;
42732   }
42733 # endif
42734 # ifdef __CYGWIN__
42735   /* On Cygwin, avoid locale names without encoding suffix, because the
42736      locale_charset() function relies on the encoding suffix.  Note that
42737      LC_ALL is set on the command line.  */
42738   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42739 # endif
42740   /* Check whether in the abbreviation of the second month, the second
42741      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
42742      two bytes long, with UTF-8 encoding.  */
42743   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42744   if (strftime (buf, sizeof (buf), "%b", &t) < 4
42745       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
42746     return 1;
42747 #endif
42748 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
42749   /* Check whether the decimal separator is a comma.
42750      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42751      are nl_langinfo(RADIXCHAR) are both ".".  */
42752   if (localeconv () ->decimal_point[0] != ',') return 1;
42753 #endif
42754   return 0;
42755 }
42756
42757 _ACEOF
42758     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42759   (eval $ac_link) 2>&5
42760   ac_status=$?
42761   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42762   test $ac_status = 0; } && test -s conftest$ac_exeext; then
42763       case "$host_os" in
42764         # Handle native Windows specially, because there setlocale() interprets
42765         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42766         # "fr" or "fra" as "French" or "French_France.1252",
42767         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42768         # "ja" as "Japanese" or "Japanese_Japan.932",
42769         # and similar.
42770         mingw*)
42771           # Test for the hypothetical native Windows locale name.
42772           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42773             gt_cv_locale_fr_utf8=French_France.65001
42774           else
42775             # None found.
42776             gt_cv_locale_fr_utf8=none
42777           fi
42778           ;;
42779         *)
42780           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42781           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42782           # configure script would override the LC_ALL setting. Likewise for
42783           # LC_CTYPE, which is also set at the beginning of the configure script.
42784           # Test for the usual locale name.
42785           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42786             gt_cv_locale_fr_utf8=fr_FR
42787           else
42788             # Test for the locale name with explicit encoding suffix.
42789             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42790               gt_cv_locale_fr_utf8=fr_FR.UTF-8
42791             else
42792               # Test for the Solaris 7 locale name.
42793               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42794                 gt_cv_locale_fr_utf8=fr.UTF-8
42795               else
42796                 # None found.
42797                 gt_cv_locale_fr_utf8=none
42798               fi
42799             fi
42800           fi
42801           ;;
42802       esac
42803     fi
42804     rm -fr conftest*
42805
42806 fi
42807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
42808 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
42809   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42810
42811
42812
42813
42814
42815
42816
42817              if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
42818             REPLACE_PERROR=1
42819   fi
42820   case ${gl_cv_func_strerror_r_works-unset} in
42821     unset|*yes)
42822       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
42823 printf %s "checking whether perror matches strerror... " >&6; }
42824 if test ${gl_cv_func_perror_works+y}
42825 then :
42826   printf %s "(cached) " >&6
42827 else $as_nop
42828   if test "$cross_compiling" = yes
42829 then :
42830   case "$host_os" in
42831                        # Guess yes on musl systems.
42832               *-musl*) gl_cv_func_perror_works="guessing yes" ;;
42833                        # Guess yes on native Windows.
42834               mingw*)  gl_cv_func_perror_works="guessing yes" ;;
42835                        # Otherwise obey --enable-cross-guesses.
42836               *)       gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
42837             esac
42838
42839 else $as_nop
42840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42841 /* end confdefs.h.  */
42842 #include <errno.h>
42843                 #include <stdio.h>
42844                 #include <stdlib.h>
42845                 #include <string.h>
42846
42847 int
42848 main (void)
42849 {
42850 char *str = strerror (-1);
42851                 if (!getenv("CONFTEST_OUTPUT")) return 0;
42852                 if (!str) str = "";
42853                 puts (str);
42854                 errno = -1;
42855                 perror ("");
42856                 return 0;
42857
42858   ;
42859   return 0;
42860 }
42861 _ACEOF
42862 if ac_fn_c_try_run "$LINENO"
42863 then :
42864   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
42865                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
42866               gl_cv_func_perror_works=yes
42867             else
42868               gl_cv_func_perror_works=no
42869             fi
42870             rm -rf conftest.txt1 conftest.txt2
42871 else $as_nop
42872   gl_cv_func_perror_works=no
42873 fi
42874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42875   conftest.$ac_objext conftest.beam conftest.$ac_ext
42876 fi
42877
42878
42879 fi
42880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
42881 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
42882       case "$gl_cv_func_perror_works" in
42883         *yes) ;;
42884         *) REPLACE_PERROR=1 ;;
42885       esac
42886       ;;
42887     *)
42888                   REPLACE_PERROR=1
42889       ;;
42890   esac
42891
42892   if test $REPLACE_PERROR = 1; then
42893
42894
42895
42896
42897
42898
42899
42900
42901   gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
42902
42903   fi
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913     if test "$GL_GNULIB_PERROR" != 1; then
42914         if test "$GL_GNULIB_PERROR" = 0; then
42915       GL_GNULIB_PERROR=$gl_module_indicator_condition
42916     else
42917       GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
42918     fi
42919   fi
42920
42921
42922
42923
42924
42925 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
42926
42927
42928
42929
42930
42931
42932
42933   if test $ac_cv_func_pipe != yes; then
42934     HAVE_PIPE=0
42935   fi
42936
42937   if test $HAVE_PIPE = 0; then
42938
42939
42940
42941
42942
42943
42944
42945
42946   gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
42947
42948   fi
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958     if test "$GL_GNULIB_PIPE" != 1; then
42959         if test "$GL_GNULIB_PIPE" = 0; then
42960       GL_GNULIB_PIPE=$gl_module_indicator_condition
42961     else
42962       GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
42963     fi
42964   fi
42965
42966
42967
42968
42969
42970 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
42971
42972
42973
42974
42975
42976
42977
42978
42979
42980
42981
42982
42983
42984   if { case "$host_os" in mingw*) true;; *) false;; esac; } \
42985      && test $gl_threads_api = windows; then
42986             REPLACE_PTHREAD_CREATE=1
42987     REPLACE_PTHREAD_ATTR_INIT=1
42988     REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
42989     REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
42990     REPLACE_PTHREAD_ATTR_DESTROY=1
42991     REPLACE_PTHREAD_SELF=1
42992     REPLACE_PTHREAD_EQUAL=1
42993     REPLACE_PTHREAD_DETACH=1
42994     REPLACE_PTHREAD_JOIN=1
42995     REPLACE_PTHREAD_EXIT=1
42996   else
42997     if test $HAVE_PTHREAD_H = 0; then
42998       HAVE_PTHREAD_CREATE=0
42999       HAVE_PTHREAD_ATTR_INIT=0
43000       HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
43001       HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
43002       HAVE_PTHREAD_ATTR_DESTROY=0
43003       HAVE_PTHREAD_SELF=0
43004       HAVE_PTHREAD_EQUAL=0
43005       HAVE_PTHREAD_DETACH=0
43006       HAVE_PTHREAD_JOIN=0
43007       HAVE_PTHREAD_EXIT=0
43008     else
43009                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
43010 printf %s "checking whether pthread_create exists as a global function... " >&6; }
43011 if test ${gl_cv_func_pthread_create+y}
43012 then :
43013   printf %s "(cached) " >&6
43014 else $as_nop
43015   saved_LIBS="$LIBS"
43016          LIBS="$LIBS $LIBPMULTITHREAD"
43017          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43018 /* end confdefs.h.  */
43019 extern
43020                 #ifdef __cplusplus
43021                 "C"
43022                 #endif
43023                 int pthread_create (void);
43024                 int main ()
43025                 {
43026                   return pthread_create ();
43027                 }
43028
43029 _ACEOF
43030 if ac_fn_c_try_link "$LINENO"
43031 then :
43032   gl_cv_func_pthread_create=yes
43033 else $as_nop
43034   gl_cv_func_pthread_create=no
43035 fi
43036 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43037     conftest$ac_exeext conftest.$ac_ext
43038          LIBS="$saved_LIBS"
43039
43040 fi
43041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
43042 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
43043       if test $gl_cv_func_pthread_create = no; then
43044         REPLACE_PTHREAD_CREATE=1
43045         REPLACE_PTHREAD_ATTR_INIT=1
43046
43047 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
43048
43049       fi
43050     fi
43051   fi
43052
43053   if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
43054
43055
43056
43057
43058
43059
43060
43061
43062   gltests_LIBOBJS="$gltests_LIBOBJS pthread-thread.$ac_objext"
43063
43064   fi
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074     if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
43075         if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
43076       GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
43077     else
43078       GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
43079     fi
43080   fi
43081
43082
43083
43084
43085
43086 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
43087
43088
43089
43090
43091
43092
43093
43094
43095       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
43096 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
43097 if test ${gl_cv_func_pthread_sigmask_macro+y}
43098 then :
43099   printf %s "(cached) " >&6
43100 else $as_nop
43101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43102 /* end confdefs.h.  */
43103
43104 #include <pthread.h>
43105 #include <signal.h>
43106 #ifdef pthread_sigmask
43107  headers_define_pthread_sigmask
43108 #endif
43109 _ACEOF
43110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43111   $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
43112 then :
43113   gl_cv_func_pthread_sigmask_macro=yes
43114 else $as_nop
43115   gl_cv_func_pthread_sigmask_macro=no
43116 fi
43117 rm -rf conftest*
43118
43119
43120 fi
43121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
43122 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
43123
43124   LIB_PTHREAD_SIGMASK=
43125
43126   if test $gl_cv_func_pthread_sigmask_macro = yes; then
43127         HAVE_PTHREAD_SIGMASK=0
43128         REPLACE_PTHREAD_SIGMASK=1
43129   else
43130
43131
43132
43133       if test "$gl_threads_api" = posix; then
43134         if test $ac_cv_func_pthread_sigmask = yes; then
43135                     :
43136         else
43137           if test -n "$LIBMULTITHREAD"; then
43138             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
43139 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
43140 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
43141 then :
43142   printf %s "(cached) " >&6
43143 else $as_nop
43144   gl_save_LIBS="$LIBS"
43145                LIBS="$LIBS $LIBMULTITHREAD"
43146                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43147 /* end confdefs.h.  */
43148 #include <pthread.h>
43149                       #include <signal.h>
43150
43151 int
43152 main (void)
43153 {
43154 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
43155   ;
43156   return 0;
43157 }
43158
43159 _ACEOF
43160 if ac_fn_c_try_link "$LINENO"
43161 then :
43162   gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
43163 else $as_nop
43164   gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
43165 fi
43166 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43167     conftest$ac_exeext conftest.$ac_ext
43168                LIBS="$gl_save_LIBS"
43169
43170 fi
43171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
43172 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
43173             if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
43174                             LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
43175             else
43176                             HAVE_PTHREAD_SIGMASK=0
43177             fi
43178           else
43179                         HAVE_PTHREAD_SIGMASK=0
43180           fi
43181         fi
43182       else
43183                         if test $ac_cv_func_pthread_sigmask = yes; then
43184           REPLACE_PTHREAD_SIGMASK=1
43185         else
43186           HAVE_PTHREAD_SIGMASK=0
43187         fi
43188       fi
43189
43190   fi
43191
43192
43193
43194     if test $HAVE_PTHREAD_SIGMASK = 1; then
43195
43196
43197                 if test -z "$LIB_PTHREAD_SIGMASK"; then
43198       case " $LIBS " in
43199         *' -pthread '*) ;;
43200         *' -lpthread '*) ;;
43201         *)
43202           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
43203 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
43204 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
43205 then :
43206   printf %s "(cached) " >&6
43207 else $as_nop
43208
43209               if test "$cross_compiling" = yes
43210 then :
43211
43212                                   case "$host_os" in
43213                    freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
43214                      gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
43215                    *)
43216                      gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
43217                  esac
43218
43219 else $as_nop
43220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43221 /* end confdefs.h.  */
43222
43223                    #include <pthread.h>
43224                    #include <signal.h>
43225                    #include <stddef.h>
43226                    int main ()
43227                    {
43228                      sigset_t set;
43229                      sigemptyset (&set);
43230                      return pthread_sigmask (1729, &set, NULL) != 0;
43231                    }
43232 _ACEOF
43233 if ac_fn_c_try_run "$LINENO"
43234 then :
43235   gl_cv_func_pthread_sigmask_in_libc_works=no
43236 else $as_nop
43237   gl_cv_func_pthread_sigmask_in_libc_works=yes
43238 fi
43239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43240   conftest.$ac_objext conftest.beam conftest.$ac_ext
43241 fi
43242
43243
43244 fi
43245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
43246 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
43247           case "$gl_cv_func_pthread_sigmask_in_libc_works" in
43248             *no)
43249               REPLACE_PTHREAD_SIGMASK=1
43250
43251 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
43252
43253               ;;
43254           esac;;
43255       esac
43256     fi
43257
43258             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
43259 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
43260 if test ${gl_cv_func_pthread_sigmask_return_works+y}
43261 then :
43262   printf %s "(cached) " >&6
43263 else $as_nop
43264
43265         gl_save_LIBS="$LIBS"
43266         LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
43267         if test "$cross_compiling" = yes
43268 then :
43269   case "$host_os" in
43270              cygwin*)
43271                gl_cv_func_pthread_sigmask_return_works="guessing no";;
43272              *)
43273                gl_cv_func_pthread_sigmask_return_works="guessing yes";;
43274            esac
43275
43276 else $as_nop
43277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43278 /* end confdefs.h.  */
43279
43280 #include <pthread.h>
43281 #include <signal.h>
43282 #include <stddef.h>
43283 int main ()
43284 {
43285   sigset_t set;
43286   sigemptyset (&set);
43287   if (pthread_sigmask (1729, &set, NULL) == -1)
43288     return 1;
43289   return 0;
43290 }
43291 _ACEOF
43292 if ac_fn_c_try_run "$LINENO"
43293 then :
43294   gl_cv_func_pthread_sigmask_return_works=yes
43295 else $as_nop
43296   gl_cv_func_pthread_sigmask_return_works=no
43297 fi
43298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43299   conftest.$ac_objext conftest.beam conftest.$ac_ext
43300 fi
43301
43302         LIBS="$gl_save_LIBS"
43303
43304 fi
43305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
43306 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
43307     case "$gl_cv_func_pthread_sigmask_return_works" in
43308       *no)
43309         REPLACE_PTHREAD_SIGMASK=1
43310
43311 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
43312
43313         ;;
43314     esac
43315
43316                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
43317 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
43318 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
43319 then :
43320   printf %s "(cached) " >&6
43321 else $as_nop
43322
43323         case "$host_os" in
43324           irix*)
43325             gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
43326           *)
43327             gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
43328         esac
43329                                          gl_save_LIBS=$LIBS
43330            LIBS="$LIBS $LIBMULTITHREAD"
43331         if test "$cross_compiling" = yes
43332 then :
43333   :
43334 else $as_nop
43335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43336 /* end confdefs.h.  */
43337
43338 #include <pthread.h>
43339 #include <signal.h>
43340 #include <stdio.h>
43341 #include <stdlib.h>
43342 #include <unistd.h>
43343
43344
43345 $gl_mda_defines
43346
43347 static volatile int sigint_occurred;
43348 static void
43349 sigint_handler (int sig)
43350 {
43351   sigint_occurred++;
43352 }
43353 int main ()
43354 {
43355   sigset_t set;
43356   int pid = getpid ();
43357   char command[80];
43358   signal (SIGINT, sigint_handler);
43359   sigemptyset (&set);
43360   sigaddset (&set, SIGINT);
43361   if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
43362     return 1;
43363   sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
43364   if (!(system (command) == 0))
43365     return 2;
43366   sleep (2);
43367   if (!(sigint_occurred == 0))
43368     return 3;
43369   if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
43370     return 4;
43371   if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
43372     return 5;
43373   return 0;
43374 }
43375 _ACEOF
43376 if ac_fn_c_try_run "$LINENO"
43377 then :
43378   :
43379 else $as_nop
43380   gl_cv_func_pthread_sigmask_unblock_works=no
43381 fi
43382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43383   conftest.$ac_objext conftest.beam conftest.$ac_ext
43384 fi
43385
43386         LIBS=$gl_save_LIBS
43387
43388 fi
43389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
43390 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
43391     case "$gl_cv_func_pthread_sigmask_unblock_works" in
43392       *no)
43393         REPLACE_PTHREAD_SIGMASK=1
43394
43395 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
43396
43397         ;;
43398     esac
43399   fi
43400
43401   if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
43402
43403
43404
43405
43406
43407
43408
43409
43410   gltests_LIBOBJS="$gltests_LIBOBJS pthread_sigmask.$ac_objext"
43411
43412
43413   if test $HAVE_PTHREAD_SIGMASK = 1; then
43414
43415 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
43416
43417   fi
43418
43419   fi
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429     if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
43430         if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
43431       GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
43432     else
43433       GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
43434     fi
43435   fi
43436
43437
43438
43439
43440
43441 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
43442
43443
43444
43445
43446
43447      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
43448 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
43449 if test ${gl_cv_func_svid_putenv+y}
43450 then :
43451   printf %s "(cached) " >&6
43452 else $as_nop
43453   if test "$cross_compiling" = yes
43454 then :
43455           case "$host_os" in
43456                          # Guess yes on glibc systems.
43457           *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
43458                          # Guess yes on musl systems.
43459           *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
43460                          # Guess no on native Windows.
43461           mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
43462                          # If we don't know, obey --enable-cross-guesses.
43463           *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
43464         esac
43465
43466 else $as_nop
43467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43468 /* end confdefs.h.  */
43469 $ac_includes_default
43470
43471
43472 $gl_mda_defines
43473
43474 int
43475 main (void)
43476 {
43477
43478             /* Put it in env.  */
43479             if (putenv ("CONFTEST_putenv=val"))
43480               return 1;
43481
43482             /* Try to remove it.  */
43483             if (putenv ("CONFTEST_putenv"))
43484               return 2;
43485
43486             /* Make sure it was deleted.  */
43487             if (getenv ("CONFTEST_putenv") != 0)
43488               return 3;
43489
43490             return 0;
43491
43492   ;
43493   return 0;
43494 }
43495 _ACEOF
43496 if ac_fn_c_try_run "$LINENO"
43497 then :
43498   gl_cv_func_svid_putenv=yes
43499 else $as_nop
43500   gl_cv_func_svid_putenv=no
43501 fi
43502 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43503   conftest.$ac_objext conftest.beam conftest.$ac_ext
43504 fi
43505
43506
43507 fi
43508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
43509 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
43510   case "$gl_cv_func_svid_putenv" in
43511     *yes) ;;
43512     *)
43513       REPLACE_PUTENV=1
43514       ;;
43515   esac
43516
43517   if test $REPLACE_PUTENV = 1; then
43518
43519
43520
43521
43522
43523
43524
43525
43526   gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
43527
43528
43529   ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
43530 if test "x$ac_cv_have_decl__putenv" = xyes
43531 then :
43532   ac_have_decl=1
43533 else $as_nop
43534   ac_have_decl=0
43535 fi
43536 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
43537
43538
43539   fi
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549     if test "$GL_GNULIB_PUTENV" != 1; then
43550         if test "$GL_GNULIB_PUTENV" = 0; then
43551       GL_GNULIB_PUTENV=$gl_module_indicator_condition
43552     else
43553       GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
43554     fi
43555   fi
43556
43557
43558
43559
43560
43561 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
43562
43563
43564
43565
43566
43567
43568
43569
43570
43571
43572
43573
43574
43575
43576
43577
43578
43579
43580
43581   if test "$ac_cv_header_winsock2_h" = yes; then
43582     REPLACE_SELECT=1
43583   else
43584
43585     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
43586 printf %s "checking whether select supports a 0 argument... " >&6; }
43587 if test ${gl_cv_func_select_supports0+y}
43588 then :
43589   printf %s "(cached) " >&6
43590 else $as_nop
43591
43592         if test "$cross_compiling" = yes
43593 then :
43594
43595            case "$host_os" in
43596                        # Guess no on Interix.
43597              interix*) gl_cv_func_select_supports0="guessing no";;
43598                        # Guess yes otherwise.
43599              *)        gl_cv_func_select_supports0="guessing yes";;
43600            esac
43601
43602 else $as_nop
43603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43604 /* end confdefs.h.  */
43605
43606 #include <sys/types.h>
43607 #include <sys/time.h>
43608 #if HAVE_SYS_SELECT_H
43609 #include <sys/select.h>
43610 #endif
43611 int main ()
43612 {
43613   struct timeval timeout;
43614   timeout.tv_sec = 0;
43615   timeout.tv_usec = 5;
43616   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
43617 }
43618 _ACEOF
43619 if ac_fn_c_try_run "$LINENO"
43620 then :
43621   gl_cv_func_select_supports0=yes
43622 else $as_nop
43623   gl_cv_func_select_supports0=no
43624 fi
43625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43626   conftest.$ac_objext conftest.beam conftest.$ac_ext
43627 fi
43628
43629
43630 fi
43631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
43632 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
43633     case "$gl_cv_func_select_supports0" in
43634       *yes) ;;
43635       *) REPLACE_SELECT=1 ;;
43636     esac
43637
43638         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
43639 printf %s "checking whether select detects invalid fds... " >&6; }
43640 if test ${gl_cv_func_select_detects_ebadf+y}
43641 then :
43642   printf %s "(cached) " >&6
43643 else $as_nop
43644
43645         if test "$cross_compiling" = yes
43646 then :
43647
43648            case "$host_os" in
43649                              # Guess yes on Linux systems.
43650             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
43651                              # Guess yes on glibc systems.
43652             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
43653                              # If we don't know, obey --enable-cross-guesses.
43654             *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
43655            esac
43656
43657 else $as_nop
43658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43659 /* end confdefs.h.  */
43660
43661 #include <sys/types.h>
43662 #include <sys/time.h>
43663 #if HAVE_SYS_SELECT_H
43664 # include <sys/select.h>
43665 #endif
43666 #include <unistd.h>
43667 #include <errno.h>
43668
43669
43670 $gl_mda_defines
43671
43672 int
43673 main (void)
43674 {
43675
43676   fd_set set;
43677   dup2(0, 16);
43678   FD_ZERO(&set);
43679   FD_SET(16, &set);
43680   close(16);
43681   struct timeval timeout;
43682   timeout.tv_sec = 0;
43683   timeout.tv_usec = 5;
43684   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
43685
43686   ;
43687   return 0;
43688 }
43689 _ACEOF
43690 if ac_fn_c_try_run "$LINENO"
43691 then :
43692   gl_cv_func_select_detects_ebadf=yes
43693 else $as_nop
43694   gl_cv_func_select_detects_ebadf=no
43695 fi
43696 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43697   conftest.$ac_objext conftest.beam conftest.$ac_ext
43698 fi
43699
43700
43701 fi
43702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
43703 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
43704     case $gl_cv_func_select_detects_ebadf in
43705       *yes) ;;
43706       *) REPLACE_SELECT=1 ;;
43707     esac
43708   fi
43709
43710     LIB_SELECT="$LIBSOCKET"
43711   if test $REPLACE_SELECT = 1; then
43712     case "$host_os" in
43713       mingw*)
43714                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43715 /* end confdefs.h.  */
43716
43717 #define WIN32_LEAN_AND_MEAN
43718 #include <windows.h>
43719 int
43720 main ()
43721 {
43722   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
43723   return 0;
43724 }
43725 _ACEOF
43726 if ac_fn_c_try_link "$LINENO"
43727 then :
43728
43729 else $as_nop
43730   LIB_SELECT="$LIB_SELECT -luser32"
43731 fi
43732 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43733     conftest$ac_exeext conftest.$ac_ext
43734         ;;
43735     esac
43736   fi
43737
43738
43739   if test $REPLACE_SELECT = 1; then
43740
43741
43742
43743
43744
43745
43746
43747
43748   gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
43749
43750   fi
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760     if test "$GL_GNULIB_SELECT" != 1; then
43761         if test "$GL_GNULIB_SELECT" = 0; then
43762       GL_GNULIB_SELECT=$gl_module_indicator_condition
43763     else
43764       GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
43765     fi
43766   fi
43767
43768
43769
43770
43771
43772 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
43773
43774
43775
43776
43777
43778   if test "$ac_cv_header_winsock2_h" = yes; then
43779
43780
43781
43782
43783
43784
43785
43786
43787   gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
43788
43789   fi
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799     if test "$GL_GNULIB_SETSOCKOPT" != 1; then
43800         if test "$GL_GNULIB_SETSOCKOPT" = 0; then
43801       GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
43802     else
43803       GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
43804     fi
43805   fi
43806
43807
43808
43809
43810
43811 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
43812
43813
43814
43815
43816
43817
43818   if test $ac_cv_func_sigaction = yes; then
43819     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
43820 "
43821 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
43822 then :
43823
43824 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
43825
43826
43827 fi
43828
43829     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
43830       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
43831     fi
43832   else
43833     HAVE_SIGACTION=0
43834   fi
43835
43836   if test $HAVE_SIGACTION = 0; then
43837
43838
43839
43840
43841
43842
43843
43844
43845   gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
43846
43847
43848
43849
43850
43851
43852
43853   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
43854 #include <signal.h>
43855
43856 "
43857 if test "x$ac_cv_type_siginfo_t" = xyes
43858 then :
43859
43860 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
43861
43862
43863 fi
43864
43865   if test $ac_cv_type_siginfo_t = no; then
43866     HAVE_SIGINFO_T=0
43867   fi
43868
43869   fi
43870
43871
43872
43873
43874
43875
43876
43877
43878
43879     if test "$GL_GNULIB_SIGACTION" != 1; then
43880         if test "$GL_GNULIB_SIGACTION" = 0; then
43881       GL_GNULIB_SIGACTION=$gl_module_indicator_condition
43882     else
43883       GL_GNULIB_SIGACTION="($GL_GNULIB_SIGACTION || $gl_module_indicator_condition)"
43884     fi
43885   fi
43886
43887
43888
43889
43890
43891 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
43892
43893
43894
43895
43896
43897
43898   HAVE_POSIX_SIGNALBLOCKING=0
43899   if test "$gl_cv_type_sigset_t" = yes; then
43900     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
43901 if test "x$ac_cv_func_sigprocmask" = xyes
43902 then :
43903   HAVE_POSIX_SIGNALBLOCKING=1
43904 fi
43905
43906   fi
43907
43908   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
43909
43910
43911
43912
43913
43914
43915
43916
43917   gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
43918
43919     :
43920   fi
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930     if test "$GL_GNULIB_SIGPROCMASK" != 1; then
43931         if test "$GL_GNULIB_SIGPROCMASK" = 0; then
43932       GL_GNULIB_SIGPROCMASK=$gl_module_indicator_condition
43933     else
43934       GL_GNULIB_SIGPROCMASK="($GL_GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
43935     fi
43936   fi
43937
43938
43939
43940
43941
43942 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
43943
43944
43945
43946
43947
43948
43949
43950                ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
43951 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43952 if test "x$ac_cv_have_decl_sleep" = xyes
43953 then :
43954   ac_have_decl=1
43955 else $as_nop
43956   ac_have_decl=0
43957 fi
43958 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
43959
43960
43961   if test $ac_cv_have_decl_sleep != yes; then
43962     HAVE_SLEEP=0
43963   else
43964         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
43965 printf %s "checking for working sleep... " >&6; }
43966 if test ${gl_cv_func_sleep_works+y}
43967 then :
43968   printf %s "(cached) " >&6
43969 else $as_nop
43970   if test "$cross_compiling" = yes
43971 then :
43972   case "$host_os" in
43973                         # Guess yes on glibc systems.
43974          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
43975                         # Guess yes on musl systems.
43976          *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
43977                         # Guess no on native Windows.
43978          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
43979                         # If we don't know, obey --enable-cross-guesses.
43980          *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
43981        esac
43982
43983 else $as_nop
43984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43985 /* end confdefs.h.  */
43986
43987 #include <errno.h>
43988 #include <unistd.h>
43989 #include <signal.h>
43990 static void
43991 handle_alarm (int sig)
43992 {
43993   if (sig != SIGALRM)
43994     _exit (2);
43995 }
43996
43997 int
43998 main (void)
43999 {
44000
44001     /* Failure to compile this test due to missing alarm is okay,
44002        since all such platforms (mingw) also lack sleep.  */
44003     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
44004     unsigned int remaining;
44005     signal (SIGALRM, handle_alarm);
44006     alarm (1);
44007     remaining = sleep (pentecost);
44008     if (remaining > pentecost)
44009       return 3;
44010     if (remaining <= pentecost - 10)
44011       return 4;
44012     return 0;
44013
44014   ;
44015   return 0;
44016 }
44017 _ACEOF
44018 if ac_fn_c_try_run "$LINENO"
44019 then :
44020   gl_cv_func_sleep_works=yes
44021 else $as_nop
44022   gl_cv_func_sleep_works=no
44023 fi
44024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44025   conftest.$ac_objext conftest.beam conftest.$ac_ext
44026 fi
44027
44028 fi
44029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
44030 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
44031     case "$gl_cv_func_sleep_works" in
44032       *yes) ;;
44033       *)
44034         REPLACE_SLEEP=1
44035         ;;
44036     esac
44037   fi
44038
44039   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
44040
44041
44042
44043
44044
44045
44046
44047
44048   gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
44049
44050   fi
44051
44052
44053
44054
44055
44056
44057
44058
44059
44060     if test "$GL_GNULIB_SLEEP" != 1; then
44061         if test "$GL_GNULIB_SLEEP" = 0; then
44062       GL_GNULIB_SLEEP=$gl_module_indicator_condition
44063     else
44064       GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
44065     fi
44066   fi
44067
44068
44069
44070
44071
44072 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
44073
44074
44075
44076
44077
44078
44079   gl_cv_func_snprintf_usable=no
44080   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
44081 if test "x$ac_cv_func_snprintf" = xyes
44082 then :
44083   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
44084
44085 fi
44086
44087   if test $ac_cv_func_snprintf = yes; then
44088
44089
44090
44091   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
44092 printf %s "checking whether snprintf respects a size of 1... " >&6; }
44093 if test ${gl_cv_func_snprintf_size1+y}
44094 then :
44095   printf %s "(cached) " >&6
44096 else $as_nop
44097
44098       if test "$cross_compiling" = yes
44099 then :
44100   case "$host_os" in
44101                             # Guess yes on Android.
44102            linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
44103                             # Guess yes on native Windows.
44104            mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
44105            *)               gl_cv_func_snprintf_size1="guessing yes" ;;
44106          esac
44107
44108 else $as_nop
44109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44110 /* end confdefs.h.  */
44111
44112 #include <stdio.h>
44113 #if HAVE_SNPRINTF
44114 # define my_snprintf snprintf
44115 #else
44116 # include <stdarg.h>
44117 static int my_snprintf (char *buf, int size, const char *format, ...)
44118 {
44119   va_list args;
44120   int ret;
44121   va_start (args, format);
44122   ret = vsnprintf (buf, size, format, args);
44123   va_end (args);
44124   return ret;
44125 }
44126 #endif
44127 int main()
44128 {
44129   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
44130   my_snprintf (buf, 1, "%d", 12345);
44131   return buf[1] != 'E';
44132 }
44133 _ACEOF
44134 if ac_fn_c_try_run "$LINENO"
44135 then :
44136   gl_cv_func_snprintf_size1=yes
44137 else $as_nop
44138   gl_cv_func_snprintf_size1=no
44139 fi
44140 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44141   conftest.$ac_objext conftest.beam conftest.$ac_ext
44142 fi
44143
44144
44145 fi
44146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
44147 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
44148
44149     case "$gl_cv_func_snprintf_size1" in
44150       *yes)
44151
44152         case "$gl_cv_func_snprintf_retval_c99" in
44153           *yes)
44154
44155
44156      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
44157 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
44158 if test ${gl_cv_func_printf_positions+y}
44159 then :
44160   printf %s "(cached) " >&6
44161 else $as_nop
44162
44163       if test "$cross_compiling" = yes
44164 then :
44165
44166          case "$host_os" in
44167            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
44168                             gl_cv_func_printf_positions="guessing no";;
44169            beos*)           gl_cv_func_printf_positions="guessing no";;
44170                             # Guess yes on Android.
44171            linux*-android*) gl_cv_func_printf_positions="guessing yes";;
44172                             # Guess no on native Windows.
44173            mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
44174            *)               gl_cv_func_printf_positions="guessing yes";;
44175          esac
44176
44177 else $as_nop
44178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44179 /* end confdefs.h.  */
44180
44181 #include <stdio.h>
44182 #include <string.h>
44183 /* The string "%2$d %1$d", with dollar characters protected from the shell's
44184    dollar expansion (possibly an autoconf bug).  */
44185 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
44186 static char buf[100];
44187 int main ()
44188 {
44189   sprintf (buf, format, 33, 55);
44190   return (strcmp (buf, "55 33") != 0);
44191 }
44192 _ACEOF
44193 if ac_fn_c_try_run "$LINENO"
44194 then :
44195   gl_cv_func_printf_positions=yes
44196 else $as_nop
44197   gl_cv_func_printf_positions=no
44198 fi
44199 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44200   conftest.$ac_objext conftest.beam conftest.$ac_ext
44201 fi
44202
44203
44204 fi
44205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
44206 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
44207
44208             case "$gl_cv_func_printf_positions" in
44209               *yes)
44210                 gl_cv_func_snprintf_usable=yes
44211                 ;;
44212             esac
44213             ;;
44214         esac
44215         ;;
44216     esac
44217   fi
44218   if test $gl_cv_func_snprintf_usable = no; then
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229   gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
44230
44231   if test $ac_cv_func_snprintf = yes; then
44232     REPLACE_SNPRINTF=1
44233   else
44234
44235     if test $ac_cv_have_decl_snprintf = yes; then
44236                         REPLACE_SNPRINTF=1
44237     fi
44238   fi
44239   :
44240
44241   fi
44242
44243   if test $ac_cv_have_decl_snprintf = no; then
44244     HAVE_DECL_SNPRINTF=0
44245   fi
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256     if test "$GL_GNULIB_SNPRINTF" != 1; then
44257         if test "$GL_GNULIB_SNPRINTF" = 0; then
44258       GL_GNULIB_SNPRINTF=$gl_module_indicator_condition
44259     else
44260       GL_GNULIB_SNPRINTF="($GL_GNULIB_SNPRINTF || $gl_module_indicator_condition)"
44261     fi
44262   fi
44263
44264
44265
44266
44267
44268 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
44269
44270
44271
44272
44273
44274 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
44275
44276
44277
44278   if test "$ac_cv_header_winsock2_h" = yes; then
44279
44280
44281
44282
44283
44284
44285
44286
44287   gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
44288
44289   fi
44290   # When this module is used, sockets may actually occur as file descriptors,
44291   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303   if test "$ac_cv_header_winsock2_h" = yes; then
44304     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
44305     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
44306   fi
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316     if test "$GL_GNULIB_SOCKET" != 1; then
44317         if test "$GL_GNULIB_SOCKET" = 0; then
44318       GL_GNULIB_SOCKET=$gl_module_indicator_condition
44319     else
44320       GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
44321     fi
44322   fi
44323
44324
44325
44326
44327
44328 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
44329
44330
44331
44332
44333
44334      ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
44335 /* <sys/types.h> is not needed according to POSIX, but the
44336    <sys/socket.h> in i386-unknown-freebsd4.10 and
44337    powerpc-apple-darwin5.5 required it. */
44338 #include <sys/types.h>
44339 #if HAVE_SYS_SOCKET_H
44340 # include <sys/socket.h>
44341 #elif HAVE_WS2TCPIP_H
44342 # include <ws2tcpip.h>
44343 #endif
44344
44345 "
44346 if test "x$ac_cv_type_socklen_t" = xyes
44347 then :
44348
44349 else $as_nop
44350   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
44351 printf %s "checking for socklen_t equivalent... " >&6; }
44352 if test ${gl_cv_socklen_t_equiv+y}
44353 then :
44354   printf %s "(cached) " >&6
44355 else $as_nop
44356   # Systems have either "struct sockaddr *" or
44357          # "void *" as the second argument to getpeername
44358          gl_cv_socklen_t_equiv=
44359          for arg2 in "struct sockaddr" void; do
44360            for t in int size_t "unsigned int" "long int" "unsigned long int"; do
44361              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44362 /* end confdefs.h.  */
44363 #include <sys/types.h>
44364                    #include <sys/socket.h>
44365
44366                    int getpeername (int, $arg2 *, $t *);
44367 int
44368 main (void)
44369 {
44370 $t len;
44371                   getpeername (0, 0, &len);
44372   ;
44373   return 0;
44374 }
44375 _ACEOF
44376 if ac_fn_c_try_compile "$LINENO"
44377 then :
44378   gl_cv_socklen_t_equiv="$t"
44379 fi
44380 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44381              test "$gl_cv_socklen_t_equiv" != "" && break
44382            done
44383            test "$gl_cv_socklen_t_equiv" != "" && break
44384          done
44385          if test "$gl_cv_socklen_t_equiv" = ""; then
44386            as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
44387          fi
44388
44389 fi
44390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
44391 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
44392
44393 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
44394
44395 fi
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406   if test $ac_cv_have_decl_strerror_r = no; then
44407     HAVE_DECL_STRERROR_R=0
44408   fi
44409
44410   if test $ac_cv_func_strerror_r = yes; then
44411     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
44412       if test $gl_cv_func_strerror_r_posix_signature = yes; then
44413         case "$gl_cv_func_strerror_r_works" in
44414                     *no) REPLACE_STRERROR_R=1 ;;
44415         esac
44416       else
44417                 REPLACE_STRERROR_R=1
44418       fi
44419     else
44420                   REPLACE_STRERROR_R=1
44421     fi
44422   fi
44423
44424   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
44425
44426
44427
44428
44429
44430
44431
44432
44433   gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
44434
44435
44436
44437
44438
44439
44440   fi
44441
44442
44443
44444
44445
44446
44447
44448
44449
44450     if test "$GL_GNULIB_STRERROR_R" != 1; then
44451         if test "$GL_GNULIB_STRERROR_R" = 0; then
44452       GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
44453     else
44454       GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
44455     fi
44456   fi
44457
44458
44459
44460
44461
44462 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
44463
44464
44465
44466
44467
44468 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
44469
44470
44471
44472
44473
44474
44475
44476
44477         if test $ac_cv_func_symlink = no; then
44478     HAVE_SYMLINK=0
44479   else
44480     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
44481 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
44482 if test ${gl_cv_func_symlink_works+y}
44483 then :
44484   printf %s "(cached) " >&6
44485 else $as_nop
44486   if test "$cross_compiling" = yes
44487 then :
44488   case "$host_os" in
44489                              # Guess yes on Linux systems.
44490             linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
44491                              # Guess yes on glibc systems.
44492             *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
44493                              # If we don't know, obey --enable-cross-guesses.
44494             *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
44495           esac
44496
44497 else $as_nop
44498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44499 /* end confdefs.h.  */
44500 #include <unistd.h>
44501
44502 int
44503 main (void)
44504 {
44505 int result = 0;
44506              if (!symlink ("a", "conftest.link/"))
44507                result |= 1;
44508              if (symlink ("conftest.f", "conftest.lnk2"))
44509                result |= 2;
44510              else if (!symlink ("a", "conftest.lnk2/"))
44511                result |= 4;
44512              return result;
44513
44514   ;
44515   return 0;
44516 }
44517 _ACEOF
44518 if ac_fn_c_try_run "$LINENO"
44519 then :
44520   gl_cv_func_symlink_works=yes
44521 else $as_nop
44522   gl_cv_func_symlink_works=no
44523 fi
44524 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44525   conftest.$ac_objext conftest.beam conftest.$ac_ext
44526 fi
44527
44528       rm -f conftest.f conftest.link conftest.lnk2
44529 fi
44530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
44531 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
44532     case "$gl_cv_func_symlink_works" in
44533       *yes) ;;
44534       *)
44535         REPLACE_SYMLINK=1
44536         ;;
44537     esac
44538   fi
44539
44540   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
44541
44542
44543
44544
44545
44546
44547
44548
44549   gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
44550
44551   fi
44552
44553
44554
44555
44556
44557
44558
44559
44560
44561     if test "$GL_GNULIB_SYMLINK" != 1; then
44562         if test "$GL_GNULIB_SYMLINK" = 0; then
44563       GL_GNULIB_SYMLINK=$gl_module_indicator_condition
44564     else
44565       GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
44566     fi
44567   fi
44568
44569
44570
44571
44572
44573 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
44574
44575
44576
44577
44578
44579
44580
44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609   if test $gl_threads_api = posix; then
44610     gl_save_LIBS="$LIBS"
44611     LIBS="$LIBS $LIBMULTITHREAD"
44612     ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
44613 if test "x$ac_cv_func_pthread_atfork" = xyes
44614 then :
44615   printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
44616
44617 fi
44618
44619     LIBS="$gl_save_LIBS"
44620   fi
44621
44622   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
44623
44624   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
44625
44626
44627
44628
44629   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
44630 printf %s "checking for a traditional french locale... " >&6; }
44631 if test ${gt_cv_locale_fr+y}
44632 then :
44633   printf %s "(cached) " >&6
44634 else $as_nop
44635
44636     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44637 /* end confdefs.h.  */
44638
44639 #include <locale.h>
44640 #include <time.h>
44641 #if HAVE_LANGINFO_CODESET
44642 # include <langinfo.h>
44643 #endif
44644 #include <stdlib.h>
44645 #include <string.h>
44646 struct tm t;
44647 char buf[16];
44648 int main () {
44649   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44650      imitates locale dependent behaviour by looking at the environment
44651      variables, and all locales use the UTF-8 encoding.  */
44652 #if defined __BEOS__ || defined __HAIKU__
44653   return 1;
44654 #else
44655   /* Check whether the given locale name is recognized by the system.  */
44656 # if defined _WIN32 && !defined __CYGWIN__
44657   /* On native Windows, setlocale(category, "") looks at the system settings,
44658      not at the environment variables.  Also, when an encoding suffix such
44659      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44660      category of the locale to "C".  */
44661   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44662       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44663     return 1;
44664 # else
44665   if (setlocale (LC_ALL, "") == NULL) return 1;
44666 # endif
44667   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44668      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44669      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44670      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44671      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44672      some unit tests fail.
44673      On MirBSD 10, when an unsupported locale is specified, setlocale()
44674      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
44675 # if HAVE_LANGINFO_CODESET
44676   {
44677     const char *cs = nl_langinfo (CODESET);
44678     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44679         || strcmp (cs, "UTF-8") == 0)
44680       return 1;
44681   }
44682 # endif
44683 # ifdef __CYGWIN__
44684   /* On Cygwin, avoid locale names without encoding suffix, because the
44685      locale_charset() function relies on the encoding suffix.  Note that
44686      LC_ALL is set on the command line.  */
44687   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44688 # endif
44689   /* Check whether in the abbreviation of the second month, the second
44690      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
44691      one byte long. This excludes the UTF-8 encoding.  */
44692   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44693   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
44694 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
44695   /* Check whether the decimal separator is a comma.
44696      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44697      are nl_langinfo(RADIXCHAR) are both ".".  */
44698   if (localeconv () ->decimal_point[0] != ',') return 1;
44699 # endif
44700   return 0;
44701 #endif
44702 }
44703
44704 _ACEOF
44705     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44706   (eval $ac_link) 2>&5
44707   ac_status=$?
44708   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44709   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44710       case "$host_os" in
44711         # Handle native Windows specially, because there setlocale() interprets
44712         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44713         # "fr" or "fra" as "French" or "French_France.1252",
44714         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44715         # "ja" as "Japanese" or "Japanese_Japan.932",
44716         # and similar.
44717         mingw*)
44718           # Test for the native Windows locale name.
44719           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44720             gt_cv_locale_fr=French_France.1252
44721           else
44722             # None found.
44723             gt_cv_locale_fr=none
44724           fi
44725           ;;
44726         *)
44727           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44728           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44729           # configure script would override the LC_ALL setting. Likewise for
44730           # LC_CTYPE, which is also set at the beginning of the configure script.
44731           # Test for the usual locale name.
44732           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44733             gt_cv_locale_fr=fr_FR
44734           else
44735             # Test for the locale name with explicit encoding suffix.
44736             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44737               gt_cv_locale_fr=fr_FR.ISO-8859-1
44738             else
44739               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
44740               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44741                 gt_cv_locale_fr=fr_FR.ISO8859-1
44742               else
44743                 # Test for the HP-UX locale name.
44744                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44745                   gt_cv_locale_fr=fr_FR.iso88591
44746                 else
44747                   # Test for the Solaris 7 locale name.
44748                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44749                     gt_cv_locale_fr=fr
44750                   else
44751                     # None found.
44752                     gt_cv_locale_fr=none
44753                   fi
44754                 fi
44755               fi
44756             fi
44757           fi
44758           ;;
44759       esac
44760     fi
44761     rm -fr conftest*
44762
44763 fi
44764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44765 printf "%s\n" "$gt_cv_locale_fr" >&6; }
44766   LOCALE_FR=$gt_cv_locale_fr
44767
44768
44769
44770
44771   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44772 printf %s "checking for a french Unicode locale... " >&6; }
44773 if test ${gt_cv_locale_fr_utf8+y}
44774 then :
44775   printf %s "(cached) " >&6
44776 else $as_nop
44777
44778     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44779 /* end confdefs.h.  */
44780
44781 #include <locale.h>
44782 #include <time.h>
44783 #if HAVE_LANGINFO_CODESET
44784 # include <langinfo.h>
44785 #endif
44786 #include <stdlib.h>
44787 #include <string.h>
44788 struct tm t;
44789 char buf[16];
44790 int main () {
44791   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44792      imitates locale dependent behaviour by looking at the environment
44793      variables, and all locales use the UTF-8 encoding.  */
44794 #if !(defined __BEOS__ || defined __HAIKU__)
44795   /* Check whether the given locale name is recognized by the system.  */
44796 # if defined _WIN32 && !defined __CYGWIN__
44797   /* On native Windows, setlocale(category, "") looks at the system settings,
44798      not at the environment variables.  Also, when an encoding suffix such
44799      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44800      category of the locale to "C".  */
44801   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44802       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44803     return 1;
44804 # else
44805   if (setlocale (LC_ALL, "") == NULL) return 1;
44806 # endif
44807   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44808      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44809      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44810      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44811      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44812      some unit tests fail.  */
44813 # if HAVE_LANGINFO_CODESET
44814   {
44815     const char *cs = nl_langinfo (CODESET);
44816     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44817       return 1;
44818   }
44819 # endif
44820 # ifdef __CYGWIN__
44821   /* On Cygwin, avoid locale names without encoding suffix, because the
44822      locale_charset() function relies on the encoding suffix.  Note that
44823      LC_ALL is set on the command line.  */
44824   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44825 # endif
44826   /* Check whether in the abbreviation of the second month, the second
44827      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44828      two bytes long, with UTF-8 encoding.  */
44829   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44830   if (strftime (buf, sizeof (buf), "%b", &t) < 4
44831       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44832     return 1;
44833 #endif
44834 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
44835   /* Check whether the decimal separator is a comma.
44836      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44837      are nl_langinfo(RADIXCHAR) are both ".".  */
44838   if (localeconv () ->decimal_point[0] != ',') return 1;
44839 #endif
44840   return 0;
44841 }
44842
44843 _ACEOF
44844     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44845   (eval $ac_link) 2>&5
44846   ac_status=$?
44847   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44848   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44849       case "$host_os" in
44850         # Handle native Windows specially, because there setlocale() interprets
44851         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44852         # "fr" or "fra" as "French" or "French_France.1252",
44853         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44854         # "ja" as "Japanese" or "Japanese_Japan.932",
44855         # and similar.
44856         mingw*)
44857           # Test for the hypothetical native Windows locale name.
44858           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44859             gt_cv_locale_fr_utf8=French_France.65001
44860           else
44861             # None found.
44862             gt_cv_locale_fr_utf8=none
44863           fi
44864           ;;
44865         *)
44866           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44867           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44868           # configure script would override the LC_ALL setting. Likewise for
44869           # LC_CTYPE, which is also set at the beginning of the configure script.
44870           # Test for the usual locale name.
44871           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44872             gt_cv_locale_fr_utf8=fr_FR
44873           else
44874             # Test for the locale name with explicit encoding suffix.
44875             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44876               gt_cv_locale_fr_utf8=fr_FR.UTF-8
44877             else
44878               # Test for the Solaris 7 locale name.
44879               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44880                 gt_cv_locale_fr_utf8=fr.UTF-8
44881               else
44882                 # None found.
44883                 gt_cv_locale_fr_utf8=none
44884               fi
44885             fi
44886           fi
44887           ;;
44888       esac
44889     fi
44890     rm -fr conftest*
44891
44892 fi
44893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44894 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
44895   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44896
44897
44898
44899
44900
44901   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44902 printf %s "checking for a traditional japanese locale... " >&6; }
44903 if test ${gt_cv_locale_ja+y}
44904 then :
44905   printf %s "(cached) " >&6
44906 else $as_nop
44907
44908     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44909 /* end confdefs.h.  */
44910
44911 #include <locale.h>
44912 #include <time.h>
44913 #if HAVE_LANGINFO_CODESET
44914 # include <langinfo.h>
44915 #endif
44916 #include <stdlib.h>
44917 #include <string.h>
44918 struct tm t;
44919 char buf[16];
44920 int main ()
44921 {
44922   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44923      imitates locale dependent behaviour by looking at the environment
44924      variables, and all locales use the UTF-8 encoding.  */
44925 #if defined __BEOS__ || defined __HAIKU__
44926   return 1;
44927 #else
44928   /* Check whether the given locale name is recognized by the system.  */
44929 # if defined _WIN32 && !defined __CYGWIN__
44930   /* On native Windows, setlocale(category, "") looks at the system settings,
44931      not at the environment variables.  Also, when an encoding suffix such
44932      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44933      category of the locale to "C".  */
44934   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44935       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44936     return 1;
44937 # else
44938   if (setlocale (LC_ALL, "") == NULL) return 1;
44939 # endif
44940   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44941      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44942      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44943      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44944      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44945      some unit tests fail.
44946      On MirBSD 10, when an unsupported locale is specified, setlocale()
44947      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
44948 # if HAVE_LANGINFO_CODESET
44949   {
44950     const char *cs = nl_langinfo (CODESET);
44951     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44952         || strcmp (cs, "UTF-8") == 0)
44953       return 1;
44954   }
44955 # endif
44956 # ifdef __CYGWIN__
44957   /* On Cygwin, avoid locale names without encoding suffix, because the
44958      locale_charset() function relies on the encoding suffix.  Note that
44959      LC_ALL is set on the command line.  */
44960   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44961 # endif
44962   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
44963      on Cygwin 1.5.x.  */
44964   if (MB_CUR_MAX == 1)
44965     return 1;
44966   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44967      This excludes the UTF-8 encoding (except on MirBSD).  */
44968   {
44969     const char *p;
44970     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44971     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44972     for (p = buf; *p != '\0'; p++)
44973       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44974         return 1;
44975   }
44976   return 0;
44977 #endif
44978 }
44979
44980 _ACEOF
44981     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44982   (eval $ac_link) 2>&5
44983   ac_status=$?
44984   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44985   test $ac_status = 0; } && test -s conftest$ac_exeext; then
44986       case "$host_os" in
44987         # Handle native Windows specially, because there setlocale() interprets
44988         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44989         # "fr" or "fra" as "French" or "French_France.1252",
44990         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44991         # "ja" as "Japanese" or "Japanese_Japan.932",
44992         # and similar.
44993         mingw*)
44994           # Note that on native Windows, the Japanese locale is
44995           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
44996           # cannot use it here.
44997           gt_cv_locale_ja=none
44998           ;;
44999         *)
45000           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45001           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45002           # configure script would override the LC_ALL setting. Likewise for
45003           # LC_CTYPE, which is also set at the beginning of the configure script.
45004           # Test for the AIX locale name.
45005           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45006             gt_cv_locale_ja=ja_JP
45007           else
45008             # Test for the locale name with explicit encoding suffix.
45009             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45010               gt_cv_locale_ja=ja_JP.EUC-JP
45011             else
45012               # Test for the HP-UX, OSF/1, NetBSD locale name.
45013               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45014                 gt_cv_locale_ja=ja_JP.eucJP
45015               else
45016                 # Test for the IRIX, FreeBSD locale name.
45017                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45018                   gt_cv_locale_ja=ja_JP.EUC
45019                 else
45020                   # Test for the Solaris 7 locale name.
45021                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45022                     gt_cv_locale_ja=ja
45023                   else
45024                     # Special test for NetBSD 1.6.
45025                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
45026                       gt_cv_locale_ja=ja_JP.eucJP
45027                     else
45028                       # None found.
45029                       gt_cv_locale_ja=none
45030                     fi
45031                   fi
45032                 fi
45033               fi
45034             fi
45035           fi
45036           ;;
45037       esac
45038     fi
45039     rm -fr conftest*
45040
45041 fi
45042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
45043 printf "%s\n" "$gt_cv_locale_ja" >&6; }
45044   LOCALE_JA=$gt_cv_locale_ja
45045
45046
45047
45048
45049
45050   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
45051 printf %s "checking for a transitional chinese locale... " >&6; }
45052 if test ${gt_cv_locale_zh_CN+y}
45053 then :
45054   printf %s "(cached) " >&6
45055 else $as_nop
45056
45057     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45058 /* end confdefs.h.  */
45059
45060 #include <locale.h>
45061 #include <stdlib.h>
45062 #include <time.h>
45063 #if HAVE_LANGINFO_CODESET
45064 # include <langinfo.h>
45065 #endif
45066 #include <stdlib.h>
45067 #include <string.h>
45068 struct tm t;
45069 char buf[16];
45070 int main ()
45071 {
45072   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
45073      imitates locale dependent behaviour by looking at the environment
45074      variables, and all locales use the UTF-8 encoding.  */
45075 #if defined __BEOS__ || defined __HAIKU__
45076   return 1;
45077 #else
45078   /* Check whether the given locale name is recognized by the system.  */
45079 # if defined _WIN32 && !defined __CYGWIN__
45080   /* On native Windows, setlocale(category, "") looks at the system settings,
45081      not at the environment variables.  Also, when an encoding suffix such
45082      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45083      category of the locale to "C".  */
45084   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45085       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45086     return 1;
45087 # else
45088   if (setlocale (LC_ALL, "") == NULL) return 1;
45089 # endif
45090   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45091      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45092      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45093      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45094      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45095      some unit tests fail.
45096      On MirBSD 10, when an unsupported locale is specified, setlocale()
45097      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
45098 # if HAVE_LANGINFO_CODESET
45099   {
45100     const char *cs = nl_langinfo (CODESET);
45101     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
45102         || strcmp (cs, "UTF-8") == 0)
45103       return 1;
45104   }
45105 # endif
45106 # ifdef __CYGWIN__
45107   /* On Cygwin, avoid locale names without encoding suffix, because the
45108      locale_charset() function relies on the encoding suffix.  Note that
45109      LC_ALL is set on the command line.  */
45110   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45111 # endif
45112   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
45113      This excludes the UTF-8 encoding (except on MirBSD).  */
45114   {
45115     const char *p;
45116     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45117     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
45118     for (p = buf; *p != '\0'; p++)
45119       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
45120         return 1;
45121   }
45122   /* Check whether a typical GB18030 multibyte sequence is recognized as a
45123      single wide character.  This excludes the GB2312 and GBK encodings.  */
45124   if (mblen ("\203\062\332\066", 5) != 4)
45125     return 1;
45126   return 0;
45127 #endif
45128 }
45129
45130 _ACEOF
45131     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45132   (eval $ac_link) 2>&5
45133   ac_status=$?
45134   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45135   test $ac_status = 0; } && test -s conftest$ac_exeext; then
45136       case "$host_os" in
45137         # Handle native Windows specially, because there setlocale() interprets
45138         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45139         # "fr" or "fra" as "French" or "French_France.1252",
45140         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45141         # "ja" as "Japanese" or "Japanese_Japan.932",
45142         # and similar.
45143         mingw*)
45144           # Test for the hypothetical native Windows locale name.
45145           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45146             gt_cv_locale_zh_CN=Chinese_China.54936
45147           else
45148             # None found.
45149             gt_cv_locale_zh_CN=none
45150           fi
45151           ;;
45152         solaris2.8)
45153           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
45154           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
45155           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
45156           gt_cv_locale_zh_CN=none
45157           ;;
45158         *)
45159           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45160           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45161           # configure script would override the LC_ALL setting. Likewise for
45162           # LC_CTYPE, which is also set at the beginning of the configure script.
45163           # Test for the locale name without encoding suffix.
45164           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45165             gt_cv_locale_zh_CN=zh_CN
45166           else
45167             # Test for the locale name with explicit encoding suffix.
45168             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45169               gt_cv_locale_zh_CN=zh_CN.GB18030
45170             else
45171               # None found.
45172               gt_cv_locale_zh_CN=none
45173             fi
45174           fi
45175           ;;
45176       esac
45177     else
45178       # If there was a link error, due to mblen(), the system is so old that
45179       # it certainly doesn't have a chinese locale.
45180       gt_cv_locale_zh_CN=none
45181     fi
45182     rm -fr conftest*
45183
45184 fi
45185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
45186 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
45187   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
45188
45189
45190
45191
45192
45193
45194   if test $ac_cv_func_wctob = no; then
45195     HAVE_WCTOB=0
45196     HAVE_DECL_WCTOB=0
45197   else
45198     HAVE_WCTOB=1
45199
45200
45201
45202          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
45203 printf %s "checking whether wctob works... " >&6; }
45204 if test ${gl_cv_func_wctob_works+y}
45205 then :
45206   printf %s "(cached) " >&6
45207 else $as_nop
45208
45209                         case "$host_os" in
45210             # Guess no on Solaris <= 9 and Cygwin.
45211           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
45212             gl_cv_func_wctob_works="guessing no" ;;
45213             # Guess no on native Windows.
45214           mingw*)
45215             gl_cv_func_wctob_works="guessing no" ;;
45216             # Guess yes otherwise.
45217           *) gl_cv_func_wctob_works="guessing yes" ;;
45218         esac
45219         case "$host_os" in
45220           cygwin*)
45221             if test "$cross_compiling" = yes
45222 then :
45223   :
45224 else $as_nop
45225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45226 /* end confdefs.h.  */
45227
45228 #include <locale.h>
45229 #include <wchar.h>
45230
45231 register long global __asm__ ("%ebx");
45232
45233 int main ()
45234 {
45235   setlocale (LC_ALL, "en_US.UTF-8");
45236
45237   global = 0x12345678;
45238   if (wctob (0x00FC) != -1)
45239     return 1;
45240   if (global != 0x12345678)
45241     return 2;
45242   return 0;
45243 }
45244 _ACEOF
45245 if ac_fn_c_try_run "$LINENO"
45246 then :
45247   :
45248 else $as_nop
45249   gl_cv_func_wctob_works=no
45250 fi
45251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45252   conftest.$ac_objext conftest.beam conftest.$ac_ext
45253 fi
45254
45255             ;;
45256         esac
45257         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
45258           if test "$cross_compiling" = yes
45259 then :
45260   :
45261 else $as_nop
45262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45263 /* end confdefs.h.  */
45264
45265 #include <locale.h>
45266 #include <stdlib.h>
45267 #include <wchar.h>
45268 int main ()
45269 {
45270   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
45271     {
45272       wchar_t wc;
45273
45274       if (mbtowc (&wc, "\374", 1) == 1)
45275         if (wctob (wc) != (unsigned char) '\374')
45276           return 1;
45277     }
45278   return 0;
45279 }
45280 _ACEOF
45281 if ac_fn_c_try_run "$LINENO"
45282 then :
45283   gl_cv_func_wctob_works=yes
45284 else $as_nop
45285   gl_cv_func_wctob_works=no
45286 fi
45287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45288   conftest.$ac_objext conftest.beam conftest.$ac_ext
45289 fi
45290
45291         fi
45292
45293 fi
45294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
45295 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
45296     case "$gl_cv_func_wctob_works" in
45297       *yes) ;;
45298       *) REPLACE_WCTOB=1 ;;
45299     esac
45300     if test $REPLACE_WCTOB = 0; then
45301
45302             ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
45303         #include <wchar.h>
45304
45305 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45306 if test "x$ac_cv_have_decl_wctob" = xyes
45307 then :
45308   ac_have_decl=1
45309 else $as_nop
45310   ac_have_decl=0
45311 fi
45312 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
45313
45314       if test $ac_cv_have_decl_wctob != yes; then
45315         HAVE_DECL_WCTOB=0
45316       fi
45317     fi
45318   fi
45319
45320   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
45321
45322
45323
45324
45325
45326
45327
45328
45329   gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
45330
45331
45332   :
45333
45334   fi
45335
45336
45337
45338
45339
45340
45341
45342
45343
45344     if test "$GL_GNULIB_WCTOB" != 1; then
45345         if test "$GL_GNULIB_WCTOB" = 0; then
45346       GL_GNULIB_WCTOB=$gl_module_indicator_condition
45347     else
45348       GL_GNULIB_WCTOB="($GL_GNULIB_WCTOB || $gl_module_indicator_condition)"
45349     fi
45350   fi
45351
45352
45353
45354
45355
45356 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
45357
45358
45359
45360
45361
45362
45363   if false; then
45364     REPLACE_WCTOMB=1
45365   fi
45366
45367   if test $REPLACE_WCTOMB = 1; then
45368
45369
45370
45371
45372
45373
45374
45375
45376   gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
45377
45378
45379   :
45380
45381   fi
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391     if test "$GL_GNULIB_WCTOMB" != 1; then
45392         if test "$GL_GNULIB_WCTOMB" = 0; then
45393       GL_GNULIB_WCTOMB=$gl_module_indicator_condition
45394     else
45395       GL_GNULIB_WCTOMB="($GL_GNULIB_WCTOMB || $gl_module_indicator_condition)"
45396     fi
45397   fi
45398
45399
45400
45401
45402
45403 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
45404
45405
45406
45407
45408   case "$host_os" in
45409     mingw*)
45410
45411
45412
45413
45414
45415
45416
45417
45418   gltests_LIBOBJS="$gltests_LIBOBJS windows-thread.$ac_objext"
45419
45420       ;;
45421   esac
45422
45423   case "$host_os" in
45424     mingw*)
45425
45426
45427
45428
45429
45430
45431
45432
45433   gltests_LIBOBJS="$gltests_LIBOBJS windows-tls.$ac_objext"
45434
45435       ;;
45436   esac
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45449   LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
45450
45451   LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
45452
45453   LIBTESTS_LIBDEPS="$gltests_libdeps"
45454
45455
45456
45457 # Ensure VLAs are not used.
45458 # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
45459
45460 printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
45461
45462
45463 # Check whether --enable-gcc-warnings was given.
45464 if test ${enable_gcc_warnings+y}
45465 then :
45466   enableval=$enable_gcc_warnings; case $enableval in
45467      yes|no) ;;
45468      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
45469    esac
45470    gl_gcc_warnings=$enableval
45471 else $as_nop
45472   if test -d "$srcdir"/.git; then
45473      gl_gcc_warnings=yes
45474    else
45475      gl_gcc_warnings=no
45476    fi
45477
45478 fi
45479
45480
45481 if test "$gl_gcc_warnings" = yes; then
45482
45483   ac_ext=c
45484 ac_cpp='$CPP $CPPFLAGS'
45485 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45486 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45487 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45488
45489
45490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
45491 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
45492 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
45493 then :
45494   printf %s "(cached) " >&6
45495 else $as_nop
45496
45497   gl_save_compiler_FLAGS="$CFLAGS"
45498   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
45499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45500 /* end confdefs.h.  */
45501
45502 int
45503 main (void)
45504 {
45505
45506   ;
45507   return 0;
45508 }
45509 _ACEOF
45510 if ac_fn_c_try_link "$LINENO"
45511 then :
45512   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
45513 else $as_nop
45514   gl_cv_warn_c__Werror__Wunknown_warning_option=no
45515 fi
45516 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45517     conftest$ac_exeext conftest.$ac_ext
45518   CFLAGS="$gl_save_compiler_FLAGS"
45519
45520 fi
45521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
45522 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
45523 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
45524 then :
45525   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
45526 else $as_nop
45527   gl_unknown_warnings_are_errors=
45528 fi
45529
45530   ac_ext=c
45531 ac_cpp='$CPP $CPPFLAGS'
45532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45535
45536
45537
45538
45539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
45540 printf %s "checking whether C compiler handles -Werror... " >&6; }
45541 if test ${gl_cv_warn_c__Werror+y}
45542 then :
45543   printf %s "(cached) " >&6
45544 else $as_nop
45545
45546   gl_save_compiler_FLAGS="$CFLAGS"
45547   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
45548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45549 /* end confdefs.h.  */
45550
45551 int
45552 main (void)
45553 {
45554
45555   ;
45556   return 0;
45557 }
45558 _ACEOF
45559 if ac_fn_c_try_link "$LINENO"
45560 then :
45561   gl_cv_warn_c__Werror=yes
45562 else $as_nop
45563   gl_cv_warn_c__Werror=no
45564 fi
45565 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45566     conftest$ac_exeext conftest.$ac_ext
45567   CFLAGS="$gl_save_compiler_FLAGS"
45568
45569 fi
45570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
45571 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
45572 if test "x$gl_cv_warn_c__Werror" = xyes
45573 then :
45574   as_fn_append WERROR_CFLAGS " -Werror"
45575 fi
45576
45577
45578
45579
45580   nw=
45581   # This, $nw, is the list of warnings we disable.
45582   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
45583   nw="$nw -Wstack-protector"        # not worth working around
45584
45585
45586   ac_ext=c
45587 ac_cpp='$CPP $CPPFLAGS'
45588 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45589 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45591
45592
45593
45594   if test -n "$GCC"; then
45595
45596             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
45597 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
45598 if test ${gl_cv_cc_nomfi_supported+y}
45599 then :
45600   printf %s "(cached) " >&6
45601 else $as_nop
45602   gl_save_CFLAGS="$CFLAGS"
45603        CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
45604        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45605 /* end confdefs.h.  */
45606
45607 int
45608 main (void)
45609 {
45610
45611   ;
45612   return 0;
45613 }
45614 _ACEOF
45615 if ac_fn_c_try_compile "$LINENO"
45616 then :
45617   gl_cv_cc_nomfi_supported=yes
45618 else $as_nop
45619   gl_cv_cc_nomfi_supported=no
45620 fi
45621 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45622        CFLAGS="$gl_save_CFLAGS"
45623
45624 fi
45625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
45626 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
45627
45628     if test "$gl_cv_cc_nomfi_supported" = yes; then
45629                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
45630 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
45631 if test ${gl_cv_cc_nomfi_needed+y}
45632 then :
45633   printf %s "(cached) " >&6
45634 else $as_nop
45635   gl_save_CFLAGS="$CFLAGS"
45636          CFLAGS="$CFLAGS -Wextra -Werror"
45637          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45638 /* end confdefs.h.  */
45639 int f (void)
45640                 {
45641                   typedef struct { int a; int b; } s_t;
45642                   s_t s1 = { 0, };
45643                   return s1.b;
45644                 }
45645
45646 int
45647 main (void)
45648 {
45649
45650   ;
45651   return 0;
45652 }
45653 _ACEOF
45654 if ac_fn_c_try_compile "$LINENO"
45655 then :
45656   gl_cv_cc_nomfi_needed=no
45657 else $as_nop
45658   gl_cv_cc_nomfi_needed=yes
45659 fi
45660 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45661          CFLAGS="$gl_save_CFLAGS"
45662
45663 fi
45664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
45665 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
45666     fi
45667
45668                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
45669 printf %s "checking whether -Wuninitialized is supported... " >&6; }
45670 if test ${gl_cv_cc_uninitialized_supported+y}
45671 then :
45672   printf %s "(cached) " >&6
45673 else $as_nop
45674   gl_save_CFLAGS="$CFLAGS"
45675        CFLAGS="$CFLAGS -Werror -Wuninitialized"
45676        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45677 /* end confdefs.h.  */
45678
45679 int
45680 main (void)
45681 {
45682
45683   ;
45684   return 0;
45685 }
45686 _ACEOF
45687 if ac_fn_c_try_compile "$LINENO"
45688 then :
45689   gl_cv_cc_uninitialized_supported=yes
45690 else $as_nop
45691   gl_cv_cc_uninitialized_supported=no
45692 fi
45693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45694        CFLAGS="$gl_save_CFLAGS"
45695
45696 fi
45697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
45698 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
45699
45700   fi
45701
45702   # List all gcc warning categories.
45703   # To compare this list to your installed GCC's, run this Bash command:
45704   #
45705   # comm -3 \
45706   #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
45707   #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
45708   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
45709
45710   ws=
45711   for gl_manywarn_item in -fanalyzer -fno-common \
45712     -Wall \
45713     -Warith-conversion \
45714     -Wbad-function-cast \
45715     -Wcast-align=strict \
45716     -Wdate-time \
45717     -Wdisabled-optimization \
45718     -Wdouble-promotion \
45719     -Wduplicated-branches \
45720     -Wduplicated-cond \
45721     -Wextra \
45722     -Wformat-signedness \
45723     -Winit-self \
45724     -Winline \
45725     -Winvalid-pch \
45726     -Wlogical-op \
45727     -Wmissing-declarations \
45728     -Wmissing-include-dirs \
45729     -Wmissing-prototypes \
45730     -Wnested-externs \
45731     -Wnull-dereference \
45732     -Wold-style-definition \
45733     -Wopenmp-simd \
45734     -Woverlength-strings \
45735     -Wpacked \
45736     -Wpointer-arith \
45737     -Wshadow \
45738     -Wstack-protector \
45739     -Wstrict-overflow \
45740     -Wstrict-prototypes \
45741     -Wsuggest-attribute=cold \
45742     -Wsuggest-attribute=const \
45743     -Wsuggest-attribute=format \
45744     -Wsuggest-attribute=malloc \
45745     -Wsuggest-attribute=noreturn \
45746     -Wsuggest-attribute=pure \
45747     -Wsuggest-final-methods \
45748     -Wsuggest-final-types \
45749     -Wsync-nand \
45750     -Wsystem-headers \
45751     -Wtrampolines \
45752     -Wuninitialized \
45753     -Wunknown-pragmas \
45754     -Wunsafe-loop-optimizations \
45755     -Wunused-macros \
45756     -Wvariadic-macros \
45757     -Wvector-operation-performance \
45758     -Wvla \
45759     -Wwrite-strings \
45760     \
45761     ; do
45762     as_fn_append ws " $gl_manywarn_item"
45763   done
45764
45765   # gcc --help=warnings outputs an unusual form for these options; list
45766   # them here so that the above 'comm' command doesn't report a false match.
45767   as_fn_append ws ' -Warray-bounds=2'
45768   as_fn_append ws ' -Wattribute-alias=2'
45769   as_fn_append ws ' -Wformat-overflow=2'
45770   as_fn_append ws ' -Wformat=2'
45771   as_fn_append ws ' -Wformat-truncation=2'
45772   as_fn_append ws ' -Wimplicit-fallthrough=5'
45773   as_fn_append ws ' -Wshift-overflow=2'
45774   as_fn_append ws ' -Wunused-const-variable=2'
45775   as_fn_append ws ' -Wvla-larger-than=4031'
45776
45777   # These are needed for older GCC versions.
45778   if test -n "$GCC"; then
45779     case `($CC --version) 2>/dev/null` in
45780       'gcc (GCC) '[0-3].* | \
45781       'gcc (GCC) '4.[0-7].*)
45782         as_fn_append ws ' -fdiagnostics-show-option'
45783         as_fn_append ws ' -funit-at-a-time'
45784           ;;
45785     esac
45786   fi
45787
45788   # Disable specific options as needed.
45789   if test "$gl_cv_cc_nomfi_needed" = yes; then
45790     as_fn_append ws ' -Wno-missing-field-initializers'
45791   fi
45792
45793   if test "$gl_cv_cc_uninitialized_supported" = no; then
45794     as_fn_append ws ' -Wno-uninitialized'
45795   fi
45796
45797   # Some warnings have too many false alarms in GCC 10.1.
45798   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
45799   as_fn_append ws ' -Wno-analyzer-double-free'
45800   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
45801   as_fn_append ws ' -Wno-analyzer-malloc-leak'
45802   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
45803   as_fn_append ws ' -Wno-analyzer-null-dereference'
45804   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
45805   as_fn_append ws ' -Wno-analyzer-use-after-free'
45806
45807   ac_ext=c
45808 ac_cpp='$CPP $CPPFLAGS'
45809 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45810 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45811 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45812
45813
45814
45815   gl_warn_set=
45816   set x $ws; shift
45817   for gl_warn_item
45818   do
45819     case " $nw " in
45820       *" $gl_warn_item "*)
45821         ;;
45822       *)
45823         as_fn_append gl_warn_set " $gl_warn_item"
45824         ;;
45825     esac
45826   done
45827   ws=$gl_warn_set
45828
45829   for w in $ws; do
45830
45831
45832 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
45833 gl_positive="$w"
45834 case $gl_positive in
45835   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
45836 esac
45837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
45838 printf %s "checking whether C compiler handles $w... " >&6; }
45839 if eval test \${$as_gl_Warn+y}
45840 then :
45841   printf %s "(cached) " >&6
45842 else $as_nop
45843
45844   gl_save_compiler_FLAGS="$CFLAGS"
45845   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
45846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45847 /* end confdefs.h.  */
45848
45849 int
45850 main (void)
45851 {
45852
45853   ;
45854   return 0;
45855 }
45856 _ACEOF
45857 if ac_fn_c_try_link "$LINENO"
45858 then :
45859   eval "$as_gl_Warn=yes"
45860 else $as_nop
45861   eval "$as_gl_Warn=no"
45862 fi
45863 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45864     conftest$ac_exeext conftest.$ac_ext
45865   CFLAGS="$gl_save_compiler_FLAGS"
45866
45867 fi
45868 eval ac_res=\$$as_gl_Warn
45869                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45870 printf "%s\n" "$ac_res" >&6; }
45871 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
45872 then :
45873   as_fn_append WARN_CFLAGS " $w"
45874 fi
45875
45876
45877   done
45878
45879
45880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
45881 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
45882 if test ${gl_cv_warn_c__Wno_sign_compare+y}
45883 then :
45884   printf %s "(cached) " >&6
45885 else $as_nop
45886
45887   gl_save_compiler_FLAGS="$CFLAGS"
45888   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
45889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45890 /* end confdefs.h.  */
45891
45892 int
45893 main (void)
45894 {
45895
45896   ;
45897   return 0;
45898 }
45899 _ACEOF
45900 if ac_fn_c_try_link "$LINENO"
45901 then :
45902   gl_cv_warn_c__Wno_sign_compare=yes
45903 else $as_nop
45904   gl_cv_warn_c__Wno_sign_compare=no
45905 fi
45906 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45907     conftest$ac_exeext conftest.$ac_ext
45908   CFLAGS="$gl_save_compiler_FLAGS"
45909
45910 fi
45911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
45912 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
45913 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
45914 then :
45915   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
45916 fi
45917
45918      # Too many warnings for now
45919
45920
45921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
45922 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
45923 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
45924 then :
45925   printf %s "(cached) " >&6
45926 else $as_nop
45927
45928   gl_save_compiler_FLAGS="$CFLAGS"
45929   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
45930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45931 /* end confdefs.h.  */
45932
45933 int
45934 main (void)
45935 {
45936
45937   ;
45938   return 0;
45939 }
45940 _ACEOF
45941 if ac_fn_c_try_link "$LINENO"
45942 then :
45943   gl_cv_warn_c__Wno_unused_parameter=yes
45944 else $as_nop
45945   gl_cv_warn_c__Wno_unused_parameter=no
45946 fi
45947 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45948     conftest$ac_exeext conftest.$ac_ext
45949   CFLAGS="$gl_save_compiler_FLAGS"
45950
45951 fi
45952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
45953 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
45954 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
45955 then :
45956   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
45957 fi
45958
45959  # Too many warnings for now
45960
45961
45962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
45963 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
45964 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
45965 then :
45966   printf %s "(cached) " >&6
45967 else $as_nop
45968
45969   gl_save_compiler_FLAGS="$CFLAGS"
45970   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
45971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45972 /* end confdefs.h.  */
45973
45974 int
45975 main (void)
45976 {
45977
45978   ;
45979   return 0;
45980 }
45981 _ACEOF
45982 if ac_fn_c_try_link "$LINENO"
45983 then :
45984   gl_cv_warn_c__Wno_format_nonliteral=yes
45985 else $as_nop
45986   gl_cv_warn_c__Wno_format_nonliteral=no
45987 fi
45988 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45989     conftest$ac_exeext conftest.$ac_ext
45990   CFLAGS="$gl_save_compiler_FLAGS"
45991
45992 fi
45993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
45994 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
45995 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
45996 then :
45997   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
45998 fi
45999
46000
46001
46002
46003
46004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
46005 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
46006 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
46007 then :
46008   printf %s "(cached) " >&6
46009 else $as_nop
46010
46011   gl_save_compiler_FLAGS="$CFLAGS"
46012   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
46013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46014 /* end confdefs.h.  */
46015
46016 int
46017 main (void)
46018 {
46019
46020   ;
46021   return 0;
46022 }
46023 _ACEOF
46024 if ac_fn_c_try_link "$LINENO"
46025 then :
46026   gl_cv_warn_c__fdiagnostics_show_option=yes
46027 else $as_nop
46028   gl_cv_warn_c__fdiagnostics_show_option=no
46029 fi
46030 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46031     conftest$ac_exeext conftest.$ac_ext
46032   CFLAGS="$gl_save_compiler_FLAGS"
46033
46034 fi
46035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
46036 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
46037 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
46038 then :
46039   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
46040 fi
46041
46042
46043
46044
46045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
46046 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
46047 if test ${gl_cv_warn_c__funit_at_a_time+y}
46048 then :
46049   printf %s "(cached) " >&6
46050 else $as_nop
46051
46052   gl_save_compiler_FLAGS="$CFLAGS"
46053   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
46054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46055 /* end confdefs.h.  */
46056
46057 int
46058 main (void)
46059 {
46060
46061   ;
46062   return 0;
46063 }
46064 _ACEOF
46065 if ac_fn_c_try_link "$LINENO"
46066 then :
46067   gl_cv_warn_c__funit_at_a_time=yes
46068 else $as_nop
46069   gl_cv_warn_c__funit_at_a_time=no
46070 fi
46071 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46072     conftest$ac_exeext conftest.$ac_ext
46073   CFLAGS="$gl_save_compiler_FLAGS"
46074
46075 fi
46076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
46077 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
46078 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
46079 then :
46080   as_fn_append WARN_CFLAGS " -funit-at-a-time"
46081 fi
46082
46083
46084
46085
46086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
46087 printf %s "checking whether C compiler handles -fno-common... " >&6; }
46088 if test ${gl_cv_warn_c__fno_common+y}
46089 then :
46090   printf %s "(cached) " >&6
46091 else $as_nop
46092
46093   gl_save_compiler_FLAGS="$CFLAGS"
46094   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
46095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46096 /* end confdefs.h.  */
46097
46098 int
46099 main (void)
46100 {
46101
46102   ;
46103   return 0;
46104 }
46105 _ACEOF
46106 if ac_fn_c_try_link "$LINENO"
46107 then :
46108   gl_cv_warn_c__fno_common=yes
46109 else $as_nop
46110   gl_cv_warn_c__fno_common=no
46111 fi
46112 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46113     conftest$ac_exeext conftest.$ac_ext
46114   CFLAGS="$gl_save_compiler_FLAGS"
46115
46116 fi
46117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
46118 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
46119 if test "x$gl_cv_warn_c__fno_common" = xyes
46120 then :
46121   as_fn_append WARN_CFLAGS " -fno-common"
46122 fi
46123
46124
46125
46126
46127
46128
46129 printf "%s\n" "#define lint 1" >>confdefs.h
46130
46131
46132 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
46133
46134
46135 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
46136
46137
46138   # We use a slightly smaller set of warning options for lib/.
46139   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
46140   nw=
46141   nw="$nw -Wunused-macros"
46142   nw="$nw -Wsuggest-attribute=pure"
46143   nw="$nw -Wduplicated-branches"    # Too many false alarms
46144
46145   # Avoid false alarm in lib/vasnprintf.c.
46146   # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html
46147
46148
46149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-analyzer-null-argument" >&5
46150 printf %s "checking whether C compiler handles -Wno-analyzer-null-argument... " >&6; }
46151 if test ${gl_cv_warn_c__Wno_analyzer_null_argument+y}
46152 then :
46153   printf %s "(cached) " >&6
46154 else $as_nop
46155
46156   gl_save_compiler_FLAGS="$CFLAGS"
46157   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wanalyzer-null-argument"
46158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46159 /* end confdefs.h.  */
46160
46161 int
46162 main (void)
46163 {
46164
46165   ;
46166   return 0;
46167 }
46168 _ACEOF
46169 if ac_fn_c_try_link "$LINENO"
46170 then :
46171   gl_cv_warn_c__Wno_analyzer_null_argument=yes
46172 else $as_nop
46173   gl_cv_warn_c__Wno_analyzer_null_argument=no
46174 fi
46175 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46176     conftest$ac_exeext conftest.$ac_ext
46177   CFLAGS="$gl_save_compiler_FLAGS"
46178
46179 fi
46180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_analyzer_null_argument" >&5
46181 printf "%s\n" "$gl_cv_warn_c__Wno_analyzer_null_argument" >&6; }
46182 if test "x$gl_cv_warn_c__Wno_analyzer_null_argument" = xyes
46183 then :
46184   as_fn_append WARN_CFLAGS " -Wno-analyzer-null-argument"
46185 fi
46186
46187
46188
46189
46190   gl_warn_set=
46191   set x $WARN_CFLAGS; shift
46192   for gl_warn_item
46193   do
46194     case " $nw " in
46195       *" $gl_warn_item "*)
46196         ;;
46197       *)
46198         as_fn_append gl_warn_set " $gl_warn_item"
46199         ;;
46200     esac
46201   done
46202   GNULIB_WARN_CFLAGS=$gl_warn_set
46203
46204
46205 fi
46206
46207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
46208 printf %s "checking for inline... " >&6; }
46209 if test ${ac_cv_c_inline+y}
46210 then :
46211   printf %s "(cached) " >&6
46212 else $as_nop
46213   ac_cv_c_inline=no
46214 for ac_kw in inline __inline__ __inline; do
46215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46216 /* end confdefs.h.  */
46217 #ifndef __cplusplus
46218 typedef int foo_t;
46219 static $ac_kw foo_t static_foo (void) {return 0; }
46220 $ac_kw foo_t foo (void) {return 0; }
46221 #endif
46222
46223 _ACEOF
46224 if ac_fn_c_try_compile "$LINENO"
46225 then :
46226   ac_cv_c_inline=$ac_kw
46227 fi
46228 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46229   test "$ac_cv_c_inline" != no && break
46230 done
46231
46232 fi
46233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
46234 printf "%s\n" "$ac_cv_c_inline" >&6; }
46235
46236 case $ac_cv_c_inline in
46237   inline | yes) ;;
46238   *)
46239     case $ac_cv_c_inline in
46240       no) ac_val=;;
46241       *) ac_val=$ac_cv_c_inline;;
46242     esac
46243     cat >>confdefs.h <<_ACEOF
46244 #ifndef __cplusplus
46245 #define inline $ac_val
46246 #endif
46247 _ACEOF
46248     ;;
46249 esac
46250
46251
46252
46253 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
46254
46255
46256 # Extract the first word of "pr", so it can be a program name with args.
46257 set dummy pr; ac_word=$2
46258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46259 printf %s "checking for $ac_word... " >&6; }
46260 if test ${ac_cv_path_PR_PROGRAM+y}
46261 then :
46262   printf %s "(cached) " >&6
46263 else $as_nop
46264   case $PR_PROGRAM in
46265   [\\/]* | ?:[\\/]*)
46266   ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
46267   ;;
46268   *)
46269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46270 for as_dir in $PATH
46271 do
46272   IFS=$as_save_IFS
46273   case $as_dir in #(((
46274     '') as_dir=./ ;;
46275     */) ;;
46276     *) as_dir=$as_dir/ ;;
46277   esac
46278     for ac_exec_ext in '' $ac_executable_extensions; do
46279   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46280     ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
46281     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46282     break 2
46283   fi
46284 done
46285   done
46286 IFS=$as_save_IFS
46287
46288   test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
46289   ;;
46290 esac
46291 fi
46292 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
46293 if test -n "$PR_PROGRAM"; then
46294   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
46295 printf "%s\n" "$PR_PROGRAM" >&6; }
46296 else
46297   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46298 printf "%s\n" "no" >&6; }
46299 fi
46300
46301
46302
46303 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
46304
46305
46306 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
46307 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
46308 then :
46309
46310 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
46311
46312
46313 fi
46314
46315 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
46316 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
46317 then :
46318
46319 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
46320
46321
46322 fi
46323
46324 ac_header_dirent=no
46325 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
46326   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
46327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
46328 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
46329 if eval test \${$as_ac_Header+y}
46330 then :
46331   printf %s "(cached) " >&6
46332 else $as_nop
46333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46334 /* end confdefs.h.  */
46335 #include <sys/types.h>
46336 #include <$ac_hdr>
46337
46338 int
46339 main (void)
46340 {
46341 if ((DIR *) 0)
46342 return 0;
46343   ;
46344   return 0;
46345 }
46346 _ACEOF
46347 if ac_fn_c_try_compile "$LINENO"
46348 then :
46349   eval "$as_ac_Header=yes"
46350 else $as_nop
46351   eval "$as_ac_Header=no"
46352 fi
46353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46354 fi
46355 eval ac_res=\$$as_ac_Header
46356                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46357 printf "%s\n" "$ac_res" >&6; }
46358 if eval test \"x\$"$as_ac_Header"\" = x"yes"
46359 then :
46360   cat >>confdefs.h <<_ACEOF
46361 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
46362 _ACEOF
46363
46364 ac_header_dirent=$ac_hdr; break
46365 fi
46366
46367 done
46368 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
46369 if test $ac_header_dirent = dirent.h; then
46370   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
46371 printf %s "checking for library containing opendir... " >&6; }
46372 if test ${ac_cv_search_opendir+y}
46373 then :
46374   printf %s "(cached) " >&6
46375 else $as_nop
46376   ac_func_search_save_LIBS=$LIBS
46377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46378 /* end confdefs.h.  */
46379
46380 /* Override any GCC internal prototype to avoid an error.
46381    Use char because int might match the return type of a GCC
46382    builtin and then its argument prototype would still apply.  */
46383 char opendir ();
46384 int
46385 main (void)
46386 {
46387 return opendir ();
46388   ;
46389   return 0;
46390 }
46391 _ACEOF
46392 for ac_lib in '' dir
46393 do
46394   if test -z "$ac_lib"; then
46395     ac_res="none required"
46396   else
46397     ac_res=-l$ac_lib
46398     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
46399   fi
46400   if ac_fn_c_try_link "$LINENO"
46401 then :
46402   ac_cv_search_opendir=$ac_res
46403 fi
46404 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46405     conftest$ac_exeext
46406   if test ${ac_cv_search_opendir+y}
46407 then :
46408   break
46409 fi
46410 done
46411 if test ${ac_cv_search_opendir+y}
46412 then :
46413
46414 else $as_nop
46415   ac_cv_search_opendir=no
46416 fi
46417 rm conftest.$ac_ext
46418 LIBS=$ac_func_search_save_LIBS
46419 fi
46420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
46421 printf "%s\n" "$ac_cv_search_opendir" >&6; }
46422 ac_res=$ac_cv_search_opendir
46423 if test "$ac_res" != no
46424 then :
46425   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
46426
46427 fi
46428
46429 else
46430   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
46431 printf %s "checking for library containing opendir... " >&6; }
46432 if test ${ac_cv_search_opendir+y}
46433 then :
46434   printf %s "(cached) " >&6
46435 else $as_nop
46436   ac_func_search_save_LIBS=$LIBS
46437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46438 /* end confdefs.h.  */
46439
46440 /* Override any GCC internal prototype to avoid an error.
46441    Use char because int might match the return type of a GCC
46442    builtin and then its argument prototype would still apply.  */
46443 char opendir ();
46444 int
46445 main (void)
46446 {
46447 return opendir ();
46448   ;
46449   return 0;
46450 }
46451 _ACEOF
46452 for ac_lib in '' x
46453 do
46454   if test -z "$ac_lib"; then
46455     ac_res="none required"
46456   else
46457     ac_res=-l$ac_lib
46458     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
46459   fi
46460   if ac_fn_c_try_link "$LINENO"
46461 then :
46462   ac_cv_search_opendir=$ac_res
46463 fi
46464 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46465     conftest$ac_exeext
46466   if test ${ac_cv_search_opendir+y}
46467 then :
46468   break
46469 fi
46470 done
46471 if test ${ac_cv_search_opendir+y}
46472 then :
46473
46474 else $as_nop
46475   ac_cv_search_opendir=no
46476 fi
46477 rm conftest.$ac_ext
46478 LIBS=$ac_func_search_save_LIBS
46479 fi
46480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
46481 printf "%s\n" "$ac_cv_search_opendir" >&6; }
46482 ac_res=$ac_cv_search_opendir
46483 if test "$ac_res" != no
46484 then :
46485   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
46486
46487 fi
46488
46489 fi
46490
46491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
46492 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
46493 if test ${ac_cv_header_sys_wait_h+y}
46494 then :
46495   printf %s "(cached) " >&6
46496 else $as_nop
46497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46498 /* end confdefs.h.  */
46499 #include <sys/types.h>
46500 #include <sys/wait.h>
46501 #ifndef WEXITSTATUS
46502 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
46503 #endif
46504 #ifndef WIFEXITED
46505 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
46506 #endif
46507
46508 int
46509 main (void)
46510 {
46511   int s;
46512   wait (&s);
46513   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
46514   ;
46515   return 0;
46516 }
46517 _ACEOF
46518 if ac_fn_c_try_compile "$LINENO"
46519 then :
46520   ac_cv_header_sys_wait_h=yes
46521 else $as_nop
46522   ac_cv_header_sys_wait_h=no
46523 fi
46524 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46525 fi
46526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
46527 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
46528 if test $ac_cv_header_sys_wait_h = yes; then
46529
46530 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
46531
46532 fi
46533
46534
46535   ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
46536 "
46537 if test "x$ac_cv_type_pid_t" = xyes
46538 then :
46539
46540 else $as_nop
46541                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46542 /* end confdefs.h.  */
46543
46544           #if defined _WIN64 && !defined __CYGWIN__
46545           LLP64
46546           #endif
46547
46548 int
46549 main (void)
46550 {
46551
46552   ;
46553   return 0;
46554 }
46555
46556 _ACEOF
46557 if ac_fn_c_try_compile "$LINENO"
46558 then :
46559   ac_pid_type='int'
46560 else $as_nop
46561   ac_pid_type='__int64'
46562 fi
46563 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46564
46565 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
46566
46567
46568 fi
46569
46570
46571
46572
46573
46574
46575
46576 if test $ac_cv_func_sigprocmask = no; then
46577   ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
46578 if test "x$ac_cv_func_sigblock" = xyes
46579 then :
46580   printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
46581
46582 fi
46583
46584 fi
46585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
46586 printf %s "checking whether closedir returns void... " >&6; }
46587 if test ${ac_cv_func_closedir_void+y}
46588 then :
46589   printf %s "(cached) " >&6
46590 else $as_nop
46591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46592 /* end confdefs.h.  */
46593
46594 #include <$ac_header_dirent>
46595
46596 int
46597 main (void)
46598 {
46599
46600   return closedir(0);
46601
46602   ;
46603   return 0;
46604 }
46605 _ACEOF
46606 if ac_fn_c_try_compile "$LINENO"
46607 then :
46608   ac_cv_func_closedir_void=no
46609 else $as_nop
46610   ac_cv_func_closedir_void=yes
46611 fi
46612 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46613 fi
46614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
46615 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
46616 if test $ac_cv_func_closedir_void = yes; then
46617
46618 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
46619
46620 fi
46621
46622
46623
46624
46625
46626
46627 if test "x$ac_cv_func_fork" = xyes; then
46628   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
46629 printf %s "checking for working fork... " >&6; }
46630 if test ${ac_cv_func_fork_works+y}
46631 then :
46632   printf %s "(cached) " >&6
46633 else $as_nop
46634   if test "$cross_compiling" = yes
46635 then :
46636   ac_cv_func_fork_works=cross
46637 else $as_nop
46638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46639 /* end confdefs.h.  */
46640 $ac_includes_default
46641 int
46642 main (void)
46643 {
46644
46645           /* By Ruediger Kuhlmann. */
46646           return fork () < 0;
46647
46648   ;
46649   return 0;
46650 }
46651 _ACEOF
46652 if ac_fn_c_try_run "$LINENO"
46653 then :
46654   ac_cv_func_fork_works=yes
46655 else $as_nop
46656   ac_cv_func_fork_works=no
46657 fi
46658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46659   conftest.$ac_objext conftest.beam conftest.$ac_ext
46660 fi
46661
46662 fi
46663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
46664 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
46665
46666 else
46667   ac_cv_func_fork_works=$ac_cv_func_fork
46668 fi
46669 if test "x$ac_cv_func_fork_works" = xcross; then
46670   case $host in
46671     *-*-amigaos* | *-*-msdosdjgpp*)
46672       # Override, as these systems have only a dummy fork() stub
46673       ac_cv_func_fork_works=no
46674       ;;
46675     *)
46676       ac_cv_func_fork_works=yes
46677       ;;
46678   esac
46679   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
46680 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
46681 fi
46682 ac_cv_func_vfork_works=$ac_cv_func_vfork
46683 if test "x$ac_cv_func_vfork" = xyes; then
46684   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
46685 printf %s "checking for working vfork... " >&6; }
46686 if test ${ac_cv_func_vfork_works+y}
46687 then :
46688   printf %s "(cached) " >&6
46689 else $as_nop
46690   if test "$cross_compiling" = yes
46691 then :
46692   ac_cv_func_vfork_works=cross
46693 else $as_nop
46694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46695 /* end confdefs.h.  */
46696 /* Thanks to Paul Eggert for this test.  */
46697 $ac_includes_default
46698 #include <signal.h>
46699 #include <sys/wait.h>
46700 #ifdef HAVE_VFORK_H
46701 # include <vfork.h>
46702 #endif
46703
46704 static void
46705 do_nothing (int sig)
46706 {
46707   (void) sig;
46708 }
46709
46710 /* On some sparc systems, changes by the child to local and incoming
46711    argument registers are propagated back to the parent.  The compiler
46712    is told about this with #include <vfork.h>, but some compilers
46713    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
46714    static variable whose address is put into a register that is
46715    clobbered by the vfork.  */
46716 static void
46717 sparc_address_test (int arg)
46718 {
46719   static pid_t child;
46720   if (!child) {
46721     child = vfork ();
46722     if (child < 0) {
46723       perror ("vfork");
46724       _exit(2);
46725     }
46726     if (!child) {
46727       arg = getpid();
46728       write(-1, "", 0);
46729       _exit (arg);
46730     }
46731   }
46732 }
46733
46734 int
46735 main (void)
46736 {
46737   pid_t parent = getpid ();
46738   pid_t child;
46739
46740   sparc_address_test (0);
46741
46742   /* On Solaris 2.4, changes by the child to the signal handler
46743      also munge signal handlers in the parent.  To detect this,
46744      start by putting the parent's handler in a known state.  */
46745   signal (SIGTERM, SIG_DFL);
46746
46747   child = vfork ();
46748
46749   if (child == 0) {
46750     /* Here is another test for sparc vfork register problems.  This
46751        test uses lots of local variables, at least as many local
46752        variables as main has allocated so far including compiler
46753        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
46754        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
46755        reuse the register of parent for one of the local variables,
46756        since it will think that parent can't possibly be used any more
46757        in this routine.  Assigning to the local variable will thus
46758        munge parent in the parent process.  */
46759     pid_t
46760       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
46761       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
46762     /* Convince the compiler that p..p7 are live; otherwise, it might
46763        use the same hardware register for all 8 local variables.  */
46764     if (p != p1 || p != p2 || p != p3 || p != p4
46765         || p != p5 || p != p6 || p != p7)
46766       _exit(1);
46767
46768     /* Alter the child's signal handler.  */
46769     if (signal (SIGTERM, do_nothing) != SIG_DFL)
46770       _exit(1);
46771
46772     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
46773        from child file descriptors.  If the child closes a descriptor
46774        before it execs or exits, this munges the parent's descriptor
46775        as well.  Test for this by closing stdout in the child.  */
46776     _exit(close(fileno(stdout)) != 0);
46777   } else {
46778     int status;
46779     struct stat st;
46780
46781     while (wait(&status) != child)
46782       ;
46783     return (
46784          /* Was there some problem with vforking?  */
46785          child < 0
46786
46787          /* Did the child munge the parent's signal handler?  */
46788          || signal (SIGTERM, SIG_DFL) != SIG_DFL
46789
46790          /* Did the child fail?  (This shouldn't happen.)  */
46791          || status
46792
46793          /* Did the vfork/compiler bug occur?  */
46794          || parent != getpid()
46795
46796          /* Did the file descriptor bug occur?  */
46797          || fstat(fileno(stdout), &st) != 0
46798          );
46799   }
46800 }
46801 _ACEOF
46802 if ac_fn_c_try_run "$LINENO"
46803 then :
46804   ac_cv_func_vfork_works=yes
46805 else $as_nop
46806   ac_cv_func_vfork_works=no
46807 fi
46808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46809   conftest.$ac_objext conftest.beam conftest.$ac_ext
46810 fi
46811
46812 fi
46813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
46814 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
46815
46816 fi;
46817 if test "x$ac_cv_func_fork_works" = xcross; then
46818   ac_cv_func_vfork_works=$ac_cv_func_vfork
46819   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
46820 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
46821 fi
46822
46823 if test "x$ac_cv_func_vfork_works" = xyes; then
46824
46825 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
46826
46827 else
46828
46829 printf "%s\n" "#define vfork fork" >>confdefs.h
46830
46831 fi
46832 if test "x$ac_cv_func_fork_works" = xyes; then
46833
46834 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
46835
46836 fi
46837
46838
46839 # When .tarball-version exists, we're building from a tarball
46840 # and must not make man/*.1 files depend on the generated src/version.c,
46841 # because that would induce a requirement to run the help2man perl script.
46842 # We are not yet prepared to make perl a build-from-tarball requirement.
46843 # Hence, here we detect .tarball-version existence.  When not present,
46844 # we define a variable to be used in man/Makefile.am to induce the
46845 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
46846 # but not when built from a tarball.
46847
46848 test -f $srcdir/.tarball-version \
46849   && SRC_VERSION_C= \
46850   || SRC_VERSION_C=../src/version.c
46851
46852
46853   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
46854 printf %s "checking whether NLS is requested... " >&6; }
46855     # Check whether --enable-nls was given.
46856 if test ${enable_nls+y}
46857 then :
46858   enableval=$enable_nls; USE_NLS=$enableval
46859 else $as_nop
46860   USE_NLS=yes
46861 fi
46862
46863   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
46864 printf "%s\n" "$USE_NLS" >&6; }
46865
46866
46867
46868
46869       GETTEXT_MACRO_VERSION=0.19
46870
46871
46872
46873
46874 # Prepare PATH_SEPARATOR.
46875 # The user is always right.
46876 if test "${PATH_SEPARATOR+set}" != set; then
46877   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
46878   # contains only /bin. Note that ksh looks also at the FPATH variable,
46879   # so we have to set that as well for the test.
46880   PATH_SEPARATOR=:
46881   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
46882     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
46883            || PATH_SEPARATOR=';'
46884        }
46885 fi
46886
46887 # Find out how to test for executable files. Don't use a zero-byte file,
46888 # as systems may use methods other than mode bits to determine executability.
46889 cat >conf$$.file <<_ASEOF
46890 #! /bin/sh
46891 exit 0
46892 _ASEOF
46893 chmod +x conf$$.file
46894 if test -x conf$$.file >/dev/null 2>&1; then
46895   ac_executable_p="test -x"
46896 else
46897   ac_executable_p="test -f"
46898 fi
46899 rm -f conf$$.file
46900
46901 # Extract the first word of "msgfmt", so it can be a program name with args.
46902 set dummy msgfmt; ac_word=$2
46903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46904 printf %s "checking for $ac_word... " >&6; }
46905 if test ${ac_cv_path_MSGFMT+y}
46906 then :
46907   printf %s "(cached) " >&6
46908 else $as_nop
46909   case "$MSGFMT" in
46910   [\\/]* | ?:[\\/]*)
46911     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
46912     ;;
46913   *)
46914     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
46915     for ac_dir in $PATH; do
46916       IFS="$ac_save_IFS"
46917       test -z "$ac_dir" && ac_dir=.
46918       for ac_exec_ext in '' $ac_executable_extensions; do
46919         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
46920           echo "$as_me: trying $ac_dir/$ac_word..." >&5
46921           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
46922      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
46923             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
46924             break 2
46925           fi
46926         fi
46927       done
46928     done
46929     IFS="$ac_save_IFS"
46930   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
46931     ;;
46932 esac
46933 fi
46934 MSGFMT="$ac_cv_path_MSGFMT"
46935 if test "$MSGFMT" != ":"; then
46936   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
46937 printf "%s\n" "$MSGFMT" >&6; }
46938 else
46939   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46940 printf "%s\n" "no" >&6; }
46941 fi
46942
46943   # Extract the first word of "gmsgfmt", so it can be a program name with args.
46944 set dummy gmsgfmt; ac_word=$2
46945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46946 printf %s "checking for $ac_word... " >&6; }
46947 if test ${ac_cv_path_GMSGFMT+y}
46948 then :
46949   printf %s "(cached) " >&6
46950 else $as_nop
46951   case $GMSGFMT in
46952   [\\/]* | ?:[\\/]*)
46953   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
46954   ;;
46955   *)
46956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46957 for as_dir in $PATH
46958 do
46959   IFS=$as_save_IFS
46960   case $as_dir in #(((
46961     '') as_dir=./ ;;
46962     */) ;;
46963     *) as_dir=$as_dir/ ;;
46964   esac
46965     for ac_exec_ext in '' $ac_executable_extensions; do
46966   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46967     ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
46968     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46969     break 2
46970   fi
46971 done
46972   done
46973 IFS=$as_save_IFS
46974
46975   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
46976   ;;
46977 esac
46978 fi
46979 GMSGFMT=$ac_cv_path_GMSGFMT
46980 if test -n "$GMSGFMT"; then
46981   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
46982 printf "%s\n" "$GMSGFMT" >&6; }
46983 else
46984   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46985 printf "%s\n" "no" >&6; }
46986 fi
46987
46988
46989
46990     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
46991     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
46992     *) MSGFMT_015=$MSGFMT ;;
46993   esac
46994
46995   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
46996     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
46997     *) GMSGFMT_015=$GMSGFMT ;;
46998   esac
46999
47000
47001
47002 # Prepare PATH_SEPARATOR.
47003 # The user is always right.
47004 if test "${PATH_SEPARATOR+set}" != set; then
47005   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47006   # contains only /bin. Note that ksh looks also at the FPATH variable,
47007   # so we have to set that as well for the test.
47008   PATH_SEPARATOR=:
47009   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47010     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47011            || PATH_SEPARATOR=';'
47012        }
47013 fi
47014
47015 # Find out how to test for executable files. Don't use a zero-byte file,
47016 # as systems may use methods other than mode bits to determine executability.
47017 cat >conf$$.file <<_ASEOF
47018 #! /bin/sh
47019 exit 0
47020 _ASEOF
47021 chmod +x conf$$.file
47022 if test -x conf$$.file >/dev/null 2>&1; then
47023   ac_executable_p="test -x"
47024 else
47025   ac_executable_p="test -f"
47026 fi
47027 rm -f conf$$.file
47028
47029 # Extract the first word of "xgettext", so it can be a program name with args.
47030 set dummy xgettext; ac_word=$2
47031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47032 printf %s "checking for $ac_word... " >&6; }
47033 if test ${ac_cv_path_XGETTEXT+y}
47034 then :
47035   printf %s "(cached) " >&6
47036 else $as_nop
47037   case "$XGETTEXT" in
47038   [\\/]* | ?:[\\/]*)
47039     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
47040     ;;
47041   *)
47042     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47043     for ac_dir in $PATH; do
47044       IFS="$ac_save_IFS"
47045       test -z "$ac_dir" && ac_dir=.
47046       for ac_exec_ext in '' $ac_executable_extensions; do
47047         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47048           echo "$as_me: trying $ac_dir/$ac_word..." >&5
47049           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
47050      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
47051             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
47052             break 2
47053           fi
47054         fi
47055       done
47056     done
47057     IFS="$ac_save_IFS"
47058   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
47059     ;;
47060 esac
47061 fi
47062 XGETTEXT="$ac_cv_path_XGETTEXT"
47063 if test "$XGETTEXT" != ":"; then
47064   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
47065 printf "%s\n" "$XGETTEXT" >&6; }
47066 else
47067   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47068 printf "%s\n" "no" >&6; }
47069 fi
47070
47071     rm -f messages.po
47072
47073     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47074     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
47075     *) XGETTEXT_015=$XGETTEXT ;;
47076   esac
47077
47078
47079
47080 # Prepare PATH_SEPARATOR.
47081 # The user is always right.
47082 if test "${PATH_SEPARATOR+set}" != set; then
47083   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47084   # contains only /bin. Note that ksh looks also at the FPATH variable,
47085   # so we have to set that as well for the test.
47086   PATH_SEPARATOR=:
47087   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47088     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47089            || PATH_SEPARATOR=';'
47090        }
47091 fi
47092
47093 # Find out how to test for executable files. Don't use a zero-byte file,
47094 # as systems may use methods other than mode bits to determine executability.
47095 cat >conf$$.file <<_ASEOF
47096 #! /bin/sh
47097 exit 0
47098 _ASEOF
47099 chmod +x conf$$.file
47100 if test -x conf$$.file >/dev/null 2>&1; then
47101   ac_executable_p="test -x"
47102 else
47103   ac_executable_p="test -f"
47104 fi
47105 rm -f conf$$.file
47106
47107 # Extract the first word of "msgmerge", so it can be a program name with args.
47108 set dummy msgmerge; ac_word=$2
47109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47110 printf %s "checking for $ac_word... " >&6; }
47111 if test ${ac_cv_path_MSGMERGE+y}
47112 then :
47113   printf %s "(cached) " >&6
47114 else $as_nop
47115   case "$MSGMERGE" in
47116   [\\/]* | ?:[\\/]*)
47117     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
47118     ;;
47119   *)
47120     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47121     for ac_dir in $PATH; do
47122       IFS="$ac_save_IFS"
47123       test -z "$ac_dir" && ac_dir=.
47124       for ac_exec_ext in '' $ac_executable_extensions; do
47125         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47126           echo "$as_me: trying $ac_dir/$ac_word..." >&5
47127           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
47128             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
47129             break 2
47130           fi
47131         fi
47132       done
47133     done
47134     IFS="$ac_save_IFS"
47135   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
47136     ;;
47137 esac
47138 fi
47139 MSGMERGE="$ac_cv_path_MSGMERGE"
47140 if test "$MSGMERGE" != ":"; then
47141   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
47142 printf "%s\n" "$MSGMERGE" >&6; }
47143 else
47144   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47145 printf "%s\n" "no" >&6; }
47146 fi
47147
47148
47149         test -n "$localedir" || localedir='${datadir}/locale'
47150
47151
47152     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
47153
47154
47155   ac_config_commands="$ac_config_commands po-directories"
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
47183 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
47184 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
47185 then :
47186   printf %s "(cached) " >&6
47187 else $as_nop
47188   gt_save_LIBS="$LIBS"
47189      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
47190      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47191 /* end confdefs.h.  */
47192 #include <CoreFoundation/CFPreferences.h>
47193 int
47194 main (void)
47195 {
47196 CFPreferencesCopyAppValue(NULL, NULL)
47197   ;
47198   return 0;
47199 }
47200 _ACEOF
47201 if ac_fn_c_try_link "$LINENO"
47202 then :
47203   gt_cv_func_CFPreferencesCopyAppValue=yes
47204 else $as_nop
47205   gt_cv_func_CFPreferencesCopyAppValue=no
47206 fi
47207 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47208     conftest$ac_exeext conftest.$ac_ext
47209      LIBS="$gt_save_LIBS"
47210 fi
47211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
47212 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
47213   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
47214
47215 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
47216
47217   fi
47218     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
47219 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
47220 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
47221 then :
47222   printf %s "(cached) " >&6
47223 else $as_nop
47224   gt_save_LIBS="$LIBS"
47225      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
47226      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47227 /* end confdefs.h.  */
47228 #include <CoreFoundation/CFLocale.h>
47229 int
47230 main (void)
47231 {
47232 CFLocaleCopyCurrent();
47233   ;
47234   return 0;
47235 }
47236 _ACEOF
47237 if ac_fn_c_try_link "$LINENO"
47238 then :
47239   gt_cv_func_CFLocaleCopyCurrent=yes
47240 else $as_nop
47241   gt_cv_func_CFLocaleCopyCurrent=no
47242 fi
47243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47244     conftest$ac_exeext conftest.$ac_ext
47245      LIBS="$gt_save_LIBS"
47246 fi
47247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
47248 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
47249   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47250
47251 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
47252
47253   fi
47254   INTL_MACOSX_LIBS=
47255   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47256     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
47257   fi
47258
47259
47260
47261
47262
47263
47264   LIBINTL=
47265   LTLIBINTL=
47266   POSUB=
47267
47268     case " $gt_needs " in
47269     *" need-formatstring-macros "*) gt_api_version=3 ;;
47270     *" need-ngettext "*) gt_api_version=2 ;;
47271     *) gt_api_version=1 ;;
47272   esac
47273   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
47274   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
47275
47276     if test "$USE_NLS" = "yes"; then
47277     gt_use_preinstalled_gnugettext=no
47278
47279
47280         if test $gt_api_version -ge 3; then
47281           gt_revision_test_code='
47282 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
47283 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
47284 #endif
47285 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
47286 '
47287         else
47288           gt_revision_test_code=
47289         fi
47290         if test $gt_api_version -ge 2; then
47291           gt_expression_test_code=' + * ngettext ("", "", 0)'
47292         else
47293           gt_expression_test_code=
47294         fi
47295
47296         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
47297 printf %s "checking for GNU gettext in libc... " >&6; }
47298 if eval test \${$gt_func_gnugettext_libc+y}
47299 then :
47300   printf %s "(cached) " >&6
47301 else $as_nop
47302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47303 /* end confdefs.h.  */
47304
47305 #include <libintl.h>
47306 $gt_revision_test_code
47307 extern int _nl_msg_cat_cntr;
47308 extern int *_nl_domain_bindings;
47309
47310 int
47311 main (void)
47312 {
47313
47314 bindtextdomain ("", "");
47315 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
47316
47317   ;
47318   return 0;
47319 }
47320 _ACEOF
47321 if ac_fn_c_try_link "$LINENO"
47322 then :
47323   eval "$gt_func_gnugettext_libc=yes"
47324 else $as_nop
47325   eval "$gt_func_gnugettext_libc=no"
47326 fi
47327 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47328     conftest$ac_exeext conftest.$ac_ext
47329 fi
47330 eval ac_res=\$$gt_func_gnugettext_libc
47331                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47332 printf "%s\n" "$ac_res" >&6; }
47333
47334         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
47335
47336
47337
47338
47339
47340           am_save_CPPFLAGS="$CPPFLAGS"
47341
47342   for element in $INCICONV; do
47343     haveit=
47344     for x in $CPPFLAGS; do
47345
47346   acl_save_prefix="$prefix"
47347   prefix="$acl_final_prefix"
47348   acl_save_exec_prefix="$exec_prefix"
47349   exec_prefix="$acl_final_exec_prefix"
47350   eval x=\"$x\"
47351   exec_prefix="$acl_save_exec_prefix"
47352   prefix="$acl_save_prefix"
47353
47354       if test "X$x" = "X$element"; then
47355         haveit=yes
47356         break
47357       fi
47358     done
47359     if test -z "$haveit"; then
47360       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
47361     fi
47362   done
47363
47364
47365   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
47366 printf %s "checking for iconv... " >&6; }
47367 if test ${am_cv_func_iconv+y}
47368 then :
47369   printf %s "(cached) " >&6
47370 else $as_nop
47371
47372     am_cv_func_iconv="no, consider installing GNU libiconv"
47373     am_cv_lib_iconv=no
47374     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47375 /* end confdefs.h.  */
47376
47377 #include <stdlib.h>
47378 #include <iconv.h>
47379
47380 int
47381 main (void)
47382 {
47383 iconv_t cd = iconv_open("","");
47384            iconv(cd,NULL,NULL,NULL,NULL);
47385            iconv_close(cd);
47386   ;
47387   return 0;
47388 }
47389 _ACEOF
47390 if ac_fn_c_try_link "$LINENO"
47391 then :
47392   am_cv_func_iconv=yes
47393 fi
47394 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47395     conftest$ac_exeext conftest.$ac_ext
47396     if test "$am_cv_func_iconv" != yes; then
47397       am_save_LIBS="$LIBS"
47398       LIBS="$LIBS $LIBICONV"
47399       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47400 /* end confdefs.h.  */
47401
47402 #include <stdlib.h>
47403 #include <iconv.h>
47404
47405 int
47406 main (void)
47407 {
47408 iconv_t cd = iconv_open("","");
47409              iconv(cd,NULL,NULL,NULL,NULL);
47410              iconv_close(cd);
47411   ;
47412   return 0;
47413 }
47414 _ACEOF
47415 if ac_fn_c_try_link "$LINENO"
47416 then :
47417   am_cv_lib_iconv=yes
47418         am_cv_func_iconv=yes
47419 fi
47420 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47421     conftest$ac_exeext conftest.$ac_ext
47422       LIBS="$am_save_LIBS"
47423     fi
47424
47425 fi
47426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
47427 printf "%s\n" "$am_cv_func_iconv" >&6; }
47428   if test "$am_cv_func_iconv" = yes; then
47429     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
47430 printf %s "checking for working iconv... " >&6; }
47431 if test ${am_cv_func_iconv_works+y}
47432 then :
47433   printf %s "(cached) " >&6
47434 else $as_nop
47435
47436                   am_save_LIBS="$LIBS"
47437       if test $am_cv_lib_iconv = yes; then
47438         LIBS="$LIBS $LIBICONV"
47439       fi
47440       am_cv_func_iconv_works=no
47441       for ac_iconv_const in '' 'const'; do
47442         if test "$cross_compiling" = yes
47443 then :
47444   case "$host_os" in
47445              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
47446              *)            am_cv_func_iconv_works="guessing yes" ;;
47447            esac
47448 else $as_nop
47449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47450 /* end confdefs.h.  */
47451
47452 #include <iconv.h>
47453 #include <string.h>
47454
47455 #ifndef ICONV_CONST
47456 # define ICONV_CONST $ac_iconv_const
47457 #endif
47458
47459 int
47460 main (void)
47461 {
47462 int result = 0;
47463   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
47464      successful returns.  This is even documented in
47465      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
47466   {
47467     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
47468     if (cd_utf8_to_88591 != (iconv_t)(-1))
47469       {
47470         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
47471         char buf[10];
47472         ICONV_CONST char *inptr = input;
47473         size_t inbytesleft = strlen (input);
47474         char *outptr = buf;
47475         size_t outbytesleft = sizeof (buf);
47476         size_t res = iconv (cd_utf8_to_88591,
47477                             &inptr, &inbytesleft,
47478                             &outptr, &outbytesleft);
47479         if (res == 0)
47480           result |= 1;
47481         iconv_close (cd_utf8_to_88591);
47482       }
47483   }
47484   /* Test against Solaris 10 bug: Failures are not distinguishable from
47485      successful returns.  */
47486   {
47487     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
47488     if (cd_ascii_to_88591 != (iconv_t)(-1))
47489       {
47490         static ICONV_CONST char input[] = "\263";
47491         char buf[10];
47492         ICONV_CONST char *inptr = input;
47493         size_t inbytesleft = strlen (input);
47494         char *outptr = buf;
47495         size_t outbytesleft = sizeof (buf);
47496         size_t res = iconv (cd_ascii_to_88591,
47497                             &inptr, &inbytesleft,
47498                             &outptr, &outbytesleft);
47499         if (res == 0)
47500           result |= 2;
47501         iconv_close (cd_ascii_to_88591);
47502       }
47503   }
47504   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
47505   {
47506     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
47507     if (cd_88591_to_utf8 != (iconv_t)(-1))
47508       {
47509         static ICONV_CONST char input[] = "\304";
47510         static char buf[2] = { (char)0xDE, (char)0xAD };
47511         ICONV_CONST char *inptr = input;
47512         size_t inbytesleft = 1;
47513         char *outptr = buf;
47514         size_t outbytesleft = 1;
47515         size_t res = iconv (cd_88591_to_utf8,
47516                             &inptr, &inbytesleft,
47517                             &outptr, &outbytesleft);
47518         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
47519           result |= 4;
47520         iconv_close (cd_88591_to_utf8);
47521       }
47522   }
47523 #if 0 /* This bug could be worked around by the caller.  */
47524   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
47525   {
47526     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
47527     if (cd_88591_to_utf8 != (iconv_t)(-1))
47528       {
47529         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
47530         char buf[50];
47531         ICONV_CONST char *inptr = input;
47532         size_t inbytesleft = strlen (input);
47533         char *outptr = buf;
47534         size_t outbytesleft = sizeof (buf);
47535         size_t res = iconv (cd_88591_to_utf8,
47536                             &inptr, &inbytesleft,
47537                             &outptr, &outbytesleft);
47538         if ((int)res > 0)
47539           result |= 8;
47540         iconv_close (cd_88591_to_utf8);
47541       }
47542   }
47543 #endif
47544   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
47545      provided.  */
47546   {
47547     /* Try standardized names.  */
47548     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
47549     /* Try IRIX, OSF/1 names.  */
47550     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
47551     /* Try AIX names.  */
47552     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
47553     /* Try HP-UX names.  */
47554     iconv_t cd4 = iconv_open ("utf8", "eucJP");
47555     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
47556         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
47557       result |= 16;
47558     if (cd1 != (iconv_t)(-1))
47559       iconv_close (cd1);
47560     if (cd2 != (iconv_t)(-1))
47561       iconv_close (cd2);
47562     if (cd3 != (iconv_t)(-1))
47563       iconv_close (cd3);
47564     if (cd4 != (iconv_t)(-1))
47565       iconv_close (cd4);
47566   }
47567   return result;
47568
47569   ;
47570   return 0;
47571 }
47572 _ACEOF
47573 if ac_fn_c_try_run "$LINENO"
47574 then :
47575   am_cv_func_iconv_works=yes
47576 fi
47577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47578   conftest.$ac_objext conftest.beam conftest.$ac_ext
47579 fi
47580
47581         test "$am_cv_func_iconv_works" = no || break
47582       done
47583       LIBS="$am_save_LIBS"
47584
47585 fi
47586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
47587 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
47588     case "$am_cv_func_iconv_works" in
47589       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
47590       *)   am_func_iconv=yes ;;
47591     esac
47592   else
47593     am_func_iconv=no am_cv_lib_iconv=no
47594   fi
47595   if test "$am_func_iconv" = yes; then
47596
47597 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
47598
47599   fi
47600   if test "$am_cv_lib_iconv" = yes; then
47601     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
47602 printf %s "checking how to link with libiconv... " >&6; }
47603     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
47604 printf "%s\n" "$LIBICONV" >&6; }
47605   else
47606             CPPFLAGS="$am_save_CPPFLAGS"
47607     LIBICONV=
47608     LTLIBICONV=
47609   fi
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620     use_additional=yes
47621
47622   acl_save_prefix="$prefix"
47623   prefix="$acl_final_prefix"
47624   acl_save_exec_prefix="$exec_prefix"
47625   exec_prefix="$acl_final_exec_prefix"
47626
47627     eval additional_includedir=\"$includedir\"
47628     eval additional_libdir=\"$libdir\"
47629     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
47630     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
47631
47632   exec_prefix="$acl_save_exec_prefix"
47633   prefix="$acl_save_prefix"
47634
47635
47636 # Check whether --with-libintl-prefix was given.
47637 if test ${with_libintl_prefix+y}
47638 then :
47639   withval=$with_libintl_prefix;
47640     if test "X$withval" = "Xno"; then
47641       use_additional=no
47642     else
47643       if test "X$withval" = "X"; then
47644
47645   acl_save_prefix="$prefix"
47646   prefix="$acl_final_prefix"
47647   acl_save_exec_prefix="$exec_prefix"
47648   exec_prefix="$acl_final_exec_prefix"
47649
47650           eval additional_includedir=\"$includedir\"
47651           eval additional_libdir=\"$libdir\"
47652           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
47653           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
47654
47655   exec_prefix="$acl_save_exec_prefix"
47656   prefix="$acl_save_prefix"
47657
47658       else
47659         additional_includedir="$withval/include"
47660         additional_libdir="$withval/$acl_libdirstem"
47661         additional_libdir2="$withval/$acl_libdirstem2"
47662         additional_libdir3="$withval/$acl_libdirstem3"
47663       fi
47664     fi
47665
47666 fi
47667
47668   if test "X$additional_libdir2" = "X$additional_libdir"; then
47669     additional_libdir2=
47670   fi
47671   if test "X$additional_libdir3" = "X$additional_libdir"; then
47672     additional_libdir3=
47673   fi
47674       LIBINTL=
47675   LTLIBINTL=
47676   INCINTL=
47677   LIBINTL_PREFIX=
47678       HAVE_LIBINTL=
47679   rpathdirs=
47680   ltrpathdirs=
47681   names_already_handled=
47682   names_next_round='intl '
47683   while test -n "$names_next_round"; do
47684     names_this_round="$names_next_round"
47685     names_next_round=
47686     for name in $names_this_round; do
47687       already_handled=
47688       for n in $names_already_handled; do
47689         if test "$n" = "$name"; then
47690           already_handled=yes
47691           break
47692         fi
47693       done
47694       if test -z "$already_handled"; then
47695         names_already_handled="$names_already_handled $name"
47696                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
47697         eval value=\"\$HAVE_LIB$uppername\"
47698         if test -n "$value"; then
47699           if test "$value" = yes; then
47700             eval value=\"\$LIB$uppername\"
47701             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
47702             eval value=\"\$LTLIB$uppername\"
47703             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
47704           else
47705                                     :
47706           fi
47707         else
47708                               found_dir=
47709           found_la=
47710           found_so=
47711           found_a=
47712           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
47713           if test -n "$acl_shlibext"; then
47714             shrext=".$acl_shlibext"             # typically: shrext=.so
47715           else
47716             shrext=
47717           fi
47718           if test $use_additional = yes; then
47719             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
47720               if test "X$found_dir" = "X"; then
47721                 eval dir=\$$additional_libdir_variable
47722                 if test -n "$dir"; then
47723                                                       if test -n "$acl_shlibext"; then
47724                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
47725                       found_dir="$dir"
47726                       found_so="$dir/$libname$shrext"
47727                     else
47728                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
47729                         ver=`(cd "$dir" && \
47730                               for f in "$libname$shrext".*; do echo "$f"; done \
47731                               | sed -e "s,^$libname$shrext\\\\.,," \
47732                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
47733                               | sed 1q ) 2>/dev/null`
47734                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
47735                           found_dir="$dir"
47736                           found_so="$dir/$libname$shrext.$ver"
47737                         fi
47738                       else
47739                         eval library_names=\"$acl_library_names_spec\"
47740                         for f in $library_names; do
47741                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
47742                             found_dir="$dir"
47743                             found_so="$dir/$f"
47744                             break
47745                           fi
47746                         done
47747                       fi
47748                     fi
47749                   fi
47750                                     if test "X$found_dir" = "X"; then
47751                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
47752                       found_dir="$dir"
47753                       found_a="$dir/$libname.$acl_libext"
47754                     fi
47755                   fi
47756                   if test "X$found_dir" != "X"; then
47757                     if test -f "$dir/$libname.la"; then
47758                       found_la="$dir/$libname.la"
47759                     fi
47760                   fi
47761                 fi
47762               fi
47763             done
47764           fi
47765           if test "X$found_dir" = "X"; then
47766             for x in $LDFLAGS $LTLIBINTL; do
47767
47768   acl_save_prefix="$prefix"
47769   prefix="$acl_final_prefix"
47770   acl_save_exec_prefix="$exec_prefix"
47771   exec_prefix="$acl_final_exec_prefix"
47772   eval x=\"$x\"
47773   exec_prefix="$acl_save_exec_prefix"
47774   prefix="$acl_save_prefix"
47775
47776               case "$x" in
47777                 -L*)
47778                   dir=`echo "X$x" | sed -e 's/^X-L//'`
47779                                     if test -n "$acl_shlibext"; then
47780                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
47781                       found_dir="$dir"
47782                       found_so="$dir/$libname$shrext"
47783                     else
47784                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
47785                         ver=`(cd "$dir" && \
47786                               for f in "$libname$shrext".*; do echo "$f"; done \
47787                               | sed -e "s,^$libname$shrext\\\\.,," \
47788                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
47789                               | sed 1q ) 2>/dev/null`
47790                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
47791                           found_dir="$dir"
47792                           found_so="$dir/$libname$shrext.$ver"
47793                         fi
47794                       else
47795                         eval library_names=\"$acl_library_names_spec\"
47796                         for f in $library_names; do
47797                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
47798                             found_dir="$dir"
47799                             found_so="$dir/$f"
47800                             break
47801                           fi
47802                         done
47803                       fi
47804                     fi
47805                   fi
47806                                     if test "X$found_dir" = "X"; then
47807                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
47808                       found_dir="$dir"
47809                       found_a="$dir/$libname.$acl_libext"
47810                     fi
47811                   fi
47812                   if test "X$found_dir" != "X"; then
47813                     if test -f "$dir/$libname.la"; then
47814                       found_la="$dir/$libname.la"
47815                     fi
47816                   fi
47817                   ;;
47818               esac
47819               if test "X$found_dir" != "X"; then
47820                 break
47821               fi
47822             done
47823           fi
47824           if test "X$found_dir" != "X"; then
47825                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
47826             if test "X$found_so" != "X"; then
47827                                                         if test "$enable_rpath" = no \
47828                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
47829                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
47830                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
47831                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47832               else
47833                                                                                 haveit=
47834                 for x in $ltrpathdirs; do
47835                   if test "X$x" = "X$found_dir"; then
47836                     haveit=yes
47837                     break
47838                   fi
47839                 done
47840                 if test -z "$haveit"; then
47841                   ltrpathdirs="$ltrpathdirs $found_dir"
47842                 fi
47843                                 if test "$acl_hardcode_direct" = yes; then
47844                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47845                 else
47846                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
47847                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47848                                                             haveit=
47849                     for x in $rpathdirs; do
47850                       if test "X$x" = "X$found_dir"; then
47851                         haveit=yes
47852                         break
47853                       fi
47854                     done
47855                     if test -z "$haveit"; then
47856                       rpathdirs="$rpathdirs $found_dir"
47857                     fi
47858                   else
47859                                                                                 haveit=
47860                     for x in $LDFLAGS $LIBINTL; do
47861
47862   acl_save_prefix="$prefix"
47863   prefix="$acl_final_prefix"
47864   acl_save_exec_prefix="$exec_prefix"
47865   exec_prefix="$acl_final_exec_prefix"
47866   eval x=\"$x\"
47867   exec_prefix="$acl_save_exec_prefix"
47868   prefix="$acl_save_prefix"
47869
47870                       if test "X$x" = "X-L$found_dir"; then
47871                         haveit=yes
47872                         break
47873                       fi
47874                     done
47875                     if test -z "$haveit"; then
47876                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
47877                     fi
47878                     if test "$acl_hardcode_minus_L" != no; then
47879                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47880                     else
47881                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
47882                     fi
47883                   fi
47884                 fi
47885               fi
47886             else
47887               if test "X$found_a" != "X"; then
47888                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
47889               else
47890                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
47891               fi
47892             fi
47893                         additional_includedir=
47894             case "$found_dir" in
47895               */$acl_libdirstem | */$acl_libdirstem/)
47896                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
47897                 if test "$name" = 'intl'; then
47898                   LIBINTL_PREFIX="$basedir"
47899                 fi
47900                 additional_includedir="$basedir/include"
47901                 ;;
47902               */$acl_libdirstem2 | */$acl_libdirstem2/)
47903                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
47904                 if test "$name" = 'intl'; then
47905                   LIBINTL_PREFIX="$basedir"
47906                 fi
47907                 additional_includedir="$basedir/include"
47908                 ;;
47909               */$acl_libdirstem3 | */$acl_libdirstem3/)
47910                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
47911                 if test "$name" = 'intl'; then
47912                   LIBINTL_PREFIX="$basedir"
47913                 fi
47914                 additional_includedir="$basedir/include"
47915                 ;;
47916             esac
47917             if test "X$additional_includedir" != "X"; then
47918                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
47919                 haveit=
47920                 if test "X$additional_includedir" = "X/usr/local/include"; then
47921                   if test -n "$GCC"; then
47922                     case $host_os in
47923                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
47924                     esac
47925                   fi
47926                 fi
47927                 if test -z "$haveit"; then
47928                   for x in $CPPFLAGS $INCINTL; do
47929
47930   acl_save_prefix="$prefix"
47931   prefix="$acl_final_prefix"
47932   acl_save_exec_prefix="$exec_prefix"
47933   exec_prefix="$acl_final_exec_prefix"
47934   eval x=\"$x\"
47935   exec_prefix="$acl_save_exec_prefix"
47936   prefix="$acl_save_prefix"
47937
47938                     if test "X$x" = "X-I$additional_includedir"; then
47939                       haveit=yes
47940                       break
47941                     fi
47942                   done
47943                   if test -z "$haveit"; then
47944                     if test -d "$additional_includedir"; then
47945                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
47946                     fi
47947                   fi
47948                 fi
47949               fi
47950             fi
47951                         if test -n "$found_la"; then
47952                                                         save_libdir="$libdir"
47953               case "$found_la" in
47954                 */* | *\\*) . "$found_la" ;;
47955                 *) . "./$found_la" ;;
47956               esac
47957               libdir="$save_libdir"
47958                             for dep in $dependency_libs; do
47959                 case "$dep" in
47960                   -L*)
47961                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
47962                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
47963                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
47964                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
47965                       haveit=
47966                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
47967                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
47968                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
47969                         if test -n "$GCC"; then
47970                           case $host_os in
47971                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
47972                           esac
47973                         fi
47974                       fi
47975                       if test -z "$haveit"; then
47976                         haveit=
47977                         for x in $LDFLAGS $LIBINTL; do
47978
47979   acl_save_prefix="$prefix"
47980   prefix="$acl_final_prefix"
47981   acl_save_exec_prefix="$exec_prefix"
47982   exec_prefix="$acl_final_exec_prefix"
47983   eval x=\"$x\"
47984   exec_prefix="$acl_save_exec_prefix"
47985   prefix="$acl_save_prefix"
47986
47987                           if test "X$x" = "X-L$dependency_libdir"; then
47988                             haveit=yes
47989                             break
47990                           fi
47991                         done
47992                         if test -z "$haveit"; then
47993                           if test -d "$dependency_libdir"; then
47994                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
47995                           fi
47996                         fi
47997                         haveit=
47998                         for x in $LDFLAGS $LTLIBINTL; do
47999
48000   acl_save_prefix="$prefix"
48001   prefix="$acl_final_prefix"
48002   acl_save_exec_prefix="$exec_prefix"
48003   exec_prefix="$acl_final_exec_prefix"
48004   eval x=\"$x\"
48005   exec_prefix="$acl_save_exec_prefix"
48006   prefix="$acl_save_prefix"
48007
48008                           if test "X$x" = "X-L$dependency_libdir"; then
48009                             haveit=yes
48010                             break
48011                           fi
48012                         done
48013                         if test -z "$haveit"; then
48014                           if test -d "$dependency_libdir"; then
48015                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
48016                           fi
48017                         fi
48018                       fi
48019                     fi
48020                     ;;
48021                   -R*)
48022                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
48023                     if test "$enable_rpath" != no; then
48024                                                                   haveit=
48025                       for x in $rpathdirs; do
48026                         if test "X$x" = "X$dir"; then
48027                           haveit=yes
48028                           break
48029                         fi
48030                       done
48031                       if test -z "$haveit"; then
48032                         rpathdirs="$rpathdirs $dir"
48033                       fi
48034                                                                   haveit=
48035                       for x in $ltrpathdirs; do
48036                         if test "X$x" = "X$dir"; then
48037                           haveit=yes
48038                           break
48039                         fi
48040                       done
48041                       if test -z "$haveit"; then
48042                         ltrpathdirs="$ltrpathdirs $dir"
48043                       fi
48044                     fi
48045                     ;;
48046                   -l*)
48047                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
48048                     if test "X$dep" != Xc \
48049                        || case $host_os in
48050                             linux* | gnu* | k*bsd*-gnu) false ;;
48051                             *)                          true ;;
48052                           esac; then
48053                       names_next_round="$names_next_round $dep"
48054                     fi
48055                     ;;
48056                   *.la)
48057                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
48058                     ;;
48059                   *)
48060                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
48061                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
48062                     ;;
48063                 esac
48064               done
48065             fi
48066           else
48067                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
48068             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
48069           fi
48070         fi
48071       fi
48072     done
48073   done
48074   if test "X$rpathdirs" != "X"; then
48075     if test -n "$acl_hardcode_libdir_separator"; then
48076                         alldirs=
48077       for found_dir in $rpathdirs; do
48078         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
48079       done
48080             acl_save_libdir="$libdir"
48081       libdir="$alldirs"
48082       eval flag=\"$acl_hardcode_libdir_flag_spec\"
48083       libdir="$acl_save_libdir"
48084       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
48085     else
48086             for found_dir in $rpathdirs; do
48087         acl_save_libdir="$libdir"
48088         libdir="$found_dir"
48089         eval flag=\"$acl_hardcode_libdir_flag_spec\"
48090         libdir="$acl_save_libdir"
48091         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
48092       done
48093     fi
48094   fi
48095   if test "X$ltrpathdirs" != "X"; then
48096             for found_dir in $ltrpathdirs; do
48097       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
48098     done
48099   fi
48100
48101
48102
48103
48104
48105           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
48106 printf %s "checking for GNU gettext in libintl... " >&6; }
48107 if eval test \${$gt_func_gnugettext_libintl+y}
48108 then :
48109   printf %s "(cached) " >&6
48110 else $as_nop
48111   gt_save_CPPFLAGS="$CPPFLAGS"
48112             CPPFLAGS="$CPPFLAGS $INCINTL"
48113             gt_save_LIBS="$LIBS"
48114             LIBS="$LIBS $LIBINTL"
48115                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48116 /* end confdefs.h.  */
48117
48118 #include <libintl.h>
48119 $gt_revision_test_code
48120 extern int _nl_msg_cat_cntr;
48121 extern
48122 #ifdef __cplusplus
48123 "C"
48124 #endif
48125 const char *_nl_expand_alias (const char *);
48126
48127 int
48128 main (void)
48129 {
48130
48131 bindtextdomain ("", "");
48132 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
48133
48134   ;
48135   return 0;
48136 }
48137 _ACEOF
48138 if ac_fn_c_try_link "$LINENO"
48139 then :
48140   eval "$gt_func_gnugettext_libintl=yes"
48141 else $as_nop
48142   eval "$gt_func_gnugettext_libintl=no"
48143 fi
48144 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48145     conftest$ac_exeext conftest.$ac_ext
48146                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
48147               LIBS="$LIBS $LIBICONV"
48148               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48149 /* end confdefs.h.  */
48150
48151 #include <libintl.h>
48152 $gt_revision_test_code
48153 extern int _nl_msg_cat_cntr;
48154 extern
48155 #ifdef __cplusplus
48156 "C"
48157 #endif
48158 const char *_nl_expand_alias (const char *);
48159
48160 int
48161 main (void)
48162 {
48163
48164 bindtextdomain ("", "");
48165 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
48166
48167   ;
48168   return 0;
48169 }
48170 _ACEOF
48171 if ac_fn_c_try_link "$LINENO"
48172 then :
48173   LIBINTL="$LIBINTL $LIBICONV"
48174                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
48175                  eval "$gt_func_gnugettext_libintl=yes"
48176
48177 fi
48178 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48179     conftest$ac_exeext conftest.$ac_ext
48180             fi
48181             CPPFLAGS="$gt_save_CPPFLAGS"
48182             LIBS="$gt_save_LIBS"
48183 fi
48184 eval ac_res=\$$gt_func_gnugettext_libintl
48185                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48186 printf "%s\n" "$ac_res" >&6; }
48187         fi
48188
48189                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
48190            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
48191                 && test "$PACKAGE" != gettext-runtime \
48192                 && test "$PACKAGE" != gettext-tools; }; then
48193           gt_use_preinstalled_gnugettext=yes
48194         else
48195                     LIBINTL=
48196           LTLIBINTL=
48197           INCINTL=
48198         fi
48199
48200
48201
48202     if test -n "$INTL_MACOSX_LIBS"; then
48203       if test "$gt_use_preinstalled_gnugettext" = "yes" \
48204          || test "$nls_cv_use_gnu_gettext" = "yes"; then
48205                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
48206         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
48207       fi
48208     fi
48209
48210     if test "$gt_use_preinstalled_gnugettext" = "yes" \
48211        || test "$nls_cv_use_gnu_gettext" = "yes"; then
48212
48213 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
48214
48215     else
48216       USE_NLS=no
48217     fi
48218   fi
48219
48220   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
48221 printf %s "checking whether to use NLS... " >&6; }
48222   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
48223 printf "%s\n" "$USE_NLS" >&6; }
48224   if test "$USE_NLS" = "yes"; then
48225     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
48226 printf %s "checking where the gettext function comes from... " >&6; }
48227     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
48228       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
48229         gt_source="external libintl"
48230       else
48231         gt_source="libc"
48232       fi
48233     else
48234       gt_source="included intl directory"
48235     fi
48236     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
48237 printf "%s\n" "$gt_source" >&6; }
48238   fi
48239
48240   if test "$USE_NLS" = "yes"; then
48241
48242     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
48243       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
48244         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
48245 printf %s "checking how to link with libintl... " >&6; }
48246         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
48247 printf "%s\n" "$LIBINTL" >&6; }
48248
48249   for element in $INCINTL; do
48250     haveit=
48251     for x in $CPPFLAGS; do
48252
48253   acl_save_prefix="$prefix"
48254   prefix="$acl_final_prefix"
48255   acl_save_exec_prefix="$exec_prefix"
48256   exec_prefix="$acl_final_exec_prefix"
48257   eval x=\"$x\"
48258   exec_prefix="$acl_save_exec_prefix"
48259   prefix="$acl_save_prefix"
48260
48261       if test "X$x" = "X$element"; then
48262         haveit=yes
48263         break
48264       fi
48265     done
48266     if test -z "$haveit"; then
48267       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
48268     fi
48269   done
48270
48271       fi
48272
48273
48274 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
48275
48276
48277 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
48278
48279     fi
48280
48281         POSUB=po
48282   fi
48283
48284
48285
48286     INTLLIBS="$LIBINTL"
48287
48288
48289
48290
48291
48292
48293
48294 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
48295
48296 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
48297
48298 cat >confcache <<\_ACEOF
48299 # This file is a shell script that caches the results of configure
48300 # tests run on this system so they can be shared between configure
48301 # scripts and configure runs, see configure's option --config-cache.
48302 # It is not useful on other systems.  If it contains results you don't
48303 # want to keep, you may remove or edit it.
48304 #
48305 # config.status only pays attention to the cache file if you give it
48306 # the --recheck option to rerun configure.
48307 #
48308 # `ac_cv_env_foo' variables (set or unset) will be overridden when
48309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
48310 # following values.
48311
48312 _ACEOF
48313
48314 # The following way of writing the cache mishandles newlines in values,
48315 # but we know of no workaround that is simple, portable, and efficient.
48316 # So, we kill variables containing newlines.
48317 # Ultrix sh set writes to stderr and can't be redirected directly,
48318 # and sets the high bit in the cache file unless we assign to the vars.
48319 (
48320   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48321     eval ac_val=\$$ac_var
48322     case $ac_val in #(
48323     *${as_nl}*)
48324       case $ac_var in #(
48325       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48326 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48327       esac
48328       case $ac_var in #(
48329       _ | IFS | as_nl) ;; #(
48330       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48331       *) { eval $ac_var=; unset $ac_var;} ;;
48332       esac ;;
48333     esac
48334   done
48335
48336   (set) 2>&1 |
48337     case $as_nl`(ac_space=' '; set) 2>&1` in #(
48338     *${as_nl}ac_space=\ *)
48339       # `set' does not quote correctly, so add quotes: double-quote
48340       # substitution turns \\\\ into \\, and sed turns \\ into \.
48341       sed -n \
48342         "s/'/'\\\\''/g;
48343           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48344       ;; #(
48345     *)
48346       # `set' quotes correctly as required by POSIX, so do not add quotes.
48347       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48348       ;;
48349     esac |
48350     sort
48351 ) |
48352   sed '
48353      /^ac_cv_env_/b end
48354      t clear
48355      :clear
48356      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
48357      t end
48358      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48359      :end' >>confcache
48360 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48361   if test -w "$cache_file"; then
48362     if test "x$cache_file" != "x/dev/null"; then
48363       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48364 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
48365       if test ! -f "$cache_file" || test -h "$cache_file"; then
48366         cat confcache >"$cache_file"
48367       else
48368         case $cache_file in #(
48369         */* | ?:*)
48370           mv -f confcache "$cache_file"$$ &&
48371           mv -f "$cache_file"$$ "$cache_file" ;; #(
48372         *)
48373           mv -f confcache "$cache_file" ;;
48374         esac
48375       fi
48376     fi
48377   else
48378     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48379 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
48380   fi
48381 fi
48382 rm -f confcache
48383
48384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
48385 # Let make expand exec_prefix.
48386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48387
48388 DEFS=-DHAVE_CONFIG_H
48389
48390 ac_libobjs=
48391 ac_ltlibobjs=
48392 U=
48393 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48394   # 1. Remove the extension, and $U if already installed.
48395   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48396   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
48397   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48398   #    will be set to the directory where LIBOBJS objects are built.
48399   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48400   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48401 done
48402 LIBOBJS=$ac_libobjs
48403
48404 LTLIBOBJS=$ac_ltlibobjs
48405
48406
48407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
48408 printf %s "checking that generated files are newer than configure... " >&6; }
48409    if test -n "$am_sleep_pid"; then
48410      # Hide warnings about reused PIDs.
48411      wait $am_sleep_pid 2>/dev/null
48412    fi
48413    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
48414 printf "%s\n" "done" >&6; }
48415  if test -n "$EXEEXT"; then
48416   am__EXEEXT_TRUE=
48417   am__EXEEXT_FALSE='#'
48418 else
48419   am__EXEEXT_TRUE='#'
48420   am__EXEEXT_FALSE=
48421 fi
48422
48423 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
48424   as_fn_error $? "conditional \"AMDEP\" was never defined.
48425 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48426 fi
48427 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
48428   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
48429 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48430 fi
48431 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
48432   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
48433 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48434 fi
48435 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
48436   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
48437 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48438 fi
48439 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
48440 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
48441   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
48442 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48443 fi
48444 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
48445   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
48446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48447 fi
48448 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
48449   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
48450 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48451 fi
48452 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
48453   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
48454 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48455 fi
48456 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
48457   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
48458 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48459 fi
48460 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48461   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48462 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48463 fi
48464 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48465   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48466 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48467 fi
48468 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48469   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48470 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48471 fi
48472 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
48473   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
48474 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48475 fi
48476 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
48477   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
48478 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48479 fi
48480 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
48481   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
48482 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48483 fi
48484 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
48485   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
48486 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48487 fi
48488 CONFIG_INCLUDE=lib/config.h
48489
48490 if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
48491   as_fn_error $? "conditional \"GL_GENERATE_SIGSEGV_H\" was never defined.
48492 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48493 fi
48494 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
48495   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
48496 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48497 fi
48498 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
48499   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
48500 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48501 fi
48502 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
48503   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
48504 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48505 fi
48506 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
48507   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
48508 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48509 fi
48510 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
48511   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
48512 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48513 fi
48514 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
48515   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
48516 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48517 fi
48518
48519
48520     gl_libobjs=
48521     gl_ltlibobjs=
48522     if test -n "$gl_LIBOBJS"; then
48523       # Remove the extension.
48524       sed_drop_objext='s/\.o$//;s/\.obj$//'
48525       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
48526         gl_libobjs="$gl_libobjs $i.$ac_objext"
48527         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
48528       done
48529     fi
48530     gl_LIBOBJS=$gl_libobjs
48531
48532     gl_LTLIBOBJS=$gl_ltlibobjs
48533
48534
48535
48536 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
48537   as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
48538 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48539 fi
48540
48541     gltests_libobjs=
48542     gltests_ltlibobjs=
48543     if test -n "$gltests_LIBOBJS"; then
48544       # Remove the extension.
48545       sed_drop_objext='s/\.o$//;s/\.obj$//'
48546       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
48547         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
48548         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
48549       done
48550     fi
48551     gltests_LIBOBJS=$gltests_libobjs
48552
48553     gltests_LTLIBOBJS=$gltests_ltlibobjs
48554
48555
48556
48557 : "${CONFIG_STATUS=./config.status}"
48558 ac_write_fail=0
48559 ac_clean_files_save=$ac_clean_files
48560 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48562 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
48563 as_write_fail=0
48564 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48565 #! $SHELL
48566 # Generated by $as_me.
48567 # Run this file to recreate the current configuration.
48568 # Compiler output produced by configure, useful for debugging
48569 # configure, is in config.log if it exists.
48570
48571 debug=false
48572 ac_cs_recheck=false
48573 ac_cs_silent=false
48574
48575 SHELL=\${CONFIG_SHELL-$SHELL}
48576 export SHELL
48577 _ASEOF
48578 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48579 ## -------------------- ##
48580 ## M4sh Initialization. ##
48581 ## -------------------- ##
48582
48583 # Be more Bourne compatible
48584 DUALCASE=1; export DUALCASE # for MKS sh
48585 as_nop=:
48586 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
48587 then :
48588   emulate sh
48589   NULLCMD=:
48590   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48591   # is contrary to our usage.  Disable this feature.
48592   alias -g '${1+"$@"}'='"$@"'
48593   setopt NO_GLOB_SUBST
48594 else $as_nop
48595   case `(set -o) 2>/dev/null` in #(
48596   *posix*) :
48597     set -o posix ;; #(
48598   *) :
48599      ;;
48600 esac
48601 fi
48602
48603
48604
48605 # Reset variables that may have inherited troublesome values from
48606 # the environment.
48607
48608 # IFS needs to be set, to space, tab, and newline, in precisely that order.
48609 # (If _AS_PATH_WALK were called with IFS unset, it would have the
48610 # side effect of setting IFS to empty, thus disabling word splitting.)
48611 # Quoting is to prevent editors from complaining about space-tab.
48612 as_nl='
48613 '
48614 export as_nl
48615 IFS=" ""        $as_nl"
48616
48617 PS1='$ '
48618 PS2='> '
48619 PS4='+ '
48620
48621 # Ensure predictable behavior from utilities with locale-dependent output.
48622 LC_ALL=C
48623 export LC_ALL
48624 LANGUAGE=C
48625 export LANGUAGE
48626
48627 # We cannot yet rely on "unset" to work, but we need these variables
48628 # to be unset--not just set to an empty or harmless value--now, to
48629 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
48630 # also avoids known problems related to "unset" and subshell syntax
48631 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
48632 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
48633 do eval test \${$as_var+y} \
48634   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48635 done
48636
48637 # Ensure that fds 0, 1, and 2 are open.
48638 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
48639 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
48640 if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
48641
48642 # The user is always right.
48643 if ${PATH_SEPARATOR+false} :; then
48644   PATH_SEPARATOR=:
48645   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48646     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48647       PATH_SEPARATOR=';'
48648   }
48649 fi
48650
48651
48652 # Find who we are.  Look in the path if we contain no directory separator.
48653 as_myself=
48654 case $0 in #((
48655   *[\\/]* ) as_myself=$0 ;;
48656   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48657 for as_dir in $PATH
48658 do
48659   IFS=$as_save_IFS
48660   case $as_dir in #(((
48661     '') as_dir=./ ;;
48662     */) ;;
48663     *) as_dir=$as_dir/ ;;
48664   esac
48665     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
48666   done
48667 IFS=$as_save_IFS
48668
48669      ;;
48670 esac
48671 # We did not find ourselves, most probably we were run as `sh COMMAND'
48672 # in which case we are not to be found in the path.
48673 if test "x$as_myself" = x; then
48674   as_myself=$0
48675 fi
48676 if test ! -f "$as_myself"; then
48677   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48678   exit 1
48679 fi
48680
48681
48682
48683 # as_fn_error STATUS ERROR [LINENO LOG_FD]
48684 # ----------------------------------------
48685 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48686 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48687 # script with STATUS, using 1 if that was 0.
48688 as_fn_error ()
48689 {
48690   as_status=$1; test $as_status -eq 0 && as_status=1
48691   if test "$4"; then
48692     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48693     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48694   fi
48695   printf "%s\n" "$as_me: error: $2" >&2
48696   as_fn_exit $as_status
48697 } # as_fn_error
48698
48699
48700
48701 # as_fn_set_status STATUS
48702 # -----------------------
48703 # Set $? to STATUS, without forking.
48704 as_fn_set_status ()
48705 {
48706   return $1
48707 } # as_fn_set_status
48708
48709 # as_fn_exit STATUS
48710 # -----------------
48711 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48712 as_fn_exit ()
48713 {
48714   set +e
48715   as_fn_set_status $1
48716   exit $1
48717 } # as_fn_exit
48718
48719 # as_fn_unset VAR
48720 # ---------------
48721 # Portably unset VAR.
48722 as_fn_unset ()
48723 {
48724   { eval $1=; unset $1;}
48725 }
48726 as_unset=as_fn_unset
48727
48728 # as_fn_append VAR VALUE
48729 # ----------------------
48730 # Append the text in VALUE to the end of the definition contained in VAR. Take
48731 # advantage of any shell optimizations that allow amortized linear growth over
48732 # repeated appends, instead of the typical quadratic growth present in naive
48733 # implementations.
48734 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
48735 then :
48736   eval 'as_fn_append ()
48737   {
48738     eval $1+=\$2
48739   }'
48740 else $as_nop
48741   as_fn_append ()
48742   {
48743     eval $1=\$$1\$2
48744   }
48745 fi # as_fn_append
48746
48747 # as_fn_arith ARG...
48748 # ------------------
48749 # Perform arithmetic evaluation on the ARGs, and store the result in the
48750 # global $as_val. Take advantage of shells that can avoid forks. The arguments
48751 # must be portable across $(()) and expr.
48752 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
48753 then :
48754   eval 'as_fn_arith ()
48755   {
48756     as_val=$(( $* ))
48757   }'
48758 else $as_nop
48759   as_fn_arith ()
48760   {
48761     as_val=`expr "$@" || test $? -eq 1`
48762   }
48763 fi # as_fn_arith
48764
48765
48766 if expr a : '\(a\)' >/dev/null 2>&1 &&
48767    test "X`expr 00001 : '.*\(...\)'`" = X001; then
48768   as_expr=expr
48769 else
48770   as_expr=false
48771 fi
48772
48773 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48774   as_basename=basename
48775 else
48776   as_basename=false
48777 fi
48778
48779 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48780   as_dirname=dirname
48781 else
48782   as_dirname=false
48783 fi
48784
48785 as_me=`$as_basename -- "$0" ||
48786 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48787          X"$0" : 'X\(//\)$' \| \
48788          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48789 printf "%s\n" X/"$0" |
48790     sed '/^.*\/\([^/][^/]*\)\/*$/{
48791             s//\1/
48792             q
48793           }
48794           /^X\/\(\/\/\)$/{
48795             s//\1/
48796             q
48797           }
48798           /^X\/\(\/\).*/{
48799             s//\1/
48800             q
48801           }
48802           s/.*/./; q'`
48803
48804 # Avoid depending upon Character Ranges.
48805 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48806 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48807 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48808 as_cr_digits='0123456789'
48809 as_cr_alnum=$as_cr_Letters$as_cr_digits
48810
48811
48812 # Determine whether it's possible to make 'echo' print without a newline.
48813 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
48814 # for compatibility with existing Makefiles.
48815 ECHO_C= ECHO_N= ECHO_T=
48816 case `echo -n x` in #(((((
48817 -n*)
48818   case `echo 'xy\c'` in
48819   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
48820   xy)  ECHO_C='\c';;
48821   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
48822        ECHO_T=' ';;
48823   esac;;
48824 *)
48825   ECHO_N='-n';;
48826 esac
48827
48828 # For backward compatibility with old third-party macros, we provide
48829 # the shell variables $as_echo and $as_echo_n.  New code should use
48830 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
48831 as_echo='printf %s\n'
48832 as_echo_n='printf %s'
48833
48834 rm -f conf$$ conf$$.exe conf$$.file
48835 if test -d conf$$.dir; then
48836   rm -f conf$$.dir/conf$$.file
48837 else
48838   rm -f conf$$.dir
48839   mkdir conf$$.dir 2>/dev/null
48840 fi
48841 if (echo >conf$$.file) 2>/dev/null; then
48842   if ln -s conf$$.file conf$$ 2>/dev/null; then
48843     as_ln_s='ln -s'
48844     # ... but there are two gotchas:
48845     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
48846     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
48847     # In both cases, we have to default to `cp -pR'.
48848     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
48849       as_ln_s='cp -pR'
48850   elif ln conf$$.file conf$$ 2>/dev/null; then
48851     as_ln_s=ln
48852   else
48853     as_ln_s='cp -pR'
48854   fi
48855 else
48856   as_ln_s='cp -pR'
48857 fi
48858 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
48859 rmdir conf$$.dir 2>/dev/null
48860
48861
48862 # as_fn_mkdir_p
48863 # -------------
48864 # Create "$as_dir" as a directory, including parents if necessary.
48865 as_fn_mkdir_p ()
48866 {
48867
48868   case $as_dir in #(
48869   -*) as_dir=./$as_dir;;
48870   esac
48871   test -d "$as_dir" || eval $as_mkdir_p || {
48872     as_dirs=
48873     while :; do
48874       case $as_dir in #(
48875       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
48876       *) as_qdir=$as_dir;;
48877       esac
48878       as_dirs="'$as_qdir' $as_dirs"
48879       as_dir=`$as_dirname -- "$as_dir" ||
48880 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48881          X"$as_dir" : 'X\(//\)[^/]' \| \
48882          X"$as_dir" : 'X\(//\)$' \| \
48883          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
48884 printf "%s\n" X"$as_dir" |
48885     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48886             s//\1/
48887             q
48888           }
48889           /^X\(\/\/\)[^/].*/{
48890             s//\1/
48891             q
48892           }
48893           /^X\(\/\/\)$/{
48894             s//\1/
48895             q
48896           }
48897           /^X\(\/\).*/{
48898             s//\1/
48899             q
48900           }
48901           s/.*/./; q'`
48902       test -d "$as_dir" && break
48903     done
48904     test -z "$as_dirs" || eval "mkdir $as_dirs"
48905   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
48906
48907
48908 } # as_fn_mkdir_p
48909 if mkdir -p . 2>/dev/null; then
48910   as_mkdir_p='mkdir -p "$as_dir"'
48911 else
48912   test -d ./-p && rmdir ./-p
48913   as_mkdir_p=false
48914 fi
48915
48916
48917 # as_fn_executable_p FILE
48918 # -----------------------
48919 # Test if FILE is an executable regular file.
48920 as_fn_executable_p ()
48921 {
48922   test -f "$1" && test -x "$1"
48923 } # as_fn_executable_p
48924 as_test_x='test -x'
48925 as_executable_p=as_fn_executable_p
48926
48927 # Sed expression to map a string onto a valid CPP name.
48928 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
48929
48930 # Sed expression to map a string onto a valid variable name.
48931 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
48932
48933
48934 exec 6>&1
48935 ## ----------------------------------- ##
48936 ## Main body of $CONFIG_STATUS script. ##
48937 ## ----------------------------------- ##
48938 _ASEOF
48939 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
48940
48941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48942 # Save the log message, to keep $0 and so on meaningful, and to
48943 # report actual input values of CONFIG_FILES etc. instead of their
48944 # values after options handling.
48945 ac_log="
48946 This file was extended by GNU diffutils $as_me 3.8, which was
48947 generated by GNU Autoconf 2.71.  Invocation command line was
48948
48949   CONFIG_FILES    = $CONFIG_FILES
48950   CONFIG_HEADERS  = $CONFIG_HEADERS
48951   CONFIG_LINKS    = $CONFIG_LINKS
48952   CONFIG_COMMANDS = $CONFIG_COMMANDS
48953   $ $0 $@
48954
48955 on `(hostname || uname -n) 2>/dev/null | sed 1q`
48956 "
48957
48958 _ACEOF
48959
48960 case $ac_config_files in *"
48961 "*) set x $ac_config_files; shift; ac_config_files=$*;;
48962 esac
48963
48964 case $ac_config_headers in *"
48965 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
48966 esac
48967
48968
48969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48970 # Files that config.status was made for.
48971 config_files="$ac_config_files"
48972 config_headers="$ac_config_headers"
48973 config_links="$ac_config_links"
48974 config_commands="$ac_config_commands"
48975
48976 _ACEOF
48977
48978 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48979 ac_cs_usage="\
48980 \`$as_me' instantiates files and other configuration actions
48981 from templates according to the current configuration.  Unless the files
48982 and actions are specified as TAGs, all are instantiated by default.
48983
48984 Usage: $0 [OPTION]... [TAG]...
48985
48986   -h, --help       print this help, then exit
48987   -V, --version    print version number and configuration settings, then exit
48988       --config     print configuration, then exit
48989   -q, --quiet, --silent
48990                    do not print progress messages
48991   -d, --debug      don't remove temporary files
48992       --recheck    update $as_me by reconfiguring in the same conditions
48993       --file=FILE[:TEMPLATE]
48994                    instantiate the configuration file FILE
48995       --header=FILE[:TEMPLATE]
48996                    instantiate the configuration header FILE
48997
48998 Configuration files:
48999 $config_files
49000
49001 Configuration headers:
49002 $config_headers
49003
49004 Configuration links:
49005 $config_links
49006
49007 Configuration commands:
49008 $config_commands
49009
49010 Report bugs to <bug-diffutils@gnu.org>.
49011 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
49012 General help using GNU software: <https://www.gnu.org/gethelp/>."
49013
49014 _ACEOF
49015 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
49016 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
49017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49018 ac_cs_config='$ac_cs_config_escaped'
49019 ac_cs_version="\\
49020 GNU diffutils config.status 3.8
49021 configured by $0, generated by GNU Autoconf 2.71,
49022   with options \\"\$ac_cs_config\\"
49023
49024 Copyright (C) 2021 Free Software Foundation, Inc.
49025 This config.status script is free software; the Free Software Foundation
49026 gives unlimited permission to copy, distribute and modify it."
49027
49028 ac_pwd='$ac_pwd'
49029 srcdir='$srcdir'
49030 INSTALL='$INSTALL'
49031 MKDIR_P='$MKDIR_P'
49032 AWK='$AWK'
49033 test -n "\$AWK" || AWK=awk
49034 _ACEOF
49035
49036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49037 # The default lists apply if the user does not specify any file.
49038 ac_need_defaults=:
49039 while test $# != 0
49040 do
49041   case $1 in
49042   --*=?*)
49043     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49044     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49045     ac_shift=:
49046     ;;
49047   --*=)
49048     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49049     ac_optarg=
49050     ac_shift=:
49051     ;;
49052   *)
49053     ac_option=$1
49054     ac_optarg=$2
49055     ac_shift=shift
49056     ;;
49057   esac
49058
49059   case $ac_option in
49060   # Handling of the options.
49061   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49062     ac_cs_recheck=: ;;
49063   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49064     printf "%s\n" "$ac_cs_version"; exit ;;
49065   --config | --confi | --conf | --con | --co | --c )
49066     printf "%s\n" "$ac_cs_config"; exit ;;
49067   --debug | --debu | --deb | --de | --d | -d )
49068     debug=: ;;
49069   --file | --fil | --fi | --f )
49070     $ac_shift
49071     case $ac_optarg in
49072     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49073     '') as_fn_error $? "missing file argument" ;;
49074     esac
49075     as_fn_append CONFIG_FILES " '$ac_optarg'"
49076     ac_need_defaults=false;;
49077   --header | --heade | --head | --hea )
49078     $ac_shift
49079     case $ac_optarg in
49080     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49081     esac
49082     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49083     ac_need_defaults=false;;
49084   --he | --h)
49085     # Conflict between --help and --header
49086     as_fn_error $? "ambiguous option: \`$1'
49087 Try \`$0 --help' for more information.";;
49088   --help | --hel | -h )
49089     printf "%s\n" "$ac_cs_usage"; exit ;;
49090   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49091   | -silent | --silent | --silen | --sile | --sil | --si | --s)
49092     ac_cs_silent=: ;;
49093
49094   # This is an error.
49095   -*) as_fn_error $? "unrecognized option: \`$1'
49096 Try \`$0 --help' for more information." ;;
49097
49098   *) as_fn_append ac_config_targets " $1"
49099      ac_need_defaults=false ;;
49100
49101   esac
49102   shift
49103 done
49104
49105 ac_configure_extra_args=
49106
49107 if $ac_cs_silent; then
49108   exec 6>/dev/null
49109   ac_configure_extra_args="$ac_configure_extra_args --silent"
49110 fi
49111
49112 _ACEOF
49113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49114 if \$ac_cs_recheck; then
49115   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49116   shift
49117   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
49118   CONFIG_SHELL='$SHELL'
49119   export CONFIG_SHELL
49120   exec "\$@"
49121 fi
49122
49123 _ACEOF
49124 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49125 exec 5>>config.log
49126 {
49127   echo
49128   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49129 ## Running $as_me. ##
49130 _ASBOX
49131   printf "%s\n" "$ac_log"
49132 } >&5
49133
49134 _ACEOF
49135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49136 #
49137 # INIT-COMMANDS
49138 #
49139 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
49140 GNUmakefile=$GNUmakefile
49141 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
49142     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
49143     # from automake < 1.5.
49144     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
49145     # Capture the value of LINGUAS because we need it to compute CATALOGS.
49146     LINGUAS="${LINGUAS-%UNSET%}"
49147
49148
49149 _ACEOF
49150
49151 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49152
49153 # Handling of arguments.
49154 for ac_config_target in $ac_config_targets
49155 do
49156   case $ac_config_target in
49157     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
49158     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
49159     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
49160     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
49161     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
49162     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
49163     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
49164     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
49165     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
49166     "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
49167     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
49168     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
49169
49170   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49171   esac
49172 done
49173
49174
49175 # If the user did not use the arguments to specify the items to instantiate,
49176 # then the envvar interface is used.  Set only those that are not.
49177 # We use the long form for the default assignment because of an extremely
49178 # bizarre bug on SunOS 4.1.3.
49179 if $ac_need_defaults; then
49180   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
49181   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
49182   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
49183   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
49184 fi
49185
49186 # Have a temporary directory for convenience.  Make it in the build tree
49187 # simply because there is no reason against having it here, and in addition,
49188 # creating and moving files from /tmp can sometimes cause problems.
49189 # Hook for its removal unless debugging.
49190 # Note that there is a small window in which the directory will not be cleaned:
49191 # after its creation but before its name has been assigned to `$tmp'.
49192 $debug ||
49193 {
49194   tmp= ac_tmp=
49195   trap 'exit_status=$?
49196   : "${ac_tmp:=$tmp}"
49197   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49198 ' 0
49199   trap 'as_fn_exit 1' 1 2 13 15
49200 }
49201 # Create a (secure) tmp directory for tmp files.
49202
49203 {
49204   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49205   test -d "$tmp"
49206 }  ||
49207 {
49208   tmp=./conf$$-$RANDOM
49209   (umask 077 && mkdir "$tmp")
49210 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49211 ac_tmp=$tmp
49212
49213 # Set up the scripts for CONFIG_FILES section.
49214 # No need to generate them if there are no CONFIG_FILES.
49215 # This happens for instance with `./config.status config.h'.
49216 if test -n "$CONFIG_FILES"; then
49217
49218
49219 ac_cr=`echo X | tr X '\015'`
49220 # On cygwin, bash can eat \r inside `` if the user requested igncr.
49221 # But we know of no other shell where ac_cr would be empty at this
49222 # point, so we can use a bashism as a fallback.
49223 if test "x$ac_cr" = x; then
49224   eval ac_cr=\$\'\\r\'
49225 fi
49226 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49227 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49228   ac_cs_awk_cr='\\r'
49229 else
49230   ac_cs_awk_cr=$ac_cr
49231 fi
49232
49233 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49234 _ACEOF
49235
49236
49237 {
49238   echo "cat >conf$$subs.awk <<_ACEOF" &&
49239   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49240   echo "_ACEOF"
49241 } >conf$$subs.sh ||
49242   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49243 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49244 ac_delim='%!_!# '
49245 for ac_last_try in false false false false false :; do
49246   . ./conf$$subs.sh ||
49247     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49248
49249   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49250   if test $ac_delim_n = $ac_delim_num; then
49251     break
49252   elif $ac_last_try; then
49253     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49254   else
49255     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49256   fi
49257 done
49258 rm -f conf$$subs.sh
49259
49260 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49261 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49262 _ACEOF
49263 sed -n '
49264 h
49265 s/^/S["/; s/!.*/"]=/
49266 p
49267 g
49268 s/^[^!]*!//
49269 :repl
49270 t repl
49271 s/'"$ac_delim"'$//
49272 t delim
49273 :nl
49274 h
49275 s/\(.\{148\}\)..*/\1/
49276 t more1
49277 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49278 p
49279 n
49280 b repl
49281 :more1
49282 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49283 p
49284 g
49285 s/.\{148\}//
49286 t nl
49287 :delim
49288 h
49289 s/\(.\{148\}\)..*/\1/
49290 t more2
49291 s/["\\]/\\&/g; s/^/"/; s/$/"/
49292 p
49293 b
49294 :more2
49295 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49296 p
49297 g
49298 s/.\{148\}//
49299 t delim
49300 ' <conf$$subs.awk | sed '
49301 /^[^""]/{
49302   N
49303   s/\n//
49304 }
49305 ' >>$CONFIG_STATUS || ac_write_fail=1
49306 rm -f conf$$subs.awk
49307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49308 _ACAWK
49309 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49310   for (key in S) S_is_set[key] = 1
49311   FS = "\a"
49312
49313 }
49314 {
49315   line = $ 0
49316   nfields = split(line, field, "@")
49317   substed = 0
49318   len = length(field[1])
49319   for (i = 2; i < nfields; i++) {
49320     key = field[i]
49321     keylen = length(key)
49322     if (S_is_set[key]) {
49323       value = S[key]
49324       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49325       len += length(value) + length(field[++i])
49326       substed = 1
49327     } else
49328       len += 1 + keylen
49329   }
49330
49331   print line
49332 }
49333
49334 _ACAWK
49335 _ACEOF
49336 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49337 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49338   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49339 else
49340   cat
49341 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49342   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49343 _ACEOF
49344
49345 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49346 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49347 # trailing colons and then remove the whole line if VPATH becomes empty
49348 # (actually we leave an empty line to preserve line numbers).
49349 if test "x$srcdir" = x.; then
49350   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
49351 h
49352 s///
49353 s/^/:/
49354 s/[      ]*$/:/
49355 s/:\$(srcdir):/:/g
49356 s/:\${srcdir}:/:/g
49357 s/:@srcdir@:/:/g
49358 s/^:*//
49359 s/:*$//
49360 x
49361 s/\(=[   ]*\).*/\1/
49362 G
49363 s/\n//
49364 s/^[^=]*=[       ]*$//
49365 }'
49366 fi
49367
49368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49369 fi # test -n "$CONFIG_FILES"
49370
49371 # Set up the scripts for CONFIG_HEADERS section.
49372 # No need to generate them if there are no CONFIG_HEADERS.
49373 # This happens for instance with `./config.status Makefile'.
49374 if test -n "$CONFIG_HEADERS"; then
49375 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49376 BEGIN {
49377 _ACEOF
49378
49379 # Transform confdefs.h into an awk script `defines.awk', embedded as
49380 # here-document in config.status, that substitutes the proper values into
49381 # config.h.in to produce config.h.
49382
49383 # Create a delimiter string that does not exist in confdefs.h, to ease
49384 # handling of long lines.
49385 ac_delim='%!_!# '
49386 for ac_last_try in false false :; do
49387   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49388   if test -z "$ac_tt"; then
49389     break
49390   elif $ac_last_try; then
49391     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49392   else
49393     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49394   fi
49395 done
49396
49397 # For the awk script, D is an array of macro values keyed by name,
49398 # likewise P contains macro parameters if any.  Preserve backslash
49399 # newline sequences.
49400
49401 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49402 sed -n '
49403 s/.\{148\}/&'"$ac_delim"'/g
49404 t rset
49405 :rset
49406 s/^[     ]*#[    ]*define[       ][      ]*/ /
49407 t def
49408 d
49409 :def
49410 s/\\$//
49411 t bsnl
49412 s/["\\]/\\&/g
49413 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
49414 D["\1"]=" \3"/p
49415 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
49416 d
49417 :bsnl
49418 s/["\\]/\\&/g
49419 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
49420 D["\1"]=" \3\\\\\\n"\\/p
49421 t cont
49422 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49423 t cont
49424 d
49425 :cont
49426 n
49427 s/.\{148\}/&'"$ac_delim"'/g
49428 t clear
49429 :clear
49430 s/\\$//
49431 t bsnlc
49432 s/["\\]/\\&/g; s/^/"/; s/$/"/p
49433 d
49434 :bsnlc
49435 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49436 b cont
49437 ' <confdefs.h | sed '
49438 s/'"$ac_delim"'/"\\\
49439 "/g' >>$CONFIG_STATUS || ac_write_fail=1
49440
49441 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49442   for (key in D) D_is_set[key] = 1
49443   FS = "\a"
49444 }
49445 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49446   line = \$ 0
49447   split(line, arg, " ")
49448   if (arg[1] == "#") {
49449     defundef = arg[2]
49450     mac1 = arg[3]
49451   } else {
49452     defundef = substr(arg[1], 2)
49453     mac1 = arg[2]
49454   }
49455   split(mac1, mac2, "(") #)
49456   macro = mac2[1]
49457   prefix = substr(line, 1, index(line, defundef) - 1)
49458   if (D_is_set[macro]) {
49459     # Preserve the white space surrounding the "#".
49460     print prefix "define", macro P[macro] D[macro]
49461     next
49462   } else {
49463     # Replace #undef with comments.  This is necessary, for example,
49464     # in the case of _POSIX_SOURCE, which is predefined and required
49465     # on some systems where configure will not decide to define it.
49466     if (defundef == "undef") {
49467       print "/*", prefix defundef, macro, "*/"
49468       next
49469     }
49470   }
49471 }
49472 { print }
49473 _ACAWK
49474 _ACEOF
49475 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49476   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49477 fi # test -n "$CONFIG_HEADERS"
49478
49479
49480 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
49481 shift
49482 for ac_tag
49483 do
49484   case $ac_tag in
49485   :[FHLC]) ac_mode=$ac_tag; continue;;
49486   esac
49487   case $ac_mode$ac_tag in
49488   :[FHL]*:*);;
49489   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49490   :[FH]-) ac_tag=-:-;;
49491   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49492   esac
49493   ac_save_IFS=$IFS
49494   IFS=:
49495   set x $ac_tag
49496   IFS=$ac_save_IFS
49497   shift
49498   ac_file=$1
49499   shift
49500
49501   case $ac_mode in
49502   :L) ac_source=$1;;
49503   :[FH])
49504     ac_file_inputs=
49505     for ac_f
49506     do
49507       case $ac_f in
49508       -) ac_f="$ac_tmp/stdin";;
49509       *) # Look for the file first in the build tree, then in the source tree
49510          # (if the path is not absolute).  The absolute path cannot be DOS-style,
49511          # because $ac_f cannot contain `:'.
49512          test -f "$ac_f" ||
49513            case $ac_f in
49514            [\\/$]*) false;;
49515            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49516            esac ||
49517            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49518       esac
49519       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49520       as_fn_append ac_file_inputs " '$ac_f'"
49521     done
49522
49523     # Let's still pretend it is `configure' which instantiates (i.e., don't
49524     # use $as_me), people would be surprised to read:
49525     #    /* config.h.  Generated by config.status.  */
49526     configure_input='Generated from '`
49527           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49528         `' by configure.'
49529     if test x"$ac_file" != x-; then
49530       configure_input="$ac_file.  $configure_input"
49531       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49532 printf "%s\n" "$as_me: creating $ac_file" >&6;}
49533     fi
49534     # Neutralize special characters interpreted by sed in replacement strings.
49535     case $configure_input in #(
49536     *\&* | *\|* | *\\* )
49537        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
49538        sed 's/[\\\\&|]/\\\\&/g'`;; #(
49539     *) ac_sed_conf_input=$configure_input;;
49540     esac
49541
49542     case $ac_tag in
49543     *:-:* | *:-) cat >"$ac_tmp/stdin" \
49544       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49545     esac
49546     ;;
49547   esac
49548
49549   ac_dir=`$as_dirname -- "$ac_file" ||
49550 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49551          X"$ac_file" : 'X\(//\)[^/]' \| \
49552          X"$ac_file" : 'X\(//\)$' \| \
49553          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49554 printf "%s\n" X"$ac_file" |
49555     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49556             s//\1/
49557             q
49558           }
49559           /^X\(\/\/\)[^/].*/{
49560             s//\1/
49561             q
49562           }
49563           /^X\(\/\/\)$/{
49564             s//\1/
49565             q
49566           }
49567           /^X\(\/\).*/{
49568             s//\1/
49569             q
49570           }
49571           s/.*/./; q'`
49572   as_dir="$ac_dir"; as_fn_mkdir_p
49573   ac_builddir=.
49574
49575 case "$ac_dir" in
49576 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49577 *)
49578   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
49579   # A ".." for each directory in $ac_dir_suffix.
49580   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49581   case $ac_top_builddir_sub in
49582   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49583   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49584   esac ;;
49585 esac
49586 ac_abs_top_builddir=$ac_pwd
49587 ac_abs_builddir=$ac_pwd$ac_dir_suffix
49588 # for backward compatibility:
49589 ac_top_builddir=$ac_top_build_prefix
49590
49591 case $srcdir in
49592   .)  # We are building in place.
49593     ac_srcdir=.
49594     ac_top_srcdir=$ac_top_builddir_sub
49595     ac_abs_top_srcdir=$ac_pwd ;;
49596   [\\/]* | ?:[\\/]* )  # Absolute name.
49597     ac_srcdir=$srcdir$ac_dir_suffix;
49598     ac_top_srcdir=$srcdir
49599     ac_abs_top_srcdir=$srcdir ;;
49600   *) # Relative name.
49601     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49602     ac_top_srcdir=$ac_top_build_prefix$srcdir
49603     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49604 esac
49605 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49606
49607
49608   case $ac_mode in
49609   :F)
49610   #
49611   # CONFIG_FILE
49612   #
49613
49614   case $INSTALL in
49615   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
49616   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
49617   esac
49618   ac_MKDIR_P=$MKDIR_P
49619   case $MKDIR_P in
49620   [\\/$]* | ?:[\\/]* ) ;;
49621   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
49622   esac
49623 _ACEOF
49624
49625 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49626 # If the template does not know about datarootdir, expand it.
49627 # FIXME: This hack should be removed a few years after 2.60.
49628 ac_datarootdir_hack=; ac_datarootdir_seen=
49629 ac_sed_dataroot='
49630 /datarootdir/ {
49631   p
49632   q
49633 }
49634 /@datadir@/p
49635 /@docdir@/p
49636 /@infodir@/p
49637 /@localedir@/p
49638 /@mandir@/p'
49639 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49640 *datarootdir*) ac_datarootdir_seen=yes;;
49641 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49642   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49643 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49644 _ACEOF
49645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49646   ac_datarootdir_hack='
49647   s&@datadir@&$datadir&g
49648   s&@docdir@&$docdir&g
49649   s&@infodir@&$infodir&g
49650   s&@localedir@&$localedir&g
49651   s&@mandir@&$mandir&g
49652   s&\\\${datarootdir}&$datarootdir&g' ;;
49653 esac
49654 _ACEOF
49655
49656 # Neutralize VPATH when `$srcdir' = `.'.
49657 # Shell code in configure.ac might set extrasub.
49658 # FIXME: do we really want to maintain this feature?
49659 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49660 ac_sed_extra="$ac_vpsub
49661 $extrasub
49662 _ACEOF
49663 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49664 :t
49665 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49666 s|@configure_input@|$ac_sed_conf_input|;t t
49667 s&@top_builddir@&$ac_top_builddir_sub&;t t
49668 s&@top_build_prefix@&$ac_top_build_prefix&;t t
49669 s&@srcdir@&$ac_srcdir&;t t
49670 s&@abs_srcdir@&$ac_abs_srcdir&;t t
49671 s&@top_srcdir@&$ac_top_srcdir&;t t
49672 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49673 s&@builddir@&$ac_builddir&;t t
49674 s&@abs_builddir@&$ac_abs_builddir&;t t
49675 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49676 s&@INSTALL@&$ac_INSTALL&;t t
49677 s&@MKDIR_P@&$ac_MKDIR_P&;t t
49678 $ac_datarootdir_hack
49679 "
49680 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49681   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49682
49683 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49684   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49685   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
49686       "$ac_tmp/out"`; test -z "$ac_out"; } &&
49687   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49688 which seems to be undefined.  Please make sure it is defined" >&5
49689 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49690 which seems to be undefined.  Please make sure it is defined" >&2;}
49691
49692   rm -f "$ac_tmp/stdin"
49693   case $ac_file in
49694   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49695   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49696   esac \
49697   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49698  ;;
49699   :H)
49700   #
49701   # CONFIG_HEADER
49702   #
49703   if test x"$ac_file" != x-; then
49704     {
49705       printf "%s\n" "/* $configure_input  */" >&1 \
49706       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49707     } >"$ac_tmp/config.h" \
49708       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49709     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49710       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49711 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
49712     else
49713       rm -f "$ac_file"
49714       mv "$ac_tmp/config.h" "$ac_file" \
49715         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49716     fi
49717   else
49718     printf "%s\n" "/* $configure_input  */" >&1 \
49719       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49720       || as_fn_error $? "could not create -" "$LINENO" 5
49721   fi
49722 # Compute "$ac_file"'s index in $config_headers.
49723 _am_arg="$ac_file"
49724 _am_stamp_count=1
49725 for _am_header in $config_headers :; do
49726   case $_am_header in
49727     $_am_arg | $_am_arg:* )
49728       break ;;
49729     * )
49730       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
49731   esac
49732 done
49733 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
49734 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49735          X"$_am_arg" : 'X\(//\)[^/]' \| \
49736          X"$_am_arg" : 'X\(//\)$' \| \
49737          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
49738 printf "%s\n" X"$_am_arg" |
49739     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49740             s//\1/
49741             q
49742           }
49743           /^X\(\/\/\)[^/].*/{
49744             s//\1/
49745             q
49746           }
49747           /^X\(\/\/\)$/{
49748             s//\1/
49749             q
49750           }
49751           /^X\(\/\).*/{
49752             s//\1/
49753             q
49754           }
49755           s/.*/./; q'`/stamp-h$_am_stamp_count
49756  ;;
49757   :L)
49758   #
49759   # CONFIG_LINK
49760   #
49761
49762   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
49763     :
49764   else
49765     # Prefer the file from the source tree if names are identical.
49766     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
49767       ac_source=$srcdir/$ac_source
49768     fi
49769
49770     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
49771 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
49772
49773     if test ! -r "$ac_source"; then
49774       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
49775     fi
49776     rm -f "$ac_file"
49777
49778     # Try a relative symlink, then a hard link, then a copy.
49779     case $ac_source in
49780     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
49781         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
49782     esac
49783     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
49784       ln "$ac_source" "$ac_file" 2>/dev/null ||
49785       cp -p "$ac_source" "$ac_file" ||
49786       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
49787   fi
49788  ;;
49789   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
49790 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
49791  ;;
49792   esac
49793
49794
49795   case $ac_file$ac_mode in
49796     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
49797   # Older Autoconf quotes --file arguments for eval, but not when files
49798   # are listed without --file.  Let's play safe and only enable the eval
49799   # if we detect the quoting.
49800   # TODO: see whether this extra hack can be removed once we start
49801   # requiring Autoconf 2.70 or later.
49802   case $CONFIG_FILES in #(
49803   *\'*) :
49804     eval set x "$CONFIG_FILES" ;; #(
49805   *) :
49806     set x $CONFIG_FILES ;; #(
49807   *) :
49808      ;;
49809 esac
49810   shift
49811   # Used to flag and report bootstrapping failures.
49812   am_rc=0
49813   for am_mf
49814   do
49815     # Strip MF so we end up with the name of the file.
49816     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
49817     # Check whether this is an Automake generated Makefile which includes
49818     # dependency-tracking related rules and includes.
49819     # Grep'ing the whole file directly is not great: AIX grep has a line
49820     # limit of 2048, but all sed's we know have understand at least 4000.
49821     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
49822       || continue
49823     am_dirpart=`$as_dirname -- "$am_mf" ||
49824 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49825          X"$am_mf" : 'X\(//\)[^/]' \| \
49826          X"$am_mf" : 'X\(//\)$' \| \
49827          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
49828 printf "%s\n" X"$am_mf" |
49829     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49830             s//\1/
49831             q
49832           }
49833           /^X\(\/\/\)[^/].*/{
49834             s//\1/
49835             q
49836           }
49837           /^X\(\/\/\)$/{
49838             s//\1/
49839             q
49840           }
49841           /^X\(\/\).*/{
49842             s//\1/
49843             q
49844           }
49845           s/.*/./; q'`
49846     am_filepart=`$as_basename -- "$am_mf" ||
49847 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
49848          X"$am_mf" : 'X\(//\)$' \| \
49849          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
49850 printf "%s\n" X/"$am_mf" |
49851     sed '/^.*\/\([^/][^/]*\)\/*$/{
49852             s//\1/
49853             q
49854           }
49855           /^X\/\(\/\/\)$/{
49856             s//\1/
49857             q
49858           }
49859           /^X\/\(\/\).*/{
49860             s//\1/
49861             q
49862           }
49863           s/.*/./; q'`
49864     { echo "$as_me:$LINENO: cd "$am_dirpart" \
49865       && sed -e '/# am--include-marker/d' "$am_filepart" \
49866         | $MAKE -f - am--depfiles" >&5
49867    (cd "$am_dirpart" \
49868       && sed -e '/# am--include-marker/d' "$am_filepart" \
49869         | $MAKE -f - am--depfiles) >&5 2>&5
49870    ac_status=$?
49871    echo "$as_me:$LINENO: \$? = $ac_status" >&5
49872    (exit $ac_status); } || am_rc=$?
49873   done
49874   if test $am_rc -ne 0; then
49875     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49876 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
49877 as_fn_error $? "Something went wrong bootstrapping makefile fragments
49878     for automatic dependency tracking.  If GNU make was not used, consider
49879     re-running the configure script with MAKE=\"gmake\" (or whatever is
49880     necessary).  You can also try re-running configure with the
49881     '--disable-dependency-tracking' option to at least be able to build
49882     the package (albeit without support for automatic dependency tracking).
49883 See \`config.log' for more details" "$LINENO" 5; }
49884   fi
49885   { am_dirpart=; unset am_dirpart;}
49886   { am_filepart=; unset am_filepart;}
49887   { am_mf=; unset am_mf;}
49888   { am_rc=; unset am_rc;}
49889   rm -f conftest-deps.mk
49890 }
49891  ;;
49892     "po-directories":C)
49893     for ac_file in $CONFIG_FILES; do
49894       # Support "outfile[:infile[:infile...]]"
49895       case "$ac_file" in
49896         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
49897       esac
49898       # PO directories have a Makefile.in generated from Makefile.in.in.
49899       case "$ac_file" in */Makefile.in)
49900         # Adjust a relative srcdir.
49901         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
49902         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
49903         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
49904         # In autoconf-2.13 it is called $ac_given_srcdir.
49905         # In autoconf-2.50 it is called $srcdir.
49906         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
49907         case "$ac_given_srcdir" in
49908           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
49909           /*) top_srcdir="$ac_given_srcdir" ;;
49910           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
49911         esac
49912         # Treat a directory as a PO directory if and only if it has a
49913         # POTFILES.in file. This allows packages to have multiple PO
49914         # directories under different names or in different locations.
49915         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
49916           rm -f "$ac_dir/POTFILES"
49917           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
49918           gt_tab=`printf '\t'`
49919           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
49920           POMAKEFILEDEPS="POTFILES.in"
49921           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
49922           # on $ac_dir but don't depend on user-specified configuration
49923           # parameters.
49924           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
49925             # The LINGUAS file contains the set of available languages.
49926             if test -n "$OBSOLETE_ALL_LINGUAS"; then
49927               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
49928             fi
49929             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
49930             # Hide the ALL_LINGUAS assignment from automake < 1.5.
49931             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
49932             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
49933           else
49934             # The set of available languages was given in configure.in.
49935             # Hide the ALL_LINGUAS assignment from automake < 1.5.
49936             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
49937           fi
49938           # Compute POFILES
49939           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
49940           # Compute UPDATEPOFILES
49941           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
49942           # Compute DUMMYPOFILES
49943           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
49944           # Compute GMOFILES
49945           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
49946           case "$ac_given_srcdir" in
49947             .) srcdirpre= ;;
49948             *) srcdirpre='$(srcdir)/' ;;
49949           esac
49950           POFILES=
49951           UPDATEPOFILES=
49952           DUMMYPOFILES=
49953           GMOFILES=
49954           for lang in $ALL_LINGUAS; do
49955             POFILES="$POFILES $srcdirpre$lang.po"
49956             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
49957             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
49958             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
49959           done
49960           # CATALOGS depends on both $ac_dir and the user's LINGUAS
49961           # environment variable.
49962           INST_LINGUAS=
49963           if test -n "$ALL_LINGUAS"; then
49964             for presentlang in $ALL_LINGUAS; do
49965               useit=no
49966               if test "%UNSET%" != "$LINGUAS"; then
49967                 desiredlanguages="$LINGUAS"
49968               else
49969                 desiredlanguages="$ALL_LINGUAS"
49970               fi
49971               for desiredlang in $desiredlanguages; do
49972                 # Use the presentlang catalog if desiredlang is
49973                 #   a. equal to presentlang, or
49974                 #   b. a variant of presentlang (because in this case,
49975                 #      presentlang can be used as a fallback for messages
49976                 #      which are not translated in the desiredlang catalog).
49977                 case "$desiredlang" in
49978                   "$presentlang"*) useit=yes;;
49979                 esac
49980               done
49981               if test $useit = yes; then
49982                 INST_LINGUAS="$INST_LINGUAS $presentlang"
49983               fi
49984             done
49985           fi
49986           CATALOGS=
49987           if test -n "$INST_LINGUAS"; then
49988             for lang in $INST_LINGUAS; do
49989               CATALOGS="$CATALOGS $lang.gmo"
49990             done
49991           fi
49992           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
49993           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
49994           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
49995             if test -f "$f"; then
49996               case "$f" in
49997                 *.orig | *.bak | *~) ;;
49998                 *) cat "$f" >> "$ac_dir/Makefile" ;;
49999               esac
50000             fi
50001           done
50002         fi
50003         ;;
50004       esac
50005     done ;;
50006
50007   esac
50008 done # for ac_tag
50009
50010
50011 as_fn_exit 0
50012 _ACEOF
50013 ac_clean_files=$ac_clean_files_save
50014
50015 test $ac_write_fail = 0 ||
50016   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50017
50018
50019 # configure is writing to config.log, and then calls config.status.
50020 # config.status does its own redirection, appending to config.log.
50021 # Unfortunately, on DOS this fails, as config.log is still kept open
50022 # by configure, so config.status won't be able to write to it; its
50023 # output is simply discarded.  So we exec the FD to /dev/null,
50024 # effectively closing config.log, so it can be properly (re)opened and
50025 # appended to by config.status.  When coming back to configure, we
50026 # need to make the FD available again.
50027 if test "$no_create" != yes; then
50028   ac_cs_success=:
50029   ac_config_status_args=
50030   test "$silent" = yes &&
50031     ac_config_status_args="$ac_config_status_args --quiet"
50032   exec 5>/dev/null
50033   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50034   exec 5>>config.log
50035   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50036   # would make configure fail if this is the last instruction.
50037   $ac_cs_success || as_fn_exit 1
50038 fi
50039 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50040   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50041 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50042 fi
50043
50044