Bump to m4 1.4.19
[platform/upstream/m4.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for GNU M4 1.4.19.
4 #
5 # Report bugs to <bug-m4@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 bug-m4@gnu.org
271 $0: about your system, including any error possibly output
272 $0: before this message. Then install a modern shell, or
273 $0: manually run the script under such a shell if you do
274 $0: 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 M4'
613 PACKAGE_TARNAME='m4'
614 PACKAGE_VERSION='1.4.19'
615 PACKAGE_STRING='GNU M4 1.4.19'
616 PACKAGE_BUGREPORT='bug-m4@gnu.org'
617 PACKAGE_URL='https://www.gnu.org/software/m4/'
618
619 ac_unique_file="src/m4.h"
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_getopt_required=POSIX
656 gt_needs=
657 ac_subst_vars='M4tests_LTLIBOBJS
658 M4tests_LIBOBJS
659 M4_LTLIBOBJS
660 M4_LIBOBJS
661 CONFIG_INCLUDE
662 am__EXEEXT_FALSE
663 am__EXEEXT_TRUE
664 LTLIBOBJS
665 LIBOBJS
666 POSUB
667 INTLLIBS
668 XGETTEXT_EXTRA_OPTIONS
669 MSGMERGE
670 XGETTEXT_015
671 XGETTEXT
672 GMSGFMT_015
673 MSGFMT_015
674 GMSGFMT
675 MSGFMT
676 GETTEXT_MACRO_VERSION
677 USE_NLS
678 OS2_LDFLAGS
679 LIBTESTS_LIBDEPS
680 LIBM4_LTLIBDEPS
681 LIBM4_LIBDEPS
682 YIELD_LIB
683 abs_aux_dir
684 HAVE_SYS_UIO_H
685 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
686 NEXT_SYS_UIO_H
687 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
688 NEXT_SYS_IOCTL_H
689 HAVE_SYS_IOCTL_H
690 GL_M4_GNULIB_SELECT
691 GL_M4_GNULIB_PSELECT
692 LIB_PTHREAD_SIGMASK
693 GL_M4_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
694 GL_M4_GNULIB_PTHREAD_SPIN
695 GL_M4_GNULIB_PTHREAD_TSS
696 GL_M4_GNULIB_PTHREAD_COND
697 GL_M4_GNULIB_PTHREAD_RWLOCK
698 GL_M4_GNULIB_PTHREAD_MUTEX
699 GL_M4_GNULIB_PTHREAD_ONCE
700 GL_M4_GNULIB_PTHREAD_THREAD
701 LIB_PTHREAD
702 HAVE_PTHREAD_H
703 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
704 NEXT_PTHREAD_H
705 REPLACE_PTHREAD_SPIN_DESTROY
706 REPLACE_PTHREAD_SPIN_UNLOCK
707 REPLACE_PTHREAD_SPIN_TRYLOCK
708 REPLACE_PTHREAD_SPIN_LOCK
709 REPLACE_PTHREAD_SPIN_INIT
710 REPLACE_PTHREAD_KEY_DELETE
711 REPLACE_PTHREAD_GETSPECIFIC
712 REPLACE_PTHREAD_SETSPECIFIC
713 REPLACE_PTHREAD_KEY_CREATE
714 REPLACE_PTHREAD_COND_DESTROY
715 REPLACE_PTHREAD_COND_BROADCAST
716 REPLACE_PTHREAD_COND_SIGNAL
717 REPLACE_PTHREAD_COND_TIMEDWAIT
718 REPLACE_PTHREAD_COND_WAIT
719 REPLACE_PTHREAD_CONDATTR_DESTROY
720 REPLACE_PTHREAD_CONDATTR_INIT
721 REPLACE_PTHREAD_COND_INIT
722 REPLACE_PTHREAD_RWLOCK_DESTROY
723 REPLACE_PTHREAD_RWLOCK_UNLOCK
724 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
725 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
726 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
727 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
728 REPLACE_PTHREAD_RWLOCK_WRLOCK
729 REPLACE_PTHREAD_RWLOCK_RDLOCK
730 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
731 REPLACE_PTHREAD_RWLOCKATTR_INIT
732 REPLACE_PTHREAD_RWLOCK_INIT
733 REPLACE_PTHREAD_MUTEX_DESTROY
734 REPLACE_PTHREAD_MUTEX_UNLOCK
735 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
736 REPLACE_PTHREAD_MUTEX_TRYLOCK
737 REPLACE_PTHREAD_MUTEX_LOCK
738 REPLACE_PTHREAD_MUTEXATTR_DESTROY
739 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
740 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
741 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
742 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
743 REPLACE_PTHREAD_MUTEXATTR_INIT
744 REPLACE_PTHREAD_MUTEX_INIT
745 REPLACE_PTHREAD_ONCE
746 REPLACE_PTHREAD_EXIT
747 REPLACE_PTHREAD_JOIN
748 REPLACE_PTHREAD_DETACH
749 REPLACE_PTHREAD_EQUAL
750 REPLACE_PTHREAD_SELF
751 REPLACE_PTHREAD_ATTR_DESTROY
752 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
753 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
754 REPLACE_PTHREAD_ATTR_INIT
755 REPLACE_PTHREAD_CREATE
756 HAVE_PTHREAD_SPIN_DESTROY
757 HAVE_PTHREAD_SPIN_UNLOCK
758 HAVE_PTHREAD_SPIN_TRYLOCK
759 HAVE_PTHREAD_SPIN_LOCK
760 HAVE_PTHREAD_SPIN_INIT
761 HAVE_PTHREAD_KEY_DELETE
762 HAVE_PTHREAD_GETSPECIFIC
763 HAVE_PTHREAD_SETSPECIFIC
764 HAVE_PTHREAD_KEY_CREATE
765 HAVE_PTHREAD_COND_DESTROY
766 HAVE_PTHREAD_COND_BROADCAST
767 HAVE_PTHREAD_COND_SIGNAL
768 HAVE_PTHREAD_COND_TIMEDWAIT
769 HAVE_PTHREAD_COND_WAIT
770 HAVE_PTHREAD_CONDATTR_DESTROY
771 HAVE_PTHREAD_CONDATTR_INIT
772 HAVE_PTHREAD_COND_INIT
773 HAVE_PTHREAD_RWLOCK_DESTROY
774 HAVE_PTHREAD_RWLOCK_UNLOCK
775 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
776 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
777 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
778 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
779 HAVE_PTHREAD_RWLOCK_WRLOCK
780 HAVE_PTHREAD_RWLOCK_RDLOCK
781 HAVE_PTHREAD_RWLOCKATTR_DESTROY
782 HAVE_PTHREAD_RWLOCKATTR_INIT
783 HAVE_PTHREAD_RWLOCK_INIT
784 HAVE_PTHREAD_MUTEX_DESTROY
785 HAVE_PTHREAD_MUTEX_UNLOCK
786 HAVE_PTHREAD_MUTEX_TIMEDLOCK
787 HAVE_PTHREAD_MUTEX_TRYLOCK
788 HAVE_PTHREAD_MUTEX_LOCK
789 HAVE_PTHREAD_MUTEXATTR_DESTROY
790 HAVE_PTHREAD_MUTEXATTR_SETROBUST
791 HAVE_PTHREAD_MUTEXATTR_GETROBUST
792 HAVE_PTHREAD_MUTEXATTR_SETTYPE
793 HAVE_PTHREAD_MUTEXATTR_GETTYPE
794 HAVE_PTHREAD_MUTEXATTR_INIT
795 HAVE_PTHREAD_MUTEX_INIT
796 HAVE_PTHREAD_ONCE
797 HAVE_PTHREAD_EXIT
798 HAVE_PTHREAD_JOIN
799 HAVE_PTHREAD_DETACH
800 HAVE_PTHREAD_EQUAL
801 HAVE_PTHREAD_SELF
802 HAVE_PTHREAD_ATTR_DESTROY
803 HAVE_PTHREAD_ATTR_SETDETACHSTATE
804 HAVE_PTHREAD_ATTR_GETDETACHSTATE
805 HAVE_PTHREAD_ATTR_INIT
806 HAVE_PTHREAD_CREATE
807 HAVE_PTHREAD_PROCESS_SHARED
808 HAVE_PTHREAD_MUTEX_ROBUST
809 HAVE_PTHREAD_MUTEX_RECURSIVE
810 HAVE_PTHREAD_CREATE_DETACHED
811 HAVE_PTHREAD_SPINLOCK_T
812 HAVE_PTHREAD_T
813 GL_GENERATE_NETINET_IN_H_FALSE
814 GL_GENERATE_NETINET_IN_H_TRUE
815 NETINET_IN_H
816 HAVE_NETINET_IN_H
817 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
818 NEXT_NETINET_IN_H
819 LIB_NANOSLEEP
820 LIB_SELECT
821 LIBSOCKET
822 HAVE_SYS_SELECT_H
823 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
824 NEXT_SYS_SELECT_H
825 REPLACE_SELECT
826 REPLACE_PSELECT
827 HAVE_PSELECT
828 GL_M4_GNULIB_IOCTL
829 INET_PTON_LIB
830 GL_M4_GNULIB_GETTIMEOFDAY
831 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
832 NEXT_SYS_TIME_H
833 REPLACE_STRUCT_TIMEVAL
834 REPLACE_GETTIMEOFDAY
835 HAVE_SYS_TIME_H
836 HAVE_STRUCT_TIMEVAL
837 HAVE_GETTIMEOFDAY
838 GL_M4_GNULIB_ISBLANK
839 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
840 NEXT_CTYPE_H
841 HAVE_ISBLANK
842 LOCALE_TR_UTF8
843 LIB_SEMAPHORE
844 GL_M4_GNULIB_INET_PTON
845 GL_M4_GNULIB_INET_NTOP
846 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
847 NEXT_ARPA_INET_H
848 HAVE_ARPA_INET_H
849 REPLACE_INET_PTON
850 REPLACE_INET_NTOP
851 HAVE_DECL_INET_PTON
852 HAVE_DECL_INET_NTOP
853 GL_M4_GNULIB_ACCEPT4
854 GL_M4_GNULIB_SHUTDOWN
855 GL_M4_GNULIB_SETSOCKOPT
856 GL_M4_GNULIB_SENDTO
857 GL_M4_GNULIB_RECVFROM
858 GL_M4_GNULIB_SEND
859 GL_M4_GNULIB_RECV
860 GL_M4_GNULIB_LISTEN
861 GL_M4_GNULIB_GETSOCKOPT
862 GL_M4_GNULIB_GETSOCKNAME
863 GL_M4_GNULIB_GETPEERNAME
864 GL_M4_GNULIB_BIND
865 GL_M4_GNULIB_ACCEPT
866 GL_M4_GNULIB_CONNECT
867 GL_M4_GNULIB_SOCKET
868 HAVE_WS2TCPIP_H
869 HAVE_SYS_SOCKET_H
870 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
871 NEXT_SYS_SOCKET_H
872 HAVE_ACCEPT4
873 HAVE_SA_FAMILY_T
874 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
875 HAVE_STRUCT_SOCKADDR_STORAGE
876 M4tests_WITNESS
877 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
878 NEXT_WCHAR_H
879 HAVE_FEATURES_H
880 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
881 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
882 LIBUNISTRING_UNIWIDTH_H
883 LIBUNISTRING_UNITYPES_H
884 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
885 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
886 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
887 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
888 LIBUNISTRING_UNISTR_H
889 HAVE_UNISTD_H
890 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
891 NEXT_UNISTD_H
892 GL_M4_GNULIB_MDA_TZSET
893 GL_M4_GNULIB_TZSET
894 GL_M4_GNULIB_TIME_RZ
895 GL_M4_GNULIB_TIME_R
896 GL_M4_GNULIB_TIMESPEC_GET
897 GL_M4_GNULIB_TIMEGM
898 GL_M4_GNULIB_STRPTIME
899 GL_M4_GNULIB_STRFTIME
900 GL_M4_GNULIB_NANOSLEEP
901 GL_M4_GNULIB_LOCALTIME
902 GL_M4_GNULIB_MKTIME
903 GL_M4_GNULIB_CTIME
904 TIME_H_DEFINES_TIME_UTC
905 UNISTD_H_DEFINES_STRUCT_TIMESPEC
906 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
907 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
908 TIME_H_DEFINES_STRUCT_TIMESPEC
909 NEXT_AS_FIRST_DIRECTIVE_TIME_H
910 NEXT_TIME_H
911 REPLACE_LOCALTIME
912 REPLACE_GMTIME
913 GNULIB_GETTIMEOFDAY
914 REPLACE_TZSET
915 REPLACE_TIMEGM
916 REPLACE_STRFTIME
917 REPLACE_NANOSLEEP
918 REPLACE_MKTIME
919 REPLACE_LOCALTIME_R
920 REPLACE_CTIME
921 HAVE_TIMEZONE_T
922 HAVE_TIMESPEC_GET
923 HAVE_TIMEGM
924 HAVE_STRPTIME
925 HAVE_NANOSLEEP
926 HAVE_DECL_LOCALTIME_R
927 GL_M4_GNULIB_WAITPID
928 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
929 NEXT_SYS_WAIT_H
930 HAVE_SYS_RANDOM_H
931 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
932 NEXT_SYS_RANDOM_H
933 NEXT_AS_FIRST_DIRECTIVE_STRING_H
934 NEXT_STRING_H
935 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
936 NEXT_STDLIB_H
937 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
938 NEXT_STDIO_H
939 HAVE__BOOL
940 GL_GENERATE_STDBOOL_H_FALSE
941 GL_GENERATE_STDBOOL_H_TRUE
942 STDBOOL_H
943 GL_GENERATE_STDARG_H_FALSE
944 GL_GENERATE_STDARG_H_TRUE
945 STDARG_H
946 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
947 NEXT_STDARG_H
948 GL_GENERATE_STDALIGN_H_FALSE
949 GL_GENERATE_STDALIGN_H_TRUE
950 STDALIGN_H
951 HAVE_SPAWN_H
952 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
953 NEXT_SPAWN_H
954 GL_GENERATE_SIGSEGV_H_FALSE
955 GL_GENERATE_SIGSEGV_H_TRUE
956 SIGSEGV_H
957 LIBSIGSEGV_PREFIX
958 LTLIBSIGSEGV
959 LIBSIGSEGV
960 HAVE_LIBSIGSEGV
961 ASM_SYMBOL_PREFIX
962 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
963 NEXT_SIGNAL_H
964 LIB_SETLOCALE
965 GL_M4_GNULIB_SCHED_YIELD
966 HAVE_STRUCT_SCHED_PARAM
967 HAVE_SCHED_H
968 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
969 NEXT_SCHED_H
970 REPLACE_SCHED_YIELD
971 HAVE_SCHED_YIELD
972 GL_M4_GNULIB_SIGACTION
973 GL_M4_GNULIB_SIGPROCMASK
974 GL_M4_GNULIB_SIGNAL_H_SIGPIPE
975 GL_M4_GNULIB_RAISE
976 GL_M4_GNULIB_PTHREAD_SIGMASK
977 REPLACE_RAISE
978 REPLACE_PTHREAD_SIGMASK
979 HAVE_SIGHANDLER_T
980 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
981 HAVE_STRUCT_SIGACTION_SA_SIGACTION
982 HAVE_SIGACTION
983 HAVE_SIGINFO_T
984 HAVE_SIGSET_T
985 HAVE_RAISE
986 HAVE_PTHREAD_SIGMASK
987 HAVE_POSIX_SIGNALBLOCKING
988 GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY
989 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK
990 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGMASK
991 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
992 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
993 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
994 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
995 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
996 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
997 GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP
998 GL_M4_GNULIB_POSIX_SPAWNATTR_GETPGROUP
999 GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS
1000 GL_M4_GNULIB_POSIX_SPAWNATTR_GETFLAGS
1001 GL_M4_GNULIB_POSIX_SPAWNATTR_INIT
1002 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
1003 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1004 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1005 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1006 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1007 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1008 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
1009 GL_M4_GNULIB_POSIX_SPAWNP
1010 GL_M4_GNULIB_POSIX_SPAWN
1011 LIB_POSIX_SPAWN
1012 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1013 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1014 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1015 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1016 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1017 REPLACE_POSIX_SPAWN
1018 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1019 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1020 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
1021 HAVE_POSIX_SPAWNATTR_T
1022 HAVE_POSIX_SPAWN
1023 LIB_NL_LANGINFO
1024 GL_M4_GNULIB_MDA_STRDUP
1025 GL_M4_GNULIB_MDA_MEMCCPY
1026 GL_M4_GNULIB_STRVERSCMP
1027 GL_M4_GNULIB_STRSIGNAL
1028 GL_M4_GNULIB_SIGDESCR_NP
1029 GL_M4_GNULIB_SIGABBREV_NP
1030 GL_M4_GNULIB_STRERRORNAME_NP
1031 GL_M4_GNULIB_STRERROR_R
1032 GL_M4_GNULIB_STRERROR
1033 GL_M4_GNULIB_MBSTOK_R
1034 GL_M4_GNULIB_MBSSEP
1035 GL_M4_GNULIB_MBSSPN
1036 GL_M4_GNULIB_MBSPBRK
1037 GL_M4_GNULIB_MBSCSPN
1038 GL_M4_GNULIB_MBSCASESTR
1039 GL_M4_GNULIB_MBSPCASECMP
1040 GL_M4_GNULIB_MBSNCASECMP
1041 GL_M4_GNULIB_MBSCASECMP
1042 GL_M4_GNULIB_MBSSTR
1043 GL_M4_GNULIB_MBSRCHR
1044 GL_M4_GNULIB_MBSCHR
1045 GL_M4_GNULIB_MBSNLEN
1046 GL_M4_GNULIB_MBSLEN
1047 GL_M4_GNULIB_STRTOK_R
1048 GL_M4_GNULIB_STRCASESTR
1049 GL_M4_GNULIB_STRSTR
1050 GL_M4_GNULIB_STRSEP
1051 GL_M4_GNULIB_STRPBRK
1052 GL_M4_GNULIB_STRNLEN
1053 GL_M4_GNULIB_STRNDUP
1054 GL_M4_GNULIB_STRNCAT
1055 GL_M4_GNULIB_STRDUP
1056 GL_M4_GNULIB_STRCHRNUL
1057 GL_M4_GNULIB_STPNCPY
1058 GL_M4_GNULIB_STPCPY
1059 GL_M4_GNULIB_RAWMEMCHR
1060 GL_M4_GNULIB_MEMRCHR
1061 GL_M4_GNULIB_MEMPCPY
1062 GL_M4_GNULIB_MEMMEM
1063 GL_M4_GNULIB_MEMCHR
1064 GL_M4_GNULIB_FFSLL
1065 GL_M4_GNULIB_FFSL
1066 GL_M4_GNULIB_EXPLICIT_BZERO
1067 UNDEFINE_STRTOK_R
1068 REPLACE_STRSIGNAL
1069 REPLACE_STRERRORNAME_NP
1070 REPLACE_STRERROR_R
1071 REPLACE_STRERROR
1072 REPLACE_STRTOK_R
1073 REPLACE_STRCASESTR
1074 REPLACE_STRSTR
1075 REPLACE_STRNLEN
1076 REPLACE_STRNDUP
1077 REPLACE_STRNCAT
1078 REPLACE_STRDUP
1079 REPLACE_STRCHRNUL
1080 REPLACE_STPNCPY
1081 REPLACE_MEMMEM
1082 REPLACE_MEMCHR
1083 REPLACE_FFSLL
1084 HAVE_STRVERSCMP
1085 HAVE_DECL_STRSIGNAL
1086 HAVE_SIGDESCR_NP
1087 HAVE_SIGABBREV_NP
1088 HAVE_STRERRORNAME_NP
1089 HAVE_DECL_STRERROR_R
1090 HAVE_DECL_STRTOK_R
1091 HAVE_STRCASESTR
1092 HAVE_STRSEP
1093 HAVE_STRPBRK
1094 HAVE_DECL_STRNLEN
1095 HAVE_DECL_STRNDUP
1096 HAVE_DECL_STRDUP
1097 HAVE_STRCHRNUL
1098 HAVE_STPNCPY
1099 HAVE_STPCPY
1100 HAVE_RAWMEMCHR
1101 HAVE_DECL_MEMRCHR
1102 HAVE_MEMPCPY
1103 HAVE_DECL_MEMMEM
1104 HAVE_FFSLL
1105 HAVE_FFSL
1106 HAVE_EXPLICIT_BZERO
1107 HAVE_MBSLEN
1108 HAVE_VISIBILITY
1109 CFLAG_VISIBILITY
1110 LIB_MBRTOWC
1111 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1112 NEXT_MATH_H
1113 SED
1114 LTLIBMULTITHREAD
1115 LIBMULTITHREAD
1116 LTLIBTHREAD
1117 LIBTHREAD
1118 LIBSTDTHREAD
1119 INTL_MACOSX_LIBS
1120 GL_M4_GNULIB_LOCALENAME
1121 GL_M4_GNULIB_DUPLOCALE
1122 GL_M4_GNULIB_SETLOCALE_NULL
1123 GL_M4_GNULIB_SETLOCALE
1124 GL_M4_GNULIB_LOCALECONV
1125 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1126 NEXT_LOCALE_H
1127 HAVE_XLOCALE_H
1128 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1129 NEXT_STDDEF_H
1130 GL_GENERATE_STDDEF_H_FALSE
1131 GL_GENERATE_STDDEF_H_TRUE
1132 STDDEF_H
1133 HAVE_WCHAR_T
1134 HAVE_MAX_ALIGN_T
1135 REPLACE_NULL
1136 LOCALENAME_ENHANCE_LOCALE_FUNCS
1137 REPLACE_STRUCT_LCONV
1138 REPLACE_FREELOCALE
1139 REPLACE_DUPLOCALE
1140 REPLACE_NEWLOCALE
1141 REPLACE_SETLOCALE
1142 REPLACE_LOCALECONV
1143 HAVE_FREELOCALE
1144 HAVE_DUPLOCALE
1145 HAVE_NEWLOCALE
1146 LOCALCHARSET_TESTS_ENVIRONMENT
1147 GL_M4_GNULIB_NL_LANGINFO
1148 HAVE_LANGINFO_YESEXPR
1149 HAVE_LANGINFO_ERA
1150 HAVE_LANGINFO_ALTMON
1151 HAVE_LANGINFO_T_FMT_AMPM
1152 HAVE_LANGINFO_CODESET
1153 HAVE_LANGINFO_H
1154 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1155 NEXT_LANGINFO_H
1156 REPLACE_NL_LANGINFO
1157 HAVE_NL_LANGINFO
1158 LOCALE_ZH_CN
1159 LOCALE_FR_UTF8
1160 LOCALE_JA
1161 GL_M4_GNULIB_TOWCTRANS
1162 GL_M4_GNULIB_WCTRANS
1163 GL_M4_GNULIB_ISWCTYPE
1164 GL_M4_GNULIB_WCTYPE
1165 GL_M4_GNULIB_ISWXDIGIT
1166 GL_M4_GNULIB_ISWDIGIT
1167 GL_M4_GNULIB_ISWBLANK
1168 REPLACE_TOWLOWER
1169 REPLACE_ISWCNTRL
1170 HAVE_WCTYPE_H
1171 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1172 NEXT_WCTYPE_H
1173 HAVE_CRTDEFS_H
1174 HAVE_WINT_T
1175 HAVE_ISWCNTRL
1176 REPLACE_ISWXDIGIT
1177 REPLACE_ISWDIGIT
1178 REPLACE_ISWBLANK
1179 HAVE_WCTRANS_T
1180 HAVE_WCTYPE_T
1181 HAVE_ISWBLANK
1182 GL_M4_GNULIB_STRTOUMAX
1183 GL_M4_GNULIB_STRTOIMAX
1184 GL_M4_GNULIB_IMAXDIV
1185 GL_M4_GNULIB_IMAXABS
1186 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1187 NEXT_INTTYPES_H
1188 UINT64_MAX_EQ_ULONG_MAX
1189 UINT32_MAX_LT_UINTMAX_MAX
1190 PRIPTR_PREFIX
1191 INT64_MAX_EQ_LONG_MAX
1192 INT32_MAX_LT_INTMAX_MAX
1193 REPLACE_STRTOUMAX
1194 REPLACE_STRTOIMAX
1195 HAVE_IMAXDIV_T
1196 HAVE_DECL_STRTOUMAX
1197 HAVE_DECL_STRTOIMAX
1198 HAVE_DECL_IMAXDIV
1199 HAVE_DECL_IMAXABS
1200 GL_GENERATE_STDINT_H_FALSE
1201 GL_GENERATE_STDINT_H_TRUE
1202 STDINT_H
1203 HAVE_SYS_INTTYPES_H
1204 HAVE_SYS_BITYPES_H
1205 HAVE_C99_STDINT_H
1206 WINT_T_SUFFIX
1207 WCHAR_T_SUFFIX
1208 SIG_ATOMIC_T_SUFFIX
1209 SIZE_T_SUFFIX
1210 PTRDIFF_T_SUFFIX
1211 HAVE_SIGNED_WINT_T
1212 HAVE_SIGNED_WCHAR_T
1213 HAVE_SIGNED_SIG_ATOMIC_T
1214 BITSIZEOF_WINT_T
1215 BITSIZEOF_WCHAR_T
1216 BITSIZEOF_SIG_ATOMIC_T
1217 BITSIZEOF_SIZE_T
1218 BITSIZEOF_PTRDIFF_T
1219 APPLE_UNIVERSAL_BUILD
1220 HAVE_STDINT_H
1221 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1222 NEXT_STDINT_H
1223 HAVE_SYS_TYPES_H
1224 HAVE_INTTYPES_H
1225 HAVE_WCHAR_H
1226 GNULIBHEADERS_OVERRIDE_WINT_T
1227 GL_GENERATE_LIMITS_H_FALSE
1228 GL_GENERATE_LIMITS_H_TRUE
1229 LIMITS_H
1230 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1231 NEXT_LIMITS_H
1232 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1233 NEXT_ICONV_H
1234 GL_M4_GNULIB_ICONV
1235 GL_GENERATE_ICONV_H_FALSE
1236 GL_GENERATE_ICONV_H_TRUE
1237 ICONV_H
1238 REPLACE_ICONV_UTF
1239 REPLACE_ICONV_OPEN
1240 REPLACE_ICONV
1241 ICONV_CONST
1242 LTLIBICONV
1243 LIBICONV
1244 HOST_CPU_C_ABI
1245 HOST_CPU
1246 LIB_HARD_LOCALE
1247 LIB_SETLOCALE_NULL
1248 LIB_SCHED_YIELD
1249 LIBPMULTITHREAD
1250 LIBPTHREAD
1251 LTLIBINTL
1252 LIBINTL
1253 GL_M4_GNULIB_GETRANDOM
1254 LIB_GETRANDOM
1255 REPLACE_GETRANDOM
1256 HAVE_GETRANDOM
1257 GNULIB_GL_M4_UNISTD_H_GETOPT
1258 GETOPT_CDEFS_H
1259 GETOPT_H
1260 HAVE_SYS_CDEFS_H
1261 HAVE_GETOPT_H
1262 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1263 NEXT_GETOPT_H
1264 GL_M4_GNULIB_MDA_UMASK
1265 GL_M4_GNULIB_MDA_MKDIR
1266 GL_M4_GNULIB_MDA_CHMOD
1267 GL_M4_GNULIB_OVERRIDES_STRUCT_STAT
1268 GL_M4_GNULIB_UTIMENSAT
1269 GL_M4_GNULIB_STAT
1270 GL_M4_GNULIB_MKNODAT
1271 GL_M4_GNULIB_MKNOD
1272 GL_M4_GNULIB_MKFIFOAT
1273 GL_M4_GNULIB_MKFIFO
1274 GL_M4_GNULIB_MKDIRAT
1275 GL_M4_GNULIB_MKDIR
1276 GL_M4_GNULIB_LSTAT
1277 GL_M4_GNULIB_LCHMOD
1278 GL_M4_GNULIB_GETUMASK
1279 GL_M4_GNULIB_FUTIMENS
1280 GL_M4_GNULIB_FSTATAT
1281 GL_M4_GNULIB_FSTAT
1282 GL_M4_GNULIB_FCHMODAT
1283 WINDOWS_64_BIT_ST_SIZE
1284 WINDOWS_STAT_TIMESPEC
1285 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1286 NEXT_SYS_STAT_H
1287 REPLACE_UTIMENSAT
1288 REPLACE_STAT
1289 REPLACE_MKNODAT
1290 REPLACE_MKNOD
1291 REPLACE_MKFIFOAT
1292 REPLACE_MKFIFO
1293 REPLACE_MKDIR
1294 REPLACE_LSTAT
1295 REPLACE_FUTIMENS
1296 REPLACE_FSTATAT
1297 REPLACE_FSTAT
1298 REPLACE_FCHMODAT
1299 HAVE_UTIMENSAT
1300 HAVE_MKNODAT
1301 HAVE_MKNOD
1302 HAVE_MKFIFOAT
1303 HAVE_MKFIFO
1304 HAVE_MKDIRAT
1305 HAVE_LSTAT
1306 HAVE_LCHMOD
1307 HAVE_GETUMASK
1308 HAVE_FUTIMENS
1309 HAVE_FSTATAT
1310 HAVE_FCHMODAT
1311 WINDOWS_STAT_INODES
1312 WINDOWS_64_BIT_OFF_T
1313 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1314 NEXT_SYS_TYPES_H
1315 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1316 GL_M4_GNULIB_MDA_YN
1317 GL_M4_GNULIB_MDA_Y1
1318 GL_M4_GNULIB_MDA_Y0
1319 GL_M4_GNULIB_MDA_JN
1320 GL_M4_GNULIB_MDA_J1
1321 GL_M4_GNULIB_MDA_J0
1322 GL_M4_GNULIB_TRUNCL
1323 GL_M4_GNULIB_TRUNCF
1324 GL_M4_GNULIB_TRUNC
1325 GL_M4_GNULIB_TANHF
1326 GL_M4_GNULIB_TANL
1327 GL_M4_GNULIB_TANF
1328 GL_M4_GNULIB_SQRTL
1329 GL_M4_GNULIB_SQRTF
1330 GL_M4_GNULIB_SINHF
1331 GL_M4_GNULIB_SINL
1332 GL_M4_GNULIB_SINF
1333 GL_M4_GNULIB_SIGNBIT
1334 GL_M4_GNULIB_ROUNDL
1335 GL_M4_GNULIB_ROUNDF
1336 GL_M4_GNULIB_ROUND
1337 GL_M4_GNULIB_RINTL
1338 GL_M4_GNULIB_RINTF
1339 GL_M4_GNULIB_RINT
1340 GL_M4_GNULIB_REMAINDERL
1341 GL_M4_GNULIB_REMAINDERF
1342 GL_M4_GNULIB_REMAINDER
1343 GL_M4_GNULIB_POWF
1344 GL_M4_GNULIB_MODFL
1345 GL_M4_GNULIB_MODFF
1346 GL_M4_GNULIB_MODF
1347 GL_M4_GNULIB_LOGBL
1348 GL_M4_GNULIB_LOGBF
1349 GL_M4_GNULIB_LOGB
1350 GL_M4_GNULIB_LOG2L
1351 GL_M4_GNULIB_LOG2F
1352 GL_M4_GNULIB_LOG2
1353 GL_M4_GNULIB_LOG1PL
1354 GL_M4_GNULIB_LOG1PF
1355 GL_M4_GNULIB_LOG1P
1356 GL_M4_GNULIB_LOG10L
1357 GL_M4_GNULIB_LOG10F
1358 GL_M4_GNULIB_LOG10
1359 GL_M4_GNULIB_LOGL
1360 GL_M4_GNULIB_LOGF
1361 GL_M4_GNULIB_LOG
1362 GL_M4_GNULIB_LDEXPL
1363 GL_M4_GNULIB_LDEXPF
1364 GL_M4_GNULIB_ISNANL
1365 GL_M4_GNULIB_ISNAND
1366 GL_M4_GNULIB_ISNANF
1367 GL_M4_GNULIB_ISNAN
1368 GL_M4_GNULIB_ISINF
1369 GL_M4_GNULIB_ISFINITE
1370 GL_M4_GNULIB_ILOGBL
1371 GL_M4_GNULIB_ILOGBF
1372 GL_M4_GNULIB_ILOGB
1373 GL_M4_GNULIB_HYPOTL
1374 GL_M4_GNULIB_HYPOTF
1375 GL_M4_GNULIB_HYPOT
1376 GL_M4_GNULIB_FREXPL
1377 GL_M4_GNULIB_FREXP
1378 GL_M4_GNULIB_FREXPF
1379 GL_M4_GNULIB_FMODL
1380 GL_M4_GNULIB_FMODF
1381 GL_M4_GNULIB_FMOD
1382 GL_M4_GNULIB_FMAL
1383 GL_M4_GNULIB_FMAF
1384 GL_M4_GNULIB_FMA
1385 GL_M4_GNULIB_FLOORL
1386 GL_M4_GNULIB_FLOORF
1387 GL_M4_GNULIB_FLOOR
1388 GL_M4_GNULIB_FABSL
1389 GL_M4_GNULIB_FABSF
1390 GL_M4_GNULIB_EXPM1L
1391 GL_M4_GNULIB_EXPM1F
1392 GL_M4_GNULIB_EXPM1
1393 GL_M4_GNULIB_EXP2L
1394 GL_M4_GNULIB_EXP2F
1395 GL_M4_GNULIB_EXP2
1396 GL_M4_GNULIB_EXPL
1397 GL_M4_GNULIB_EXPF
1398 GL_M4_GNULIB_COSHF
1399 GL_M4_GNULIB_COSL
1400 GL_M4_GNULIB_COSF
1401 GL_M4_GNULIB_COPYSIGNL
1402 GL_M4_GNULIB_COPYSIGNF
1403 GL_M4_GNULIB_COPYSIGN
1404 GL_M4_GNULIB_CEILL
1405 GL_M4_GNULIB_CEILF
1406 GL_M4_GNULIB_CEIL
1407 GL_M4_GNULIB_CBRTL
1408 GL_M4_GNULIB_CBRTF
1409 GL_M4_GNULIB_CBRT
1410 GL_M4_GNULIB_ATAN2F
1411 GL_M4_GNULIB_ATANL
1412 GL_M4_GNULIB_ATANF
1413 GL_M4_GNULIB_ASINL
1414 GL_M4_GNULIB_ASINF
1415 GL_M4_GNULIB_ACOSL
1416 GL_M4_GNULIB_ACOSF
1417 REPLACE_TRUNCL
1418 REPLACE_TRUNCF
1419 REPLACE_TRUNC
1420 REPLACE_TANHF
1421 REPLACE_TANF
1422 REPLACE_SQRTL
1423 REPLACE_SQRTF
1424 REPLACE_SINHF
1425 REPLACE_SINF
1426 REPLACE_SIGNBIT_USING_BUILTINS
1427 REPLACE_SIGNBIT
1428 REPLACE_ROUNDL
1429 REPLACE_ROUNDF
1430 REPLACE_ROUND
1431 REPLACE_RINTL
1432 REPLACE_REMAINDERL
1433 REPLACE_REMAINDERF
1434 REPLACE_REMAINDER
1435 REPLACE_NAN
1436 REPLACE_MODFL
1437 REPLACE_MODFF
1438 REPLACE_MODF
1439 REPLACE_LOGBL
1440 REPLACE_LOGBF
1441 REPLACE_LOGB
1442 REPLACE_LOG2L
1443 REPLACE_LOG2F
1444 REPLACE_LOG2
1445 REPLACE_LOG1PL
1446 REPLACE_LOG1PF
1447 REPLACE_LOG1P
1448 REPLACE_LOG10L
1449 REPLACE_LOG10F
1450 REPLACE_LOG10
1451 REPLACE_LOGL
1452 REPLACE_LOGF
1453 REPLACE_LOG
1454 REPLACE_LDEXPL
1455 REPLACE_ISNAN
1456 REPLACE_ISINF
1457 REPLACE_ISFINITE
1458 REPLACE_ILOGBL
1459 REPLACE_ILOGBF
1460 REPLACE_ILOGB
1461 REPLACE_HYPOTL
1462 REPLACE_HYPOTF
1463 REPLACE_HYPOT
1464 REPLACE_HUGE_VAL
1465 REPLACE_FREXPL
1466 REPLACE_FREXP
1467 REPLACE_FREXPF
1468 REPLACE_FMODL
1469 REPLACE_FMODF
1470 REPLACE_FMOD
1471 REPLACE_FMAL
1472 REPLACE_FMAF
1473 REPLACE_FMA
1474 REPLACE_FLOORL
1475 REPLACE_FLOORF
1476 REPLACE_FLOOR
1477 REPLACE_FABSL
1478 REPLACE_EXP2L
1479 REPLACE_EXP2
1480 REPLACE_EXPM1L
1481 REPLACE_EXPM1F
1482 REPLACE_EXPM1
1483 REPLACE_EXPL
1484 REPLACE_EXPF
1485 REPLACE_COSHF
1486 REPLACE_COSF
1487 REPLACE_CEILL
1488 REPLACE_CEILF
1489 REPLACE_CEIL
1490 REPLACE_CBRTL
1491 REPLACE_CBRTF
1492 REPLACE_ATAN2F
1493 REPLACE_ATANF
1494 REPLACE_ASINF
1495 REPLACE_ACOSF
1496 HAVE_DECL_TRUNCL
1497 HAVE_DECL_TRUNCF
1498 HAVE_DECL_TRUNC
1499 HAVE_DECL_TANL
1500 HAVE_DECL_SQRTL
1501 HAVE_DECL_SINL
1502 HAVE_DECL_ROUNDL
1503 HAVE_DECL_ROUNDF
1504 HAVE_DECL_ROUND
1505 HAVE_DECL_RINTF
1506 HAVE_DECL_REMAINDERL
1507 HAVE_DECL_REMAINDER
1508 HAVE_DECL_LOGB
1509 HAVE_DECL_LOG2L
1510 HAVE_DECL_LOG2F
1511 HAVE_DECL_LOG2
1512 HAVE_DECL_LOG10L
1513 HAVE_DECL_LOGL
1514 HAVE_DECL_LDEXPL
1515 HAVE_DECL_FREXPL
1516 HAVE_DECL_FLOORL
1517 HAVE_DECL_FLOORF
1518 HAVE_DECL_EXPM1L
1519 HAVE_DECL_EXP2L
1520 HAVE_DECL_EXP2F
1521 HAVE_DECL_EXP2
1522 HAVE_DECL_EXPL
1523 HAVE_DECL_COSL
1524 HAVE_DECL_COPYSIGNF
1525 HAVE_DECL_CEILL
1526 HAVE_DECL_CEILF
1527 HAVE_DECL_CBRTL
1528 HAVE_DECL_CBRTF
1529 HAVE_DECL_ATANL
1530 HAVE_DECL_ASINL
1531 HAVE_DECL_ACOSL
1532 HAVE_TANHF
1533 HAVE_TANL
1534 HAVE_TANF
1535 HAVE_SQRTL
1536 HAVE_SQRTF
1537 HAVE_SINHF
1538 HAVE_SINL
1539 HAVE_SINF
1540 HAVE_RINTL
1541 HAVE_RINT
1542 HAVE_REMAINDERF
1543 HAVE_REMAINDER
1544 HAVE_POWF
1545 HAVE_MODFL
1546 HAVE_MODFF
1547 HAVE_LOGBL
1548 HAVE_LOGBF
1549 HAVE_LOG1PL
1550 HAVE_LOG1PF
1551 HAVE_LOG1P
1552 HAVE_LOG10L
1553 HAVE_LOG10F
1554 HAVE_LOGL
1555 HAVE_LOGF
1556 HAVE_LDEXPF
1557 HAVE_ISNANL
1558 HAVE_ISNAND
1559 HAVE_ISNANF
1560 HAVE_ILOGBL
1561 HAVE_ILOGBF
1562 HAVE_ILOGB
1563 HAVE_HYPOTL
1564 HAVE_HYPOTF
1565 HAVE_FREXPF
1566 HAVE_FMODL
1567 HAVE_FMODF
1568 HAVE_FMAL
1569 HAVE_FMAF
1570 HAVE_FMA
1571 HAVE_FABSL
1572 HAVE_FABSF
1573 HAVE_EXPM1F
1574 HAVE_EXPM1
1575 HAVE_EXPL
1576 HAVE_EXPF
1577 HAVE_COSHF
1578 HAVE_COSL
1579 HAVE_COSF
1580 HAVE_COPYSIGNL
1581 HAVE_COPYSIGN
1582 HAVE_CBRTL
1583 HAVE_CBRTF
1584 HAVE_CBRT
1585 HAVE_ATAN2F
1586 HAVE_ATANL
1587 HAVE_ATANF
1588 HAVE_ASINL
1589 HAVE_ASINF
1590 HAVE_ACOSL
1591 HAVE_ACOSF
1592 REPLACE_ITOLD
1593 GL_GENERATE_FLOAT_H_FALSE
1594 GL_GENERATE_FLOAT_H_TRUE
1595 FLOAT_H
1596 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1597 NEXT_FLOAT_H
1598 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1599 NEXT_FCNTL_H
1600 GL_M4_GNULIB_MDA_OPEN
1601 GL_M4_GNULIB_MDA_CREAT
1602 GL_M4_GNULIB_OPENAT
1603 GL_M4_GNULIB_OPEN
1604 GL_M4_GNULIB_NONBLOCKING
1605 GL_M4_GNULIB_FCNTL
1606 GL_M4_GNULIB_CREAT
1607 REPLACE_OPENAT
1608 REPLACE_OPEN
1609 REPLACE_FCNTL
1610 REPLACE_CREAT
1611 HAVE_OPENAT
1612 HAVE_FCNTL
1613 GL_M4_GNULIB_MDA_TEMPNAM
1614 GL_M4_GNULIB_MDA_PUTW
1615 GL_M4_GNULIB_MDA_GETW
1616 GL_M4_GNULIB_MDA_FILENO
1617 GL_M4_GNULIB_MDA_FDOPEN
1618 GL_M4_GNULIB_MDA_FCLOSEALL
1619 GL_M4_GNULIB_VSPRINTF_POSIX
1620 GL_M4_GNULIB_VSNPRINTF
1621 GL_M4_GNULIB_VPRINTF_POSIX
1622 GL_M4_GNULIB_VPRINTF
1623 GL_M4_GNULIB_VFPRINTF_POSIX
1624 GL_M4_GNULIB_VFPRINTF
1625 GL_M4_GNULIB_VDPRINTF
1626 GL_M4_GNULIB_VSCANF
1627 GL_M4_GNULIB_VFSCANF
1628 GL_M4_GNULIB_VASPRINTF
1629 GL_M4_GNULIB_TMPFILE
1630 GL_M4_GNULIB_STDIO_H_SIGPIPE
1631 GL_M4_GNULIB_STDIO_H_NONBLOCKING
1632 GL_M4_GNULIB_SPRINTF_POSIX
1633 GL_M4_GNULIB_SNPRINTF
1634 GL_M4_GNULIB_SCANF
1635 GL_M4_GNULIB_RENAMEAT
1636 GL_M4_GNULIB_RENAME
1637 GL_M4_GNULIB_REMOVE
1638 GL_M4_GNULIB_PUTS
1639 GL_M4_GNULIB_PUTCHAR
1640 GL_M4_GNULIB_PUTC
1641 GL_M4_GNULIB_PRINTF_POSIX
1642 GL_M4_GNULIB_PRINTF
1643 GL_M4_GNULIB_POPEN
1644 GL_M4_GNULIB_PERROR
1645 GL_M4_GNULIB_PCLOSE
1646 GL_M4_GNULIB_OBSTACK_PRINTF_POSIX
1647 GL_M4_GNULIB_OBSTACK_PRINTF
1648 GL_M4_GNULIB_GETLINE
1649 GL_M4_GNULIB_GETDELIM
1650 GL_M4_GNULIB_GETCHAR
1651 GL_M4_GNULIB_GETC
1652 GL_M4_GNULIB_FWRITE
1653 GL_M4_GNULIB_FTELLO
1654 GL_M4_GNULIB_FTELL
1655 GL_M4_GNULIB_FSEEKO
1656 GL_M4_GNULIB_FSEEK
1657 GL_M4_GNULIB_FSCANF
1658 GL_M4_GNULIB_FREOPEN
1659 GL_M4_GNULIB_FREAD
1660 GL_M4_GNULIB_FPUTS
1661 GL_M4_GNULIB_FPUTC
1662 GL_M4_GNULIB_FPURGE
1663 GL_M4_GNULIB_FPRINTF_POSIX
1664 GL_M4_GNULIB_FPRINTF
1665 GL_M4_GNULIB_FOPEN
1666 GL_M4_GNULIB_FGETS
1667 GL_M4_GNULIB_FGETC
1668 GL_M4_GNULIB_FFLUSH
1669 GL_M4_GNULIB_FDOPEN
1670 GL_M4_GNULIB_FCLOSE
1671 GL_M4_GNULIB_DPRINTF
1672 REPLACE_VSPRINTF
1673 REPLACE_VSNPRINTF
1674 REPLACE_VPRINTF
1675 REPLACE_VFPRINTF
1676 REPLACE_VDPRINTF
1677 REPLACE_VASPRINTF
1678 REPLACE_TMPFILE
1679 REPLACE_STDIO_WRITE_FUNCS
1680 REPLACE_STDIO_READ_FUNCS
1681 REPLACE_SPRINTF
1682 REPLACE_SNPRINTF
1683 REPLACE_RENAMEAT
1684 REPLACE_RENAME
1685 REPLACE_REMOVE
1686 REPLACE_PRINTF
1687 REPLACE_POPEN
1688 REPLACE_PERROR
1689 REPLACE_OBSTACK_PRINTF
1690 REPLACE_GETLINE
1691 REPLACE_GETDELIM
1692 REPLACE_FTELLO
1693 REPLACE_FTELL
1694 REPLACE_FSEEKO
1695 REPLACE_FSEEK
1696 REPLACE_FREOPEN
1697 REPLACE_FPURGE
1698 REPLACE_FPRINTF
1699 REPLACE_FOPEN
1700 REPLACE_FFLUSH
1701 REPLACE_FDOPEN
1702 REPLACE_FCLOSE
1703 REPLACE_DPRINTF
1704 HAVE_VDPRINTF
1705 HAVE_VASPRINTF
1706 HAVE_RENAMEAT
1707 HAVE_POPEN
1708 HAVE_PCLOSE
1709 HAVE_FTELLO
1710 HAVE_FSEEKO
1711 HAVE_DPRINTF
1712 HAVE_DECL_VSNPRINTF
1713 HAVE_DECL_SNPRINTF
1714 HAVE_DECL_OBSTACK_PRINTF
1715 HAVE_DECL_GETLINE
1716 HAVE_DECL_GETDELIM
1717 HAVE_DECL_FTELLO
1718 HAVE_DECL_FSEEKO
1719 HAVE_DECL_FPURGE
1720 HAVE_DECL_FCLOSEALL
1721 EOVERFLOW_VALUE
1722 EOVERFLOW_HIDDEN
1723 ENOLINK_VALUE
1724 ENOLINK_HIDDEN
1725 EMULTIHOP_VALUE
1726 EMULTIHOP_HIDDEN
1727 GL_GENERATE_ERRNO_H_FALSE
1728 GL_GENERATE_ERRNO_H_TRUE
1729 ERRNO_H
1730 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1731 NEXT_ERRNO_H
1732 HAVE_DIRENT_H
1733 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1734 NEXT_DIRENT_H
1735 PRAGMA_COLUMNS
1736 PRAGMA_SYSTEM_HEADER
1737 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1738 INCLUDE_NEXT
1739 pkglibexecdir
1740 lispdir
1741 GL_M4_GNULIB_ALPHASORT
1742 GL_M4_GNULIB_SCANDIR
1743 GL_M4_GNULIB_FDOPENDIR
1744 GL_M4_GNULIB_DIRFD
1745 GL_M4_GNULIB_CLOSEDIR
1746 GL_M4_GNULIB_REWINDDIR
1747 GL_M4_GNULIB_READDIR
1748 GL_M4_GNULIB_OPENDIR
1749 REPLACE_FDOPENDIR
1750 REPLACE_DIRFD
1751 REPLACE_CLOSEDIR
1752 REPLACE_OPENDIR
1753 HAVE_ALPHASORT
1754 HAVE_SCANDIR
1755 HAVE_FDOPENDIR
1756 HAVE_DECL_FDOPENDIR
1757 HAVE_DECL_DIRFD
1758 HAVE_CLOSEDIR
1759 HAVE_REWINDDIR
1760 HAVE_READDIR
1761 HAVE_OPENDIR
1762 HAVE_WINSOCK2_H
1763 REPLACE_IOCTL
1764 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1765 SYS_IOCTL_H_HAVE_WINSOCK2_H
1766 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1767 LIB_CLOCK_GETTIME
1768 GL_M4_GNULIB_MDA_PUTENV
1769 GL_M4_GNULIB_MDA_MKTEMP
1770 GL_M4_GNULIB_MDA_GCVT
1771 GL_M4_GNULIB_MDA_FCVT
1772 GL_M4_GNULIB_MDA_ECVT
1773 GL_M4_GNULIB_WCTOMB
1774 GL_M4_GNULIB_UNSETENV
1775 GL_M4_GNULIB_UNLOCKPT
1776 GL_M4_GNULIB_SYSTEM_POSIX
1777 GL_M4_GNULIB_STRTOULL
1778 GL_M4_GNULIB_STRTOUL
1779 GL_M4_GNULIB_STRTOLL
1780 GL_M4_GNULIB_STRTOLD
1781 GL_M4_GNULIB_STRTOL
1782 GL_M4_GNULIB_STRTOD
1783 GL_M4_GNULIB_SETENV
1784 GL_M4_GNULIB_SECURE_GETENV
1785 GL_M4_GNULIB_RPMATCH
1786 GL_M4_GNULIB_REALPATH
1787 GL_M4_GNULIB_REALLOC_POSIX
1788 GL_M4_GNULIB_REALLOCARRAY
1789 GL_M4_GNULIB_RANDOM_R
1790 GL_M4_GNULIB_RANDOM
1791 GL_M4_GNULIB_QSORT_R
1792 GL_M4_GNULIB_PUTENV
1793 GL_M4_GNULIB_PTSNAME_R
1794 GL_M4_GNULIB_PTSNAME
1795 GL_M4_GNULIB_POSIX_OPENPT
1796 GL_M4_GNULIB_POSIX_MEMALIGN
1797 GL_M4_GNULIB_MKSTEMPS
1798 GL_M4_GNULIB_MKSTEMP
1799 GL_M4_GNULIB_MKOSTEMPS
1800 GL_M4_GNULIB_MKOSTEMP
1801 GL_M4_GNULIB_MKDTEMP
1802 GL_M4_GNULIB_MBTOWC
1803 GL_M4_GNULIB_MALLOC_POSIX
1804 GL_M4_GNULIB_GRANTPT
1805 GL_M4_GNULIB_GETSUBOPT
1806 GL_M4_GNULIB_GETLOADAVG
1807 GL_M4_GNULIB_FREE_POSIX
1808 GL_M4_GNULIB_CANONICALIZE_FILE_NAME
1809 GL_M4_GNULIB_CALLOC_POSIX
1810 GL_M4_GNULIB_ATOLL
1811 GL_M4_GNULIB_ALIGNED_ALLOC
1812 GL_M4_GNULIB__EXIT
1813 REPLACE_WCTOMB
1814 REPLACE_UNSETENV
1815 REPLACE_STRTOULL
1816 REPLACE_STRTOUL
1817 REPLACE_STRTOLL
1818 REPLACE_STRTOLD
1819 REPLACE_STRTOL
1820 REPLACE_STRTOD
1821 REPLACE_SETSTATE
1822 REPLACE_SETENV
1823 REPLACE_REALPATH
1824 REPLACE_REALLOCARRAY
1825 REPLACE_REALLOC
1826 REPLACE_RANDOM_R
1827 REPLACE_RANDOM
1828 REPLACE_QSORT_R
1829 REPLACE_PUTENV
1830 REPLACE_PTSNAME_R
1831 REPLACE_PTSNAME
1832 REPLACE_POSIX_MEMALIGN
1833 REPLACE_MKSTEMP
1834 REPLACE_MBTOWC
1835 REPLACE_MALLOC
1836 REPLACE_INITSTATE
1837 REPLACE_FREE
1838 REPLACE_CANONICALIZE_FILE_NAME
1839 REPLACE_CALLOC
1840 REPLACE_ALIGNED_ALLOC
1841 HAVE_DECL_UNSETENV
1842 HAVE_UNLOCKPT
1843 HAVE_SYS_LOADAVG_H
1844 HAVE_STRUCT_RANDOM_DATA
1845 HAVE_STRTOULL
1846 HAVE_STRTOUL
1847 HAVE_STRTOLL
1848 HAVE_STRTOLD
1849 HAVE_STRTOL
1850 HAVE_STRTOD
1851 HAVE_DECL_SETSTATE
1852 HAVE_SETSTATE
1853 HAVE_DECL_SETENV
1854 HAVE_SETENV
1855 HAVE_SECURE_GETENV
1856 HAVE_RPMATCH
1857 HAVE_REALPATH
1858 HAVE_REALLOCARRAY
1859 HAVE_RANDOM_R
1860 HAVE_RANDOM_H
1861 HAVE_RANDOM
1862 HAVE_QSORT_R
1863 HAVE_PTSNAME_R
1864 HAVE_PTSNAME
1865 HAVE_POSIX_OPENPT
1866 HAVE_POSIX_MEMALIGN
1867 HAVE_MKSTEMPS
1868 HAVE_MKSTEMP
1869 HAVE_MKOSTEMPS
1870 HAVE_MKOSTEMP
1871 HAVE_MKDTEMP
1872 HAVE_MBTOWC
1873 HAVE_DECL_INITSTATE
1874 HAVE_INITSTATE
1875 HAVE_GRANTPT
1876 HAVE_GETSUBOPT
1877 HAVE_DECL_GETLOADAVG
1878 HAVE_DECL_GCVT
1879 HAVE_DECL_FCVT
1880 HAVE_DECL_ECVT
1881 HAVE_CANONICALIZE_FILE_NAME
1882 HAVE_ATOLL
1883 HAVE_ALIGNED_ALLOC
1884 HAVE__EXIT
1885 LTLIBCSTACK
1886 LIBCSTACK
1887 GL_M4_GNULIB_MDA_WCSDUP
1888 GL_M4_GNULIB_WCSFTIME
1889 GL_M4_GNULIB_WCSWIDTH
1890 GL_M4_GNULIB_WCSTOK
1891 GL_M4_GNULIB_WCSSTR
1892 GL_M4_GNULIB_WCSPBRK
1893 GL_M4_GNULIB_WCSSPN
1894 GL_M4_GNULIB_WCSCSPN
1895 GL_M4_GNULIB_WCSRCHR
1896 GL_M4_GNULIB_WCSCHR
1897 GL_M4_GNULIB_WCSDUP
1898 GL_M4_GNULIB_WCSXFRM
1899 GL_M4_GNULIB_WCSCOLL
1900 GL_M4_GNULIB_WCSNCASECMP
1901 GL_M4_GNULIB_WCSCASECMP
1902 GL_M4_GNULIB_WCSNCMP
1903 GL_M4_GNULIB_WCSCMP
1904 GL_M4_GNULIB_WCSNCAT
1905 GL_M4_GNULIB_WCSCAT
1906 GL_M4_GNULIB_WCPNCPY
1907 GL_M4_GNULIB_WCSNCPY
1908 GL_M4_GNULIB_WCPCPY
1909 GL_M4_GNULIB_WCSCPY
1910 GL_M4_GNULIB_WCSNLEN
1911 GL_M4_GNULIB_WCSLEN
1912 GL_M4_GNULIB_WMEMSET
1913 GL_M4_GNULIB_WMEMPCPY
1914 GL_M4_GNULIB_WMEMMOVE
1915 GL_M4_GNULIB_WMEMCPY
1916 GL_M4_GNULIB_WMEMCMP
1917 GL_M4_GNULIB_WMEMCHR
1918 GL_M4_GNULIB_WCWIDTH
1919 GL_M4_GNULIB_WCSNRTOMBS
1920 GL_M4_GNULIB_WCSRTOMBS
1921 GL_M4_GNULIB_WCRTOMB
1922 GL_M4_GNULIB_MBSNRTOWCS
1923 GL_M4_GNULIB_MBSRTOWCS
1924 GL_M4_GNULIB_MBRLEN
1925 GL_M4_GNULIB_MBRTOWC
1926 GL_M4_GNULIB_MBSINIT
1927 GL_M4_GNULIB_WCTOB
1928 GL_M4_GNULIB_BTOWC
1929 LOCALE_FR
1930 REPLACE_WCSTOK
1931 REPLACE_WCSFTIME
1932 REPLACE_WCSWIDTH
1933 REPLACE_WCWIDTH
1934 REPLACE_WCSNRTOMBS
1935 REPLACE_WCSRTOMBS
1936 REPLACE_WCRTOMB
1937 REPLACE_MBSNRTOWCS
1938 REPLACE_MBSRTOWCS
1939 REPLACE_MBRLEN
1940 REPLACE_MBRTOWC
1941 REPLACE_MBSINIT
1942 REPLACE_WCTOB
1943 REPLACE_BTOWC
1944 REPLACE_MBSTATE_T
1945 HAVE_DECL_WCWIDTH
1946 HAVE_DECL_WCSDUP
1947 HAVE_DECL_WCTOB
1948 HAVE_WCSFTIME
1949 HAVE_WCSWIDTH
1950 HAVE_WCSTOK
1951 HAVE_WCSSTR
1952 HAVE_WCSPBRK
1953 HAVE_WCSSPN
1954 HAVE_WCSCSPN
1955 HAVE_WCSRCHR
1956 HAVE_WCSCHR
1957 HAVE_WCSDUP
1958 HAVE_WCSXFRM
1959 HAVE_WCSCOLL
1960 HAVE_WCSNCASECMP
1961 HAVE_WCSCASECMP
1962 HAVE_WCSNCMP
1963 HAVE_WCSCMP
1964 HAVE_WCSNCAT
1965 HAVE_WCSCAT
1966 HAVE_WCPNCPY
1967 HAVE_WCSNCPY
1968 HAVE_WCPCPY
1969 HAVE_WCSCPY
1970 HAVE_WCSNLEN
1971 HAVE_WCSLEN
1972 HAVE_WMEMSET
1973 HAVE_WMEMPCPY
1974 HAVE_WMEMMOVE
1975 HAVE_WMEMCPY
1976 HAVE_WMEMCMP
1977 HAVE_WMEMCHR
1978 HAVE_WCSNRTOMBS
1979 HAVE_WCSRTOMBS
1980 HAVE_WCRTOMB
1981 HAVE_MBSNRTOWCS
1982 HAVE_MBSRTOWCS
1983 HAVE_MBRLEN
1984 HAVE_MBRTOWC
1985 HAVE_MBSINIT
1986 HAVE_BTOWC
1987 HAVE_ALLOCA_H
1988 GL_GENERATE_ALLOCA_H_FALSE
1989 GL_GENERATE_ALLOCA_H_TRUE
1990 ALLOCA_H
1991 ALLOCA
1992 GL_M4_GNULIB_MDA_WRITE
1993 GL_M4_GNULIB_MDA_UNLINK
1994 GL_M4_GNULIB_MDA_SWAB
1995 GL_M4_GNULIB_MDA_RMDIR
1996 GL_M4_GNULIB_MDA_READ
1997 GL_M4_GNULIB_MDA_LSEEK
1998 GL_M4_GNULIB_MDA_ISATTY
1999 GL_M4_GNULIB_MDA_GETPID
2000 GL_M4_GNULIB_MDA_GETCWD
2001 GL_M4_GNULIB_MDA_EXECVPE
2002 GL_M4_GNULIB_MDA_EXECVP
2003 GL_M4_GNULIB_MDA_EXECVE
2004 GL_M4_GNULIB_MDA_EXECV
2005 GL_M4_GNULIB_MDA_EXECLP
2006 GL_M4_GNULIB_MDA_EXECLE
2007 GL_M4_GNULIB_MDA_EXECL
2008 GL_M4_GNULIB_MDA_DUP2
2009 GL_M4_GNULIB_MDA_DUP
2010 GL_M4_GNULIB_MDA_CLOSE
2011 GL_M4_GNULIB_MDA_CHDIR
2012 GL_M4_GNULIB_MDA_ACCESS
2013 GL_M4_GNULIB_WRITE
2014 GL_M4_GNULIB_USLEEP
2015 GL_M4_GNULIB_UNLINKAT
2016 GL_M4_GNULIB_UNLINK
2017 GL_M4_GNULIB_UNISTD_H_SIGPIPE
2018 GL_M4_GNULIB_UNISTD_H_NONBLOCKING
2019 GL_M4_GNULIB_TTYNAME_R
2020 GL_M4_GNULIB_TRUNCATE
2021 GL_M4_GNULIB_SYMLINKAT
2022 GL_M4_GNULIB_SYMLINK
2023 GL_M4_GNULIB_SLEEP
2024 GL_M4_GNULIB_SETHOSTNAME
2025 GL_M4_GNULIB_RMDIR
2026 GL_M4_GNULIB_READLINKAT
2027 GL_M4_GNULIB_READLINK
2028 GL_M4_GNULIB_READ
2029 GL_M4_GNULIB_PWRITE
2030 GL_M4_GNULIB_PREAD
2031 GL_M4_GNULIB_PIPE2
2032 GL_M4_GNULIB_PIPE
2033 GL_M4_GNULIB_LSEEK
2034 GL_M4_GNULIB_LINKAT
2035 GL_M4_GNULIB_LINK
2036 GL_M4_GNULIB_LCHOWN
2037 GL_M4_GNULIB_ISATTY
2038 GL_M4_GNULIB_GROUP_MEMBER
2039 GL_M4_GNULIB_GETUSERSHELL
2040 GL_M4_GNULIB_GETPASS
2041 GL_M4_GNULIB_GETPAGESIZE
2042 GL_M4_GNULIB_GETOPT_POSIX
2043 GL_M4_GNULIB_GETLOGIN_R
2044 GL_M4_GNULIB_GETLOGIN
2045 GL_M4_GNULIB_GETHOSTNAME
2046 GL_M4_GNULIB_GETGROUPS
2047 GL_M4_GNULIB_GETENTROPY
2048 GL_M4_GNULIB_GETDTABLESIZE
2049 GL_M4_GNULIB_GETDOMAINNAME
2050 GL_M4_GNULIB_GETCWD
2051 GL_M4_GNULIB_FTRUNCATE
2052 GL_M4_GNULIB_FSYNC
2053 GL_M4_GNULIB_FDATASYNC
2054 GL_M4_GNULIB_FCHOWNAT
2055 GL_M4_GNULIB_FCHDIR
2056 GL_M4_GNULIB_FACCESSAT
2057 GL_M4_GNULIB_EXECVPE
2058 GL_M4_GNULIB_EXECVP
2059 GL_M4_GNULIB_EXECVE
2060 GL_M4_GNULIB_EXECV
2061 GL_M4_GNULIB_EXECLP
2062 GL_M4_GNULIB_EXECLE
2063 GL_M4_GNULIB_EXECL
2064 GL_M4_GNULIB_EUIDACCESS
2065 GL_M4_GNULIB_ENVIRON
2066 GL_M4_GNULIB_DUP3
2067 GL_M4_GNULIB_DUP2
2068 GL_M4_GNULIB_DUP
2069 GL_M4_GNULIB_COPY_FILE_RANGE
2070 GL_M4_GNULIB_CLOSE
2071 GL_M4_GNULIB_CHOWN
2072 GL_M4_GNULIB_CHDIR
2073 GL_M4_GNULIB_ACCESS
2074 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
2075 UNISTD_H_HAVE_WINSOCK2_H
2076 UNISTD_H_HAVE_SYS_RANDOM_H
2077 REPLACE_WRITE
2078 REPLACE_USLEEP
2079 REPLACE_UNLINKAT
2080 REPLACE_UNLINK
2081 REPLACE_TTYNAME_R
2082 REPLACE_TRUNCATE
2083 REPLACE_SYMLINKAT
2084 REPLACE_SYMLINK
2085 REPLACE_SLEEP
2086 REPLACE_RMDIR
2087 REPLACE_READLINKAT
2088 REPLACE_READLINK
2089 REPLACE_READ
2090 REPLACE_PWRITE
2091 REPLACE_PREAD
2092 REPLACE_LSEEK
2093 REPLACE_LINKAT
2094 REPLACE_LINK
2095 REPLACE_LCHOWN
2096 REPLACE_ISATTY
2097 REPLACE_GETPASS
2098 REPLACE_GETPAGESIZE
2099 REPLACE_GETGROUPS
2100 REPLACE_GETLOGIN_R
2101 REPLACE_GETDTABLESIZE
2102 REPLACE_GETDOMAINNAME
2103 REPLACE_GETCWD
2104 REPLACE_FTRUNCATE
2105 REPLACE_FCHOWNAT
2106 REPLACE_FACCESSAT
2107 REPLACE_EXECVPE
2108 REPLACE_EXECVP
2109 REPLACE_EXECVE
2110 REPLACE_EXECV
2111 REPLACE_EXECLP
2112 REPLACE_EXECLE
2113 REPLACE_EXECL
2114 REPLACE_DUP2
2115 REPLACE_DUP
2116 REPLACE_CLOSE
2117 REPLACE_CHOWN
2118 REPLACE_ACCESS
2119 HAVE_SYS_PARAM_H
2120 HAVE_OS_H
2121 HAVE_DECL_TTYNAME_R
2122 HAVE_DECL_TRUNCATE
2123 HAVE_DECL_SETHOSTNAME
2124 HAVE_DECL_GETUSERSHELL
2125 HAVE_DECL_GETPAGESIZE
2126 HAVE_DECL_GETLOGIN_R
2127 HAVE_DECL_GETLOGIN
2128 HAVE_DECL_GETDOMAINNAME
2129 HAVE_DECL_FDATASYNC
2130 HAVE_DECL_FCHDIR
2131 HAVE_DECL_EXECVPE
2132 HAVE_DECL_ENVIRON
2133 HAVE_USLEEP
2134 HAVE_UNLINKAT
2135 HAVE_SYMLINKAT
2136 HAVE_SYMLINK
2137 HAVE_SLEEP
2138 HAVE_SETHOSTNAME
2139 HAVE_READLINKAT
2140 HAVE_READLINK
2141 HAVE_PWRITE
2142 HAVE_PREAD
2143 HAVE_PIPE2
2144 HAVE_PIPE
2145 HAVE_LINKAT
2146 HAVE_LINK
2147 HAVE_LCHOWN
2148 HAVE_GROUP_MEMBER
2149 HAVE_GETPASS
2150 HAVE_GETPAGESIZE
2151 HAVE_GETLOGIN
2152 HAVE_GETHOSTNAME
2153 HAVE_GETGROUPS
2154 HAVE_GETENTROPY
2155 HAVE_GETDTABLESIZE
2156 HAVE_FTRUNCATE
2157 HAVE_FSYNC
2158 HAVE_FDATASYNC
2159 HAVE_FCHOWNAT
2160 HAVE_FCHDIR
2161 HAVE_FACCESSAT
2162 HAVE_EXECVPE
2163 HAVE_EUIDACCESS
2164 HAVE_DUP3
2165 HAVE_COPY_FILE_RANGE
2166 HAVE_CHOWN
2167 GL_COND_LIBTOOL_FALSE
2168 GL_COND_LIBTOOL_TRUE
2169 WARN_CFLAGS
2170 WERROR_CFLAGS
2171 am__fastdepCXX_FALSE
2172 am__fastdepCXX_TRUE
2173 CXXDEPMODE
2174 ANSICXX_FALSE
2175 ANSICXX_TRUE
2176 CXXFLAGS
2177 ac_ct_CXX
2178 CXX
2179 CXX_CHOICE
2180 RANLIB
2181 ARFLAGS
2182 AR
2183 EGREP
2184 GREP
2185 CPP
2186 host_os
2187 host_vendor
2188 host_cpu
2189 host
2190 build_os
2191 build_vendor
2192 build_cpu
2193 build
2194 am__fastdepCC_FALSE
2195 am__fastdepCC_TRUE
2196 CCDEPMODE
2197 am__nodep
2198 AMDEPBACKSLASH
2199 AMDEP_FALSE
2200 AMDEP_TRUE
2201 am__include
2202 DEPDIR
2203 OBJEXT
2204 EXEEXT
2205 ac_ct_CC
2206 CPPFLAGS
2207 LDFLAGS
2208 CFLAGS
2209 CC
2210 AM_BACKSLASH
2211 AM_DEFAULT_VERBOSITY
2212 AM_DEFAULT_V
2213 AM_V
2214 am__untar
2215 am__tar
2216 AMTAR
2217 am__leading_dot
2218 SET_MAKE
2219 AWK
2220 mkdir_p
2221 MKDIR_P
2222 INSTALL_STRIP_PROGRAM
2223 STRIP
2224 install_sh
2225 MAKEINFO
2226 AUTOHEADER
2227 AUTOMAKE
2228 AUTOCONF
2229 ACLOCAL
2230 VERSION
2231 PACKAGE
2232 CYGPATH_W
2233 am__isrc
2234 INSTALL_DATA
2235 INSTALL_SCRIPT
2236 INSTALL_PROGRAM
2237 target_alias
2238 host_alias
2239 build_alias
2240 LIBS
2241 ECHO_T
2242 ECHO_N
2243 ECHO_C
2244 DEFS
2245 mandir
2246 localedir
2247 libdir
2248 psdir
2249 pdfdir
2250 dvidir
2251 htmldir
2252 infodir
2253 docdir
2254 oldincludedir
2255 includedir
2256 runstatedir
2257 localstatedir
2258 sharedstatedir
2259 sysconfdir
2260 datadir
2261 datarootdir
2262 libexecdir
2263 sbindir
2264 bindir
2265 program_transform_name
2266 prefix
2267 exec_prefix
2268 PACKAGE_URL
2269 PACKAGE_BUGREPORT
2270 PACKAGE_STRING
2271 PACKAGE_VERSION
2272 PACKAGE_TARNAME
2273 PACKAGE_NAME
2274 PATH_SEPARATOR
2275 SHELL
2276 am__quote'
2277 ac_subst_files=''
2278 ac_user_opts='
2279 enable_option_checking
2280 enable_silent_rules
2281 enable_dependency_tracking
2282 enable_c__
2283 enable_largefile
2284 enable_threads
2285 enable_gcc_warnings
2286 enable_cross_guesses
2287 enable_assert
2288 with_gnu_ld
2289 enable_rpath
2290 with_libiconv_prefix
2291 with_included_regex
2292 with_libsigsegv
2293 with_libsigsegv_prefix
2294 with_packager
2295 with_packager_version
2296 with_packager_bug_reports
2297 enable_changeword
2298 with_syscmd_shell
2299 with_dmalloc
2300 enable_nls
2301 with_libintl_prefix
2302 '
2303       ac_precious_vars='build_alias
2304 host_alias
2305 target_alias
2306 CC
2307 CFLAGS
2308 LDFLAGS
2309 LIBS
2310 CPPFLAGS
2311 CPP
2312 CXX
2313 CXXFLAGS'
2314
2315
2316 # Initialize some variables set by options.
2317 ac_init_help=
2318 ac_init_version=false
2319 ac_unrecognized_opts=
2320 ac_unrecognized_sep=
2321 # The variables have the same names as the options, with
2322 # dashes changed to underlines.
2323 cache_file=/dev/null
2324 exec_prefix=NONE
2325 no_create=
2326 no_recursion=
2327 prefix=NONE
2328 program_prefix=NONE
2329 program_suffix=NONE
2330 program_transform_name=s,x,x,
2331 silent=
2332 site=
2333 srcdir=
2334 verbose=
2335 x_includes=NONE
2336 x_libraries=NONE
2337
2338 # Installation directory options.
2339 # These are left unexpanded so users can "make install exec_prefix=/foo"
2340 # and all the variables that are supposed to be based on exec_prefix
2341 # by default will actually change.
2342 # Use braces instead of parens because sh, perl, etc. also accept them.
2343 # (The list follows the same order as the GNU Coding Standards.)
2344 bindir='${exec_prefix}/bin'
2345 sbindir='${exec_prefix}/sbin'
2346 libexecdir='${exec_prefix}/libexec'
2347 datarootdir='${prefix}/share'
2348 datadir='${datarootdir}'
2349 sysconfdir='${prefix}/etc'
2350 sharedstatedir='${prefix}/com'
2351 localstatedir='${prefix}/var'
2352 runstatedir='${localstatedir}/run'
2353 includedir='${prefix}/include'
2354 oldincludedir='/usr/include'
2355 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2356 infodir='${datarootdir}/info'
2357 htmldir='${docdir}'
2358 dvidir='${docdir}'
2359 pdfdir='${docdir}'
2360 psdir='${docdir}'
2361 libdir='${exec_prefix}/lib'
2362 localedir='${datarootdir}/locale'
2363 mandir='${datarootdir}/man'
2364
2365 ac_prev=
2366 ac_dashdash=
2367 for ac_option
2368 do
2369   # If the previous option needs an argument, assign it.
2370   if test -n "$ac_prev"; then
2371     eval $ac_prev=\$ac_option
2372     ac_prev=
2373     continue
2374   fi
2375
2376   case $ac_option in
2377   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2378   *=)   ac_optarg= ;;
2379   *)    ac_optarg=yes ;;
2380   esac
2381
2382   case $ac_dashdash$ac_option in
2383   --)
2384     ac_dashdash=yes ;;
2385
2386   -bindir | --bindir | --bindi | --bind | --bin | --bi)
2387     ac_prev=bindir ;;
2388   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2389     bindir=$ac_optarg ;;
2390
2391   -build | --build | --buil | --bui | --bu)
2392     ac_prev=build_alias ;;
2393   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2394     build_alias=$ac_optarg ;;
2395
2396   -cache-file | --cache-file | --cache-fil | --cache-fi \
2397   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2398     ac_prev=cache_file ;;
2399   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2400   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2401     cache_file=$ac_optarg ;;
2402
2403   --config-cache | -C)
2404     cache_file=config.cache ;;
2405
2406   -datadir | --datadir | --datadi | --datad)
2407     ac_prev=datadir ;;
2408   -datadir=* | --datadir=* | --datadi=* | --datad=*)
2409     datadir=$ac_optarg ;;
2410
2411   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2412   | --dataroo | --dataro | --datar)
2413     ac_prev=datarootdir ;;
2414   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2415   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2416     datarootdir=$ac_optarg ;;
2417
2418   -disable-* | --disable-*)
2419     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2420     # Reject names that are not valid shell variable names.
2421     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2422       as_fn_error $? "invalid feature name: \`$ac_useropt'"
2423     ac_useropt_orig=$ac_useropt
2424     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2425     case $ac_user_opts in
2426       *"
2427 "enable_$ac_useropt"
2428 "*) ;;
2429       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2430          ac_unrecognized_sep=', ';;
2431     esac
2432     eval enable_$ac_useropt=no ;;
2433
2434   -docdir | --docdir | --docdi | --doc | --do)
2435     ac_prev=docdir ;;
2436   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2437     docdir=$ac_optarg ;;
2438
2439   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2440     ac_prev=dvidir ;;
2441   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2442     dvidir=$ac_optarg ;;
2443
2444   -enable-* | --enable-*)
2445     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2446     # Reject names that are not valid shell variable names.
2447     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2448       as_fn_error $? "invalid feature name: \`$ac_useropt'"
2449     ac_useropt_orig=$ac_useropt
2450     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2451     case $ac_user_opts in
2452       *"
2453 "enable_$ac_useropt"
2454 "*) ;;
2455       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2456          ac_unrecognized_sep=', ';;
2457     esac
2458     eval enable_$ac_useropt=\$ac_optarg ;;
2459
2460   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2461   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2462   | --exec | --exe | --ex)
2463     ac_prev=exec_prefix ;;
2464   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2465   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2466   | --exec=* | --exe=* | --ex=*)
2467     exec_prefix=$ac_optarg ;;
2468
2469   -gas | --gas | --ga | --g)
2470     # Obsolete; use --with-gas.
2471     with_gas=yes ;;
2472
2473   -help | --help | --hel | --he | -h)
2474     ac_init_help=long ;;
2475   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2476     ac_init_help=recursive ;;
2477   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2478     ac_init_help=short ;;
2479
2480   -host | --host | --hos | --ho)
2481     ac_prev=host_alias ;;
2482   -host=* | --host=* | --hos=* | --ho=*)
2483     host_alias=$ac_optarg ;;
2484
2485   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2486     ac_prev=htmldir ;;
2487   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2488   | --ht=*)
2489     htmldir=$ac_optarg ;;
2490
2491   -includedir | --includedir | --includedi | --included | --include \
2492   | --includ | --inclu | --incl | --inc)
2493     ac_prev=includedir ;;
2494   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2495   | --includ=* | --inclu=* | --incl=* | --inc=*)
2496     includedir=$ac_optarg ;;
2497
2498   -infodir | --infodir | --infodi | --infod | --info | --inf)
2499     ac_prev=infodir ;;
2500   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2501     infodir=$ac_optarg ;;
2502
2503   -libdir | --libdir | --libdi | --libd)
2504     ac_prev=libdir ;;
2505   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2506     libdir=$ac_optarg ;;
2507
2508   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2509   | --libexe | --libex | --libe)
2510     ac_prev=libexecdir ;;
2511   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2512   | --libexe=* | --libex=* | --libe=*)
2513     libexecdir=$ac_optarg ;;
2514
2515   -localedir | --localedir | --localedi | --localed | --locale)
2516     ac_prev=localedir ;;
2517   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2518     localedir=$ac_optarg ;;
2519
2520   -localstatedir | --localstatedir | --localstatedi | --localstated \
2521   | --localstate | --localstat | --localsta | --localst | --locals)
2522     ac_prev=localstatedir ;;
2523   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2524   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2525     localstatedir=$ac_optarg ;;
2526
2527   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2528     ac_prev=mandir ;;
2529   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2530     mandir=$ac_optarg ;;
2531
2532   -nfp | --nfp | --nf)
2533     # Obsolete; use --without-fp.
2534     with_fp=no ;;
2535
2536   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2537   | --no-cr | --no-c | -n)
2538     no_create=yes ;;
2539
2540   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2541   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2542     no_recursion=yes ;;
2543
2544   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2545   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2546   | --oldin | --oldi | --old | --ol | --o)
2547     ac_prev=oldincludedir ;;
2548   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2549   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2550   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2551     oldincludedir=$ac_optarg ;;
2552
2553   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2554     ac_prev=prefix ;;
2555   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2556     prefix=$ac_optarg ;;
2557
2558   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2559   | --program-pre | --program-pr | --program-p)
2560     ac_prev=program_prefix ;;
2561   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2562   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2563     program_prefix=$ac_optarg ;;
2564
2565   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2566   | --program-suf | --program-su | --program-s)
2567     ac_prev=program_suffix ;;
2568   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2569   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2570     program_suffix=$ac_optarg ;;
2571
2572   -program-transform-name | --program-transform-name \
2573   | --program-transform-nam | --program-transform-na \
2574   | --program-transform-n | --program-transform- \
2575   | --program-transform | --program-transfor \
2576   | --program-transfo | --program-transf \
2577   | --program-trans | --program-tran \
2578   | --progr-tra | --program-tr | --program-t)
2579     ac_prev=program_transform_name ;;
2580   -program-transform-name=* | --program-transform-name=* \
2581   | --program-transform-nam=* | --program-transform-na=* \
2582   | --program-transform-n=* | --program-transform-=* \
2583   | --program-transform=* | --program-transfor=* \
2584   | --program-transfo=* | --program-transf=* \
2585   | --program-trans=* | --program-tran=* \
2586   | --progr-tra=* | --program-tr=* | --program-t=*)
2587     program_transform_name=$ac_optarg ;;
2588
2589   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2590     ac_prev=pdfdir ;;
2591   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2592     pdfdir=$ac_optarg ;;
2593
2594   -psdir | --psdir | --psdi | --psd | --ps)
2595     ac_prev=psdir ;;
2596   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2597     psdir=$ac_optarg ;;
2598
2599   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2600   | -silent | --silent | --silen | --sile | --sil)
2601     silent=yes ;;
2602
2603   -runstatedir | --runstatedir | --runstatedi | --runstated \
2604   | --runstate | --runstat | --runsta | --runst | --runs \
2605   | --run | --ru | --r)
2606     ac_prev=runstatedir ;;
2607   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2608   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2609   | --run=* | --ru=* | --r=*)
2610     runstatedir=$ac_optarg ;;
2611
2612   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2613     ac_prev=sbindir ;;
2614   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2615   | --sbi=* | --sb=*)
2616     sbindir=$ac_optarg ;;
2617
2618   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2619   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2620   | --sharedst | --shareds | --shared | --share | --shar \
2621   | --sha | --sh)
2622     ac_prev=sharedstatedir ;;
2623   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2624   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2625   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2626   | --sha=* | --sh=*)
2627     sharedstatedir=$ac_optarg ;;
2628
2629   -site | --site | --sit)
2630     ac_prev=site ;;
2631   -site=* | --site=* | --sit=*)
2632     site=$ac_optarg ;;
2633
2634   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2635     ac_prev=srcdir ;;
2636   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2637     srcdir=$ac_optarg ;;
2638
2639   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2640   | --syscon | --sysco | --sysc | --sys | --sy)
2641     ac_prev=sysconfdir ;;
2642   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2643   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2644     sysconfdir=$ac_optarg ;;
2645
2646   -target | --target | --targe | --targ | --tar | --ta | --t)
2647     ac_prev=target_alias ;;
2648   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2649     target_alias=$ac_optarg ;;
2650
2651   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2652     verbose=yes ;;
2653
2654   -version | --version | --versio | --versi | --vers | -V)
2655     ac_init_version=: ;;
2656
2657   -with-* | --with-*)
2658     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2659     # Reject names that are not valid shell variable names.
2660     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2661       as_fn_error $? "invalid package name: \`$ac_useropt'"
2662     ac_useropt_orig=$ac_useropt
2663     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2664     case $ac_user_opts in
2665       *"
2666 "with_$ac_useropt"
2667 "*) ;;
2668       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2669          ac_unrecognized_sep=', ';;
2670     esac
2671     eval with_$ac_useropt=\$ac_optarg ;;
2672
2673   -without-* | --without-*)
2674     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2675     # Reject names that are not valid shell variable names.
2676     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2677       as_fn_error $? "invalid package name: \`$ac_useropt'"
2678     ac_useropt_orig=$ac_useropt
2679     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2680     case $ac_user_opts in
2681       *"
2682 "with_$ac_useropt"
2683 "*) ;;
2684       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2685          ac_unrecognized_sep=', ';;
2686     esac
2687     eval with_$ac_useropt=no ;;
2688
2689   --x)
2690     # Obsolete; use --with-x.
2691     with_x=yes ;;
2692
2693   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2694   | --x-incl | --x-inc | --x-in | --x-i)
2695     ac_prev=x_includes ;;
2696   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2697   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2698     x_includes=$ac_optarg ;;
2699
2700   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2701   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2702     ac_prev=x_libraries ;;
2703   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2704   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2705     x_libraries=$ac_optarg ;;
2706
2707   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2708 Try \`$0 --help' for more information"
2709     ;;
2710
2711   *=*)
2712     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2713     # Reject names that are not valid shell variable names.
2714     case $ac_envvar in #(
2715       '' | [0-9]* | *[!_$as_cr_alnum]* )
2716       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2717     esac
2718     eval $ac_envvar=\$ac_optarg
2719     export $ac_envvar ;;
2720
2721   *)
2722     # FIXME: should be removed in autoconf 3.0.
2723     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2724     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2725       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2726     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2727     ;;
2728
2729   esac
2730 done
2731
2732 if test -n "$ac_prev"; then
2733   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2734   as_fn_error $? "missing argument to $ac_option"
2735 fi
2736
2737 if test -n "$ac_unrecognized_opts"; then
2738   case $enable_option_checking in
2739     no) ;;
2740     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2741     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2742   esac
2743 fi
2744
2745 # Check all directory arguments for consistency.
2746 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2747                 datadir sysconfdir sharedstatedir localstatedir includedir \
2748                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2749                 libdir localedir mandir runstatedir
2750 do
2751   eval ac_val=\$$ac_var
2752   # Remove trailing slashes.
2753   case $ac_val in
2754     */ )
2755       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2756       eval $ac_var=\$ac_val;;
2757   esac
2758   # Be sure to have absolute directory names.
2759   case $ac_val in
2760     [\\/$]* | ?:[\\/]* )  continue;;
2761     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2762   esac
2763   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2764 done
2765
2766 # There might be people who depend on the old broken behavior: `$host'
2767 # used to hold the argument of --host etc.
2768 # FIXME: To remove some day.
2769 build=$build_alias
2770 host=$host_alias
2771 target=$target_alias
2772
2773 # FIXME: To remove some day.
2774 if test "x$host_alias" != x; then
2775   if test "x$build_alias" = x; then
2776     cross_compiling=maybe
2777   elif test "x$build_alias" != "x$host_alias"; then
2778     cross_compiling=yes
2779   fi
2780 fi
2781
2782 ac_tool_prefix=
2783 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2784
2785 test "$silent" = yes && exec 6>/dev/null
2786
2787
2788 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2789 ac_ls_di=`ls -di .` &&
2790 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2791   as_fn_error $? "working directory cannot be determined"
2792 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2793   as_fn_error $? "pwd does not report name of working directory"
2794
2795
2796 # Find the source files, if location was not specified.
2797 if test -z "$srcdir"; then
2798   ac_srcdir_defaulted=yes
2799   # Try the directory containing this script, then the parent directory.
2800   ac_confdir=`$as_dirname -- "$as_myself" ||
2801 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2802          X"$as_myself" : 'X\(//\)[^/]' \| \
2803          X"$as_myself" : 'X\(//\)$' \| \
2804          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2805 printf "%s\n" X"$as_myself" |
2806     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2807             s//\1/
2808             q
2809           }
2810           /^X\(\/\/\)[^/].*/{
2811             s//\1/
2812             q
2813           }
2814           /^X\(\/\/\)$/{
2815             s//\1/
2816             q
2817           }
2818           /^X\(\/\).*/{
2819             s//\1/
2820             q
2821           }
2822           s/.*/./; q'`
2823   srcdir=$ac_confdir
2824   if test ! -r "$srcdir/$ac_unique_file"; then
2825     srcdir=..
2826   fi
2827 else
2828   ac_srcdir_defaulted=no
2829 fi
2830 if test ! -r "$srcdir/$ac_unique_file"; then
2831   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2832   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2833 fi
2834 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2835 ac_abs_confdir=`(
2836         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2837         pwd)`
2838 # When building in place, set srcdir=.
2839 if test "$ac_abs_confdir" = "$ac_pwd"; then
2840   srcdir=.
2841 fi
2842 # Remove unnecessary trailing slashes from srcdir.
2843 # Double slashes in file names in object file debugging info
2844 # mess up M-x gdb in Emacs.
2845 case $srcdir in
2846 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2847 esac
2848 for ac_var in $ac_precious_vars; do
2849   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2850   eval ac_env_${ac_var}_value=\$${ac_var}
2851   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2852   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2853 done
2854
2855 #
2856 # Report the --help message.
2857 #
2858 if test "$ac_init_help" = "long"; then
2859   # Omit some internal or obsolete options to make the list less imposing.
2860   # This message is too long to be a string in the A/UX 3.1 sh.
2861   cat <<_ACEOF
2862 \`configure' configures GNU M4 1.4.19 to adapt to many kinds of systems.
2863
2864 Usage: $0 [OPTION]... [VAR=VALUE]...
2865
2866 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2867 VAR=VALUE.  See below for descriptions of some of the useful variables.
2868
2869 Defaults for the options are specified in brackets.
2870
2871 Configuration:
2872   -h, --help              display this help and exit
2873       --help=short        display options specific to this package
2874       --help=recursive    display the short help of all the included packages
2875   -V, --version           display version information and exit
2876   -q, --quiet, --silent   do not print \`checking ...' messages
2877       --cache-file=FILE   cache test results in FILE [disabled]
2878   -C, --config-cache      alias for \`--cache-file=config.cache'
2879   -n, --no-create         do not create output files
2880       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2881
2882 Installation directories:
2883   --prefix=PREFIX         install architecture-independent files in PREFIX
2884                           [$ac_default_prefix]
2885   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2886                           [PREFIX]
2887
2888 By default, \`make install' will install all the files in
2889 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2890 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2891 for instance \`--prefix=\$HOME'.
2892
2893 For better control, use the options below.
2894
2895 Fine tuning of the installation directories:
2896   --bindir=DIR            user executables [EPREFIX/bin]
2897   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2898   --libexecdir=DIR        program executables [EPREFIX/libexec]
2899   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2900   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2901   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2902   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2903   --libdir=DIR            object code libraries [EPREFIX/lib]
2904   --includedir=DIR        C header files [PREFIX/include]
2905   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2906   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2907   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2908   --infodir=DIR           info documentation [DATAROOTDIR/info]
2909   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2910   --mandir=DIR            man documentation [DATAROOTDIR/man]
2911   --docdir=DIR            documentation root [DATAROOTDIR/doc/m4]
2912   --htmldir=DIR           html documentation [DOCDIR]
2913   --dvidir=DIR            dvi documentation [DOCDIR]
2914   --pdfdir=DIR            pdf documentation [DOCDIR]
2915   --psdir=DIR             ps documentation [DOCDIR]
2916 _ACEOF
2917
2918   cat <<\_ACEOF
2919
2920 Program names:
2921   --program-prefix=PREFIX            prepend PREFIX to installed program names
2922   --program-suffix=SUFFIX            append SUFFIX to installed program names
2923   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2924
2925 System types:
2926   --build=BUILD     configure for building on BUILD [guessed]
2927   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2928 _ACEOF
2929 fi
2930
2931 if test -n "$ac_init_help"; then
2932   case $ac_init_help in
2933      short | recursive ) echo "Configuration of GNU M4 1.4.19:";;
2934    esac
2935   cat <<\_ACEOF
2936
2937 Optional Features:
2938   --disable-option-checking  ignore unrecognized --enable/--with options
2939   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2940   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2941   --enable-silent-rules   less verbose build output (undo: "make V=1")
2942   --disable-silent-rules  verbose build output (undo: "make V=0")
2943   --enable-dependency-tracking
2944                           do not reject slow dependency extractors
2945   --disable-dependency-tracking
2946                           speeds up one-time build
2947   --enable-c++            also build C++ sources
2948   --disable-largefile     omit support for large files
2949   --enable-threads={isoc|posix|isoc+posix|windows}
2950                           specify multithreading API
2951   --disable-threads       build without multithread safety
2952   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2953   --enable-cross-guesses={conservative|risky}
2954                           specify policy for cross-compilation guesses
2955   --disable-assert        turn off assertions
2956   --disable-rpath         do not hardcode runtime library paths
2957   --enable-changeword     enable -W and changeword() builtin
2958   --disable-nls           do not use Native Language Support
2959
2960 Optional Packages:
2961   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2962   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2963   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2964   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2965   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2966   --without-included-regex
2967                           don't compile regex; this is the default on systems
2968                           with recent-enough versions of the GNU C Library
2969                           (use with caution on other systems).
2970   --with-libsigsegv       use the GNU libsigsegv library, when present,
2971                           instead of the gnulib module 'sigsegv'
2972   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2973   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2974   --with-packager         String identifying the packager of this software
2975   --with-packager-version Packager-specific version information
2976   --with-packager-bug-reports
2977                           Packager info for bug reports (URL/e-mail/...)
2978   --with-syscmd-shell     shell used by syscmd [/bin/sh]
2979   --with-dmalloc          use dmalloc, as in dmalloc.tar.gz from
2980                           @/ftp.antaire.com:antaire/src/dmalloc.
2981   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2982   --without-libintl-prefix     don't search for libintl in includedir and libdir
2983
2984 Some influential environment variables:
2985   CC          C compiler command
2986   CFLAGS      C compiler flags
2987   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2988               nonstandard directory <lib dir>
2989   LIBS        libraries to pass to the linker, e.g. -l<library>
2990   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2991               you have headers in a nonstandard directory <include dir>
2992   CPP         C preprocessor
2993   CXX         C++ compiler command
2994   CXXFLAGS    C++ compiler flags
2995
2996 Use these variables to override the choices made by `configure' or to help
2997 it to find libraries and programs with nonstandard names/locations.
2998
2999 Report bugs to <bug-m4@gnu.org>.
3000 GNU M4 home page: <https://www.gnu.org/software/m4/>.
3001 General help using GNU software: <https://www.gnu.org/gethelp/>.
3002 _ACEOF
3003 ac_status=$?
3004 fi
3005
3006 if test "$ac_init_help" = "recursive"; then
3007   # If there are subdirs, report their specific --help.
3008   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3009     test -d "$ac_dir" ||
3010       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
3011       continue
3012     ac_builddir=.
3013
3014 case "$ac_dir" in
3015 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
3016 *)
3017   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
3018   # A ".." for each directory in $ac_dir_suffix.
3019   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3020   case $ac_top_builddir_sub in
3021   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
3022   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
3023   esac ;;
3024 esac
3025 ac_abs_top_builddir=$ac_pwd
3026 ac_abs_builddir=$ac_pwd$ac_dir_suffix
3027 # for backward compatibility:
3028 ac_top_builddir=$ac_top_build_prefix
3029
3030 case $srcdir in
3031   .)  # We are building in place.
3032     ac_srcdir=.
3033     ac_top_srcdir=$ac_top_builddir_sub
3034     ac_abs_top_srcdir=$ac_pwd ;;
3035   [\\/]* | ?:[\\/]* )  # Absolute name.
3036     ac_srcdir=$srcdir$ac_dir_suffix;
3037     ac_top_srcdir=$srcdir
3038     ac_abs_top_srcdir=$srcdir ;;
3039   *) # Relative name.
3040     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
3041     ac_top_srcdir=$ac_top_build_prefix$srcdir
3042     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3043 esac
3044 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3045
3046     cd "$ac_dir" || { ac_status=$?; continue; }
3047     # Check for configure.gnu first; this name is used for a wrapper for
3048     # Metaconfig's "Configure" on case-insensitive file systems.
3049     if test -f "$ac_srcdir/configure.gnu"; then
3050       echo &&
3051       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
3052     elif test -f "$ac_srcdir/configure"; then
3053       echo &&
3054       $SHELL "$ac_srcdir/configure" --help=recursive
3055     else
3056       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3057     fi || ac_status=$?
3058     cd "$ac_pwd" || { ac_status=$?; break; }
3059   done
3060 fi
3061
3062 test -n "$ac_init_help" && exit $ac_status
3063 if $ac_init_version; then
3064   cat <<\_ACEOF
3065 GNU M4 configure 1.4.19
3066 generated by GNU Autoconf 2.71
3067
3068 Copyright (C) 2021 Free Software Foundation, Inc.
3069 This configure script is free software; the Free Software Foundation
3070 gives unlimited permission to copy, distribute and modify it.
3071 _ACEOF
3072   exit
3073 fi
3074
3075 ## ------------------------ ##
3076 ## Autoconf initialization. ##
3077 ## ------------------------ ##
3078
3079 # ac_fn_c_try_compile LINENO
3080 # --------------------------
3081 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3082 ac_fn_c_try_compile ()
3083 {
3084   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3085   rm -f conftest.$ac_objext conftest.beam
3086   if { { ac_try="$ac_compile"
3087 case "(($ac_try" in
3088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089   *) ac_try_echo=$ac_try;;
3090 esac
3091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092 printf "%s\n" "$ac_try_echo"; } >&5
3093   (eval "$ac_compile") 2>conftest.err
3094   ac_status=$?
3095   if test -s conftest.err; then
3096     grep -v '^ *+' conftest.err >conftest.er1
3097     cat conftest.er1 >&5
3098     mv -f conftest.er1 conftest.err
3099   fi
3100   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101   test $ac_status = 0; } && {
3102          test -z "$ac_c_werror_flag" ||
3103          test ! -s conftest.err
3104        } && test -s conftest.$ac_objext
3105 then :
3106   ac_retval=0
3107 else $as_nop
3108   printf "%s\n" "$as_me: failed program was:" >&5
3109 sed 's/^/| /' conftest.$ac_ext >&5
3110
3111         ac_retval=1
3112 fi
3113   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3114   as_fn_set_status $ac_retval
3115
3116 } # ac_fn_c_try_compile
3117
3118 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3119 # -------------------------------------------------------
3120 # Tests whether HEADER exists and can be compiled using the include files in
3121 # INCLUDES, setting the cache variable VAR accordingly.
3122 ac_fn_c_check_header_compile ()
3123 {
3124   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3125   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3126 printf %s "checking for $2... " >&6; }
3127 if eval test \${$3+y}
3128 then :
3129   printf %s "(cached) " >&6
3130 else $as_nop
3131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3132 /* end confdefs.h.  */
3133 $4
3134 #include <$2>
3135 _ACEOF
3136 if ac_fn_c_try_compile "$LINENO"
3137 then :
3138   eval "$3=yes"
3139 else $as_nop
3140   eval "$3=no"
3141 fi
3142 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3143 fi
3144 eval ac_res=\$$3
3145                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3146 printf "%s\n" "$ac_res" >&6; }
3147   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3148
3149 } # ac_fn_c_check_header_compile
3150
3151 # ac_fn_c_try_cpp LINENO
3152 # ----------------------
3153 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3154 ac_fn_c_try_cpp ()
3155 {
3156   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3157   if { { ac_try="$ac_cpp conftest.$ac_ext"
3158 case "(($ac_try" in
3159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160   *) ac_try_echo=$ac_try;;
3161 esac
3162 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3163 printf "%s\n" "$ac_try_echo"; } >&5
3164   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3165   ac_status=$?
3166   if test -s conftest.err; then
3167     grep -v '^ *+' conftest.err >conftest.er1
3168     cat conftest.er1 >&5
3169     mv -f conftest.er1 conftest.err
3170   fi
3171   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3172   test $ac_status = 0; } > conftest.i && {
3173          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3174          test ! -s conftest.err
3175        }
3176 then :
3177   ac_retval=0
3178 else $as_nop
3179   printf "%s\n" "$as_me: failed program was:" >&5
3180 sed 's/^/| /' conftest.$ac_ext >&5
3181
3182     ac_retval=1
3183 fi
3184   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3185   as_fn_set_status $ac_retval
3186
3187 } # ac_fn_c_try_cpp
3188
3189 # ac_fn_cxx_try_compile LINENO
3190 # ----------------------------
3191 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3192 ac_fn_cxx_try_compile ()
3193 {
3194   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3195   rm -f conftest.$ac_objext conftest.beam
3196   if { { ac_try="$ac_compile"
3197 case "(($ac_try" in
3198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199   *) ac_try_echo=$ac_try;;
3200 esac
3201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3202 printf "%s\n" "$ac_try_echo"; } >&5
3203   (eval "$ac_compile") 2>conftest.err
3204   ac_status=$?
3205   if test -s conftest.err; then
3206     grep -v '^ *+' conftest.err >conftest.er1
3207     cat conftest.er1 >&5
3208     mv -f conftest.er1 conftest.err
3209   fi
3210   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211   test $ac_status = 0; } && {
3212          test -z "$ac_cxx_werror_flag" ||
3213          test ! -s conftest.err
3214        } && test -s conftest.$ac_objext
3215 then :
3216   ac_retval=0
3217 else $as_nop
3218   printf "%s\n" "$as_me: failed program was:" >&5
3219 sed 's/^/| /' conftest.$ac_ext >&5
3220
3221         ac_retval=1
3222 fi
3223   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3224   as_fn_set_status $ac_retval
3225
3226 } # ac_fn_cxx_try_compile
3227
3228 # ac_fn_c_try_link LINENO
3229 # -----------------------
3230 # Try to link conftest.$ac_ext, and return whether this succeeded.
3231 ac_fn_c_try_link ()
3232 {
3233   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3234   rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3235   if { { ac_try="$ac_link"
3236 case "(($ac_try" in
3237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238   *) ac_try_echo=$ac_try;;
3239 esac
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 printf "%s\n" "$ac_try_echo"; } >&5
3242   (eval "$ac_link") 2>conftest.err
3243   ac_status=$?
3244   if test -s conftest.err; then
3245     grep -v '^ *+' conftest.err >conftest.er1
3246     cat conftest.er1 >&5
3247     mv -f conftest.er1 conftest.err
3248   fi
3249   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3250   test $ac_status = 0; } && {
3251          test -z "$ac_c_werror_flag" ||
3252          test ! -s conftest.err
3253        } && test -s conftest$ac_exeext && {
3254          test "$cross_compiling" = yes ||
3255          test -x conftest$ac_exeext
3256        }
3257 then :
3258   ac_retval=0
3259 else $as_nop
3260   printf "%s\n" "$as_me: failed program was:" >&5
3261 sed 's/^/| /' conftest.$ac_ext >&5
3262
3263         ac_retval=1
3264 fi
3265   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3266   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3267   # interfere with the next link command; also delete a directory that is
3268   # left behind by Apple's compiler.  We do this before executing the actions.
3269   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3270   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3271   as_fn_set_status $ac_retval
3272
3273 } # ac_fn_c_try_link
3274
3275 # ac_fn_c_try_run LINENO
3276 # ----------------------
3277 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3278 # executables *can* be run.
3279 ac_fn_c_try_run ()
3280 {
3281   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3282   if { { ac_try="$ac_link"
3283 case "(($ac_try" in
3284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285   *) ac_try_echo=$ac_try;;
3286 esac
3287 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3288 printf "%s\n" "$ac_try_echo"; } >&5
3289   (eval "$ac_link") 2>&5
3290   ac_status=$?
3291   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3292   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3293   { { case "(($ac_try" in
3294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3295   *) ac_try_echo=$ac_try;;
3296 esac
3297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3298 printf "%s\n" "$ac_try_echo"; } >&5
3299   (eval "$ac_try") 2>&5
3300   ac_status=$?
3301   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302   test $ac_status = 0; }; }
3303 then :
3304   ac_retval=0
3305 else $as_nop
3306   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3307        printf "%s\n" "$as_me: failed program was:" >&5
3308 sed 's/^/| /' conftest.$ac_ext >&5
3309
3310        ac_retval=$ac_status
3311 fi
3312   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3313   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3314   as_fn_set_status $ac_retval
3315
3316 } # ac_fn_c_try_run
3317
3318 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3319 # -------------------------------------------
3320 # Tests whether TYPE exists after having included INCLUDES, setting cache
3321 # variable VAR accordingly.
3322 ac_fn_c_check_type ()
3323 {
3324   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3325   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3326 printf %s "checking for $2... " >&6; }
3327 if eval test \${$3+y}
3328 then :
3329   printf %s "(cached) " >&6
3330 else $as_nop
3331   eval "$3=no"
3332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3333 /* end confdefs.h.  */
3334 $4
3335 int
3336 main (void)
3337 {
3338 if (sizeof ($2))
3339          return 0;
3340   ;
3341   return 0;
3342 }
3343 _ACEOF
3344 if ac_fn_c_try_compile "$LINENO"
3345 then :
3346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3347 /* end confdefs.h.  */
3348 $4
3349 int
3350 main (void)
3351 {
3352 if (sizeof (($2)))
3353             return 0;
3354   ;
3355   return 0;
3356 }
3357 _ACEOF
3358 if ac_fn_c_try_compile "$LINENO"
3359 then :
3360
3361 else $as_nop
3362   eval "$3=yes"
3363 fi
3364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3365 fi
3366 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3367 fi
3368 eval ac_res=\$$3
3369                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3370 printf "%s\n" "$ac_res" >&6; }
3371   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3372
3373 } # ac_fn_c_check_type
3374
3375 # ac_fn_c_check_func LINENO FUNC VAR
3376 # ----------------------------------
3377 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3378 ac_fn_c_check_func ()
3379 {
3380   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3381   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3382 printf %s "checking for $2... " >&6; }
3383 if eval test \${$3+y}
3384 then :
3385   printf %s "(cached) " >&6
3386 else $as_nop
3387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3388 /* end confdefs.h.  */
3389 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3390    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3391 #define $2 innocuous_$2
3392
3393 /* System header to define __stub macros and hopefully few prototypes,
3394    which can conflict with char $2 (); below.  */
3395
3396 #include <limits.h>
3397 #undef $2
3398
3399 /* Override any GCC internal prototype to avoid an error.
3400    Use char because int might match the return type of a GCC
3401    builtin and then its argument prototype would still apply.  */
3402 #ifdef __cplusplus
3403 extern "C"
3404 #endif
3405 char $2 ();
3406 /* The GNU C library defines this for functions which it implements
3407     to always fail with ENOSYS.  Some functions are actually named
3408     something starting with __ and the normal name is an alias.  */
3409 #if defined __stub_$2 || defined __stub___$2
3410 choke me
3411 #endif
3412
3413 int
3414 main (void)
3415 {
3416 return $2 ();
3417   ;
3418   return 0;
3419 }
3420 _ACEOF
3421 if ac_fn_c_try_link "$LINENO"
3422 then :
3423   eval "$3=yes"
3424 else $as_nop
3425   eval "$3=no"
3426 fi
3427 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3428     conftest$ac_exeext conftest.$ac_ext
3429 fi
3430 eval ac_res=\$$3
3431                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3432 printf "%s\n" "$ac_res" >&6; }
3433   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3434
3435 } # ac_fn_c_check_func
3436
3437 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3438 # ------------------------------------------------------------------
3439 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3440 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3441 ac_fn_check_decl ()
3442 {
3443   ac_save_ac_compile="$ac_compile"
3444   if test -n "$ac_compile_for_check_decl"; then
3445     ac_compile="$ac_compile_for_check_decl"
3446   fi
3447   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3448   as_decl_name=`echo $2|sed 's/ *(.*//'`
3449   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3450 printf %s "checking whether $as_decl_name is declared... " >&6; }
3451 if eval test \${$3+y}
3452 then :
3453   printf %s "(cached) " >&6
3454 else $as_nop
3455   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3456   eval ac_save_FLAGS=\$$6
3457   as_fn_append $6 " $5"
3458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3459 /* end confdefs.h.  */
3460 $4
3461 int
3462 main (void)
3463 {
3464 #ifndef $as_decl_name
3465 #ifdef __cplusplus
3466   (void) $as_decl_use;
3467 #else
3468   (void) $as_decl_name;
3469 #endif
3470 #endif
3471
3472   ;
3473   return 0;
3474 }
3475 _ACEOF
3476 if ac_fn_c_try_compile "$LINENO"
3477 then :
3478   eval "$3=yes"
3479 else $as_nop
3480   eval "$3=no"
3481 fi
3482 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3483   eval $6=\$ac_save_FLAGS
3484
3485 fi
3486 eval ac_res=\$$3
3487                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3488 printf "%s\n" "$ac_res" >&6; }
3489   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3490   ac_compile="$ac_save_ac_compile"
3491
3492 } # ac_fn_check_decl
3493
3494 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3495 # --------------------------------------------
3496 # Tries to find the compile-time value of EXPR in a program that includes
3497 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3498 # computed
3499 ac_fn_c_compute_int ()
3500 {
3501   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3502   if test "$cross_compiling" = yes; then
3503     # Depending upon the size, compute the lo and hi bounds.
3504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3505 /* end confdefs.h.  */
3506 $4
3507 int
3508 main (void)
3509 {
3510 static int test_array [1 - 2 * !(($2) >= 0)];
3511 test_array [0] = 0;
3512 return test_array [0];
3513
3514   ;
3515   return 0;
3516 }
3517 _ACEOF
3518 if ac_fn_c_try_compile "$LINENO"
3519 then :
3520   ac_lo=0 ac_mid=0
3521   while :; do
3522     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3523 /* end confdefs.h.  */
3524 $4
3525 int
3526 main (void)
3527 {
3528 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3529 test_array [0] = 0;
3530 return test_array [0];
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 if ac_fn_c_try_compile "$LINENO"
3537 then :
3538   ac_hi=$ac_mid; break
3539 else $as_nop
3540   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3541                         if test $ac_lo -le $ac_mid; then
3542                           ac_lo= ac_hi=
3543                           break
3544                         fi
3545                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3546 fi
3547 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3548   done
3549 else $as_nop
3550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3551 /* end confdefs.h.  */
3552 $4
3553 int
3554 main (void)
3555 {
3556 static int test_array [1 - 2 * !(($2) < 0)];
3557 test_array [0] = 0;
3558 return test_array [0];
3559
3560   ;
3561   return 0;
3562 }
3563 _ACEOF
3564 if ac_fn_c_try_compile "$LINENO"
3565 then :
3566   ac_hi=-1 ac_mid=-1
3567   while :; do
3568     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3569 /* end confdefs.h.  */
3570 $4
3571 int
3572 main (void)
3573 {
3574 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3575 test_array [0] = 0;
3576 return test_array [0];
3577
3578   ;
3579   return 0;
3580 }
3581 _ACEOF
3582 if ac_fn_c_try_compile "$LINENO"
3583 then :
3584   ac_lo=$ac_mid; break
3585 else $as_nop
3586   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3587                         if test $ac_mid -le $ac_hi; then
3588                           ac_lo= ac_hi=
3589                           break
3590                         fi
3591                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3592 fi
3593 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3594   done
3595 else $as_nop
3596   ac_lo= ac_hi=
3597 fi
3598 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3599 fi
3600 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3601 # Binary search between lo and hi bounds.
3602 while test "x$ac_lo" != "x$ac_hi"; do
3603   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3605 /* end confdefs.h.  */
3606 $4
3607 int
3608 main (void)
3609 {
3610 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3611 test_array [0] = 0;
3612 return test_array [0];
3613
3614   ;
3615   return 0;
3616 }
3617 _ACEOF
3618 if ac_fn_c_try_compile "$LINENO"
3619 then :
3620   ac_hi=$ac_mid
3621 else $as_nop
3622   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3623 fi
3624 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3625 done
3626 case $ac_lo in #((
3627 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3628 '') ac_retval=1 ;;
3629 esac
3630   else
3631     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3632 /* end confdefs.h.  */
3633 $4
3634 static long int longval (void) { return $2; }
3635 static unsigned long int ulongval (void) { return $2; }
3636 #include <stdio.h>
3637 #include <stdlib.h>
3638 int
3639 main (void)
3640 {
3641
3642   FILE *f = fopen ("conftest.val", "w");
3643   if (! f)
3644     return 1;
3645   if (($2) < 0)
3646     {
3647       long int i = longval ();
3648       if (i != ($2))
3649         return 1;
3650       fprintf (f, "%ld", i);
3651     }
3652   else
3653     {
3654       unsigned long int i = ulongval ();
3655       if (i != ($2))
3656         return 1;
3657       fprintf (f, "%lu", i);
3658     }
3659   /* Do not output a trailing newline, as this causes \r\n confusion
3660      on some platforms.  */
3661   return ferror (f) || fclose (f) != 0;
3662
3663   ;
3664   return 0;
3665 }
3666 _ACEOF
3667 if ac_fn_c_try_run "$LINENO"
3668 then :
3669   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3670 else $as_nop
3671   ac_retval=1
3672 fi
3673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3674   conftest.$ac_objext conftest.beam conftest.$ac_ext
3675 rm -f conftest.val
3676
3677   fi
3678   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3679   as_fn_set_status $ac_retval
3680
3681 } # ac_fn_c_compute_int
3682
3683 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3684 # ----------------------------------------------------
3685 # Tries to find if the field MEMBER exists in type AGGR, after including
3686 # INCLUDES, setting cache variable VAR accordingly.
3687 ac_fn_c_check_member ()
3688 {
3689   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3690   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3691 printf %s "checking for $2.$3... " >&6; }
3692 if eval test \${$4+y}
3693 then :
3694   printf %s "(cached) " >&6
3695 else $as_nop
3696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697 /* end confdefs.h.  */
3698 $5
3699 int
3700 main (void)
3701 {
3702 static $2 ac_aggr;
3703 if (ac_aggr.$3)
3704 return 0;
3705   ;
3706   return 0;
3707 }
3708 _ACEOF
3709 if ac_fn_c_try_compile "$LINENO"
3710 then :
3711   eval "$4=yes"
3712 else $as_nop
3713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3714 /* end confdefs.h.  */
3715 $5
3716 int
3717 main (void)
3718 {
3719 static $2 ac_aggr;
3720 if (sizeof ac_aggr.$3)
3721 return 0;
3722   ;
3723   return 0;
3724 }
3725 _ACEOF
3726 if ac_fn_c_try_compile "$LINENO"
3727 then :
3728   eval "$4=yes"
3729 else $as_nop
3730   eval "$4=no"
3731 fi
3732 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3733 fi
3734 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3735 fi
3736 eval ac_res=\$$4
3737                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3738 printf "%s\n" "$ac_res" >&6; }
3739   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3740
3741 } # ac_fn_c_check_member
3742 ac_configure_args_raw=
3743 for ac_arg
3744 do
3745   case $ac_arg in
3746   *\'*)
3747     ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3748   esac
3749   as_fn_append ac_configure_args_raw " '$ac_arg'"
3750 done
3751
3752 case $ac_configure_args_raw in
3753   *$as_nl*)
3754     ac_safe_unquote= ;;
3755   *)
3756     ac_unsafe_z='|&;<>()$`\\"*?[ ''     ' # This string ends in space, tab.
3757     ac_unsafe_a="$ac_unsafe_z#~"
3758     ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3759     ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3760 esac
3761
3762 cat >config.log <<_ACEOF
3763 This file contains any messages produced by compilers while
3764 running configure, to aid debugging if configure makes a mistake.
3765
3766 It was created by GNU M4 $as_me 1.4.19, which was
3767 generated by GNU Autoconf 2.71.  Invocation command line was
3768
3769   $ $0$ac_configure_args_raw
3770
3771 _ACEOF
3772 exec 5>>config.log
3773 {
3774 cat <<_ASUNAME
3775 ## --------- ##
3776 ## Platform. ##
3777 ## --------- ##
3778
3779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3784
3785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3786 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3787
3788 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3789 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3791 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3792 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3793 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3794 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3795
3796 _ASUNAME
3797
3798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799 for as_dir in $PATH
3800 do
3801   IFS=$as_save_IFS
3802   case $as_dir in #(((
3803     '') as_dir=./ ;;
3804     */) ;;
3805     *) as_dir=$as_dir/ ;;
3806   esac
3807     printf "%s\n" "PATH: $as_dir"
3808   done
3809 IFS=$as_save_IFS
3810
3811 } >&5
3812
3813 cat >&5 <<_ACEOF
3814
3815
3816 ## ----------- ##
3817 ## Core tests. ##
3818 ## ----------- ##
3819
3820 _ACEOF
3821
3822
3823 # Keep a trace of the command line.
3824 # Strip out --no-create and --no-recursion so they do not pile up.
3825 # Strip out --silent because we don't want to record it for future runs.
3826 # Also quote any args containing shell meta-characters.
3827 # Make two passes to allow for proper duplicate-argument suppression.
3828 ac_configure_args=
3829 ac_configure_args0=
3830 ac_configure_args1=
3831 ac_must_keep_next=false
3832 for ac_pass in 1 2
3833 do
3834   for ac_arg
3835   do
3836     case $ac_arg in
3837     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3838     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3839     | -silent | --silent | --silen | --sile | --sil)
3840       continue ;;
3841     *\'*)
3842       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3843     esac
3844     case $ac_pass in
3845     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3846     2)
3847       as_fn_append ac_configure_args1 " '$ac_arg'"
3848       if test $ac_must_keep_next = true; then
3849         ac_must_keep_next=false # Got value, back to normal.
3850       else
3851         case $ac_arg in
3852           *=* | --config-cache | -C | -disable-* | --disable-* \
3853           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3854           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3855           | -with-* | --with-* | -without-* | --without-* | --x)
3856             case "$ac_configure_args0 " in
3857               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3858             esac
3859             ;;
3860           -* ) ac_must_keep_next=true ;;
3861         esac
3862       fi
3863       as_fn_append ac_configure_args " '$ac_arg'"
3864       ;;
3865     esac
3866   done
3867 done
3868 { ac_configure_args0=; unset ac_configure_args0;}
3869 { ac_configure_args1=; unset ac_configure_args1;}
3870
3871 # When interrupted or exit'd, cleanup temporary files, and complete
3872 # config.log.  We remove comments because anyway the quotes in there
3873 # would cause problems or look ugly.
3874 # WARNING: Use '\'' to represent an apostrophe within the trap.
3875 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3876 trap 'exit_status=$?
3877   # Sanitize IFS.
3878   IFS=" ""      $as_nl"
3879   # Save into config.log some information that might help in debugging.
3880   {
3881     echo
3882
3883     printf "%s\n" "## ---------------- ##
3884 ## Cache variables. ##
3885 ## ---------------- ##"
3886     echo
3887     # The following way of writing the cache mishandles newlines in values,
3888 (
3889   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3890     eval ac_val=\$$ac_var
3891     case $ac_val in #(
3892     *${as_nl}*)
3893       case $ac_var in #(
3894       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3895 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3896       esac
3897       case $ac_var in #(
3898       _ | IFS | as_nl) ;; #(
3899       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3900       *) { eval $ac_var=; unset $ac_var;} ;;
3901       esac ;;
3902     esac
3903   done
3904   (set) 2>&1 |
3905     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3906     *${as_nl}ac_space=\ *)
3907       sed -n \
3908         "s/'\''/'\''\\\\'\'''\''/g;
3909           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3910       ;; #(
3911     *)
3912       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3913       ;;
3914     esac |
3915     sort
3916 )
3917     echo
3918
3919     printf "%s\n" "## ----------------- ##
3920 ## Output variables. ##
3921 ## ----------------- ##"
3922     echo
3923     for ac_var in $ac_subst_vars
3924     do
3925       eval ac_val=\$$ac_var
3926       case $ac_val in
3927       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3928       esac
3929       printf "%s\n" "$ac_var='\''$ac_val'\''"
3930     done | sort
3931     echo
3932
3933     if test -n "$ac_subst_files"; then
3934       printf "%s\n" "## ------------------- ##
3935 ## File substitutions. ##
3936 ## ------------------- ##"
3937       echo
3938       for ac_var in $ac_subst_files
3939       do
3940         eval ac_val=\$$ac_var
3941         case $ac_val in
3942         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3943         esac
3944         printf "%s\n" "$ac_var='\''$ac_val'\''"
3945       done | sort
3946       echo
3947     fi
3948
3949     if test -s confdefs.h; then
3950       printf "%s\n" "## ----------- ##
3951 ## confdefs.h. ##
3952 ## ----------- ##"
3953       echo
3954       cat confdefs.h
3955       echo
3956     fi
3957     test "$ac_signal" != 0 &&
3958       printf "%s\n" "$as_me: caught signal $ac_signal"
3959     printf "%s\n" "$as_me: exit $exit_status"
3960   } >&5
3961   rm -f core *.core core.conftest.* &&
3962     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3963     exit $exit_status
3964 ' 0
3965 for ac_signal in 1 2 13 15; do
3966   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3967 done
3968 ac_signal=0
3969
3970 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3971 rm -f -r conftest* confdefs.h
3972
3973 printf "%s\n" "/* confdefs.h */" > confdefs.h
3974
3975 # Predefined preprocessor variables.
3976
3977 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3978
3979 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3980
3981 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3982
3983 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3984
3985 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3986
3987 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3988
3989
3990 # Let the site file select an alternate cache file if it wants to.
3991 # Prefer an explicitly selected file to automatically selected ones.
3992 if test -n "$CONFIG_SITE"; then
3993   ac_site_files="$CONFIG_SITE"
3994 elif test "x$prefix" != xNONE; then
3995   ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3996 else
3997   ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3998 fi
3999
4000 for ac_site_file in $ac_site_files
4001 do
4002   case $ac_site_file in #(
4003   */*) :
4004      ;; #(
4005   *) :
4006     ac_site_file=./$ac_site_file ;;
4007 esac
4008   if test -f "$ac_site_file" && test -r "$ac_site_file"; then
4009     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
4010 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
4011     sed 's/^/| /' "$ac_site_file" >&5
4012     . "$ac_site_file" \
4013       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4015 as_fn_error $? "failed to load site script $ac_site_file
4016 See \`config.log' for more details" "$LINENO" 5; }
4017   fi
4018 done
4019
4020 if test -r "$cache_file"; then
4021   # Some versions of bash will fail to source /dev/null (special files
4022   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
4023   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4024     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4025 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
4026     case $cache_file in
4027       [\\/]* | ?:[\\/]* ) . "$cache_file";;
4028       *)                      . "./$cache_file";;
4029     esac
4030   fi
4031 else
4032   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4033 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
4034   >$cache_file
4035 fi
4036
4037 # Test code for whether the C compiler supports C89 (global declarations)
4038 ac_c_conftest_c89_globals='
4039 /* Does the compiler advertise C89 conformance?
4040    Do not test the value of __STDC__, because some compilers set it to 0
4041    while being otherwise adequately conformant. */
4042 #if !defined __STDC__
4043 # error "Compiler does not advertise C89 conformance"
4044 #endif
4045
4046 #include <stddef.h>
4047 #include <stdarg.h>
4048 struct stat;
4049 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
4050 struct buf { int x; };
4051 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
4052 static char *e (p, i)
4053      char **p;
4054      int i;
4055 {
4056   return p[i];
4057 }
4058 static char *f (char * (*g) (char **, int), char **p, ...)
4059 {
4060   char *s;
4061   va_list v;
4062   va_start (v,p);
4063   s = g (p, va_arg (v,int));
4064   va_end (v);
4065   return s;
4066 }
4067
4068 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4069    function prototypes and stuff, but not \xHH hex character constants.
4070    These do not provoke an error unfortunately, instead are silently treated
4071    as an "x".  The following induces an error, until -std is added to get
4072    proper ANSI mode.  Curiously \x00 != x always comes out true, for an
4073    array size at least.  It is necessary to write \x00 == 0 to get something
4074    that is true only with -std.  */
4075 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
4076
4077 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4078    inside strings and character constants.  */
4079 #define FOO(x) '\''x'\''
4080 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
4081
4082 int test (int i, double x);
4083 struct s1 {int (*f) (int a);};
4084 struct s2 {int (*f) (double a);};
4085 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
4086                int, int);'
4087
4088 # Test code for whether the C compiler supports C89 (body of main).
4089 ac_c_conftest_c89_main='
4090 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
4091 '
4092
4093 # Test code for whether the C compiler supports C99 (global declarations)
4094 ac_c_conftest_c99_globals='
4095 // Does the compiler advertise C99 conformance?
4096 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4097 # error "Compiler does not advertise C99 conformance"
4098 #endif
4099
4100 #include <stdbool.h>
4101 extern int puts (const char *);
4102 extern int printf (const char *, ...);
4103 extern int dprintf (int, const char *, ...);
4104 extern void *malloc (size_t);
4105
4106 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4107 // dprintf is used instead of fprintf to avoid needing to declare
4108 // FILE and stderr.
4109 #define debug(...) dprintf (2, __VA_ARGS__)
4110 #define showlist(...) puts (#__VA_ARGS__)
4111 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4112 static void
4113 test_varargs_macros (void)
4114 {
4115   int x = 1234;
4116   int y = 5678;
4117   debug ("Flag");
4118   debug ("X = %d\n", x);
4119   showlist (The first, second, and third items.);
4120   report (x>y, "x is %d but y is %d", x, y);
4121 }
4122
4123 // Check long long types.
4124 #define BIG64 18446744073709551615ull
4125 #define BIG32 4294967295ul
4126 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4127 #if !BIG_OK
4128   #error "your preprocessor is broken"
4129 #endif
4130 #if BIG_OK
4131 #else
4132   #error "your preprocessor is broken"
4133 #endif
4134 static long long int bignum = -9223372036854775807LL;
4135 static unsigned long long int ubignum = BIG64;
4136
4137 struct incomplete_array
4138 {
4139   int datasize;
4140   double data[];
4141 };
4142
4143 struct named_init {
4144   int number;
4145   const wchar_t *name;
4146   double average;
4147 };
4148
4149 typedef const char *ccp;
4150
4151 static inline int
4152 test_restrict (ccp restrict text)
4153 {
4154   // See if C++-style comments work.
4155   // Iterate through items via the restricted pointer.
4156   // Also check for declarations in for loops.
4157   for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4158     continue;
4159   return 0;
4160 }
4161
4162 // Check varargs and va_copy.
4163 static bool
4164 test_varargs (const char *format, ...)
4165 {
4166   va_list args;
4167   va_start (args, format);
4168   va_list args_copy;
4169   va_copy (args_copy, args);
4170
4171   const char *str = "";
4172   int number = 0;
4173   float fnumber = 0;
4174
4175   while (*format)
4176     {
4177       switch (*format++)
4178         {
4179         case '\''s'\'': // string
4180           str = va_arg (args_copy, const char *);
4181           break;
4182         case '\''d'\'': // int
4183           number = va_arg (args_copy, int);
4184           break;
4185         case '\''f'\'': // float
4186           fnumber = va_arg (args_copy, double);
4187           break;
4188         default:
4189           break;
4190         }
4191     }
4192   va_end (args_copy);
4193   va_end (args);
4194
4195   return *str && number && fnumber;
4196 }
4197 '
4198
4199 # Test code for whether the C compiler supports C99 (body of main).
4200 ac_c_conftest_c99_main='
4201   // Check bool.
4202   _Bool success = false;
4203   success |= (argc != 0);
4204
4205   // Check restrict.
4206   if (test_restrict ("String literal") == 0)
4207     success = true;
4208   char *restrict newvar = "Another string";
4209
4210   // Check varargs.
4211   success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4212   test_varargs_macros ();
4213
4214   // Check flexible array members.
4215   struct incomplete_array *ia =
4216     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4217   ia->datasize = 10;
4218   for (int i = 0; i < ia->datasize; ++i)
4219     ia->data[i] = i * 1.234;
4220
4221   // Check named initializers.
4222   struct named_init ni = {
4223     .number = 34,
4224     .name = L"Test wide string",
4225     .average = 543.34343,
4226   };
4227
4228   ni.number = 58;
4229
4230   int dynamic_array[ni.number];
4231   dynamic_array[0] = argv[0][0];
4232   dynamic_array[ni.number - 1] = 543;
4233
4234   // work around unused variable warnings
4235   ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4236          || dynamic_array[ni.number - 1] != 543);
4237 '
4238
4239 # Test code for whether the C compiler supports C11 (global declarations)
4240 ac_c_conftest_c11_globals='
4241 // Does the compiler advertise C11 conformance?
4242 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4243 # error "Compiler does not advertise C11 conformance"
4244 #endif
4245
4246 // Check _Alignas.
4247 char _Alignas (double) aligned_as_double;
4248 char _Alignas (0) no_special_alignment;
4249 extern char aligned_as_int;
4250 char _Alignas (0) _Alignas (int) aligned_as_int;
4251
4252 // Check _Alignof.
4253 enum
4254 {
4255   int_alignment = _Alignof (int),
4256   int_array_alignment = _Alignof (int[100]),
4257   char_alignment = _Alignof (char)
4258 };
4259 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4260
4261 // Check _Noreturn.
4262 int _Noreturn does_not_return (void) { for (;;) continue; }
4263
4264 // Check _Static_assert.
4265 struct test_static_assert
4266 {
4267   int x;
4268   _Static_assert (sizeof (int) <= sizeof (long int),
4269                   "_Static_assert does not work in struct");
4270   long int y;
4271 };
4272
4273 // Check UTF-8 literals.
4274 #define u8 syntax error!
4275 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4276
4277 // Check duplicate typedefs.
4278 typedef long *long_ptr;
4279 typedef long int *long_ptr;
4280 typedef long_ptr long_ptr;
4281
4282 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4283 struct anonymous
4284 {
4285   union {
4286     struct { int i; int j; };
4287     struct { int k; long int l; } w;
4288   };
4289   int m;
4290 } v1;
4291 '
4292
4293 # Test code for whether the C compiler supports C11 (body of main).
4294 ac_c_conftest_c11_main='
4295   _Static_assert ((offsetof (struct anonymous, i)
4296                    == offsetof (struct anonymous, w.k)),
4297                   "Anonymous union alignment botch");
4298   v1.i = 2;
4299   v1.w.k = 5;
4300   ok |= v1.i != 5;
4301 '
4302
4303 # Test code for whether the C compiler supports C11 (complete).
4304 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4305 ${ac_c_conftest_c99_globals}
4306 ${ac_c_conftest_c11_globals}
4307
4308 int
4309 main (int argc, char **argv)
4310 {
4311   int ok = 0;
4312   ${ac_c_conftest_c89_main}
4313   ${ac_c_conftest_c99_main}
4314   ${ac_c_conftest_c11_main}
4315   return ok;
4316 }
4317 "
4318
4319 # Test code for whether the C compiler supports C99 (complete).
4320 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4321 ${ac_c_conftest_c99_globals}
4322
4323 int
4324 main (int argc, char **argv)
4325 {
4326   int ok = 0;
4327   ${ac_c_conftest_c89_main}
4328   ${ac_c_conftest_c99_main}
4329   return ok;
4330 }
4331 "
4332
4333 # Test code for whether the C compiler supports C89 (complete).
4334 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4335
4336 int
4337 main (int argc, char **argv)
4338 {
4339   int ok = 0;
4340   ${ac_c_conftest_c89_main}
4341   return ok;
4342 }
4343 "
4344
4345 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
4346 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4347 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4348 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4349 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4350 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4351 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4352 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4353 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4354 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4355 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4356 gl_use_threads_default=no
4357 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4358 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4359 as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
4360 as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
4361 as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
4362 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4363 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4364 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4365 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4366 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
4367 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4368 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4369 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4370 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
4371 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
4372 as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
4373 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
4374 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
4375 as_fn_append ac_func_c_list " __freadahead HAVE___FREADAHEAD"
4376 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
4377 as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
4378 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4379 gl_getopt_required=GNU
4380 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4381 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4382 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4383 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4384 as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
4385 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4386 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
4387 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4388 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4389 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4390 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4391 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
4392 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4393 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4394 as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
4395 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4396 as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4397 as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
4398 as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H"
4399 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4400 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4401 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4402 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4403 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4404 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4405 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4406 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
4407 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4408 as_fn_append ac_func_c_list " pipe2 HAVE_PIPE2"
4409 as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir_np HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP"
4410 as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR"
4411 gl_printf_safe=yes
4412 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4413 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4414 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4415 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4416 as_fn_append ac_func_c_list " link HAVE_LINK"
4417 as_fn_append ac_func_c_list " secure_getenv HAVE_SECURE_GETENV"
4418 as_fn_append ac_func_c_list " getuid HAVE_GETUID"
4419 as_fn_append ac_func_c_list " geteuid HAVE_GETEUID"
4420 as_fn_append ac_func_c_list " getgid HAVE_GETGID"
4421 as_fn_append ac_func_c_list " getegid HAVE_GETEGID"
4422 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4423 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4424 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4425 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4426 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4427 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4428 as_fn_append ac_header_c_list " spawn.h spawn_h HAVE_SPAWN_H"
4429 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4430 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4431 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4432 as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
4433 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4434 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4435 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4436 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4437 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4438 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4439 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4440 as_fn_append ac_header_c_list " semaphore.h semaphore_h HAVE_SEMAPHORE_H"
4441 as_fn_append ac_func_c_list " explicit_bzero HAVE_EXPLICIT_BZERO"
4442 as_fn_append ac_func_c_list " memset_s HAVE_MEMSET_S"
4443 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4444 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4445 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4446 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4447 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4448 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4449 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4450 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4451 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4452 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4453 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4454 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4455 as_fn_append ac_func_c_list " mquery HAVE_MQUERY"
4456 as_fn_append ac_func_c_list " pstat_getprocvm HAVE_PSTAT_GETPROCVM"
4457 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4458 gt_needs="$gt_needs need-formatstring-macros"
4459
4460 # Auxiliary files required by this configure script.
4461 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4462
4463 # Locations in which to look for auxiliary files.
4464 ac_aux_dir_candidates="${srcdir}/build-aux"
4465
4466 # Search for a directory containing all of the required auxiliary files,
4467 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4468 # If we don't find one directory that contains all the files we need,
4469 # we report the set of missing files from the *first* directory in
4470 # $ac_aux_dir_candidates and give up.
4471 ac_missing_aux_files=""
4472 ac_first_candidate=:
4473 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4475 as_found=false
4476 for as_dir in $ac_aux_dir_candidates
4477 do
4478   IFS=$as_save_IFS
4479   case $as_dir in #(((
4480     '') as_dir=./ ;;
4481     */) ;;
4482     *) as_dir=$as_dir/ ;;
4483   esac
4484   as_found=:
4485
4486   printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
4487   ac_aux_dir_found=yes
4488   ac_install_sh=
4489   for ac_aux in $ac_aux_files
4490   do
4491     # As a special case, if "install-sh" is required, that requirement
4492     # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4493     # and $ac_install_sh is set appropriately for whichever one is found.
4494     if test x"$ac_aux" = x"install-sh"
4495     then
4496       if test -f "${as_dir}install-sh"; then
4497         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
4498         ac_install_sh="${as_dir}install-sh -c"
4499       elif test -f "${as_dir}install.sh"; then
4500         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
4501         ac_install_sh="${as_dir}install.sh -c"
4502       elif test -f "${as_dir}shtool"; then
4503         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
4504         ac_install_sh="${as_dir}shtool install -c"
4505       else
4506         ac_aux_dir_found=no
4507         if $ac_first_candidate; then
4508           ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4509         else
4510           break
4511         fi
4512       fi
4513     else
4514       if test -f "${as_dir}${ac_aux}"; then
4515         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
4516       else
4517         ac_aux_dir_found=no
4518         if $ac_first_candidate; then
4519           ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4520         else
4521           break
4522         fi
4523       fi
4524     fi
4525   done
4526   if test "$ac_aux_dir_found" = yes; then
4527     ac_aux_dir="$as_dir"
4528     break
4529   fi
4530   ac_first_candidate=false
4531
4532   as_found=false
4533 done
4534 IFS=$as_save_IFS
4535 if $as_found
4536 then :
4537
4538 else $as_nop
4539   as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4540 fi
4541
4542
4543 # These three variables are undocumented and unsupported,
4544 # and are intended to be withdrawn in a future Autoconf release.
4545 # They can cause serious problems if a builder's source tree is in a directory
4546 # whose full name contains unusual characters.
4547 if test -f "${ac_aux_dir}config.guess"; then
4548   ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4549 fi
4550 if test -f "${ac_aux_dir}config.sub"; then
4551   ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4552 fi
4553 if test -f "$ac_aux_dir/configure"; then
4554   ac_configure="$SHELL ${ac_aux_dir}configure"
4555 fi
4556
4557 # Check that the precious variables saved in the cache have kept the same
4558 # value.
4559 ac_cache_corrupted=false
4560 for ac_var in $ac_precious_vars; do
4561   eval ac_old_set=\$ac_cv_env_${ac_var}_set
4562   eval ac_new_set=\$ac_env_${ac_var}_set
4563   eval ac_old_val=\$ac_cv_env_${ac_var}_value
4564   eval ac_new_val=\$ac_env_${ac_var}_value
4565   case $ac_old_set,$ac_new_set in
4566     set,)
4567       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4568 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4569       ac_cache_corrupted=: ;;
4570     ,set)
4571       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4572 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4573       ac_cache_corrupted=: ;;
4574     ,);;
4575     *)
4576       if test "x$ac_old_val" != "x$ac_new_val"; then
4577         # differences in whitespace do not lead to failure.
4578         ac_old_val_w=`echo x $ac_old_val`
4579         ac_new_val_w=`echo x $ac_new_val`
4580         if test "$ac_old_val_w" != "$ac_new_val_w"; then
4581           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4582 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4583           ac_cache_corrupted=:
4584         else
4585           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4586 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4587           eval $ac_var=\$ac_old_val
4588         fi
4589         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
4590 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
4591         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
4592 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
4593       fi;;
4594   esac
4595   # Pass precious variables to config.status.
4596   if test "$ac_new_set" = set; then
4597     case $ac_new_val in
4598     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4599     *) ac_arg=$ac_var=$ac_new_val ;;
4600     esac
4601     case " $ac_configure_args " in
4602       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4603       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4604     esac
4605   fi
4606 done
4607 if $ac_cache_corrupted; then
4608   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4609 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4610   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4611 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4612   as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4613             and start over" "$LINENO" 5
4614 fi
4615 ## -------------------- ##
4616 ## Main body of script. ##
4617 ## -------------------- ##
4618
4619 ac_ext=c
4620 ac_cpp='$CPP $CPPFLAGS'
4621 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4622 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4623 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4624
4625
4626
4627
4628 am__api_version='1.16'
4629
4630
4631
4632   # Find a good install program.  We prefer a C program (faster),
4633 # so one script is as good as another.  But avoid the broken or
4634 # incompatible versions:
4635 # SysV /etc/install, /usr/sbin/install
4636 # SunOS /usr/etc/install
4637 # IRIX /sbin/install
4638 # AIX /bin/install
4639 # AmigaOS /C/install, which installs bootblocks on floppy discs
4640 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4641 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4642 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4643 # OS/2's system install, which has a completely different semantic
4644 # ./install, which can be erroneously created by make from ./install.sh.
4645 # Reject install programs that cannot install multiple files.
4646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4647 printf %s "checking for a BSD-compatible install... " >&6; }
4648 if test -z "$INSTALL"; then
4649 if test ${ac_cv_path_install+y}
4650 then :
4651   printf %s "(cached) " >&6
4652 else $as_nop
4653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654 for as_dir in $PATH
4655 do
4656   IFS=$as_save_IFS
4657   case $as_dir in #(((
4658     '') as_dir=./ ;;
4659     */) ;;
4660     *) as_dir=$as_dir/ ;;
4661   esac
4662     # Account for fact that we put trailing slashes in our PATH walk.
4663 case $as_dir in #((
4664   ./ | /[cC]/* | \
4665   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4666   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4667   /usr/ucb/* ) ;;
4668   *)
4669     # OSF1 and SCO ODT 3.0 have their own names for install.
4670     # Don't use installbsd from OSF since it installs stuff as root
4671     # by default.
4672     for ac_prog in ginstall scoinst install; do
4673       for ac_exec_ext in '' $ac_executable_extensions; do
4674         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4675           if test $ac_prog = install &&
4676             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4677             # AIX install.  It has an incompatible calling convention.
4678             :
4679           elif test $ac_prog = install &&
4680             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4681             # program-specific install script used by HP pwplus--don't use.
4682             :
4683           else
4684             rm -rf conftest.one conftest.two conftest.dir
4685             echo one > conftest.one
4686             echo two > conftest.two
4687             mkdir conftest.dir
4688             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4689               test -s conftest.one && test -s conftest.two &&
4690               test -s conftest.dir/conftest.one &&
4691               test -s conftest.dir/conftest.two
4692             then
4693               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4694               break 3
4695             fi
4696           fi
4697         fi
4698       done
4699     done
4700     ;;
4701 esac
4702
4703   done
4704 IFS=$as_save_IFS
4705
4706 rm -rf conftest.one conftest.two conftest.dir
4707
4708 fi
4709   if test ${ac_cv_path_install+y}; then
4710     INSTALL=$ac_cv_path_install
4711   else
4712     # As a last resort, use the slow shell script.  Don't cache a
4713     # value for INSTALL within a source directory, because that will
4714     # break other packages using the cache if that directory is
4715     # removed, or if the value is a relative name.
4716     INSTALL=$ac_install_sh
4717   fi
4718 fi
4719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4720 printf "%s\n" "$INSTALL" >&6; }
4721
4722 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4723 # It thinks the first close brace ends the variable substitution.
4724 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4725
4726 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4727
4728 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4729
4730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4731 printf %s "checking whether build environment is sane... " >&6; }
4732 # Reject unsafe characters in $srcdir or the absolute working directory
4733 # name.  Accept space and tab only in the latter.
4734 am_lf='
4735 '
4736 case `pwd` in
4737   *[\\\"\#\$\&\'\`$am_lf]*)
4738     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4739 esac
4740 case $srcdir in
4741   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
4742     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4743 esac
4744
4745 # Do 'set' in a subshell so we don't clobber the current shell's
4746 # arguments.  Must try -L first in case configure is actually a
4747 # symlink; some systems play weird games with the mod time of symlinks
4748 # (eg FreeBSD returns the mod time of the symlink's containing
4749 # directory).
4750 if (
4751    am_has_slept=no
4752    for am_try in 1 2; do
4753      echo "timestamp, slept: $am_has_slept" > conftest.file
4754      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4755      if test "$*" = "X"; then
4756         # -L didn't work.
4757         set X `ls -t "$srcdir/configure" conftest.file`
4758      fi
4759      if test "$*" != "X $srcdir/configure conftest.file" \
4760         && test "$*" != "X conftest.file $srcdir/configure"; then
4761
4762         # If neither matched, then we have a broken ls.  This can happen
4763         # if, for instance, CONFIG_SHELL is bash and it inherits a
4764         # broken ls alias from the environment.  This has actually
4765         # happened.  Such a system could not be considered "sane".
4766         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4767   alias in your environment" "$LINENO" 5
4768      fi
4769      if test "$2" = conftest.file || test $am_try -eq 2; then
4770        break
4771      fi
4772      # Just in case.
4773      sleep 1
4774      am_has_slept=yes
4775    done
4776    test "$2" = conftest.file
4777    )
4778 then
4779    # Ok.
4780    :
4781 else
4782    as_fn_error $? "newly created file is older than distributed files!
4783 Check your system clock" "$LINENO" 5
4784 fi
4785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4786 printf "%s\n" "yes" >&6; }
4787 # If we didn't sleep, we still need to ensure time stamps of config.status and
4788 # generated files are strictly newer.
4789 am_sleep_pid=
4790 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4791   ( sleep 1 ) &
4792   am_sleep_pid=$!
4793 fi
4794
4795 rm -f conftest.file
4796
4797 test "$program_prefix" != NONE &&
4798   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4799 # Use a double $ so make ignores it.
4800 test "$program_suffix" != NONE &&
4801   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4802 # Double any \ or $.
4803 # By default was `s,x,x', remove it if useless.
4804 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4805 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4806
4807
4808 # Expand $ac_aux_dir to an absolute path.
4809 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4810
4811
4812   if test x"${MISSING+set}" != xset; then
4813   MISSING="\${SHELL} '$am_aux_dir/missing'"
4814 fi
4815 # Use eval to expand $SHELL
4816 if eval "$MISSING --is-lightweight"; then
4817   am_missing_run="$MISSING "
4818 else
4819   am_missing_run=
4820   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4821 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4822 fi
4823
4824 if test x"${install_sh+set}" != xset; then
4825   case $am_aux_dir in
4826   *\ * | *\     *)
4827     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4828   *)
4829     install_sh="\${SHELL} $am_aux_dir/install-sh"
4830   esac
4831 fi
4832
4833 # Installed binaries are usually stripped using 'strip' when the user
4834 # run "make install-strip".  However 'strip' might not be the right
4835 # tool to use in cross-compilation environments, therefore Automake
4836 # will honor the 'STRIP' environment variable to overrule this program.
4837 if test "$cross_compiling" != no; then
4838   if test -n "$ac_tool_prefix"; then
4839   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4840 set dummy ${ac_tool_prefix}strip; ac_word=$2
4841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842 printf %s "checking for $ac_word... " >&6; }
4843 if test ${ac_cv_prog_STRIP+y}
4844 then :
4845   printf %s "(cached) " >&6
4846 else $as_nop
4847   if test -n "$STRIP"; then
4848   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4849 else
4850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851 for as_dir in $PATH
4852 do
4853   IFS=$as_save_IFS
4854   case $as_dir in #(((
4855     '') as_dir=./ ;;
4856     */) ;;
4857     *) as_dir=$as_dir/ ;;
4858   esac
4859     for ac_exec_ext in '' $ac_executable_extensions; do
4860   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4861     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4862     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4863     break 2
4864   fi
4865 done
4866   done
4867 IFS=$as_save_IFS
4868
4869 fi
4870 fi
4871 STRIP=$ac_cv_prog_STRIP
4872 if test -n "$STRIP"; then
4873   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4874 printf "%s\n" "$STRIP" >&6; }
4875 else
4876   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877 printf "%s\n" "no" >&6; }
4878 fi
4879
4880
4881 fi
4882 if test -z "$ac_cv_prog_STRIP"; then
4883   ac_ct_STRIP=$STRIP
4884   # Extract the first word of "strip", so it can be a program name with args.
4885 set dummy strip; ac_word=$2
4886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887 printf %s "checking for $ac_word... " >&6; }
4888 if test ${ac_cv_prog_ac_ct_STRIP+y}
4889 then :
4890   printf %s "(cached) " >&6
4891 else $as_nop
4892   if test -n "$ac_ct_STRIP"; then
4893   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4894 else
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896 for as_dir in $PATH
4897 do
4898   IFS=$as_save_IFS
4899   case $as_dir in #(((
4900     '') as_dir=./ ;;
4901     */) ;;
4902     *) as_dir=$as_dir/ ;;
4903   esac
4904     for ac_exec_ext in '' $ac_executable_extensions; do
4905   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4906     ac_cv_prog_ac_ct_STRIP="strip"
4907     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4908     break 2
4909   fi
4910 done
4911   done
4912 IFS=$as_save_IFS
4913
4914 fi
4915 fi
4916 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4917 if test -n "$ac_ct_STRIP"; then
4918   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4919 printf "%s\n" "$ac_ct_STRIP" >&6; }
4920 else
4921   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922 printf "%s\n" "no" >&6; }
4923 fi
4924
4925   if test "x$ac_ct_STRIP" = x; then
4926     STRIP=":"
4927   else
4928     case $cross_compiling:$ac_tool_warned in
4929 yes:)
4930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4931 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4932 ac_tool_warned=yes ;;
4933 esac
4934     STRIP=$ac_ct_STRIP
4935   fi
4936 else
4937   STRIP="$ac_cv_prog_STRIP"
4938 fi
4939
4940 fi
4941 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4942
4943
4944   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4945 printf %s "checking for a race-free mkdir -p... " >&6; }
4946 if test -z "$MKDIR_P"; then
4947   if test ${ac_cv_path_mkdir+y}
4948 then :
4949   printf %s "(cached) " >&6
4950 else $as_nop
4951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4953 do
4954   IFS=$as_save_IFS
4955   case $as_dir in #(((
4956     '') as_dir=./ ;;
4957     */) ;;
4958     *) as_dir=$as_dir/ ;;
4959   esac
4960     for ac_prog in mkdir gmkdir; do
4961          for ac_exec_ext in '' $ac_executable_extensions; do
4962            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4963            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4964              'mkdir ('*'coreutils) '* | \
4965              'BusyBox '* | \
4966              'mkdir (fileutils) '4.1*)
4967                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4968                break 3;;
4969            esac
4970          done
4971        done
4972   done
4973 IFS=$as_save_IFS
4974
4975 fi
4976
4977   test -d ./--version && rmdir ./--version
4978   if test ${ac_cv_path_mkdir+y}; then
4979     MKDIR_P="$ac_cv_path_mkdir -p"
4980   else
4981     # As a last resort, use the slow shell script.  Don't cache a
4982     # value for MKDIR_P within a source directory, because that will
4983     # break other packages using the cache if that directory is
4984     # removed, or if the value is a relative name.
4985     MKDIR_P="$ac_install_sh -d"
4986   fi
4987 fi
4988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4989 printf "%s\n" "$MKDIR_P" >&6; }
4990
4991 for ac_prog in gawk mawk nawk awk
4992 do
4993   # Extract the first word of "$ac_prog", so it can be a program name with args.
4994 set dummy $ac_prog; ac_word=$2
4995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996 printf %s "checking for $ac_word... " >&6; }
4997 if test ${ac_cv_prog_AWK+y}
4998 then :
4999   printf %s "(cached) " >&6
5000 else $as_nop
5001   if test -n "$AWK"; then
5002   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5003 else
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005 for as_dir in $PATH
5006 do
5007   IFS=$as_save_IFS
5008   case $as_dir in #(((
5009     '') as_dir=./ ;;
5010     */) ;;
5011     *) as_dir=$as_dir/ ;;
5012   esac
5013     for ac_exec_ext in '' $ac_executable_extensions; do
5014   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5015     ac_cv_prog_AWK="$ac_prog"
5016     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5017     break 2
5018   fi
5019 done
5020   done
5021 IFS=$as_save_IFS
5022
5023 fi
5024 fi
5025 AWK=$ac_cv_prog_AWK
5026 if test -n "$AWK"; then
5027   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5028 printf "%s\n" "$AWK" >&6; }
5029 else
5030   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5031 printf "%s\n" "no" >&6; }
5032 fi
5033
5034
5035   test -n "$AWK" && break
5036 done
5037
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5039 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5040 set x ${MAKE-make}
5041 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5042 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
5043 then :
5044   printf %s "(cached) " >&6
5045 else $as_nop
5046   cat >conftest.make <<\_ACEOF
5047 SHELL = /bin/sh
5048 all:
5049         @echo '@@@%%%=$(MAKE)=@@@%%%'
5050 _ACEOF
5051 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5052 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5053   *@@@%%%=?*=@@@%%%*)
5054     eval ac_cv_prog_make_${ac_make}_set=yes;;
5055   *)
5056     eval ac_cv_prog_make_${ac_make}_set=no;;
5057 esac
5058 rm -f conftest.make
5059 fi
5060 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5061   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5062 printf "%s\n" "yes" >&6; }
5063   SET_MAKE=
5064 else
5065   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5066 printf "%s\n" "no" >&6; }
5067   SET_MAKE="MAKE=${MAKE-make}"
5068 fi
5069
5070 rm -rf .tst 2>/dev/null
5071 mkdir .tst 2>/dev/null
5072 if test -d .tst; then
5073   am__leading_dot=.
5074 else
5075   am__leading_dot=_
5076 fi
5077 rmdir .tst 2>/dev/null
5078
5079 # Check whether --enable-silent-rules was given.
5080 if test ${enable_silent_rules+y}
5081 then :
5082   enableval=$enable_silent_rules;
5083 fi
5084
5085 case $enable_silent_rules in # (((
5086   yes) AM_DEFAULT_VERBOSITY=0;;
5087    no) AM_DEFAULT_VERBOSITY=1;;
5088     *) AM_DEFAULT_VERBOSITY=1;;
5089 esac
5090 am_make=${MAKE-make}
5091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5092 printf %s "checking whether $am_make supports nested variables... " >&6; }
5093 if test ${am_cv_make_support_nested_variables+y}
5094 then :
5095   printf %s "(cached) " >&6
5096 else $as_nop
5097   if printf "%s\n" 'TRUE=$(BAR$(V))
5098 BAR0=false
5099 BAR1=true
5100 V=1
5101 am__doit:
5102         @$(TRUE)
5103 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5104   am_cv_make_support_nested_variables=yes
5105 else
5106   am_cv_make_support_nested_variables=no
5107 fi
5108 fi
5109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5110 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5111 if test $am_cv_make_support_nested_variables = yes; then
5112     AM_V='$(V)'
5113   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5114 else
5115   AM_V=$AM_DEFAULT_VERBOSITY
5116   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5117 fi
5118 AM_BACKSLASH='\'
5119
5120 if test "`cd $srcdir && pwd`" != "`pwd`"; then
5121   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5122   # is not polluted with repeated "-I."
5123   am__isrc=' -I$(srcdir)'
5124   # test to see if srcdir already configured
5125   if test -f $srcdir/config.status; then
5126     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5127   fi
5128 fi
5129
5130 # test whether we have cygpath
5131 if test -z "$CYGPATH_W"; then
5132   if (cygpath --version) >/dev/null 2>/dev/null; then
5133     CYGPATH_W='cygpath -w'
5134   else
5135     CYGPATH_W=echo
5136   fi
5137 fi
5138
5139
5140 # Define the identity of the package.
5141  PACKAGE='m4'
5142  VERSION='1.4.19'
5143
5144
5145 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5146
5147
5148 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5149
5150 # Some tools Automake needs.
5151
5152 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5153
5154
5155 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5156
5157
5158 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5159
5160
5161 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5162
5163
5164 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5165
5166 # For better backward compatibility.  To be removed once Automake 1.9.x
5167 # dies out for good.  For more background, see:
5168 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5169 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5170 mkdir_p='$(MKDIR_P)'
5171
5172 # We need awk for the "check" target (and possibly the TAP driver).  The
5173 # system "awk" is bad on some platforms.
5174 # Always define AMTAR for backward compatibility.  Yes, it's still used
5175 # in the wild :-(  We should find a proper way to deprecate it ...
5176 AMTAR='$${TAR-tar}'
5177
5178
5179 # We'll loop over all known methods to create a tar archive until one works.
5180 _am_tools='gnutar  pax cpio none'
5181
5182 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5183
5184
5185
5186
5187
5188
5189 # POSIX will say in a future version that running "rm -f" with no argument
5190 # is OK; and we want to be able to make that assumption in our Makefile
5191 # recipes.  So use an aggressive probe to check that the usage we want is
5192 # actually supported "in the wild" to an acceptable degree.
5193 # See automake bug#10828.
5194 # To make any issue more visible, cause the running configure to be aborted
5195 # by default if the 'rm' program in use doesn't match our expectations; the
5196 # user can still override this though.
5197 if rm -f && rm -fr && rm -rf; then : OK; else
5198   cat >&2 <<'END'
5199 Oops!
5200
5201 Your 'rm' program seems unable to run without file operands specified
5202 on the command line, even when the '-f' option is present.  This is contrary
5203 to the behaviour of most rm programs out there, and not conforming with
5204 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5205
5206 Please tell bug-automake@gnu.org about your system, including the value
5207 of your $PATH and any error possibly output before this message.  This
5208 can help us improve future automake versions.
5209
5210 END
5211   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5212     echo 'Configuration will proceed anyway, since you have set the' >&2
5213     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5214     echo >&2
5215   else
5216     cat >&2 <<'END'
5217 Aborting the configuration process, to ensure you take notice of the issue.
5218
5219 You can download and install GNU coreutils to get an 'rm' implementation
5220 that behaves properly: <https://www.gnu.org/software/coreutils/>.
5221
5222 If you want to complete the configuration process using your problematic
5223 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5224 to "yes", and re-run configure.
5225
5226 END
5227     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
5228   fi
5229 fi
5230
5231 # Check whether --enable-silent-rules was given.
5232 if test ${enable_silent_rules+y}
5233 then :
5234   enableval=$enable_silent_rules;
5235 fi
5236
5237 case $enable_silent_rules in # (((
5238   yes) AM_DEFAULT_VERBOSITY=0;;
5239    no) AM_DEFAULT_VERBOSITY=1;;
5240     *) AM_DEFAULT_VERBOSITY=0;;
5241 esac
5242 am_make=${MAKE-make}
5243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5244 printf %s "checking whether $am_make supports nested variables... " >&6; }
5245 if test ${am_cv_make_support_nested_variables+y}
5246 then :
5247   printf %s "(cached) " >&6
5248 else $as_nop
5249   if printf "%s\n" 'TRUE=$(BAR$(V))
5250 BAR0=false
5251 BAR1=true
5252 V=1
5253 am__doit:
5254         @$(TRUE)
5255 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5256   am_cv_make_support_nested_variables=yes
5257 else
5258   am_cv_make_support_nested_variables=no
5259 fi
5260 fi
5261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5262 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5263 if test $am_cv_make_support_nested_variables = yes; then
5264     AM_V='$(V)'
5265   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5266 else
5267   AM_V=$AM_DEFAULT_VERBOSITY
5268   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5269 fi
5270 AM_BACKSLASH='\'
5271  # make --enable-silent-rules the default.
5272
5273
5274
5275
5276 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288 ac_ext=c
5289 ac_cpp='$CPP $CPPFLAGS'
5290 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5291 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5292 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5293 if test -n "$ac_tool_prefix"; then
5294   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5295 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 printf %s "checking for $ac_word... " >&6; }
5298 if test ${ac_cv_prog_CC+y}
5299 then :
5300   printf %s "(cached) " >&6
5301 else $as_nop
5302   if test -n "$CC"; then
5303   ac_cv_prog_CC="$CC" # Let the user override the test.
5304 else
5305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5306 for as_dir in $PATH
5307 do
5308   IFS=$as_save_IFS
5309   case $as_dir in #(((
5310     '') as_dir=./ ;;
5311     */) ;;
5312     *) as_dir=$as_dir/ ;;
5313   esac
5314     for ac_exec_ext in '' $ac_executable_extensions; do
5315   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5316     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5317     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5318     break 2
5319   fi
5320 done
5321   done
5322 IFS=$as_save_IFS
5323
5324 fi
5325 fi
5326 CC=$ac_cv_prog_CC
5327 if test -n "$CC"; then
5328   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5329 printf "%s\n" "$CC" >&6; }
5330 else
5331   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332 printf "%s\n" "no" >&6; }
5333 fi
5334
5335
5336 fi
5337 if test -z "$ac_cv_prog_CC"; then
5338   ac_ct_CC=$CC
5339   # Extract the first word of "gcc", so it can be a program name with args.
5340 set dummy gcc; ac_word=$2
5341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5342 printf %s "checking for $ac_word... " >&6; }
5343 if test ${ac_cv_prog_ac_ct_CC+y}
5344 then :
5345   printf %s "(cached) " >&6
5346 else $as_nop
5347   if test -n "$ac_ct_CC"; then
5348   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5349 else
5350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5351 for as_dir in $PATH
5352 do
5353   IFS=$as_save_IFS
5354   case $as_dir in #(((
5355     '') as_dir=./ ;;
5356     */) ;;
5357     *) as_dir=$as_dir/ ;;
5358   esac
5359     for ac_exec_ext in '' $ac_executable_extensions; do
5360   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5361     ac_cv_prog_ac_ct_CC="gcc"
5362     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5363     break 2
5364   fi
5365 done
5366   done
5367 IFS=$as_save_IFS
5368
5369 fi
5370 fi
5371 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5372 if test -n "$ac_ct_CC"; then
5373   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5374 printf "%s\n" "$ac_ct_CC" >&6; }
5375 else
5376   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377 printf "%s\n" "no" >&6; }
5378 fi
5379
5380   if test "x$ac_ct_CC" = x; then
5381     CC=""
5382   else
5383     case $cross_compiling:$ac_tool_warned in
5384 yes:)
5385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5386 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5387 ac_tool_warned=yes ;;
5388 esac
5389     CC=$ac_ct_CC
5390   fi
5391 else
5392   CC="$ac_cv_prog_CC"
5393 fi
5394
5395 if test -z "$CC"; then
5396           if test -n "$ac_tool_prefix"; then
5397     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5398 set dummy ${ac_tool_prefix}cc; ac_word=$2
5399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400 printf %s "checking for $ac_word... " >&6; }
5401 if test ${ac_cv_prog_CC+y}
5402 then :
5403   printf %s "(cached) " >&6
5404 else $as_nop
5405   if test -n "$CC"; then
5406   ac_cv_prog_CC="$CC" # Let the user override the test.
5407 else
5408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409 for as_dir in $PATH
5410 do
5411   IFS=$as_save_IFS
5412   case $as_dir in #(((
5413     '') as_dir=./ ;;
5414     */) ;;
5415     *) as_dir=$as_dir/ ;;
5416   esac
5417     for ac_exec_ext in '' $ac_executable_extensions; do
5418   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5419     ac_cv_prog_CC="${ac_tool_prefix}cc"
5420     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5421     break 2
5422   fi
5423 done
5424   done
5425 IFS=$as_save_IFS
5426
5427 fi
5428 fi
5429 CC=$ac_cv_prog_CC
5430 if test -n "$CC"; then
5431   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5432 printf "%s\n" "$CC" >&6; }
5433 else
5434   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5435 printf "%s\n" "no" >&6; }
5436 fi
5437
5438
5439   fi
5440 fi
5441 if test -z "$CC"; then
5442   # Extract the first word of "cc", so it can be a program name with args.
5443 set dummy cc; ac_word=$2
5444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445 printf %s "checking for $ac_word... " >&6; }
5446 if test ${ac_cv_prog_CC+y}
5447 then :
5448   printf %s "(cached) " >&6
5449 else $as_nop
5450   if test -n "$CC"; then
5451   ac_cv_prog_CC="$CC" # Let the user override the test.
5452 else
5453   ac_prog_rejected=no
5454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455 for as_dir in $PATH
5456 do
5457   IFS=$as_save_IFS
5458   case $as_dir in #(((
5459     '') as_dir=./ ;;
5460     */) ;;
5461     *) as_dir=$as_dir/ ;;
5462   esac
5463     for ac_exec_ext in '' $ac_executable_extensions; do
5464   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5465     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5466        ac_prog_rejected=yes
5467        continue
5468      fi
5469     ac_cv_prog_CC="cc"
5470     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5471     break 2
5472   fi
5473 done
5474   done
5475 IFS=$as_save_IFS
5476
5477 if test $ac_prog_rejected = yes; then
5478   # We found a bogon in the path, so make sure we never use it.
5479   set dummy $ac_cv_prog_CC
5480   shift
5481   if test $# != 0; then
5482     # We chose a different compiler from the bogus one.
5483     # However, it has the same basename, so the bogon will be chosen
5484     # first if we set CC to just the basename; use the full file name.
5485     shift
5486     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5487   fi
5488 fi
5489 fi
5490 fi
5491 CC=$ac_cv_prog_CC
5492 if test -n "$CC"; then
5493   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5494 printf "%s\n" "$CC" >&6; }
5495 else
5496   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497 printf "%s\n" "no" >&6; }
5498 fi
5499
5500
5501 fi
5502 if test -z "$CC"; then
5503   if test -n "$ac_tool_prefix"; then
5504   for ac_prog in cl.exe
5505   do
5506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5509 printf %s "checking for $ac_word... " >&6; }
5510 if test ${ac_cv_prog_CC+y}
5511 then :
5512   printf %s "(cached) " >&6
5513 else $as_nop
5514   if test -n "$CC"; then
5515   ac_cv_prog_CC="$CC" # Let the user override the test.
5516 else
5517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5518 for as_dir in $PATH
5519 do
5520   IFS=$as_save_IFS
5521   case $as_dir in #(((
5522     '') as_dir=./ ;;
5523     */) ;;
5524     *) as_dir=$as_dir/ ;;
5525   esac
5526     for ac_exec_ext in '' $ac_executable_extensions; do
5527   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5528     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5529     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5530     break 2
5531   fi
5532 done
5533   done
5534 IFS=$as_save_IFS
5535
5536 fi
5537 fi
5538 CC=$ac_cv_prog_CC
5539 if test -n "$CC"; then
5540   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5541 printf "%s\n" "$CC" >&6; }
5542 else
5543   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 printf "%s\n" "no" >&6; }
5545 fi
5546
5547
5548     test -n "$CC" && break
5549   done
5550 fi
5551 if test -z "$CC"; then
5552   ac_ct_CC=$CC
5553   for ac_prog in cl.exe
5554 do
5555   # Extract the first word of "$ac_prog", so it can be a program name with args.
5556 set dummy $ac_prog; ac_word=$2
5557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558 printf %s "checking for $ac_word... " >&6; }
5559 if test ${ac_cv_prog_ac_ct_CC+y}
5560 then :
5561   printf %s "(cached) " >&6
5562 else $as_nop
5563   if test -n "$ac_ct_CC"; then
5564   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5565 else
5566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567 for as_dir in $PATH
5568 do
5569   IFS=$as_save_IFS
5570   case $as_dir in #(((
5571     '') as_dir=./ ;;
5572     */) ;;
5573     *) as_dir=$as_dir/ ;;
5574   esac
5575     for ac_exec_ext in '' $ac_executable_extensions; do
5576   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5577     ac_cv_prog_ac_ct_CC="$ac_prog"
5578     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5579     break 2
5580   fi
5581 done
5582   done
5583 IFS=$as_save_IFS
5584
5585 fi
5586 fi
5587 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5588 if test -n "$ac_ct_CC"; then
5589   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5590 printf "%s\n" "$ac_ct_CC" >&6; }
5591 else
5592   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593 printf "%s\n" "no" >&6; }
5594 fi
5595
5596
5597   test -n "$ac_ct_CC" && break
5598 done
5599
5600   if test "x$ac_ct_CC" = x; then
5601     CC=""
5602   else
5603     case $cross_compiling:$ac_tool_warned in
5604 yes:)
5605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5606 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5607 ac_tool_warned=yes ;;
5608 esac
5609     CC=$ac_ct_CC
5610   fi
5611 fi
5612
5613 fi
5614 if test -z "$CC"; then
5615   if test -n "$ac_tool_prefix"; then
5616   # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5617 set dummy ${ac_tool_prefix}clang; ac_word=$2
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619 printf %s "checking for $ac_word... " >&6; }
5620 if test ${ac_cv_prog_CC+y}
5621 then :
5622   printf %s "(cached) " >&6
5623 else $as_nop
5624   if test -n "$CC"; then
5625   ac_cv_prog_CC="$CC" # Let the user override the test.
5626 else
5627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628 for as_dir in $PATH
5629 do
5630   IFS=$as_save_IFS
5631   case $as_dir in #(((
5632     '') as_dir=./ ;;
5633     */) ;;
5634     *) as_dir=$as_dir/ ;;
5635   esac
5636     for ac_exec_ext in '' $ac_executable_extensions; do
5637   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5638     ac_cv_prog_CC="${ac_tool_prefix}clang"
5639     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5640     break 2
5641   fi
5642 done
5643   done
5644 IFS=$as_save_IFS
5645
5646 fi
5647 fi
5648 CC=$ac_cv_prog_CC
5649 if test -n "$CC"; then
5650   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5651 printf "%s\n" "$CC" >&6; }
5652 else
5653   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654 printf "%s\n" "no" >&6; }
5655 fi
5656
5657
5658 fi
5659 if test -z "$ac_cv_prog_CC"; then
5660   ac_ct_CC=$CC
5661   # Extract the first word of "clang", so it can be a program name with args.
5662 set dummy clang; ac_word=$2
5663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5664 printf %s "checking for $ac_word... " >&6; }
5665 if test ${ac_cv_prog_ac_ct_CC+y}
5666 then :
5667   printf %s "(cached) " >&6
5668 else $as_nop
5669   if test -n "$ac_ct_CC"; then
5670   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5671 else
5672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673 for as_dir in $PATH
5674 do
5675   IFS=$as_save_IFS
5676   case $as_dir in #(((
5677     '') as_dir=./ ;;
5678     */) ;;
5679     *) as_dir=$as_dir/ ;;
5680   esac
5681     for ac_exec_ext in '' $ac_executable_extensions; do
5682   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5683     ac_cv_prog_ac_ct_CC="clang"
5684     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5685     break 2
5686   fi
5687 done
5688   done
5689 IFS=$as_save_IFS
5690
5691 fi
5692 fi
5693 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5694 if test -n "$ac_ct_CC"; then
5695   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5696 printf "%s\n" "$ac_ct_CC" >&6; }
5697 else
5698   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699 printf "%s\n" "no" >&6; }
5700 fi
5701
5702   if test "x$ac_ct_CC" = x; then
5703     CC=""
5704   else
5705     case $cross_compiling:$ac_tool_warned in
5706 yes:)
5707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5708 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5709 ac_tool_warned=yes ;;
5710 esac
5711     CC=$ac_ct_CC
5712   fi
5713 else
5714   CC="$ac_cv_prog_CC"
5715 fi
5716
5717 fi
5718
5719
5720 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5721 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5722 as_fn_error $? "no acceptable C compiler found in \$PATH
5723 See \`config.log' for more details" "$LINENO" 5; }
5724
5725 # Provide some information about the compiler.
5726 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5727 set X $ac_compile
5728 ac_compiler=$2
5729 for ac_option in --version -v -V -qversion -version; do
5730   { { ac_try="$ac_compiler $ac_option >&5"
5731 case "(($ac_try" in
5732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733   *) ac_try_echo=$ac_try;;
5734 esac
5735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5736 printf "%s\n" "$ac_try_echo"; } >&5
5737   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5738   ac_status=$?
5739   if test -s conftest.err; then
5740     sed '10a\
5741 ... rest of stderr output deleted ...
5742          10q' conftest.err >conftest.er1
5743     cat conftest.er1 >&5
5744   fi
5745   rm -f conftest.er1 conftest.err
5746   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5747   test $ac_status = 0; }
5748 done
5749
5750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5751 /* end confdefs.h.  */
5752
5753 int
5754 main (void)
5755 {
5756
5757   ;
5758   return 0;
5759 }
5760 _ACEOF
5761 ac_clean_files_save=$ac_clean_files
5762 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5763 # Try to create an executable without -o first, disregard a.out.
5764 # It will help us diagnose broken compilers, and finding out an intuition
5765 # of exeext.
5766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5767 printf %s "checking whether the C compiler works... " >&6; }
5768 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5769
5770 # The possible output files:
5771 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5772
5773 ac_rmfiles=
5774 for ac_file in $ac_files
5775 do
5776   case $ac_file in
5777     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5778     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5779   esac
5780 done
5781 rm -f $ac_rmfiles
5782
5783 if { { ac_try="$ac_link_default"
5784 case "(($ac_try" in
5785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786   *) ac_try_echo=$ac_try;;
5787 esac
5788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5789 printf "%s\n" "$ac_try_echo"; } >&5
5790   (eval "$ac_link_default") 2>&5
5791   ac_status=$?
5792   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5793   test $ac_status = 0; }
5794 then :
5795   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5796 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5797 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5798 # so that the user can short-circuit this test for compilers unknown to
5799 # Autoconf.
5800 for ac_file in $ac_files ''
5801 do
5802   test -f "$ac_file" || continue
5803   case $ac_file in
5804     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5805         ;;
5806     [ab].out )
5807         # We found the default executable, but exeext='' is most
5808         # certainly right.
5809         break;;
5810     *.* )
5811         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5812         then :; else
5813            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5814         fi
5815         # We set ac_cv_exeext here because the later test for it is not
5816         # safe: cross compilers may not add the suffix if given an `-o'
5817         # argument, so we may need to know it at that point already.
5818         # Even if this section looks crufty: it has the advantage of
5819         # actually working.
5820         break;;
5821     * )
5822         break;;
5823   esac
5824 done
5825 test "$ac_cv_exeext" = no && ac_cv_exeext=
5826
5827 else $as_nop
5828   ac_file=''
5829 fi
5830 if test -z "$ac_file"
5831 then :
5832   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833 printf "%s\n" "no" >&6; }
5834 printf "%s\n" "$as_me: failed program was:" >&5
5835 sed 's/^/| /' conftest.$ac_ext >&5
5836
5837 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5838 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5839 as_fn_error 77 "C compiler cannot create executables
5840 See \`config.log' for more details" "$LINENO" 5; }
5841 else $as_nop
5842   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843 printf "%s\n" "yes" >&6; }
5844 fi
5845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5846 printf %s "checking for C compiler default output file name... " >&6; }
5847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5848 printf "%s\n" "$ac_file" >&6; }
5849 ac_exeext=$ac_cv_exeext
5850
5851 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5852 ac_clean_files=$ac_clean_files_save
5853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5854 printf %s "checking for suffix of executables... " >&6; }
5855 if { { ac_try="$ac_link"
5856 case "(($ac_try" in
5857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858   *) ac_try_echo=$ac_try;;
5859 esac
5860 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5861 printf "%s\n" "$ac_try_echo"; } >&5
5862   (eval "$ac_link") 2>&5
5863   ac_status=$?
5864   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5865   test $ac_status = 0; }
5866 then :
5867   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5868 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5869 # work properly (i.e., refer to `conftest.exe'), while it won't with
5870 # `rm'.
5871 for ac_file in conftest.exe conftest conftest.*; do
5872   test -f "$ac_file" || continue
5873   case $ac_file in
5874     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5875     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5876           break;;
5877     * ) break;;
5878   esac
5879 done
5880 else $as_nop
5881   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5882 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5883 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5884 See \`config.log' for more details" "$LINENO" 5; }
5885 fi
5886 rm -f conftest conftest$ac_cv_exeext
5887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5888 printf "%s\n" "$ac_cv_exeext" >&6; }
5889
5890 rm -f conftest.$ac_ext
5891 EXEEXT=$ac_cv_exeext
5892 ac_exeext=$EXEEXT
5893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h.  */
5895 #include <stdio.h>
5896 int
5897 main (void)
5898 {
5899 FILE *f = fopen ("conftest.out", "w");
5900  return ferror (f) || fclose (f) != 0;
5901
5902   ;
5903   return 0;
5904 }
5905 _ACEOF
5906 ac_clean_files="$ac_clean_files conftest.out"
5907 # Check that the compiler produces executables we can run.  If not, either
5908 # the compiler is broken, or we cross compile.
5909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5910 printf %s "checking whether we are cross compiling... " >&6; }
5911 if test "$cross_compiling" != yes; then
5912   { { ac_try="$ac_link"
5913 case "(($ac_try" in
5914   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5915   *) ac_try_echo=$ac_try;;
5916 esac
5917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5918 printf "%s\n" "$ac_try_echo"; } >&5
5919   (eval "$ac_link") 2>&5
5920   ac_status=$?
5921   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5922   test $ac_status = 0; }
5923   if { ac_try='./conftest$ac_cv_exeext'
5924   { { case "(($ac_try" in
5925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5926   *) ac_try_echo=$ac_try;;
5927 esac
5928 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5929 printf "%s\n" "$ac_try_echo"; } >&5
5930   (eval "$ac_try") 2>&5
5931   ac_status=$?
5932   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5933   test $ac_status = 0; }; }; then
5934     cross_compiling=no
5935   else
5936     if test "$cross_compiling" = maybe; then
5937         cross_compiling=yes
5938     else
5939         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5940 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5941 as_fn_error 77 "cannot run C compiled programs.
5942 If you meant to cross compile, use \`--host'.
5943 See \`config.log' for more details" "$LINENO" 5; }
5944     fi
5945   fi
5946 fi
5947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5948 printf "%s\n" "$cross_compiling" >&6; }
5949
5950 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5951 ac_clean_files=$ac_clean_files_save
5952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5953 printf %s "checking for suffix of object files... " >&6; }
5954 if test ${ac_cv_objext+y}
5955 then :
5956   printf %s "(cached) " >&6
5957 else $as_nop
5958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5959 /* end confdefs.h.  */
5960
5961 int
5962 main (void)
5963 {
5964
5965   ;
5966   return 0;
5967 }
5968 _ACEOF
5969 rm -f conftest.o conftest.obj
5970 if { { ac_try="$ac_compile"
5971 case "(($ac_try" in
5972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5973   *) ac_try_echo=$ac_try;;
5974 esac
5975 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5976 printf "%s\n" "$ac_try_echo"; } >&5
5977   (eval "$ac_compile") 2>&5
5978   ac_status=$?
5979   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5980   test $ac_status = 0; }
5981 then :
5982   for ac_file in conftest.o conftest.obj conftest.*; do
5983   test -f "$ac_file" || continue;
5984   case $ac_file in
5985     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5986     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5987        break;;
5988   esac
5989 done
5990 else $as_nop
5991   printf "%s\n" "$as_me: failed program was:" >&5
5992 sed 's/^/| /' conftest.$ac_ext >&5
5993
5994 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5995 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5996 as_fn_error $? "cannot compute suffix of object files: cannot compile
5997 See \`config.log' for more details" "$LINENO" 5; }
5998 fi
5999 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6000 fi
6001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6002 printf "%s\n" "$ac_cv_objext" >&6; }
6003 OBJEXT=$ac_cv_objext
6004 ac_objext=$OBJEXT
6005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
6006 printf %s "checking whether the compiler supports GNU C... " >&6; }
6007 if test ${ac_cv_c_compiler_gnu+y}
6008 then :
6009   printf %s "(cached) " >&6
6010 else $as_nop
6011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6012 /* end confdefs.h.  */
6013
6014 int
6015 main (void)
6016 {
6017 #ifndef __GNUC__
6018        choke me
6019 #endif
6020
6021   ;
6022   return 0;
6023 }
6024 _ACEOF
6025 if ac_fn_c_try_compile "$LINENO"
6026 then :
6027   ac_compiler_gnu=yes
6028 else $as_nop
6029   ac_compiler_gnu=no
6030 fi
6031 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6032 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6033
6034 fi
6035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6036 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
6037 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6038
6039 if test $ac_compiler_gnu = yes; then
6040   GCC=yes
6041 else
6042   GCC=
6043 fi
6044 ac_test_CFLAGS=${CFLAGS+y}
6045 ac_save_CFLAGS=$CFLAGS
6046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6047 printf %s "checking whether $CC accepts -g... " >&6; }
6048 if test ${ac_cv_prog_cc_g+y}
6049 then :
6050   printf %s "(cached) " >&6
6051 else $as_nop
6052   ac_save_c_werror_flag=$ac_c_werror_flag
6053    ac_c_werror_flag=yes
6054    ac_cv_prog_cc_g=no
6055    CFLAGS="-g"
6056    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057 /* end confdefs.h.  */
6058
6059 int
6060 main (void)
6061 {
6062
6063   ;
6064   return 0;
6065 }
6066 _ACEOF
6067 if ac_fn_c_try_compile "$LINENO"
6068 then :
6069   ac_cv_prog_cc_g=yes
6070 else $as_nop
6071   CFLAGS=""
6072       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6073 /* end confdefs.h.  */
6074
6075 int
6076 main (void)
6077 {
6078
6079   ;
6080   return 0;
6081 }
6082 _ACEOF
6083 if ac_fn_c_try_compile "$LINENO"
6084 then :
6085
6086 else $as_nop
6087   ac_c_werror_flag=$ac_save_c_werror_flag
6088          CFLAGS="-g"
6089          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h.  */
6091
6092 int
6093 main (void)
6094 {
6095
6096   ;
6097   return 0;
6098 }
6099 _ACEOF
6100 if ac_fn_c_try_compile "$LINENO"
6101 then :
6102   ac_cv_prog_cc_g=yes
6103 fi
6104 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6105 fi
6106 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6107 fi
6108 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6109    ac_c_werror_flag=$ac_save_c_werror_flag
6110 fi
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6112 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
6113 if test $ac_test_CFLAGS; then
6114   CFLAGS=$ac_save_CFLAGS
6115 elif test $ac_cv_prog_cc_g = yes; then
6116   if test "$GCC" = yes; then
6117     CFLAGS="-g -O2"
6118   else
6119     CFLAGS="-g"
6120   fi
6121 else
6122   if test "$GCC" = yes; then
6123     CFLAGS="-O2"
6124   else
6125     CFLAGS=
6126   fi
6127 fi
6128 ac_prog_cc_stdc=no
6129 if test x$ac_prog_cc_stdc = xno
6130 then :
6131   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6132 printf %s "checking for $CC option to enable C11 features... " >&6; }
6133 if test ${ac_cv_prog_cc_c11+y}
6134 then :
6135   printf %s "(cached) " >&6
6136 else $as_nop
6137   ac_cv_prog_cc_c11=no
6138 ac_save_CC=$CC
6139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6140 /* end confdefs.h.  */
6141 $ac_c_conftest_c11_program
6142 _ACEOF
6143 for ac_arg in '' -std=gnu11
6144 do
6145   CC="$ac_save_CC $ac_arg"
6146   if ac_fn_c_try_compile "$LINENO"
6147 then :
6148   ac_cv_prog_cc_c11=$ac_arg
6149 fi
6150 rm -f core conftest.err conftest.$ac_objext conftest.beam
6151   test "x$ac_cv_prog_cc_c11" != "xno" && break
6152 done
6153 rm -f conftest.$ac_ext
6154 CC=$ac_save_CC
6155 fi
6156
6157 if test "x$ac_cv_prog_cc_c11" = xno
6158 then :
6159   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6160 printf "%s\n" "unsupported" >&6; }
6161 else $as_nop
6162   if test "x$ac_cv_prog_cc_c11" = x
6163 then :
6164   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6165 printf "%s\n" "none needed" >&6; }
6166 else $as_nop
6167   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6168 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6169      CC="$CC $ac_cv_prog_cc_c11"
6170 fi
6171   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6172   ac_prog_cc_stdc=c11
6173 fi
6174 fi
6175 if test x$ac_prog_cc_stdc = xno
6176 then :
6177   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6178 printf %s "checking for $CC option to enable C99 features... " >&6; }
6179 if test ${ac_cv_prog_cc_c99+y}
6180 then :
6181   printf %s "(cached) " >&6
6182 else $as_nop
6183   ac_cv_prog_cc_c99=no
6184 ac_save_CC=$CC
6185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6186 /* end confdefs.h.  */
6187 $ac_c_conftest_c99_program
6188 _ACEOF
6189 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6190 do
6191   CC="$ac_save_CC $ac_arg"
6192   if ac_fn_c_try_compile "$LINENO"
6193 then :
6194   ac_cv_prog_cc_c99=$ac_arg
6195 fi
6196 rm -f core conftest.err conftest.$ac_objext conftest.beam
6197   test "x$ac_cv_prog_cc_c99" != "xno" && break
6198 done
6199 rm -f conftest.$ac_ext
6200 CC=$ac_save_CC
6201 fi
6202
6203 if test "x$ac_cv_prog_cc_c99" = xno
6204 then :
6205   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6206 printf "%s\n" "unsupported" >&6; }
6207 else $as_nop
6208   if test "x$ac_cv_prog_cc_c99" = x
6209 then :
6210   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6211 printf "%s\n" "none needed" >&6; }
6212 else $as_nop
6213   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6214 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6215      CC="$CC $ac_cv_prog_cc_c99"
6216 fi
6217   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6218   ac_prog_cc_stdc=c99
6219 fi
6220 fi
6221 if test x$ac_prog_cc_stdc = xno
6222 then :
6223   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6224 printf %s "checking for $CC option to enable C89 features... " >&6; }
6225 if test ${ac_cv_prog_cc_c89+y}
6226 then :
6227   printf %s "(cached) " >&6
6228 else $as_nop
6229   ac_cv_prog_cc_c89=no
6230 ac_save_CC=$CC
6231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232 /* end confdefs.h.  */
6233 $ac_c_conftest_c89_program
6234 _ACEOF
6235 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6236 do
6237   CC="$ac_save_CC $ac_arg"
6238   if ac_fn_c_try_compile "$LINENO"
6239 then :
6240   ac_cv_prog_cc_c89=$ac_arg
6241 fi
6242 rm -f core conftest.err conftest.$ac_objext conftest.beam
6243   test "x$ac_cv_prog_cc_c89" != "xno" && break
6244 done
6245 rm -f conftest.$ac_ext
6246 CC=$ac_save_CC
6247 fi
6248
6249 if test "x$ac_cv_prog_cc_c89" = xno
6250 then :
6251   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6252 printf "%s\n" "unsupported" >&6; }
6253 else $as_nop
6254   if test "x$ac_cv_prog_cc_c89" = x
6255 then :
6256   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6257 printf "%s\n" "none needed" >&6; }
6258 else $as_nop
6259   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6260 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6261      CC="$CC $ac_cv_prog_cc_c89"
6262 fi
6263   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6264   ac_prog_cc_stdc=c89
6265 fi
6266 fi
6267
6268 ac_ext=c
6269 ac_cpp='$CPP $CPPFLAGS'
6270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6273
6274
6275   ac_ext=c
6276 ac_cpp='$CPP $CPPFLAGS'
6277 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6278 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6279 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6281 printf %s "checking whether $CC understands -c and -o together... " >&6; }
6282 if test ${am_cv_prog_cc_c_o+y}
6283 then :
6284   printf %s "(cached) " >&6
6285 else $as_nop
6286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h.  */
6288
6289 int
6290 main (void)
6291 {
6292
6293   ;
6294   return 0;
6295 }
6296 _ACEOF
6297   # Make sure it works both with $CC and with simple cc.
6298   # Following AC_PROG_CC_C_O, we do the test twice because some
6299   # compilers refuse to overwrite an existing .o file with -o,
6300   # though they will create one.
6301   am_cv_prog_cc_c_o=yes
6302   for am_i in 1 2; do
6303     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6304    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6305    ac_status=$?
6306    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307    (exit $ac_status); } \
6308          && test -f conftest2.$ac_objext; then
6309       : OK
6310     else
6311       am_cv_prog_cc_c_o=no
6312       break
6313     fi
6314   done
6315   rm -f core conftest*
6316   unset am_i
6317 fi
6318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6319 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6320 if test "$am_cv_prog_cc_c_o" != yes; then
6321    # Losing compiler, so override with the script.
6322    # FIXME: It is wrong to rewrite CC.
6323    # But if we don't then we get into trouble of one sort or another.
6324    # A longer-term fix would be to have automake use am__CC in this case,
6325    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6326    CC="$am_aux_dir/compile $CC"
6327 fi
6328 ac_ext=c
6329 ac_cpp='$CPP $CPPFLAGS'
6330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6333
6334
6335
6336   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6337 printf %s "checking whether the compiler is clang... " >&6; }
6338 if test ${gl_cv_compiler_clang+y}
6339 then :
6340   printf %s "(cached) " >&6
6341 else $as_nop
6342                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343 /* end confdefs.h.  */
6344
6345            #ifdef __clang__
6346            barfbarf
6347            #endif
6348
6349 int
6350 main (void)
6351 {
6352
6353   ;
6354   return 0;
6355 }
6356
6357 _ACEOF
6358 if ac_fn_c_try_compile "$LINENO"
6359 then :
6360   gl_cv_compiler_clang=no
6361 else $as_nop
6362   gl_cv_compiler_clang=yes
6363 fi
6364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6365
6366 fi
6367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6368 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6369
6370
6371   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6372 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6373 if test ${gl_cv_compiler_check_decl_option+y}
6374 then :
6375   printf %s "(cached) " >&6
6376 else $as_nop
6377   if test $gl_cv_compiler_clang = yes; then
6378                      save_ac_compile="$ac_compile"
6379        ac_compile="$ac_compile -Werror=implicit-function-declaration"
6380                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381 /* end confdefs.h.  */
6382
6383 int
6384 main (void)
6385 {
6386
6387   ;
6388   return 0;
6389 }
6390 _ACEOF
6391 if ac_fn_c_try_compile "$LINENO"
6392 then :
6393   gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6394 else $as_nop
6395   gl_cv_compiler_check_decl_option=none
6396 fi
6397 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6398        ac_compile="$save_ac_compile"
6399      else
6400        gl_cv_compiler_check_decl_option=none
6401      fi
6402
6403 fi
6404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6405 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6406   if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6407     ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6408   else
6409     ac_compile_for_check_decl="$ac_compile"
6410   fi
6411
6412 DEPDIR="${am__leading_dot}deps"
6413
6414 ac_config_commands="$ac_config_commands depfiles"
6415
6416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6417 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6418 cat > confinc.mk << 'END'
6419 am__doit:
6420         @echo this is the am__doit target >confinc.out
6421 .PHONY: am__doit
6422 END
6423 am__include="#"
6424 am__quote=
6425 # BSD make does it like this.
6426 echo '.include "confinc.mk" # ignored' > confmf.BSD
6427 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6428 echo 'include confinc.mk # ignored' > confmf.GNU
6429 _am_result=no
6430 for s in GNU BSD; do
6431   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6432    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6433    ac_status=$?
6434    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435    (exit $ac_status); }
6436   case $?:`cat confinc.out 2>/dev/null` in #(
6437   '0:this is the am__doit target') :
6438     case $s in #(
6439   BSD) :
6440     am__include='.include' am__quote='"' ;; #(
6441   *) :
6442     am__include='include' am__quote='' ;;
6443 esac ;; #(
6444   *) :
6445      ;;
6446 esac
6447   if test "$am__include" != "#"; then
6448     _am_result="yes ($s style)"
6449     break
6450   fi
6451 done
6452 rm -f confinc.* confmf.*
6453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6454 printf "%s\n" "${_am_result}" >&6; }
6455
6456 # Check whether --enable-dependency-tracking was given.
6457 if test ${enable_dependency_tracking+y}
6458 then :
6459   enableval=$enable_dependency_tracking;
6460 fi
6461
6462 if test "x$enable_dependency_tracking" != xno; then
6463   am_depcomp="$ac_aux_dir/depcomp"
6464   AMDEPBACKSLASH='\'
6465   am__nodep='_no'
6466 fi
6467  if test "x$enable_dependency_tracking" != xno; then
6468   AMDEP_TRUE=
6469   AMDEP_FALSE='#'
6470 else
6471   AMDEP_TRUE='#'
6472   AMDEP_FALSE=
6473 fi
6474
6475
6476
6477 depcc="$CC"   am_compiler_list=
6478
6479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6480 printf %s "checking dependency style of $depcc... " >&6; }
6481 if test ${am_cv_CC_dependencies_compiler_type+y}
6482 then :
6483   printf %s "(cached) " >&6
6484 else $as_nop
6485   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6486   # We make a subdir and do the tests there.  Otherwise we can end up
6487   # making bogus files that we don't know about and never remove.  For
6488   # instance it was reported that on HP-UX the gcc test will end up
6489   # making a dummy file named 'D' -- because '-MD' means "put the output
6490   # in D".
6491   rm -rf conftest.dir
6492   mkdir conftest.dir
6493   # Copy depcomp to subdir because otherwise we won't find it if we're
6494   # using a relative directory.
6495   cp "$am_depcomp" conftest.dir
6496   cd conftest.dir
6497   # We will build objects and dependencies in a subdirectory because
6498   # it helps to detect inapplicable dependency modes.  For instance
6499   # both Tru64's cc and ICC support -MD to output dependencies as a
6500   # side effect of compilation, but ICC will put the dependencies in
6501   # the current directory while Tru64 will put them in the object
6502   # directory.
6503   mkdir sub
6504
6505   am_cv_CC_dependencies_compiler_type=none
6506   if test "$am_compiler_list" = ""; then
6507      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6508   fi
6509   am__universal=false
6510   case " $depcc " in #(
6511      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6512      esac
6513
6514   for depmode in $am_compiler_list; do
6515     # Setup a source with many dependencies, because some compilers
6516     # like to wrap large dependency lists on column 80 (with \), and
6517     # we should not choose a depcomp mode which is confused by this.
6518     #
6519     # We need to recreate these files for each test, as the compiler may
6520     # overwrite some of them when testing with obscure command lines.
6521     # This happens at least with the AIX C compiler.
6522     : > sub/conftest.c
6523     for i in 1 2 3 4 5 6; do
6524       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6525       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6526       # Solaris 10 /bin/sh.
6527       echo '/* dummy */' > sub/conftst$i.h
6528     done
6529     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6530
6531     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6532     # mode.  It turns out that the SunPro C++ compiler does not properly
6533     # handle '-M -o', and we need to detect this.  Also, some Intel
6534     # versions had trouble with output in subdirs.
6535     am__obj=sub/conftest.${OBJEXT-o}
6536     am__minus_obj="-o $am__obj"
6537     case $depmode in
6538     gcc)
6539       # This depmode causes a compiler race in universal mode.
6540       test "$am__universal" = false || continue
6541       ;;
6542     nosideeffect)
6543       # After this tag, mechanisms are not by side-effect, so they'll
6544       # only be used when explicitly requested.
6545       if test "x$enable_dependency_tracking" = xyes; then
6546         continue
6547       else
6548         break
6549       fi
6550       ;;
6551     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6552       # This compiler won't grok '-c -o', but also, the minuso test has
6553       # not run yet.  These depmodes are late enough in the game, and
6554       # so weak that their functioning should not be impacted.
6555       am__obj=conftest.${OBJEXT-o}
6556       am__minus_obj=
6557       ;;
6558     none) break ;;
6559     esac
6560     if depmode=$depmode \
6561        source=sub/conftest.c object=$am__obj \
6562        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6563        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6564          >/dev/null 2>conftest.err &&
6565        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6566        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6567        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6568        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6569       # icc doesn't choke on unknown options, it will just issue warnings
6570       # or remarks (even with -Werror).  So we grep stderr for any message
6571       # that says an option was ignored or not supported.
6572       # When given -MP, icc 7.0 and 7.1 complain thusly:
6573       #   icc: Command line warning: ignoring option '-M'; no argument required
6574       # The diagnosis changed in icc 8.0:
6575       #   icc: Command line remark: option '-MP' not supported
6576       if (grep 'ignoring option' conftest.err ||
6577           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6578         am_cv_CC_dependencies_compiler_type=$depmode
6579         break
6580       fi
6581     fi
6582   done
6583
6584   cd ..
6585   rm -rf conftest.dir
6586 else
6587   am_cv_CC_dependencies_compiler_type=none
6588 fi
6589
6590 fi
6591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6592 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6593 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6594
6595  if
6596   test "x$enable_dependency_tracking" != xno \
6597   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6598   am__fastdepCC_TRUE=
6599   am__fastdepCC_FALSE='#'
6600 else
6601   am__fastdepCC_TRUE='#'
6602   am__fastdepCC_FALSE=
6603 fi
6604
6605
6606
6607
6608 ac_header= ac_cache=
6609 for ac_item in $ac_header_c_list
6610 do
6611   if test $ac_cache; then
6612     ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6613     if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6614       printf "%s\n" "#define $ac_item 1" >> confdefs.h
6615     fi
6616     ac_header= ac_cache=
6617   elif test $ac_header; then
6618     ac_cache=$ac_item
6619   else
6620     ac_header=$ac_item
6621   fi
6622 done
6623
6624
6625
6626
6627
6628
6629
6630
6631 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6632 then :
6633
6634 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6635
6636 fi
6637
6638
6639
6640
6641
6642
6643   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6644 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6645 if test ${ac_cv_safe_to_define___extensions__+y}
6646 then :
6647   printf %s "(cached) " >&6
6648 else $as_nop
6649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6650 /* end confdefs.h.  */
6651
6652 #         define __EXTENSIONS__ 1
6653           $ac_includes_default
6654 int
6655 main (void)
6656 {
6657
6658   ;
6659   return 0;
6660 }
6661 _ACEOF
6662 if ac_fn_c_try_compile "$LINENO"
6663 then :
6664   ac_cv_safe_to_define___extensions__=yes
6665 else $as_nop
6666   ac_cv_safe_to_define___extensions__=no
6667 fi
6668 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6669 fi
6670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6671 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6672
6673   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6674 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6675 if test ${ac_cv_should_define__xopen_source+y}
6676 then :
6677   printf %s "(cached) " >&6
6678 else $as_nop
6679   ac_cv_should_define__xopen_source=no
6680     if test $ac_cv_header_wchar_h = yes
6681 then :
6682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h.  */
6684
6685           #include <wchar.h>
6686           mbstate_t x;
6687 int
6688 main (void)
6689 {
6690
6691   ;
6692   return 0;
6693 }
6694 _ACEOF
6695 if ac_fn_c_try_compile "$LINENO"
6696 then :
6697
6698 else $as_nop
6699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700 /* end confdefs.h.  */
6701
6702             #define _XOPEN_SOURCE 500
6703             #include <wchar.h>
6704             mbstate_t x;
6705 int
6706 main (void)
6707 {
6708
6709   ;
6710   return 0;
6711 }
6712 _ACEOF
6713 if ac_fn_c_try_compile "$LINENO"
6714 then :
6715   ac_cv_should_define__xopen_source=yes
6716 fi
6717 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6718 fi
6719 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6720 fi
6721 fi
6722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6723 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6724
6725   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6726
6727   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6728
6729   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6730
6731   printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6732
6733   printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6734
6735   printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6736
6737   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6738
6739   printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6740
6741   printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6742
6743   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6744
6745   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6746
6747   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6748
6749   printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6750
6751   printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6752
6753   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6754
6755   if test $ac_cv_header_minix_config_h = yes
6756 then :
6757   MINIX=yes
6758     printf "%s\n" "#define _MINIX 1" >>confdefs.h
6759
6760     printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6761
6762     printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6763
6764 else $as_nop
6765   MINIX=
6766 fi
6767   if test $ac_cv_safe_to_define___extensions__ = yes
6768 then :
6769   printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6770
6771 fi
6772   if test $ac_cv_should_define__xopen_source = yes
6773 then :
6774   printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6775
6776 fi
6777
6778
6779
6780   # Make sure we can run config.sub.
6781 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6782   as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6783
6784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6785 printf %s "checking build system type... " >&6; }
6786 if test ${ac_cv_build+y}
6787 then :
6788   printf %s "(cached) " >&6
6789 else $as_nop
6790   ac_build_alias=$build_alias
6791 test "x$ac_build_alias" = x &&
6792   ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6793 test "x$ac_build_alias" = x &&
6794   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6795 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6796   as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6797
6798 fi
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6800 printf "%s\n" "$ac_cv_build" >&6; }
6801 case $ac_cv_build in
6802 *-*-*) ;;
6803 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6804 esac
6805 build=$ac_cv_build
6806 ac_save_IFS=$IFS; IFS='-'
6807 set x $ac_cv_build
6808 shift
6809 build_cpu=$1
6810 build_vendor=$2
6811 shift; shift
6812 # Remember, the first character of IFS is used to create $*,
6813 # except with old shells:
6814 build_os=$*
6815 IFS=$ac_save_IFS
6816 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6817
6818
6819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6820 printf %s "checking host system type... " >&6; }
6821 if test ${ac_cv_host+y}
6822 then :
6823   printf %s "(cached) " >&6
6824 else $as_nop
6825   if test "x$host_alias" = x; then
6826   ac_cv_host=$ac_cv_build
6827 else
6828   ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6829     as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6830 fi
6831
6832 fi
6833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6834 printf "%s\n" "$ac_cv_host" >&6; }
6835 case $ac_cv_host in
6836 *-*-*) ;;
6837 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6838 esac
6839 host=$ac_cv_host
6840 ac_save_IFS=$IFS; IFS='-'
6841 set x $ac_cv_host
6842 shift
6843 host_cpu=$1
6844 host_vendor=$2
6845 shift; shift
6846 # Remember, the first character of IFS is used to create $*,
6847 # except with old shells:
6848 host_os=$*
6849 IFS=$ac_save_IFS
6850 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6851
6852
6853
6854
6855
6856
6857   case "$host_os" in
6858     openbsd*)
6859
6860 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6861
6862       ;;
6863   esac
6864
6865 ac_ext=c
6866 ac_cpp='$CPP $CPPFLAGS'
6867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6871 printf %s "checking how to run the C preprocessor... " >&6; }
6872 # On Suns, sometimes $CPP names a directory.
6873 if test -n "$CPP" && test -d "$CPP"; then
6874   CPP=
6875 fi
6876 if test -z "$CPP"; then
6877   if test ${ac_cv_prog_CPP+y}
6878 then :
6879   printf %s "(cached) " >&6
6880 else $as_nop
6881       # Double quotes because $CC needs to be expanded
6882     for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6883     do
6884       ac_preproc_ok=false
6885 for ac_c_preproc_warn_flag in '' yes
6886 do
6887   # Use a header file that comes with gcc, so configuring glibc
6888   # with a fresh cross-compiler works.
6889   # On the NeXT, cc -E runs the code through the compiler's parser,
6890   # not just through cpp. "Syntax error" is here to catch this case.
6891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892 /* end confdefs.h.  */
6893 #include <limits.h>
6894                      Syntax error
6895 _ACEOF
6896 if ac_fn_c_try_cpp "$LINENO"
6897 then :
6898
6899 else $as_nop
6900   # Broken: fails on valid input.
6901 continue
6902 fi
6903 rm -f conftest.err conftest.i conftest.$ac_ext
6904
6905   # OK, works on sane cases.  Now check whether nonexistent headers
6906   # can be detected and how.
6907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908 /* end confdefs.h.  */
6909 #include <ac_nonexistent.h>
6910 _ACEOF
6911 if ac_fn_c_try_cpp "$LINENO"
6912 then :
6913   # Broken: success on invalid input.
6914 continue
6915 else $as_nop
6916   # Passes both tests.
6917 ac_preproc_ok=:
6918 break
6919 fi
6920 rm -f conftest.err conftest.i conftest.$ac_ext
6921
6922 done
6923 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6924 rm -f conftest.i conftest.err conftest.$ac_ext
6925 if $ac_preproc_ok
6926 then :
6927   break
6928 fi
6929
6930     done
6931     ac_cv_prog_CPP=$CPP
6932
6933 fi
6934   CPP=$ac_cv_prog_CPP
6935 else
6936   ac_cv_prog_CPP=$CPP
6937 fi
6938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6939 printf "%s\n" "$CPP" >&6; }
6940 ac_preproc_ok=false
6941 for ac_c_preproc_warn_flag in '' yes
6942 do
6943   # Use a header file that comes with gcc, so configuring glibc
6944   # with a fresh cross-compiler works.
6945   # On the NeXT, cc -E runs the code through the compiler's parser,
6946   # not just through cpp. "Syntax error" is here to catch this case.
6947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948 /* end confdefs.h.  */
6949 #include <limits.h>
6950                      Syntax error
6951 _ACEOF
6952 if ac_fn_c_try_cpp "$LINENO"
6953 then :
6954
6955 else $as_nop
6956   # Broken: fails on valid input.
6957 continue
6958 fi
6959 rm -f conftest.err conftest.i conftest.$ac_ext
6960
6961   # OK, works on sane cases.  Now check whether nonexistent headers
6962   # can be detected and how.
6963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964 /* end confdefs.h.  */
6965 #include <ac_nonexistent.h>
6966 _ACEOF
6967 if ac_fn_c_try_cpp "$LINENO"
6968 then :
6969   # Broken: success on invalid input.
6970 continue
6971 else $as_nop
6972   # Passes both tests.
6973 ac_preproc_ok=:
6974 break
6975 fi
6976 rm -f conftest.err conftest.i conftest.$ac_ext
6977
6978 done
6979 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6980 rm -f conftest.i conftest.err conftest.$ac_ext
6981 if $ac_preproc_ok
6982 then :
6983
6984 else $as_nop
6985   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6986 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6987 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6988 See \`config.log' for more details" "$LINENO" 5; }
6989 fi
6990
6991 ac_ext=c
6992 ac_cpp='$CPP $CPPFLAGS'
6993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6996
6997
6998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6999 printf %s "checking for grep that handles long lines and -e... " >&6; }
7000 if test ${ac_cv_path_GREP+y}
7001 then :
7002   printf %s "(cached) " >&6
7003 else $as_nop
7004   if test -z "$GREP"; then
7005   ac_path_GREP_found=false
7006   # Loop through the user's path and test for each of PROGNAME-LIST
7007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
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_prog in grep ggrep
7017    do
7018     for ac_exec_ext in '' $ac_executable_extensions; do
7019       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
7020       as_fn_executable_p "$ac_path_GREP" || continue
7021 # Check for GNU ac_path_GREP and select it if it is found.
7022   # Check for GNU $ac_path_GREP
7023 case `"$ac_path_GREP" --version 2>&1` in
7024 *GNU*)
7025   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
7026 *)
7027   ac_count=0
7028   printf %s 0123456789 >"conftest.in"
7029   while :
7030   do
7031     cat "conftest.in" "conftest.in" >"conftest.tmp"
7032     mv "conftest.tmp" "conftest.in"
7033     cp "conftest.in" "conftest.nl"
7034     printf "%s\n" 'GREP' >> "conftest.nl"
7035     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7036     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7037     as_fn_arith $ac_count + 1 && ac_count=$as_val
7038     if test $ac_count -gt ${ac_path_GREP_max-0}; then
7039       # Best one so far, save it but keep looking for a better one
7040       ac_cv_path_GREP="$ac_path_GREP"
7041       ac_path_GREP_max=$ac_count
7042     fi
7043     # 10*(2^10) chars as input seems more than enough
7044     test $ac_count -gt 10 && break
7045   done
7046   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7047 esac
7048
7049       $ac_path_GREP_found && break 3
7050     done
7051   done
7052   done
7053 IFS=$as_save_IFS
7054   if test -z "$ac_cv_path_GREP"; then
7055     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7056   fi
7057 else
7058   ac_cv_path_GREP=$GREP
7059 fi
7060
7061 fi
7062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
7063 printf "%s\n" "$ac_cv_path_GREP" >&6; }
7064  GREP="$ac_cv_path_GREP"
7065
7066
7067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7068 printf %s "checking for egrep... " >&6; }
7069 if test ${ac_cv_path_EGREP+y}
7070 then :
7071   printf %s "(cached) " >&6
7072 else $as_nop
7073   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7074    then ac_cv_path_EGREP="$GREP -E"
7075    else
7076      if test -z "$EGREP"; then
7077   ac_path_EGREP_found=false
7078   # Loop through the user's path and test for each of PROGNAME-LIST
7079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7080 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7081 do
7082   IFS=$as_save_IFS
7083   case $as_dir in #(((
7084     '') as_dir=./ ;;
7085     */) ;;
7086     *) as_dir=$as_dir/ ;;
7087   esac
7088     for ac_prog in egrep
7089    do
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7092       as_fn_executable_p "$ac_path_EGREP" || continue
7093 # Check for GNU ac_path_EGREP and select it if it is found.
7094   # Check for GNU $ac_path_EGREP
7095 case `"$ac_path_EGREP" --version 2>&1` in
7096 *GNU*)
7097   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7098 *)
7099   ac_count=0
7100   printf %s 0123456789 >"conftest.in"
7101   while :
7102   do
7103     cat "conftest.in" "conftest.in" >"conftest.tmp"
7104     mv "conftest.tmp" "conftest.in"
7105     cp "conftest.in" "conftest.nl"
7106     printf "%s\n" 'EGREP' >> "conftest.nl"
7107     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7108     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7109     as_fn_arith $ac_count + 1 && ac_count=$as_val
7110     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
7111       # Best one so far, save it but keep looking for a better one
7112       ac_cv_path_EGREP="$ac_path_EGREP"
7113       ac_path_EGREP_max=$ac_count
7114     fi
7115     # 10*(2^10) chars as input seems more than enough
7116     test $ac_count -gt 10 && break
7117   done
7118   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7119 esac
7120
7121       $ac_path_EGREP_found && break 3
7122     done
7123   done
7124   done
7125 IFS=$as_save_IFS
7126   if test -z "$ac_cv_path_EGREP"; then
7127     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7128   fi
7129 else
7130   ac_cv_path_EGREP=$EGREP
7131 fi
7132
7133    fi
7134 fi
7135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
7136 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
7137  EGREP="$ac_cv_path_EGREP"
7138
7139
7140
7141
7142
7143   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7144 printf %s "checking for Minix Amsterdam compiler... " >&6; }
7145 if test ${gl_cv_c_amsterdam_compiler+y}
7146 then :
7147   printf %s "(cached) " >&6
7148 else $as_nop
7149
7150       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h.  */
7152
7153 #ifdef __ACK__
7154 Amsterdam
7155 #endif
7156
7157 _ACEOF
7158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7159   $EGREP "Amsterdam" >/dev/null 2>&1
7160 then :
7161   gl_cv_c_amsterdam_compiler=yes
7162 else $as_nop
7163   gl_cv_c_amsterdam_compiler=no
7164 fi
7165 rm -rf conftest*
7166
7167
7168 fi
7169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7170 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
7171
7172       if test $gl_cv_c_amsterdam_compiler = yes; then
7173     if test -z "$AR"; then
7174       AR='cc -c.a'
7175     fi
7176     if test -z "$ARFLAGS"; then
7177       ARFLAGS='-o'
7178     fi
7179   else
7180                                                 :
7181   fi
7182
7183         if test -n "$ac_tool_prefix"; then
7184   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7185 set dummy ${ac_tool_prefix}ar; ac_word=$2
7186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187 printf %s "checking for $ac_word... " >&6; }
7188 if test ${ac_cv_prog_AR+y}
7189 then :
7190   printf %s "(cached) " >&6
7191 else $as_nop
7192   if test -n "$AR"; then
7193   ac_cv_prog_AR="$AR" # Let the user override the test.
7194 else
7195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196 for as_dir in $PATH
7197 do
7198   IFS=$as_save_IFS
7199   case $as_dir in #(((
7200     '') as_dir=./ ;;
7201     */) ;;
7202     *) as_dir=$as_dir/ ;;
7203   esac
7204     for ac_exec_ext in '' $ac_executable_extensions; do
7205   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7206     ac_cv_prog_AR="${ac_tool_prefix}ar"
7207     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7208     break 2
7209   fi
7210 done
7211   done
7212 IFS=$as_save_IFS
7213
7214 fi
7215 fi
7216 AR=$ac_cv_prog_AR
7217 if test -n "$AR"; then
7218   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7219 printf "%s\n" "$AR" >&6; }
7220 else
7221   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222 printf "%s\n" "no" >&6; }
7223 fi
7224
7225
7226 fi
7227 if test -z "$ac_cv_prog_AR"; then
7228   ac_ct_AR=$AR
7229   # Extract the first word of "ar", so it can be a program name with args.
7230 set dummy ar; ac_word=$2
7231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7232 printf %s "checking for $ac_word... " >&6; }
7233 if test ${ac_cv_prog_ac_ct_AR+y}
7234 then :
7235   printf %s "(cached) " >&6
7236 else $as_nop
7237   if test -n "$ac_ct_AR"; then
7238   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7239 else
7240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 for as_dir in $PATH
7242 do
7243   IFS=$as_save_IFS
7244   case $as_dir in #(((
7245     '') as_dir=./ ;;
7246     */) ;;
7247     *) as_dir=$as_dir/ ;;
7248   esac
7249     for ac_exec_ext in '' $ac_executable_extensions; do
7250   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7251     ac_cv_prog_ac_ct_AR="ar"
7252     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7253     break 2
7254   fi
7255 done
7256   done
7257 IFS=$as_save_IFS
7258
7259 fi
7260 fi
7261 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7262 if test -n "$ac_ct_AR"; then
7263   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7264 printf "%s\n" "$ac_ct_AR" >&6; }
7265 else
7266   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7267 printf "%s\n" "no" >&6; }
7268 fi
7269
7270   if test "x$ac_ct_AR" = x; then
7271     AR="ar"
7272   else
7273     case $cross_compiling:$ac_tool_warned in
7274 yes:)
7275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7276 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7277 ac_tool_warned=yes ;;
7278 esac
7279     AR=$ac_ct_AR
7280   fi
7281 else
7282   AR="$ac_cv_prog_AR"
7283 fi
7284
7285   if test -z "$ARFLAGS"; then
7286     ARFLAGS='cr'
7287   fi
7288
7289
7290
7291   if test -z "$RANLIB"; then
7292     if test $gl_cv_c_amsterdam_compiler = yes; then
7293       RANLIB=':'
7294     else
7295             if test -n "$ac_tool_prefix"; then
7296   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7297 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299 printf %s "checking for $ac_word... " >&6; }
7300 if test ${ac_cv_prog_RANLIB+y}
7301 then :
7302   printf %s "(cached) " >&6
7303 else $as_nop
7304   if test -n "$RANLIB"; then
7305   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7306 else
7307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308 for as_dir in $PATH
7309 do
7310   IFS=$as_save_IFS
7311   case $as_dir in #(((
7312     '') as_dir=./ ;;
7313     */) ;;
7314     *) as_dir=$as_dir/ ;;
7315   esac
7316     for ac_exec_ext in '' $ac_executable_extensions; do
7317   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7318     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7319     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7320     break 2
7321   fi
7322 done
7323   done
7324 IFS=$as_save_IFS
7325
7326 fi
7327 fi
7328 RANLIB=$ac_cv_prog_RANLIB
7329 if test -n "$RANLIB"; then
7330   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7331 printf "%s\n" "$RANLIB" >&6; }
7332 else
7333   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7334 printf "%s\n" "no" >&6; }
7335 fi
7336
7337
7338 fi
7339 if test -z "$ac_cv_prog_RANLIB"; then
7340   ac_ct_RANLIB=$RANLIB
7341   # Extract the first word of "ranlib", so it can be a program name with args.
7342 set dummy ranlib; ac_word=$2
7343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344 printf %s "checking for $ac_word... " >&6; }
7345 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7346 then :
7347   printf %s "(cached) " >&6
7348 else $as_nop
7349   if test -n "$ac_ct_RANLIB"; then
7350   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7351 else
7352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7353 for as_dir in $PATH
7354 do
7355   IFS=$as_save_IFS
7356   case $as_dir in #(((
7357     '') as_dir=./ ;;
7358     */) ;;
7359     *) as_dir=$as_dir/ ;;
7360   esac
7361     for ac_exec_ext in '' $ac_executable_extensions; do
7362   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7363     ac_cv_prog_ac_ct_RANLIB="ranlib"
7364     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7365     break 2
7366   fi
7367 done
7368   done
7369 IFS=$as_save_IFS
7370
7371 fi
7372 fi
7373 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7374 if test -n "$ac_ct_RANLIB"; then
7375   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7376 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7377 else
7378   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 printf "%s\n" "no" >&6; }
7380 fi
7381
7382   if test "x$ac_ct_RANLIB" = x; then
7383     RANLIB=":"
7384   else
7385     case $cross_compiling:$ac_tool_warned in
7386 yes:)
7387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7388 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7389 ac_tool_warned=yes ;;
7390 esac
7391     RANLIB=$ac_ct_RANLIB
7392   fi
7393 else
7394   RANLIB="$ac_cv_prog_RANLIB"
7395 fi
7396
7397     fi
7398   fi
7399
7400
7401
7402
7403   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
7404 printf %s "checking whether to use C++... " >&6; }
7405     # Check whether --enable-c++ was given.
7406 if test ${enable_c__+y}
7407 then :
7408   enableval=$enable_c__; CXX_CHOICE="$enableval"
7409 else $as_nop
7410   CXX_CHOICE=no
7411 fi
7412
7413   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
7414 printf "%s\n" "$CXX_CHOICE" >&6; }
7415
7416
7417
7418
7419
7420
7421   if test "$CXX_CHOICE" = no; then
7422     CXX=no
7423   fi
7424   if test -z "$CXX"; then
7425     if test -n "$CCC"; then
7426       CXX="$CCC"
7427     else
7428       if test -n "$ac_tool_prefix"; then
7429   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
7430   do
7431     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7432 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434 printf %s "checking for $ac_word... " >&6; }
7435 if test ${ac_cv_prog_CXX+y}
7436 then :
7437   printf %s "(cached) " >&6
7438 else $as_nop
7439   if test -n "$CXX"; then
7440   ac_cv_prog_CXX="$CXX" # Let the user override the test.
7441 else
7442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443 for as_dir in $PATH
7444 do
7445   IFS=$as_save_IFS
7446   case $as_dir in #(((
7447     '') as_dir=./ ;;
7448     */) ;;
7449     *) as_dir=$as_dir/ ;;
7450   esac
7451     for ac_exec_ext in '' $ac_executable_extensions; do
7452   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7453     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
7454     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7455     break 2
7456   fi
7457 done
7458   done
7459 IFS=$as_save_IFS
7460
7461 fi
7462 fi
7463 CXX=$ac_cv_prog_CXX
7464 if test -n "$CXX"; then
7465   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
7466 printf "%s\n" "$CXX" >&6; }
7467 else
7468   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 printf "%s\n" "no" >&6; }
7470 fi
7471
7472
7473     test -n "$CXX" && break
7474   done
7475 fi
7476 if test -z "$CXX"; then
7477   ac_ct_CXX=$CXX
7478   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
7479 do
7480   # Extract the first word of "$ac_prog", so it can be a program name with args.
7481 set dummy $ac_prog; ac_word=$2
7482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7483 printf %s "checking for $ac_word... " >&6; }
7484 if test ${ac_cv_prog_ac_ct_CXX+y}
7485 then :
7486   printf %s "(cached) " >&6
7487 else $as_nop
7488   if test -n "$ac_ct_CXX"; then
7489   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
7490 else
7491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492 for as_dir in $PATH
7493 do
7494   IFS=$as_save_IFS
7495   case $as_dir in #(((
7496     '') as_dir=./ ;;
7497     */) ;;
7498     *) as_dir=$as_dir/ ;;
7499   esac
7500     for ac_exec_ext in '' $ac_executable_extensions; do
7501   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7502     ac_cv_prog_ac_ct_CXX="$ac_prog"
7503     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7504     break 2
7505   fi
7506 done
7507   done
7508 IFS=$as_save_IFS
7509
7510 fi
7511 fi
7512 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
7513 if test -n "$ac_ct_CXX"; then
7514   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
7515 printf "%s\n" "$ac_ct_CXX" >&6; }
7516 else
7517   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518 printf "%s\n" "no" >&6; }
7519 fi
7520
7521
7522   test -n "$ac_ct_CXX" && break
7523 done
7524
7525   if test "x$ac_ct_CXX" = x; then
7526     CXX=":"
7527   else
7528     case $cross_compiling:$ac_tool_warned in
7529 yes:)
7530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7531 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7532 ac_tool_warned=yes ;;
7533 esac
7534     CXX=$ac_ct_CXX
7535   fi
7536 fi
7537
7538     fi
7539   fi
7540   if test "$CXX" != no; then
7541             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
7542 printf %s "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
7543     ac_ext=cpp
7544 ac_cpp='$CXXCPP $CPPFLAGS'
7545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7546 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7548
7549
7550
7551     echo 'int main () { return 0; }' > conftest.$ac_ext
7552     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7553   (eval $ac_link) 2>&5
7554   ac_status=$?
7555   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7556   test $ac_status = 0; } && test -s conftest$ac_exeext; then
7557       gl_cv_prog_ansicxx_works=yes
7558       if (./conftest; exit) 2>/dev/null; then
7559         gl_cv_prog_ansicxx_cross=no
7560       else
7561         gl_cv_prog_ansicxx_cross=yes
7562       fi
7563     else
7564       gl_cv_prog_ansicxx_works=no
7565     fi
7566     rm -fr conftest*
7567     ac_ext=c
7568 ac_cpp='$CPP $CPPFLAGS'
7569 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7570 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7571 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7572
7573     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
7574 printf "%s\n" "$gl_cv_prog_ansicxx_works" >&6; }
7575     if test $gl_cv_prog_ansicxx_works = no; then
7576       CXX=no
7577     else
7578                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
7579 printf %s "checking whether the C++ compiler supports namespaces... " >&6; }
7580       ac_ext=cpp
7581 ac_cpp='$CXXCPP $CPPFLAGS'
7582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7583 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7585
7586       cat <<EOF > conftest.$ac_ext
7587 #include <iostream>
7588 namespace test { using namespace std; }
7589 std::ostream* ptr;
7590 int main () { return 0; }
7591 EOF
7592       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7593   (eval $ac_link) 2>&5
7594   ac_status=$?
7595   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7596   test $ac_status = 0; } && test -s conftest$ac_exeext; then
7597         gl_cv_prog_ansicxx_namespaces=yes
7598       else
7599         gl_cv_prog_ansicxx_namespaces=no
7600       fi
7601       rm -fr conftest*
7602       ac_ext=c
7603 ac_cpp='$CPP $CPPFLAGS'
7604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7607
7608       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
7609 printf "%s\n" "$gl_cv_prog_ansicxx_namespaces" >&6; }
7610       if test $gl_cv_prog_ansicxx_namespaces = no; then
7611         CXX=no
7612       fi
7613     fi
7614   fi
7615
7616
7617
7618    if test "$CXX" != no; then
7619   ANSICXX_TRUE=
7620   ANSICXX_FALSE='#'
7621 else
7622   ANSICXX_TRUE='#'
7623   ANSICXX_FALSE=
7624 fi
7625
7626
7627   if test "$CXX" != no; then
7628
7629 depcc="$CXX"  am_compiler_list=
7630
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7632 printf %s "checking dependency style of $depcc... " >&6; }
7633 if test ${am_cv_CXX_dependencies_compiler_type+y}
7634 then :
7635   printf %s "(cached) " >&6
7636 else $as_nop
7637   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7638   # We make a subdir and do the tests there.  Otherwise we can end up
7639   # making bogus files that we don't know about and never remove.  For
7640   # instance it was reported that on HP-UX the gcc test will end up
7641   # making a dummy file named 'D' -- because '-MD' means "put the output
7642   # in D".
7643   rm -rf conftest.dir
7644   mkdir conftest.dir
7645   # Copy depcomp to subdir because otherwise we won't find it if we're
7646   # using a relative directory.
7647   cp "$am_depcomp" conftest.dir
7648   cd conftest.dir
7649   # We will build objects and dependencies in a subdirectory because
7650   # it helps to detect inapplicable dependency modes.  For instance
7651   # both Tru64's cc and ICC support -MD to output dependencies as a
7652   # side effect of compilation, but ICC will put the dependencies in
7653   # the current directory while Tru64 will put them in the object
7654   # directory.
7655   mkdir sub
7656
7657   am_cv_CXX_dependencies_compiler_type=none
7658   if test "$am_compiler_list" = ""; then
7659      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7660   fi
7661   am__universal=false
7662   case " $depcc " in #(
7663      *\ -arch\ *\ -arch\ *) am__universal=true ;;
7664      esac
7665
7666   for depmode in $am_compiler_list; do
7667     # Setup a source with many dependencies, because some compilers
7668     # like to wrap large dependency lists on column 80 (with \), and
7669     # we should not choose a depcomp mode which is confused by this.
7670     #
7671     # We need to recreate these files for each test, as the compiler may
7672     # overwrite some of them when testing with obscure command lines.
7673     # This happens at least with the AIX C compiler.
7674     : > sub/conftest.c
7675     for i in 1 2 3 4 5 6; do
7676       echo '#include "conftst'$i'.h"' >> sub/conftest.c
7677       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7678       # Solaris 10 /bin/sh.
7679       echo '/* dummy */' > sub/conftst$i.h
7680     done
7681     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7682
7683     # We check with '-c' and '-o' for the sake of the "dashmstdout"
7684     # mode.  It turns out that the SunPro C++ compiler does not properly
7685     # handle '-M -o', and we need to detect this.  Also, some Intel
7686     # versions had trouble with output in subdirs.
7687     am__obj=sub/conftest.${OBJEXT-o}
7688     am__minus_obj="-o $am__obj"
7689     case $depmode in
7690     gcc)
7691       # This depmode causes a compiler race in universal mode.
7692       test "$am__universal" = false || continue
7693       ;;
7694     nosideeffect)
7695       # After this tag, mechanisms are not by side-effect, so they'll
7696       # only be used when explicitly requested.
7697       if test "x$enable_dependency_tracking" = xyes; then
7698         continue
7699       else
7700         break
7701       fi
7702       ;;
7703     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7704       # This compiler won't grok '-c -o', but also, the minuso test has
7705       # not run yet.  These depmodes are late enough in the game, and
7706       # so weak that their functioning should not be impacted.
7707       am__obj=conftest.${OBJEXT-o}
7708       am__minus_obj=
7709       ;;
7710     none) break ;;
7711     esac
7712     if depmode=$depmode \
7713        source=sub/conftest.c object=$am__obj \
7714        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7715        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7716          >/dev/null 2>conftest.err &&
7717        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7718        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7719        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7720        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7721       # icc doesn't choke on unknown options, it will just issue warnings
7722       # or remarks (even with -Werror).  So we grep stderr for any message
7723       # that says an option was ignored or not supported.
7724       # When given -MP, icc 7.0 and 7.1 complain thusly:
7725       #   icc: Command line warning: ignoring option '-M'; no argument required
7726       # The diagnosis changed in icc 8.0:
7727       #   icc: Command line remark: option '-MP' not supported
7728       if (grep 'ignoring option' conftest.err ||
7729           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7730         am_cv_CXX_dependencies_compiler_type=$depmode
7731         break
7732       fi
7733     fi
7734   done
7735
7736   cd ..
7737   rm -rf conftest.dir
7738 else
7739   am_cv_CXX_dependencies_compiler_type=none
7740 fi
7741
7742 fi
7743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
7744 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
7745 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
7746
7747  if
7748   test "x$enable_dependency_tracking" != xno \
7749   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
7750   am__fastdepCXX_TRUE=
7751   am__fastdepCXX_FALSE='#'
7752 else
7753   am__fastdepCXX_TRUE='#'
7754   am__fastdepCXX_FALSE=
7755 fi
7756
7757
7758         ac_ext=cpp
7759 ac_cpp='$CXXCPP $CPPFLAGS'
7760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7761 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7763
7764     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
7765 printf %s "checking whether the compiler supports GNU C++... " >&6; }
7766 if test ${ac_cv_cxx_compiler_gnu+y}
7767 then :
7768   printf %s "(cached) " >&6
7769 else $as_nop
7770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7771 /* end confdefs.h.  */
7772
7773 int
7774 main (void)
7775 {
7776 #ifndef __GNUC__
7777        choke me
7778 #endif
7779
7780   ;
7781   return 0;
7782 }
7783 _ACEOF
7784 if ac_fn_cxx_try_compile "$LINENO"
7785 then :
7786   ac_compiler_gnu=yes
7787 else $as_nop
7788   ac_compiler_gnu=no
7789 fi
7790 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7791 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
7792
7793 fi
7794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
7795 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
7796 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7797
7798     if test $ac_compiler_gnu = yes; then
7799       GXX=yes
7800     else
7801       GXX=
7802     fi
7803     ac_test_CXXFLAGS=${CXXFLAGS+y}
7804 ac_save_CXXFLAGS=$CXXFLAGS
7805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
7806 printf %s "checking whether $CXX accepts -g... " >&6; }
7807 if test ${ac_cv_prog_cxx_g+y}
7808 then :
7809   printf %s "(cached) " >&6
7810 else $as_nop
7811   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7812    ac_cxx_werror_flag=yes
7813    ac_cv_prog_cxx_g=no
7814    CXXFLAGS="-g"
7815    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7816 /* end confdefs.h.  */
7817
7818 int
7819 main (void)
7820 {
7821
7822   ;
7823   return 0;
7824 }
7825 _ACEOF
7826 if ac_fn_cxx_try_compile "$LINENO"
7827 then :
7828   ac_cv_prog_cxx_g=yes
7829 else $as_nop
7830   CXXFLAGS=""
7831       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7832 /* end confdefs.h.  */
7833
7834 int
7835 main (void)
7836 {
7837
7838   ;
7839   return 0;
7840 }
7841 _ACEOF
7842 if ac_fn_cxx_try_compile "$LINENO"
7843 then :
7844
7845 else $as_nop
7846   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7847          CXXFLAGS="-g"
7848          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h.  */
7850
7851 int
7852 main (void)
7853 {
7854
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 if ac_fn_cxx_try_compile "$LINENO"
7860 then :
7861   ac_cv_prog_cxx_g=yes
7862 fi
7863 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7864 fi
7865 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7866 fi
7867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7868    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7869 fi
7870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
7871 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
7872 if test $ac_test_CXXFLAGS; then
7873   CXXFLAGS=$ac_save_CXXFLAGS
7874 elif test $ac_cv_prog_cxx_g = yes; then
7875   if test "$GXX" = yes; then
7876     CXXFLAGS="-g -O2"
7877   else
7878     CXXFLAGS="-g"
7879   fi
7880 else
7881   if test "$GXX" = yes; then
7882     CXXFLAGS="-O2"
7883   else
7884     CXXFLAGS=
7885   fi
7886 fi
7887     ac_ext=c
7888 ac_cpp='$CPP $CPPFLAGS'
7889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7892
7893   else
7894      if false; then
7895   am__fastdepCXX_TRUE=
7896   am__fastdepCXX_FALSE='#'
7897 else
7898   am__fastdepCXX_TRUE='#'
7899   am__fastdepCXX_FALSE=
7900 fi
7901
7902   fi
7903
7904
7905
7906
7907
7908   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7909 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
7910 if test ${ac_cv_sys_largefile_source+y}
7911 then :
7912   printf %s "(cached) " >&6
7913 else $as_nop
7914   while :; do
7915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7916 /* end confdefs.h.  */
7917 #include <sys/types.h> /* for off_t */
7918      #include <stdio.h>
7919 int
7920 main (void)
7921 {
7922 int (*fp) (FILE *, off_t, int) = fseeko;
7923      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7924   ;
7925   return 0;
7926 }
7927 _ACEOF
7928 if ac_fn_c_try_link "$LINENO"
7929 then :
7930   ac_cv_sys_largefile_source=no; break
7931 fi
7932 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7933     conftest$ac_exeext conftest.$ac_ext
7934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935 /* end confdefs.h.  */
7936 #define _LARGEFILE_SOURCE 1
7937 #include <sys/types.h> /* for off_t */
7938      #include <stdio.h>
7939 int
7940 main (void)
7941 {
7942 int (*fp) (FILE *, off_t, int) = fseeko;
7943      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 if ac_fn_c_try_link "$LINENO"
7949 then :
7950   ac_cv_sys_largefile_source=1; break
7951 fi
7952 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7953     conftest$ac_exeext conftest.$ac_ext
7954   ac_cv_sys_largefile_source=unknown
7955   break
7956 done
7957 fi
7958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
7959 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
7960 case $ac_cv_sys_largefile_source in #(
7961   no | unknown) ;;
7962   *)
7963 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
7964 ;;
7965 esac
7966 rm -rf conftest*
7967
7968 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7969 # in glibc 2.1.3, but that breaks too many other things.
7970 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7971 if test $ac_cv_sys_largefile_source != unknown; then
7972
7973 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
7974
7975 fi
7976
7977   case "$host_os" in
7978     hpux*)
7979
7980 printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
7981
7982       ;;
7983   esac
7984
7985
7986
7987
7988   # IEEE behaviour is the default on all CPUs except Alpha and SH
7989   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7990   # and the GCC 4.1.2 manual).
7991   case "$host_cpu" in
7992     alpha*)
7993       # On Alpha systems, a compiler option provides the behaviour.
7994       # See the ieee(3) manual page, also available at
7995       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7996       if test -n "$GCC"; then
7997         # GCC has the option -mieee.
7998         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7999         CPPFLAGS="$CPPFLAGS -mieee"
8000       else
8001         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
8002         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
8003         CPPFLAGS="$CPPFLAGS -ieee"
8004       fi
8005       ;;
8006     sh*)
8007       if test -n "$GCC"; then
8008         # GCC has the option -mieee.
8009         CPPFLAGS="$CPPFLAGS -mieee"
8010       fi
8011       ;;
8012   esac
8013
8014 # Check whether --enable-largefile was given.
8015 if test ${enable_largefile+y}
8016 then :
8017   enableval=$enable_largefile;
8018 fi
8019
8020 if test "$enable_largefile" != no; then
8021
8022   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8023 printf %s "checking for special C compiler options needed for large files... " >&6; }
8024 if test ${ac_cv_sys_largefile_CC+y}
8025 then :
8026   printf %s "(cached) " >&6
8027 else $as_nop
8028   ac_cv_sys_largefile_CC=no
8029      if test "$GCC" != yes; then
8030        ac_save_CC=$CC
8031        while :; do
8032          # IRIX 6.2 and later do not support large files by default,
8033          # so use the C compiler's -n32 option if that helps.
8034          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8035 /* end confdefs.h.  */
8036 #include <sys/types.h>
8037  /* Check that off_t can represent 2**63 - 1 correctly.
8038     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8039     since some C++ compilers masquerading as C compilers
8040     incorrectly reject 9223372036854775807.  */
8041 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8042   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8043                        && LARGE_OFF_T % 2147483647 == 1)
8044                       ? 1 : -1];
8045 int
8046 main (void)
8047 {
8048
8049   ;
8050   return 0;
8051 }
8052 _ACEOF
8053          if ac_fn_c_try_compile "$LINENO"
8054 then :
8055   break
8056 fi
8057 rm -f core conftest.err conftest.$ac_objext conftest.beam
8058          CC="$CC -n32"
8059          if ac_fn_c_try_compile "$LINENO"
8060 then :
8061   ac_cv_sys_largefile_CC=' -n32'; break
8062 fi
8063 rm -f core conftest.err conftest.$ac_objext conftest.beam
8064          break
8065        done
8066        CC=$ac_save_CC
8067        rm -f conftest.$ac_ext
8068     fi
8069 fi
8070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8071 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
8072   if test "$ac_cv_sys_largefile_CC" != no; then
8073     CC=$CC$ac_cv_sys_largefile_CC
8074   fi
8075
8076   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8077 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8078 if test ${ac_cv_sys_file_offset_bits+y}
8079 then :
8080   printf %s "(cached) " >&6
8081 else $as_nop
8082   while :; do
8083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 /* end confdefs.h.  */
8085 #include <sys/types.h>
8086  /* Check that off_t can represent 2**63 - 1 correctly.
8087     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8088     since some C++ compilers masquerading as C compilers
8089     incorrectly reject 9223372036854775807.  */
8090 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8091   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8092                        && LARGE_OFF_T % 2147483647 == 1)
8093                       ? 1 : -1];
8094 int
8095 main (void)
8096 {
8097
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 if ac_fn_c_try_compile "$LINENO"
8103 then :
8104   ac_cv_sys_file_offset_bits=no; break
8105 fi
8106 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108 /* end confdefs.h.  */
8109 #define _FILE_OFFSET_BITS 64
8110 #include <sys/types.h>
8111  /* Check that off_t can represent 2**63 - 1 correctly.
8112     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8113     since some C++ compilers masquerading as C compilers
8114     incorrectly reject 9223372036854775807.  */
8115 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8116   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8117                        && LARGE_OFF_T % 2147483647 == 1)
8118                       ? 1 : -1];
8119 int
8120 main (void)
8121 {
8122
8123   ;
8124   return 0;
8125 }
8126 _ACEOF
8127 if ac_fn_c_try_compile "$LINENO"
8128 then :
8129   ac_cv_sys_file_offset_bits=64; break
8130 fi
8131 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8132   ac_cv_sys_file_offset_bits=unknown
8133   break
8134 done
8135 fi
8136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8137 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
8138 case $ac_cv_sys_file_offset_bits in #(
8139   no | unknown) ;;
8140   *)
8141 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
8142 ;;
8143 esac
8144 rm -rf conftest*
8145   if test $ac_cv_sys_file_offset_bits = unknown; then
8146     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8147 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
8148 if test ${ac_cv_sys_large_files+y}
8149 then :
8150   printf %s "(cached) " >&6
8151 else $as_nop
8152   while :; do
8153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154 /* end confdefs.h.  */
8155 #include <sys/types.h>
8156  /* Check that off_t can represent 2**63 - 1 correctly.
8157     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8158     since some C++ compilers masquerading as C compilers
8159     incorrectly reject 9223372036854775807.  */
8160 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8161   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8162                        && LARGE_OFF_T % 2147483647 == 1)
8163                       ? 1 : -1];
8164 int
8165 main (void)
8166 {
8167
8168   ;
8169   return 0;
8170 }
8171 _ACEOF
8172 if ac_fn_c_try_compile "$LINENO"
8173 then :
8174   ac_cv_sys_large_files=no; break
8175 fi
8176 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178 /* end confdefs.h.  */
8179 #define _LARGE_FILES 1
8180 #include <sys/types.h>
8181  /* Check that off_t can represent 2**63 - 1 correctly.
8182     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8183     since some C++ compilers masquerading as C compilers
8184     incorrectly reject 9223372036854775807.  */
8185 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8186   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8187                        && LARGE_OFF_T % 2147483647 == 1)
8188                       ? 1 : -1];
8189 int
8190 main (void)
8191 {
8192
8193   ;
8194   return 0;
8195 }
8196 _ACEOF
8197 if ac_fn_c_try_compile "$LINENO"
8198 then :
8199   ac_cv_sys_large_files=1; break
8200 fi
8201 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8202   ac_cv_sys_large_files=unknown
8203   break
8204 done
8205 fi
8206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8207 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
8208 case $ac_cv_sys_large_files in #(
8209   no | unknown) ;;
8210   *)
8211 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
8212 ;;
8213 esac
8214 rm -rf conftest*
8215   fi
8216 fi
8217
8218
8219
8220
8221
8222
8223
8224   # Check whether --enable-threads was given.
8225 if test ${enable_threads+y}
8226 then :
8227   enableval=$enable_threads; gl_use_threads=$enableval
8228 else $as_nop
8229   if test -n "$gl_use_threads_default"; then
8230        gl_use_threads="$gl_use_threads_default"
8231      else
8232        case "$host_os" in
8233                                     osf*) gl_use_threads=no ;;
8234                                     cygwin*)
8235                case `uname -r` in
8236                  1.[0-5].*) gl_use_threads=no ;;
8237                  *)         gl_use_threads=yes ;;
8238                esac
8239                ;;
8240                   mingw*)
8241                case "$gl_use_winpthreads_default" in
8242                  yes) gl_use_threads=posix ;;
8243                  no)  gl_use_threads=windows ;;
8244                  *)   gl_use_threads=yes ;;
8245                esac
8246                ;;
8247          *)    gl_use_threads=yes ;;
8248        esac
8249      fi
8250
8251 fi
8252
8253   if test "$gl_use_threads" = yes \
8254      || test "$gl_use_threads" = isoc \
8255      || test "$gl_use_threads" = posix \
8256      || test "$gl_use_threads" = isoc+posix; then
8257     # For using <threads.h> or <pthread.h>:
8258
8259
8260   if test -z "$gl_anythreadlib_early_done"; then
8261     case "$host_os" in
8262       osf*)
8263         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8264         # groks <pthread.h>. cc also understands the flag -pthread, but
8265         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8266         # 2. putting a flag into CPPFLAGS that has an effect on the linker
8267         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8268         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8269         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8270         ;;
8271     esac
8272     # Some systems optimize for single-threaded programs by default, and
8273     # need special flags to disable these optimizations. For example, the
8274     # definition of 'errno' in <errno.h>.
8275     case "$host_os" in
8276       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8277       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8278     esac
8279     gl_anythreadlib_early_done=done
8280   fi
8281
8282   fi
8283
8284
8285
8286   # Pre-early section.
8287
8288
8289
8290
8291   # Code from module absolute-header:
8292   # Code from module accept:
8293   # Code from module accept-tests:
8294   # Code from module access:
8295   # Code from module access-tests:
8296   # Code from module alignof:
8297   # Code from module alignof-tests:
8298   # Code from module alloca:
8299   # Code from module alloca-opt:
8300   # Code from module alloca-opt-tests:
8301   # Code from module announce-gen:
8302   # Code from module ansi-c++-opt:
8303
8304   # Code from module arpa_inet:
8305   # Code from module arpa_inet-c++-tests:
8306   # Code from module arpa_inet-tests:
8307   # Code from module array-list:
8308   # Code from module array-list-tests:
8309   # Code from module array-oset:
8310   # Code from module array-oset-tests:
8311   # Code from module assert:
8312   # Code from module assure:
8313   # Code from module asyncsafe-spin:
8314   # Code from module asyncsafe-spin-tests:
8315   # Code from module at-internal:
8316   # Code from module attribute:
8317   # Code from module autobuild:
8318
8319
8320
8321
8322   if test -z "$AB_PACKAGE"; then
8323     AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
8324   fi
8325   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
8326 printf "%s\n" "$as_me: autobuild project... $AB_PACKAGE" >&6;}
8327
8328   if test -z "$AB_VERSION"; then
8329     AB_VERSION=${PACKAGE_VERSION:-$VERSION}
8330   fi
8331   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
8332 printf "%s\n" "$as_me: autobuild revision... $AB_VERSION" >&6;}
8333
8334   hostname=`hostname`
8335   if test "$hostname"; then
8336     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
8337 printf "%s\n" "$as_me: autobuild hostname... $hostname" >&6;}
8338   fi
8339
8340
8341
8342   date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
8343   if test "$?" != 0; then
8344     date=`date`
8345   fi
8346   if test "$date"; then
8347     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
8348 printf "%s\n" "$as_me: autobuild timestamp... $date" >&6;}
8349   fi
8350
8351   # Code from module avltree-oset:
8352   # Code from module avltree-oset-tests:
8353   # Code from module basename-lgpl:
8354   # Code from module binary-io:
8355   # Code from module binary-io-tests:
8356   # Code from module bind:
8357   # Code from module bind-tests:
8358   # Code from module bitrotate:
8359   # Code from module bitrotate-tests:
8360   # Code from module btowc:
8361   # Code from module btowc-tests:
8362   # Code from module builtin-expect:
8363   # Code from module c-ctype:
8364   # Code from module c-ctype-tests:
8365   # Code from module c-stack:
8366   # Code from module c-stack-tests:
8367   # Code from module c-strcase:
8368   # Code from module c-strcase-tests:
8369   # Code from module c-strcaseeq:
8370   # Code from module c99:
8371   # Code from module calloc-gnu:
8372   # Code from module calloc-gnu-tests:
8373   # Code from module calloc-posix:
8374   # Code from module canonicalize:
8375   # Code from module canonicalize-lgpl:
8376   # Code from module canonicalize-lgpl-tests:
8377   # Code from module canonicalize-tests:
8378   # Code from module chdir:
8379   # Code from module chdir-long:
8380   # Code from module chdir-tests:
8381   # Code from module clean-temp:
8382   # Code from module clean-temp-simple:
8383   # Code from module clock-time:
8384   # Code from module cloexec:
8385   # Code from module cloexec-tests:
8386   # Code from module close:
8387   # Code from module close-stream:
8388   # Code from module close-tests:
8389   # Code from module closedir:
8390   # Code from module closein:
8391   # Code from module closein-tests:
8392   # Code from module closeout:
8393   # Code from module concat-filename:
8394   # Code from module config-h:
8395   # Code from module configmake:
8396   # Code from module connect:
8397   # Code from module connect-tests:
8398   # Code from module creat:
8399   # Code from module creat-tests:
8400   # Code from module ctype:
8401   # Code from module ctype-c++-tests:
8402   # Code from module ctype-tests:
8403   # Code from module d-ino:
8404   # Code from module dirent:
8405   # Code from module dirent-c++-tests:
8406   # Code from module dirent-tests:
8407   # Code from module dirfd:
8408   # Code from module dirname:
8409   # Code from module dirname-lgpl:
8410   # Code from module dirname-tests:
8411   # Code from module do-release-commit-and-tag:
8412   # Code from module double-slash-root:
8413   # Code from module dup:
8414   # Code from module dup-tests:
8415   # Code from module dup2:
8416   # Code from module dup2-tests:
8417   # Code from module dynarray:
8418   # Code from module dynarray-tests:
8419   # Code from module eloop-threshold:
8420   # Code from module environ:
8421   # Code from module environ-tests:
8422   # Code from module errno:
8423   # Code from module errno-c++-tests:
8424   # Code from module errno-tests:
8425   # Code from module error:
8426   # Code from module execute:
8427   # Code from module execute-tests:
8428   # Code from module exitfail:
8429   # Code from module explicit_bzero:
8430   # Code from module explicit_bzero-tests:
8431   # Code from module extensions:
8432   # Code from module extern-inline:
8433   # Code from module fatal-signal:
8434   # Code from module fchdir:
8435   # Code from module fchdir-tests:
8436   # Code from module fclose:
8437   # Code from module fclose-tests:
8438   # Code from module fcntl:
8439   # Code from module fcntl-h:
8440   # Code from module fcntl-h-c++-tests:
8441   # Code from module fcntl-h-tests:
8442   # Code from module fcntl-tests:
8443   # Code from module fd-hook:
8444   # Code from module fd-safer-flag:
8445   # Code from module fdl-1.3:
8446   # Code from module fdopen:
8447   # Code from module fdopen-tests:
8448   # Code from module fdopendir:
8449   # Code from module fdopendir-tests:
8450   # Code from module fflush:
8451
8452   # Code from module fflush-tests:
8453   # Code from module fgetc-tests:
8454   # Code from module file-set:
8455   # Code from module filename:
8456   # Code from module filenamecat:
8457   # Code from module filenamecat-lgpl:
8458   # Code from module filenamecat-tests:
8459   # Code from module findprog:
8460   # Code from module findprog-in:
8461   # Code from module flexmember:
8462   # Code from module float:
8463   # Code from module float-c++-tests:
8464   # Code from module float-tests:
8465   # Code from module fopen:
8466   # Code from module fopen-gnu:
8467   # Code from module fopen-gnu-tests:
8468   # Code from module fopen-safer:
8469   # Code from module fopen-safer-tests:
8470   # Code from module fopen-tests:
8471   # Code from module fpending:
8472   # Code from module fpending-tests:
8473   # Code from module fpieee:
8474
8475   # Code from module fpucw:
8476   # Code from module fpurge:
8477   # Code from module fpurge-tests:
8478   # Code from module fputc-tests:
8479   # Code from module fread-tests:
8480   # Code from module freadahead:
8481   # Code from module freadahead-tests:
8482   # Code from module freading:
8483   # Code from module freading-tests:
8484   # Code from module free-posix:
8485   # Code from module free-posix-tests:
8486   # Code from module freopen:
8487   # Code from module freopen-tests:
8488   # Code from module frexp-nolibm:
8489   # Code from module frexp-nolibm-tests:
8490   # Code from module frexpl-nolibm:
8491   # Code from module frexpl-nolibm-tests:
8492   # Code from module fseek:
8493   # Code from module fseek-tests:
8494   # Code from module fseeko:
8495
8496   # Code from module fseeko-tests:
8497   # Code from module fstat:
8498   # Code from module fstat-tests:
8499   # Code from module fstatat:
8500   # Code from module fstatat-tests:
8501   # Code from module ftell:
8502   # Code from module ftell-tests:
8503   # Code from module ftello:
8504
8505   # Code from module ftello-tests:
8506   # Code from module ftruncate:
8507   # Code from module ftruncate-tests:
8508   # Code from module fwrite-tests:
8509   # Code from module gendocs:
8510   # Code from module getcwd:
8511   # Code from module getcwd-lgpl:
8512   # Code from module getcwd-lgpl-tests:
8513   # Code from module getcwd-tests:
8514   # Code from module getdtablesize:
8515   # Code from module getdtablesize-tests:
8516   # Code from module getopt-gnu:
8517   # Code from module getopt-gnu-tests:
8518   # Code from module getopt-posix:
8519   # Code from module getpagesize:
8520   # Code from module getprogname:
8521   # Code from module getprogname-tests:
8522   # Code from module getrandom:
8523   # Code from module getrandom-tests:
8524   # Code from module gettext-h:
8525   # Code from module gettimeofday:
8526   # Code from module gettimeofday-tests:
8527   # Code from module git-version-gen:
8528   # Code from module gitlog-to-changelog:
8529   # Code from module gnu-web-doc-update:
8530   # Code from module gnumakefile:
8531   # Code from module gnupload:
8532   # Code from module gperf:
8533   # Code from module gpl-3.0:
8534   # Code from module hard-locale:
8535   # Code from module hard-locale-tests:
8536   # Code from module hash:
8537   # Code from module hash-pjw:
8538   # Code from module hash-tests:
8539   # Code from module hash-triple-simple:
8540   # Code from module havelib:
8541   # Code from module host-cpu-c-abi:
8542   # Code from module iconv:
8543   # Code from module iconv-h:
8544   # Code from module iconv-h-c++-tests:
8545   # Code from module iconv-h-tests:
8546   # Code from module iconv-tests:
8547   # Code from module iconv_open:
8548   # Code from module idx:
8549   # Code from module ignore-value:
8550   # Code from module ignore-value-tests:
8551   # Code from module include_next:
8552   # Code from module inet_pton:
8553   # Code from module inet_pton-tests:
8554   # Code from module inline:
8555   # Code from module intprops:
8556   # Code from module intprops-tests:
8557   # Code from module inttostr:
8558   # Code from module inttostr-tests:
8559   # Code from module inttypes:
8560   # Code from module inttypes-c++-tests:
8561   # Code from module inttypes-incomplete:
8562   # Code from module inttypes-tests:
8563   # Code from module ioctl:
8564   # Code from module ioctl-tests:
8565   # Code from module isblank:
8566   # Code from module isblank-tests:
8567   # Code from module isnand-nolibm:
8568   # Code from module isnand-nolibm-tests:
8569   # Code from module isnanf-nolibm:
8570   # Code from module isnanf-nolibm-tests:
8571   # Code from module isnanl-nolibm:
8572   # Code from module isnanl-nolibm-tests:
8573   # Code from module iswblank:
8574   # Code from module iswblank-tests:
8575   # Code from module iswdigit:
8576   # Code from module iswdigit-tests:
8577   # Code from module iswxdigit:
8578   # Code from module iswxdigit-tests:
8579   # Code from module langinfo:
8580   # Code from module langinfo-c++-tests:
8581   # Code from module langinfo-tests:
8582   # Code from module largefile:
8583
8584   # Code from module libc-config:
8585   # Code from module limits-h:
8586   # Code from module limits-h-c++-tests:
8587   # Code from module limits-h-tests:
8588   # Code from module link:
8589   # Code from module link-tests:
8590   # Code from module linked-list:
8591   # Code from module linked-list-tests:
8592   # Code from module linkedhash-list:
8593   # Code from module linkedhash-list-tests:
8594   # Code from module list:
8595   # Code from module listen:
8596   # Code from module listen-tests:
8597   # Code from module localcharset:
8598   # Code from module localcharset-tests:
8599   # Code from module locale:
8600   # Code from module locale-c++-tests:
8601   # Code from module locale-tests:
8602   # Code from module localeconv:
8603   # Code from module localeconv-tests:
8604   # Code from module localename:
8605   # Code from module localename-tests:
8606   # Code from module lock:
8607   # Code from module lseek:
8608   # Code from module lseek-tests:
8609   # Code from module lstat:
8610   # Code from module lstat-tests:
8611   # Code from module maintainer-makefile:
8612   # Code from module malloc-gnu:
8613   # Code from module malloc-gnu-tests:
8614   # Code from module malloc-posix:
8615   # Code from module malloca:
8616   # Code from module malloca-tests:
8617   # Code from module manywarnings:
8618   # Code from module math:
8619   # Code from module math-c++-tests:
8620   # Code from module math-tests:
8621   # Code from module mbchar:
8622   # Code from module mbiter:
8623   # Code from module mbrtowc:
8624   # Code from module mbrtowc-tests:
8625   # Code from module mbsinit:
8626   # Code from module mbsinit-tests:
8627   # Code from module mbslen:
8628   # Code from module mbsstr:
8629   # Code from module mbsstr-tests:
8630   # Code from module mbtowc:
8631   # Code from module mbuiter:
8632   # Code from module memchr:
8633   # Code from module memchr-tests:
8634   # Code from module memchr2:
8635   # Code from module memchr2-tests:
8636   # Code from module mempcpy:
8637   # Code from module memrchr:
8638   # Code from module memrchr-tests:
8639   # Code from module minmax:
8640   # Code from module mkdir:
8641   # Code from module mkdir-tests:
8642   # Code from module mkdtemp:
8643   # Code from module mkstemp:
8644   # Code from module msvc-inval:
8645   # Code from module msvc-nothrow:
8646   # Code from module multiarch:
8647   # Code from module nanosleep:
8648   # Code from module nanosleep-tests:
8649   # Code from module netinet_in:
8650   # Code from module netinet_in-tests:
8651   # Code from module nl_langinfo:
8652   # Code from module nl_langinfo-tests:
8653   # Code from module nocrash:
8654   # Code from module obstack:
8655   # Code from module open:
8656   # Code from module open-tests:
8657   # Code from module openat:
8658   # Code from module openat-die:
8659   # Code from module openat-h:
8660   # Code from module openat-tests:
8661   # Code from module opendir:
8662   # Code from module oset:
8663   # Code from module pathmax:
8664   # Code from module pathmax-tests:
8665   # Code from module perror:
8666   # Code from module perror-tests:
8667   # Code from module pipe-posix:
8668   # Code from module pipe-posix-tests:
8669   # Code from module pipe2:
8670   # Code from module pipe2-safer:
8671   # Code from module pipe2-tests:
8672   # Code from module posix_spawn:
8673   # Code from module posix_spawn-internal:
8674   # Code from module posix_spawn-tests:
8675   # Code from module posix_spawn_file_actions_addchdir:
8676   # Code from module posix_spawn_file_actions_addchdir-tests:
8677   # Code from module posix_spawn_file_actions_addclose:
8678   # Code from module posix_spawn_file_actions_addclose-tests:
8679   # Code from module posix_spawn_file_actions_adddup2:
8680   # Code from module posix_spawn_file_actions_adddup2-tests:
8681   # Code from module posix_spawn_file_actions_addopen:
8682   # Code from module posix_spawn_file_actions_addopen-tests:
8683   # Code from module posix_spawn_file_actions_destroy:
8684   # Code from module posix_spawn_file_actions_init:
8685   # Code from module posix_spawnattr_destroy:
8686   # Code from module posix_spawnattr_init:
8687   # Code from module posix_spawnattr_setflags:
8688   # Code from module posix_spawnattr_setpgroup:
8689   # Code from module posix_spawnattr_setsigmask:
8690   # Code from module posix_spawnp:
8691   # Code from module posix_spawnp-tests:
8692   # Code from module printf-frexp:
8693   # Code from module printf-frexp-tests:
8694   # Code from module printf-frexpl:
8695   # Code from module printf-frexpl-tests:
8696   # Code from module printf-safe:
8697   # Code from module progname:
8698   # Code from module propername:
8699   # Code from module pthread-h:
8700
8701
8702   if test -z "$gl_anythreadlib_early_done"; then
8703     case "$host_os" in
8704       osf*)
8705         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8706         # groks <pthread.h>. cc also understands the flag -pthread, but
8707         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8708         # 2. putting a flag into CPPFLAGS that has an effect on the linker
8709         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8710         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8711         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8712         ;;
8713     esac
8714     # Some systems optimize for single-threaded programs by default, and
8715     # need special flags to disable these optimizations. For example, the
8716     # definition of 'errno' in <errno.h>.
8717     case "$host_os" in
8718       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8719       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8720     esac
8721     gl_anythreadlib_early_done=done
8722   fi
8723
8724   # Code from module pthread-h-c++-tests:
8725   # Code from module pthread-h-tests:
8726   # Code from module pthread-thread:
8727   # Code from module pthread-thread-tests:
8728   # Code from module pthread_sigmask:
8729   # Code from module pthread_sigmask-tests:
8730   # Code from module putenv:
8731   # Code from module quotearg:
8732   # Code from module quotearg-simple:
8733   # Code from module quotearg-simple-tests:
8734   # Code from module raise:
8735   # Code from module raise-tests:
8736   # Code from module rawmemchr:
8737   # Code from module rawmemchr-tests:
8738   # Code from module read-file:
8739   # Code from module read-file-tests:
8740   # Code from module readdir:
8741   # Code from module readlink:
8742   # Code from module readlink-tests:
8743   # Code from module realloc-gnu:
8744   # Code from module realloc-gnu-tests:
8745   # Code from module realloc-posix:
8746   # Code from module reallocarray:
8747   # Code from module reallocarray-tests:
8748   # Code from module regex:
8749   # Code from module regex-tests:
8750   # Code from module rename:
8751   # Code from module rename-tests:
8752   # Code from module rewinddir:
8753   # Code from module rmdir:
8754   # Code from module rmdir-tests:
8755   # Code from module root-uid:
8756   # Code from module same-inode:
8757   # Code from module save-cwd:
8758   # Code from module sched:
8759   # Code from module sched-tests:
8760   # Code from module sched_yield:
8761   # Code from module scratch_buffer:
8762   # Code from module scratch_buffer-tests:
8763   # Code from module secure_getenv:
8764   # Code from module select:
8765   # Code from module select-tests:
8766   # Code from module setenv:
8767   # Code from module setenv-tests:
8768   # Code from module setlocale:
8769   # Code from module setlocale-null:
8770   # Code from module setlocale-null-tests:
8771   # Code from module setlocale-tests:
8772   # Code from module setsockopt:
8773   # Code from module setsockopt-tests:
8774   # Code from module sh-filename:
8775   # Code from module sigaction:
8776   # Code from module sigaction-tests:
8777   # Code from module signal-h:
8778   # Code from module signal-h-c++-tests:
8779   # Code from module signal-h-tests:
8780   # Code from module signbit:
8781   # Code from module signbit-tests:
8782   # Code from module sigpipe:
8783   # Code from module sigpipe-tests:
8784   # Code from module sigprocmask:
8785   # Code from module sigprocmask-tests:
8786   # Code from module sigsegv:
8787   # Code from module sigsegv-tests:
8788   # Code from module size_max:
8789   # Code from module sleep:
8790   # Code from module sleep-tests:
8791   # Code from module snippet/_Noreturn:
8792   # Code from module snippet/arg-nonnull:
8793   # Code from module snippet/c++defs:
8794   # Code from module snippet/unused-parameter:
8795   # Code from module snippet/warn-on-use:
8796   # Code from module snprintf:
8797   # Code from module snprintf-tests:
8798   # Code from module socket:
8799   # Code from module socketlib:
8800   # Code from module sockets:
8801   # Code from module sockets-tests:
8802   # Code from module socklen:
8803   # Code from module sparcv8+:
8804
8805
8806
8807   case "$host_cpu" in
8808     sparc*)
8809       if test -n "$GCC"; then
8810         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether SPARC v8+ instructions are supported" >&5
8811 printf %s "checking whether SPARC v8+ instructions are supported... " >&6; }
8812 if test ${gl_cv_sparc_v8plus+y}
8813 then :
8814   printf %s "(cached) " >&6
8815 else $as_nop
8816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817 /* end confdefs.h.  */
8818
8819 int
8820 main (void)
8821 {
8822 asm volatile ("membar 2");
8823   ;
8824   return 0;
8825 }
8826 _ACEOF
8827 if ac_fn_c_try_compile "$LINENO"
8828 then :
8829   gl_cv_sparc_v8plus=yes
8830 else $as_nop
8831   gl_cv_sparc_v8plus=no
8832 fi
8833 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8834
8835 fi
8836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sparc_v8plus" >&5
8837 printf "%s\n" "$gl_cv_sparc_v8plus" >&6; }
8838         if test $gl_cv_sparc_v8plus = no; then
8839                               CC="$CC -mcpu=v9"
8840           CXX="$CXX -mcpu=v9"
8841         fi
8842       fi
8843       ;;
8844   esac
8845
8846   # Code from module spawn:
8847   # Code from module spawn-c++-tests:
8848   # Code from module spawn-pipe:
8849   # Code from module spawn-pipe-tests:
8850   # Code from module spawn-tests:
8851   # Code from module ssize_t:
8852   # Code from module stat:
8853   # Code from module stat-tests:
8854   # Code from module stat-time:
8855   # Code from module stat-time-tests:
8856   # Code from module std-gnu11:
8857   # Code from module stdalign:
8858   # Code from module stdalign-tests:
8859   # Code from module stdarg:
8860
8861
8862
8863   # Code from module stdarg-tests:
8864   # Code from module stdbool:
8865   # Code from module stdbool-c++-tests:
8866   # Code from module stdbool-tests:
8867   # Code from module stddef:
8868   # Code from module stddef-c++-tests:
8869   # Code from module stddef-tests:
8870   # Code from module stdint:
8871   # Code from module stdint-c++-tests:
8872   # Code from module stdint-tests:
8873   # Code from module stdio:
8874   # Code from module stdio-c++-tests:
8875   # Code from module stdio-tests:
8876   # Code from module stdlib:
8877   # Code from module stdlib-c++-tests:
8878   # Code from module stdlib-safer:
8879   # Code from module stdlib-tests:
8880   # Code from module stpcpy:
8881   # Code from module strchrnul:
8882   # Code from module strchrnul-tests:
8883   # Code from module strdup-posix:
8884   # Code from module streq:
8885   # Code from module strerror:
8886   # Code from module strerror-override:
8887   # Code from module strerror-tests:
8888   # Code from module strerror_r-posix:
8889   # Code from module strerror_r-posix-tests:
8890   # Code from module striconv:
8891   # Code from module striconv-tests:
8892   # Code from module string:
8893   # Code from module string-c++-tests:
8894   # Code from module string-tests:
8895   # Code from module strndup:
8896   # Code from module strnlen:
8897   # Code from module strnlen-tests:
8898   # Code from module strnlen1:
8899   # Code from module strsignal:
8900   # Code from module strsignal-tests:
8901   # Code from module strstr:
8902   # Code from module strstr-simple:
8903   # Code from module strstr-tests:
8904   # Code from module strtod:
8905   # Code from module strtod-tests:
8906   # Code from module symlink:
8907   # Code from module symlink-tests:
8908   # Code from module sys_ioctl:
8909   # Code from module sys_ioctl-c++-tests:
8910   # Code from module sys_ioctl-tests:
8911   # Code from module sys_random:
8912   # Code from module sys_random-c++-tests:
8913   # Code from module sys_random-tests:
8914   # Code from module sys_select:
8915   # Code from module sys_select-c++-tests:
8916   # Code from module sys_select-tests:
8917   # Code from module sys_socket:
8918   # Code from module sys_socket-c++-tests:
8919   # Code from module sys_socket-tests:
8920   # Code from module sys_stat:
8921   # Code from module sys_stat-c++-tests:
8922   # Code from module sys_stat-tests:
8923   # Code from module sys_time:
8924   # Code from module sys_time-c++-tests:
8925   # Code from module sys_time-tests:
8926   # Code from module sys_types:
8927   # Code from module sys_types-c++-tests:
8928   # Code from module sys_types-tests:
8929   # Code from module sys_uio:
8930   # Code from module sys_uio-tests:
8931   # Code from module sys_wait:
8932   # Code from module sys_wait-c++-tests:
8933   # Code from module sys_wait-tests:
8934   # Code from module tempname:
8935   # Code from module test-framework-sh:
8936   # Code from module test-framework-sh-tests:
8937   # Code from module thread:
8938   # Code from module thread-optim:
8939   # Code from module thread-tests:
8940   # Code from module threadlib:
8941
8942
8943
8944   # Code from module time:
8945   # Code from module time-c++-tests:
8946   # Code from module time-tests:
8947   # Code from module tls:
8948   # Code from module tmpdir:
8949   # Code from module trim:
8950   # Code from module unistd:
8951   # Code from module unistd-c++-tests:
8952   # Code from module unistd-safer:
8953   # Code from module unistd-safer-tests:
8954   # Code from module unistd-tests:
8955   # Code from module unistr/base:
8956   # Code from module unistr/u8-mbtoucr:
8957   # Code from module unistr/u8-mbtoucr-tests:
8958   # Code from module unistr/u8-uctomb:
8959   # Code from module unistr/u8-uctomb-tests:
8960   # Code from module unitypes:
8961   # Code from module uniwidth/base:
8962   # Code from module uniwidth/width:
8963   # Code from module uniwidth/width-tests:
8964   # Code from module unlocked-io:
8965   # Code from module unlocked-io-internal:
8966   # Code from module unsetenv:
8967   # Code from module unsetenv-tests:
8968   # Code from module update-copyright:
8969   # Code from module update-copyright-tests:
8970   # Code from module useless-if-before-free:
8971   # Code from module vasnprintf:
8972   # Code from module vasnprintf-tests:
8973   # Code from module vasprintf:
8974   # Code from module vasprintf-posix:
8975   # Code from module vasprintf-posix-tests:
8976   # Code from module vasprintf-tests:
8977   # Code from module vc-list-files:
8978   # Code from module vc-list-files-tests:
8979   # Code from module verify:
8980   # Code from module verify-tests:
8981   # Code from module verror:
8982   # Code from module version-etc:
8983   # Code from module version-etc-fsf:
8984   # Code from module version-etc-tests:
8985   # Code from module vma-iter:
8986   # Code from module wait-process:
8987   # Code from module waitpid:
8988   # Code from module warnings:
8989   # Code from module wchar:
8990   # Code from module wchar-c++-tests:
8991   # Code from module wchar-tests:
8992   # Code from module wcrtomb:
8993   # Code from module wcrtomb-tests:
8994   # Code from module wctob:
8995   # Code from module wctomb:
8996   # Code from module wctype-h:
8997   # Code from module wctype-h-c++-tests:
8998   # Code from module wctype-h-tests:
8999   # Code from module wcwidth:
9000   # Code from module wcwidth-tests:
9001   # Code from module windows-mutex:
9002   # Code from module windows-once:
9003   # Code from module windows-recmutex:
9004   # Code from module windows-rwlock:
9005   # Code from module windows-spawn:
9006   # Code from module windows-spin:
9007   # Code from module windows-thread:
9008   # Code from module windows-tls:
9009   # Code from module write:
9010   # Code from module write-tests:
9011   # Code from module xalloc:
9012   # Code from module xalloc-die:
9013   # Code from module xalloc-die-tests:
9014   # Code from module xalloc-oversized:
9015   # Code from module xconcat-filename:
9016   # Code from module xlist:
9017   # Code from module xmalloca:
9018   # Code from module xoset:
9019   # Code from module xprintf:
9020   # Code from module xsize:
9021   # Code from module xstriconv:
9022   # Code from module xstrndup:
9023   # Code from module xvasprintf:
9024   # Code from module xvasprintf-posix:
9025   # Code from module xvasprintf-tests:
9026   # Code from module yield:
9027
9028
9029 # Maintainer note - comment this line out if you plan to rerun
9030 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
9031 # Leave it uncommented for normal releases, for faster ./configure.
9032
9033
9034
9035
9036 # M4 is single-threaded; so we can optimize gnulib code by using this:
9037
9038
9039
9040
9041 printf "%s\n" "#define GNULIB_REGEX_SINGLE_THREAD 1" >>confdefs.h
9042
9043
9044 printf "%s\n" "#define GNULIB_MBRTOWC_SINGLE_THREAD 1" >>confdefs.h
9045
9046
9047 printf "%s\n" "#define GNULIB_WCHAR_SINGLE_LOCALE 1" >>confdefs.h
9048
9049
9050 # Check whether --enable-gcc-warnings was given.
9051 if test ${enable_gcc_warnings+y}
9052 then :
9053   enableval=$enable_gcc_warnings; case $enableval in
9054      yes|no) ;;
9055      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
9056    esac
9057    gl_gcc_warnings=$enableval
9058 else $as_nop
9059   if test -f "$srcdir"/.tarball-version; then
9060      gl_gcc_warnings=no
9061    else
9062      gl_gcc_warnings=yes
9063    fi
9064
9065 fi
9066
9067
9068 if test "$gl_gcc_warnings" = yes; then
9069
9070   ac_ext=c
9071 ac_cpp='$CPP $CPPFLAGS'
9072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9075
9076
9077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
9078 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
9079 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
9080 then :
9081   printf %s "(cached) " >&6
9082 else $as_nop
9083
9084   gl_save_compiler_FLAGS="$CFLAGS"
9085   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
9086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9087 /* end confdefs.h.  */
9088
9089 int
9090 main (void)
9091 {
9092
9093   ;
9094   return 0;
9095 }
9096 _ACEOF
9097 if ac_fn_c_try_link "$LINENO"
9098 then :
9099   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
9100 else $as_nop
9101   gl_cv_warn_c__Werror__Wunknown_warning_option=no
9102 fi
9103 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9104     conftest$ac_exeext conftest.$ac_ext
9105   CFLAGS="$gl_save_compiler_FLAGS"
9106
9107 fi
9108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
9109 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
9110 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
9111 then :
9112   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
9113 else $as_nop
9114   gl_unknown_warnings_are_errors=
9115 fi
9116
9117   ac_ext=c
9118 ac_cpp='$CPP $CPPFLAGS'
9119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9122
9123
9124
9125
9126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
9127 printf %s "checking whether C compiler handles -Werror... " >&6; }
9128 if test ${gl_cv_warn_c__Werror+y}
9129 then :
9130   printf %s "(cached) " >&6
9131 else $as_nop
9132
9133   gl_save_compiler_FLAGS="$CFLAGS"
9134   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
9135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9136 /* end confdefs.h.  */
9137
9138 int
9139 main (void)
9140 {
9141
9142   ;
9143   return 0;
9144 }
9145 _ACEOF
9146 if ac_fn_c_try_link "$LINENO"
9147 then :
9148   gl_cv_warn_c__Werror=yes
9149 else $as_nop
9150   gl_cv_warn_c__Werror=no
9151 fi
9152 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9153     conftest$ac_exeext conftest.$ac_ext
9154   CFLAGS="$gl_save_compiler_FLAGS"
9155
9156 fi
9157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
9158 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
9159 if test "x$gl_cv_warn_c__Werror" = xyes
9160 then :
9161   as_fn_append WERROR_CFLAGS " -Werror"
9162 fi
9163
9164
9165
9166
9167   # We use '#pragma GCC diagnostic push' to silence some
9168   # warnings, but older gcc doesn't support this.
9169   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
9170 printf %s "checking whether pragma GCC diagnostic push works... " >&6; }
9171 if test ${M4_cv_gcc_pragma_push_works+y}
9172 then :
9173   printf %s "(cached) " >&6
9174 else $as_nop
9175
9176     save_CFLAGS=$CFLAGS
9177     CFLAGS='-Wunknown-pragmas -Werror'
9178     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9179 /* end confdefs.h.  */
9180
9181       #pragma GCC diagnostic push
9182       #pragma GCC diagnostic pop
9183
9184 int
9185 main (void)
9186 {
9187
9188   ;
9189   return 0;
9190 }
9191 _ACEOF
9192 if ac_fn_c_try_compile "$LINENO"
9193 then :
9194   M4_cv_gcc_pragma_push_works=yes
9195 else $as_nop
9196   M4_cv_gcc_pragma_push_works=no
9197 fi
9198 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9199     CFLAGS=$save_CFLAGS
9200 fi
9201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
9202 printf "%s\n" "$M4_cv_gcc_pragma_push_works" >&6; }
9203
9204   # This, $nw, is the list of warnings we disable.
9205   nw=
9206   nw="$nw -Waggregate-return"       # K&R is anachronistic
9207   nw="$nw -Wtraditional-conversion" # K&R is anachronistic
9208   nw="$nw -Wundef"                  # K&R is anachronistic
9209   nw="$nw -Wtraditional"            # K&R is anachronistic
9210   nw="$nw -Wlong-long"              # C90 is anachronistic
9211   nw="$nw -Wvla"                    # gettext's use of VLAs is safe
9212   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
9213   nw="$nw -Wpadded"                 # Our structs are not packed
9214   nw="$nw -Wconversion"             # Too many warnings for now
9215   nw="$nw -Wsign-conversion"        # Too many warnings for now
9216   nw="$nw -Wcast-qual"              # Too many warnings for now
9217   nw="$nw -Wswitch-enum"            # Too many warnings for now
9218   # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
9219   nw="$nw -Wenum-compare"
9220
9221   # Gnulib uses '#pragma GCC diagnostic push' to silence some
9222   # warnings, but older gcc doesn't support this.
9223   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
9224 printf %s "checking whether pragma GCC diagnostic push works... " >&6; }
9225 if test ${M4_cv_gcc_pragma_push_works+y}
9226 then :
9227   printf %s "(cached) " >&6
9228 else $as_nop
9229
9230     save_CFLAGS=$CFLAGS
9231     CFLAGS='-Wunknown-pragmas -Werror'
9232     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h.  */
9234
9235       #pragma GCC diagnostic push
9236       #pragma GCC diagnostic pop
9237
9238 int
9239 main (void)
9240 {
9241
9242   ;
9243   return 0;
9244 }
9245 _ACEOF
9246 if ac_fn_c_try_compile "$LINENO"
9247 then :
9248   M4_cv_gcc_pragma_push_works=yes
9249 else $as_nop
9250   M4_cv_gcc_pragma_push_works=no
9251 fi
9252 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9253     CFLAGS=$save_CFLAGS
9254 fi
9255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
9256 printf "%s\n" "$M4_cv_gcc_pragma_push_works" >&6; }
9257   if test $M4_cv_gcc_pragma_push_works = no; then
9258     nw="$nw -Wmissing-prototypes"
9259     nw="$nw -Wmissing-declarations"
9260     nw="$nw -Wunreachable-code"
9261   fi
9262
9263
9264   ac_ext=c
9265 ac_cpp='$CPP $CPPFLAGS'
9266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9269
9270
9271
9272   if test -n "$GCC"; then
9273
9274             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
9275 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
9276 if test ${gl_cv_cc_nomfi_supported+y}
9277 then :
9278   printf %s "(cached) " >&6
9279 else $as_nop
9280   gl_save_CFLAGS="$CFLAGS"
9281        CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
9282        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9283 /* end confdefs.h.  */
9284
9285 int
9286 main (void)
9287 {
9288
9289   ;
9290   return 0;
9291 }
9292 _ACEOF
9293 if ac_fn_c_try_compile "$LINENO"
9294 then :
9295   gl_cv_cc_nomfi_supported=yes
9296 else $as_nop
9297   gl_cv_cc_nomfi_supported=no
9298 fi
9299 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9300        CFLAGS="$gl_save_CFLAGS"
9301
9302 fi
9303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
9304 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
9305
9306     if test "$gl_cv_cc_nomfi_supported" = yes; then
9307                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
9308 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
9309 if test ${gl_cv_cc_nomfi_needed+y}
9310 then :
9311   printf %s "(cached) " >&6
9312 else $as_nop
9313   gl_save_CFLAGS="$CFLAGS"
9314          CFLAGS="$CFLAGS -Wextra -Werror"
9315          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9316 /* end confdefs.h.  */
9317 int f (void)
9318                 {
9319                   typedef struct { int a; int b; } s_t;
9320                   s_t s1 = { 0, };
9321                   return s1.b;
9322                 }
9323
9324 int
9325 main (void)
9326 {
9327
9328   ;
9329   return 0;
9330 }
9331 _ACEOF
9332 if ac_fn_c_try_compile "$LINENO"
9333 then :
9334   gl_cv_cc_nomfi_needed=no
9335 else $as_nop
9336   gl_cv_cc_nomfi_needed=yes
9337 fi
9338 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9339          CFLAGS="$gl_save_CFLAGS"
9340
9341 fi
9342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
9343 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
9344     fi
9345
9346                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
9347 printf %s "checking whether -Wuninitialized is supported... " >&6; }
9348 if test ${gl_cv_cc_uninitialized_supported+y}
9349 then :
9350   printf %s "(cached) " >&6
9351 else $as_nop
9352   gl_save_CFLAGS="$CFLAGS"
9353        CFLAGS="$CFLAGS -Werror -Wuninitialized"
9354        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355 /* end confdefs.h.  */
9356
9357 int
9358 main (void)
9359 {
9360
9361   ;
9362   return 0;
9363 }
9364 _ACEOF
9365 if ac_fn_c_try_compile "$LINENO"
9366 then :
9367   gl_cv_cc_uninitialized_supported=yes
9368 else $as_nop
9369   gl_cv_cc_uninitialized_supported=no
9370 fi
9371 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9372        CFLAGS="$gl_save_CFLAGS"
9373
9374 fi
9375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
9376 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
9377
9378   fi
9379
9380   # List all gcc warning categories.
9381   # To compare this list to your installed GCC's, run this Bash command:
9382   #
9383   # comm -3 \
9384   #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
9385   #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
9386   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
9387
9388   ws=
9389   for gl_manywarn_item in -fanalyzer -fno-common \
9390     -Wall \
9391     -Warith-conversion \
9392     -Wbad-function-cast \
9393     -Wcast-align=strict \
9394     -Wdate-time \
9395     -Wdisabled-optimization \
9396     -Wdouble-promotion \
9397     -Wduplicated-branches \
9398     -Wduplicated-cond \
9399     -Wextra \
9400     -Wformat-signedness \
9401     -Winit-self \
9402     -Winline \
9403     -Winvalid-pch \
9404     -Wlogical-op \
9405     -Wmissing-declarations \
9406     -Wmissing-include-dirs \
9407     -Wmissing-prototypes \
9408     -Wnested-externs \
9409     -Wnull-dereference \
9410     -Wold-style-definition \
9411     -Wopenmp-simd \
9412     -Woverlength-strings \
9413     -Wpacked \
9414     -Wpointer-arith \
9415     -Wshadow \
9416     -Wstack-protector \
9417     -Wstrict-overflow \
9418     -Wstrict-prototypes \
9419     -Wsuggest-attribute=cold \
9420     -Wsuggest-attribute=const \
9421     -Wsuggest-attribute=format \
9422     -Wsuggest-attribute=malloc \
9423     -Wsuggest-attribute=noreturn \
9424     -Wsuggest-attribute=pure \
9425     -Wsuggest-final-methods \
9426     -Wsuggest-final-types \
9427     -Wsync-nand \
9428     -Wsystem-headers \
9429     -Wtrampolines \
9430     -Wuninitialized \
9431     -Wunknown-pragmas \
9432     -Wunsafe-loop-optimizations \
9433     -Wunused-macros \
9434     -Wvariadic-macros \
9435     -Wvector-operation-performance \
9436     -Wvla \
9437     -Wwrite-strings \
9438     \
9439     ; do
9440     as_fn_append ws " $gl_manywarn_item"
9441   done
9442
9443   # gcc --help=warnings outputs an unusual form for these options; list
9444   # them here so that the above 'comm' command doesn't report a false match.
9445   as_fn_append ws ' -Warray-bounds=2'
9446   as_fn_append ws ' -Wattribute-alias=2'
9447   as_fn_append ws ' -Wformat-overflow=2'
9448   as_fn_append ws ' -Wformat=2'
9449   as_fn_append ws ' -Wformat-truncation=2'
9450   as_fn_append ws ' -Wimplicit-fallthrough=5'
9451   as_fn_append ws ' -Wshift-overflow=2'
9452   as_fn_append ws ' -Wunused-const-variable=2'
9453   as_fn_append ws ' -Wvla-larger-than=4031'
9454
9455   # These are needed for older GCC versions.
9456   if test -n "$GCC"; then
9457     case `($CC --version) 2>/dev/null` in
9458       'gcc (GCC) '[0-3].* | \
9459       'gcc (GCC) '4.[0-7].*)
9460         as_fn_append ws ' -fdiagnostics-show-option'
9461         as_fn_append ws ' -funit-at-a-time'
9462           ;;
9463     esac
9464   fi
9465
9466   # Disable specific options as needed.
9467   if test "$gl_cv_cc_nomfi_needed" = yes; then
9468     as_fn_append ws ' -Wno-missing-field-initializers'
9469   fi
9470
9471   if test "$gl_cv_cc_uninitialized_supported" = no; then
9472     as_fn_append ws ' -Wno-uninitialized'
9473   fi
9474
9475   # Some warnings have too many false alarms in GCC 10.1.
9476   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
9477   as_fn_append ws ' -Wno-analyzer-double-free'
9478   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
9479   as_fn_append ws ' -Wno-analyzer-malloc-leak'
9480   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
9481   as_fn_append ws ' -Wno-analyzer-null-dereference'
9482   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
9483   as_fn_append ws ' -Wno-analyzer-use-after-free'
9484
9485   ac_ext=c
9486 ac_cpp='$CPP $CPPFLAGS'
9487 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9488 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9489 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9490
9491
9492
9493   gl_warn_set=
9494   set x $ws; shift
9495   for gl_warn_item
9496   do
9497     case " $nw " in
9498       *" $gl_warn_item "*)
9499         ;;
9500       *)
9501         as_fn_append gl_warn_set " $gl_warn_item"
9502         ;;
9503     esac
9504   done
9505   ws=$gl_warn_set
9506
9507   for w in $ws; do
9508
9509
9510 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
9511 gl_positive="$w"
9512 case $gl_positive in
9513   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
9514 esac
9515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
9516 printf %s "checking whether C compiler handles $w... " >&6; }
9517 if eval test \${$as_gl_Warn+y}
9518 then :
9519   printf %s "(cached) " >&6
9520 else $as_nop
9521
9522   gl_save_compiler_FLAGS="$CFLAGS"
9523   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
9524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h.  */
9526
9527 int
9528 main (void)
9529 {
9530
9531   ;
9532   return 0;
9533 }
9534 _ACEOF
9535 if ac_fn_c_try_link "$LINENO"
9536 then :
9537   eval "$as_gl_Warn=yes"
9538 else $as_nop
9539   eval "$as_gl_Warn=no"
9540 fi
9541 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9542     conftest$ac_exeext conftest.$ac_ext
9543   CFLAGS="$gl_save_compiler_FLAGS"
9544
9545 fi
9546 eval ac_res=\$$as_gl_Warn
9547                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9548 printf "%s\n" "$ac_res" >&6; }
9549 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
9550 then :
9551   as_fn_append WARN_CFLAGS " $w"
9552 fi
9553
9554
9555   done
9556
9557   # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
9558   # we temporarily override it in format.c if possible.
9559   if test $M4_cv_gcc_pragma_push_works = no; then
9560
9561
9562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
9563 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
9564 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
9565 then :
9566   printf %s "(cached) " >&6
9567 else $as_nop
9568
9569   gl_save_compiler_FLAGS="$CFLAGS"
9570   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
9571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572 /* end confdefs.h.  */
9573
9574 int
9575 main (void)
9576 {
9577
9578   ;
9579   return 0;
9580 }
9581 _ACEOF
9582 if ac_fn_c_try_link "$LINENO"
9583 then :
9584   gl_cv_warn_c__Wno_format_nonliteral=yes
9585 else $as_nop
9586   gl_cv_warn_c__Wno_format_nonliteral=no
9587 fi
9588 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9589     conftest$ac_exeext conftest.$ac_ext
9590   CFLAGS="$gl_save_compiler_FLAGS"
9591
9592 fi
9593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
9594 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
9595 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
9596 then :
9597   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
9598 fi
9599
9600
9601   fi
9602
9603
9604
9605
9606 fi
9607
9608 # Tandem/NSK is broken - it has 'long long int' but not
9609 # 'unsigned long long int', which confuses assumptions made by gnulib.
9610 # Simply pretend that neither type exists if both do not work.
9611
9612   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9613 printf %s "checking for unsigned long long int... " >&6; }
9614 if test ${ac_cv_type_unsigned_long_long_int+y}
9615 then :
9616   printf %s "(cached) " >&6
9617 else $as_nop
9618   ac_cv_type_unsigned_long_long_int=yes
9619      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9620        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9621 /* end confdefs.h.  */
9622
9623   /* For now, do not test the preprocessor; as of 2007 there are too many
9624          implementations with broken preprocessors.  Perhaps this can
9625          be revisited in 2012.  In the meantime, code should not expect
9626          #if to work with literals wider than 32 bits.  */
9627       /* Test literals.  */
9628       long long int ll = 9223372036854775807ll;
9629       long long int nll = -9223372036854775807LL;
9630       unsigned long long int ull = 18446744073709551615ULL;
9631       /* Test constant expressions.   */
9632       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9633                      ? 1 : -1)];
9634       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9635                      ? 1 : -1)];
9636       int i = 63;
9637 int
9638 main (void)
9639 {
9640 /* Test availability of runtime routines for shift and division.  */
9641       long long int llmax = 9223372036854775807ll;
9642       unsigned long long int ullmax = 18446744073709551615ull;
9643       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9644               | (llmax / ll) | (llmax % ll)
9645               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9646               | (ullmax / ull) | (ullmax % ull));
9647   ;
9648   return 0;
9649 }
9650
9651 _ACEOF
9652 if ac_fn_c_try_link "$LINENO"
9653 then :
9654
9655 else $as_nop
9656   ac_cv_type_unsigned_long_long_int=no
9657 fi
9658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9659     conftest$ac_exeext conftest.$ac_ext
9660      fi
9661 fi
9662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9663 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
9664   if test $ac_cv_type_unsigned_long_long_int = yes; then
9665
9666 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9667
9668   fi
9669
9670
9671
9672   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9673 printf %s "checking for long long int... " >&6; }
9674 if test ${ac_cv_type_long_long_int+y}
9675 then :
9676   printf %s "(cached) " >&6
9677 else $as_nop
9678   ac_cv_type_long_long_int=yes
9679       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9680         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9681         if test $ac_cv_type_long_long_int = yes; then
9682                                         if test "$cross_compiling" = yes
9683 then :
9684   :
9685 else $as_nop
9686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9687 /* end confdefs.h.  */
9688 #include <limits.h>
9689                  #ifndef LLONG_MAX
9690                  # define HALF \
9691                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9692                  # define LLONG_MAX (HALF - 1 + HALF)
9693                  #endif
9694 int
9695 main (void)
9696 {
9697 long long int n = 1;
9698                  int i;
9699                  for (i = 0; ; i++)
9700                    {
9701                      long long int m = n << i;
9702                      if (m >> i != n)
9703                        return 1;
9704                      if (LLONG_MAX / 2 < m)
9705                        break;
9706                    }
9707                  return 0;
9708   ;
9709   return 0;
9710 }
9711 _ACEOF
9712 if ac_fn_c_try_run "$LINENO"
9713 then :
9714
9715 else $as_nop
9716   ac_cv_type_long_long_int=no
9717 fi
9718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9719   conftest.$ac_objext conftest.beam conftest.$ac_ext
9720 fi
9721
9722         fi
9723       fi
9724 fi
9725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9726 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
9727   if test $ac_cv_type_long_long_int = yes; then
9728
9729 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9730
9731   fi
9732
9733
9734   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9735 printf %s "checking for unsigned long long int... " >&6; }
9736 if test ${ac_cv_type_unsigned_long_long_int+y}
9737 then :
9738   printf %s "(cached) " >&6
9739 else $as_nop
9740   ac_cv_type_unsigned_long_long_int=yes
9741      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9742        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h.  */
9744
9745   /* For now, do not test the preprocessor; as of 2007 there are too many
9746          implementations with broken preprocessors.  Perhaps this can
9747          be revisited in 2012.  In the meantime, code should not expect
9748          #if to work with literals wider than 32 bits.  */
9749       /* Test literals.  */
9750       long long int ll = 9223372036854775807ll;
9751       long long int nll = -9223372036854775807LL;
9752       unsigned long long int ull = 18446744073709551615ULL;
9753       /* Test constant expressions.   */
9754       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9755                      ? 1 : -1)];
9756       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9757                      ? 1 : -1)];
9758       int i = 63;
9759 int
9760 main (void)
9761 {
9762 /* Test availability of runtime routines for shift and division.  */
9763       long long int llmax = 9223372036854775807ll;
9764       unsigned long long int ullmax = 18446744073709551615ull;
9765       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9766               | (llmax / ll) | (llmax % ll)
9767               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9768               | (ullmax / ull) | (ullmax % ull));
9769   ;
9770   return 0;
9771 }
9772
9773 _ACEOF
9774 if ac_fn_c_try_link "$LINENO"
9775 then :
9776
9777 else $as_nop
9778   ac_cv_type_unsigned_long_long_int=no
9779 fi
9780 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9781     conftest$ac_exeext conftest.$ac_ext
9782      fi
9783 fi
9784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9785 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
9786   if test $ac_cv_type_unsigned_long_long_int = yes; then
9787
9788 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9789
9790   fi
9791
9792 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
9793 then
9794   ac_cv_type_long_long_int=no
9795
9796 printf "%s\n" "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
9797
9798 fi
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808                         # Check whether --enable-cross-guesses was given.
9809 if test ${enable_cross_guesses+y}
9810 then :
9811   enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
9812        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
9813 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
9814        enableval=conservative
9815      fi
9816      gl_cross_guesses="$enableval"
9817 else $as_nop
9818   gl_cross_guesses=conservative
9819 fi
9820
9821   if test $gl_cross_guesses = risky; then
9822     gl_cross_guess_normal="guessing yes"
9823     gl_cross_guess_inverted="guessing no"
9824   else
9825     gl_cross_guess_normal="guessing no"
9826     gl_cross_guess_inverted="guessing yes"
9827   fi
9828           LIBC_FATAL_STDERR_=1
9829   export LIBC_FATAL_STDERR_
9830
9831
9832
9833     HAVE_CHOWN=1;
9834   HAVE_COPY_FILE_RANGE=1;
9835   HAVE_DUP3=1;
9836   HAVE_EUIDACCESS=1;
9837   HAVE_EXECVPE=1;
9838   HAVE_FACCESSAT=1;
9839   HAVE_FCHDIR=1;
9840   HAVE_FCHOWNAT=1;
9841   HAVE_FDATASYNC=1;
9842   HAVE_FSYNC=1;
9843   HAVE_FTRUNCATE=1;
9844   HAVE_GETDTABLESIZE=1;
9845   HAVE_GETENTROPY=1;
9846   HAVE_GETGROUPS=1;
9847   HAVE_GETHOSTNAME=1;
9848   HAVE_GETLOGIN=1;
9849   HAVE_GETPAGESIZE=1;
9850   HAVE_GETPASS=1;
9851   HAVE_GROUP_MEMBER=1;
9852   HAVE_LCHOWN=1;
9853   HAVE_LINK=1;
9854   HAVE_LINKAT=1;
9855   HAVE_PIPE=1;
9856   HAVE_PIPE2=1;
9857   HAVE_PREAD=1;
9858   HAVE_PWRITE=1;
9859   HAVE_READLINK=1;
9860   HAVE_READLINKAT=1;
9861   HAVE_SETHOSTNAME=1;
9862   HAVE_SLEEP=1;
9863   HAVE_SYMLINK=1;
9864   HAVE_SYMLINKAT=1;
9865   HAVE_UNLINKAT=1;
9866   HAVE_USLEEP=1;
9867   HAVE_DECL_ENVIRON=1;
9868   HAVE_DECL_EXECVPE=1;
9869   HAVE_DECL_FCHDIR=1;
9870   HAVE_DECL_FDATASYNC=1;
9871   HAVE_DECL_GETDOMAINNAME=1;
9872   HAVE_DECL_GETLOGIN=1;
9873   HAVE_DECL_GETLOGIN_R=1;
9874   HAVE_DECL_GETPAGESIZE=1;
9875   HAVE_DECL_GETUSERSHELL=1;
9876   HAVE_DECL_SETHOSTNAME=1;
9877   HAVE_DECL_TRUNCATE=1;
9878   HAVE_DECL_TTYNAME_R=1;
9879   HAVE_OS_H=0;
9880   HAVE_SYS_PARAM_H=0;
9881   REPLACE_ACCESS=0;
9882   REPLACE_CHOWN=0;
9883   REPLACE_CLOSE=0;
9884   REPLACE_DUP=0;
9885   REPLACE_DUP2=0;
9886   REPLACE_EXECL=0;
9887   REPLACE_EXECLE=0;
9888   REPLACE_EXECLP=0;
9889   REPLACE_EXECV=0;
9890   REPLACE_EXECVE=0;
9891   REPLACE_EXECVP=0;
9892   REPLACE_EXECVPE=0;
9893   REPLACE_FACCESSAT=0;
9894   REPLACE_FCHOWNAT=0;
9895   REPLACE_FTRUNCATE=0;
9896   REPLACE_GETCWD=0;
9897   REPLACE_GETDOMAINNAME=0;
9898   REPLACE_GETDTABLESIZE=0;
9899   REPLACE_GETLOGIN_R=0;
9900   REPLACE_GETGROUPS=0;
9901   REPLACE_GETPAGESIZE=0;
9902   REPLACE_GETPASS=0;
9903   REPLACE_ISATTY=0;
9904   REPLACE_LCHOWN=0;
9905   REPLACE_LINK=0;
9906   REPLACE_LINKAT=0;
9907   REPLACE_LSEEK=0;
9908   REPLACE_PREAD=0;
9909   REPLACE_PWRITE=0;
9910   REPLACE_READ=0;
9911   REPLACE_READLINK=0;
9912   REPLACE_READLINKAT=0;
9913   REPLACE_RMDIR=0;
9914   REPLACE_SLEEP=0;
9915   REPLACE_SYMLINK=0;
9916   REPLACE_SYMLINKAT=0;
9917   REPLACE_TRUNCATE=0;
9918   REPLACE_TTYNAME_R=0;
9919   REPLACE_UNLINK=0;
9920   REPLACE_UNLINKAT=0;
9921   REPLACE_USLEEP=0;
9922   REPLACE_WRITE=0;
9923   UNISTD_H_HAVE_SYS_RANDOM_H=0;
9924   UNISTD_H_HAVE_WINSOCK2_H=0;
9925   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9926
9927
9928
9929
9930   GL_M4_GNULIB_ACCESS=0
9931
9932
9933
9934   GL_M4_GNULIB_CHDIR=0
9935
9936
9937
9938   GL_M4_GNULIB_CHOWN=0
9939
9940
9941
9942   GL_M4_GNULIB_CLOSE=0
9943
9944
9945
9946   GL_M4_GNULIB_COPY_FILE_RANGE=0
9947
9948
9949
9950   GL_M4_GNULIB_DUP=0
9951
9952
9953
9954   GL_M4_GNULIB_DUP2=0
9955
9956
9957
9958   GL_M4_GNULIB_DUP3=0
9959
9960
9961
9962   GL_M4_GNULIB_ENVIRON=0
9963
9964
9965
9966   GL_M4_GNULIB_EUIDACCESS=0
9967
9968
9969
9970   GL_M4_GNULIB_EXECL=0
9971
9972
9973
9974   GL_M4_GNULIB_EXECLE=0
9975
9976
9977
9978   GL_M4_GNULIB_EXECLP=0
9979
9980
9981
9982   GL_M4_GNULIB_EXECV=0
9983
9984
9985
9986   GL_M4_GNULIB_EXECVE=0
9987
9988
9989
9990   GL_M4_GNULIB_EXECVP=0
9991
9992
9993
9994   GL_M4_GNULIB_EXECVPE=0
9995
9996
9997
9998   GL_M4_GNULIB_FACCESSAT=0
9999
10000
10001
10002   GL_M4_GNULIB_FCHDIR=0
10003
10004
10005
10006   GL_M4_GNULIB_FCHOWNAT=0
10007
10008
10009
10010   GL_M4_GNULIB_FDATASYNC=0
10011
10012
10013
10014   GL_M4_GNULIB_FSYNC=0
10015
10016
10017
10018   GL_M4_GNULIB_FTRUNCATE=0
10019
10020
10021
10022   GL_M4_GNULIB_GETCWD=0
10023
10024
10025
10026   GL_M4_GNULIB_GETDOMAINNAME=0
10027
10028
10029
10030   GL_M4_GNULIB_GETDTABLESIZE=0
10031
10032
10033
10034   GL_M4_GNULIB_GETENTROPY=0
10035
10036
10037
10038   GL_M4_GNULIB_GETGROUPS=0
10039
10040
10041
10042   GL_M4_GNULIB_GETHOSTNAME=0
10043
10044
10045
10046   GL_M4_GNULIB_GETLOGIN=0
10047
10048
10049
10050   GL_M4_GNULIB_GETLOGIN_R=0
10051
10052
10053
10054   GL_M4_GNULIB_GETOPT_POSIX=0
10055
10056
10057
10058   GL_M4_GNULIB_GETPAGESIZE=0
10059
10060
10061
10062   GL_M4_GNULIB_GETPASS=0
10063
10064
10065
10066   GL_M4_GNULIB_GETUSERSHELL=0
10067
10068
10069
10070   GL_M4_GNULIB_GROUP_MEMBER=0
10071
10072
10073
10074   GL_M4_GNULIB_ISATTY=0
10075
10076
10077
10078   GL_M4_GNULIB_LCHOWN=0
10079
10080
10081
10082   GL_M4_GNULIB_LINK=0
10083
10084
10085
10086   GL_M4_GNULIB_LINKAT=0
10087
10088
10089
10090   GL_M4_GNULIB_LSEEK=0
10091
10092
10093
10094   GL_M4_GNULIB_PIPE=0
10095
10096
10097
10098   GL_M4_GNULIB_PIPE2=0
10099
10100
10101
10102   GL_M4_GNULIB_PREAD=0
10103
10104
10105
10106   GL_M4_GNULIB_PWRITE=0
10107
10108
10109
10110   GL_M4_GNULIB_READ=0
10111
10112
10113
10114   GL_M4_GNULIB_READLINK=0
10115
10116
10117
10118   GL_M4_GNULIB_READLINKAT=0
10119
10120
10121
10122   GL_M4_GNULIB_RMDIR=0
10123
10124
10125
10126   GL_M4_GNULIB_SETHOSTNAME=0
10127
10128
10129
10130   GL_M4_GNULIB_SLEEP=0
10131
10132
10133
10134   GL_M4_GNULIB_SYMLINK=0
10135
10136
10137
10138   GL_M4_GNULIB_SYMLINKAT=0
10139
10140
10141
10142   GL_M4_GNULIB_TRUNCATE=0
10143
10144
10145
10146   GL_M4_GNULIB_TTYNAME_R=0
10147
10148
10149
10150   GL_M4_GNULIB_UNISTD_H_NONBLOCKING=0
10151
10152
10153
10154   GL_M4_GNULIB_UNISTD_H_SIGPIPE=0
10155
10156
10157
10158   GL_M4_GNULIB_UNLINK=0
10159
10160
10161
10162   GL_M4_GNULIB_UNLINKAT=0
10163
10164
10165
10166   GL_M4_GNULIB_USLEEP=0
10167
10168
10169
10170   GL_M4_GNULIB_WRITE=0
10171
10172
10173
10174   GL_M4_GNULIB_MDA_ACCESS=1
10175
10176
10177
10178   GL_M4_GNULIB_MDA_CHDIR=1
10179
10180
10181
10182   GL_M4_GNULIB_MDA_CLOSE=1
10183
10184
10185
10186   GL_M4_GNULIB_MDA_DUP=1
10187
10188
10189
10190   GL_M4_GNULIB_MDA_DUP2=1
10191
10192
10193
10194   GL_M4_GNULIB_MDA_EXECL=1
10195
10196
10197
10198   GL_M4_GNULIB_MDA_EXECLE=1
10199
10200
10201
10202   GL_M4_GNULIB_MDA_EXECLP=1
10203
10204
10205
10206   GL_M4_GNULIB_MDA_EXECV=1
10207
10208
10209
10210   GL_M4_GNULIB_MDA_EXECVE=1
10211
10212
10213
10214   GL_M4_GNULIB_MDA_EXECVP=1
10215
10216
10217
10218   GL_M4_GNULIB_MDA_EXECVPE=1
10219
10220
10221
10222   GL_M4_GNULIB_MDA_GETCWD=1
10223
10224
10225
10226   GL_M4_GNULIB_MDA_GETPID=1
10227
10228
10229
10230   GL_M4_GNULIB_MDA_ISATTY=1
10231
10232
10233
10234   GL_M4_GNULIB_MDA_LSEEK=1
10235
10236
10237
10238   GL_M4_GNULIB_MDA_READ=1
10239
10240
10241
10242   GL_M4_GNULIB_MDA_RMDIR=1
10243
10244
10245
10246   GL_M4_GNULIB_MDA_SWAB=1
10247
10248
10249
10250   GL_M4_GNULIB_MDA_UNLINK=1
10251
10252
10253
10254   GL_M4_GNULIB_MDA_WRITE=1
10255
10256
10257
10258 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
10259 if test "x$ac_cv_type_size_t" = xyes
10260 then :
10261
10262 else $as_nop
10263
10264 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
10265
10266 fi
10267
10268 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10269 # for constant arguments.  Useless!
10270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10271 printf %s "checking for working alloca.h... " >&6; }
10272 if test ${ac_cv_working_alloca_h+y}
10273 then :
10274   printf %s "(cached) " >&6
10275 else $as_nop
10276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277 /* end confdefs.h.  */
10278 #include <alloca.h>
10279 int
10280 main (void)
10281 {
10282 char *p = (char *) alloca (2 * sizeof (int));
10283                           if (p) return 0;
10284   ;
10285   return 0;
10286 }
10287 _ACEOF
10288 if ac_fn_c_try_link "$LINENO"
10289 then :
10290   ac_cv_working_alloca_h=yes
10291 else $as_nop
10292   ac_cv_working_alloca_h=no
10293 fi
10294 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10295     conftest$ac_exeext conftest.$ac_ext
10296 fi
10297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10298 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
10299 if test $ac_cv_working_alloca_h = yes; then
10300
10301 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
10302
10303 fi
10304
10305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10306 printf %s "checking for alloca... " >&6; }
10307 if test ${ac_cv_func_alloca_works+y}
10308 then :
10309   printf %s "(cached) " >&6
10310 else $as_nop
10311   if test $ac_cv_working_alloca_h = yes; then
10312   ac_cv_func_alloca_works=yes
10313 else
10314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10315 /* end confdefs.h.  */
10316 #include <stdlib.h>
10317 #include <stddef.h>
10318 #ifndef alloca
10319 # ifdef __GNUC__
10320 #  define alloca __builtin_alloca
10321 # elif defined _MSC_VER
10322 #  include <malloc.h>
10323 #  define alloca _alloca
10324 # else
10325 #  ifdef  __cplusplus
10326 extern "C"
10327 #  endif
10328 void *alloca (size_t);
10329 # endif
10330 #endif
10331
10332 int
10333 main (void)
10334 {
10335 char *p = (char *) alloca (1);
10336                                     if (p) return 0;
10337   ;
10338   return 0;
10339 }
10340 _ACEOF
10341 if ac_fn_c_try_link "$LINENO"
10342 then :
10343   ac_cv_func_alloca_works=yes
10344 else $as_nop
10345   ac_cv_func_alloca_works=no
10346 fi
10347 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10348     conftest$ac_exeext conftest.$ac_ext
10349 fi
10350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10351 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
10352 fi
10353
10354 if test $ac_cv_func_alloca_works = yes; then
10355
10356 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
10357
10358 else
10359   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10360 # that cause trouble.  Some versions do not even contain alloca or
10361 # contain a buggy version.  If you still want to use their alloca,
10362 # use ar to extract alloca.o from them instead of compiling alloca.c.
10363
10364
10365
10366
10367
10368 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10369
10370 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
10371
10372
10373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10374 printf %s "checking stack direction for C alloca... " >&6; }
10375 if test ${ac_cv_c_stack_direction+y}
10376 then :
10377   printf %s "(cached) " >&6
10378 else $as_nop
10379   if test "$cross_compiling" = yes
10380 then :
10381   ac_cv_c_stack_direction=0
10382 else $as_nop
10383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384 /* end confdefs.h.  */
10385 $ac_includes_default
10386 int
10387 find_stack_direction (int *addr, int depth)
10388 {
10389   int dir, dummy = 0;
10390   if (! addr)
10391     addr = &dummy;
10392   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
10393   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
10394   return dir + dummy;
10395 }
10396
10397 int
10398 main (int argc, char **argv)
10399 {
10400   return find_stack_direction (0, argc + !argv + 20) < 0;
10401 }
10402 _ACEOF
10403 if ac_fn_c_try_run "$LINENO"
10404 then :
10405   ac_cv_c_stack_direction=1
10406 else $as_nop
10407   ac_cv_c_stack_direction=-1
10408 fi
10409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10410   conftest.$ac_objext conftest.beam conftest.$ac_ext
10411 fi
10412
10413 fi
10414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10415 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
10416 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
10417
10418
10419 fi
10420
10421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10422 printf %s "checking for inline... " >&6; }
10423 if test ${ac_cv_c_inline+y}
10424 then :
10425   printf %s "(cached) " >&6
10426 else $as_nop
10427   ac_cv_c_inline=no
10428 for ac_kw in inline __inline__ __inline; do
10429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430 /* end confdefs.h.  */
10431 #ifndef __cplusplus
10432 typedef int foo_t;
10433 static $ac_kw foo_t static_foo (void) {return 0; }
10434 $ac_kw foo_t foo (void) {return 0; }
10435 #endif
10436
10437 _ACEOF
10438 if ac_fn_c_try_compile "$LINENO"
10439 then :
10440   ac_cv_c_inline=$ac_kw
10441 fi
10442 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10443   test "$ac_cv_c_inline" != no && break
10444 done
10445
10446 fi
10447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10448 printf "%s\n" "$ac_cv_c_inline" >&6; }
10449
10450 case $ac_cv_c_inline in
10451   inline | yes) ;;
10452   *)
10453     case $ac_cv_c_inline in
10454       no) ac_val=;;
10455       *) ac_val=$ac_cv_c_inline;;
10456     esac
10457     cat >>confdefs.h <<_ACEOF
10458 #ifndef __cplusplus
10459 #define inline $ac_val
10460 #endif
10461 _ACEOF
10462     ;;
10463 esac
10464
10465
10466
10467     HAVE_BTOWC=1;
10468   HAVE_MBSINIT=1;
10469   HAVE_MBRTOWC=1;
10470   HAVE_MBRLEN=1;
10471   HAVE_MBSRTOWCS=1;
10472   HAVE_MBSNRTOWCS=1;
10473   HAVE_WCRTOMB=1;
10474   HAVE_WCSRTOMBS=1;
10475   HAVE_WCSNRTOMBS=1;
10476   HAVE_WMEMCHR=1;
10477   HAVE_WMEMCMP=1;
10478   HAVE_WMEMCPY=1;
10479   HAVE_WMEMMOVE=1;
10480   HAVE_WMEMPCPY=1;
10481   HAVE_WMEMSET=1;
10482   HAVE_WCSLEN=1;
10483   HAVE_WCSNLEN=1;
10484   HAVE_WCSCPY=1;
10485   HAVE_WCPCPY=1;
10486   HAVE_WCSNCPY=1;
10487   HAVE_WCPNCPY=1;
10488   HAVE_WCSCAT=1;
10489   HAVE_WCSNCAT=1;
10490   HAVE_WCSCMP=1;
10491   HAVE_WCSNCMP=1;
10492   HAVE_WCSCASECMP=1;
10493   HAVE_WCSNCASECMP=1;
10494   HAVE_WCSCOLL=1;
10495   HAVE_WCSXFRM=1;
10496   HAVE_WCSDUP=1;
10497   HAVE_WCSCHR=1;
10498   HAVE_WCSRCHR=1;
10499   HAVE_WCSCSPN=1;
10500   HAVE_WCSSPN=1;
10501   HAVE_WCSPBRK=1;
10502   HAVE_WCSSTR=1;
10503   HAVE_WCSTOK=1;
10504   HAVE_WCSWIDTH=1;
10505   HAVE_WCSFTIME=1;
10506   HAVE_DECL_WCTOB=1;
10507   HAVE_DECL_WCSDUP=1;
10508   HAVE_DECL_WCWIDTH=1;
10509   REPLACE_MBSTATE_T=0;
10510   REPLACE_BTOWC=0;
10511   REPLACE_WCTOB=0;
10512   REPLACE_MBSINIT=0;
10513   REPLACE_MBRTOWC=0;
10514   REPLACE_MBRLEN=0;
10515   REPLACE_MBSRTOWCS=0;
10516   REPLACE_MBSNRTOWCS=0;
10517   REPLACE_WCRTOMB=0;
10518   REPLACE_WCSRTOMBS=0;
10519   REPLACE_WCSNRTOMBS=0;
10520   REPLACE_WCWIDTH=0;
10521   REPLACE_WCSWIDTH=0;
10522   REPLACE_WCSFTIME=0;
10523   REPLACE_WCSTOK=0;
10524
10525
10526
10527   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
10528 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
10529 if test ${gl_cv_header_wchar_h_correct_inline+y}
10530 then :
10531   printf %s "(cached) " >&6
10532 else $as_nop
10533   gl_cv_header_wchar_h_correct_inline=yes
10534      case "$host_os" in
10535        *-gnu* | gnu*)
10536          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537 /* end confdefs.h.  */
10538
10539
10540              #define wcstod renamed_wcstod
10541              #include <wchar.h>
10542              extern int zero (void);
10543              int main () { return zero(); }
10544
10545 _ACEOF
10546                                                       save_ac_compile="$ac_compile"
10547          ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
10548          if echo '#include "conftest.c"' >conftest1.c \
10549             && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10550   (eval $ac_compile) 2>&5
10551   ac_status=$?
10552   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10553   test $ac_status = 0; }; then
10554            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555 /* end confdefs.h.  */
10556
10557
10558                #define wcstod renamed_wcstod
10559                #include <wchar.h>
10560                int zero (void) { return 0; }
10561
10562 _ACEOF
10563                       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
10564            if echo '#include "conftest.c"' >conftest2.c \
10565               && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10566   (eval $ac_compile) 2>&5
10567   ac_status=$?
10568   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10569   test $ac_status = 0; }; then
10570              if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
10571                :
10572              else
10573                gl_cv_header_wchar_h_correct_inline=no
10574              fi
10575            fi
10576          fi
10577          ac_compile="$save_ac_compile"
10578          rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
10579          ;;
10580      esac
10581
10582 fi
10583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
10584 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
10585   if test $gl_cv_header_wchar_h_correct_inline = no; then
10586     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
10587 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
10588 C99 mode. You have four options:
10589   - Add the flag -fgnu89-inline to CC and reconfigure, or
10590   - Fix your include files, using parts of
10591     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
10592   - Use a gcc version older than 4.3, or
10593   - Don't use the flags -std=c99 or -std=gnu99.
10594 Configuration aborted." "$LINENO" 5
10595   fi
10596
10597 ac_func=
10598 for ac_item in $ac_func_c_list
10599 do
10600   if test $ac_func; then
10601     ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
10602     if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
10603       echo "#define $ac_item 1" >> confdefs.h
10604     fi
10605     ac_func=
10606   else
10607     ac_func=$ac_item
10608   fi
10609 done
10610
10611   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10612 printf %s "checking for nl_langinfo and CODESET... " >&6; }
10613 if test ${am_cv_langinfo_codeset+y}
10614 then :
10615   printf %s "(cached) " >&6
10616 else $as_nop
10617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10618 /* end confdefs.h.  */
10619 #include <langinfo.h>
10620 int
10621 main (void)
10622 {
10623 char* cs = nl_langinfo(CODESET); return !cs;
10624   ;
10625   return 0;
10626 }
10627 _ACEOF
10628 if ac_fn_c_try_link "$LINENO"
10629 then :
10630   am_cv_langinfo_codeset=yes
10631 else $as_nop
10632   am_cv_langinfo_codeset=no
10633 fi
10634 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10635     conftest$ac_exeext conftest.$ac_ext
10636
10637 fi
10638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10639 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
10640   if test $am_cv_langinfo_codeset = yes; then
10641
10642 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10643
10644   fi
10645
10646
10647
10648
10649   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10650 printf %s "checking for a traditional french locale... " >&6; }
10651 if test ${gt_cv_locale_fr+y}
10652 then :
10653   printf %s "(cached) " >&6
10654 else $as_nop
10655
10656     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657 /* end confdefs.h.  */
10658
10659 #include <locale.h>
10660 #include <time.h>
10661 #if HAVE_LANGINFO_CODESET
10662 # include <langinfo.h>
10663 #endif
10664 #include <stdlib.h>
10665 #include <string.h>
10666 struct tm t;
10667 char buf[16];
10668 int main () {
10669   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
10670      imitates locale dependent behaviour by looking at the environment
10671      variables, and all locales use the UTF-8 encoding.  */
10672 #if defined __BEOS__ || defined __HAIKU__
10673   return 1;
10674 #else
10675   /* Check whether the given locale name is recognized by the system.  */
10676 # if defined _WIN32 && !defined __CYGWIN__
10677   /* On native Windows, setlocale(category, "") looks at the system settings,
10678      not at the environment variables.  Also, when an encoding suffix such
10679      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10680      category of the locale to "C".  */
10681   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10682       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10683     return 1;
10684 # else
10685   if (setlocale (LC_ALL, "") == NULL) return 1;
10686 # endif
10687   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10688      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10689      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10690      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10691      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10692      some unit tests fail.
10693      On MirBSD 10, when an unsupported locale is specified, setlocale()
10694      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
10695 # if HAVE_LANGINFO_CODESET
10696   {
10697     const char *cs = nl_langinfo (CODESET);
10698     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10699         || strcmp (cs, "UTF-8") == 0)
10700       return 1;
10701   }
10702 # endif
10703 # ifdef __CYGWIN__
10704   /* On Cygwin, avoid locale names without encoding suffix, because the
10705      locale_charset() function relies on the encoding suffix.  Note that
10706      LC_ALL is set on the command line.  */
10707   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10708 # endif
10709   /* Check whether in the abbreviation of the second month, the second
10710      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10711      one byte long. This excludes the UTF-8 encoding.  */
10712   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10713   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10714 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
10715   /* Check whether the decimal separator is a comma.
10716      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10717      are nl_langinfo(RADIXCHAR) are both ".".  */
10718   if (localeconv () ->decimal_point[0] != ',') return 1;
10719 # endif
10720   return 0;
10721 #endif
10722 }
10723
10724 _ACEOF
10725     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10726   (eval $ac_link) 2>&5
10727   ac_status=$?
10728   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10729   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10730       case "$host_os" in
10731         # Handle native Windows specially, because there setlocale() interprets
10732         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10733         # "fr" or "fra" as "French" or "French_France.1252",
10734         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10735         # "ja" as "Japanese" or "Japanese_Japan.932",
10736         # and similar.
10737         mingw*)
10738           # Test for the native Windows locale name.
10739           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10740             gt_cv_locale_fr=French_France.1252
10741           else
10742             # None found.
10743             gt_cv_locale_fr=none
10744           fi
10745           ;;
10746         *)
10747           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10748           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10749           # configure script would override the LC_ALL setting. Likewise for
10750           # LC_CTYPE, which is also set at the beginning of the configure script.
10751           # Test for the usual locale name.
10752           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10753             gt_cv_locale_fr=fr_FR
10754           else
10755             # Test for the locale name with explicit encoding suffix.
10756             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10757               gt_cv_locale_fr=fr_FR.ISO-8859-1
10758             else
10759               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10760               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10761                 gt_cv_locale_fr=fr_FR.ISO8859-1
10762               else
10763                 # Test for the HP-UX locale name.
10764                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10765                   gt_cv_locale_fr=fr_FR.iso88591
10766                 else
10767                   # Test for the Solaris 7 locale name.
10768                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10769                     gt_cv_locale_fr=fr
10770                   else
10771                     # None found.
10772                     gt_cv_locale_fr=none
10773                   fi
10774                 fi
10775               fi
10776             fi
10777           fi
10778           ;;
10779       esac
10780     fi
10781     rm -fr conftest*
10782
10783 fi
10784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10785 printf "%s\n" "$gt_cv_locale_fr" >&6; }
10786   LOCALE_FR=$gt_cv_locale_fr
10787
10788
10789
10790
10791   GL_M4_GNULIB_BTOWC=0
10792
10793
10794
10795   GL_M4_GNULIB_WCTOB=0
10796
10797
10798
10799   GL_M4_GNULIB_MBSINIT=0
10800
10801
10802
10803   GL_M4_GNULIB_MBRTOWC=0
10804
10805
10806
10807   GL_M4_GNULIB_MBRLEN=0
10808
10809
10810
10811   GL_M4_GNULIB_MBSRTOWCS=0
10812
10813
10814
10815   GL_M4_GNULIB_MBSNRTOWCS=0
10816
10817
10818
10819   GL_M4_GNULIB_WCRTOMB=0
10820
10821
10822
10823   GL_M4_GNULIB_WCSRTOMBS=0
10824
10825
10826
10827   GL_M4_GNULIB_WCSNRTOMBS=0
10828
10829
10830
10831   GL_M4_GNULIB_WCWIDTH=0
10832
10833
10834
10835   GL_M4_GNULIB_WMEMCHR=0
10836
10837
10838
10839   GL_M4_GNULIB_WMEMCMP=0
10840
10841
10842
10843   GL_M4_GNULIB_WMEMCPY=0
10844
10845
10846
10847   GL_M4_GNULIB_WMEMMOVE=0
10848
10849
10850
10851   GL_M4_GNULIB_WMEMPCPY=0
10852
10853
10854
10855   GL_M4_GNULIB_WMEMSET=0
10856
10857
10858
10859   GL_M4_GNULIB_WCSLEN=0
10860
10861
10862
10863   GL_M4_GNULIB_WCSNLEN=0
10864
10865
10866
10867   GL_M4_GNULIB_WCSCPY=0
10868
10869
10870
10871   GL_M4_GNULIB_WCPCPY=0
10872
10873
10874
10875   GL_M4_GNULIB_WCSNCPY=0
10876
10877
10878
10879   GL_M4_GNULIB_WCPNCPY=0
10880
10881
10882
10883   GL_M4_GNULIB_WCSCAT=0
10884
10885
10886
10887   GL_M4_GNULIB_WCSNCAT=0
10888
10889
10890
10891   GL_M4_GNULIB_WCSCMP=0
10892
10893
10894
10895   GL_M4_GNULIB_WCSNCMP=0
10896
10897
10898
10899   GL_M4_GNULIB_WCSCASECMP=0
10900
10901
10902
10903   GL_M4_GNULIB_WCSNCASECMP=0
10904
10905
10906
10907   GL_M4_GNULIB_WCSCOLL=0
10908
10909
10910
10911   GL_M4_GNULIB_WCSXFRM=0
10912
10913
10914
10915   GL_M4_GNULIB_WCSDUP=0
10916
10917
10918
10919   GL_M4_GNULIB_WCSCHR=0
10920
10921
10922
10923   GL_M4_GNULIB_WCSRCHR=0
10924
10925
10926
10927   GL_M4_GNULIB_WCSCSPN=0
10928
10929
10930
10931   GL_M4_GNULIB_WCSSPN=0
10932
10933
10934
10935   GL_M4_GNULIB_WCSPBRK=0
10936
10937
10938
10939   GL_M4_GNULIB_WCSSTR=0
10940
10941
10942
10943   GL_M4_GNULIB_WCSTOK=0
10944
10945
10946
10947   GL_M4_GNULIB_WCSWIDTH=0
10948
10949
10950
10951   GL_M4_GNULIB_WCSFTIME=0
10952
10953
10954
10955   GL_M4_GNULIB_MDA_WCSDUP=1
10956
10957
10958
10959
10960     HAVE__EXIT=1;
10961   HAVE_ALIGNED_ALLOC=1;
10962   HAVE_ATOLL=1;
10963   HAVE_CANONICALIZE_FILE_NAME=1;
10964   HAVE_DECL_ECVT=1;
10965   HAVE_DECL_FCVT=1;
10966   HAVE_DECL_GCVT=1;
10967   HAVE_DECL_GETLOADAVG=1;
10968   HAVE_GETSUBOPT=1;
10969   HAVE_GRANTPT=1;
10970   HAVE_INITSTATE=1;
10971   HAVE_DECL_INITSTATE=1;
10972   HAVE_MBTOWC=1;
10973   HAVE_MKDTEMP=1;
10974   HAVE_MKOSTEMP=1;
10975   HAVE_MKOSTEMPS=1;
10976   HAVE_MKSTEMP=1;
10977   HAVE_MKSTEMPS=1;
10978   HAVE_POSIX_MEMALIGN=1;
10979   HAVE_POSIX_OPENPT=1;
10980   HAVE_PTSNAME=1;
10981   HAVE_PTSNAME_R=1;
10982   HAVE_QSORT_R=1;
10983   HAVE_RANDOM=1;
10984   HAVE_RANDOM_H=1;
10985   HAVE_RANDOM_R=1;
10986   HAVE_REALLOCARRAY=1;
10987   HAVE_REALPATH=1;
10988   HAVE_RPMATCH=1;
10989   HAVE_SECURE_GETENV=1;
10990   HAVE_SETENV=1;
10991   HAVE_DECL_SETENV=1;
10992   HAVE_SETSTATE=1;
10993   HAVE_DECL_SETSTATE=1;
10994   HAVE_STRTOD=1;
10995   HAVE_STRTOL=1;
10996   HAVE_STRTOLD=1;
10997   HAVE_STRTOLL=1;
10998   HAVE_STRTOUL=1;
10999   HAVE_STRTOULL=1;
11000   HAVE_STRUCT_RANDOM_DATA=1;
11001   HAVE_SYS_LOADAVG_H=0;
11002   HAVE_UNLOCKPT=1;
11003   HAVE_DECL_UNSETENV=1;
11004   REPLACE_ALIGNED_ALLOC=0;
11005   REPLACE_CALLOC=0;
11006   REPLACE_CANONICALIZE_FILE_NAME=0;
11007   REPLACE_FREE=0;
11008   REPLACE_INITSTATE=0;
11009   REPLACE_MALLOC=0;
11010   REPLACE_MBTOWC=0;
11011   REPLACE_MKSTEMP=0;
11012   REPLACE_POSIX_MEMALIGN=0;
11013   REPLACE_PTSNAME=0;
11014   REPLACE_PTSNAME_R=0;
11015   REPLACE_PUTENV=0;
11016   REPLACE_QSORT_R=0;
11017   REPLACE_RANDOM=0;
11018   REPLACE_RANDOM_R=0;
11019   REPLACE_REALLOC=0;
11020   REPLACE_REALLOCARRAY=0;
11021   REPLACE_REALPATH=0;
11022   REPLACE_SETENV=0;
11023   REPLACE_SETSTATE=0;
11024   REPLACE_STRTOD=0;
11025   REPLACE_STRTOL=0;
11026   REPLACE_STRTOLD=0;
11027   REPLACE_STRTOLL=0;
11028   REPLACE_STRTOUL=0;
11029   REPLACE_STRTOULL=0;
11030   REPLACE_UNSETENV=0;
11031   REPLACE_WCTOMB=0;
11032
11033
11034   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
11035 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
11036 if test ${gl_cv_malloc_ptrdiff+y}
11037 then :
11038   printf %s "(cached) " >&6
11039 else $as_nop
11040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041 /* end confdefs.h.  */
11042 #include <stdint.h>
11043
11044 int
11045 main (void)
11046 {
11047 /* 64-bit ptrdiff_t is so wide that no practical platform
11048                can exceed it.  */
11049             #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
11050
11051             /* On rare machines where size_t fits in ptrdiff_t there
11052                is no problem.  */
11053             #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
11054
11055             /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
11056                bounds even on 32-bit platforms.  We don't know which
11057                non-glibc systems are safe.  */
11058             #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
11059
11060             #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
11061               return 0;
11062             #else
11063               #error "malloc might not be ptrdiff_t safe"
11064               syntax error
11065             #endif
11066
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 if ac_fn_c_try_compile "$LINENO"
11072 then :
11073   gl_cv_malloc_ptrdiff=yes
11074 else $as_nop
11075   gl_cv_malloc_ptrdiff=no
11076 fi
11077 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11078
11079 fi
11080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
11081 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
11082
11083
11084
11085
11086   test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
11087
11088
11089
11090   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
11091 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
11092 if test ${gl_cv_func_malloc_posix+y}
11093 then :
11094   printf %s "(cached) " >&6
11095 else $as_nop
11096
11097                                     case "$host_os" in
11098         mingw*)
11099           gl_cv_func_malloc_posix=no ;;
11100         irix* | solaris*)
11101
11102           gl_cv_func_malloc_posix=no ;;
11103         *)
11104           gl_cv_func_malloc_posix=yes ;;
11105       esac
11106
11107 fi
11108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
11109 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
11110
11111
11112
11113
11114
11115   if test "$gl_cv_func_malloc_posix" = yes; then
11116
11117 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
11118
11119   else
11120     REPLACE_MALLOC=1
11121   fi
11122
11123
11124
11125
11126   if test $REPLACE_MALLOC = 1; then
11127     REPLACE_CALLOC=1
11128   fi
11129
11130
11131
11132   GL_M4_GNULIB__EXIT=0
11133
11134
11135
11136   GL_M4_GNULIB_ALIGNED_ALLOC=0
11137
11138
11139
11140   GL_M4_GNULIB_ATOLL=0
11141
11142
11143
11144   GL_M4_GNULIB_CALLOC_POSIX=0
11145
11146
11147
11148   GL_M4_GNULIB_CANONICALIZE_FILE_NAME=0
11149
11150
11151
11152   GL_M4_GNULIB_FREE_POSIX=0
11153
11154
11155
11156   GL_M4_GNULIB_GETLOADAVG=0
11157
11158
11159
11160   GL_M4_GNULIB_GETSUBOPT=0
11161
11162
11163
11164   GL_M4_GNULIB_GRANTPT=0
11165
11166
11167
11168   GL_M4_GNULIB_MALLOC_POSIX=0
11169
11170
11171
11172   GL_M4_GNULIB_MBTOWC=0
11173
11174
11175
11176   GL_M4_GNULIB_MKDTEMP=0
11177
11178
11179
11180   GL_M4_GNULIB_MKOSTEMP=0
11181
11182
11183
11184   GL_M4_GNULIB_MKOSTEMPS=0
11185
11186
11187
11188   GL_M4_GNULIB_MKSTEMP=0
11189
11190
11191
11192   GL_M4_GNULIB_MKSTEMPS=0
11193
11194
11195
11196   GL_M4_GNULIB_POSIX_MEMALIGN=0
11197
11198
11199
11200   GL_M4_GNULIB_POSIX_OPENPT=0
11201
11202
11203
11204   GL_M4_GNULIB_PTSNAME=0
11205
11206
11207
11208   GL_M4_GNULIB_PTSNAME_R=0
11209
11210
11211
11212   GL_M4_GNULIB_PUTENV=0
11213
11214
11215
11216   GL_M4_GNULIB_QSORT_R=0
11217
11218
11219
11220   GL_M4_GNULIB_RANDOM=0
11221
11222
11223
11224   GL_M4_GNULIB_RANDOM_R=0
11225
11226
11227
11228   GL_M4_GNULIB_REALLOCARRAY=0
11229
11230
11231
11232   GL_M4_GNULIB_REALLOC_POSIX=0
11233
11234
11235
11236   GL_M4_GNULIB_REALPATH=0
11237
11238
11239
11240   GL_M4_GNULIB_RPMATCH=0
11241
11242
11243
11244   GL_M4_GNULIB_SECURE_GETENV=0
11245
11246
11247
11248   GL_M4_GNULIB_SETENV=0
11249
11250
11251
11252   GL_M4_GNULIB_STRTOD=0
11253
11254
11255
11256   GL_M4_GNULIB_STRTOL=0
11257
11258
11259
11260   GL_M4_GNULIB_STRTOLD=0
11261
11262
11263
11264   GL_M4_GNULIB_STRTOLL=0
11265
11266
11267
11268   GL_M4_GNULIB_STRTOUL=0
11269
11270
11271
11272   GL_M4_GNULIB_STRTOULL=0
11273
11274
11275
11276   GL_M4_GNULIB_SYSTEM_POSIX=0
11277
11278
11279
11280   GL_M4_GNULIB_UNLOCKPT=0
11281
11282
11283
11284   GL_M4_GNULIB_UNSETENV=0
11285
11286
11287
11288   GL_M4_GNULIB_WCTOMB=0
11289
11290
11291
11292   GL_M4_GNULIB_MDA_ECVT=1
11293
11294
11295
11296   GL_M4_GNULIB_MDA_FCVT=1
11297
11298
11299
11300   GL_M4_GNULIB_MDA_GCVT=1
11301
11302
11303
11304   GL_M4_GNULIB_MDA_MKTEMP=1
11305
11306
11307
11308   GL_M4_GNULIB_MDA_PUTENV=1
11309
11310
11311
11312
11313          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11314 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
11315 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
11316 then :
11317   printf %s "(cached) " >&6
11318 else $as_nop
11319   rm -f conftest.sym conftest.file
11320      echo >conftest.file
11321      if test "$cross_compiling" = yes
11322 then :
11323   case "$host_os" in
11324           linux-* | linux)
11325             # Guess yes on Linux systems.
11326             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11327           *-gnu* | gnu*)
11328             # Guess yes on glibc systems.
11329             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11330           mingw*)
11331             # Guess no on native Windows.
11332             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11333           *)
11334             # If we don't know, obey --enable-cross-guesses.
11335             gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
11336         esac
11337
11338 else $as_nop
11339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340 /* end confdefs.h.  */
11341 $ac_includes_default
11342 int
11343 main (void)
11344 {
11345 struct stat sbuf;
11346             if (symlink ("conftest.file", "conftest.sym") != 0)
11347               return 1;
11348             /* Linux will dereference the symlink and fail, as required by
11349                POSIX.  That is better in the sense that it means we will not
11350                have to compile and use the lstat wrapper.  */
11351             return lstat ("conftest.sym/", &sbuf) == 0;
11352
11353   ;
11354   return 0;
11355 }
11356 _ACEOF
11357 if ac_fn_c_try_run "$LINENO"
11358 then :
11359   gl_cv_func_lstat_dereferences_slashed_symlink=yes
11360 else $as_nop
11361   gl_cv_func_lstat_dereferences_slashed_symlink=no
11362 fi
11363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11364   conftest.$ac_objext conftest.beam conftest.$ac_ext
11365 fi
11366
11367      rm -f conftest.sym conftest.file
11368
11369 fi
11370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11371 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11372   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11373     *yes)
11374
11375 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
11376
11377       ;;
11378   esac
11379
11380
11381
11382
11383
11384   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
11385 printf %s "checking whether // is distinct from /... " >&6; }
11386 if test ${gl_cv_double_slash_root+y}
11387 then :
11388   printf %s "(cached) " >&6
11389 else $as_nop
11390    if test x"$cross_compiling" = xyes ; then
11391         # When cross-compiling, there is no way to tell whether // is special
11392         # short of a list of hosts.  However, the only known hosts to date
11393         # that have a distinct // are Apollo DomainOS (too old to port to),
11394         # Cygwin, and z/OS.  If anyone knows of another system for which // has
11395         # special semantics and is distinct from /, please report it to
11396         # <bug-gnulib@gnu.org>.
11397         case $host in
11398           *-cygwin | i370-ibm-openedition)
11399             gl_cv_double_slash_root=yes ;;
11400           *)
11401             # Be optimistic and assume that / and // are the same when we
11402             # don't know.
11403             gl_cv_double_slash_root='unknown, assuming no' ;;
11404         esac
11405       else
11406         set x `ls -di / // 2>/dev/null`
11407         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
11408           gl_cv_double_slash_root=no
11409         else
11410           gl_cv_double_slash_root=yes
11411         fi
11412       fi
11413 fi
11414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
11415 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
11416   if test "$gl_cv_double_slash_root" = yes; then
11417
11418 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
11419
11420   fi
11421
11422
11423
11424
11425
11426      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
11427 printf %s "checking whether realpath works... " >&6; }
11428 if test ${gl_cv_func_realpath_works+y}
11429 then :
11430   printf %s "(cached) " >&6
11431 else $as_nop
11432
11433     rm -rf conftest.a conftest.d
11434     touch conftest.a
11435     # Assume that if we have lstat, we can also check symlinks.
11436     if test $ac_cv_func_lstat = yes; then
11437       ln -s conftest.a conftest.l
11438     fi
11439     mkdir conftest.d
11440     if test "$cross_compiling" = yes
11441 then :
11442   case "$host_os" in
11443                        # Guess yes on glibc systems.
11444         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
11445                        # Guess 'nearly' on musl systems.
11446         *-musl*)       gl_cv_func_realpath_works="guessing nearly" ;;
11447                        # Guess no on Cygwin.
11448         cygwin*)       gl_cv_func_realpath_works="guessing no" ;;
11449                        # Guess no on native Windows.
11450         mingw*)        gl_cv_func_realpath_works="guessing no" ;;
11451                        # If we don't know, obey --enable-cross-guesses.
11452         *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
11453       esac
11454
11455 else $as_nop
11456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457 /* end confdefs.h.  */
11458
11459
11460
11461 #include <stdlib.h>
11462 #if defined __MACH__ && defined __APPLE__
11463 /* Avoid a crash on Mac OS X.  */
11464 #include <mach/mach.h>
11465 #include <mach/mach_error.h>
11466 #include <mach/thread_status.h>
11467 #include <mach/exception.h>
11468 #include <mach/task.h>
11469 #include <pthread.h>
11470 /* The exception port on which our thread listens.  */
11471 static mach_port_t our_exception_port;
11472 /* The main function of the thread listening for exceptions of type
11473    EXC_BAD_ACCESS.  */
11474 static void *
11475 mach_exception_thread (void *arg)
11476 {
11477   /* Buffer for a message to be received.  */
11478   struct {
11479     mach_msg_header_t head;
11480     mach_msg_body_t msgh_body;
11481     char data[1024];
11482   } msg;
11483   mach_msg_return_t retval;
11484   /* Wait for a message on the exception port.  */
11485   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11486                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11487   if (retval != MACH_MSG_SUCCESS)
11488     abort ();
11489   exit (1);
11490 }
11491 static void
11492 nocrash_init (void)
11493 {
11494   mach_port_t self = mach_task_self ();
11495   /* Allocate a port on which the thread shall listen for exceptions.  */
11496   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11497       == KERN_SUCCESS) {
11498     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11499     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11500                                 MACH_MSG_TYPE_MAKE_SEND)
11501         == KERN_SUCCESS) {
11502       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11503          for us.  */
11504       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11505       /* Create the thread listening on the exception port.  */
11506       pthread_attr_t attr;
11507       pthread_t thread;
11508       if (pthread_attr_init (&attr) == 0
11509           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11510           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11511         pthread_attr_destroy (&attr);
11512         /* Replace the exception port info for these exceptions with our own.
11513            Note that we replace the exception port for the entire task, not only
11514            for a particular thread.  This has the effect that when our exception
11515            port gets the message, the thread specific exception port has already
11516            been asked, and we don't need to bother about it.
11517            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11518         task_set_exception_ports (self, mask, our_exception_port,
11519                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11520       }
11521     }
11522   }
11523 }
11524 #elif defined _WIN32 && ! defined __CYGWIN__
11525 /* Avoid a crash on native Windows.  */
11526 #define WIN32_LEAN_AND_MEAN
11527 #include <windows.h>
11528 #include <winerror.h>
11529 static LONG WINAPI
11530 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11531 {
11532   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11533     {
11534     case EXCEPTION_ACCESS_VIOLATION:
11535     case EXCEPTION_IN_PAGE_ERROR:
11536     case EXCEPTION_STACK_OVERFLOW:
11537     case EXCEPTION_GUARD_PAGE:
11538     case EXCEPTION_PRIV_INSTRUCTION:
11539     case EXCEPTION_ILLEGAL_INSTRUCTION:
11540     case EXCEPTION_DATATYPE_MISALIGNMENT:
11541     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11542     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11543       exit (1);
11544     }
11545   return EXCEPTION_CONTINUE_SEARCH;
11546 }
11547 static void
11548 nocrash_init (void)
11549 {
11550   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11551 }
11552 #else
11553 /* Avoid a crash on POSIX systems.  */
11554 #include <signal.h>
11555 #include <unistd.h>
11556 /* A POSIX signal handler.  */
11557 static void
11558 exception_handler (int sig)
11559 {
11560   _exit (1);
11561 }
11562 static void
11563 nocrash_init (void)
11564 {
11565 #ifdef SIGSEGV
11566   signal (SIGSEGV, exception_handler);
11567 #endif
11568 #ifdef SIGBUS
11569   signal (SIGBUS, exception_handler);
11570 #endif
11571 }
11572 #endif
11573
11574         #include <errno.h>
11575         #include <stdlib.h>
11576         #include <string.h>
11577
11578 int
11579 main (void)
11580 {
11581
11582         int result = 0;
11583         /* This test fails on Solaris 10.  */
11584         {
11585           char *name = realpath ("conftest.a", NULL);
11586           if (!(name && *name == '/'))
11587             result |= 1;
11588           free (name);
11589         }
11590         /* This test fails on older versions of Cygwin.  */
11591         {
11592           char *name = realpath ("conftest.b/../conftest.a", NULL);
11593           if (name != NULL)
11594             result |= 2;
11595           free (name);
11596         }
11597         /* This test fails on Cygwin 2.9.  */
11598         #if HAVE_LSTAT
11599         {
11600           char *name = realpath ("conftest.l/../conftest.a", NULL);
11601           if (name != NULL || errno != ENOTDIR)
11602             result |= 4;
11603           free (name);
11604         }
11605         #endif
11606         /* This test fails on Mac OS X 10.13, OpenBSD 6.0.  */
11607         {
11608           char *name = realpath ("conftest.a/", NULL);
11609           if (name != NULL)
11610             result |= 8;
11611           free (name);
11612         }
11613         /* This test fails on AIX 7, Solaris 10.  */
11614         {
11615           char *name1 = realpath (".", NULL);
11616           char *name2 = realpath ("conftest.d//./..", NULL);
11617           if (! name1 || ! name2 || strcmp (name1, name2))
11618             result |= 16;
11619           free (name1);
11620           free (name2);
11621         }
11622         #ifdef __linux__
11623         /* On Linux, // is the same as /. See also double-slash-root.m4.
11624            realpath() should respect this.
11625            This test fails on musl libc 1.2.2.  */
11626         {
11627           char *name = realpath ("//", NULL);
11628           if (! name || strcmp (name, "/"))
11629             result |= 32;
11630           free (name);
11631         }
11632         #endif
11633         return result;
11634
11635   ;
11636   return 0;
11637 }
11638
11639 _ACEOF
11640 if ac_fn_c_try_run "$LINENO"
11641 then :
11642   gl_cv_func_realpath_works=yes
11643 else $as_nop
11644   case $? in
11645         32) gl_cv_func_realpath_works=nearly ;;
11646         *)  gl_cv_func_realpath_works=no ;;
11647       esac
11648
11649 fi
11650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11651   conftest.$ac_objext conftest.beam conftest.$ac_ext
11652 fi
11653
11654     rm -rf conftest.a conftest.l conftest.d
11655
11656 fi
11657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
11658 printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
11659   case "$gl_cv_func_realpath_works" in
11660     *yes)
11661
11662 printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
11663
11664       ;;
11665     *nearly)
11666
11667 printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
11668
11669       ;;
11670   esac
11671
11672
11673
11674
11675
11676
11677
11678
11679   case "$host_os" in
11680     mingw*) ;;
11681     *)      ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
11682 if test "x$ac_cv_func_getcwd" = xyes
11683 then :
11684   printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
11685
11686 fi
11687  ;;
11688   esac
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
11701     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
11702
11703 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
11704
11705   else
11706     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
11707   fi
11708
11709
11710
11711     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
11712   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11713
11714   REPLACE_IOCTL=0;
11715
11716
11717
11718
11719     HAVE_OPENDIR=1;
11720   HAVE_READDIR=1;
11721   HAVE_REWINDDIR=1;
11722   HAVE_CLOSEDIR=1;
11723   HAVE_DECL_DIRFD=1;
11724   HAVE_DECL_FDOPENDIR=1;
11725   HAVE_FDOPENDIR=1;
11726   HAVE_SCANDIR=1;
11727   HAVE_ALPHASORT=1;
11728   REPLACE_OPENDIR=0;
11729   REPLACE_CLOSEDIR=0;
11730   REPLACE_DIRFD=0;
11731   REPLACE_FDOPENDIR=0;
11732
11733
11734
11735
11736
11737
11738
11739   GL_M4_GNULIB_OPENDIR=0
11740
11741
11742
11743   GL_M4_GNULIB_READDIR=0
11744
11745
11746
11747   GL_M4_GNULIB_REWINDDIR=0
11748
11749
11750
11751   GL_M4_GNULIB_CLOSEDIR=0
11752
11753
11754
11755   GL_M4_GNULIB_DIRFD=0
11756
11757
11758
11759   GL_M4_GNULIB_FDOPENDIR=0
11760
11761
11762
11763   GL_M4_GNULIB_SCANDIR=0
11764
11765
11766
11767   GL_M4_GNULIB_ALPHASORT=0
11768
11769
11770
11771
11772
11773   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
11774 printf %s "checking whether the preprocessor supports include_next... " >&6; }
11775 if test ${gl_cv_have_include_next+y}
11776 then :
11777   printf %s "(cached) " >&6
11778 else $as_nop
11779   rm -rf conftestd1a conftestd1b conftestd2
11780      mkdir conftestd1a conftestd1b conftestd2
11781                                                   cat <<EOF > conftestd1a/conftest.h
11782 #define DEFINED_IN_CONFTESTD1
11783 #include_next <conftest.h>
11784 #ifdef DEFINED_IN_CONFTESTD2
11785 int foo;
11786 #else
11787 #error "include_next doesn't work"
11788 #endif
11789 EOF
11790      cat <<EOF > conftestd1b/conftest.h
11791 #define DEFINED_IN_CONFTESTD1
11792 #include <stdio.h>
11793 #include_next <conftest.h>
11794 #ifdef DEFINED_IN_CONFTESTD2
11795 int foo;
11796 #else
11797 #error "include_next doesn't work"
11798 #endif
11799 EOF
11800      cat <<EOF > conftestd2/conftest.h
11801 #ifndef DEFINED_IN_CONFTESTD1
11802 #error "include_next test doesn't work"
11803 #endif
11804 #define DEFINED_IN_CONFTESTD2
11805 EOF
11806      gl_save_CPPFLAGS="$CPPFLAGS"
11807      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
11808      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11809 /* end confdefs.h.  */
11810 #include <conftest.h>
11811 _ACEOF
11812 if ac_fn_c_try_compile "$LINENO"
11813 then :
11814   gl_cv_have_include_next=yes
11815 else $as_nop
11816   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
11817         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h.  */
11819 #include <conftest.h>
11820 _ACEOF
11821 if ac_fn_c_try_compile "$LINENO"
11822 then :
11823   gl_cv_have_include_next=buggy
11824 else $as_nop
11825   gl_cv_have_include_next=no
11826 fi
11827 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11828
11829 fi
11830 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11831      CPPFLAGS="$gl_save_CPPFLAGS"
11832      rm -rf conftestd1a conftestd1b conftestd2
11833
11834 fi
11835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
11836 printf "%s\n" "$gl_cv_have_include_next" >&6; }
11837   PRAGMA_SYSTEM_HEADER=
11838   if test $gl_cv_have_include_next = yes; then
11839     INCLUDE_NEXT=include_next
11840     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
11841     if test -n "$GCC"; then
11842       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
11843     fi
11844   else
11845     if test $gl_cv_have_include_next = buggy; then
11846       INCLUDE_NEXT=include
11847       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
11848     else
11849       INCLUDE_NEXT=include
11850       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
11851     fi
11852   fi
11853
11854
11855
11856
11857       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
11858 printf %s "checking whether source code line length is unlimited... " >&6; }
11859 if test ${gl_cv_source_line_length_unlimited+y}
11860 then :
11861   printf %s "(cached) " >&6
11862 else $as_nop
11863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864 /* end confdefs.h.  */
11865
11866 #ifdef __TANDEM
11867 choke me
11868 #endif
11869
11870 _ACEOF
11871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11872   $EGREP "choke me" >/dev/null 2>&1
11873 then :
11874   gl_cv_source_line_length_unlimited=no
11875 else $as_nop
11876   gl_cv_source_line_length_unlimited=yes
11877 fi
11878 rm -rf conftest*
11879
11880
11881 fi
11882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
11883 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
11884   if test $gl_cv_source_line_length_unlimited = no; then
11885     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
11886   else
11887     PRAGMA_COLUMNS=
11888   fi
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904      if test $gl_cv_have_include_next = yes; then
11905        gl_cv_next_dirent_h='<'dirent.h'>'
11906      else
11907        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
11908 printf %s "checking absolute name of <dirent.h>... " >&6; }
11909 if test ${gl_cv_next_dirent_h+y}
11910 then :
11911   printf %s "(cached) " >&6
11912 else $as_nop
11913
11914              if test $ac_cv_header_dirent_h = yes; then
11915
11916
11917
11918
11919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920 /* end confdefs.h.  */
11921 #include <dirent.h>
11922 _ACEOF
11923                 case "$host_os" in
11924     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11925     *)    gl_absname_cpp="$ac_cpp" ;;
11926   esac
11927
11928   case "$host_os" in
11929     mingw*)
11930                                           gl_dirsep_regex='[/\\]'
11931       ;;
11932     *)
11933       gl_dirsep_regex='\/'
11934       ;;
11935   esac
11936       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11937   gl_header_literal_regex=`echo 'dirent.h' \
11938                            | sed -e "$gl_make_literal_regex_sed"`
11939   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11940       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11941       s|^/[^/]|//&|
11942       p
11943       q
11944     }'
11945
11946         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11947   sed -n "$gl_absolute_header_sed"`
11948
11949            gl_header=$gl_cv_absolute_dirent_h
11950            gl_cv_next_dirent_h='"'$gl_header'"'
11951           else
11952                gl_cv_next_dirent_h='<'dirent.h'>'
11953              fi
11954
11955
11956 fi
11957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
11958 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
11959      fi
11960      NEXT_DIRENT_H=$gl_cv_next_dirent_h
11961
11962      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11963        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11964        gl_next_as_first_directive='<'dirent.h'>'
11965      else
11966        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11967        gl_next_as_first_directive=$gl_cv_next_dirent_h
11968      fi
11969      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
11970
11971
11972
11973
11974   if test $ac_cv_header_dirent_h = yes; then
11975     HAVE_DIRENT_H=1
11976   else
11977     HAVE_DIRENT_H=0
11978   fi
11979
11980
11981
11982
11983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
11984 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
11985 if test ${ac_cv_c_undeclared_builtin_options+y}
11986 then :
11987   printf %s "(cached) " >&6
11988 else $as_nop
11989   ac_save_CFLAGS=$CFLAGS
11990    ac_cv_c_undeclared_builtin_options='cannot detect'
11991    for ac_arg in '' -fno-builtin; do
11992      CFLAGS="$ac_save_CFLAGS $ac_arg"
11993      # This test program should *not* compile successfully.
11994      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h.  */
11996
11997 int
11998 main (void)
11999 {
12000 (void) strchr;
12001   ;
12002   return 0;
12003 }
12004 _ACEOF
12005 if ac_fn_c_try_compile "$LINENO"
12006 then :
12007
12008 else $as_nop
12009   # This test program should compile successfully.
12010         # No library function is consistently available on
12011         # freestanding implementations, so test against a dummy
12012         # declaration.  Include always-available headers on the
12013         # off chance that they somehow elicit warnings.
12014         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h.  */
12016 #include <float.h>
12017 #include <limits.h>
12018 #include <stdarg.h>
12019 #include <stddef.h>
12020 extern void ac_decl (int, char *);
12021
12022 int
12023 main (void)
12024 {
12025 (void) ac_decl (0, (char *) 0);
12026   (void) ac_decl;
12027
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 if ac_fn_c_try_compile "$LINENO"
12033 then :
12034   if test x"$ac_arg" = x
12035 then :
12036   ac_cv_c_undeclared_builtin_options='none needed'
12037 else $as_nop
12038   ac_cv_c_undeclared_builtin_options=$ac_arg
12039 fi
12040           break
12041 fi
12042 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12043 fi
12044 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12045     done
12046     CFLAGS=$ac_save_CFLAGS
12047
12048 fi
12049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
12050 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
12051   case $ac_cv_c_undeclared_builtin_options in #(
12052   'cannot detect') :
12053     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12054 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12055 as_fn_error $? "cannot make $CC report undeclared builtins
12056 See \`config.log' for more details" "$LINENO" 5; } ;; #(
12057   'none needed') :
12058     ac_c_undeclared_builtin_options='' ;; #(
12059   *) :
12060     ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
12061 esac
12062
12063 gl_mda_defines='
12064 #if defined _WIN32 && !defined __CYGWIN__
12065 #define access    _access
12066 #define chdir     _chdir
12067 #define chmod     _chmod
12068 #define close     _close
12069 #define creat     _creat
12070 #define dup       _dup
12071 #define dup2      _dup2
12072 #define ecvt      _ecvt
12073 #define execl     _execl
12074 #define execle    _execle
12075 #define execlp    _execlp
12076 #define execv     _execv
12077 #define execve    _execve
12078 #define execvp    _execvp
12079 #define execvpe   _execvpe
12080 #define fcloseall _fcloseall
12081 #define fcvt      _fcvt
12082 #define fdopen    _fdopen
12083 #define fileno    _fileno
12084 #define gcvt      _gcvt
12085 #define getcwd    _getcwd
12086 #define getpid    _getpid
12087 #define getw      _getw
12088 #define isatty    _isatty
12089 #define j0        _j0
12090 #define j1        _j1
12091 #define jn        _jn
12092 #define lfind     _lfind
12093 #define lsearch   _lsearch
12094 #define lseek     _lseek
12095 #define memccpy   _memccpy
12096 #define mkdir     _mkdir
12097 #define mktemp    _mktemp
12098 #define open      _open
12099 #define putenv    _putenv
12100 #define putw      _putw
12101 #define read      _read
12102 #define rmdir     _rmdir
12103 #define strdup    _strdup
12104 #define swab      _swab
12105 #define tempnam   _tempnam
12106 #define tzset     _tzset
12107 #define umask     _umask
12108 #define unlink    _unlink
12109 #define utime     _utime
12110 #define wcsdup    _wcsdup
12111 #define write     _write
12112 #define y0        _y0
12113 #define y1        _y1
12114 #define yn        _yn
12115 #endif
12116 '
12117
12118
12119
12120
12121
12122
12123
12124
12125   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
12126 printf %s "checking if environ is properly declared... " >&6; }
12127 if test ${gt_cv_var_environ_declaration+y}
12128 then :
12129   printf %s "(cached) " >&6
12130 else $as_nop
12131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132 /* end confdefs.h.  */
12133 #if HAVE_UNISTD_H
12134      #include <unistd.h>
12135      #endif
12136      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
12137      #include <stdlib.h>
12138
12139             extern struct { int foo; } environ;
12140 int
12141 main (void)
12142 {
12143 environ.foo = 1;
12144   ;
12145   return 0;
12146 }
12147 _ACEOF
12148 if ac_fn_c_try_compile "$LINENO"
12149 then :
12150   gt_cv_var_environ_declaration=no
12151 else $as_nop
12152   gt_cv_var_environ_declaration=yes
12153 fi
12154 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12155 fi
12156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
12157 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
12158   if test $gt_cv_var_environ_declaration = yes; then
12159
12160 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
12161
12162   fi
12163
12164
12165   if test $gt_cv_var_environ_declaration != yes; then
12166     HAVE_DECL_ENVIRON=0
12167   fi
12168
12169
12170
12171   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
12172 printf %s "checking for complete errno.h... " >&6; }
12173 if test ${gl_cv_header_errno_h_complete+y}
12174 then :
12175   printf %s "(cached) " >&6
12176 else $as_nop
12177
12178     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12179 /* end confdefs.h.  */
12180
12181 #include <errno.h>
12182 #if !defined ETXTBSY
12183 booboo
12184 #endif
12185 #if !defined ENOMSG
12186 booboo
12187 #endif
12188 #if !defined EIDRM
12189 booboo
12190 #endif
12191 #if !defined ENOLINK
12192 booboo
12193 #endif
12194 #if !defined EPROTO
12195 booboo
12196 #endif
12197 #if !defined EMULTIHOP
12198 booboo
12199 #endif
12200 #if !defined EBADMSG
12201 booboo
12202 #endif
12203 #if !defined EOVERFLOW
12204 booboo
12205 #endif
12206 #if !defined ENOTSUP
12207 booboo
12208 #endif
12209 #if !defined ENETRESET
12210 booboo
12211 #endif
12212 #if !defined ECONNABORTED
12213 booboo
12214 #endif
12215 #if !defined ESTALE
12216 booboo
12217 #endif
12218 #if !defined EDQUOT
12219 booboo
12220 #endif
12221 #if !defined ECANCELED
12222 booboo
12223 #endif
12224 #if !defined EOWNERDEAD
12225 booboo
12226 #endif
12227 #if !defined ENOTRECOVERABLE
12228 booboo
12229 #endif
12230 #if !defined EILSEQ
12231 booboo
12232 #endif
12233
12234 _ACEOF
12235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12236   $EGREP "booboo" >/dev/null 2>&1
12237 then :
12238   gl_cv_header_errno_h_complete=no
12239 else $as_nop
12240   gl_cv_header_errno_h_complete=yes
12241 fi
12242 rm -rf conftest*
12243
12244
12245 fi
12246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
12247 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
12248   if test $gl_cv_header_errno_h_complete = yes; then
12249     ERRNO_H=''
12250   else
12251
12252
12253
12254
12255
12256
12257
12258
12259      if test $gl_cv_have_include_next = yes; then
12260        gl_cv_next_errno_h='<'errno.h'>'
12261      else
12262        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
12263 printf %s "checking absolute name of <errno.h>... " >&6; }
12264 if test ${gl_cv_next_errno_h+y}
12265 then :
12266   printf %s "(cached) " >&6
12267 else $as_nop
12268
12269
12270
12271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h.  */
12273 #include <errno.h>
12274 _ACEOF
12275                 case "$host_os" in
12276     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12277     *)    gl_absname_cpp="$ac_cpp" ;;
12278   esac
12279
12280   case "$host_os" in
12281     mingw*)
12282                                           gl_dirsep_regex='[/\\]'
12283       ;;
12284     *)
12285       gl_dirsep_regex='\/'
12286       ;;
12287   esac
12288       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12289   gl_header_literal_regex=`echo 'errno.h' \
12290                            | sed -e "$gl_make_literal_regex_sed"`
12291   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12292       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12293       s|^/[^/]|//&|
12294       p
12295       q
12296     }'
12297
12298         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12299   sed -n "$gl_absolute_header_sed"`
12300
12301            gl_header=$gl_cv_absolute_errno_h
12302            gl_cv_next_errno_h='"'$gl_header'"'
12303
12304
12305 fi
12306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
12307 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
12308      fi
12309      NEXT_ERRNO_H=$gl_cv_next_errno_h
12310
12311      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12312        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12313        gl_next_as_first_directive='<'errno.h'>'
12314      else
12315        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12316        gl_next_as_first_directive=$gl_cv_next_errno_h
12317      fi
12318      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
12319
12320
12321
12322
12323     ERRNO_H='errno.h'
12324   fi
12325
12326    if test -n "$ERRNO_H"; then
12327   GL_GENERATE_ERRNO_H_TRUE=
12328   GL_GENERATE_ERRNO_H_FALSE='#'
12329 else
12330   GL_GENERATE_ERRNO_H_TRUE='#'
12331   GL_GENERATE_ERRNO_H_FALSE=
12332 fi
12333
12334
12335   if test -n "$ERRNO_H"; then
12336     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
12337 printf %s "checking for EMULTIHOP value... " >&6; }
12338 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
12339 then :
12340   printf %s "(cached) " >&6
12341 else $as_nop
12342
12343       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h.  */
12345
12346 #include <errno.h>
12347 #ifdef EMULTIHOP
12348 yes
12349 #endif
12350
12351 _ACEOF
12352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12353   $EGREP "yes" >/dev/null 2>&1
12354 then :
12355   gl_cv_header_errno_h_EMULTIHOP=yes
12356 else $as_nop
12357   gl_cv_header_errno_h_EMULTIHOP=no
12358 fi
12359 rm -rf conftest*
12360
12361       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
12362         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363 /* end confdefs.h.  */
12364
12365 #define _XOPEN_SOURCE_EXTENDED 1
12366 #include <errno.h>
12367 #ifdef EMULTIHOP
12368 yes
12369 #endif
12370
12371 _ACEOF
12372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12373   $EGREP "yes" >/dev/null 2>&1
12374 then :
12375   gl_cv_header_errno_h_EMULTIHOP=hidden
12376 fi
12377 rm -rf conftest*
12378
12379         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
12380                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
12381 #define _XOPEN_SOURCE_EXTENDED 1
12382 #include <errno.h>
12383 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
12384 #include <stdio.h>
12385 #include <stdlib.h>
12386 "
12387 then :
12388
12389 fi
12390
12391         fi
12392       fi
12393
12394 fi
12395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
12396 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
12397     case $gl_cv_header_errno_h_EMULTIHOP in
12398       yes | no)
12399         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
12400         ;;
12401       *)
12402         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
12403         ;;
12404     esac
12405
12406
12407   fi
12408
12409
12410   if test -n "$ERRNO_H"; then
12411     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
12412 printf %s "checking for ENOLINK value... " >&6; }
12413 if test ${gl_cv_header_errno_h_ENOLINK+y}
12414 then :
12415   printf %s "(cached) " >&6
12416 else $as_nop
12417
12418       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419 /* end confdefs.h.  */
12420
12421 #include <errno.h>
12422 #ifdef ENOLINK
12423 yes
12424 #endif
12425
12426 _ACEOF
12427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12428   $EGREP "yes" >/dev/null 2>&1
12429 then :
12430   gl_cv_header_errno_h_ENOLINK=yes
12431 else $as_nop
12432   gl_cv_header_errno_h_ENOLINK=no
12433 fi
12434 rm -rf conftest*
12435
12436       if test $gl_cv_header_errno_h_ENOLINK = no; then
12437         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438 /* end confdefs.h.  */
12439
12440 #define _XOPEN_SOURCE_EXTENDED 1
12441 #include <errno.h>
12442 #ifdef ENOLINK
12443 yes
12444 #endif
12445
12446 _ACEOF
12447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12448   $EGREP "yes" >/dev/null 2>&1
12449 then :
12450   gl_cv_header_errno_h_ENOLINK=hidden
12451 fi
12452 rm -rf conftest*
12453
12454         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
12455                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
12456 #define _XOPEN_SOURCE_EXTENDED 1
12457 #include <errno.h>
12458 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
12459 #include <stdio.h>
12460 #include <stdlib.h>
12461 "
12462 then :
12463
12464 fi
12465
12466         fi
12467       fi
12468
12469 fi
12470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
12471 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
12472     case $gl_cv_header_errno_h_ENOLINK in
12473       yes | no)
12474         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
12475         ;;
12476       *)
12477         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
12478         ;;
12479     esac
12480
12481
12482   fi
12483
12484
12485   if test -n "$ERRNO_H"; then
12486     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
12487 printf %s "checking for EOVERFLOW value... " >&6; }
12488 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
12489 then :
12490   printf %s "(cached) " >&6
12491 else $as_nop
12492
12493       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12494 /* end confdefs.h.  */
12495
12496 #include <errno.h>
12497 #ifdef EOVERFLOW
12498 yes
12499 #endif
12500
12501 _ACEOF
12502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12503   $EGREP "yes" >/dev/null 2>&1
12504 then :
12505   gl_cv_header_errno_h_EOVERFLOW=yes
12506 else $as_nop
12507   gl_cv_header_errno_h_EOVERFLOW=no
12508 fi
12509 rm -rf conftest*
12510
12511       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
12512         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12513 /* end confdefs.h.  */
12514
12515 #define _XOPEN_SOURCE_EXTENDED 1
12516 #include <errno.h>
12517 #ifdef EOVERFLOW
12518 yes
12519 #endif
12520
12521 _ACEOF
12522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12523   $EGREP "yes" >/dev/null 2>&1
12524 then :
12525   gl_cv_header_errno_h_EOVERFLOW=hidden
12526 fi
12527 rm -rf conftest*
12528
12529         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
12530                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
12531 #define _XOPEN_SOURCE_EXTENDED 1
12532 #include <errno.h>
12533 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
12534 #include <stdio.h>
12535 #include <stdlib.h>
12536 "
12537 then :
12538
12539 fi
12540
12541         fi
12542       fi
12543
12544 fi
12545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
12546 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
12547     case $gl_cv_header_errno_h_EOVERFLOW in
12548       yes | no)
12549         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
12550         ;;
12551       *)
12552         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
12553         ;;
12554     esac
12555
12556
12557   fi
12558
12559
12560 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12561 if test "x$ac_cv_have_decl_strerror_r" = xyes
12562 then :
12563   ac_have_decl=1
12564 else $as_nop
12565   ac_have_decl=0
12566 fi
12567 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
12568
12569
12570 if test $ac_cv_have_decl_strerror_r = yes; then
12571   # For backward compatibility's sake, define HAVE_STRERROR_R.
12572   # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
12573   # as AC_CHECK_DECLS_ONCE.)
12574
12575 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
12576
12577 fi
12578
12579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
12580 printf %s "checking whether strerror_r returns char *... " >&6; }
12581 if test ${ac_cv_func_strerror_r_char_p+y}
12582 then :
12583   printf %s "(cached) " >&6
12584 else $as_nop
12585
12586     ac_cv_func_strerror_r_char_p=no
12587     if test $ac_cv_have_decl_strerror_r = yes; then
12588       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589 /* end confdefs.h.  */
12590 #include <string.h>
12591 int
12592 main (void)
12593 {
12594
12595           char buf[100];
12596           char x = *strerror_r (0, buf, sizeof buf);
12597           char *p = strerror_r (0, buf, sizeof buf);
12598           return !p || x;
12599
12600   ;
12601   return 0;
12602 }
12603 _ACEOF
12604 if ac_fn_c_try_compile "$LINENO"
12605 then :
12606   ac_cv_func_strerror_r_char_p=yes
12607 fi
12608 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12609
12610     fi
12611
12612 fi
12613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
12614 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
12615 if test $ac_cv_func_strerror_r_char_p = yes; then
12616
12617 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
12618
12619 fi
12620
12621
12622   XGETTEXT_EXTRA_OPTIONS=
12623
12624 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
12625 if test "x$ac_cv_type_mode_t" = xyes
12626 then :
12627
12628 else $as_nop
12629
12630 printf "%s\n" "#define mode_t int" >>confdefs.h
12631
12632 fi
12633
12634
12635
12636
12637
12638   ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
12639 "
12640 if test "x$ac_cv_type_sig_atomic_t" = xyes
12641 then :
12642
12643 printf "%s\n" "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
12644
12645
12646 else $as_nop
12647
12648 printf "%s\n" "#define sig_atomic_t int" >>confdefs.h
12649
12650 fi
12651
12652
12653 ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12654 if test "x$ac_cv_have_decl_fchdir" = xyes
12655 then :
12656   ac_have_decl=1
12657 else $as_nop
12658   ac_have_decl=0
12659 fi
12660 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
12661
12662
12663     HAVE_DECL_FCLOSEALL=1;
12664   HAVE_DECL_FPURGE=1;
12665   HAVE_DECL_FSEEKO=1;
12666   HAVE_DECL_FTELLO=1;
12667   HAVE_DECL_GETDELIM=1;
12668   HAVE_DECL_GETLINE=1;
12669   HAVE_DECL_OBSTACK_PRINTF=1;
12670   HAVE_DECL_SNPRINTF=1;
12671   HAVE_DECL_VSNPRINTF=1;
12672   HAVE_DPRINTF=1;
12673   HAVE_FSEEKO=1;
12674   HAVE_FTELLO=1;
12675   HAVE_PCLOSE=1;
12676   HAVE_POPEN=1;
12677   HAVE_RENAMEAT=1;
12678   HAVE_VASPRINTF=1;
12679   HAVE_VDPRINTF=1;
12680   REPLACE_DPRINTF=0;
12681   REPLACE_FCLOSE=0;
12682   REPLACE_FDOPEN=0;
12683   REPLACE_FFLUSH=0;
12684   REPLACE_FOPEN=0;
12685   REPLACE_FPRINTF=0;
12686   REPLACE_FPURGE=0;
12687   REPLACE_FREOPEN=0;
12688   REPLACE_FSEEK=0;
12689   REPLACE_FSEEKO=0;
12690   REPLACE_FTELL=0;
12691   REPLACE_FTELLO=0;
12692   REPLACE_GETDELIM=0;
12693   REPLACE_GETLINE=0;
12694   REPLACE_OBSTACK_PRINTF=0;
12695   REPLACE_PERROR=0;
12696   REPLACE_POPEN=0;
12697   REPLACE_PRINTF=0;
12698   REPLACE_REMOVE=0;
12699   REPLACE_RENAME=0;
12700   REPLACE_RENAMEAT=0;
12701   REPLACE_SNPRINTF=0;
12702   REPLACE_SPRINTF=0;
12703   REPLACE_STDIO_READ_FUNCS=0;
12704   REPLACE_STDIO_WRITE_FUNCS=0;
12705   REPLACE_TMPFILE=0;
12706   REPLACE_VASPRINTF=0;
12707   REPLACE_VDPRINTF=0;
12708   REPLACE_VFPRINTF=0;
12709   REPLACE_VPRINTF=0;
12710   REPLACE_VSNPRINTF=0;
12711   REPLACE_VSPRINTF=0;
12712
12713
12714
12715   GL_M4_GNULIB_DPRINTF=0
12716
12717
12718
12719   GL_M4_GNULIB_FCLOSE=0
12720
12721
12722
12723   GL_M4_GNULIB_FDOPEN=0
12724
12725
12726
12727   GL_M4_GNULIB_FFLUSH=0
12728
12729
12730
12731   GL_M4_GNULIB_FGETC=0
12732
12733
12734
12735   GL_M4_GNULIB_FGETS=0
12736
12737
12738
12739   GL_M4_GNULIB_FOPEN=0
12740
12741
12742
12743   GL_M4_GNULIB_FPRINTF=0
12744
12745
12746
12747   GL_M4_GNULIB_FPRINTF_POSIX=0
12748
12749
12750
12751   GL_M4_GNULIB_FPURGE=0
12752
12753
12754
12755   GL_M4_GNULIB_FPUTC=0
12756
12757
12758
12759   GL_M4_GNULIB_FPUTS=0
12760
12761
12762
12763   GL_M4_GNULIB_FREAD=0
12764
12765
12766
12767   GL_M4_GNULIB_FREOPEN=0
12768
12769
12770
12771   GL_M4_GNULIB_FSCANF=0
12772
12773
12774
12775   GL_M4_GNULIB_FSEEK=0
12776
12777
12778
12779   GL_M4_GNULIB_FSEEKO=0
12780
12781
12782
12783   GL_M4_GNULIB_FTELL=0
12784
12785
12786
12787   GL_M4_GNULIB_FTELLO=0
12788
12789
12790
12791   GL_M4_GNULIB_FWRITE=0
12792
12793
12794
12795   GL_M4_GNULIB_GETC=0
12796
12797
12798
12799   GL_M4_GNULIB_GETCHAR=0
12800
12801
12802
12803   GL_M4_GNULIB_GETDELIM=0
12804
12805
12806
12807   GL_M4_GNULIB_GETLINE=0
12808
12809
12810
12811   GL_M4_GNULIB_OBSTACK_PRINTF=0
12812
12813
12814
12815   GL_M4_GNULIB_OBSTACK_PRINTF_POSIX=0
12816
12817
12818
12819   GL_M4_GNULIB_PCLOSE=0
12820
12821
12822
12823   GL_M4_GNULIB_PERROR=0
12824
12825
12826
12827   GL_M4_GNULIB_POPEN=0
12828
12829
12830
12831   GL_M4_GNULIB_PRINTF=0
12832
12833
12834
12835   GL_M4_GNULIB_PRINTF_POSIX=0
12836
12837
12838
12839   GL_M4_GNULIB_PUTC=0
12840
12841
12842
12843   GL_M4_GNULIB_PUTCHAR=0
12844
12845
12846
12847   GL_M4_GNULIB_PUTS=0
12848
12849
12850
12851   GL_M4_GNULIB_REMOVE=0
12852
12853
12854
12855   GL_M4_GNULIB_RENAME=0
12856
12857
12858
12859   GL_M4_GNULIB_RENAMEAT=0
12860
12861
12862
12863   GL_M4_GNULIB_SCANF=0
12864
12865
12866
12867   GL_M4_GNULIB_SNPRINTF=0
12868
12869
12870
12871   GL_M4_GNULIB_SPRINTF_POSIX=0
12872
12873
12874
12875   GL_M4_GNULIB_STDIO_H_NONBLOCKING=0
12876
12877
12878
12879   GL_M4_GNULIB_STDIO_H_SIGPIPE=0
12880
12881
12882
12883   GL_M4_GNULIB_TMPFILE=0
12884
12885
12886
12887   GL_M4_GNULIB_VASPRINTF=0
12888
12889
12890
12891   GL_M4_GNULIB_VFSCANF=0
12892
12893
12894
12895   GL_M4_GNULIB_VSCANF=0
12896
12897
12898
12899   GL_M4_GNULIB_VDPRINTF=0
12900
12901
12902
12903   GL_M4_GNULIB_VFPRINTF=0
12904
12905
12906
12907   GL_M4_GNULIB_VFPRINTF_POSIX=0
12908
12909
12910
12911   GL_M4_GNULIB_VPRINTF=0
12912
12913
12914
12915   GL_M4_GNULIB_VPRINTF_POSIX=0
12916
12917
12918
12919   GL_M4_GNULIB_VSNPRINTF=0
12920
12921
12922
12923   GL_M4_GNULIB_VSPRINTF_POSIX=0
12924
12925
12926
12927   GL_M4_GNULIB_MDA_FCLOSEALL=1
12928
12929
12930
12931   GL_M4_GNULIB_MDA_FDOPEN=1
12932
12933
12934
12935   GL_M4_GNULIB_MDA_FILENO=1
12936
12937
12938
12939   GL_M4_GNULIB_MDA_GETW=1
12940
12941
12942
12943   GL_M4_GNULIB_MDA_PUTW=1
12944
12945
12946
12947   GL_M4_GNULIB_MDA_TEMPNAM=1
12948
12949
12950
12951
12952     HAVE_FCNTL=1;
12953   HAVE_OPENAT=1;
12954   REPLACE_CREAT=0;
12955   REPLACE_FCNTL=0;
12956   REPLACE_OPEN=0;
12957   REPLACE_OPENAT=0;
12958
12959
12960
12961
12962   GL_M4_GNULIB_CREAT=0
12963
12964
12965
12966   GL_M4_GNULIB_FCNTL=0
12967
12968
12969
12970   GL_M4_GNULIB_NONBLOCKING=0
12971
12972
12973
12974   GL_M4_GNULIB_OPEN=0
12975
12976
12977
12978   GL_M4_GNULIB_OPENAT=0
12979
12980
12981
12982   GL_M4_GNULIB_MDA_CREAT=1
12983
12984
12985
12986   GL_M4_GNULIB_MDA_OPEN=1
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12997 printf %s "checking for working fcntl.h... " >&6; }
12998 if test ${gl_cv_header_working_fcntl_h+y}
12999 then :
13000   printf %s "(cached) " >&6
13001 else $as_nop
13002   if test "$cross_compiling" = yes
13003 then :
13004   case "$host_os" in
13005                   # Guess 'no' on native Windows.
13006           mingw*) gl_cv_header_working_fcntl_h='no' ;;
13007           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
13008         esac
13009
13010 else $as_nop
13011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012 /* end confdefs.h.  */
13013 #include <sys/types.h>
13014            #include <sys/stat.h>
13015            #if HAVE_UNISTD_H
13016            # include <unistd.h>
13017            #else /* on Windows with MSVC */
13018            # include <io.h>
13019            # include <stdlib.h>
13020            # defined sleep(n) _sleep ((n) * 1000)
13021            #endif
13022            #include <fcntl.h>
13023
13024
13025 $gl_mda_defines
13026
13027            #ifndef O_NOATIME
13028             #define O_NOATIME 0
13029            #endif
13030            #ifndef O_NOFOLLOW
13031             #define O_NOFOLLOW 0
13032            #endif
13033            static int const constants[] =
13034             {
13035               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
13036               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
13037             };
13038
13039 int
13040 main (void)
13041 {
13042
13043             int result = !constants;
13044             #if HAVE_SYMLINK
13045             {
13046               static char const sym[] = "conftest.sym";
13047               if (symlink ("/dev/null", sym) != 0)
13048                 result |= 2;
13049               else
13050                 {
13051                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
13052                   if (fd >= 0)
13053                     {
13054                       close (fd);
13055                       result |= 4;
13056                     }
13057                 }
13058               if (unlink (sym) != 0 || symlink (".", sym) != 0)
13059                 result |= 2;
13060               else
13061                 {
13062                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
13063                   if (fd >= 0)
13064                     {
13065                       close (fd);
13066                       result |= 4;
13067                     }
13068                 }
13069               unlink (sym);
13070             }
13071             #endif
13072             {
13073               static char const file[] = "confdefs.h";
13074               int fd = open (file, O_RDONLY | O_NOATIME);
13075               if (fd < 0)
13076                 result |= 8;
13077               else
13078                 {
13079                   struct stat st0;
13080                   if (fstat (fd, &st0) != 0)
13081                     result |= 16;
13082                   else
13083                     {
13084                       char c;
13085                       sleep (1);
13086                       if (read (fd, &c, 1) != 1)
13087                         result |= 24;
13088                       else
13089                         {
13090                           if (close (fd) != 0)
13091                             result |= 32;
13092                           else
13093                             {
13094                               struct stat st1;
13095                               if (stat (file, &st1) != 0)
13096                                 result |= 40;
13097                               else
13098                                 if (st0.st_atime != st1.st_atime)
13099                                   result |= 64;
13100                             }
13101                         }
13102                     }
13103                 }
13104             }
13105             return result;
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 if ac_fn_c_try_run "$LINENO"
13111 then :
13112   gl_cv_header_working_fcntl_h=yes
13113 else $as_nop
13114   case $? in #(
13115         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
13116         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
13117         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
13118          *) gl_cv_header_working_fcntl_h='no';;
13119         esac
13120 fi
13121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122   conftest.$ac_objext conftest.beam conftest.$ac_ext
13123 fi
13124
13125
13126 fi
13127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
13128 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
13129
13130   case $gl_cv_header_working_fcntl_h in #(
13131   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
13132   *) ac_val=1;;
13133   esac
13134
13135 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
13136
13137
13138   case $gl_cv_header_working_fcntl_h in #(
13139   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
13140   *) ac_val=1;;
13141   esac
13142
13143 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
13144
13145
13146
13147   ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
13148 "
13149 if test "x$ac_cv_type_pid_t" = xyes
13150 then :
13151
13152 else $as_nop
13153                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154 /* end confdefs.h.  */
13155
13156           #if defined _WIN64 && !defined __CYGWIN__
13157           LLP64
13158           #endif
13159
13160 int
13161 main (void)
13162 {
13163
13164   ;
13165   return 0;
13166 }
13167
13168 _ACEOF
13169 if ac_fn_c_try_compile "$LINENO"
13170 then :
13171   ac_pid_type='int'
13172 else $as_nop
13173   ac_pid_type='__int64'
13174 fi
13175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13176
13177 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
13178
13179
13180 fi
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194      if test $gl_cv_have_include_next = yes; then
13195        gl_cv_next_fcntl_h='<'fcntl.h'>'
13196      else
13197        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13198 printf %s "checking absolute name of <fcntl.h>... " >&6; }
13199 if test ${gl_cv_next_fcntl_h+y}
13200 then :
13201   printf %s "(cached) " >&6
13202 else $as_nop
13203
13204
13205
13206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h.  */
13208 #include <fcntl.h>
13209 _ACEOF
13210                 case "$host_os" in
13211     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13212     *)    gl_absname_cpp="$ac_cpp" ;;
13213   esac
13214
13215   case "$host_os" in
13216     mingw*)
13217                                           gl_dirsep_regex='[/\\]'
13218       ;;
13219     *)
13220       gl_dirsep_regex='\/'
13221       ;;
13222   esac
13223       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13224   gl_header_literal_regex=`echo 'fcntl.h' \
13225                            | sed -e "$gl_make_literal_regex_sed"`
13226   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13227       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13228       s|^/[^/]|//&|
13229       p
13230       q
13231     }'
13232
13233         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13234   sed -n "$gl_absolute_header_sed"`
13235
13236            gl_header=$gl_cv_absolute_fcntl_h
13237            gl_cv_next_fcntl_h='"'$gl_header'"'
13238
13239
13240 fi
13241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13242 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
13243      fi
13244      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13245
13246      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13247        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13248        gl_next_as_first_directive='<'fcntl.h'>'
13249      else
13250        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13251        gl_next_as_first_directive=$gl_cv_next_fcntl_h
13252      fi
13253      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271   ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
13272 if test "x$ac_cv_func_eaccess" = xyes
13273 then :
13274
13275 else $as_nop
13276
13277 printf "%s\n" "#define eaccess access" >>confdefs.h
13278
13279 fi
13280
13281
13282
13283
13284
13285
13286
13287
13288     HAVE_ACOSF=1;
13289   HAVE_ACOSL=1;
13290   HAVE_ASINF=1;
13291   HAVE_ASINL=1;
13292   HAVE_ATANF=1;
13293   HAVE_ATANL=1;
13294   HAVE_ATAN2F=1;
13295   HAVE_CBRT=1;
13296   HAVE_CBRTF=1;
13297   HAVE_CBRTL=1;
13298   HAVE_COPYSIGN=1;
13299   HAVE_COPYSIGNL=1;
13300   HAVE_COSF=1;
13301   HAVE_COSL=1;
13302   HAVE_COSHF=1;
13303   HAVE_EXPF=1;
13304   HAVE_EXPL=1;
13305   HAVE_EXPM1=1;
13306   HAVE_EXPM1F=1;
13307   HAVE_FABSF=1;
13308   HAVE_FABSL=1;
13309   HAVE_FMA=1;
13310   HAVE_FMAF=1;
13311   HAVE_FMAL=1;
13312   HAVE_FMODF=1;
13313   HAVE_FMODL=1;
13314   HAVE_FREXPF=1;
13315   HAVE_HYPOTF=1;
13316   HAVE_HYPOTL=1;
13317   HAVE_ILOGB=1;
13318   HAVE_ILOGBF=1;
13319   HAVE_ILOGBL=1;
13320   HAVE_ISNANF=1;
13321   HAVE_ISNAND=1;
13322   HAVE_ISNANL=1;
13323   HAVE_LDEXPF=1;
13324   HAVE_LOGF=1;
13325   HAVE_LOGL=1;
13326   HAVE_LOG10F=1;
13327   HAVE_LOG10L=1;
13328   HAVE_LOG1P=1;
13329   HAVE_LOG1PF=1;
13330   HAVE_LOG1PL=1;
13331   HAVE_LOGBF=1;
13332   HAVE_LOGBL=1;
13333   HAVE_MODFF=1;
13334   HAVE_MODFL=1;
13335   HAVE_POWF=1;
13336   HAVE_REMAINDER=1;
13337   HAVE_REMAINDERF=1;
13338   HAVE_RINT=1;
13339   HAVE_RINTL=1;
13340   HAVE_SINF=1;
13341   HAVE_SINL=1;
13342   HAVE_SINHF=1;
13343   HAVE_SQRTF=1;
13344   HAVE_SQRTL=1;
13345   HAVE_TANF=1;
13346   HAVE_TANL=1;
13347   HAVE_TANHF=1;
13348   HAVE_DECL_ACOSL=1;
13349   HAVE_DECL_ASINL=1;
13350   HAVE_DECL_ATANL=1;
13351   HAVE_DECL_CBRTF=1;
13352   HAVE_DECL_CBRTL=1;
13353   HAVE_DECL_CEILF=1;
13354   HAVE_DECL_CEILL=1;
13355   HAVE_DECL_COPYSIGNF=1;
13356   HAVE_DECL_COSL=1;
13357   HAVE_DECL_EXPL=1;
13358   HAVE_DECL_EXP2=1;
13359   HAVE_DECL_EXP2F=1;
13360   HAVE_DECL_EXP2L=1;
13361   HAVE_DECL_EXPM1L=1;
13362   HAVE_DECL_FLOORF=1;
13363   HAVE_DECL_FLOORL=1;
13364   HAVE_DECL_FREXPL=1;
13365   HAVE_DECL_LDEXPL=1;
13366   HAVE_DECL_LOGL=1;
13367   HAVE_DECL_LOG10L=1;
13368   HAVE_DECL_LOG2=1;
13369   HAVE_DECL_LOG2F=1;
13370   HAVE_DECL_LOG2L=1;
13371   HAVE_DECL_LOGB=1;
13372   HAVE_DECL_REMAINDER=1;
13373   HAVE_DECL_REMAINDERL=1;
13374   HAVE_DECL_RINTF=1;
13375   HAVE_DECL_ROUND=1;
13376   HAVE_DECL_ROUNDF=1;
13377   HAVE_DECL_ROUNDL=1;
13378   HAVE_DECL_SINL=1;
13379   HAVE_DECL_SQRTL=1;
13380   HAVE_DECL_TANL=1;
13381   HAVE_DECL_TRUNC=1;
13382   HAVE_DECL_TRUNCF=1;
13383   HAVE_DECL_TRUNCL=1;
13384   REPLACE_ACOSF=0;
13385   REPLACE_ASINF=0;
13386   REPLACE_ATANF=0;
13387   REPLACE_ATAN2F=0;
13388   REPLACE_CBRTF=0;
13389   REPLACE_CBRTL=0;
13390   REPLACE_CEIL=0;
13391   REPLACE_CEILF=0;
13392   REPLACE_CEILL=0;
13393   REPLACE_COSF=0;
13394   REPLACE_COSHF=0;
13395   REPLACE_EXPF=0;
13396   REPLACE_EXPL=0;
13397   REPLACE_EXPM1=0;
13398   REPLACE_EXPM1F=0;
13399   REPLACE_EXPM1L=0;
13400   REPLACE_EXP2=0;
13401   REPLACE_EXP2L=0;
13402   REPLACE_FABSL=0;
13403   REPLACE_FLOOR=0;
13404   REPLACE_FLOORF=0;
13405   REPLACE_FLOORL=0;
13406   REPLACE_FMA=0;
13407   REPLACE_FMAF=0;
13408   REPLACE_FMAL=0;
13409   REPLACE_FMOD=0;
13410   REPLACE_FMODF=0;
13411   REPLACE_FMODL=0;
13412   REPLACE_FREXPF=0;
13413   REPLACE_FREXP=0;
13414   REPLACE_FREXPL=0;
13415   REPLACE_HUGE_VAL=0;
13416   REPLACE_HYPOT=0;
13417   REPLACE_HYPOTF=0;
13418   REPLACE_HYPOTL=0;
13419   REPLACE_ILOGB=0;
13420   REPLACE_ILOGBF=0;
13421   REPLACE_ILOGBL=0;
13422   REPLACE_ISFINITE=0;
13423   REPLACE_ISINF=0;
13424   REPLACE_ISNAN=0;
13425   REPLACE_LDEXPL=0;
13426   REPLACE_LOG=0;
13427   REPLACE_LOGF=0;
13428   REPLACE_LOGL=0;
13429   REPLACE_LOG10=0;
13430   REPLACE_LOG10F=0;
13431   REPLACE_LOG10L=0;
13432   REPLACE_LOG1P=0;
13433   REPLACE_LOG1PF=0;
13434   REPLACE_LOG1PL=0;
13435   REPLACE_LOG2=0;
13436   REPLACE_LOG2F=0;
13437   REPLACE_LOG2L=0;
13438   REPLACE_LOGB=0;
13439   REPLACE_LOGBF=0;
13440   REPLACE_LOGBL=0;
13441   REPLACE_MODF=0;
13442   REPLACE_MODFF=0;
13443   REPLACE_MODFL=0;
13444   REPLACE_NAN=0;
13445   REPLACE_REMAINDER=0;
13446   REPLACE_REMAINDERF=0;
13447   REPLACE_REMAINDERL=0;
13448   REPLACE_RINTL=0;
13449   REPLACE_ROUND=0;
13450   REPLACE_ROUNDF=0;
13451   REPLACE_ROUNDL=0;
13452   REPLACE_SIGNBIT=0;
13453   REPLACE_SIGNBIT_USING_BUILTINS=0;
13454   REPLACE_SINF=0;
13455   REPLACE_SINHF=0;
13456   REPLACE_SQRTF=0;
13457   REPLACE_SQRTL=0;
13458   REPLACE_TANF=0;
13459   REPLACE_TANHF=0;
13460   REPLACE_TRUNC=0;
13461   REPLACE_TRUNCF=0;
13462   REPLACE_TRUNCL=0;
13463
13464
13465   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
13466 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
13467 if test ${gl_cv_func_frexp_no_libm+y}
13468 then :
13469   printf %s "(cached) " >&6
13470 else $as_nop
13471
13472       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473 /* end confdefs.h.  */
13474 #include <math.h>
13475              double x;
13476 int
13477 main (void)
13478 {
13479 int e; return frexp (x, &e) > 0;
13480   ;
13481   return 0;
13482 }
13483 _ACEOF
13484 if ac_fn_c_try_link "$LINENO"
13485 then :
13486   gl_cv_func_frexp_no_libm=yes
13487 else $as_nop
13488   gl_cv_func_frexp_no_libm=no
13489 fi
13490 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13491     conftest$ac_exeext conftest.$ac_ext
13492
13493 fi
13494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
13495 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
13496
13497 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
13498 if test "x$ac_cv_have_decl_alarm" = xyes
13499 then :
13500   ac_have_decl=1
13501 else $as_nop
13502   ac_have_decl=0
13503 fi
13504 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
13505
13506
13507
13508   GL_M4_GNULIB_ACOSF=0
13509
13510
13511
13512   GL_M4_GNULIB_ACOSL=0
13513
13514
13515
13516   GL_M4_GNULIB_ASINF=0
13517
13518
13519
13520   GL_M4_GNULIB_ASINL=0
13521
13522
13523
13524   GL_M4_GNULIB_ATANF=0
13525
13526
13527
13528   GL_M4_GNULIB_ATANL=0
13529
13530
13531
13532   GL_M4_GNULIB_ATAN2F=0
13533
13534
13535
13536   GL_M4_GNULIB_CBRT=0
13537
13538
13539
13540   GL_M4_GNULIB_CBRTF=0
13541
13542
13543
13544   GL_M4_GNULIB_CBRTL=0
13545
13546
13547
13548   GL_M4_GNULIB_CEIL=0
13549
13550
13551
13552   GL_M4_GNULIB_CEILF=0
13553
13554
13555
13556   GL_M4_GNULIB_CEILL=0
13557
13558
13559
13560   GL_M4_GNULIB_COPYSIGN=0
13561
13562
13563
13564   GL_M4_GNULIB_COPYSIGNF=0
13565
13566
13567
13568   GL_M4_GNULIB_COPYSIGNL=0
13569
13570
13571
13572   GL_M4_GNULIB_COSF=0
13573
13574
13575
13576   GL_M4_GNULIB_COSL=0
13577
13578
13579
13580   GL_M4_GNULIB_COSHF=0
13581
13582
13583
13584   GL_M4_GNULIB_EXPF=0
13585
13586
13587
13588   GL_M4_GNULIB_EXPL=0
13589
13590
13591
13592   GL_M4_GNULIB_EXP2=0
13593
13594
13595
13596   GL_M4_GNULIB_EXP2F=0
13597
13598
13599
13600   GL_M4_GNULIB_EXP2L=0
13601
13602
13603
13604   GL_M4_GNULIB_EXPM1=0
13605
13606
13607
13608   GL_M4_GNULIB_EXPM1F=0
13609
13610
13611
13612   GL_M4_GNULIB_EXPM1L=0
13613
13614
13615
13616   GL_M4_GNULIB_FABSF=0
13617
13618
13619
13620   GL_M4_GNULIB_FABSL=0
13621
13622
13623
13624   GL_M4_GNULIB_FLOOR=0
13625
13626
13627
13628   GL_M4_GNULIB_FLOORF=0
13629
13630
13631
13632   GL_M4_GNULIB_FLOORL=0
13633
13634
13635
13636   GL_M4_GNULIB_FMA=0
13637
13638
13639
13640   GL_M4_GNULIB_FMAF=0
13641
13642
13643
13644   GL_M4_GNULIB_FMAL=0
13645
13646
13647
13648   GL_M4_GNULIB_FMOD=0
13649
13650
13651
13652   GL_M4_GNULIB_FMODF=0
13653
13654
13655
13656   GL_M4_GNULIB_FMODL=0
13657
13658
13659
13660   GL_M4_GNULIB_FREXPF=0
13661
13662
13663
13664   GL_M4_GNULIB_FREXP=0
13665
13666
13667
13668   GL_M4_GNULIB_FREXPL=0
13669
13670
13671
13672   GL_M4_GNULIB_HYPOT=0
13673
13674
13675
13676   GL_M4_GNULIB_HYPOTF=0
13677
13678
13679
13680   GL_M4_GNULIB_HYPOTL=0
13681
13682
13683
13684   GL_M4_GNULIB_ILOGB=0
13685
13686
13687
13688   GL_M4_GNULIB_ILOGBF=0
13689
13690
13691
13692   GL_M4_GNULIB_ILOGBL=0
13693
13694
13695
13696   GL_M4_GNULIB_ISFINITE=0
13697
13698
13699
13700   GL_M4_GNULIB_ISINF=0
13701
13702
13703
13704   GL_M4_GNULIB_ISNAN=0
13705
13706
13707
13708   GL_M4_GNULIB_ISNANF=0
13709
13710
13711
13712   GL_M4_GNULIB_ISNAND=0
13713
13714
13715
13716   GL_M4_GNULIB_ISNANL=0
13717
13718
13719
13720   GL_M4_GNULIB_LDEXPF=0
13721
13722
13723
13724   GL_M4_GNULIB_LDEXPL=0
13725
13726
13727
13728   GL_M4_GNULIB_LOG=0
13729
13730
13731
13732   GL_M4_GNULIB_LOGF=0
13733
13734
13735
13736   GL_M4_GNULIB_LOGL=0
13737
13738
13739
13740   GL_M4_GNULIB_LOG10=0
13741
13742
13743
13744   GL_M4_GNULIB_LOG10F=0
13745
13746
13747
13748   GL_M4_GNULIB_LOG10L=0
13749
13750
13751
13752   GL_M4_GNULIB_LOG1P=0
13753
13754
13755
13756   GL_M4_GNULIB_LOG1PF=0
13757
13758
13759
13760   GL_M4_GNULIB_LOG1PL=0
13761
13762
13763
13764   GL_M4_GNULIB_LOG2=0
13765
13766
13767
13768   GL_M4_GNULIB_LOG2F=0
13769
13770
13771
13772   GL_M4_GNULIB_LOG2L=0
13773
13774
13775
13776   GL_M4_GNULIB_LOGB=0
13777
13778
13779
13780   GL_M4_GNULIB_LOGBF=0
13781
13782
13783
13784   GL_M4_GNULIB_LOGBL=0
13785
13786
13787
13788   GL_M4_GNULIB_MODF=0
13789
13790
13791
13792   GL_M4_GNULIB_MODFF=0
13793
13794
13795
13796   GL_M4_GNULIB_MODFL=0
13797
13798
13799
13800   GL_M4_GNULIB_POWF=0
13801
13802
13803
13804   GL_M4_GNULIB_REMAINDER=0
13805
13806
13807
13808   GL_M4_GNULIB_REMAINDERF=0
13809
13810
13811
13812   GL_M4_GNULIB_REMAINDERL=0
13813
13814
13815
13816   GL_M4_GNULIB_RINT=0
13817
13818
13819
13820   GL_M4_GNULIB_RINTF=0
13821
13822
13823
13824   GL_M4_GNULIB_RINTL=0
13825
13826
13827
13828   GL_M4_GNULIB_ROUND=0
13829
13830
13831
13832   GL_M4_GNULIB_ROUNDF=0
13833
13834
13835
13836   GL_M4_GNULIB_ROUNDL=0
13837
13838
13839
13840   GL_M4_GNULIB_SIGNBIT=0
13841
13842
13843
13844   GL_M4_GNULIB_SINF=0
13845
13846
13847
13848   GL_M4_GNULIB_SINL=0
13849
13850
13851
13852   GL_M4_GNULIB_SINHF=0
13853
13854
13855
13856   GL_M4_GNULIB_SQRTF=0
13857
13858
13859
13860   GL_M4_GNULIB_SQRTL=0
13861
13862
13863
13864   GL_M4_GNULIB_TANF=0
13865
13866
13867
13868   GL_M4_GNULIB_TANL=0
13869
13870
13871
13872   GL_M4_GNULIB_TANHF=0
13873
13874
13875
13876   GL_M4_GNULIB_TRUNC=0
13877
13878
13879
13880   GL_M4_GNULIB_TRUNCF=0
13881
13882
13883
13884   GL_M4_GNULIB_TRUNCL=0
13885
13886
13887
13888   GL_M4_GNULIB_MDA_J0=1
13889
13890
13891
13892   GL_M4_GNULIB_MDA_J1=1
13893
13894
13895
13896   GL_M4_GNULIB_MDA_JN=1
13897
13898
13899
13900   GL_M4_GNULIB_MDA_Y0=1
13901
13902
13903
13904   GL_M4_GNULIB_MDA_Y1=1
13905
13906
13907
13908   GL_M4_GNULIB_MDA_YN=1
13909
13910
13911
13912
13913   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
13914 printf %s "checking whether long double and double are the same... " >&6; }
13915 if test ${gl_cv_long_double_equals_double+y}
13916 then :
13917   printf %s "(cached) " >&6
13918 else $as_nop
13919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920 /* end confdefs.h.  */
13921 #include <float.h>
13922 int
13923 main (void)
13924 {
13925 typedef int check[sizeof (long double) == sizeof (double)
13926                               && LDBL_MANT_DIG == DBL_MANT_DIG
13927                               && LDBL_MAX_EXP == DBL_MAX_EXP
13928                               && LDBL_MIN_EXP == DBL_MIN_EXP
13929                               ? 1 : -1];
13930
13931   ;
13932   return 0;
13933 }
13934 _ACEOF
13935 if ac_fn_c_try_compile "$LINENO"
13936 then :
13937   gl_cv_long_double_equals_double=yes
13938 else $as_nop
13939   gl_cv_long_double_equals_double=no
13940 fi
13941 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13942
13943 fi
13944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
13945 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
13946   if test $gl_cv_long_double_equals_double = yes; then
13947
13948 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
13949
13950     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
13951   else
13952     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
13953   fi
13954
13955
13956
13957     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
13958 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
13959 if test ${gl_cv_var_stdin_large_offset+y}
13960 then :
13961   printf %s "(cached) " >&6
13962 else $as_nop
13963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964 /* end confdefs.h.  */
13965 #include <stdio.h>
13966 int
13967 main (void)
13968 {
13969 #if defined __SL64 && defined __SCLE /* cygwin */
13970   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
13971      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
13972      it is easier to do a version check than building a runtime test.  */
13973 # include <cygwin/version.h>
13974 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
13975   choke me
13976 # endif
13977 #endif
13978   ;
13979   return 0;
13980 }
13981 _ACEOF
13982 if ac_fn_c_try_link "$LINENO"
13983 then :
13984   gl_cv_var_stdin_large_offset=yes
13985 else $as_nop
13986   gl_cv_var_stdin_large_offset=no
13987 fi
13988 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13989     conftest$ac_exeext conftest.$ac_ext
13990 fi
13991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
13992 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
13993
13994
13995
13996
13997
13998   case "$host_os" in
13999     mingw*)
14000                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
14001 printf %s "checking for 64-bit off_t... " >&6; }
14002 if test ${gl_cv_type_off_t_64+y}
14003 then :
14004   printf %s "(cached) " >&6
14005 else $as_nop
14006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14007 /* end confdefs.h.  */
14008 #include <sys/types.h>
14009                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
14010
14011 int
14012 main (void)
14013 {
14014
14015   ;
14016   return 0;
14017 }
14018 _ACEOF
14019 if ac_fn_c_try_compile "$LINENO"
14020 then :
14021   gl_cv_type_off_t_64=yes
14022 else $as_nop
14023   gl_cv_type_off_t_64=no
14024 fi
14025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14026
14027 fi
14028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
14029 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
14030       if test $gl_cv_type_off_t_64 = no; then
14031         WINDOWS_64_BIT_OFF_T=1
14032       else
14033         WINDOWS_64_BIT_OFF_T=0
14034       fi
14035                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
14036 printf %s "checking for 64-bit st_size... " >&6; }
14037 if test ${gl_cv_member_st_size_64+y}
14038 then :
14039   printf %s "(cached) " >&6
14040 else $as_nop
14041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h.  */
14043 #include <sys/types.h>
14044                 struct stat buf;
14045                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
14046
14047 int
14048 main (void)
14049 {
14050
14051   ;
14052   return 0;
14053 }
14054 _ACEOF
14055 if ac_fn_c_try_compile "$LINENO"
14056 then :
14057   gl_cv_member_st_size_64=yes
14058 else $as_nop
14059   gl_cv_member_st_size_64=no
14060 fi
14061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14062
14063 fi
14064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
14065 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
14066       if test $gl_cv_member_st_size_64 = no; then
14067         WINDOWS_64_BIT_ST_SIZE=1
14068       else
14069         WINDOWS_64_BIT_ST_SIZE=0
14070       fi
14071       ;;
14072     *)
14073                                                       WINDOWS_64_BIT_OFF_T=0
14074       WINDOWS_64_BIT_ST_SIZE=0
14075       ;;
14076   esac
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099      if test $gl_cv_have_include_next = yes; then
14100        gl_cv_next_sys_types_h='<'sys/types.h'>'
14101      else
14102        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14103 printf %s "checking absolute name of <sys/types.h>... " >&6; }
14104 if test ${gl_cv_next_sys_types_h+y}
14105 then :
14106   printf %s "(cached) " >&6
14107 else $as_nop
14108
14109
14110
14111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112 /* end confdefs.h.  */
14113 #include <sys/types.h>
14114 _ACEOF
14115                 case "$host_os" in
14116     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14117     *)    gl_absname_cpp="$ac_cpp" ;;
14118   esac
14119
14120   case "$host_os" in
14121     mingw*)
14122                                           gl_dirsep_regex='[/\\]'
14123       ;;
14124     *)
14125       gl_dirsep_regex='\/'
14126       ;;
14127   esac
14128       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14129   gl_header_literal_regex=`echo 'sys/types.h' \
14130                            | sed -e "$gl_make_literal_regex_sed"`
14131   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14132       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14133       s|^/[^/]|//&|
14134       p
14135       q
14136     }'
14137
14138         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14139   sed -n "$gl_absolute_header_sed"`
14140
14141            gl_header=$gl_cv_absolute_sys_types_h
14142            gl_cv_next_sys_types_h='"'$gl_header'"'
14143
14144
14145 fi
14146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14147 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
14148      fi
14149      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14150
14151      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14152        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14153        gl_next_as_first_directive='<'sys/types.h'>'
14154      else
14155        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14156        gl_next_as_first_directive=$gl_cv_next_sys_types_h
14157      fi
14158      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171     WINDOWS_STAT_INODES=0
14172
14173
14174
14175 ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14176 if test "x$ac_cv_have_decl_fseeko" = xyes
14177 then :
14178   ac_have_decl=1
14179 else $as_nop
14180   ac_have_decl=0
14181 fi
14182 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
14193 printf %s "checking for fseeko... " >&6; }
14194 if test ${gl_cv_func_fseeko+y}
14195 then :
14196   printf %s "(cached) " >&6
14197 else $as_nop
14198
14199       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14200 /* end confdefs.h.  */
14201 #include <stdio.h>
14202
14203 int
14204 main (void)
14205 {
14206 fseeko (stdin, 0, 0);
14207   ;
14208   return 0;
14209 }
14210 _ACEOF
14211 if ac_fn_c_try_link "$LINENO"
14212 then :
14213   gl_cv_func_fseeko=yes
14214 else $as_nop
14215   gl_cv_func_fseeko=no
14216 fi
14217 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14218     conftest$ac_exeext conftest.$ac_ext
14219
14220 fi
14221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
14222 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
14223
14224
14225   if test $ac_cv_have_decl_fseeko = no; then
14226     HAVE_DECL_FSEEKO=0
14227   fi
14228
14229   if test $gl_cv_func_fseeko = no; then
14230     HAVE_FSEEKO=0
14231   else
14232     if test $WINDOWS_64_BIT_OFF_T = 1; then
14233       REPLACE_FSEEKO=1
14234     fi
14235     if test $gl_cv_var_stdin_large_offset = no; then
14236       REPLACE_FSEEKO=1
14237     fi
14238
14239
14240
14241   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
14242 printf %s "checking whether fflush works on input streams... " >&6; }
14243 if test ${gl_cv_func_fflush_stdin+y}
14244 then :
14245   printf %s "(cached) " >&6
14246 else $as_nop
14247   echo hello world > conftest.txt
14248      if test "$cross_compiling" = yes
14249 then :
14250   case "$host_os" in
14251                   # Guess no on native Windows.
14252           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
14253           *)      gl_cv_func_fflush_stdin=cross ;;
14254         esac
14255
14256 else $as_nop
14257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14258 /* end confdefs.h.  */
14259
14260 #include <stdio.h>
14261 #if HAVE_UNISTD_H
14262 # include <unistd.h>
14263 #else /* on Windows with MSVC */
14264 # include <io.h>
14265 #endif
14266
14267
14268 $gl_mda_defines
14269
14270 int
14271 main (void)
14272 {
14273 FILE *f = fopen ("conftest.txt", "r");
14274          char buffer[10];
14275          int fd;
14276          int c;
14277          if (f == NULL)
14278            return 1;
14279          fd = fileno (f);
14280          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
14281            { fclose (f); return 2; }
14282          /* For deterministic results, ensure f read a bigger buffer.  */
14283          if (lseek (fd, 0, SEEK_CUR) == 5)
14284            { fclose (f); return 3; }
14285          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
14286             on BSD systems and on mingw.  */
14287          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
14288            { fclose (f); return 4; }
14289          if (lseek (fd, 0, SEEK_CUR) != 5)
14290            { fclose (f); return 5; }
14291          /* Verify behaviour of fflush after ungetc. See
14292             <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
14293          /* Verify behaviour of fflush after a backup ungetc.  This fails on
14294             mingw.  */
14295          c = fgetc (f);
14296          ungetc (c, f);
14297          fflush (f);
14298          if (fgetc (f) != c)
14299            { fclose (f); return 6; }
14300          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
14301             on glibc 2.8 and on BSD systems.  */
14302          c = fgetc (f);
14303          ungetc ('@', f);
14304          fflush (f);
14305          if (fgetc (f) != c)
14306            { fclose (f); return 7; }
14307          fclose (f);
14308          return 0;
14309
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 if ac_fn_c_try_run "$LINENO"
14315 then :
14316   gl_cv_func_fflush_stdin=yes
14317 else $as_nop
14318   gl_cv_func_fflush_stdin=no
14319 fi
14320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14321   conftest.$ac_objext conftest.beam conftest.$ac_ext
14322 fi
14323
14324      rm conftest.txt
14325
14326 fi
14327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
14328 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
14329   case "$gl_cv_func_fflush_stdin" in
14330     *yes) gl_func_fflush_stdin=1 ;;
14331     *no)  gl_func_fflush_stdin=0 ;;
14332     *)    gl_func_fflush_stdin='(-1)' ;;
14333   esac
14334
14335 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
14336
14337
14338       case "$gl_cv_func_fflush_stdin" in
14339         *yes) ;;
14340         *) REPLACE_FSEEKO=1 ;;
14341       esac
14342
14343   fi
14344
14345
14346     HAVE_FCHMODAT=1;
14347   HAVE_FSTATAT=1;
14348   HAVE_FUTIMENS=1;
14349   HAVE_GETUMASK=1;
14350   HAVE_LCHMOD=1;
14351   HAVE_LSTAT=1;
14352   HAVE_MKDIRAT=1;
14353   HAVE_MKFIFO=1;
14354   HAVE_MKFIFOAT=1;
14355   HAVE_MKNOD=1;
14356   HAVE_MKNODAT=1;
14357   HAVE_UTIMENSAT=1;
14358   REPLACE_FCHMODAT=0;
14359   REPLACE_FSTAT=0;
14360   REPLACE_FSTATAT=0;
14361   REPLACE_FUTIMENS=0;
14362   REPLACE_LSTAT=0;
14363   REPLACE_MKDIR=0;
14364   REPLACE_MKFIFO=0;
14365   REPLACE_MKFIFOAT=0;
14366   REPLACE_MKNOD=0;
14367   REPLACE_MKNODAT=0;
14368   REPLACE_STAT=0;
14369   REPLACE_UTIMENSAT=0;
14370
14371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
14372 printf %s "checking whether stat file-mode macros are broken... " >&6; }
14373 if test ${ac_cv_header_stat_broken+y}
14374 then :
14375   printf %s "(cached) " >&6
14376 else $as_nop
14377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378 /* end confdefs.h.  */
14379 #include <sys/types.h>
14380 #include <sys/stat.h>
14381
14382 #if defined S_ISBLK && defined S_IFDIR
14383 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14384 #endif
14385
14386 #if defined S_ISBLK && defined S_IFCHR
14387 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14388 #endif
14389
14390 #if defined S_ISLNK && defined S_IFREG
14391 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14392 #endif
14393
14394 #if defined S_ISSOCK && defined S_IFREG
14395 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14396 #endif
14397
14398 _ACEOF
14399 if ac_fn_c_try_compile "$LINENO"
14400 then :
14401   ac_cv_header_stat_broken=no
14402 else $as_nop
14403   ac_cv_header_stat_broken=yes
14404 fi
14405 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14406 fi
14407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14408 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
14409 if test $ac_cv_header_stat_broken = yes; then
14410
14411 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
14412
14413 fi
14414
14415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14416 printf %s "checking for C/C++ restrict keyword... " >&6; }
14417 if test ${ac_cv_c_restrict+y}
14418 then :
14419   printf %s "(cached) " >&6
14420 else $as_nop
14421   ac_cv_c_restrict=no
14422    # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
14423    # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
14424    # Put 'restrict' last, because C++ lacks it.
14425    for ac_kw in __restrict__ __restrict _Restrict restrict; do
14426      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427 /* end confdefs.h.  */
14428 typedef int *int_ptr;
14429            int foo (int_ptr $ac_kw ip) { return ip[0]; }
14430            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
14431            int bar (int ip[$ac_kw]) { return ip[0]; }
14432
14433 int
14434 main (void)
14435 {
14436 int s[1];
14437            int *$ac_kw t = s;
14438            t[0] = 0;
14439            return foo (t) + bar (t);
14440
14441   ;
14442   return 0;
14443 }
14444 _ACEOF
14445 if ac_fn_c_try_compile "$LINENO"
14446 then :
14447   ac_cv_c_restrict=$ac_kw
14448 fi
14449 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14450      test "$ac_cv_c_restrict" != no && break
14451    done
14452
14453 fi
14454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14455 printf "%s\n" "$ac_cv_c_restrict" >&6; }
14456
14457  case $ac_cv_c_restrict in
14458    restrict) ;;
14459    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
14460  ;;
14461    *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
14462  ;;
14463  esac
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479      if test $gl_cv_have_include_next = yes; then
14480        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14481      else
14482        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
14483 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
14484 if test ${gl_cv_next_sys_stat_h+y}
14485 then :
14486   printf %s "(cached) " >&6
14487 else $as_nop
14488
14489              if test $ac_cv_header_sys_stat_h = yes; then
14490
14491
14492
14493
14494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h.  */
14496 #include <sys/stat.h>
14497 _ACEOF
14498                 case "$host_os" in
14499     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14500     *)    gl_absname_cpp="$ac_cpp" ;;
14501   esac
14502
14503   case "$host_os" in
14504     mingw*)
14505                                           gl_dirsep_regex='[/\\]'
14506       ;;
14507     *)
14508       gl_dirsep_regex='\/'
14509       ;;
14510   esac
14511       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14512   gl_header_literal_regex=`echo 'sys/stat.h' \
14513                            | sed -e "$gl_make_literal_regex_sed"`
14514   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14515       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14516       s|^/[^/]|//&|
14517       p
14518       q
14519     }'
14520
14521         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14522   sed -n "$gl_absolute_header_sed"`
14523
14524            gl_header=$gl_cv_absolute_sys_stat_h
14525            gl_cv_next_sys_stat_h='"'$gl_header'"'
14526           else
14527                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14528              fi
14529
14530
14531 fi
14532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
14533 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
14534      fi
14535      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
14536
14537      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14538        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14539        gl_next_as_first_directive='<'sys/stat.h'>'
14540      else
14541        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14542        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
14543      fi
14544      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
14545
14546
14547
14548
14549
14550
14551
14552
14553     WINDOWS_STAT_TIMESPEC=0
14554
14555
14556
14557
14558
14559
14560
14561
14562       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
14563      #include <sys/stat.h>
14564 "
14565 if test "x$ac_cv_type_nlink_t" = xyes
14566 then :
14567
14568 else $as_nop
14569
14570 printf "%s\n" "#define nlink_t int" >>confdefs.h
14571
14572 fi
14573
14574
14575
14576
14577
14578
14579
14580
14581   case "$host_os" in
14582     mingw*)
14583       ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
14584 if test "x$ac_cv_header_sdkddkver_h" = xyes
14585 then :
14586   printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
14587
14588 fi
14589
14590       ;;
14591   esac
14592
14593
14594
14595
14596
14597
14598
14599   GL_M4_GNULIB_FCHMODAT=0
14600
14601
14602
14603   GL_M4_GNULIB_FSTAT=0
14604
14605
14606
14607   GL_M4_GNULIB_FSTATAT=0
14608
14609
14610
14611   GL_M4_GNULIB_FUTIMENS=0
14612
14613
14614
14615   GL_M4_GNULIB_GETUMASK=0
14616
14617
14618
14619   GL_M4_GNULIB_LCHMOD=0
14620
14621
14622
14623   GL_M4_GNULIB_LSTAT=0
14624
14625
14626
14627   GL_M4_GNULIB_MKDIR=0
14628
14629
14630
14631   GL_M4_GNULIB_MKDIRAT=0
14632
14633
14634
14635   GL_M4_GNULIB_MKFIFO=0
14636
14637
14638
14639   GL_M4_GNULIB_MKFIFOAT=0
14640
14641
14642
14643   GL_M4_GNULIB_MKNOD=0
14644
14645
14646
14647   GL_M4_GNULIB_MKNODAT=0
14648
14649
14650
14651   GL_M4_GNULIB_STAT=0
14652
14653
14654
14655   GL_M4_GNULIB_UTIMENSAT=0
14656
14657
14658
14659   GL_M4_GNULIB_OVERRIDES_STRUCT_STAT=0
14660
14661
14662
14663   GL_M4_GNULIB_MDA_CHMOD=1
14664
14665
14666
14667   GL_M4_GNULIB_MDA_MKDIR=1
14668
14669
14670
14671   GL_M4_GNULIB_MDA_UMASK=1
14672
14673
14674
14675
14676 ac_fn_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14677 if test "x$ac_cv_have_decl_ftello" = xyes
14678 then :
14679   ac_have_decl=1
14680 else $as_nop
14681   ac_have_decl=0
14682 fi
14683 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
14684
14685
14686
14687
14688   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
14689 printf %s "checking whether ungetc works on arbitrary bytes... " >&6; }
14690 if test ${gl_cv_func_ungetc_works+y}
14691 then :
14692   printf %s "(cached) " >&6
14693 else $as_nop
14694   if test "$cross_compiling" = yes
14695 then :
14696   case "$host_os" in
14697                           # Guess yes on glibc systems.
14698            *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
14699                           # Guess yes on musl systems.
14700            *-musl*)       gl_cv_func_ungetc_works="guessing yes" ;;
14701                           # Guess yes on bionic systems.
14702            *-android*)    gl_cv_func_ungetc_works="guessing yes" ;;
14703                           # Guess yes on native Windows.
14704            mingw*)        gl_cv_func_ungetc_works="guessing yes" ;;
14705                           # If we don't know, obey --enable-cross-guesses.
14706            *)             gl_cv_func_ungetc_works="$gl_cross_guess_normal" ;;
14707          esac
14708
14709 else $as_nop
14710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h.  */
14712
14713 #include <stdio.h>
14714
14715 int
14716 main (void)
14717 {
14718 FILE *f;
14719             if (!(f = fopen ("conftest.tmp", "w+")))
14720               return 1;
14721             if (fputs ("abc", f) < 0)
14722               { fclose (f); return 2; }
14723             rewind (f);
14724             if (fgetc (f) != 'a')
14725               { fclose (f); return 3; }
14726             if (fgetc (f) != 'b')
14727               { fclose (f); return 4; }
14728             if (ungetc ('d', f) != 'd')
14729               { fclose (f); return 5; }
14730             if (ftell (f) != 1)
14731               { fclose (f); return 6; }
14732             if (fgetc (f) != 'd')
14733               { fclose (f); return 7; }
14734             if (ftell (f) != 2)
14735               { fclose (f); return 8; }
14736             if (fseek (f, 0, SEEK_CUR) != 0)
14737               { fclose (f); return 9; }
14738             if (ftell (f) != 2)
14739               { fclose (f); return 10; }
14740             if (fgetc (f) != 'c')
14741               { fclose (f); return 11; }
14742             fclose (f);
14743             remove ("conftest.tmp");
14744
14745   ;
14746   return 0;
14747 }
14748 _ACEOF
14749 if ac_fn_c_try_run "$LINENO"
14750 then :
14751   gl_cv_func_ungetc_works=yes
14752 else $as_nop
14753   gl_cv_func_ungetc_works=no
14754 fi
14755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756   conftest.$ac_objext conftest.beam conftest.$ac_ext
14757 fi
14758
14759
14760 fi
14761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
14762 printf "%s\n" "$gl_cv_func_ungetc_works" >&6; }
14763   gl_ftello_broken_after_ungetc=no
14764   case "$gl_cv_func_ungetc_works" in
14765     *yes) ;;
14766     *)
14767                   case "$host_os" in
14768         darwin*) gl_ftello_broken_after_ungetc=yes ;;
14769         *)
14770
14771 printf "%s\n" "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
14772
14773           ;;
14774       esac
14775       ;;
14776   esac
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787   if test $ac_cv_have_decl_ftello = no; then
14788     HAVE_DECL_FTELLO=0
14789   fi
14790
14791   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
14792 printf %s "checking for ftello... " >&6; }
14793 if test ${gl_cv_func_ftello+y}
14794 then :
14795   printf %s "(cached) " >&6
14796 else $as_nop
14797
14798       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14799 /* end confdefs.h.  */
14800 #include <stdio.h>
14801 int
14802 main (void)
14803 {
14804 ftello (stdin);
14805   ;
14806   return 0;
14807 }
14808 _ACEOF
14809 if ac_fn_c_try_link "$LINENO"
14810 then :
14811   gl_cv_func_ftello=yes
14812 else $as_nop
14813   gl_cv_func_ftello=no
14814 fi
14815 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14816     conftest$ac_exeext conftest.$ac_ext
14817
14818 fi
14819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
14820 printf "%s\n" "$gl_cv_func_ftello" >&6; }
14821   if test $gl_cv_func_ftello = no; then
14822     HAVE_FTELLO=0
14823   else
14824     if test $WINDOWS_64_BIT_OFF_T = 1; then
14825       REPLACE_FTELLO=1
14826     fi
14827     if test $gl_cv_var_stdin_large_offset = no; then
14828       REPLACE_FTELLO=1
14829     fi
14830     if test $REPLACE_FTELLO = 0; then
14831
14832       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
14833 printf %s "checking whether ftello works... " >&6; }
14834 if test ${gl_cv_func_ftello_works+y}
14835 then :
14836   printf %s "(cached) " >&6
14837 else $as_nop
14838
14839                               case "$host_os" in
14840                       # Guess no on Solaris.
14841             solaris*) gl_cv_func_ftello_works="guessing no" ;;
14842                       # Guess yes on native Windows.
14843             mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
14844                       # Guess yes otherwise.
14845             *)        gl_cv_func_ftello_works="guessing yes" ;;
14846           esac
14847           if test "$cross_compiling" = yes
14848 then :
14849   :
14850 else $as_nop
14851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852 /* end confdefs.h.  */
14853
14854 #include <stdio.h>
14855 #include <stdlib.h>
14856 #include <string.h>
14857 #define TESTFILE "conftest.tmp"
14858 int
14859 main (void)
14860 {
14861   FILE *fp;
14862
14863   /* Create a file with some contents.  */
14864   fp = fopen (TESTFILE, "w");
14865   if (fp == NULL)
14866     return 70;
14867   if (fwrite ("foogarsh", 1, 8, fp) < 8)
14868     { fclose (fp); return 71; }
14869   if (fclose (fp))
14870     return 72;
14871
14872   /* The file's contents is now "foogarsh".  */
14873
14874   /* Try writing after reading to EOF.  */
14875   fp = fopen (TESTFILE, "r+");
14876   if (fp == NULL)
14877     return 73;
14878   if (fseek (fp, -1, SEEK_END))
14879     { fclose (fp); return 74; }
14880   if (!(getc (fp) == 'h'))
14881     { fclose (fp); return 1; }
14882   if (!(getc (fp) == EOF))
14883     { fclose (fp); return 2; }
14884   if (!(ftell (fp) == 8))
14885     { fclose (fp); return 3; }
14886   if (!(ftell (fp) == 8))
14887     { fclose (fp); return 4; }
14888   if (!(putc ('!', fp) == '!'))
14889     { fclose (fp); return 5; }
14890   if (!(ftell (fp) == 9))
14891     { fclose (fp); return 6; }
14892   if (!(fclose (fp) == 0))
14893     return 7;
14894   fp = fopen (TESTFILE, "r");
14895   if (fp == NULL)
14896     return 75;
14897   {
14898     char buf[10];
14899     if (!(fread (buf, 1, 10, fp) == 9))
14900       { fclose (fp); return 10; }
14901     if (!(memcmp (buf, "foogarsh!", 9) == 0))
14902       { fclose (fp); return 11; }
14903   }
14904   if (!(fclose (fp) == 0))
14905     return 12;
14906
14907   /* The file's contents is now "foogarsh!".  */
14908
14909   return 0;
14910 }
14911 _ACEOF
14912 if ac_fn_c_try_run "$LINENO"
14913 then :
14914   gl_cv_func_ftello_works=yes
14915 else $as_nop
14916   gl_cv_func_ftello_works=no
14917 fi
14918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14919   conftest.$ac_objext conftest.beam conftest.$ac_ext
14920 fi
14921
14922
14923 fi
14924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
14925 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
14926       case "$gl_cv_func_ftello_works" in
14927         *yes) ;;
14928         *)
14929           REPLACE_FTELLO=1
14930
14931 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
14932
14933           ;;
14934       esac
14935     fi
14936     if test $REPLACE_FTELLO = 0; then
14937
14938       if test $gl_ftello_broken_after_ungetc = yes; then
14939         REPLACE_FTELLO=1
14940
14941 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
14942
14943       fi
14944     fi
14945   fi
14946
14947
14948
14949    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
14950 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
14951 if test ${gl_cv_func_getcwd_null+y}
14952 then :
14953   printf %s "(cached) " >&6
14954 else $as_nop
14955   if test "$cross_compiling" = yes
14956 then :
14957   case "$host_os" in
14958                            # Guess yes on glibc systems.
14959             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
14960                            # Guess yes on musl systems.
14961             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
14962                            # Guess yes on Cygwin.
14963             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
14964                            # If we don't know, obey --enable-cross-guesses.
14965             *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
14966           esac
14967
14968 else $as_nop
14969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970 /* end confdefs.h.  */
14971
14972 #        include <stdlib.h>
14973 #        if HAVE_UNISTD_H
14974 #         include <unistd.h>
14975 #        else /* on Windows with MSVC */
14976 #         include <direct.h>
14977 #        endif
14978
14979
14980 $gl_mda_defines
14981
14982 #        ifndef getcwd
14983          char *getcwd ();
14984 #        endif
14985
14986 int
14987 main (void)
14988 {
14989
14990 #if defined _WIN32 && ! defined __CYGWIN__
14991 /* mingw cwd does not start with '/', but _getcwd does allocate.
14992    However, mingw fails to honor non-zero size.  */
14993 #else
14994            if (chdir ("/") != 0)
14995              return 1;
14996            else
14997              {
14998                char *f = getcwd (NULL, 0);
14999                if (! f)
15000                  return 2;
15001                if (f[0] != '/')
15002                  { free (f); return 3; }
15003                if (f[1] != '\0')
15004                  { free (f); return 4; }
15005                free (f);
15006                return 0;
15007              }
15008 #endif
15009
15010   ;
15011   return 0;
15012 }
15013 _ACEOF
15014 if ac_fn_c_try_run "$LINENO"
15015 then :
15016   gl_cv_func_getcwd_null=yes
15017 else $as_nop
15018   gl_cv_func_getcwd_null=no
15019 fi
15020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15021   conftest.$ac_objext conftest.beam conftest.$ac_ext
15022 fi
15023
15024 fi
15025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
15026 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
15027
15028
15029   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
15030 printf %s "checking for getcwd with POSIX signature... " >&6; }
15031 if test ${gl_cv_func_getcwd_posix_signature+y}
15032 then :
15033   printf %s "(cached) " >&6
15034 else $as_nop
15035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h.  */
15037 #include <unistd.h>
15038
15039
15040 $gl_mda_defines
15041
15042 int
15043 main (void)
15044 {
15045 extern
15046            #ifdef __cplusplus
15047            "C"
15048            #endif
15049            char *getcwd (char *, size_t);
15050
15051   ;
15052   return 0;
15053 }
15054
15055 _ACEOF
15056 if ac_fn_c_try_compile "$LINENO"
15057 then :
15058   gl_cv_func_getcwd_posix_signature=yes
15059 else $as_nop
15060   gl_cv_func_getcwd_posix_signature=no
15061 fi
15062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15063
15064 fi
15065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
15066 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
15067
15068 ac_fn_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15069 if test "x$ac_cv_have_decl_getcwd" = xyes
15070 then :
15071   ac_have_decl=1
15072 else $as_nop
15073   ac_have_decl=0
15074 fi
15075 printf "%s\n" "#define HAVE_DECL_GETCWD $ac_have_decl" >>confdefs.h
15076
15077
15078 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15079 if test "x$ac_cv_have_decl_getdtablesize" = xyes
15080 then :
15081   ac_have_decl=1
15082 else $as_nop
15083   ac_have_decl=0
15084 fi
15085 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101      if test $gl_cv_have_include_next = yes; then
15102        gl_cv_next_getopt_h='<'getopt.h'>'
15103      else
15104        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
15105 printf %s "checking absolute name of <getopt.h>... " >&6; }
15106 if test ${gl_cv_next_getopt_h+y}
15107 then :
15108   printf %s "(cached) " >&6
15109 else $as_nop
15110
15111              if test $ac_cv_header_getopt_h = yes; then
15112
15113
15114
15115
15116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h.  */
15118 #include <getopt.h>
15119 _ACEOF
15120                 case "$host_os" in
15121     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15122     *)    gl_absname_cpp="$ac_cpp" ;;
15123   esac
15124
15125   case "$host_os" in
15126     mingw*)
15127                                           gl_dirsep_regex='[/\\]'
15128       ;;
15129     *)
15130       gl_dirsep_regex='\/'
15131       ;;
15132   esac
15133       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15134   gl_header_literal_regex=`echo 'getopt.h' \
15135                            | sed -e "$gl_make_literal_regex_sed"`
15136   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15137       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15138       s|^/[^/]|//&|
15139       p
15140       q
15141     }'
15142
15143         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15144   sed -n "$gl_absolute_header_sed"`
15145
15146            gl_header=$gl_cv_absolute_getopt_h
15147            gl_cv_next_getopt_h='"'$gl_header'"'
15148           else
15149                gl_cv_next_getopt_h='<'getopt.h'>'
15150              fi
15151
15152
15153 fi
15154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
15155 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
15156      fi
15157      NEXT_GETOPT_H=$gl_cv_next_getopt_h
15158
15159      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15160        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15161        gl_next_as_first_directive='<'getopt.h'>'
15162      else
15163        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15164        gl_next_as_first_directive=$gl_cv_next_getopt_h
15165      fi
15166      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
15167
15168
15169
15170
15171   if test $ac_cv_header_getopt_h = yes; then
15172     HAVE_GETOPT_H=1
15173   else
15174     HAVE_GETOPT_H=0
15175   fi
15176
15177
15178   gl_replace_getopt=
15179
15180     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15181            for ac_header in getopt.h
15182 do :
15183   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
15184 if test "x$ac_cv_header_getopt_h" = xyes
15185 then :
15186   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
15187
15188 else $as_nop
15189   gl_replace_getopt=yes
15190 fi
15191
15192 done
15193   fi
15194
15195     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15196
15197   for ac_func in getopt_long_only
15198 do :
15199   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
15200 if test "x$ac_cv_func_getopt_long_only" = xyes
15201 then :
15202   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
15203
15204 else $as_nop
15205   gl_replace_getopt=yes
15206 fi
15207
15208 done
15209   fi
15210
15211           if test -z "$gl_replace_getopt"; then
15212     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
15213 printf %s "checking whether getopt is POSIX compatible... " >&6; }
15214 if test ${gl_cv_func_getopt_posix+y}
15215 then :
15216   printf %s "(cached) " >&6
15217 else $as_nop
15218
15219                                                 if test $cross_compiling = no; then
15220                               if test "$cross_compiling" = yes
15221 then :
15222   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15223 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15224 as_fn_error $? "cannot run test program while cross compiling
15225 See \`config.log' for more details" "$LINENO" 5; }
15226 else $as_nop
15227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15228 /* end confdefs.h.  */
15229
15230 #include <unistd.h>
15231 #include <stdlib.h>
15232 #include <string.h>
15233
15234 int
15235 main ()
15236 {
15237   static char program[] = "program";
15238   static char a[] = "-a";
15239   static char foo[] = "foo";
15240   static char bar[] = "bar";
15241   char *argv[] = { program, a, foo, bar, NULL };
15242   int c;
15243
15244   c = getopt (4, argv, "ab");
15245   if (!(c == 'a'))
15246     return 1;
15247   c = getopt (4, argv, "ab");
15248   if (!(c == -1))
15249     return 2;
15250   if (!(optind == 2))
15251     return 3;
15252   return 0;
15253 }
15254
15255 _ACEOF
15256 if ac_fn_c_try_run "$LINENO"
15257 then :
15258   gl_cv_func_getopt_posix=maybe
15259 else $as_nop
15260   gl_cv_func_getopt_posix=no
15261 fi
15262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15263   conftest.$ac_objext conftest.beam conftest.$ac_ext
15264 fi
15265
15266           if test $gl_cv_func_getopt_posix = maybe; then
15267                                     if test "$cross_compiling" = yes
15268 then :
15269   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15270 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15271 as_fn_error $? "cannot run test program while cross compiling
15272 See \`config.log' for more details" "$LINENO" 5; }
15273 else $as_nop
15274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h.  */
15276
15277 #include <unistd.h>
15278 #include <stdlib.h>
15279 #include <string.h>
15280
15281 int
15282 main ()
15283 {
15284   static char program[] = "program";
15285   static char donald[] = "donald";
15286   static char p[] = "-p";
15287   static char billy[] = "billy";
15288   static char duck[] = "duck";
15289   static char a[] = "-a";
15290   static char bar[] = "bar";
15291   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
15292   int c;
15293
15294   c = getopt (7, argv, "+abp:q:");
15295   if (!(c == -1))
15296     return 4;
15297   if (!(strcmp (argv[0], "program") == 0))
15298     return 5;
15299   if (!(strcmp (argv[1], "donald") == 0))
15300     return 6;
15301   if (!(strcmp (argv[2], "-p") == 0))
15302     return 7;
15303   if (!(strcmp (argv[3], "billy") == 0))
15304     return 8;
15305   if (!(strcmp (argv[4], "duck") == 0))
15306     return 9;
15307   if (!(strcmp (argv[5], "-a") == 0))
15308     return 10;
15309   if (!(strcmp (argv[6], "bar") == 0))
15310     return 11;
15311   if (!(optind == 1))
15312     return 12;
15313   return 0;
15314 }
15315
15316 _ACEOF
15317 if ac_fn_c_try_run "$LINENO"
15318 then :
15319   gl_cv_func_getopt_posix=maybe
15320 else $as_nop
15321   gl_cv_func_getopt_posix=no
15322 fi
15323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15324   conftest.$ac_objext conftest.beam conftest.$ac_ext
15325 fi
15326
15327           fi
15328           if test $gl_cv_func_getopt_posix = maybe; then
15329                         if test "$cross_compiling" = yes
15330 then :
15331   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15332 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15333 as_fn_error $? "cannot run test program while cross compiling
15334 See \`config.log' for more details" "$LINENO" 5; }
15335 else $as_nop
15336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h.  */
15338
15339 #include <unistd.h>
15340 #include <stdlib.h>
15341 #include <string.h>
15342
15343 int
15344 main ()
15345 {
15346   static char program[] = "program";
15347   static char ab[] = "-ab";
15348   char *argv[3] = { program, ab, NULL };
15349   if (getopt (2, argv, "ab:") != 'a')
15350     return 13;
15351   if (getopt (2, argv, "ab:") != '?')
15352     return 14;
15353   if (optopt != 'b')
15354     return 15;
15355   if (optind != 2)
15356     return 16;
15357   return 0;
15358 }
15359
15360 _ACEOF
15361 if ac_fn_c_try_run "$LINENO"
15362 then :
15363   gl_cv_func_getopt_posix=yes
15364 else $as_nop
15365   gl_cv_func_getopt_posix=no
15366 fi
15367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15368   conftest.$ac_objext conftest.beam conftest.$ac_ext
15369 fi
15370
15371           fi
15372         else
15373           case "$host_os" in
15374             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
15375             *)                       gl_cv_func_getopt_posix="guessing yes";;
15376           esac
15377         fi
15378
15379 fi
15380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
15381 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
15382     case "$gl_cv_func_getopt_posix" in
15383       *no) gl_replace_getopt=yes ;;
15384     esac
15385   fi
15386
15387   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15388     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
15389 printf %s "checking for working GNU getopt function... " >&6; }
15390 if test ${gl_cv_func_getopt_gnu+y}
15391 then :
15392   printf %s "(cached) " >&6
15393 else $as_nop
15394   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
15395        # optstring is necessary for programs like m4 that have POSIX-mandated
15396        # semantics for supporting options interspersed with files.
15397        # Also, since getopt_long is a GNU extension, we require optind=0.
15398        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
15399        # so take care to revert to the correct (non-)export state.
15400        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
15401        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
15402          xx) gl_had_POSIXLY_CORRECT=exported ;;
15403          x)  gl_had_POSIXLY_CORRECT=yes      ;;
15404          *)  gl_had_POSIXLY_CORRECT=         ;;
15405        esac
15406        POSIXLY_CORRECT=1
15407        export POSIXLY_CORRECT
15408        if test "$cross_compiling" = yes
15409 then :
15410                              gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
15411
15412 else $as_nop
15413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h.  */
15415 #include <getopt.h>
15416                            #include <stddef.h>
15417                            #include <string.h>
15418
15419 #include <stdlib.h>
15420 #if defined __MACH__ && defined __APPLE__
15421 /* Avoid a crash on Mac OS X.  */
15422 #include <mach/mach.h>
15423 #include <mach/mach_error.h>
15424 #include <mach/thread_status.h>
15425 #include <mach/exception.h>
15426 #include <mach/task.h>
15427 #include <pthread.h>
15428 /* The exception port on which our thread listens.  */
15429 static mach_port_t our_exception_port;
15430 /* The main function of the thread listening for exceptions of type
15431    EXC_BAD_ACCESS.  */
15432 static void *
15433 mach_exception_thread (void *arg)
15434 {
15435   /* Buffer for a message to be received.  */
15436   struct {
15437     mach_msg_header_t head;
15438     mach_msg_body_t msgh_body;
15439     char data[1024];
15440   } msg;
15441   mach_msg_return_t retval;
15442   /* Wait for a message on the exception port.  */
15443   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15444                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15445   if (retval != MACH_MSG_SUCCESS)
15446     abort ();
15447   exit (1);
15448 }
15449 static void
15450 nocrash_init (void)
15451 {
15452   mach_port_t self = mach_task_self ();
15453   /* Allocate a port on which the thread shall listen for exceptions.  */
15454   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15455       == KERN_SUCCESS) {
15456     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
15457     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15458                                 MACH_MSG_TYPE_MAKE_SEND)
15459         == KERN_SUCCESS) {
15460       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
15461          for us.  */
15462       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15463       /* Create the thread listening on the exception port.  */
15464       pthread_attr_t attr;
15465       pthread_t thread;
15466       if (pthread_attr_init (&attr) == 0
15467           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15468           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15469         pthread_attr_destroy (&attr);
15470         /* Replace the exception port info for these exceptions with our own.
15471            Note that we replace the exception port for the entire task, not only
15472            for a particular thread.  This has the effect that when our exception
15473            port gets the message, the thread specific exception port has already
15474            been asked, and we don't need to bother about it.
15475            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
15476         task_set_exception_ports (self, mask, our_exception_port,
15477                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15478       }
15479     }
15480   }
15481 }
15482 #elif defined _WIN32 && ! defined __CYGWIN__
15483 /* Avoid a crash on native Windows.  */
15484 #define WIN32_LEAN_AND_MEAN
15485 #include <windows.h>
15486 #include <winerror.h>
15487 static LONG WINAPI
15488 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
15489 {
15490   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
15491     {
15492     case EXCEPTION_ACCESS_VIOLATION:
15493     case EXCEPTION_IN_PAGE_ERROR:
15494     case EXCEPTION_STACK_OVERFLOW:
15495     case EXCEPTION_GUARD_PAGE:
15496     case EXCEPTION_PRIV_INSTRUCTION:
15497     case EXCEPTION_ILLEGAL_INSTRUCTION:
15498     case EXCEPTION_DATATYPE_MISALIGNMENT:
15499     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
15500     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
15501       exit (1);
15502     }
15503   return EXCEPTION_CONTINUE_SEARCH;
15504 }
15505 static void
15506 nocrash_init (void)
15507 {
15508   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
15509 }
15510 #else
15511 /* Avoid a crash on POSIX systems.  */
15512 #include <signal.h>
15513 #include <unistd.h>
15514 /* A POSIX signal handler.  */
15515 static void
15516 exception_handler (int sig)
15517 {
15518   _exit (1);
15519 }
15520 static void
15521 nocrash_init (void)
15522 {
15523 #ifdef SIGSEGV
15524   signal (SIGSEGV, exception_handler);
15525 #endif
15526 #ifdef SIGBUS
15527   signal (SIGBUS, exception_handler);
15528 #endif
15529 }
15530 #endif
15531
15532
15533 int
15534 main (void)
15535 {
15536
15537              int result = 0;
15538
15539              nocrash_init();
15540
15541              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
15542                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
15543                 OSF/1 5.1, Solaris 10.  */
15544              {
15545                static char conftest[] = "conftest";
15546                static char plus[] = "-+";
15547                char *argv[3] = { conftest, plus, NULL };
15548                opterr = 0;
15549                if (getopt (2, argv, "+a") != '?')
15550                  result |= 1;
15551              }
15552              /* This code succeeds on glibc 2.8, mingw,
15553                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
15554                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
15555              {
15556                static char program[] = "program";
15557                static char p[] = "-p";
15558                static char foo[] = "foo";
15559                static char bar[] = "bar";
15560                char *argv[] = { program, p, foo, bar, NULL };
15561
15562                optind = 1;
15563                if (getopt (4, argv, "p::") != 'p')
15564                  result |= 2;
15565                else if (optarg != NULL)
15566                  result |= 4;
15567                else if (getopt (4, argv, "p::") != -1)
15568                  result |= 6;
15569                else if (optind != 2)
15570                  result |= 8;
15571              }
15572              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
15573              {
15574                static char program[] = "program";
15575                static char foo[] = "foo";
15576                static char p[] = "-p";
15577                char *argv[] = { program, foo, p, NULL };
15578                optind = 0;
15579                if (getopt (3, argv, "-p") != 1)
15580                  result |= 16;
15581                else if (getopt (3, argv, "-p") != 'p')
15582                  result |= 16;
15583              }
15584              /* This code fails on glibc 2.11.  */
15585              {
15586                static char program[] = "program";
15587                static char b[] = "-b";
15588                static char a[] = "-a";
15589                char *argv[] = { program, b, a, NULL };
15590                optind = opterr = 0;
15591                if (getopt (3, argv, "+:a:b") != 'b')
15592                  result |= 32;
15593                else if (getopt (3, argv, "+:a:b") != ':')
15594                  result |= 32;
15595              }
15596              /* This code dumps core on glibc 2.14.  */
15597              {
15598                static char program[] = "program";
15599                static char w[] = "-W";
15600                static char dummy[] = "dummy";
15601                char *argv[] = { program, w, dummy, NULL };
15602                optind = opterr = 1;
15603                if (getopt (3, argv, "W;") != 'W')
15604                  result |= 64;
15605              }
15606              return result;
15607
15608   ;
15609   return 0;
15610 }
15611 _ACEOF
15612 if ac_fn_c_try_run "$LINENO"
15613 then :
15614   gl_cv_func_getopt_gnu=yes
15615 else $as_nop
15616   gl_cv_func_getopt_gnu=no
15617 fi
15618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15619   conftest.$ac_objext conftest.beam conftest.$ac_ext
15620 fi
15621
15622        case $gl_had_POSIXLY_CORRECT in
15623          exported) ;;
15624          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
15625          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
15626        esac
15627
15628 fi
15629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
15630 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
15631     if test "$gl_cv_func_getopt_gnu" != yes; then
15632       gl_replace_getopt=yes
15633     else
15634       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
15635 printf %s "checking for working GNU getopt_long function... " >&6; }
15636 if test ${gl_cv_func_getopt_long_gnu+y}
15637 then :
15638   printf %s "(cached) " >&6
15639 else $as_nop
15640   if test "$cross_compiling" = yes
15641 then :
15642               case "$host_os" in
15643               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
15644               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
15645             esac
15646
15647 else $as_nop
15648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15649 /* end confdefs.h.  */
15650 #include <getopt.h>
15651                 #include <stddef.h>
15652                 #include <string.h>
15653
15654 int
15655 main (void)
15656 {
15657 static const struct option long_options[] =
15658                   {
15659                     { "xtremely-",no_argument,       NULL, 1003 },
15660                     { "xtra",     no_argument,       NULL, 1001 },
15661                     { "xtreme",   no_argument,       NULL, 1002 },
15662                     { "xtremely", no_argument,       NULL, 1003 },
15663                     { NULL,       0,                 NULL, 0 }
15664                   };
15665                 /* This code fails on OpenBSD 5.0.  */
15666                 {
15667                   static char program[] = "program";
15668                   static char xtremel[] = "--xtremel";
15669                   char *argv[] = { program, xtremel, NULL };
15670                   int option_index;
15671                   optind = 1; opterr = 0;
15672                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
15673                     return 1;
15674                 }
15675                 return 0;
15676
15677   ;
15678   return 0;
15679 }
15680 _ACEOF
15681 if ac_fn_c_try_run "$LINENO"
15682 then :
15683   gl_cv_func_getopt_long_gnu=yes
15684 else $as_nop
15685   gl_cv_func_getopt_long_gnu=no
15686 fi
15687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15688   conftest.$ac_objext conftest.beam conftest.$ac_ext
15689 fi
15690
15691
15692 fi
15693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
15694 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
15695       case "$gl_cv_func_getopt_long_gnu" in
15696         *yes) ;;
15697         *) gl_replace_getopt=yes ;;
15698       esac
15699     fi
15700   fi
15701
15702
15703
15704
15705
15706     HAVE_GETRANDOM=1;
15707   REPLACE_GETRANDOM=0;
15708
15709
15710
15711
15712   GL_M4_GNULIB_GETRANDOM=0
15713
15714
15715
15716
15717
15718
15719
15720   if test -z "$gl_pthreadlib_body_done"; then
15721     gl_pthread_api=no
15722     LIBPTHREAD=
15723     LIBPMULTITHREAD=
15724     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15725     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
15726     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15727 if test "x$ac_cv_header_pthread_h" = xyes
15728 then :
15729   gl_have_pthread_h=yes
15730 else $as_nop
15731   gl_have_pthread_h=no
15732 fi
15733
15734     if test "$gl_have_pthread_h" = yes; then
15735       # Other possible tests:
15736       #   -lpthreads (FSU threads, PCthreads)
15737       #   -lgthreads
15738       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15739       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15740       # the second one only in libpthread, and lock.c needs it.
15741       #
15742       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
15743       # needs -pthread for some reason.  See:
15744       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15745       save_LIBS=$LIBS
15746       for gl_pthread in '' '-pthread'; do
15747         LIBS="$LIBS $gl_pthread"
15748         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749 /* end confdefs.h.  */
15750 #include <pthread.h>
15751                pthread_mutex_t m;
15752                pthread_mutexattr_t ma;
15753
15754 int
15755 main (void)
15756 {
15757 pthread_mutex_lock (&m);
15758                pthread_mutexattr_init (&ma);
15759   ;
15760   return 0;
15761 }
15762 _ACEOF
15763 if ac_fn_c_try_link "$LINENO"
15764 then :
15765   gl_pthread_api=yes
15766            LIBPTHREAD=$gl_pthread
15767            LIBPMULTITHREAD=$gl_pthread
15768 fi
15769 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15770     conftest$ac_exeext conftest.$ac_ext
15771         LIBS=$save_LIBS
15772         test $gl_pthread_api = yes && break
15773       done
15774
15775       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15776       # since it is defined as a macro on OSF/1.)
15777       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15778         # The program links fine without libpthread. But it may actually
15779         # need to link with libpthread in order to create multiple threads.
15780         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15781 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15782 if test ${ac_cv_lib_pthread_pthread_kill+y}
15783 then :
15784   printf %s "(cached) " >&6
15785 else $as_nop
15786   ac_check_lib_save_LIBS=$LIBS
15787 LIBS="-lpthread  $LIBS"
15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789 /* end confdefs.h.  */
15790
15791 /* Override any GCC internal prototype to avoid an error.
15792    Use char because int might match the return type of a GCC
15793    builtin and then its argument prototype would still apply.  */
15794 char pthread_kill ();
15795 int
15796 main (void)
15797 {
15798 return pthread_kill ();
15799   ;
15800   return 0;
15801 }
15802 _ACEOF
15803 if ac_fn_c_try_link "$LINENO"
15804 then :
15805   ac_cv_lib_pthread_pthread_kill=yes
15806 else $as_nop
15807   ac_cv_lib_pthread_pthread_kill=no
15808 fi
15809 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15810     conftest$ac_exeext conftest.$ac_ext
15811 LIBS=$ac_check_lib_save_LIBS
15812 fi
15813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15814 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15815 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15816 then :
15817   LIBPMULTITHREAD=-lpthread
15818            # On Solaris and HP-UX, most pthread functions exist also in libc.
15819            # Therefore pthread_in_use() needs to actually try to create a
15820            # thread: pthread_create from libc will fail, whereas
15821            # pthread_create will actually create a thread.
15822            # On Solaris 10 or newer, this test is no longer needed, because
15823            # libc contains the fully functional pthread functions.
15824            case "$host_os" in
15825              solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15826
15827 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15828
15829            esac
15830
15831 fi
15832
15833       elif test $gl_pthread_api != yes; then
15834         # Some library is needed. Try libpthread and libc_r.
15835         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15836 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15837 if test ${ac_cv_lib_pthread_pthread_kill+y}
15838 then :
15839   printf %s "(cached) " >&6
15840 else $as_nop
15841   ac_check_lib_save_LIBS=$LIBS
15842 LIBS="-lpthread  $LIBS"
15843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844 /* end confdefs.h.  */
15845
15846 /* Override any GCC internal prototype to avoid an error.
15847    Use char because int might match the return type of a GCC
15848    builtin and then its argument prototype would still apply.  */
15849 char pthread_kill ();
15850 int
15851 main (void)
15852 {
15853 return pthread_kill ();
15854   ;
15855   return 0;
15856 }
15857 _ACEOF
15858 if ac_fn_c_try_link "$LINENO"
15859 then :
15860   ac_cv_lib_pthread_pthread_kill=yes
15861 else $as_nop
15862   ac_cv_lib_pthread_pthread_kill=no
15863 fi
15864 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15865     conftest$ac_exeext conftest.$ac_ext
15866 LIBS=$ac_check_lib_save_LIBS
15867 fi
15868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15869 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15870 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15871 then :
15872   gl_pthread_api=yes
15873            LIBPTHREAD=-lpthread
15874            LIBPMULTITHREAD=-lpthread
15875 fi
15876
15877         if test $gl_pthread_api != yes; then
15878           # For FreeBSD 4.
15879           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15880 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15881 if test ${ac_cv_lib_c_r_pthread_kill+y}
15882 then :
15883   printf %s "(cached) " >&6
15884 else $as_nop
15885   ac_check_lib_save_LIBS=$LIBS
15886 LIBS="-lc_r  $LIBS"
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888 /* end confdefs.h.  */
15889
15890 /* Override any GCC internal prototype to avoid an error.
15891    Use char because int might match the return type of a GCC
15892    builtin and then its argument prototype would still apply.  */
15893 char pthread_kill ();
15894 int
15895 main (void)
15896 {
15897 return pthread_kill ();
15898   ;
15899   return 0;
15900 }
15901 _ACEOF
15902 if ac_fn_c_try_link "$LINENO"
15903 then :
15904   ac_cv_lib_c_r_pthread_kill=yes
15905 else $as_nop
15906   ac_cv_lib_c_r_pthread_kill=no
15907 fi
15908 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15909     conftest$ac_exeext conftest.$ac_ext
15910 LIBS=$ac_check_lib_save_LIBS
15911 fi
15912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15913 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15914 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15915 then :
15916   gl_pthread_api=yes
15917              LIBPTHREAD=-lc_r
15918              LIBPMULTITHREAD=-lc_r
15919 fi
15920
15921         fi
15922       fi
15923     fi
15924     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15925 printf %s "checking whether POSIX threads API is available... " >&6; }
15926     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15927 printf "%s\n" "$gl_pthread_api" >&6; }
15928
15929
15930     if test $gl_pthread_api = yes; then
15931
15932 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15933
15934     fi
15935
15936         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15937 /* end confdefs.h.  */
15938 #include <sched.h>
15939 int
15940 main (void)
15941 {
15942 sched_yield ();
15943   ;
15944   return 0;
15945 }
15946 _ACEOF
15947 if ac_fn_c_try_link "$LINENO"
15948 then :
15949   LIB_SCHED_YIELD=
15950
15951 else $as_nop
15952          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15953 printf %s "checking for sched_yield in -lrt... " >&6; }
15954 if test ${ac_cv_lib_rt_sched_yield+y}
15955 then :
15956   printf %s "(cached) " >&6
15957 else $as_nop
15958   ac_check_lib_save_LIBS=$LIBS
15959 LIBS="-lrt  $LIBS"
15960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15961 /* end confdefs.h.  */
15962
15963 /* Override any GCC internal prototype to avoid an error.
15964    Use char because int might match the return type of a GCC
15965    builtin and then its argument prototype would still apply.  */
15966 char sched_yield ();
15967 int
15968 main (void)
15969 {
15970 return sched_yield ();
15971   ;
15972   return 0;
15973 }
15974 _ACEOF
15975 if ac_fn_c_try_link "$LINENO"
15976 then :
15977   ac_cv_lib_rt_sched_yield=yes
15978 else $as_nop
15979   ac_cv_lib_rt_sched_yield=no
15980 fi
15981 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15982     conftest$ac_exeext conftest.$ac_ext
15983 LIBS=$ac_check_lib_save_LIBS
15984 fi
15985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15986 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15987 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15988 then :
15989   LIB_SCHED_YIELD=-lrt
15990 else $as_nop
15991             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15992 printf %s "checking for sched_yield in -lposix4... " >&6; }
15993 if test ${ac_cv_lib_posix4_sched_yield+y}
15994 then :
15995   printf %s "(cached) " >&6
15996 else $as_nop
15997   ac_check_lib_save_LIBS=$LIBS
15998 LIBS="-lposix4  $LIBS"
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h.  */
16001
16002 /* Override any GCC internal prototype to avoid an error.
16003    Use char because int might match the return type of a GCC
16004    builtin and then its argument prototype would still apply.  */
16005 char sched_yield ();
16006 int
16007 main (void)
16008 {
16009 return sched_yield ();
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 if ac_fn_c_try_link "$LINENO"
16015 then :
16016   ac_cv_lib_posix4_sched_yield=yes
16017 else $as_nop
16018   ac_cv_lib_posix4_sched_yield=no
16019 fi
16020 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16021     conftest$ac_exeext conftest.$ac_ext
16022 LIBS=$ac_check_lib_save_LIBS
16023 fi
16024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
16025 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
16026 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
16027 then :
16028   LIB_SCHED_YIELD=-lposix4
16029 fi
16030
16031 fi
16032
16033
16034 fi
16035 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16036     conftest$ac_exeext conftest.$ac_ext
16037
16038
16039     gl_pthreadlib_body_done=done
16040   fi
16041
16042
16043
16044
16045
16046
16047
16048
16049   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
16050 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
16051 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
16052 then :
16053   printf %s "(cached) " >&6
16054 else $as_nop
16055   case "$host_os" in
16056        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
16057        *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
16058          gl_cv_func_setlocale_null_all_mtsafe=no ;;
16059        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
16060        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
16061          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
16062        # If we don't know, obey --enable-cross-guesses.
16063        *)
16064          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
16065      esac
16066
16067 fi
16068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
16069 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
16070     case "$host_os" in
16071     mingw*) ;;
16072     *)
16073       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
16074         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
16075       fi
16076       ;;
16077   esac
16078   case "$gl_cv_func_setlocale_null_all_mtsafe" in
16079     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
16080     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
16081   esac
16082
16083 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
16084
16085
16086     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
16087 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
16088 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
16089 then :
16090   printf %s "(cached) " >&6
16091 else $as_nop
16092   case "$host_os" in
16093        # Guess no on OpenBSD, AIX.
16094        openbsd* | aix*)
16095          gl_cv_func_setlocale_null_one_mtsafe=no ;;
16096        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
16097        *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
16098          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
16099        # If we don't know, obey --enable-cross-guesses.
16100        *)
16101          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
16102      esac
16103
16104 fi
16105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
16106 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
16107     case "$host_os" in
16108     mingw*) ;;
16109     *)
16110       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
16111         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
16112       fi
16113       ;;
16114   esac
16115   case "$gl_cv_func_setlocale_null_one_mtsafe" in
16116     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
16117     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
16118   esac
16119
16120 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
16121
16122
16123     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
16124     case "$host_os" in
16125       mingw*) LIB_SETLOCALE_NULL= ;;
16126       *)
16127
16128
16129   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
16130 printf %s "checking whether imported symbols can be declared weak... " >&6; }
16131 if test ${gl_cv_have_weak+y}
16132 then :
16133   printf %s "(cached) " >&6
16134 else $as_nop
16135   gl_cv_have_weak=no
16136           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137 /* end confdefs.h.  */
16138 extern void xyzzy ();
16139 #pragma weak xyzzy
16140 int
16141 main (void)
16142 {
16143 xyzzy();
16144   ;
16145   return 0;
16146 }
16147 _ACEOF
16148 if ac_fn_c_try_link "$LINENO"
16149 then :
16150   gl_cv_have_weak=maybe
16151 fi
16152 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16153     conftest$ac_exeext conftest.$ac_ext
16154      if test $gl_cv_have_weak = maybe; then
16155                      if test "$cross_compiling" = yes
16156 then :
16157                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158 /* end confdefs.h.  */
16159 #ifdef __ELF__
16160              Extensible Linking Format
16161              #endif
16162
16163 _ACEOF
16164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16165   $EGREP "Extensible Linking Format" >/dev/null 2>&1
16166 then :
16167   gl_cv_have_weak="guessing yes"
16168 else $as_nop
16169   gl_cv_have_weak="guessing no"
16170 fi
16171 rm -rf conftest*
16172
16173
16174 else $as_nop
16175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176 /* end confdefs.h.  */
16177
16178 #include <stdio.h>
16179 #pragma weak fputs
16180 int main ()
16181 {
16182   return (fputs == NULL);
16183 }
16184 _ACEOF
16185 if ac_fn_c_try_run "$LINENO"
16186 then :
16187   gl_cv_have_weak=yes
16188 else $as_nop
16189   gl_cv_have_weak=no
16190 fi
16191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16192   conftest.$ac_objext conftest.beam conftest.$ac_ext
16193 fi
16194
16195      fi
16196           case " $LDFLAGS " in
16197        *" -static "*) gl_cv_have_weak=no ;;
16198      esac
16199                     case "$gl_cv_have_weak" in
16200        *yes)
16201          case "$host_os" in
16202            freebsd* | dragonfly* | midnightbsd*)
16203              : > conftest1.c
16204              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
16205              cat <<EOF > conftest2.c
16206 #include <pthread.h>
16207 #pragma weak pthread_mutexattr_gettype
16208 int main ()
16209 {
16210   return (pthread_mutexattr_gettype != NULL);
16211 }
16212 EOF
16213              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
16214                || gl_cv_have_weak=no
16215              rm -f conftest1.c libempty.so conftest2.c conftest
16216              ;;
16217          esac
16218          ;;
16219      esac
16220
16221 fi
16222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
16223 printf "%s\n" "$gl_cv_have_weak" >&6; }
16224   case "$gl_cv_have_weak" in
16225     *yes)
16226
16227 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
16228
16229       ;;
16230   esac
16231
16232         case "$gl_cv_have_weak" in
16233           *yes) LIB_SETLOCALE_NULL= ;;
16234           *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
16235         esac
16236         ;;
16237     esac
16238   else
16239     LIB_SETLOCALE_NULL=
16240   fi
16241
16242
16243
16244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16245 /* end confdefs.h.  */
16246
16247 #ifdef _MSC_VER
16248 MicrosoftCompiler
16249 #endif
16250
16251 _ACEOF
16252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16253   $EGREP "MicrosoftCompiler" >/dev/null 2>&1
16254 then :
16255             rm -f conftest*
16256      echo 'int dummy;' > conftest.c
16257      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
16258   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16259   (eval $ac_try) 2>&5
16260   ac_status=$?
16261   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16262   test $ac_status = 0; }; } >/dev/null 2>&1
16263      if test -f conftest.o; then
16264        gl_asmext='s'
16265        gl_c_asm_opt='-S'
16266      else
16267        gl_asmext='asm'
16268        gl_c_asm_opt='-c -Fa'
16269      fi
16270      rm -f conftest*
16271
16272 else $as_nop
16273   gl_asmext='s'
16274      gl_c_asm_opt='-S'
16275
16276 fi
16277 rm -rf conftest*
16278
16279
16280
16281
16282
16283   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
16284 printf %s "checking host CPU and C ABI... " >&6; }
16285 if test ${gl_cv_host_cpu_c_abi+y}
16286 then :
16287   printf %s "(cached) " >&6
16288 else $as_nop
16289   case "$host_cpu" in
16290
16291        i[34567]86 )
16292          gl_cv_host_cpu_c_abi=i386
16293          ;;
16294
16295        x86_64 )
16296          # On x86_64 systems, the C compiler may be generating code in one of
16297          # these ABIs:
16298          # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
16299          # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
16300          #   with native Windows (mingw, MSVC).
16301          # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
16302          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
16303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h.  */
16305 #if (defined __x86_64__ || defined __amd64__ \
16306                      || defined _M_X64 || defined _M_AMD64)
16307                  int ok;
16308                 #else
16309                  error fail
16310                 #endif
16311
16312 _ACEOF
16313 if ac_fn_c_try_compile "$LINENO"
16314 then :
16315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316 /* end confdefs.h.  */
16317 #if defined __ILP32__ || defined _ILP32
16318                     int ok;
16319                    #else
16320                     error fail
16321                    #endif
16322
16323 _ACEOF
16324 if ac_fn_c_try_compile "$LINENO"
16325 then :
16326   gl_cv_host_cpu_c_abi=x86_64-x32
16327 else $as_nop
16328   gl_cv_host_cpu_c_abi=x86_64
16329 fi
16330 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16331 else $as_nop
16332   gl_cv_host_cpu_c_abi=i386
16333 fi
16334 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16335          ;;
16336
16337        alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
16338          gl_cv_host_cpu_c_abi=alpha
16339          ;;
16340
16341        arm* | aarch64 )
16342          # Assume arm with EABI.
16343          # On arm64 systems, the C compiler may be generating code in one of
16344          # these ABIs:
16345          # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
16346          # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
16347          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
16348          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349 /* end confdefs.h.  */
16350 #ifdef __aarch64__
16351                  int ok;
16352                 #else
16353                  error fail
16354                 #endif
16355
16356 _ACEOF
16357 if ac_fn_c_try_compile "$LINENO"
16358 then :
16359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h.  */
16361 #if defined __ILP32__ || defined _ILP32
16362                    int ok;
16363                   #else
16364                    error fail
16365                   #endif
16366
16367 _ACEOF
16368 if ac_fn_c_try_compile "$LINENO"
16369 then :
16370   gl_cv_host_cpu_c_abi=arm64-ilp32
16371 else $as_nop
16372   gl_cv_host_cpu_c_abi=arm64
16373 fi
16374 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16375 else $as_nop
16376   # Don't distinguish little-endian and big-endian arm, since they
16377             # don't require different machine code for simple operations and
16378             # since the user can distinguish them through the preprocessor
16379             # defines __ARMEL__ vs. __ARMEB__.
16380             # But distinguish arm which passes floating-point arguments and
16381             # return values in integer registers (r0, r1, ...) - this is
16382             # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
16383             # passes them in float registers (s0, s1, ...) and double registers
16384             # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
16385             # sets the preprocessor defines __ARM_PCS (for the first case) and
16386             # __ARM_PCS_VFP (for the second case), but older GCC does not.
16387             echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
16388             # Look for a reference to the register d0 in the .s file.
16389             { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16390   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16391   (eval $ac_try) 2>&5
16392   ac_status=$?
16393   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16394   test $ac_status = 0; }; } >/dev/null 2>&1
16395             if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
16396               gl_cv_host_cpu_c_abi=armhf
16397             else
16398               gl_cv_host_cpu_c_abi=arm
16399             fi
16400             rm -f conftest*
16401
16402 fi
16403 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16404          ;;
16405
16406        hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
16407          # On hppa, the C compiler may be generating 32-bit code or 64-bit
16408          # code. In the latter case, it defines _LP64 and __LP64__.
16409          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16410 /* end confdefs.h.  */
16411 #ifdef __LP64__
16412                  int ok;
16413                 #else
16414                  error fail
16415                 #endif
16416
16417 _ACEOF
16418 if ac_fn_c_try_compile "$LINENO"
16419 then :
16420   gl_cv_host_cpu_c_abi=hppa64
16421 else $as_nop
16422   gl_cv_host_cpu_c_abi=hppa
16423 fi
16424 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16425          ;;
16426
16427        ia64* )
16428          # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
16429          # 32-bit code. In the latter case, it defines _ILP32.
16430          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431 /* end confdefs.h.  */
16432 #ifdef _ILP32
16433                  int ok;
16434                 #else
16435                  error fail
16436                 #endif
16437
16438 _ACEOF
16439 if ac_fn_c_try_compile "$LINENO"
16440 then :
16441   gl_cv_host_cpu_c_abi=ia64-ilp32
16442 else $as_nop
16443   gl_cv_host_cpu_c_abi=ia64
16444 fi
16445 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16446          ;;
16447
16448        mips* )
16449          # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
16450          # at 32.
16451          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452 /* end confdefs.h.  */
16453 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
16454                  int ok;
16455                 #else
16456                  error fail
16457                 #endif
16458
16459 _ACEOF
16460 if ac_fn_c_try_compile "$LINENO"
16461 then :
16462   gl_cv_host_cpu_c_abi=mips64
16463 else $as_nop
16464   # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
16465             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
16466             # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
16467             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
16468             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469 /* end confdefs.h.  */
16470 #if (_MIPS_SIM == _ABIN32)
16471                     int ok;
16472                    #else
16473                     error fail
16474                    #endif
16475
16476 _ACEOF
16477 if ac_fn_c_try_compile "$LINENO"
16478 then :
16479   gl_cv_host_cpu_c_abi=mipsn32
16480 else $as_nop
16481   gl_cv_host_cpu_c_abi=mips
16482 fi
16483 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16484 fi
16485 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16486          ;;
16487
16488        powerpc* )
16489          # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
16490          # No need to distinguish them here; the caller may distinguish
16491          # them based on the OS.
16492          # On powerpc64 systems, the C compiler may still be generating
16493          # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
16494          # be generating 64-bit code.
16495          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16496 /* end confdefs.h.  */
16497 #if defined __powerpc64__ || defined __LP64__
16498                  int ok;
16499                 #else
16500                  error fail
16501                 #endif
16502
16503 _ACEOF
16504 if ac_fn_c_try_compile "$LINENO"
16505 then :
16506   # On powerpc64, there are two ABIs on Linux: The AIX compatible
16507             # one and the ELFv2 one. The latter defines _CALL_ELF=2.
16508             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509 /* end confdefs.h.  */
16510 #if defined _CALL_ELF && _CALL_ELF == 2
16511                     int ok;
16512                    #else
16513                     error fail
16514                    #endif
16515
16516 _ACEOF
16517 if ac_fn_c_try_compile "$LINENO"
16518 then :
16519   gl_cv_host_cpu_c_abi=powerpc64-elfv2
16520 else $as_nop
16521   gl_cv_host_cpu_c_abi=powerpc64
16522 fi
16523 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16524
16525 else $as_nop
16526   gl_cv_host_cpu_c_abi=powerpc
16527 fi
16528 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16529          ;;
16530
16531        rs6000 )
16532          gl_cv_host_cpu_c_abi=powerpc
16533          ;;
16534
16535        riscv32 | riscv64 )
16536          # There are 2 architectures (with variants): rv32* and rv64*.
16537          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16538 /* end confdefs.h.  */
16539 #if __riscv_xlen == 64
16540                   int ok;
16541                 #else
16542                   error fail
16543                 #endif
16544
16545 _ACEOF
16546 if ac_fn_c_try_compile "$LINENO"
16547 then :
16548   cpu=riscv64
16549 else $as_nop
16550   cpu=riscv32
16551 fi
16552 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16553          # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
16554          # Size of 'long' and 'void *':
16555          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h.  */
16557 #if defined __LP64__
16558                   int ok;
16559                 #else
16560                   error fail
16561                 #endif
16562
16563 _ACEOF
16564 if ac_fn_c_try_compile "$LINENO"
16565 then :
16566   main_abi=lp64
16567 else $as_nop
16568   main_abi=ilp32
16569 fi
16570 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16571          # Float ABIs:
16572          # __riscv_float_abi_double:
16573          #   'float' and 'double' are passed in floating-point registers.
16574          # __riscv_float_abi_single:
16575          #   'float' are passed in floating-point registers.
16576          # __riscv_float_abi_soft:
16577          #   No values are passed in floating-point registers.
16578          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579 /* end confdefs.h.  */
16580 #if defined __riscv_float_abi_double
16581                   int ok;
16582                 #else
16583                   error fail
16584                 #endif
16585
16586 _ACEOF
16587 if ac_fn_c_try_compile "$LINENO"
16588 then :
16589   float_abi=d
16590 else $as_nop
16591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16592 /* end confdefs.h.  */
16593 #if defined __riscv_float_abi_single
16594                      int ok;
16595                    #else
16596                      error fail
16597                    #endif
16598
16599 _ACEOF
16600 if ac_fn_c_try_compile "$LINENO"
16601 then :
16602   float_abi=f
16603 else $as_nop
16604   float_abi=''
16605 fi
16606 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16607
16608 fi
16609 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16610          gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
16611          ;;
16612
16613        s390* )
16614          # On s390x, the C compiler may be generating 64-bit (= s390x) code
16615          # or 31-bit (= s390) code.
16616          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16617 /* end confdefs.h.  */
16618 #if defined __LP64__ || defined __s390x__
16619                   int ok;
16620                 #else
16621                   error fail
16622                 #endif
16623
16624 _ACEOF
16625 if ac_fn_c_try_compile "$LINENO"
16626 then :
16627   gl_cv_host_cpu_c_abi=s390x
16628 else $as_nop
16629   gl_cv_host_cpu_c_abi=s390
16630 fi
16631 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16632          ;;
16633
16634        sparc | sparc64 )
16635          # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
16636          # C compiler still generates 32-bit code.
16637          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638 /* end confdefs.h.  */
16639 #if defined __sparcv9 || defined __arch64__
16640                  int ok;
16641                 #else
16642                  error fail
16643                 #endif
16644
16645 _ACEOF
16646 if ac_fn_c_try_compile "$LINENO"
16647 then :
16648   gl_cv_host_cpu_c_abi=sparc64
16649 else $as_nop
16650   gl_cv_host_cpu_c_abi=sparc
16651 fi
16652 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16653          ;;
16654
16655        *)
16656          gl_cv_host_cpu_c_abi="$host_cpu"
16657          ;;
16658      esac
16659
16660 fi
16661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
16662 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
16663
16664     HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
16665   HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
16666
16667
16668
16669   # This was
16670   #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
16671   #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
16672   # earlier, but KAI C++ 3.2d doesn't like this.
16673   sed -e 's/-/_/g' >> confdefs.h <<EOF
16674 #ifndef __${HOST_CPU}__
16675 #define __${HOST_CPU}__ 1
16676 #endif
16677 #ifndef __${HOST_CPU_C_ABI}__
16678 #define __${HOST_CPU_C_ABI}__ 1
16679 #endif
16680 EOF
16681
16682
16683
16684
16685       if test "X$prefix" = "XNONE"; then
16686     acl_final_prefix="$ac_default_prefix"
16687   else
16688     acl_final_prefix="$prefix"
16689   fi
16690   if test "X$exec_prefix" = "XNONE"; then
16691     acl_final_exec_prefix='${prefix}'
16692   else
16693     acl_final_exec_prefix="$exec_prefix"
16694   fi
16695   acl_save_prefix="$prefix"
16696   prefix="$acl_final_prefix"
16697   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
16698   prefix="$acl_save_prefix"
16699
16700
16701
16702 # Check whether --with-gnu-ld was given.
16703 if test ${with_gnu_ld+y}
16704 then :
16705   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
16706 else $as_nop
16707   with_gnu_ld=no
16708 fi
16709
16710 # Prepare PATH_SEPARATOR.
16711 # The user is always right.
16712 if test "${PATH_SEPARATOR+set}" != set; then
16713   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
16714   # contains only /bin. Note that ksh looks also at the FPATH variable,
16715   # so we have to set that as well for the test.
16716   PATH_SEPARATOR=:
16717   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16718     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16719            || PATH_SEPARATOR=';'
16720        }
16721 fi
16722
16723 if test -n "$LD"; then
16724   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
16725 printf %s "checking for ld... " >&6; }
16726 elif test "$GCC" = yes; then
16727   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
16728 printf %s "checking for ld used by $CC... " >&6; }
16729 elif test "$with_gnu_ld" = yes; then
16730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
16731 printf %s "checking for GNU ld... " >&6; }
16732 else
16733   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
16734 printf %s "checking for non-GNU ld... " >&6; }
16735 fi
16736 if test -n "$LD"; then
16737   # Let the user override the test with a path.
16738   :
16739 else
16740   if test ${acl_cv_path_LD+y}
16741 then :
16742   printf %s "(cached) " >&6
16743 else $as_nop
16744
16745     acl_cv_path_LD= # Final result of this test
16746     ac_prog=ld # Program to search in $PATH
16747     if test "$GCC" = yes; then
16748       # Check if gcc -print-prog-name=ld gives a path.
16749       case $host in
16750         *-*-mingw*)
16751           # gcc leaves a trailing carriage return which upsets mingw
16752           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
16753         *)
16754           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
16755       esac
16756       case $acl_output in
16757         # Accept absolute paths.
16758         [\\/]* | ?:[\\/]*)
16759           re_direlt='/[^/][^/]*/\.\./'
16760           # Canonicalize the pathname of ld
16761           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
16762           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
16763             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
16764           done
16765           # Got the pathname. No search in PATH is needed.
16766           acl_cv_path_LD="$acl_output"
16767           ac_prog=
16768           ;;
16769         "")
16770           # If it fails, then pretend we aren't using GCC.
16771           ;;
16772         *)
16773           # If it is relative, then search for the first ld in PATH.
16774           with_gnu_ld=unknown
16775           ;;
16776       esac
16777     fi
16778     if test -n "$ac_prog"; then
16779       # Search for $ac_prog in $PATH.
16780       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16781       for ac_dir in $PATH; do
16782         IFS="$acl_save_ifs"
16783         test -z "$ac_dir" && ac_dir=.
16784         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
16785           acl_cv_path_LD="$ac_dir/$ac_prog"
16786           # Check to see if the program is GNU ld.  I'd rather use --version,
16787           # but apparently some variants of GNU ld only accept -v.
16788           # Break only if it was the GNU/non-GNU ld that we prefer.
16789           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
16790             *GNU* | *'with BFD'*)
16791               test "$with_gnu_ld" != no && break
16792               ;;
16793             *)
16794               test "$with_gnu_ld" != yes && break
16795               ;;
16796           esac
16797         fi
16798       done
16799       IFS="$acl_save_ifs"
16800     fi
16801     case $host in
16802       *-*-aix*)
16803         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16804 /* end confdefs.h.  */
16805 #if defined __powerpc64__ || defined __LP64__
16806                 int ok;
16807                #else
16808                 error fail
16809                #endif
16810
16811 _ACEOF
16812 if ac_fn_c_try_compile "$LINENO"
16813 then :
16814   # The compiler produces 64-bit code. Add option '-b64' so that the
16815            # linker groks 64-bit object files.
16816            case "$acl_cv_path_LD " in
16817              *" -b64 "*) ;;
16818              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
16819            esac
16820
16821 fi
16822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16823         ;;
16824       sparc64-*-netbsd*)
16825         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16826 /* end confdefs.h.  */
16827 #if defined __sparcv9 || defined __arch64__
16828                 int ok;
16829                #else
16830                 error fail
16831                #endif
16832
16833 _ACEOF
16834 if ac_fn_c_try_compile "$LINENO"
16835 then :
16836
16837 else $as_nop
16838   # The compiler produces 32-bit code. Add option '-m elf32_sparc'
16839            # so that the linker groks 32-bit object files.
16840            case "$acl_cv_path_LD " in
16841              *" -m elf32_sparc "*) ;;
16842              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
16843            esac
16844
16845 fi
16846 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16847         ;;
16848     esac
16849
16850 fi
16851
16852   LD="$acl_cv_path_LD"
16853 fi
16854 if test -n "$LD"; then
16855   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
16856 printf "%s\n" "$LD" >&6; }
16857 else
16858   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16859 printf "%s\n" "no" >&6; }
16860   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
16861 fi
16862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
16863 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
16864 if test ${acl_cv_prog_gnu_ld+y}
16865 then :
16866   printf %s "(cached) " >&6
16867 else $as_nop
16868   # I'd rather use --version here, but apparently some GNU lds only accept -v.
16869 case `$LD -v 2>&1 </dev/null` in
16870 *GNU* | *'with BFD'*)
16871   acl_cv_prog_gnu_ld=yes
16872   ;;
16873 *)
16874   acl_cv_prog_gnu_ld=no
16875   ;;
16876 esac
16877 fi
16878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
16879 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
16880 with_gnu_ld=$acl_cv_prog_gnu_ld
16881
16882
16883
16884
16885
16886                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
16887 printf %s "checking for shared library run path origin... " >&6; }
16888 if test ${acl_cv_rpath+y}
16889 then :
16890   printf %s "(cached) " >&6
16891 else $as_nop
16892
16893     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
16894     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
16895     . ./conftest.sh
16896     rm -f ./conftest.sh
16897     acl_cv_rpath=done
16898
16899 fi
16900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
16901 printf "%s\n" "$acl_cv_rpath" >&6; }
16902   wl="$acl_cv_wl"
16903   acl_libext="$acl_cv_libext"
16904   acl_shlibext="$acl_cv_shlibext"
16905   acl_libname_spec="$acl_cv_libname_spec"
16906   acl_library_names_spec="$acl_cv_library_names_spec"
16907   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
16908   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
16909   acl_hardcode_direct="$acl_cv_hardcode_direct"
16910   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
16911     # Check whether --enable-rpath was given.
16912 if test ${enable_rpath+y}
16913 then :
16914   enableval=$enable_rpath; :
16915 else $as_nop
16916   enable_rpath=yes
16917 fi
16918
16919
16920
16921
16922   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
16923 printf %s "checking 32-bit host C ABI... " >&6; }
16924 if test ${gl_cv_host_cpu_c_abi_32bit+y}
16925 then :
16926   printf %s "(cached) " >&6
16927 else $as_nop
16928   if test -n "$gl_cv_host_cpu_c_abi"; then
16929        case "$gl_cv_host_cpu_c_abi" in
16930          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
16931            gl_cv_host_cpu_c_abi_32bit=yes ;;
16932          x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
16933            gl_cv_host_cpu_c_abi_32bit=no ;;
16934          *)
16935            gl_cv_host_cpu_c_abi_32bit=unknown ;;
16936        esac
16937      else
16938        case "$host_cpu" in
16939
16940          # CPUs that only support a 32-bit ABI.
16941          arc \
16942          | bfin \
16943          | cris* \
16944          | csky \
16945          | epiphany \
16946          | ft32 \
16947          | h8300 \
16948          | m68k \
16949          | microblaze | microblazeel \
16950          | nds32 | nds32le | nds32be \
16951          | nios2 | nios2eb | nios2el \
16952          | or1k* \
16953          | or32 \
16954          | sh | sh1234 | sh1234elb \
16955          | tic6x \
16956          | xtensa* )
16957            gl_cv_host_cpu_c_abi_32bit=yes
16958            ;;
16959
16960          # CPUs that only support a 64-bit ABI.
16961          alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
16962          | mmix )
16963            gl_cv_host_cpu_c_abi_32bit=no
16964            ;;
16965
16966          i[34567]86 )
16967            gl_cv_host_cpu_c_abi_32bit=yes
16968            ;;
16969
16970          x86_64 )
16971            # On x86_64 systems, the C compiler may be generating code in one of
16972            # these ABIs:
16973            # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
16974            # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
16975            #   with native Windows (mingw, MSVC).
16976            # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
16977            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
16978            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16979 /* end confdefs.h.  */
16980 #if (defined __x86_64__ || defined __amd64__ \
16981                        || defined _M_X64 || defined _M_AMD64) \
16982                       && !(defined __ILP32__ || defined _ILP32)
16983                    int ok;
16984                   #else
16985                    error fail
16986                   #endif
16987
16988 _ACEOF
16989 if ac_fn_c_try_compile "$LINENO"
16990 then :
16991   gl_cv_host_cpu_c_abi_32bit=no
16992 else $as_nop
16993   gl_cv_host_cpu_c_abi_32bit=yes
16994 fi
16995 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16996            ;;
16997
16998          arm* | aarch64 )
16999            # Assume arm with EABI.
17000            # On arm64 systems, the C compiler may be generating code in one of
17001            # these ABIs:
17002            # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
17003            # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
17004            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
17005            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17006 /* end confdefs.h.  */
17007 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
17008                    int ok;
17009                   #else
17010                    error fail
17011                   #endif
17012
17013 _ACEOF
17014 if ac_fn_c_try_compile "$LINENO"
17015 then :
17016   gl_cv_host_cpu_c_abi_32bit=no
17017 else $as_nop
17018   gl_cv_host_cpu_c_abi_32bit=yes
17019 fi
17020 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17021            ;;
17022
17023          hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
17024            # On hppa, the C compiler may be generating 32-bit code or 64-bit
17025            # code. In the latter case, it defines _LP64 and __LP64__.
17026            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027 /* end confdefs.h.  */
17028 #ifdef __LP64__
17029                    int ok;
17030                   #else
17031                    error fail
17032                   #endif
17033
17034 _ACEOF
17035 if ac_fn_c_try_compile "$LINENO"
17036 then :
17037   gl_cv_host_cpu_c_abi_32bit=no
17038 else $as_nop
17039   gl_cv_host_cpu_c_abi_32bit=yes
17040 fi
17041 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17042            ;;
17043
17044          ia64* )
17045            # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
17046            # 32-bit code. In the latter case, it defines _ILP32.
17047            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048 /* end confdefs.h.  */
17049 #ifdef _ILP32
17050                    int ok;
17051                   #else
17052                    error fail
17053                   #endif
17054
17055 _ACEOF
17056 if ac_fn_c_try_compile "$LINENO"
17057 then :
17058   gl_cv_host_cpu_c_abi_32bit=yes
17059 else $as_nop
17060   gl_cv_host_cpu_c_abi_32bit=no
17061 fi
17062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17063            ;;
17064
17065          mips* )
17066            # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
17067            # at 32.
17068            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h.  */
17070 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
17071                    int ok;
17072                   #else
17073                    error fail
17074                   #endif
17075
17076 _ACEOF
17077 if ac_fn_c_try_compile "$LINENO"
17078 then :
17079   gl_cv_host_cpu_c_abi_32bit=no
17080 else $as_nop
17081   gl_cv_host_cpu_c_abi_32bit=yes
17082 fi
17083 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17084            ;;
17085
17086          powerpc* )
17087            # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
17088            # No need to distinguish them here; the caller may distinguish
17089            # them based on the OS.
17090            # On powerpc64 systems, the C compiler may still be generating
17091            # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
17092            # be generating 64-bit code.
17093            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17094 /* end confdefs.h.  */
17095 #if defined __powerpc64__ || defined __LP64__
17096                    int ok;
17097                   #else
17098                    error fail
17099                   #endif
17100
17101 _ACEOF
17102 if ac_fn_c_try_compile "$LINENO"
17103 then :
17104   gl_cv_host_cpu_c_abi_32bit=no
17105 else $as_nop
17106   gl_cv_host_cpu_c_abi_32bit=yes
17107 fi
17108 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17109            ;;
17110
17111          rs6000 )
17112            gl_cv_host_cpu_c_abi_32bit=yes
17113            ;;
17114
17115          riscv32 | riscv64 )
17116            # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
17117            # Size of 'long' and 'void *':
17118            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17119 /* end confdefs.h.  */
17120 #if defined __LP64__
17121                     int ok;
17122                   #else
17123                     error fail
17124                   #endif
17125
17126 _ACEOF
17127 if ac_fn_c_try_compile "$LINENO"
17128 then :
17129   gl_cv_host_cpu_c_abi_32bit=no
17130 else $as_nop
17131   gl_cv_host_cpu_c_abi_32bit=yes
17132 fi
17133 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17134            ;;
17135
17136          s390* )
17137            # On s390x, the C compiler may be generating 64-bit (= s390x) code
17138            # or 31-bit (= s390) code.
17139            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17140 /* end confdefs.h.  */
17141 #if defined __LP64__ || defined __s390x__
17142                     int ok;
17143                   #else
17144                     error fail
17145                   #endif
17146
17147 _ACEOF
17148 if ac_fn_c_try_compile "$LINENO"
17149 then :
17150   gl_cv_host_cpu_c_abi_32bit=no
17151 else $as_nop
17152   gl_cv_host_cpu_c_abi_32bit=yes
17153 fi
17154 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17155            ;;
17156
17157          sparc | sparc64 )
17158            # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
17159            # C compiler still generates 32-bit code.
17160            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17161 /* end confdefs.h.  */
17162 #if defined __sparcv9 || defined __arch64__
17163                    int ok;
17164                   #else
17165                    error fail
17166                   #endif
17167
17168 _ACEOF
17169 if ac_fn_c_try_compile "$LINENO"
17170 then :
17171   gl_cv_host_cpu_c_abi_32bit=no
17172 else $as_nop
17173   gl_cv_host_cpu_c_abi_32bit=yes
17174 fi
17175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17176            ;;
17177
17178          *)
17179            gl_cv_host_cpu_c_abi_32bit=unknown
17180            ;;
17181        esac
17182      fi
17183
17184 fi
17185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
17186 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
17187
17188   HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
17189
17190
17191
17192
17193
17194   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
17195 printf %s "checking for ELF binary format... " >&6; }
17196 if test ${gl_cv_elf+y}
17197 then :
17198   printf %s "(cached) " >&6
17199 else $as_nop
17200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201 /* end confdefs.h.  */
17202 #ifdef __ELF__
17203         Extensible Linking Format
17204         #endif
17205
17206 _ACEOF
17207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17208   $EGREP "Extensible Linking Format" >/dev/null 2>&1
17209 then :
17210   gl_cv_elf=yes
17211 else $as_nop
17212   gl_cv_elf=no
17213 fi
17214 rm -rf conftest*
17215
17216
17217 fi
17218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
17219 printf "%s\n" "$gl_cv_elf" >&6; }
17220   if test $gl_cv_elf = yes; then
17221     # Extract the ELF class of a file (5th byte) in decimal.
17222     # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
17223     if od -A x < /dev/null >/dev/null 2>/dev/null; then
17224       # Use POSIX od.
17225       func_elfclass ()
17226       {
17227         od -A n -t d1 -j 4 -N 1
17228       }
17229     else
17230       # Use BSD hexdump.
17231       func_elfclass ()
17232       {
17233         dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
17234         echo
17235       }
17236     fi
17237     # Use 'expr', not 'test', to compare the values of func_elfclass, because on
17238     # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
17239     # not 1 or 2.
17240     case $HOST_CPU_C_ABI_32BIT in
17241       yes)
17242         # 32-bit ABI.
17243         acl_is_expected_elfclass ()
17244         {
17245           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 1 > /dev/null
17246         }
17247         ;;
17248       no)
17249         # 64-bit ABI.
17250         acl_is_expected_elfclass ()
17251         {
17252           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 2 > /dev/null
17253         }
17254         ;;
17255       *)
17256         # Unknown.
17257         acl_is_expected_elfclass ()
17258         {
17259           :
17260         }
17261         ;;
17262     esac
17263   else
17264     acl_is_expected_elfclass ()
17265     {
17266       :
17267     }
17268   fi
17269
17270     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
17271 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
17272 if test ${acl_cv_libdirstems+y}
17273 then :
17274   printf %s "(cached) " >&6
17275 else $as_nop
17276             acl_libdirstem=lib
17277      acl_libdirstem2=
17278      acl_libdirstem3=
17279      case "$host_os" in
17280        solaris*)
17281                                                       if test $HOST_CPU_C_ABI_32BIT = no; then
17282            acl_libdirstem2=lib/64
17283            case "$host_cpu" in
17284              sparc*)        acl_libdirstem3=lib/sparcv9 ;;
17285              i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
17286            esac
17287          fi
17288          ;;
17289        *)
17290                                                                                  searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
17291                      | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
17292          if test $HOST_CPU_C_ABI_32BIT != no; then
17293            # 32-bit or unknown ABI.
17294            if test -d /usr/lib32; then
17295              acl_libdirstem2=lib32
17296            fi
17297          fi
17298          if test $HOST_CPU_C_ABI_32BIT != yes; then
17299            # 64-bit or unknown ABI.
17300            if test -d /usr/lib64; then
17301              acl_libdirstem3=lib64
17302            fi
17303          fi
17304          if test -n "$searchpath"; then
17305            acl_save_IFS="${IFS=         }"; IFS=":"
17306            for searchdir in $searchpath; do
17307              if test -d "$searchdir"; then
17308                case "$searchdir" in
17309                  */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
17310                  */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
17311                  */../ | */.. )
17312                    # Better ignore directories of this form. They are misleading.
17313                    ;;
17314                  *) searchdir=`cd "$searchdir" && pwd`
17315                     case "$searchdir" in
17316                       */lib32 ) acl_libdirstem2=lib32 ;;
17317                       */lib64 ) acl_libdirstem3=lib64 ;;
17318                     esac ;;
17319                esac
17320              fi
17321            done
17322            IFS="$acl_save_IFS"
17323            if test $HOST_CPU_C_ABI_32BIT = yes; then
17324              # 32-bit ABI.
17325              acl_libdirstem3=
17326            fi
17327            if test $HOST_CPU_C_ABI_32BIT = no; then
17328              # 64-bit ABI.
17329              acl_libdirstem2=
17330            fi
17331          fi
17332          ;;
17333      esac
17334      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
17335      test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
17336      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
17337
17338 fi
17339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
17340 printf "%s\n" "$acl_cv_libdirstems" >&6; }
17341       acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
17342   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
17343   acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355     use_additional=yes
17356
17357   acl_save_prefix="$prefix"
17358   prefix="$acl_final_prefix"
17359   acl_save_exec_prefix="$exec_prefix"
17360   exec_prefix="$acl_final_exec_prefix"
17361
17362     eval additional_includedir=\"$includedir\"
17363     eval additional_libdir=\"$libdir\"
17364     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
17365     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
17366
17367   exec_prefix="$acl_save_exec_prefix"
17368   prefix="$acl_save_prefix"
17369
17370
17371 # Check whether --with-libiconv-prefix was given.
17372 if test ${with_libiconv_prefix+y}
17373 then :
17374   withval=$with_libiconv_prefix;
17375     if test "X$withval" = "Xno"; then
17376       use_additional=no
17377     else
17378       if test "X$withval" = "X"; then
17379
17380   acl_save_prefix="$prefix"
17381   prefix="$acl_final_prefix"
17382   acl_save_exec_prefix="$exec_prefix"
17383   exec_prefix="$acl_final_exec_prefix"
17384
17385           eval additional_includedir=\"$includedir\"
17386           eval additional_libdir=\"$libdir\"
17387           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
17388           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
17389
17390   exec_prefix="$acl_save_exec_prefix"
17391   prefix="$acl_save_prefix"
17392
17393       else
17394         additional_includedir="$withval/include"
17395         additional_libdir="$withval/$acl_libdirstem"
17396         additional_libdir2="$withval/$acl_libdirstem2"
17397         additional_libdir3="$withval/$acl_libdirstem3"
17398       fi
17399     fi
17400
17401 fi
17402
17403   if test "X$additional_libdir2" = "X$additional_libdir"; then
17404     additional_libdir2=
17405   fi
17406   if test "X$additional_libdir3" = "X$additional_libdir"; then
17407     additional_libdir3=
17408   fi
17409       LIBICONV=
17410   LTLIBICONV=
17411   INCICONV=
17412   LIBICONV_PREFIX=
17413       HAVE_LIBICONV=
17414   rpathdirs=
17415   ltrpathdirs=
17416   names_already_handled=
17417   names_next_round='iconv '
17418   while test -n "$names_next_round"; do
17419     names_this_round="$names_next_round"
17420     names_next_round=
17421     for name in $names_this_round; do
17422       already_handled=
17423       for n in $names_already_handled; do
17424         if test "$n" = "$name"; then
17425           already_handled=yes
17426           break
17427         fi
17428       done
17429       if test -z "$already_handled"; then
17430         names_already_handled="$names_already_handled $name"
17431                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
17432         eval value=\"\$HAVE_LIB$uppername\"
17433         if test -n "$value"; then
17434           if test "$value" = yes; then
17435             eval value=\"\$LIB$uppername\"
17436             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
17437             eval value=\"\$LTLIB$uppername\"
17438             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
17439           else
17440                                     :
17441           fi
17442         else
17443                               found_dir=
17444           found_la=
17445           found_so=
17446           found_a=
17447           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
17448           if test -n "$acl_shlibext"; then
17449             shrext=".$acl_shlibext"             # typically: shrext=.so
17450           else
17451             shrext=
17452           fi
17453           if test $use_additional = yes; then
17454             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
17455               if test "X$found_dir" = "X"; then
17456                 eval dir=\$$additional_libdir_variable
17457                 if test -n "$dir"; then
17458                                                       if test -n "$acl_shlibext"; then
17459                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
17460                       found_dir="$dir"
17461                       found_so="$dir/$libname$shrext"
17462                     else
17463                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17464                         ver=`(cd "$dir" && \
17465                               for f in "$libname$shrext".*; do echo "$f"; done \
17466                               | sed -e "s,^$libname$shrext\\\\.,," \
17467                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17468                               | sed 1q ) 2>/dev/null`
17469                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
17470                           found_dir="$dir"
17471                           found_so="$dir/$libname$shrext.$ver"
17472                         fi
17473                       else
17474                         eval library_names=\"$acl_library_names_spec\"
17475                         for f in $library_names; do
17476                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
17477                             found_dir="$dir"
17478                             found_so="$dir/$f"
17479                             break
17480                           fi
17481                         done
17482                       fi
17483                     fi
17484                   fi
17485                                     if test "X$found_dir" = "X"; then
17486                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
17487                       found_dir="$dir"
17488                       found_a="$dir/$libname.$acl_libext"
17489                     fi
17490                   fi
17491                   if test "X$found_dir" != "X"; then
17492                     if test -f "$dir/$libname.la"; then
17493                       found_la="$dir/$libname.la"
17494                     fi
17495                   fi
17496                 fi
17497               fi
17498             done
17499           fi
17500           if test "X$found_dir" = "X"; then
17501             for x in $LDFLAGS $LTLIBICONV; do
17502
17503   acl_save_prefix="$prefix"
17504   prefix="$acl_final_prefix"
17505   acl_save_exec_prefix="$exec_prefix"
17506   exec_prefix="$acl_final_exec_prefix"
17507   eval x=\"$x\"
17508   exec_prefix="$acl_save_exec_prefix"
17509   prefix="$acl_save_prefix"
17510
17511               case "$x" in
17512                 -L*)
17513                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17514                                     if test -n "$acl_shlibext"; then
17515                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
17516                       found_dir="$dir"
17517                       found_so="$dir/$libname$shrext"
17518                     else
17519                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17520                         ver=`(cd "$dir" && \
17521                               for f in "$libname$shrext".*; do echo "$f"; done \
17522                               | sed -e "s,^$libname$shrext\\\\.,," \
17523                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17524                               | sed 1q ) 2>/dev/null`
17525                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
17526                           found_dir="$dir"
17527                           found_so="$dir/$libname$shrext.$ver"
17528                         fi
17529                       else
17530                         eval library_names=\"$acl_library_names_spec\"
17531                         for f in $library_names; do
17532                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
17533                             found_dir="$dir"
17534                             found_so="$dir/$f"
17535                             break
17536                           fi
17537                         done
17538                       fi
17539                     fi
17540                   fi
17541                                     if test "X$found_dir" = "X"; then
17542                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
17543                       found_dir="$dir"
17544                       found_a="$dir/$libname.$acl_libext"
17545                     fi
17546                   fi
17547                   if test "X$found_dir" != "X"; then
17548                     if test -f "$dir/$libname.la"; then
17549                       found_la="$dir/$libname.la"
17550                     fi
17551                   fi
17552                   ;;
17553               esac
17554               if test "X$found_dir" != "X"; then
17555                 break
17556               fi
17557             done
17558           fi
17559           if test "X$found_dir" != "X"; then
17560                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
17561             if test "X$found_so" != "X"; then
17562                                                         if test "$enable_rpath" = no \
17563                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17564                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
17565                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
17566                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17567               else
17568                                                                                 haveit=
17569                 for x in $ltrpathdirs; do
17570                   if test "X$x" = "X$found_dir"; then
17571                     haveit=yes
17572                     break
17573                   fi
17574                 done
17575                 if test -z "$haveit"; then
17576                   ltrpathdirs="$ltrpathdirs $found_dir"
17577                 fi
17578                                 if test "$acl_hardcode_direct" = yes; then
17579                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17580                 else
17581                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17582                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17583                                                             haveit=
17584                     for x in $rpathdirs; do
17585                       if test "X$x" = "X$found_dir"; then
17586                         haveit=yes
17587                         break
17588                       fi
17589                     done
17590                     if test -z "$haveit"; then
17591                       rpathdirs="$rpathdirs $found_dir"
17592                     fi
17593                   else
17594                                                                                 haveit=
17595                     for x in $LDFLAGS $LIBICONV; do
17596
17597   acl_save_prefix="$prefix"
17598   prefix="$acl_final_prefix"
17599   acl_save_exec_prefix="$exec_prefix"
17600   exec_prefix="$acl_final_exec_prefix"
17601   eval x=\"$x\"
17602   exec_prefix="$acl_save_exec_prefix"
17603   prefix="$acl_save_prefix"
17604
17605                       if test "X$x" = "X-L$found_dir"; then
17606                         haveit=yes
17607                         break
17608                       fi
17609                     done
17610                     if test -z "$haveit"; then
17611                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
17612                     fi
17613                     if test "$acl_hardcode_minus_L" != no; then
17614                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17615                     else
17616                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17617                     fi
17618                   fi
17619                 fi
17620               fi
17621             else
17622               if test "X$found_a" != "X"; then
17623                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
17624               else
17625                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
17626               fi
17627             fi
17628                         additional_includedir=
17629             case "$found_dir" in
17630               */$acl_libdirstem | */$acl_libdirstem/)
17631                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17632                 if test "$name" = 'iconv'; then
17633                   LIBICONV_PREFIX="$basedir"
17634                 fi
17635                 additional_includedir="$basedir/include"
17636                 ;;
17637               */$acl_libdirstem2 | */$acl_libdirstem2/)
17638                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17639                 if test "$name" = 'iconv'; then
17640                   LIBICONV_PREFIX="$basedir"
17641                 fi
17642                 additional_includedir="$basedir/include"
17643                 ;;
17644               */$acl_libdirstem3 | */$acl_libdirstem3/)
17645                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
17646                 if test "$name" = 'iconv'; then
17647                   LIBICONV_PREFIX="$basedir"
17648                 fi
17649                 additional_includedir="$basedir/include"
17650                 ;;
17651             esac
17652             if test "X$additional_includedir" != "X"; then
17653                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17654                 haveit=
17655                 if test "X$additional_includedir" = "X/usr/local/include"; then
17656                   if test -n "$GCC"; then
17657                     case $host_os in
17658                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17659                     esac
17660                   fi
17661                 fi
17662                 if test -z "$haveit"; then
17663                   for x in $CPPFLAGS $INCICONV; do
17664
17665   acl_save_prefix="$prefix"
17666   prefix="$acl_final_prefix"
17667   acl_save_exec_prefix="$exec_prefix"
17668   exec_prefix="$acl_final_exec_prefix"
17669   eval x=\"$x\"
17670   exec_prefix="$acl_save_exec_prefix"
17671   prefix="$acl_save_prefix"
17672
17673                     if test "X$x" = "X-I$additional_includedir"; then
17674                       haveit=yes
17675                       break
17676                     fi
17677                   done
17678                   if test -z "$haveit"; then
17679                     if test -d "$additional_includedir"; then
17680                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
17681                     fi
17682                   fi
17683                 fi
17684               fi
17685             fi
17686                         if test -n "$found_la"; then
17687                                                         save_libdir="$libdir"
17688               case "$found_la" in
17689                 */* | *\\*) . "$found_la" ;;
17690                 *) . "./$found_la" ;;
17691               esac
17692               libdir="$save_libdir"
17693                             for dep in $dependency_libs; do
17694                 case "$dep" in
17695                   -L*)
17696                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17697                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
17698                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
17699                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
17700                       haveit=
17701                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
17702                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
17703                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
17704                         if test -n "$GCC"; then
17705                           case $host_os in
17706                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17707                           esac
17708                         fi
17709                       fi
17710                       if test -z "$haveit"; then
17711                         haveit=
17712                         for x in $LDFLAGS $LIBICONV; do
17713
17714   acl_save_prefix="$prefix"
17715   prefix="$acl_final_prefix"
17716   acl_save_exec_prefix="$exec_prefix"
17717   exec_prefix="$acl_final_exec_prefix"
17718   eval x=\"$x\"
17719   exec_prefix="$acl_save_exec_prefix"
17720   prefix="$acl_save_prefix"
17721
17722                           if test "X$x" = "X-L$dependency_libdir"; then
17723                             haveit=yes
17724                             break
17725                           fi
17726                         done
17727                         if test -z "$haveit"; then
17728                           if test -d "$dependency_libdir"; then
17729                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
17730                           fi
17731                         fi
17732                         haveit=
17733                         for x in $LDFLAGS $LTLIBICONV; do
17734
17735   acl_save_prefix="$prefix"
17736   prefix="$acl_final_prefix"
17737   acl_save_exec_prefix="$exec_prefix"
17738   exec_prefix="$acl_final_exec_prefix"
17739   eval x=\"$x\"
17740   exec_prefix="$acl_save_exec_prefix"
17741   prefix="$acl_save_prefix"
17742
17743                           if test "X$x" = "X-L$dependency_libdir"; then
17744                             haveit=yes
17745                             break
17746                           fi
17747                         done
17748                         if test -z "$haveit"; then
17749                           if test -d "$dependency_libdir"; then
17750                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
17751                           fi
17752                         fi
17753                       fi
17754                     fi
17755                     ;;
17756                   -R*)
17757                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17758                     if test "$enable_rpath" != no; then
17759                                                                   haveit=
17760                       for x in $rpathdirs; do
17761                         if test "X$x" = "X$dir"; then
17762                           haveit=yes
17763                           break
17764                         fi
17765                       done
17766                       if test -z "$haveit"; then
17767                         rpathdirs="$rpathdirs $dir"
17768                       fi
17769                                                                   haveit=
17770                       for x in $ltrpathdirs; do
17771                         if test "X$x" = "X$dir"; then
17772                           haveit=yes
17773                           break
17774                         fi
17775                       done
17776                       if test -z "$haveit"; then
17777                         ltrpathdirs="$ltrpathdirs $dir"
17778                       fi
17779                     fi
17780                     ;;
17781                   -l*)
17782                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
17783                     if test "X$dep" != Xc \
17784                        || case $host_os in
17785                             linux* | gnu* | k*bsd*-gnu) false ;;
17786                             *)                          true ;;
17787                           esac; then
17788                       names_next_round="$names_next_round $dep"
17789                     fi
17790                     ;;
17791                   *.la)
17792                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17793                     ;;
17794                   *)
17795                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
17796                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
17797                     ;;
17798                 esac
17799               done
17800             fi
17801           else
17802                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17803             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
17804           fi
17805         fi
17806       fi
17807     done
17808   done
17809   if test "X$rpathdirs" != "X"; then
17810     if test -n "$acl_hardcode_libdir_separator"; then
17811                         alldirs=
17812       for found_dir in $rpathdirs; do
17813         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
17814       done
17815             acl_save_libdir="$libdir"
17816       libdir="$alldirs"
17817       eval flag=\"$acl_hardcode_libdir_flag_spec\"
17818       libdir="$acl_save_libdir"
17819       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17820     else
17821             for found_dir in $rpathdirs; do
17822         acl_save_libdir="$libdir"
17823         libdir="$found_dir"
17824         eval flag=\"$acl_hardcode_libdir_flag_spec\"
17825         libdir="$acl_save_libdir"
17826         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17827       done
17828     fi
17829   fi
17830   if test "X$ltrpathdirs" != "X"; then
17831             for found_dir in $ltrpathdirs; do
17832       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
17833     done
17834   fi
17835
17836
17837
17838
17839
17840
17841
17842
17843     ICONV_CONST=;
17844   REPLACE_ICONV=0;
17845   REPLACE_ICONV_OPEN=0;
17846   REPLACE_ICONV_UTF=0;
17847   ICONV_H='';
17848   if test "$CXX" != no; then
17849               ICONV_H='iconv.h'
17850      fi
17851
17852    if test -n "$ICONV_H"; then
17853   GL_GENERATE_ICONV_H_TRUE=
17854   GL_GENERATE_ICONV_H_FALSE='#'
17855 else
17856   GL_GENERATE_ICONV_H_TRUE='#'
17857   GL_GENERATE_ICONV_H_FALSE=
17858 fi
17859
17860
17861
17862
17863
17864
17865
17866           am_save_CPPFLAGS="$CPPFLAGS"
17867
17868   for element in $INCICONV; do
17869     haveit=
17870     for x in $CPPFLAGS; do
17871
17872   acl_save_prefix="$prefix"
17873   prefix="$acl_final_prefix"
17874   acl_save_exec_prefix="$exec_prefix"
17875   exec_prefix="$acl_final_exec_prefix"
17876   eval x=\"$x\"
17877   exec_prefix="$acl_save_exec_prefix"
17878   prefix="$acl_save_prefix"
17879
17880       if test "X$x" = "X$element"; then
17881         haveit=yes
17882         break
17883       fi
17884     done
17885     if test -z "$haveit"; then
17886       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17887     fi
17888   done
17889
17890
17891   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
17892 printf %s "checking for iconv... " >&6; }
17893 if test ${am_cv_func_iconv+y}
17894 then :
17895   printf %s "(cached) " >&6
17896 else $as_nop
17897
17898     am_cv_func_iconv="no, consider installing GNU libiconv"
17899     am_cv_lib_iconv=no
17900     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17901 /* end confdefs.h.  */
17902
17903 #include <stdlib.h>
17904 #include <iconv.h>
17905
17906 int
17907 main (void)
17908 {
17909 iconv_t cd = iconv_open("","");
17910            iconv(cd,NULL,NULL,NULL,NULL);
17911            iconv_close(cd);
17912   ;
17913   return 0;
17914 }
17915 _ACEOF
17916 if ac_fn_c_try_link "$LINENO"
17917 then :
17918   am_cv_func_iconv=yes
17919 fi
17920 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17921     conftest$ac_exeext conftest.$ac_ext
17922     if test "$am_cv_func_iconv" != yes; then
17923       am_save_LIBS="$LIBS"
17924       LIBS="$LIBS $LIBICONV"
17925       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17926 /* end confdefs.h.  */
17927
17928 #include <stdlib.h>
17929 #include <iconv.h>
17930
17931 int
17932 main (void)
17933 {
17934 iconv_t cd = iconv_open("","");
17935              iconv(cd,NULL,NULL,NULL,NULL);
17936              iconv_close(cd);
17937   ;
17938   return 0;
17939 }
17940 _ACEOF
17941 if ac_fn_c_try_link "$LINENO"
17942 then :
17943   am_cv_lib_iconv=yes
17944         am_cv_func_iconv=yes
17945 fi
17946 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17947     conftest$ac_exeext conftest.$ac_ext
17948       LIBS="$am_save_LIBS"
17949     fi
17950
17951 fi
17952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
17953 printf "%s\n" "$am_cv_func_iconv" >&6; }
17954   if test "$am_cv_func_iconv" = yes; then
17955     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
17956 printf %s "checking for working iconv... " >&6; }
17957 if test ${am_cv_func_iconv_works+y}
17958 then :
17959   printf %s "(cached) " >&6
17960 else $as_nop
17961
17962                   am_save_LIBS="$LIBS"
17963       if test $am_cv_lib_iconv = yes; then
17964         LIBS="$LIBS $LIBICONV"
17965       fi
17966       am_cv_func_iconv_works=no
17967       for ac_iconv_const in '' 'const'; do
17968         if test "$cross_compiling" = yes
17969 then :
17970   case "$host_os" in
17971              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
17972              *)            am_cv_func_iconv_works="guessing yes" ;;
17973            esac
17974 else $as_nop
17975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17976 /* end confdefs.h.  */
17977
17978 #include <iconv.h>
17979 #include <string.h>
17980
17981 #ifndef ICONV_CONST
17982 # define ICONV_CONST $ac_iconv_const
17983 #endif
17984
17985 int
17986 main (void)
17987 {
17988 int result = 0;
17989   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
17990      successful returns.  This is even documented in
17991      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
17992   {
17993     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
17994     if (cd_utf8_to_88591 != (iconv_t)(-1))
17995       {
17996         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
17997         char buf[10];
17998         ICONV_CONST char *inptr = input;
17999         size_t inbytesleft = strlen (input);
18000         char *outptr = buf;
18001         size_t outbytesleft = sizeof (buf);
18002         size_t res = iconv (cd_utf8_to_88591,
18003                             &inptr, &inbytesleft,
18004                             &outptr, &outbytesleft);
18005         if (res == 0)
18006           result |= 1;
18007         iconv_close (cd_utf8_to_88591);
18008       }
18009   }
18010   /* Test against Solaris 10 bug: Failures are not distinguishable from
18011      successful returns.  */
18012   {
18013     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
18014     if (cd_ascii_to_88591 != (iconv_t)(-1))
18015       {
18016         static ICONV_CONST char input[] = "\263";
18017         char buf[10];
18018         ICONV_CONST char *inptr = input;
18019         size_t inbytesleft = strlen (input);
18020         char *outptr = buf;
18021         size_t outbytesleft = sizeof (buf);
18022         size_t res = iconv (cd_ascii_to_88591,
18023                             &inptr, &inbytesleft,
18024                             &outptr, &outbytesleft);
18025         if (res == 0)
18026           result |= 2;
18027         iconv_close (cd_ascii_to_88591);
18028       }
18029   }
18030   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
18031   {
18032     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
18033     if (cd_88591_to_utf8 != (iconv_t)(-1))
18034       {
18035         static ICONV_CONST char input[] = "\304";
18036         static char buf[2] = { (char)0xDE, (char)0xAD };
18037         ICONV_CONST char *inptr = input;
18038         size_t inbytesleft = 1;
18039         char *outptr = buf;
18040         size_t outbytesleft = 1;
18041         size_t res = iconv (cd_88591_to_utf8,
18042                             &inptr, &inbytesleft,
18043                             &outptr, &outbytesleft);
18044         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
18045           result |= 4;
18046         iconv_close (cd_88591_to_utf8);
18047       }
18048   }
18049 #if 0 /* This bug could be worked around by the caller.  */
18050   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
18051   {
18052     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
18053     if (cd_88591_to_utf8 != (iconv_t)(-1))
18054       {
18055         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
18056         char buf[50];
18057         ICONV_CONST char *inptr = input;
18058         size_t inbytesleft = strlen (input);
18059         char *outptr = buf;
18060         size_t outbytesleft = sizeof (buf);
18061         size_t res = iconv (cd_88591_to_utf8,
18062                             &inptr, &inbytesleft,
18063                             &outptr, &outbytesleft);
18064         if ((int)res > 0)
18065           result |= 8;
18066         iconv_close (cd_88591_to_utf8);
18067       }
18068   }
18069 #endif
18070   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
18071      provided.  */
18072   {
18073     /* Try standardized names.  */
18074     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
18075     /* Try IRIX, OSF/1 names.  */
18076     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
18077     /* Try AIX names.  */
18078     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
18079     /* Try HP-UX names.  */
18080     iconv_t cd4 = iconv_open ("utf8", "eucJP");
18081     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
18082         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
18083       result |= 16;
18084     if (cd1 != (iconv_t)(-1))
18085       iconv_close (cd1);
18086     if (cd2 != (iconv_t)(-1))
18087       iconv_close (cd2);
18088     if (cd3 != (iconv_t)(-1))
18089       iconv_close (cd3);
18090     if (cd4 != (iconv_t)(-1))
18091       iconv_close (cd4);
18092   }
18093   return result;
18094
18095   ;
18096   return 0;
18097 }
18098 _ACEOF
18099 if ac_fn_c_try_run "$LINENO"
18100 then :
18101   am_cv_func_iconv_works=yes
18102 fi
18103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18104   conftest.$ac_objext conftest.beam conftest.$ac_ext
18105 fi
18106
18107         test "$am_cv_func_iconv_works" = no || break
18108       done
18109       LIBS="$am_save_LIBS"
18110
18111 fi
18112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
18113 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
18114     case "$am_cv_func_iconv_works" in
18115       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
18116       *)   am_func_iconv=yes ;;
18117     esac
18118   else
18119     am_func_iconv=no am_cv_lib_iconv=no
18120   fi
18121   if test "$am_func_iconv" = yes; then
18122
18123 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
18124
18125   fi
18126   if test "$am_cv_lib_iconv" = yes; then
18127     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
18128 printf %s "checking how to link with libiconv... " >&6; }
18129     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
18130 printf "%s\n" "$LIBICONV" >&6; }
18131   else
18132             CPPFLAGS="$am_save_CPPFLAGS"
18133     LIBICONV=
18134     LTLIBICONV=
18135   fi
18136
18137
18138
18139   if test "$am_cv_func_iconv" = yes; then
18140     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
18141 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
18142 if test ${gl_cv_iconv_nonconst+y}
18143 then :
18144   printf %s "(cached) " >&6
18145 else $as_nop
18146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18147 /* end confdefs.h.  */
18148
18149 #include <stdlib.h>
18150 #include <iconv.h>
18151 extern
18152 #ifdef __cplusplus
18153 "C"
18154 #endif
18155 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
18156
18157 int
18158 main (void)
18159 {
18160
18161   ;
18162   return 0;
18163 }
18164 _ACEOF
18165 if ac_fn_c_try_compile "$LINENO"
18166 then :
18167   gl_cv_iconv_nonconst=yes
18168 else $as_nop
18169   gl_cv_iconv_nonconst=no
18170 fi
18171 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18172
18173 fi
18174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
18175 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
18176   else
18177             gl_cv_iconv_nonconst=yes
18178   fi
18179   if test $gl_cv_iconv_nonconst = yes; then
18180     iconv_arg1=""
18181   else
18182     iconv_arg1="const"
18183   fi
18184
18185 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
18186
18187
18188      if test $gl_cv_iconv_nonconst != yes; then
18189        ICONV_CONST="const"
18190      fi
18191
18192
18193
18194
18195   GL_M4_GNULIB_ICONV=0
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212      if test $gl_cv_have_include_next = yes; then
18213        gl_cv_next_iconv_h='<'iconv.h'>'
18214      else
18215        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
18216 printf %s "checking absolute name of <iconv.h>... " >&6; }
18217 if test ${gl_cv_next_iconv_h+y}
18218 then :
18219   printf %s "(cached) " >&6
18220 else $as_nop
18221
18222              if test $ac_cv_header_iconv_h = yes; then
18223
18224
18225
18226
18227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18228 /* end confdefs.h.  */
18229 #include <iconv.h>
18230 _ACEOF
18231                 case "$host_os" in
18232     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18233     *)    gl_absname_cpp="$ac_cpp" ;;
18234   esac
18235
18236   case "$host_os" in
18237     mingw*)
18238                                           gl_dirsep_regex='[/\\]'
18239       ;;
18240     *)
18241       gl_dirsep_regex='\/'
18242       ;;
18243   esac
18244       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18245   gl_header_literal_regex=`echo 'iconv.h' \
18246                            | sed -e "$gl_make_literal_regex_sed"`
18247   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18248       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18249       s|^/[^/]|//&|
18250       p
18251       q
18252     }'
18253
18254         gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18255   sed -n "$gl_absolute_header_sed"`
18256
18257            gl_header=$gl_cv_absolute_iconv_h
18258            gl_cv_next_iconv_h='"'$gl_header'"'
18259           else
18260                gl_cv_next_iconv_h='<'iconv.h'>'
18261              fi
18262
18263
18264 fi
18265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
18266 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
18267      fi
18268      NEXT_ICONV_H=$gl_cv_next_iconv_h
18269
18270      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18271        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18272        gl_next_as_first_directive='<'iconv.h'>'
18273      else
18274        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18275        gl_next_as_first_directive=$gl_cv_next_iconv_h
18276      fi
18277      NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298      if test $gl_cv_have_include_next = yes; then
18299        gl_cv_next_limits_h='<'limits.h'>'
18300      else
18301        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
18302 printf %s "checking absolute name of <limits.h>... " >&6; }
18303 if test ${gl_cv_next_limits_h+y}
18304 then :
18305   printf %s "(cached) " >&6
18306 else $as_nop
18307
18308              if test $ac_cv_header_limits_h = yes; then
18309
18310
18311
18312
18313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18314 /* end confdefs.h.  */
18315 #include <limits.h>
18316 _ACEOF
18317                 case "$host_os" in
18318     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18319     *)    gl_absname_cpp="$ac_cpp" ;;
18320   esac
18321
18322   case "$host_os" in
18323     mingw*)
18324                                           gl_dirsep_regex='[/\\]'
18325       ;;
18326     *)
18327       gl_dirsep_regex='\/'
18328       ;;
18329   esac
18330       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18331   gl_header_literal_regex=`echo 'limits.h' \
18332                            | sed -e "$gl_make_literal_regex_sed"`
18333   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18334       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18335       s|^/[^/]|//&|
18336       p
18337       q
18338     }'
18339
18340         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18341   sed -n "$gl_absolute_header_sed"`
18342
18343            gl_header=$gl_cv_absolute_limits_h
18344            gl_cv_next_limits_h='"'$gl_header'"'
18345           else
18346                gl_cv_next_limits_h='<'limits.h'>'
18347              fi
18348
18349
18350 fi
18351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
18352 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
18353      fi
18354      NEXT_LIMITS_H=$gl_cv_next_limits_h
18355
18356      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18357        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18358        gl_next_as_first_directive='<'limits.h'>'
18359      else
18360        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18361        gl_next_as_first_directive=$gl_cv_next_limits_h
18362      fi
18363      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
18364
18365
18366
18367
18368
18369   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
18370 printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
18371 if test ${gl_cv_header_limits_width+y}
18372 then :
18373   printf %s "(cached) " >&6
18374 else $as_nop
18375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18376 /* end confdefs.h.  */
18377 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
18378              #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
18379             #endif
18380             #include <limits.h>
18381             long long llm = LLONG_MAX;
18382             int wb = WORD_BIT;
18383             int ullw = ULLONG_WIDTH;
18384
18385 int
18386 main (void)
18387 {
18388
18389   ;
18390   return 0;
18391 }
18392 _ACEOF
18393 if ac_fn_c_try_compile "$LINENO"
18394 then :
18395   gl_cv_header_limits_width=yes
18396 else $as_nop
18397   gl_cv_header_limits_width=no
18398 fi
18399 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18400 fi
18401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
18402 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
18403   if test "$gl_cv_header_limits_width" = yes; then
18404     LIMITS_H=
18405   else
18406     LIMITS_H=limits.h
18407   fi
18408
18409    if test -n "$LIMITS_H"; then
18410   GL_GENERATE_LIMITS_H_TRUE=
18411   GL_GENERATE_LIMITS_H_FALSE='#'
18412 else
18413   GL_GENERATE_LIMITS_H_TRUE='#'
18414   GL_GENERATE_LIMITS_H_FALSE=
18415 fi
18416
18417
18418
18419   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
18420 printf %s "checking for wint_t... " >&6; }
18421 if test ${gt_cv_c_wint_t+y}
18422 then :
18423   printf %s "(cached) " >&6
18424 else $as_nop
18425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18426 /* end confdefs.h.  */
18427 #include <wchar.h>
18428             wint_t foo = (wchar_t)'\0';
18429 int
18430 main (void)
18431 {
18432
18433   ;
18434   return 0;
18435 }
18436 _ACEOF
18437 if ac_fn_c_try_compile "$LINENO"
18438 then :
18439   gt_cv_c_wint_t=yes
18440 else $as_nop
18441   gt_cv_c_wint_t=no
18442 fi
18443 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18444 fi
18445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
18446 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
18447   if test $gt_cv_c_wint_t = yes; then
18448
18449 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
18450
18451
18452             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
18453 printf %s "checking whether wint_t is large enough... " >&6; }
18454 if test ${gl_cv_type_wint_t_large_enough+y}
18455 then :
18456   printf %s "(cached) " >&6
18457 else $as_nop
18458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18459 /* end confdefs.h.  */
18460 #include <wchar.h>
18461               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
18462
18463 int
18464 main (void)
18465 {
18466
18467   ;
18468   return 0;
18469 }
18470 _ACEOF
18471 if ac_fn_c_try_compile "$LINENO"
18472 then :
18473   gl_cv_type_wint_t_large_enough=yes
18474 else $as_nop
18475   gl_cv_type_wint_t_large_enough=no
18476 fi
18477 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18478 fi
18479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
18480 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
18481     if test $gl_cv_type_wint_t_large_enough = no; then
18482       GNULIBHEADERS_OVERRIDE_WINT_T=1
18483     else
18484       GNULIBHEADERS_OVERRIDE_WINT_T=0
18485     fi
18486   else
18487     GNULIBHEADERS_OVERRIDE_WINT_T=0
18488   fi
18489
18490
18491
18492     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
18493 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
18494 if test ${gl_cv_c_multiarch+y}
18495 then :
18496   printf %s "(cached) " >&6
18497 else $as_nop
18498   gl_cv_c_multiarch=no
18499      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18500 /* end confdefs.h.  */
18501 #ifndef __APPLE_CC__
18502             not a universal capable compiler
18503            #endif
18504            typedef int dummy;
18505
18506 _ACEOF
18507 if ac_fn_c_try_compile "$LINENO"
18508 then :
18509
18510                         arch=
18511         prev=
18512         for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18513           if test -n "$prev"; then
18514             case $word in
18515               i?86 | x86_64 | ppc | ppc64 | arm | arm64)
18516                 if test -z "$arch" || test "$arch" = "$word"; then
18517                   arch="$word"
18518                 else
18519                   gl_cv_c_multiarch=yes
18520                 fi
18521                 ;;
18522             esac
18523             prev=
18524           else
18525             if test "x$word" = "x-arch"; then
18526               prev=arch
18527             fi
18528           fi
18529         done
18530
18531 fi
18532 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18533
18534 fi
18535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
18536 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
18537   if test $gl_cv_c_multiarch = yes; then
18538     APPLE_UNIVERSAL_BUILD=1
18539   else
18540     APPLE_UNIVERSAL_BUILD=0
18541   fi
18542
18543
18544
18545
18546
18547
18548
18549
18550 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
18551
18552
18553 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
18554
18555
18556
18557   if test $ac_cv_header_wchar_h = yes; then
18558     HAVE_WCHAR_H=1
18559   else
18560     HAVE_WCHAR_H=0
18561   fi
18562
18563
18564
18565   if test $ac_cv_header_inttypes_h = yes; then
18566     HAVE_INTTYPES_H=1
18567   else
18568     HAVE_INTTYPES_H=0
18569   fi
18570
18571
18572
18573   if test $ac_cv_header_sys_types_h = yes; then
18574     HAVE_SYS_TYPES_H=1
18575   else
18576     HAVE_SYS_TYPES_H=0
18577   fi
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589      if test $gl_cv_have_include_next = yes; then
18590        gl_cv_next_stdint_h='<'stdint.h'>'
18591      else
18592        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18593 printf %s "checking absolute name of <stdint.h>... " >&6; }
18594 if test ${gl_cv_next_stdint_h+y}
18595 then :
18596   printf %s "(cached) " >&6
18597 else $as_nop
18598
18599              if test $ac_cv_header_stdint_h = yes; then
18600
18601
18602
18603
18604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18605 /* end confdefs.h.  */
18606 #include <stdint.h>
18607 _ACEOF
18608                 case "$host_os" in
18609     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18610     *)    gl_absname_cpp="$ac_cpp" ;;
18611   esac
18612
18613   case "$host_os" in
18614     mingw*)
18615                                           gl_dirsep_regex='[/\\]'
18616       ;;
18617     *)
18618       gl_dirsep_regex='\/'
18619       ;;
18620   esac
18621       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18622   gl_header_literal_regex=`echo 'stdint.h' \
18623                            | sed -e "$gl_make_literal_regex_sed"`
18624   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18625       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18626       s|^/[^/]|//&|
18627       p
18628       q
18629     }'
18630
18631         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18632   sed -n "$gl_absolute_header_sed"`
18633
18634            gl_header=$gl_cv_absolute_stdint_h
18635            gl_cv_next_stdint_h='"'$gl_header'"'
18636           else
18637                gl_cv_next_stdint_h='<'stdint.h'>'
18638              fi
18639
18640
18641 fi
18642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18643 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
18644      fi
18645      NEXT_STDINT_H=$gl_cv_next_stdint_h
18646
18647      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18648        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18649        gl_next_as_first_directive='<'stdint.h'>'
18650      else
18651        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18652        gl_next_as_first_directive=$gl_cv_next_stdint_h
18653      fi
18654      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
18655
18656
18657
18658
18659   if test $ac_cv_header_stdint_h = yes; then
18660     HAVE_STDINT_H=1
18661   else
18662     HAVE_STDINT_H=0
18663   fi
18664
18665
18666     if test $ac_cv_header_stdint_h = yes; then
18667     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18668 printf %s "checking whether stdint.h conforms to C99... " >&6; }
18669 if test ${gl_cv_header_working_stdint_h+y}
18670 then :
18671   printf %s "(cached) " >&6
18672 else $as_nop
18673   gl_cv_header_working_stdint_h=no
18674        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18675 /* end confdefs.h.  */
18676
18677
18678 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18679 #define __STDC_CONSTANT_MACROS 1
18680 #define __STDC_LIMIT_MACROS 1
18681 #include <stdint.h>
18682 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
18683 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
18684 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18685 #endif
18686
18687
18688   #include <stddef.h>
18689   #include <signal.h>
18690   #if HAVE_WCHAR_H
18691   # include <wchar.h>
18692   #endif
18693
18694
18695 #ifdef INT8_MAX
18696 int8_t a1 = INT8_MAX;
18697 int8_t a1min = INT8_MIN;
18698 #endif
18699 #ifdef INT16_MAX
18700 int16_t a2 = INT16_MAX;
18701 int16_t a2min = INT16_MIN;
18702 #endif
18703 #ifdef INT32_MAX
18704 int32_t a3 = INT32_MAX;
18705 int32_t a3min = INT32_MIN;
18706 #endif
18707 #ifdef INT64_MAX
18708 int64_t a4 = INT64_MAX;
18709 int64_t a4min = INT64_MIN;
18710 #endif
18711 #ifdef UINT8_MAX
18712 uint8_t b1 = UINT8_MAX;
18713 #else
18714 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18715 #endif
18716 #ifdef UINT16_MAX
18717 uint16_t b2 = UINT16_MAX;
18718 #endif
18719 #ifdef UINT32_MAX
18720 uint32_t b3 = UINT32_MAX;
18721 #endif
18722 #ifdef UINT64_MAX
18723 uint64_t b4 = UINT64_MAX;
18724 #endif
18725 int_least8_t c1 = INT8_C (0x7f);
18726 int_least8_t c1max = INT_LEAST8_MAX;
18727 int_least8_t c1min = INT_LEAST8_MIN;
18728 int_least16_t c2 = INT16_C (0x7fff);
18729 int_least16_t c2max = INT_LEAST16_MAX;
18730 int_least16_t c2min = INT_LEAST16_MIN;
18731 int_least32_t c3 = INT32_C (0x7fffffff);
18732 int_least32_t c3max = INT_LEAST32_MAX;
18733 int_least32_t c3min = INT_LEAST32_MIN;
18734 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18735 int_least64_t c4max = INT_LEAST64_MAX;
18736 int_least64_t c4min = INT_LEAST64_MIN;
18737 uint_least8_t d1 = UINT8_C (0xff);
18738 uint_least8_t d1max = UINT_LEAST8_MAX;
18739 uint_least16_t d2 = UINT16_C (0xffff);
18740 uint_least16_t d2max = UINT_LEAST16_MAX;
18741 uint_least32_t d3 = UINT32_C (0xffffffff);
18742 uint_least32_t d3max = UINT_LEAST32_MAX;
18743 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18744 uint_least64_t d4max = UINT_LEAST64_MAX;
18745 int_fast8_t e1 = INT_FAST8_MAX;
18746 int_fast8_t e1min = INT_FAST8_MIN;
18747 int_fast16_t e2 = INT_FAST16_MAX;
18748 int_fast16_t e2min = INT_FAST16_MIN;
18749 int_fast32_t e3 = INT_FAST32_MAX;
18750 int_fast32_t e3min = INT_FAST32_MIN;
18751 int_fast64_t e4 = INT_FAST64_MAX;
18752 int_fast64_t e4min = INT_FAST64_MIN;
18753 uint_fast8_t f1 = UINT_FAST8_MAX;
18754 uint_fast16_t f2 = UINT_FAST16_MAX;
18755 uint_fast32_t f3 = UINT_FAST32_MAX;
18756 uint_fast64_t f4 = UINT_FAST64_MAX;
18757 #ifdef INTPTR_MAX
18758 intptr_t g = INTPTR_MAX;
18759 intptr_t gmin = INTPTR_MIN;
18760 #endif
18761 #ifdef UINTPTR_MAX
18762 uintptr_t h = UINTPTR_MAX;
18763 #endif
18764 intmax_t i = INTMAX_MAX;
18765 uintmax_t j = UINTMAX_MAX;
18766
18767 /* Check that SIZE_MAX has the correct type, if possible.  */
18768 #if 201112 <= __STDC_VERSION__
18769 int k = _Generic (SIZE_MAX, size_t: 0);
18770 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
18771        || (0x5110 <= __SUNPRO_C && !__STDC__))
18772 extern size_t k;
18773 extern __typeof__ (SIZE_MAX) k;
18774 #endif
18775
18776 #include <limits.h> /* for CHAR_BIT */
18777 #define TYPE_MINIMUM(t) \
18778   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18779 #define TYPE_MAXIMUM(t) \
18780   ((t) ((t) 0 < (t) -1 \
18781         ? (t) -1 \
18782         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18783 struct s {
18784   int check_PTRDIFF:
18785       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18786       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18787       ? 1 : -1;
18788   /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
18789   int check_SIG_ATOMIC:
18790       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18791       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18792       ? 1 : -1;
18793   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18794   int check_WCHAR:
18795       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18796       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18797       ? 1 : -1;
18798   /* Detect bug in mingw.  */
18799   int check_WINT:
18800       WINT_MIN == TYPE_MINIMUM (wint_t)
18801       && WINT_MAX == TYPE_MAXIMUM (wint_t)
18802       ? 1 : -1;
18803
18804   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
18805   int check_UINT8_C:
18806         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18807   int check_UINT16_C:
18808         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18809
18810   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
18811 #ifdef UINT8_MAX
18812   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18813 #endif
18814 #ifdef UINT16_MAX
18815   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18816 #endif
18817 #ifdef UINT32_MAX
18818   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18819 #endif
18820 #ifdef UINT64_MAX
18821   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18822 #endif
18823   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18824   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18825   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18826   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18827   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18828   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18829   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18830   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18831   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18832   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18833   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18834 };
18835
18836 int
18837 main (void)
18838 {
18839
18840   ;
18841   return 0;
18842 }
18843 _ACEOF
18844 if ac_fn_c_try_compile "$LINENO"
18845 then :
18846                                                     if test "$cross_compiling" = yes
18847 then :
18848   case "$host_os" in
18849                          # Guess yes on native Windows.
18850                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
18851                          # In general, assume it works.
18852                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
18853                esac
18854
18855 else $as_nop
18856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18857 /* end confdefs.h.  */
18858
18859
18860 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18861 #define __STDC_CONSTANT_MACROS 1
18862 #define __STDC_LIMIT_MACROS 1
18863 #include <stdint.h>
18864
18865
18866   #include <stddef.h>
18867   #include <signal.h>
18868   #if HAVE_WCHAR_H
18869   # include <wchar.h>
18870   #endif
18871
18872
18873 #include <stdio.h>
18874 #include <string.h>
18875 #define MVAL(macro) MVAL1(macro)
18876 #define MVAL1(expression) #expression
18877 static const char *macro_values[] =
18878   {
18879 #ifdef INT8_MAX
18880     MVAL (INT8_MAX),
18881 #endif
18882 #ifdef INT16_MAX
18883     MVAL (INT16_MAX),
18884 #endif
18885 #ifdef INT32_MAX
18886     MVAL (INT32_MAX),
18887 #endif
18888 #ifdef INT64_MAX
18889     MVAL (INT64_MAX),
18890 #endif
18891 #ifdef UINT8_MAX
18892     MVAL (UINT8_MAX),
18893 #endif
18894 #ifdef UINT16_MAX
18895     MVAL (UINT16_MAX),
18896 #endif
18897 #ifdef UINT32_MAX
18898     MVAL (UINT32_MAX),
18899 #endif
18900 #ifdef UINT64_MAX
18901     MVAL (UINT64_MAX),
18902 #endif
18903     NULL
18904   };
18905
18906 int
18907 main (void)
18908 {
18909
18910   const char **mv;
18911   for (mv = macro_values; *mv != NULL; mv++)
18912     {
18913       const char *value = *mv;
18914       /* Test whether it looks like a cast expression.  */
18915       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18916           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18917           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18918           || strncmp (value, "((int)"/*)*/, 6) == 0
18919           || strncmp (value, "((signed short)"/*)*/, 15) == 0
18920           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18921         return mv - macro_values + 1;
18922     }
18923   return 0;
18924
18925   ;
18926   return 0;
18927 }
18928 _ACEOF
18929 if ac_fn_c_try_run "$LINENO"
18930 then :
18931   gl_cv_header_working_stdint_h=yes
18932 fi
18933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18934   conftest.$ac_objext conftest.beam conftest.$ac_ext
18935 fi
18936
18937
18938 fi
18939 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18940
18941 fi
18942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18943 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
18944   fi
18945
18946   HAVE_C99_STDINT_H=0
18947   HAVE_SYS_BITYPES_H=0
18948   HAVE_SYS_INTTYPES_H=0
18949   STDINT_H=stdint.h
18950   case "$gl_cv_header_working_stdint_h" in
18951     *yes)
18952       HAVE_C99_STDINT_H=1
18953                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
18954 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
18955 if test ${gl_cv_header_stdint_without_STDC_macros+y}
18956 then :
18957   printf %s "(cached) " >&6
18958 else $as_nop
18959   gl_cv_header_stdint_without_STDC_macros=no
18960          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18961 /* end confdefs.h.  */
18962
18963
18964 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18965 #include <stdint.h>
18966
18967
18968   #include <stddef.h>
18969   #include <signal.h>
18970   #if HAVE_WCHAR_H
18971   # include <wchar.h>
18972   #endif
18973
18974
18975 intmax_t im = INTMAX_MAX;
18976 int32_t i32 = INT32_C (0x7fffffff);
18977
18978 int
18979 main (void)
18980 {
18981
18982   ;
18983   return 0;
18984 }
18985 _ACEOF
18986 if ac_fn_c_try_compile "$LINENO"
18987 then :
18988   gl_cv_header_stdint_without_STDC_macros=yes
18989 fi
18990 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18991
18992 fi
18993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
18994 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
18995
18996       if test $gl_cv_header_stdint_without_STDC_macros = no; then
18997
18998 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
18999
19000
19001 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
19002
19003       fi
19004       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
19005 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
19006 if test ${gl_cv_header_stdint_width+y}
19007 then :
19008   printf %s "(cached) " >&6
19009 else $as_nop
19010   gl_cv_header_stdint_width=no
19011          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h.  */
19013
19014               /* Work if build is not clean.  */
19015               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
19016               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19017                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19018               #endif
19019               #include <stdint.h>
19020
19021   #include <stddef.h>
19022   #include <signal.h>
19023   #if HAVE_WCHAR_H
19024   # include <wchar.h>
19025   #endif
19026
19027               int iw = UINTMAX_WIDTH;
19028
19029 int
19030 main (void)
19031 {
19032
19033   ;
19034   return 0;
19035 }
19036 _ACEOF
19037 if ac_fn_c_try_compile "$LINENO"
19038 then :
19039   gl_cv_header_stdint_width=yes
19040 fi
19041 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19042 fi
19043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
19044 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
19045       if test "$gl_cv_header_stdint_width" = yes; then
19046         STDINT_H=
19047       fi
19048       ;;
19049     *)
19050                   ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
19051 if test "x$ac_cv_header_sys_inttypes_h" = xyes
19052 then :
19053   printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
19054
19055 fi
19056 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
19057 if test "x$ac_cv_header_sys_bitypes_h" = xyes
19058 then :
19059   printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
19060
19061 fi
19062
19063       if test $ac_cv_header_sys_inttypes_h = yes; then
19064         HAVE_SYS_INTTYPES_H=1
19065       fi
19066       if test $ac_cv_header_sys_bitypes_h = yes; then
19067         HAVE_SYS_BITYPES_H=1
19068       fi
19069
19070
19071   if test $APPLE_UNIVERSAL_BUILD = 0; then
19072
19073
19074   for gltype in ptrdiff_t size_t ; do
19075     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19076 printf %s "checking for bit size of $gltype... " >&6; }
19077 if eval test \${gl_cv_bitsizeof_${gltype}+y}
19078 then :
19079   printf %s "(cached) " >&6
19080 else $as_nop
19081   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
19082   #include <stddef.h>
19083   #include <signal.h>
19084   #if HAVE_WCHAR_H
19085   # include <wchar.h>
19086   #endif
19087
19088 #include <limits.h>"
19089 then :
19090
19091 else $as_nop
19092   result=unknown
19093 fi
19094
19095        eval gl_cv_bitsizeof_${gltype}=\$result
19096
19097 fi
19098 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19099                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19100 printf "%s\n" "$ac_res" >&6; }
19101     eval result=\$gl_cv_bitsizeof_${gltype}
19102     if test $result = unknown; then
19103                                                 result=0
19104     fi
19105     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19106     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
19107
19108     eval BITSIZEOF_${GLTYPE}=\$result
19109   done
19110
19111
19112   fi
19113
19114
19115   for gltype in sig_atomic_t wchar_t wint_t ; do
19116     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19117 printf %s "checking for bit size of $gltype... " >&6; }
19118 if eval test \${gl_cv_bitsizeof_${gltype}+y}
19119 then :
19120   printf %s "(cached) " >&6
19121 else $as_nop
19122   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
19123   #include <stddef.h>
19124   #include <signal.h>
19125   #if HAVE_WCHAR_H
19126   # include <wchar.h>
19127   #endif
19128
19129 #include <limits.h>"
19130 then :
19131
19132 else $as_nop
19133   result=unknown
19134 fi
19135
19136        eval gl_cv_bitsizeof_${gltype}=\$result
19137
19138 fi
19139 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19140                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19141 printf "%s\n" "$ac_res" >&6; }
19142     eval result=\$gl_cv_bitsizeof_${gltype}
19143     if test $result = unknown; then
19144                                                 result=0
19145     fi
19146     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19147     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
19148
19149     eval BITSIZEOF_${GLTYPE}=\$result
19150   done
19151
19152
19153
19154
19155   for gltype in sig_atomic_t wchar_t wint_t ; do
19156     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19157 printf %s "checking whether $gltype is signed... " >&6; }
19158 if eval test \${gl_cv_type_${gltype}_signed+y}
19159 then :
19160   printf %s "(cached) " >&6
19161 else $as_nop
19162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163 /* end confdefs.h.  */
19164
19165   #include <stddef.h>
19166   #include <signal.h>
19167   #if HAVE_WCHAR_H
19168   # include <wchar.h>
19169   #endif
19170
19171             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
19172 int
19173 main (void)
19174 {
19175
19176   ;
19177   return 0;
19178 }
19179 _ACEOF
19180 if ac_fn_c_try_compile "$LINENO"
19181 then :
19182   result=yes
19183 else $as_nop
19184   result=no
19185 fi
19186 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19187        eval gl_cv_type_${gltype}_signed=\$result
19188
19189 fi
19190 eval ac_res=\$gl_cv_type_${gltype}_signed
19191                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19192 printf "%s\n" "$ac_res" >&6; }
19193     eval result=\$gl_cv_type_${gltype}_signed
19194     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19195     if test "$result" = yes; then
19196       printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
19197
19198       eval HAVE_SIGNED_${GLTYPE}=1
19199     else
19200       eval HAVE_SIGNED_${GLTYPE}=0
19201     fi
19202   done
19203
19204
19205   gl_cv_type_ptrdiff_t_signed=yes
19206   gl_cv_type_size_t_signed=no
19207   if test $APPLE_UNIVERSAL_BUILD = 0; then
19208
19209
19210   for gltype in ptrdiff_t size_t ; do
19211     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19212 printf %s "checking for $gltype integer literal suffix... " >&6; }
19213 if eval test \${gl_cv_type_${gltype}_suffix+y}
19214 then :
19215   printf %s "(cached) " >&6
19216 else $as_nop
19217   eval gl_cv_type_${gltype}_suffix=no
19218        eval result=\$gl_cv_type_${gltype}_signed
19219        if test "$result" = yes; then
19220          glsufu=
19221        else
19222          glsufu=u
19223        fi
19224        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19225          case $glsuf in
19226            '')  gltype1='int';;
19227            l)   gltype1='long int';;
19228            ll)  gltype1='long long int';;
19229            i64) gltype1='__int64';;
19230            u)   gltype1='unsigned int';;
19231            ul)  gltype1='unsigned long int';;
19232            ull) gltype1='unsigned long long int';;
19233            ui64)gltype1='unsigned __int64';;
19234          esac
19235          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19236 /* end confdefs.h.  */
19237
19238   #include <stddef.h>
19239   #include <signal.h>
19240   #if HAVE_WCHAR_H
19241   # include <wchar.h>
19242   #endif
19243
19244               extern $gltype foo;
19245               extern $gltype1 foo;
19246 int
19247 main (void)
19248 {
19249
19250   ;
19251   return 0;
19252 }
19253 _ACEOF
19254 if ac_fn_c_try_compile "$LINENO"
19255 then :
19256   eval gl_cv_type_${gltype}_suffix=\$glsuf
19257 fi
19258 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19259          eval result=\$gl_cv_type_${gltype}_suffix
19260          test "$result" != no && break
19261        done
19262 fi
19263 eval ac_res=\$gl_cv_type_${gltype}_suffix
19264                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19265 printf "%s\n" "$ac_res" >&6; }
19266     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19267     eval result=\$gl_cv_type_${gltype}_suffix
19268     test "$result" = no && result=
19269     eval ${GLTYPE}_SUFFIX=\$result
19270     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
19271
19272   done
19273
19274
19275   fi
19276
19277
19278   for gltype in sig_atomic_t wchar_t wint_t ; do
19279     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19280 printf %s "checking for $gltype integer literal suffix... " >&6; }
19281 if eval test \${gl_cv_type_${gltype}_suffix+y}
19282 then :
19283   printf %s "(cached) " >&6
19284 else $as_nop
19285   eval gl_cv_type_${gltype}_suffix=no
19286        eval result=\$gl_cv_type_${gltype}_signed
19287        if test "$result" = yes; then
19288          glsufu=
19289        else
19290          glsufu=u
19291        fi
19292        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19293          case $glsuf in
19294            '')  gltype1='int';;
19295            l)   gltype1='long int';;
19296            ll)  gltype1='long long int';;
19297            i64) gltype1='__int64';;
19298            u)   gltype1='unsigned int';;
19299            ul)  gltype1='unsigned long int';;
19300            ull) gltype1='unsigned long long int';;
19301            ui64)gltype1='unsigned __int64';;
19302          esac
19303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19304 /* end confdefs.h.  */
19305
19306   #include <stddef.h>
19307   #include <signal.h>
19308   #if HAVE_WCHAR_H
19309   # include <wchar.h>
19310   #endif
19311
19312               extern $gltype foo;
19313               extern $gltype1 foo;
19314 int
19315 main (void)
19316 {
19317
19318   ;
19319   return 0;
19320 }
19321 _ACEOF
19322 if ac_fn_c_try_compile "$LINENO"
19323 then :
19324   eval gl_cv_type_${gltype}_suffix=\$glsuf
19325 fi
19326 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19327          eval result=\$gl_cv_type_${gltype}_suffix
19328          test "$result" != no && break
19329        done
19330 fi
19331 eval ac_res=\$gl_cv_type_${gltype}_suffix
19332                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19333 printf "%s\n" "$ac_res" >&6; }
19334     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19335     eval result=\$gl_cv_type_${gltype}_suffix
19336     test "$result" = no && result=
19337     eval ${GLTYPE}_SUFFIX=\$result
19338     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
19339
19340   done
19341
19342
19343
19344           if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
19345     BITSIZEOF_WINT_T=32
19346   fi
19347
19348       ;;
19349   esac
19350
19351
19352
19353   LIMITS_H='limits.h'
19354    if test -n "$LIMITS_H"; then
19355   GL_GENERATE_LIMITS_H_TRUE=
19356   GL_GENERATE_LIMITS_H_FALSE='#'
19357 else
19358   GL_GENERATE_LIMITS_H_TRUE='#'
19359   GL_GENERATE_LIMITS_H_FALSE=
19360 fi
19361
19362
19363
19364
19365
19366
19367
19368    if test -n "$STDINT_H"; then
19369   GL_GENERATE_STDINT_H_TRUE=
19370   GL_GENERATE_STDINT_H_FALSE='#'
19371 else
19372   GL_GENERATE_STDINT_H_TRUE='#'
19373   GL_GENERATE_STDINT_H_FALSE=
19374 fi
19375
19376
19377
19378     HAVE_DECL_IMAXABS=1;
19379   HAVE_DECL_IMAXDIV=1;
19380   HAVE_DECL_STRTOIMAX=1;
19381   HAVE_DECL_STRTOUMAX=1;
19382   HAVE_IMAXDIV_T=1;
19383   REPLACE_STRTOIMAX=0;
19384   REPLACE_STRTOUMAX=0;
19385   INT32_MAX_LT_INTMAX_MAX=1;
19386   INT64_MAX_EQ_LONG_MAX='defined _LP64';
19387   PRIPTR_PREFIX=__PRIPTR_PREFIX;
19388   UINT32_MAX_LT_UINTMAX_MAX=1;
19389   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405      if test $gl_cv_have_include_next = yes; then
19406        gl_cv_next_inttypes_h='<'inttypes.h'>'
19407      else
19408        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19409 printf %s "checking absolute name of <inttypes.h>... " >&6; }
19410 if test ${gl_cv_next_inttypes_h+y}
19411 then :
19412   printf %s "(cached) " >&6
19413 else $as_nop
19414
19415              if test $ac_cv_header_inttypes_h = yes; then
19416
19417
19418
19419
19420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19421 /* end confdefs.h.  */
19422 #include <inttypes.h>
19423 _ACEOF
19424                 case "$host_os" in
19425     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19426     *)    gl_absname_cpp="$ac_cpp" ;;
19427   esac
19428
19429   case "$host_os" in
19430     mingw*)
19431                                           gl_dirsep_regex='[/\\]'
19432       ;;
19433     *)
19434       gl_dirsep_regex='\/'
19435       ;;
19436   esac
19437       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19438   gl_header_literal_regex=`echo 'inttypes.h' \
19439                            | sed -e "$gl_make_literal_regex_sed"`
19440   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19441       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19442       s|^/[^/]|//&|
19443       p
19444       q
19445     }'
19446
19447         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19448   sed -n "$gl_absolute_header_sed"`
19449
19450            gl_header=$gl_cv_absolute_inttypes_h
19451            gl_cv_next_inttypes_h='"'$gl_header'"'
19452           else
19453                gl_cv_next_inttypes_h='<'inttypes.h'>'
19454              fi
19455
19456
19457 fi
19458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19459 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
19460      fi
19461      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19462
19463      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19464        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19465        gl_next_as_first_directive='<'inttypes.h'>'
19466      else
19467        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19468        gl_next_as_first_directive=$gl_cv_next_inttypes_h
19469      fi
19470      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484   GL_M4_GNULIB_IMAXABS=0
19485
19486
19487
19488   GL_M4_GNULIB_IMAXDIV=0
19489
19490
19491
19492   GL_M4_GNULIB_STRTOIMAX=0
19493
19494
19495
19496   GL_M4_GNULIB_STRTOUMAX=0
19497
19498
19499
19500
19501   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
19502 printf %s "checking where to find the exponent in a 'double'... " >&6; }
19503 if test ${gl_cv_cc_double_expbit0+y}
19504 then :
19505   printf %s "(cached) " >&6
19506 else $as_nop
19507
19508       if test "$cross_compiling" = yes
19509 then :
19510
19511                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19512 /* end confdefs.h.  */
19513
19514 #if defined arm || defined __arm || defined __arm__
19515   mixed_endianness
19516 #endif
19517
19518 _ACEOF
19519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19520   $EGREP "mixed_endianness" >/dev/null 2>&1
19521 then :
19522   gl_cv_cc_double_expbit0="unknown"
19523 else $as_nop
19524
19525                                                          :
19526 if test ${ac_cv_c_bigendian+y}
19527 then :
19528   printf %s "(cached) " >&6
19529 else $as_nop
19530   ac_cv_c_bigendian=unknown
19531     # See if we're dealing with a universal compiler.
19532     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19533 /* end confdefs.h.  */
19534 #ifndef __APPLE_CC__
19535                not a universal capable compiler
19536              #endif
19537              typedef int dummy;
19538
19539 _ACEOF
19540 if ac_fn_c_try_compile "$LINENO"
19541 then :
19542
19543         # Check for potential -arch flags.  It is not universal unless
19544         # there are at least two -arch flags with different values.
19545         ac_arch=
19546         ac_prev=
19547         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19548          if test -n "$ac_prev"; then
19549            case $ac_word in
19550              i?86 | x86_64 | ppc | ppc64)
19551                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19552                  ac_arch=$ac_word
19553                else
19554                  ac_cv_c_bigendian=universal
19555                  break
19556                fi
19557                ;;
19558            esac
19559            ac_prev=
19560          elif test "x$ac_word" = "x-arch"; then
19561            ac_prev=arch
19562          fi
19563        done
19564 fi
19565 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19566     if test $ac_cv_c_bigendian = unknown; then
19567       # See if sys/param.h defines the BYTE_ORDER macro.
19568       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19569 /* end confdefs.h.  */
19570 #include <sys/types.h>
19571              #include <sys/param.h>
19572
19573 int
19574 main (void)
19575 {
19576 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
19577                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
19578                      && LITTLE_ENDIAN)
19579               bogus endian macros
19580              #endif
19581
19582   ;
19583   return 0;
19584 }
19585 _ACEOF
19586 if ac_fn_c_try_compile "$LINENO"
19587 then :
19588   # It does; now see whether it defined to BIG_ENDIAN or not.
19589          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19590 /* end confdefs.h.  */
19591 #include <sys/types.h>
19592                 #include <sys/param.h>
19593
19594 int
19595 main (void)
19596 {
19597 #if BYTE_ORDER != BIG_ENDIAN
19598                  not big endian
19599                 #endif
19600
19601   ;
19602   return 0;
19603 }
19604 _ACEOF
19605 if ac_fn_c_try_compile "$LINENO"
19606 then :
19607   ac_cv_c_bigendian=yes
19608 else $as_nop
19609   ac_cv_c_bigendian=no
19610 fi
19611 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19612 fi
19613 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19614     fi
19615     if test $ac_cv_c_bigendian = unknown; then
19616       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
19617       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19618 /* end confdefs.h.  */
19619 #include <limits.h>
19620
19621 int
19622 main (void)
19623 {
19624 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
19625               bogus endian macros
19626              #endif
19627
19628   ;
19629   return 0;
19630 }
19631 _ACEOF
19632 if ac_fn_c_try_compile "$LINENO"
19633 then :
19634   # It does; now see whether it defined to _BIG_ENDIAN or not.
19635          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636 /* end confdefs.h.  */
19637 #include <limits.h>
19638
19639 int
19640 main (void)
19641 {
19642 #ifndef _BIG_ENDIAN
19643                  not big endian
19644                 #endif
19645
19646   ;
19647   return 0;
19648 }
19649 _ACEOF
19650 if ac_fn_c_try_compile "$LINENO"
19651 then :
19652   ac_cv_c_bigendian=yes
19653 else $as_nop
19654   ac_cv_c_bigendian=no
19655 fi
19656 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19657 fi
19658 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19659     fi
19660     if test $ac_cv_c_bigendian = unknown; then
19661       # Compile a test program.
19662       if test "$cross_compiling" = yes
19663 then :
19664   # Try to guess by grepping values from an object file.
19665          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19666 /* end confdefs.h.  */
19667 unsigned short int ascii_mm[] =
19668                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19669                 unsigned short int ascii_ii[] =
19670                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19671                 int use_ascii (int i) {
19672                   return ascii_mm[i] + ascii_ii[i];
19673                 }
19674                 unsigned short int ebcdic_ii[] =
19675                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19676                 unsigned short int ebcdic_mm[] =
19677                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19678                 int use_ebcdic (int i) {
19679                   return ebcdic_mm[i] + ebcdic_ii[i];
19680                 }
19681                 extern int foo;
19682
19683 int
19684 main (void)
19685 {
19686 return use_ascii (foo) == use_ebcdic (foo);
19687   ;
19688   return 0;
19689 }
19690 _ACEOF
19691 if ac_fn_c_try_compile "$LINENO"
19692 then :
19693   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
19694               ac_cv_c_bigendian=yes
19695             fi
19696             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
19697               if test "$ac_cv_c_bigendian" = unknown; then
19698                 ac_cv_c_bigendian=no
19699               else
19700                 # finding both strings is unlikely to happen, but who knows?
19701                 ac_cv_c_bigendian=unknown
19702               fi
19703             fi
19704 fi
19705 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19706 else $as_nop
19707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19708 /* end confdefs.h.  */
19709 $ac_includes_default
19710 int
19711 main (void)
19712 {
19713
19714              /* Are we little or big endian?  From Harbison&Steele.  */
19715              union
19716              {
19717                long int l;
19718                char c[sizeof (long int)];
19719              } u;
19720              u.l = 1;
19721              return u.c[sizeof (long int) - 1] == 1;
19722
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 if ac_fn_c_try_run "$LINENO"
19728 then :
19729   ac_cv_c_bigendian=no
19730 else $as_nop
19731   ac_cv_c_bigendian=yes
19732 fi
19733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19734   conftest.$ac_objext conftest.beam conftest.$ac_ext
19735 fi
19736
19737     fi
19738 fi
19739 :
19740  case $ac_cv_c_bigendian in #(
19741    yes)
19742      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
19743    no)
19744      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
19745    universal)
19746
19747 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
19748
19749      ;; #(
19750    *)
19751      gl_cv_cc_double_expbit0="unknown" ;;
19752  esac
19753
19754
19755 fi
19756 rm -rf conftest*
19757
19758
19759 else $as_nop
19760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19761 /* end confdefs.h.  */
19762
19763 #include <float.h>
19764 #include <stddef.h>
19765 #include <stdio.h>
19766 #include <string.h>
19767 #define NWORDS \
19768   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19769 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
19770 static unsigned int ored_words[NWORDS];
19771 static unsigned int anded_words[NWORDS];
19772 static void add_to_ored_words (double x)
19773 {
19774   memory_double m;
19775   size_t i;
19776   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
19777   memset (&m, 0, sizeof (memory_double));
19778   m.value = x;
19779   for (i = 0; i < NWORDS; i++)
19780     {
19781       ored_words[i] |= m.word[i];
19782       anded_words[i] &= m.word[i];
19783     }
19784 }
19785 int main ()
19786 {
19787   size_t j;
19788   FILE *fp = fopen ("conftest.out", "w");
19789   if (fp == NULL)
19790     return 1;
19791   for (j = 0; j < NWORDS; j++)
19792     anded_words[j] = ~ (unsigned int) 0;
19793   add_to_ored_words (0.25);
19794   add_to_ored_words (0.5);
19795   add_to_ored_words (1.0);
19796   add_to_ored_words (2.0);
19797   add_to_ored_words (4.0);
19798   /* Remove bits that are common (e.g. if representation of the first mantissa
19799      bit is explicit).  */
19800   for (j = 0; j < NWORDS; j++)
19801     ored_words[j] &= ~anded_words[j];
19802   /* Now find the nonzero word.  */
19803   for (j = 0; j < NWORDS; j++)
19804     if (ored_words[j] != 0)
19805       break;
19806   if (j < NWORDS)
19807     {
19808       size_t i;
19809       for (i = j + 1; i < NWORDS; i++)
19810         if (ored_words[i] != 0)
19811           {
19812             fprintf (fp, "unknown");
19813             return (fclose (fp) != 0);
19814           }
19815       for (i = 0; ; i++)
19816         if ((ored_words[j] >> i) & 1)
19817           {
19818             fprintf (fp, "word %d bit %d", (int) j, (int) i);
19819             return (fclose (fp) != 0);
19820           }
19821     }
19822   fprintf (fp, "unknown");
19823   return (fclose (fp) != 0);
19824 }
19825
19826 _ACEOF
19827 if ac_fn_c_try_run "$LINENO"
19828 then :
19829   gl_cv_cc_double_expbit0=`cat conftest.out`
19830 else $as_nop
19831   gl_cv_cc_double_expbit0="unknown"
19832 fi
19833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19834   conftest.$ac_objext conftest.beam conftest.$ac_ext
19835 fi
19836
19837       rm -f conftest.out
19838
19839 fi
19840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
19841 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
19842   case "$gl_cv_cc_double_expbit0" in
19843     word*bit*)
19844       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19845       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
19846
19847 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
19848
19849
19850 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
19851
19852       ;;
19853   esac
19854
19855
19856   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
19857 printf %s "checking where to find the exponent in a 'float'... " >&6; }
19858 if test ${gl_cv_cc_float_expbit0+y}
19859 then :
19860   printf %s "(cached) " >&6
19861 else $as_nop
19862
19863       if test "$cross_compiling" = yes
19864 then :
19865   gl_cv_cc_float_expbit0="word 0 bit 23"
19866 else $as_nop
19867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19868 /* end confdefs.h.  */
19869
19870 #include <float.h>
19871 #include <stddef.h>
19872 #include <stdio.h>
19873 #include <string.h>
19874 #define NWORDS \
19875   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19876 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
19877 static unsigned int ored_words[NWORDS];
19878 static unsigned int anded_words[NWORDS];
19879 static void add_to_ored_words (float x)
19880 {
19881   memory_float m;
19882   size_t i;
19883   /* Clear it first, in case
19884      sizeof (float) < sizeof (memory_float).  */
19885   memset (&m, 0, sizeof (memory_float));
19886   m.value = x;
19887   for (i = 0; i < NWORDS; i++)
19888     {
19889       ored_words[i] |= m.word[i];
19890       anded_words[i] &= m.word[i];
19891     }
19892 }
19893 int main ()
19894 {
19895   size_t j;
19896   FILE *fp = fopen ("conftest.out", "w");
19897   if (fp == NULL)
19898     return 1;
19899   for (j = 0; j < NWORDS; j++)
19900     anded_words[j] = ~ (unsigned int) 0;
19901   add_to_ored_words (0.25f);
19902   add_to_ored_words (0.5f);
19903   add_to_ored_words (1.0f);
19904   add_to_ored_words (2.0f);
19905   add_to_ored_words (4.0f);
19906   /* Remove bits that are common (e.g. if representation of the first mantissa
19907      bit is explicit).  */
19908   for (j = 0; j < NWORDS; j++)
19909     ored_words[j] &= ~anded_words[j];
19910   /* Now find the nonzero word.  */
19911   for (j = 0; j < NWORDS; j++)
19912     if (ored_words[j] != 0)
19913       break;
19914   if (j < NWORDS)
19915     {
19916       size_t i;
19917       for (i = j + 1; i < NWORDS; i++)
19918         if (ored_words[i] != 0)
19919           {
19920             fprintf (fp, "unknown");
19921             return (fclose (fp) != 0);
19922           }
19923       for (i = 0; ; i++)
19924         if ((ored_words[j] >> i) & 1)
19925           {
19926             fprintf (fp, "word %d bit %d", (int) j, (int) i);
19927             return (fclose (fp) != 0);
19928           }
19929     }
19930   fprintf (fp, "unknown");
19931   return (fclose (fp) != 0);
19932 }
19933
19934 _ACEOF
19935 if ac_fn_c_try_run "$LINENO"
19936 then :
19937   gl_cv_cc_float_expbit0=`cat conftest.out`
19938 else $as_nop
19939   gl_cv_cc_float_expbit0="unknown"
19940 fi
19941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19942   conftest.$ac_objext conftest.beam conftest.$ac_ext
19943 fi
19944
19945       rm -f conftest.out
19946
19947 fi
19948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
19949 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
19950   case "$gl_cv_cc_float_expbit0" in
19951     word*bit*)
19952       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19953       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
19954
19955 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
19956
19957
19958 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
19959
19960       ;;
19961   esac
19962
19963
19964    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
19965 printf %s "checking whether byte ordering is bigendian... " >&6; }
19966 if test ${ac_cv_c_bigendian+y}
19967 then :
19968   printf %s "(cached) " >&6
19969 else $as_nop
19970   ac_cv_c_bigendian=unknown
19971     # See if we're dealing with a universal compiler.
19972     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19973 /* end confdefs.h.  */
19974 #ifndef __APPLE_CC__
19975                not a universal capable compiler
19976              #endif
19977              typedef int dummy;
19978
19979 _ACEOF
19980 if ac_fn_c_try_compile "$LINENO"
19981 then :
19982
19983         # Check for potential -arch flags.  It is not universal unless
19984         # there are at least two -arch flags with different values.
19985         ac_arch=
19986         ac_prev=
19987         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19988          if test -n "$ac_prev"; then
19989            case $ac_word in
19990              i?86 | x86_64 | ppc | ppc64)
19991                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19992                  ac_arch=$ac_word
19993                else
19994                  ac_cv_c_bigendian=universal
19995                  break
19996                fi
19997                ;;
19998            esac
19999            ac_prev=
20000          elif test "x$ac_word" = "x-arch"; then
20001            ac_prev=arch
20002          fi
20003        done
20004 fi
20005 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20006     if test $ac_cv_c_bigendian = unknown; then
20007       # See if sys/param.h defines the BYTE_ORDER macro.
20008       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20009 /* end confdefs.h.  */
20010 #include <sys/types.h>
20011              #include <sys/param.h>
20012
20013 int
20014 main (void)
20015 {
20016 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
20017                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
20018                      && LITTLE_ENDIAN)
20019               bogus endian macros
20020              #endif
20021
20022   ;
20023   return 0;
20024 }
20025 _ACEOF
20026 if ac_fn_c_try_compile "$LINENO"
20027 then :
20028   # It does; now see whether it defined to BIG_ENDIAN or not.
20029          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20030 /* end confdefs.h.  */
20031 #include <sys/types.h>
20032                 #include <sys/param.h>
20033
20034 int
20035 main (void)
20036 {
20037 #if BYTE_ORDER != BIG_ENDIAN
20038                  not big endian
20039                 #endif
20040
20041   ;
20042   return 0;
20043 }
20044 _ACEOF
20045 if ac_fn_c_try_compile "$LINENO"
20046 then :
20047   ac_cv_c_bigendian=yes
20048 else $as_nop
20049   ac_cv_c_bigendian=no
20050 fi
20051 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20052 fi
20053 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20054     fi
20055     if test $ac_cv_c_bigendian = unknown; then
20056       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
20057       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20058 /* end confdefs.h.  */
20059 #include <limits.h>
20060
20061 int
20062 main (void)
20063 {
20064 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
20065               bogus endian macros
20066              #endif
20067
20068   ;
20069   return 0;
20070 }
20071 _ACEOF
20072 if ac_fn_c_try_compile "$LINENO"
20073 then :
20074   # It does; now see whether it defined to _BIG_ENDIAN or not.
20075          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20076 /* end confdefs.h.  */
20077 #include <limits.h>
20078
20079 int
20080 main (void)
20081 {
20082 #ifndef _BIG_ENDIAN
20083                  not big endian
20084                 #endif
20085
20086   ;
20087   return 0;
20088 }
20089 _ACEOF
20090 if ac_fn_c_try_compile "$LINENO"
20091 then :
20092   ac_cv_c_bigendian=yes
20093 else $as_nop
20094   ac_cv_c_bigendian=no
20095 fi
20096 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20097 fi
20098 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20099     fi
20100     if test $ac_cv_c_bigendian = unknown; then
20101       # Compile a test program.
20102       if test "$cross_compiling" = yes
20103 then :
20104   # Try to guess by grepping values from an object file.
20105          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20106 /* end confdefs.h.  */
20107 unsigned short int ascii_mm[] =
20108                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20109                 unsigned short int ascii_ii[] =
20110                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20111                 int use_ascii (int i) {
20112                   return ascii_mm[i] + ascii_ii[i];
20113                 }
20114                 unsigned short int ebcdic_ii[] =
20115                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20116                 unsigned short int ebcdic_mm[] =
20117                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20118                 int use_ebcdic (int i) {
20119                   return ebcdic_mm[i] + ebcdic_ii[i];
20120                 }
20121                 extern int foo;
20122
20123 int
20124 main (void)
20125 {
20126 return use_ascii (foo) == use_ebcdic (foo);
20127   ;
20128   return 0;
20129 }
20130 _ACEOF
20131 if ac_fn_c_try_compile "$LINENO"
20132 then :
20133   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
20134               ac_cv_c_bigendian=yes
20135             fi
20136             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
20137               if test "$ac_cv_c_bigendian" = unknown; then
20138                 ac_cv_c_bigendian=no
20139               else
20140                 # finding both strings is unlikely to happen, but who knows?
20141                 ac_cv_c_bigendian=unknown
20142               fi
20143             fi
20144 fi
20145 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20146 else $as_nop
20147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148 /* end confdefs.h.  */
20149 $ac_includes_default
20150 int
20151 main (void)
20152 {
20153
20154              /* Are we little or big endian?  From Harbison&Steele.  */
20155              union
20156              {
20157                long int l;
20158                char c[sizeof (long int)];
20159              } u;
20160              u.l = 1;
20161              return u.c[sizeof (long int) - 1] == 1;
20162
20163   ;
20164   return 0;
20165 }
20166 _ACEOF
20167 if ac_fn_c_try_run "$LINENO"
20168 then :
20169   ac_cv_c_bigendian=no
20170 else $as_nop
20171   ac_cv_c_bigendian=yes
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 fi
20179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
20180 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
20181  case $ac_cv_c_bigendian in #(
20182    yes)
20183      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
20184 ;; #(
20185    no)
20186       ;; #(
20187    universal)
20188
20189 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
20190
20191      ;; #(
20192    *)
20193      as_fn_error $? "unknown endianness
20194  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
20195  esac
20196
20197
20198
20199     HAVE_ISWBLANK=1;
20200   HAVE_WCTYPE_T=1;
20201   HAVE_WCTRANS_T=1;
20202   REPLACE_ISWBLANK=0;
20203   REPLACE_ISWDIGIT=0;
20204   REPLACE_ISWXDIGIT=0;
20205
20206
20207
20208
20209
20210   if test $ac_cv_header_crtdefs_h = yes; then
20211     HAVE_CRTDEFS_H=1
20212   else
20213     HAVE_CRTDEFS_H=0
20214   fi
20215
20216
20217
20218
20219
20220
20221
20222
20223   if test $ac_cv_func_iswcntrl = yes; then
20224     HAVE_ISWCNTRL=1
20225   else
20226     HAVE_ISWCNTRL=0
20227   fi
20228
20229
20230
20231   if test $gt_cv_c_wint_t = yes; then
20232     HAVE_WINT_T=1
20233   else
20234     HAVE_WINT_T=0
20235   fi
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249      if test $gl_cv_have_include_next = yes; then
20250        gl_cv_next_wctype_h='<'wctype.h'>'
20251      else
20252        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
20253 printf %s "checking absolute name of <wctype.h>... " >&6; }
20254 if test ${gl_cv_next_wctype_h+y}
20255 then :
20256   printf %s "(cached) " >&6
20257 else $as_nop
20258
20259              if test $ac_cv_header_wctype_h = yes; then
20260
20261
20262
20263
20264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20265 /* end confdefs.h.  */
20266 #include <wctype.h>
20267 _ACEOF
20268                 case "$host_os" in
20269     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20270     *)    gl_absname_cpp="$ac_cpp" ;;
20271   esac
20272
20273   case "$host_os" in
20274     mingw*)
20275                                           gl_dirsep_regex='[/\\]'
20276       ;;
20277     *)
20278       gl_dirsep_regex='\/'
20279       ;;
20280   esac
20281       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20282   gl_header_literal_regex=`echo 'wctype.h' \
20283                            | sed -e "$gl_make_literal_regex_sed"`
20284   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20285       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20286       s|^/[^/]|//&|
20287       p
20288       q
20289     }'
20290
20291         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20292   sed -n "$gl_absolute_header_sed"`
20293
20294            gl_header=$gl_cv_absolute_wctype_h
20295            gl_cv_next_wctype_h='"'$gl_header'"'
20296           else
20297                gl_cv_next_wctype_h='<'wctype.h'>'
20298              fi
20299
20300
20301 fi
20302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
20303 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
20304      fi
20305      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
20306
20307      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20308        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20309        gl_next_as_first_directive='<'wctype.h'>'
20310      else
20311        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20312        gl_next_as_first_directive=$gl_cv_next_wctype_h
20313      fi
20314      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
20315
20316
20317
20318
20319   if test $ac_cv_header_wctype_h = yes; then
20320     if test $ac_cv_func_iswcntrl = yes; then
20321                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
20322 printf %s "checking whether iswcntrl works... " >&6; }
20323 if test ${gl_cv_func_iswcntrl_works+y}
20324 then :
20325   printf %s "(cached) " >&6
20326 else $as_nop
20327
20328           if test "$cross_compiling" = yes
20329 then :
20330                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20331 /* end confdefs.h.  */
20332 #include <stdlib.h>
20333                           #if __GNU_LIBRARY__ == 1
20334                           Linux libc5 i18n is broken.
20335                           #endif
20336 int
20337 main (void)
20338 {
20339
20340   ;
20341   return 0;
20342 }
20343 _ACEOF
20344 if ac_fn_c_try_compile "$LINENO"
20345 then :
20346   gl_cv_func_iswcntrl_works="guessing yes"
20347 else $as_nop
20348   gl_cv_func_iswcntrl_works="guessing no"
20349 fi
20350 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20351
20352 else $as_nop
20353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354 /* end confdefs.h.  */
20355
20356                #include <wchar.h>
20357                #include <wctype.h>
20358                int main () { return iswprint ('x') == 0; }
20359
20360 _ACEOF
20361 if ac_fn_c_try_run "$LINENO"
20362 then :
20363   gl_cv_func_iswcntrl_works=yes
20364 else $as_nop
20365   gl_cv_func_iswcntrl_works=no
20366 fi
20367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20368   conftest.$ac_objext conftest.beam conftest.$ac_ext
20369 fi
20370
20371
20372 fi
20373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
20374 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
20375     fi
20376     HAVE_WCTYPE_H=1
20377   else
20378     HAVE_WCTYPE_H=0
20379   fi
20380
20381
20382   if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
20383     REPLACE_ISWCNTRL=1
20384   else
20385     case "$gl_cv_func_iswcntrl_works" in
20386       *yes) REPLACE_ISWCNTRL=0 ;;
20387       *)    REPLACE_ISWCNTRL=1 ;;
20388     esac
20389   fi
20390
20391
20392   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
20393         :
20394   fi
20395
20396   if test $REPLACE_ISWCNTRL = 1; then
20397     REPLACE_TOWLOWER=1
20398   else
20399     ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
20400 if test "x$ac_cv_func_towlower" = xyes
20401 then :
20402   printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
20403
20404 fi
20405
20406     if test $ac_cv_func_towlower = yes; then
20407       REPLACE_TOWLOWER=0
20408     else
20409       ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
20410           #if HAVE_WCTYPE_H
20411           # include <wctype.h>
20412           #endif
20413
20414 " "$ac_c_undeclared_builtin_options" "CFLAGS"
20415 if test "x$ac_cv_have_decl_towlower" = xyes
20416 then :
20417   ac_have_decl=1
20418 else $as_nop
20419   ac_have_decl=0
20420 fi
20421 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
20422
20423       if test $ac_cv_have_decl_towlower = yes; then
20424                                 REPLACE_TOWLOWER=1
20425       else
20426         REPLACE_TOWLOWER=0
20427       fi
20428     fi
20429   fi
20430
20431
20432   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
20433         :
20434   fi
20435
20436           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
20437 printf %s "checking for wctype_t... " >&6; }
20438 if test ${gl_cv_type_wctype_t+y}
20439 then :
20440   printf %s "(cached) " >&6
20441 else $as_nop
20442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443 /* end confdefs.h.  */
20444 #include <wchar.h>
20445             #if HAVE_WCTYPE_H
20446             # include <wctype.h>
20447             #endif
20448             wctype_t a;
20449
20450 int
20451 main (void)
20452 {
20453
20454   ;
20455   return 0;
20456 }
20457 _ACEOF
20458 if ac_fn_c_try_compile "$LINENO"
20459 then :
20460   gl_cv_type_wctype_t=yes
20461 else $as_nop
20462   gl_cv_type_wctype_t=no
20463 fi
20464 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20465
20466 fi
20467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
20468 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
20469   if test $gl_cv_type_wctype_t = no; then
20470     HAVE_WCTYPE_T=0
20471   fi
20472
20473       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
20474 printf %s "checking for wctrans_t... " >&6; }
20475 if test ${gl_cv_type_wctrans_t+y}
20476 then :
20477   printf %s "(cached) " >&6
20478 else $as_nop
20479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20480 /* end confdefs.h.  */
20481 #include <wchar.h>
20482             #include <wctype.h>
20483             wctrans_t a;
20484
20485 int
20486 main (void)
20487 {
20488
20489   ;
20490   return 0;
20491 }
20492 _ACEOF
20493 if ac_fn_c_try_compile "$LINENO"
20494 then :
20495   gl_cv_type_wctrans_t=yes
20496 else $as_nop
20497   gl_cv_type_wctrans_t=no
20498 fi
20499 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20500
20501 fi
20502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
20503 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
20504   if test $gl_cv_type_wctrans_t = no; then
20505     HAVE_WCTRANS_T=0
20506   fi
20507
20508
20509
20510
20511
20512
20513   GL_M4_GNULIB_ISWBLANK=0
20514
20515
20516
20517   GL_M4_GNULIB_ISWDIGIT=0
20518
20519
20520
20521   GL_M4_GNULIB_ISWXDIGIT=0
20522
20523
20524
20525   GL_M4_GNULIB_WCTYPE=0
20526
20527
20528
20529   GL_M4_GNULIB_ISWCTYPE=0
20530
20531
20532
20533   GL_M4_GNULIB_WCTRANS=0
20534
20535
20536
20537   GL_M4_GNULIB_TOWCTRANS=0
20538
20539
20540
20541
20542
20543
20544   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
20545 printf %s "checking for a traditional japanese locale... " >&6; }
20546 if test ${gt_cv_locale_ja+y}
20547 then :
20548   printf %s "(cached) " >&6
20549 else $as_nop
20550
20551     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552 /* end confdefs.h.  */
20553
20554 #include <locale.h>
20555 #include <time.h>
20556 #if HAVE_LANGINFO_CODESET
20557 # include <langinfo.h>
20558 #endif
20559 #include <stdlib.h>
20560 #include <string.h>
20561 struct tm t;
20562 char buf[16];
20563 int main ()
20564 {
20565   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
20566      imitates locale dependent behaviour by looking at the environment
20567      variables, and all locales use the UTF-8 encoding.  */
20568 #if defined __BEOS__ || defined __HAIKU__
20569   return 1;
20570 #else
20571   /* Check whether the given locale name is recognized by the system.  */
20572 # if defined _WIN32 && !defined __CYGWIN__
20573   /* On native Windows, setlocale(category, "") looks at the system settings,
20574      not at the environment variables.  Also, when an encoding suffix such
20575      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20576      category of the locale to "C".  */
20577   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20578       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20579     return 1;
20580 # else
20581   if (setlocale (LC_ALL, "") == NULL) return 1;
20582 # endif
20583   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20584      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20585      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20586      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20587      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20588      some unit tests fail.
20589      On MirBSD 10, when an unsupported locale is specified, setlocale()
20590      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
20591 # if HAVE_LANGINFO_CODESET
20592   {
20593     const char *cs = nl_langinfo (CODESET);
20594     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
20595         || strcmp (cs, "UTF-8") == 0)
20596       return 1;
20597   }
20598 # endif
20599 # ifdef __CYGWIN__
20600   /* On Cygwin, avoid locale names without encoding suffix, because the
20601      locale_charset() function relies on the encoding suffix.  Note that
20602      LC_ALL is set on the command line.  */
20603   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20604 # endif
20605   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
20606      on Cygwin 1.5.x.  */
20607   if (MB_CUR_MAX == 1)
20608     return 1;
20609   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
20610      This excludes the UTF-8 encoding (except on MirBSD).  */
20611   {
20612     const char *p;
20613     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20614     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
20615     for (p = buf; *p != '\0'; p++)
20616       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
20617         return 1;
20618   }
20619   return 0;
20620 #endif
20621 }
20622
20623 _ACEOF
20624     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20625   (eval $ac_link) 2>&5
20626   ac_status=$?
20627   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20628   test $ac_status = 0; } && test -s conftest$ac_exeext; then
20629       case "$host_os" in
20630         # Handle native Windows specially, because there setlocale() interprets
20631         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20632         # "fr" or "fra" as "French" or "French_France.1252",
20633         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20634         # "ja" as "Japanese" or "Japanese_Japan.932",
20635         # and similar.
20636         mingw*)
20637           # Note that on native Windows, the Japanese locale is
20638           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
20639           # cannot use it here.
20640           gt_cv_locale_ja=none
20641           ;;
20642         *)
20643           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20644           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20645           # configure script would override the LC_ALL setting. Likewise for
20646           # LC_CTYPE, which is also set at the beginning of the configure script.
20647           # Test for the AIX locale name.
20648           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20649             gt_cv_locale_ja=ja_JP
20650           else
20651             # Test for the locale name with explicit encoding suffix.
20652             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20653               gt_cv_locale_ja=ja_JP.EUC-JP
20654             else
20655               # Test for the HP-UX, OSF/1, NetBSD locale name.
20656               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20657                 gt_cv_locale_ja=ja_JP.eucJP
20658               else
20659                 # Test for the IRIX, FreeBSD locale name.
20660                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20661                   gt_cv_locale_ja=ja_JP.EUC
20662                 else
20663                   # Test for the Solaris 7 locale name.
20664                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20665                     gt_cv_locale_ja=ja
20666                   else
20667                     # Special test for NetBSD 1.6.
20668                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
20669                       gt_cv_locale_ja=ja_JP.eucJP
20670                     else
20671                       # None found.
20672                       gt_cv_locale_ja=none
20673                     fi
20674                   fi
20675                 fi
20676               fi
20677             fi
20678           fi
20679           ;;
20680       esac
20681     fi
20682     rm -fr conftest*
20683
20684 fi
20685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
20686 printf "%s\n" "$gt_cv_locale_ja" >&6; }
20687   LOCALE_JA=$gt_cv_locale_ja
20688
20689
20690
20691
20692   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
20693 printf %s "checking for a french Unicode locale... " >&6; }
20694 if test ${gt_cv_locale_fr_utf8+y}
20695 then :
20696   printf %s "(cached) " >&6
20697 else $as_nop
20698
20699     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20700 /* end confdefs.h.  */
20701
20702 #include <locale.h>
20703 #include <time.h>
20704 #if HAVE_LANGINFO_CODESET
20705 # include <langinfo.h>
20706 #endif
20707 #include <stdlib.h>
20708 #include <string.h>
20709 struct tm t;
20710 char buf[16];
20711 int main () {
20712   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
20713      imitates locale dependent behaviour by looking at the environment
20714      variables, and all locales use the UTF-8 encoding.  */
20715 #if !(defined __BEOS__ || defined __HAIKU__)
20716   /* Check whether the given locale name is recognized by the system.  */
20717 # if defined _WIN32 && !defined __CYGWIN__
20718   /* On native Windows, setlocale(category, "") looks at the system settings,
20719      not at the environment variables.  Also, when an encoding suffix such
20720      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20721      category of the locale to "C".  */
20722   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20723       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20724     return 1;
20725 # else
20726   if (setlocale (LC_ALL, "") == NULL) return 1;
20727 # endif
20728   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20729      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20730      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20731      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20732      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20733      some unit tests fail.  */
20734 # if HAVE_LANGINFO_CODESET
20735   {
20736     const char *cs = nl_langinfo (CODESET);
20737     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
20738       return 1;
20739   }
20740 # endif
20741 # ifdef __CYGWIN__
20742   /* On Cygwin, avoid locale names without encoding suffix, because the
20743      locale_charset() function relies on the encoding suffix.  Note that
20744      LC_ALL is set on the command line.  */
20745   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20746 # endif
20747   /* Check whether in the abbreviation of the second month, the second
20748      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
20749      two bytes long, with UTF-8 encoding.  */
20750   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20751   if (strftime (buf, sizeof (buf), "%b", &t) < 4
20752       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
20753     return 1;
20754 #endif
20755 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
20756   /* Check whether the decimal separator is a comma.
20757      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
20758      are nl_langinfo(RADIXCHAR) are both ".".  */
20759   if (localeconv () ->decimal_point[0] != ',') return 1;
20760 #endif
20761   return 0;
20762 }
20763
20764 _ACEOF
20765     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20766   (eval $ac_link) 2>&5
20767   ac_status=$?
20768   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20769   test $ac_status = 0; } && test -s conftest$ac_exeext; then
20770       case "$host_os" in
20771         # Handle native Windows specially, because there setlocale() interprets
20772         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20773         # "fr" or "fra" as "French" or "French_France.1252",
20774         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20775         # "ja" as "Japanese" or "Japanese_Japan.932",
20776         # and similar.
20777         mingw*)
20778           # Test for the hypothetical native Windows locale name.
20779           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20780             gt_cv_locale_fr_utf8=French_France.65001
20781           else
20782             # None found.
20783             gt_cv_locale_fr_utf8=none
20784           fi
20785           ;;
20786         *)
20787           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20788           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20789           # configure script would override the LC_ALL setting. Likewise for
20790           # LC_CTYPE, which is also set at the beginning of the configure script.
20791           # Test for the usual locale name.
20792           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20793             gt_cv_locale_fr_utf8=fr_FR
20794           else
20795             # Test for the locale name with explicit encoding suffix.
20796             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20797               gt_cv_locale_fr_utf8=fr_FR.UTF-8
20798             else
20799               # Test for the Solaris 7 locale name.
20800               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20801                 gt_cv_locale_fr_utf8=fr.UTF-8
20802               else
20803                 # None found.
20804                 gt_cv_locale_fr_utf8=none
20805               fi
20806             fi
20807           fi
20808           ;;
20809       esac
20810     fi
20811     rm -fr conftest*
20812
20813 fi
20814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
20815 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
20816   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
20817
20818
20819
20820
20821
20822   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
20823 printf %s "checking for a transitional chinese locale... " >&6; }
20824 if test ${gt_cv_locale_zh_CN+y}
20825 then :
20826   printf %s "(cached) " >&6
20827 else $as_nop
20828
20829     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20830 /* end confdefs.h.  */
20831
20832 #include <locale.h>
20833 #include <stdlib.h>
20834 #include <time.h>
20835 #if HAVE_LANGINFO_CODESET
20836 # include <langinfo.h>
20837 #endif
20838 #include <stdlib.h>
20839 #include <string.h>
20840 struct tm t;
20841 char buf[16];
20842 int main ()
20843 {
20844   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
20845      imitates locale dependent behaviour by looking at the environment
20846      variables, and all locales use the UTF-8 encoding.  */
20847 #if defined __BEOS__ || defined __HAIKU__
20848   return 1;
20849 #else
20850   /* Check whether the given locale name is recognized by the system.  */
20851 # if defined _WIN32 && !defined __CYGWIN__
20852   /* On native Windows, setlocale(category, "") looks at the system settings,
20853      not at the environment variables.  Also, when an encoding suffix such
20854      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20855      category of the locale to "C".  */
20856   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20857       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20858     return 1;
20859 # else
20860   if (setlocale (LC_ALL, "") == NULL) return 1;
20861 # endif
20862   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20863      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20864      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20865      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20866      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20867      some unit tests fail.
20868      On MirBSD 10, when an unsupported locale is specified, setlocale()
20869      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
20870 # if HAVE_LANGINFO_CODESET
20871   {
20872     const char *cs = nl_langinfo (CODESET);
20873     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
20874         || strcmp (cs, "UTF-8") == 0)
20875       return 1;
20876   }
20877 # endif
20878 # ifdef __CYGWIN__
20879   /* On Cygwin, avoid locale names without encoding suffix, because the
20880      locale_charset() function relies on the encoding suffix.  Note that
20881      LC_ALL is set on the command line.  */
20882   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20883 # endif
20884   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
20885      This excludes the UTF-8 encoding (except on MirBSD).  */
20886   {
20887     const char *p;
20888     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20889     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
20890     for (p = buf; *p != '\0'; p++)
20891       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
20892         return 1;
20893   }
20894   /* Check whether a typical GB18030 multibyte sequence is recognized as a
20895      single wide character.  This excludes the GB2312 and GBK encodings.  */
20896   if (mblen ("\203\062\332\066", 5) != 4)
20897     return 1;
20898   return 0;
20899 #endif
20900 }
20901
20902 _ACEOF
20903     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20904   (eval $ac_link) 2>&5
20905   ac_status=$?
20906   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20907   test $ac_status = 0; } && test -s conftest$ac_exeext; then
20908       case "$host_os" in
20909         # Handle native Windows specially, because there setlocale() interprets
20910         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20911         # "fr" or "fra" as "French" or "French_France.1252",
20912         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20913         # "ja" as "Japanese" or "Japanese_Japan.932",
20914         # and similar.
20915         mingw*)
20916           # Test for the hypothetical native Windows locale name.
20917           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20918             gt_cv_locale_zh_CN=Chinese_China.54936
20919           else
20920             # None found.
20921             gt_cv_locale_zh_CN=none
20922           fi
20923           ;;
20924         solaris2.8)
20925           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
20926           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
20927           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
20928           gt_cv_locale_zh_CN=none
20929           ;;
20930         *)
20931           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20932           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20933           # configure script would override the LC_ALL setting. Likewise for
20934           # LC_CTYPE, which is also set at the beginning of the configure script.
20935           # Test for the locale name without encoding suffix.
20936           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20937             gt_cv_locale_zh_CN=zh_CN
20938           else
20939             # Test for the locale name with explicit encoding suffix.
20940             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20941               gt_cv_locale_zh_CN=zh_CN.GB18030
20942             else
20943               # None found.
20944               gt_cv_locale_zh_CN=none
20945             fi
20946           fi
20947           ;;
20948       esac
20949     else
20950       # If there was a link error, due to mblen(), the system is so old that
20951       # it certainly doesn't have a chinese locale.
20952       gt_cv_locale_zh_CN=none
20953     fi
20954     rm -fr conftest*
20955
20956 fi
20957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
20958 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
20959   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
20960
20961
20962
20963     HAVE_NL_LANGINFO=1;
20964   REPLACE_NL_LANGINFO=0;
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981      if test $gl_cv_have_include_next = yes; then
20982        gl_cv_next_langinfo_h='<'langinfo.h'>'
20983      else
20984        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
20985 printf %s "checking absolute name of <langinfo.h>... " >&6; }
20986 if test ${gl_cv_next_langinfo_h+y}
20987 then :
20988   printf %s "(cached) " >&6
20989 else $as_nop
20990
20991              if test $ac_cv_header_langinfo_h = yes; then
20992
20993
20994
20995
20996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20997 /* end confdefs.h.  */
20998 #include <langinfo.h>
20999 _ACEOF
21000                 case "$host_os" in
21001     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21002     *)    gl_absname_cpp="$ac_cpp" ;;
21003   esac
21004
21005   case "$host_os" in
21006     mingw*)
21007                                           gl_dirsep_regex='[/\\]'
21008       ;;
21009     *)
21010       gl_dirsep_regex='\/'
21011       ;;
21012   esac
21013       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21014   gl_header_literal_regex=`echo 'langinfo.h' \
21015                            | sed -e "$gl_make_literal_regex_sed"`
21016   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21017       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21018       s|^/[^/]|//&|
21019       p
21020       q
21021     }'
21022
21023         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21024   sed -n "$gl_absolute_header_sed"`
21025
21026            gl_header=$gl_cv_absolute_langinfo_h
21027            gl_cv_next_langinfo_h='"'$gl_header'"'
21028           else
21029                gl_cv_next_langinfo_h='<'langinfo.h'>'
21030              fi
21031
21032
21033 fi
21034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
21035 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
21036      fi
21037      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
21038
21039      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21040        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21041        gl_next_as_first_directive='<'langinfo.h'>'
21042      else
21043        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21044        gl_next_as_first_directive=$gl_cv_next_langinfo_h
21045      fi
21046      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
21047
21048
21049
21050
21051
21052     HAVE_LANGINFO_CODESET=0
21053   HAVE_LANGINFO_T_FMT_AMPM=0
21054   HAVE_LANGINFO_ALTMON=0
21055   HAVE_LANGINFO_ERA=0
21056   HAVE_LANGINFO_YESEXPR=0
21057
21058   if test $ac_cv_header_langinfo_h = yes; then
21059     HAVE_LANGINFO_H=1
21060                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21061 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
21062 if test ${gl_cv_header_langinfo_codeset+y}
21063 then :
21064   printf %s "(cached) " >&6
21065 else $as_nop
21066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21067 /* end confdefs.h.  */
21068 #include <langinfo.h>
21069 int a = CODESET;
21070
21071 int
21072 main (void)
21073 {
21074
21075   ;
21076   return 0;
21077 }
21078 _ACEOF
21079 if ac_fn_c_try_compile "$LINENO"
21080 then :
21081   gl_cv_header_langinfo_codeset=yes
21082 else $as_nop
21083   gl_cv_header_langinfo_codeset=no
21084 fi
21085 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21086
21087 fi
21088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21089 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
21090     if test $gl_cv_header_langinfo_codeset = yes; then
21091       HAVE_LANGINFO_CODESET=1
21092     fi
21093     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21094 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21095 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
21096 then :
21097   printf %s "(cached) " >&6
21098 else $as_nop
21099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21100 /* end confdefs.h.  */
21101 #include <langinfo.h>
21102 int a = T_FMT_AMPM;
21103
21104 int
21105 main (void)
21106 {
21107
21108   ;
21109   return 0;
21110 }
21111 _ACEOF
21112 if ac_fn_c_try_compile "$LINENO"
21113 then :
21114   gl_cv_header_langinfo_t_fmt_ampm=yes
21115 else $as_nop
21116   gl_cv_header_langinfo_t_fmt_ampm=no
21117 fi
21118 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21119
21120 fi
21121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21122 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21123     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21124       HAVE_LANGINFO_T_FMT_AMPM=1
21125     fi
21126     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
21127 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
21128 if test ${gl_cv_header_langinfo_altmon+y}
21129 then :
21130   printf %s "(cached) " >&6
21131 else $as_nop
21132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21133 /* end confdefs.h.  */
21134 #include <langinfo.h>
21135 int a = ALTMON_1;
21136
21137 int
21138 main (void)
21139 {
21140
21141   ;
21142   return 0;
21143 }
21144 _ACEOF
21145 if ac_fn_c_try_compile "$LINENO"
21146 then :
21147   gl_cv_header_langinfo_altmon=yes
21148 else $as_nop
21149   gl_cv_header_langinfo_altmon=no
21150 fi
21151 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21152
21153 fi
21154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
21155 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
21156     if test $gl_cv_header_langinfo_altmon = yes; then
21157       HAVE_LANGINFO_ALTMON=1
21158     fi
21159     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21160 printf %s "checking whether langinfo.h defines ERA... " >&6; }
21161 if test ${gl_cv_header_langinfo_era+y}
21162 then :
21163   printf %s "(cached) " >&6
21164 else $as_nop
21165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21166 /* end confdefs.h.  */
21167 #include <langinfo.h>
21168 int a = ERA;
21169
21170 int
21171 main (void)
21172 {
21173
21174   ;
21175   return 0;
21176 }
21177 _ACEOF
21178 if ac_fn_c_try_compile "$LINENO"
21179 then :
21180   gl_cv_header_langinfo_era=yes
21181 else $as_nop
21182   gl_cv_header_langinfo_era=no
21183 fi
21184 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21185
21186 fi
21187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21188 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
21189     if test $gl_cv_header_langinfo_era = yes; then
21190       HAVE_LANGINFO_ERA=1
21191     fi
21192     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21193 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
21194 if test ${gl_cv_header_langinfo_yesexpr+y}
21195 then :
21196   printf %s "(cached) " >&6
21197 else $as_nop
21198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21199 /* end confdefs.h.  */
21200 #include <langinfo.h>
21201 int a = YESEXPR;
21202
21203 int
21204 main (void)
21205 {
21206
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 if ac_fn_c_try_compile "$LINENO"
21212 then :
21213   gl_cv_header_langinfo_yesexpr=yes
21214 else $as_nop
21215   gl_cv_header_langinfo_yesexpr=no
21216 fi
21217 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21218
21219 fi
21220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21221 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
21222     if test $gl_cv_header_langinfo_yesexpr = yes; then
21223       HAVE_LANGINFO_YESEXPR=1
21224     fi
21225   else
21226     HAVE_LANGINFO_H=0
21227   fi
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239   GL_M4_GNULIB_NL_LANGINFO=0
21240
21241
21242
21243
21244     HAVE_NEWLOCALE=1;
21245   HAVE_DUPLOCALE=1;
21246   HAVE_FREELOCALE=1;
21247   REPLACE_LOCALECONV=0;
21248   REPLACE_SETLOCALE=0;
21249   REPLACE_NEWLOCALE=0;
21250   REPLACE_DUPLOCALE=0;
21251   REPLACE_FREELOCALE=0;
21252   REPLACE_STRUCT_LCONV=0;
21253   LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
21254
21255
21256     REPLACE_NULL=0;
21257   HAVE_MAX_ALIGN_T=1;
21258   HAVE_WCHAR_T=1;
21259
21260
21261   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21262 printf %s "checking for wchar_t... " >&6; }
21263 if test ${gt_cv_c_wchar_t+y}
21264 then :
21265   printf %s "(cached) " >&6
21266 else $as_nop
21267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21268 /* end confdefs.h.  */
21269 #include <stddef.h>
21270             wchar_t foo = (wchar_t)'\0';
21271 int
21272 main (void)
21273 {
21274
21275   ;
21276   return 0;
21277 }
21278 _ACEOF
21279 if ac_fn_c_try_compile "$LINENO"
21280 then :
21281   gt_cv_c_wchar_t=yes
21282 else $as_nop
21283   gt_cv_c_wchar_t=no
21284 fi
21285 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21286 fi
21287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21288 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
21289   if test $gt_cv_c_wchar_t = yes; then
21290
21291 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
21292
21293   fi
21294
21295
21296
21297
21298
21299
21300
21301   STDDEF_H=
21302
21303       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
21304 printf %s "checking for good max_align_t... " >&6; }
21305 if test ${gl_cv_type_max_align_t+y}
21306 then :
21307   printf %s "(cached) " >&6
21308 else $as_nop
21309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310 /* end confdefs.h.  */
21311 #include <stddef.h>
21312             unsigned int s = sizeof (max_align_t);
21313             #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
21314             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
21315             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
21316             #endif
21317             typedef struct { char a; max_align_t b; } max_helper;
21318             typedef struct { char a; long b; } long_helper;
21319             typedef struct { char a; double b; } double_helper;
21320             typedef struct { char a; long double b; } long_double_helper;
21321             int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
21322             int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
21323             int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
21324
21325 int
21326 main (void)
21327 {
21328
21329   ;
21330   return 0;
21331 }
21332 _ACEOF
21333 if ac_fn_c_try_compile "$LINENO"
21334 then :
21335   gl_cv_type_max_align_t=yes
21336 else $as_nop
21337   gl_cv_type_max_align_t=no
21338 fi
21339 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21340
21341 fi
21342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
21343 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
21344   if test $gl_cv_type_max_align_t = no; then
21345     HAVE_MAX_ALIGN_T=0
21346     STDDEF_H=stddef.h
21347   fi
21348
21349   if test $gt_cv_c_wchar_t = no; then
21350     HAVE_WCHAR_T=0
21351     STDDEF_H=stddef.h
21352   fi
21353
21354   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21355 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
21356 if test ${gl_cv_decl_null_works+y}
21357 then :
21358   printf %s "(cached) " >&6
21359 else $as_nop
21360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21361 /* end confdefs.h.  */
21362 #include <stddef.h>
21363       int test[2 * (sizeof NULL == sizeof (void *)) -1];
21364
21365 int
21366 main (void)
21367 {
21368
21369   ;
21370   return 0;
21371 }
21372 _ACEOF
21373 if ac_fn_c_try_compile "$LINENO"
21374 then :
21375   gl_cv_decl_null_works=yes
21376 else $as_nop
21377   gl_cv_decl_null_works=no
21378 fi
21379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21380 fi
21381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21382 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
21383   if test $gl_cv_decl_null_works = no; then
21384     REPLACE_NULL=1
21385     STDDEF_H=stddef.h
21386   fi
21387
21388
21389    if test -n "$STDDEF_H"; then
21390   GL_GENERATE_STDDEF_H_TRUE=
21391   GL_GENERATE_STDDEF_H_FALSE='#'
21392 else
21393   GL_GENERATE_STDDEF_H_TRUE='#'
21394   GL_GENERATE_STDDEF_H_FALSE=
21395 fi
21396
21397   if test -n "$STDDEF_H"; then
21398
21399
21400
21401
21402
21403
21404
21405
21406      if test $gl_cv_have_include_next = yes; then
21407        gl_cv_next_stddef_h='<'stddef.h'>'
21408      else
21409        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21410 printf %s "checking absolute name of <stddef.h>... " >&6; }
21411 if test ${gl_cv_next_stddef_h+y}
21412 then :
21413   printf %s "(cached) " >&6
21414 else $as_nop
21415
21416
21417
21418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21419 /* end confdefs.h.  */
21420 #include <stddef.h>
21421 _ACEOF
21422                 case "$host_os" in
21423     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21424     *)    gl_absname_cpp="$ac_cpp" ;;
21425   esac
21426
21427   case "$host_os" in
21428     mingw*)
21429                                           gl_dirsep_regex='[/\\]'
21430       ;;
21431     *)
21432       gl_dirsep_regex='\/'
21433       ;;
21434   esac
21435       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21436   gl_header_literal_regex=`echo 'stddef.h' \
21437                            | sed -e "$gl_make_literal_regex_sed"`
21438   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21439       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21440       s|^/[^/]|//&|
21441       p
21442       q
21443     }'
21444
21445         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21446   sed -n "$gl_absolute_header_sed"`
21447
21448            gl_header=$gl_cv_absolute_stddef_h
21449            gl_cv_next_stddef_h='"'$gl_header'"'
21450
21451
21452 fi
21453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21454 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
21455      fi
21456      NEXT_STDDEF_H=$gl_cv_next_stddef_h
21457
21458      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21459        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21460        gl_next_as_first_directive='<'stddef.h'>'
21461      else
21462        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21463        gl_next_as_first_directive=$gl_cv_next_stddef_h
21464      fi
21465      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21466
21467
21468
21469
21470   fi
21471
21472
21473
21474
21475
21476         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
21477 printf %s "checking whether locale.h defines locale_t... " >&6; }
21478 if test ${gl_cv_header_locale_has_locale_t+y}
21479 then :
21480   printf %s "(cached) " >&6
21481 else $as_nop
21482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21483 /* end confdefs.h.  */
21484 #include <locale.h>
21485             locale_t x;
21486 int
21487 main (void)
21488 {
21489
21490   ;
21491   return 0;
21492 }
21493 _ACEOF
21494 if ac_fn_c_try_compile "$LINENO"
21495 then :
21496   gl_cv_header_locale_has_locale_t=yes
21497 else $as_nop
21498   gl_cv_header_locale_has_locale_t=no
21499 fi
21500 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21501
21502 fi
21503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
21504 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
21505
21506
21507   if test $ac_cv_header_xlocale_h = yes; then
21508     HAVE_XLOCALE_H=1
21509     if test $gl_cv_header_locale_has_locale_t = yes; then
21510       gl_cv_header_locale_h_needs_xlocale_h=no
21511     else
21512       gl_cv_header_locale_h_needs_xlocale_h=yes
21513     fi
21514     HAVE_LOCALE_T=1
21515   else
21516     HAVE_XLOCALE_H=0
21517     gl_cv_header_locale_h_needs_xlocale_h=no
21518     if test $gl_cv_header_locale_has_locale_t = yes; then
21519       HAVE_LOCALE_T=1
21520     else
21521       HAVE_LOCALE_T=0
21522     fi
21523   fi
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536   case "$host_os" in
21537     solaris*)
21538
21539 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
21540
21541       ;;
21542   esac
21543
21544   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
21545 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
21546 if test ${gl_cv_header_locale_h_posix2001+y}
21547 then :
21548   printf %s "(cached) " >&6
21549 else $as_nop
21550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21551 /* end confdefs.h.  */
21552 #include <locale.h>
21553             int x = LC_MESSAGES;
21554             int y = sizeof (((struct lconv *) 0)->decimal_point);
21555 int
21556 main (void)
21557 {
21558
21559   ;
21560   return 0;
21561 }
21562 _ACEOF
21563 if ac_fn_c_try_compile "$LINENO"
21564 then :
21565   gl_cv_header_locale_h_posix2001=yes
21566 else $as_nop
21567   gl_cv_header_locale_h_posix2001=no
21568 fi
21569 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21570 fi
21571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
21572 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
21573
21574           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
21575 printf %s "checking whether struct lconv is properly defined... " >&6; }
21576 if test ${gl_cv_sys_struct_lconv_ok+y}
21577 then :
21578   printf %s "(cached) " >&6
21579 else $as_nop
21580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21581 /* end confdefs.h.  */
21582 #include <locale.h>
21583             struct lconv l;
21584             int x = sizeof (l.decimal_point);
21585             int y = sizeof (l.int_p_cs_precedes);
21586 int
21587 main (void)
21588 {
21589
21590   ;
21591   return 0;
21592 }
21593 _ACEOF
21594 if ac_fn_c_try_compile "$LINENO"
21595 then :
21596   gl_cv_sys_struct_lconv_ok=yes
21597 else $as_nop
21598   gl_cv_sys_struct_lconv_ok=no
21599 fi
21600 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21601
21602 fi
21603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
21604 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
21605   if test $gl_cv_sys_struct_lconv_ok = no; then
21606             case "$host_os" in
21607       mingw*)
21608         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21609 /* end confdefs.h.  */
21610
21611 #ifdef _MSC_VER
21612  Special
21613 #endif
21614
21615 _ACEOF
21616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21617   $EGREP "Special" >/dev/null 2>&1
21618 then :
21619
21620 else $as_nop
21621   REPLACE_STRUCT_LCONV=1
21622 fi
21623 rm -rf conftest*
21624
21625         ;;
21626       *) REPLACE_STRUCT_LCONV=1 ;;
21627     esac
21628   fi
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638      if test $gl_cv_have_include_next = yes; then
21639        gl_cv_next_locale_h='<'locale.h'>'
21640      else
21641        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
21642 printf %s "checking absolute name of <locale.h>... " >&6; }
21643 if test ${gl_cv_next_locale_h+y}
21644 then :
21645   printf %s "(cached) " >&6
21646 else $as_nop
21647
21648
21649
21650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651 /* end confdefs.h.  */
21652 #include <locale.h>
21653 _ACEOF
21654                 case "$host_os" in
21655     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21656     *)    gl_absname_cpp="$ac_cpp" ;;
21657   esac
21658
21659   case "$host_os" in
21660     mingw*)
21661                                           gl_dirsep_regex='[/\\]'
21662       ;;
21663     *)
21664       gl_dirsep_regex='\/'
21665       ;;
21666   esac
21667       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21668   gl_header_literal_regex=`echo 'locale.h' \
21669                            | sed -e "$gl_make_literal_regex_sed"`
21670   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21671       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21672       s|^/[^/]|//&|
21673       p
21674       q
21675     }'
21676
21677         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21678   sed -n "$gl_absolute_header_sed"`
21679
21680            gl_header=$gl_cv_absolute_locale_h
21681            gl_cv_next_locale_h='"'$gl_header'"'
21682
21683
21684 fi
21685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
21686 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
21687      fi
21688      NEXT_LOCALE_H=$gl_cv_next_locale_h
21689
21690      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21691        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21692        gl_next_as_first_directive='<'locale.h'>'
21693      else
21694        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21695        gl_next_as_first_directive=$gl_cv_next_locale_h
21696      fi
21697      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707   GL_M4_GNULIB_LOCALECONV=0
21708
21709
21710
21711   GL_M4_GNULIB_SETLOCALE=0
21712
21713
21714
21715   GL_M4_GNULIB_SETLOCALE_NULL=0
21716
21717
21718
21719   GL_M4_GNULIB_DUPLOCALE=0
21720
21721
21722
21723   GL_M4_GNULIB_LOCALENAME=0
21724
21725
21726
21727
21728   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
21729 printf %s "checking for LC_MESSAGES... " >&6; }
21730 if test ${gt_cv_val_LC_MESSAGES+y}
21731 then :
21732   printf %s "(cached) " >&6
21733 else $as_nop
21734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21735 /* end confdefs.h.  */
21736 #include <locale.h>
21737 int
21738 main (void)
21739 {
21740 return LC_MESSAGES
21741   ;
21742   return 0;
21743 }
21744 _ACEOF
21745 if ac_fn_c_try_link "$LINENO"
21746 then :
21747   gt_cv_val_LC_MESSAGES=yes
21748 else $as_nop
21749   gt_cv_val_LC_MESSAGES=no
21750 fi
21751 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21752     conftest$ac_exeext conftest.$ac_ext
21753 fi
21754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
21755 printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
21756   if test $gt_cv_val_LC_MESSAGES = yes; then
21757
21758 printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
21759
21760   fi
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774           if test $ac_cv_func_uselocale = yes; then
21775
21776     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
21777 printf %s "checking whether uselocale works... " >&6; }
21778 if test ${gt_cv_func_uselocale_works+y}
21779 then :
21780   printf %s "(cached) " >&6
21781 else $as_nop
21782   if test "$cross_compiling" = yes
21783 then :
21784   # Guess no on AIX and z/OS, yes otherwise.
21785           case "$host_os" in
21786             aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
21787             *)                   gt_cv_func_uselocale_works="guessing yes" ;;
21788           esac
21789
21790 else $as_nop
21791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h.  */
21793
21794 #include <locale.h>
21795 #if HAVE_XLOCALE_H
21796 # include <xlocale.h>
21797 #endif
21798 locale_t loc1;
21799 int main ()
21800 {
21801   uselocale (NULL);
21802   setlocale (LC_ALL, "en_US.UTF-8");
21803   return 0;
21804 }
21805 _ACEOF
21806 if ac_fn_c_try_run "$LINENO"
21807 then :
21808   gt_cv_func_uselocale_works=yes
21809 else $as_nop
21810   gt_cv_func_uselocale_works=no
21811 fi
21812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21813   conftest.$ac_objext conftest.beam conftest.$ac_ext
21814 fi
21815
21816
21817 fi
21818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
21819 printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
21820   else
21821     gt_cv_func_uselocale_works=no
21822   fi
21823   case "$gt_cv_func_uselocale_works" in
21824     *yes)
21825       gt_working_uselocale=yes
21826
21827 printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
21828
21829       ;;
21830     *)
21831       gt_working_uselocale=no
21832       ;;
21833   esac
21834
21835
21836                             case "$gt_cv_func_uselocale_works" in
21837     *yes)
21838
21839       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
21840 printf %s "checking for fake locale system (OpenBSD)... " >&6; }
21841 if test ${gt_cv_locale_fake+y}
21842 then :
21843   printf %s "(cached) " >&6
21844 else $as_nop
21845   if test "$cross_compiling" = yes
21846 then :
21847               case "$host_os" in
21848               openbsd*) gt_cv_locale_fake="guessing yes" ;;
21849               *)        gt_cv_locale_fake="guessing no" ;;
21850             esac
21851
21852 else $as_nop
21853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21854 /* end confdefs.h.  */
21855
21856 #include <locale.h>
21857 #if HAVE_XLOCALE_H
21858 # include <xlocale.h>
21859 #endif
21860 int main ()
21861 {
21862   locale_t loc1, loc2;
21863   if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
21864   if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
21865   loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
21866   loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
21867   return !(loc1 == loc2);
21868 }
21869 _ACEOF
21870 if ac_fn_c_try_run "$LINENO"
21871 then :
21872   gt_cv_locale_fake=yes
21873 else $as_nop
21874   gt_cv_locale_fake=no
21875 fi
21876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21877   conftest.$ac_objext conftest.beam conftest.$ac_ext
21878 fi
21879
21880
21881 fi
21882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
21883 printf "%s\n" "$gt_cv_locale_fake" >&6; }
21884       ;;
21885     *) gt_cv_locale_fake=no ;;
21886   esac
21887   case "$gt_cv_locale_fake" in
21888     *yes)
21889       gt_fake_locales=yes
21890
21891 printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
21892
21893       ;;
21894     *)
21895       gt_fake_locales=no
21896       ;;
21897   esac
21898
21899   case "$gt_cv_func_uselocale_works" in
21900     *yes)
21901       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
21902 printf %s "checking for Solaris 11.4 locale system... " >&6; }
21903 if test ${gt_cv_locale_solaris114+y}
21904 then :
21905   printf %s "(cached) " >&6
21906 else $as_nop
21907   case "$host_os" in
21908            solaris*)
21909                                                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21910 /* end confdefs.h.  */
21911
21912                   #include <locale.h>
21913                   struct _LC_locale_t *x;
21914                   locale_t y;
21915
21916 int
21917 main (void)
21918 {
21919 *y = x;
21920   ;
21921   return 0;
21922 }
21923 _ACEOF
21924 if ac_fn_c_try_compile "$LINENO"
21925 then :
21926   gt_cv_locale_solaris114=yes
21927 else $as_nop
21928   gt_cv_locale_solaris114=no
21929 fi
21930 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21931              ;;
21932            *) gt_cv_locale_solaris114=no ;;
21933          esac
21934
21935 fi
21936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
21937 printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
21938       ;;
21939     *) gt_cv_locale_solaris114=no ;;
21940   esac
21941   if test $gt_cv_locale_solaris114 = yes; then
21942
21943 printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
21944
21945   fi
21946
21947         case "$gt_cv_func_uselocale_works" in
21948     *yes)
21949       ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
21950 if test "x$ac_cv_func_getlocalename_l" = xyes
21951 then :
21952   printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
21953
21954 fi
21955
21956       ;;
21957   esac
21958
21959             gt_nameless_locales=no
21960   case "$host_os" in
21961         aix*)
21962       gt_nameless_locales=yes
21963
21964 printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
21965
21966       ;;
21967   esac
21968
21969         if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
21970     gt_good_uselocale=yes
21971
21972 printf "%s\n" "#define HAVE_GOOD_USELOCALE 1" >>confdefs.h
21973
21974   else
21975     gt_good_uselocale=no
21976   fi
21977
21978         if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
21979     gt_localename_enhances_locale_funcs=yes
21980     LOCALENAME_ENHANCE_LOCALE_FUNCS=1
21981
21982 printf "%s\n" "#define LOCALENAME_ENHANCE_LOCALE_FUNCS 1" >>confdefs.h
21983
21984   else
21985     gt_localename_enhances_locale_funcs=no
21986   fi
21987
21988
21989     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
21990 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
21991 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
21992 then :
21993   printf %s "(cached) " >&6
21994 else $as_nop
21995   gt_save_LIBS="$LIBS"
21996      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
21997      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21998 /* end confdefs.h.  */
21999 #include <CoreFoundation/CFPreferences.h>
22000 int
22001 main (void)
22002 {
22003 CFPreferencesCopyAppValue(NULL, NULL)
22004   ;
22005   return 0;
22006 }
22007 _ACEOF
22008 if ac_fn_c_try_link "$LINENO"
22009 then :
22010   gt_cv_func_CFPreferencesCopyAppValue=yes
22011 else $as_nop
22012   gt_cv_func_CFPreferencesCopyAppValue=no
22013 fi
22014 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22015     conftest$ac_exeext conftest.$ac_ext
22016      LIBS="$gt_save_LIBS"
22017 fi
22018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
22019 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
22020   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
22021
22022 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
22023
22024   fi
22025                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
22026 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
22027 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
22028 then :
22029   printf %s "(cached) " >&6
22030 else $as_nop
22031   gt_save_LIBS="$LIBS"
22032      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
22033      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22034 /* end confdefs.h.  */
22035 #include <CoreFoundation/CFLocale.h>
22036 int
22037 main (void)
22038 {
22039 CFLocaleCopyPreferredLanguages();
22040   ;
22041   return 0;
22042 }
22043 _ACEOF
22044 if ac_fn_c_try_link "$LINENO"
22045 then :
22046   gt_cv_func_CFLocaleCopyPreferredLanguages=yes
22047 else $as_nop
22048   gt_cv_func_CFLocaleCopyPreferredLanguages=no
22049 fi
22050 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22051     conftest$ac_exeext conftest.$ac_ext
22052      LIBS="$gt_save_LIBS"
22053 fi
22054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
22055 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
22056   if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22057
22058 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
22059
22060   fi
22061   INTL_MACOSX_LIBS=
22062   if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
22063      || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22064     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
22065   fi
22066
22067
22068
22069
22070
22071
22072
22073   gl_threads_api=none
22074   LIBTHREAD=
22075   LTLIBTHREAD=
22076   LIBMULTITHREAD=
22077   LTLIBMULTITHREAD=
22078   if test "$gl_use_threads" != no; then
22079
22080
22081   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
22082 printf %s "checking whether imported symbols can be declared weak... " >&6; }
22083 if test ${gl_cv_have_weak+y}
22084 then :
22085   printf %s "(cached) " >&6
22086 else $as_nop
22087   gl_cv_have_weak=no
22088           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22089 /* end confdefs.h.  */
22090 extern void xyzzy ();
22091 #pragma weak xyzzy
22092 int
22093 main (void)
22094 {
22095 xyzzy();
22096   ;
22097   return 0;
22098 }
22099 _ACEOF
22100 if ac_fn_c_try_link "$LINENO"
22101 then :
22102   gl_cv_have_weak=maybe
22103 fi
22104 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22105     conftest$ac_exeext conftest.$ac_ext
22106      if test $gl_cv_have_weak = maybe; then
22107                      if test "$cross_compiling" = yes
22108 then :
22109                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22110 /* end confdefs.h.  */
22111 #ifdef __ELF__
22112              Extensible Linking Format
22113              #endif
22114
22115 _ACEOF
22116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22117   $EGREP "Extensible Linking Format" >/dev/null 2>&1
22118 then :
22119   gl_cv_have_weak="guessing yes"
22120 else $as_nop
22121   gl_cv_have_weak="guessing no"
22122 fi
22123 rm -rf conftest*
22124
22125
22126 else $as_nop
22127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22128 /* end confdefs.h.  */
22129
22130 #include <stdio.h>
22131 #pragma weak fputs
22132 int main ()
22133 {
22134   return (fputs == NULL);
22135 }
22136 _ACEOF
22137 if ac_fn_c_try_run "$LINENO"
22138 then :
22139   gl_cv_have_weak=yes
22140 else $as_nop
22141   gl_cv_have_weak=no
22142 fi
22143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22144   conftest.$ac_objext conftest.beam conftest.$ac_ext
22145 fi
22146
22147      fi
22148           case " $LDFLAGS " in
22149        *" -static "*) gl_cv_have_weak=no ;;
22150      esac
22151                     case "$gl_cv_have_weak" in
22152        *yes)
22153          case "$host_os" in
22154            freebsd* | dragonfly* | midnightbsd*)
22155              : > conftest1.c
22156              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
22157              cat <<EOF > conftest2.c
22158 #include <pthread.h>
22159 #pragma weak pthread_mutexattr_gettype
22160 int main ()
22161 {
22162   return (pthread_mutexattr_gettype != NULL);
22163 }
22164 EOF
22165              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
22166                || gl_cv_have_weak=no
22167              rm -f conftest1.c libempty.so conftest2.c conftest
22168              ;;
22169          esac
22170          ;;
22171      esac
22172
22173 fi
22174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
22175 printf "%s\n" "$gl_cv_have_weak" >&6; }
22176   case "$gl_cv_have_weak" in
22177     *yes)
22178
22179 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
22180
22181       ;;
22182   esac
22183
22184     if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
22185
22186       :
22187     fi
22188     if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
22189
22190       gl_have_isoc_threads="$ac_cv_header_threads_h"
22191     fi
22192     if test "$gl_use_threads" = yes \
22193        || test "$gl_use_threads" = posix \
22194        || test "$gl_use_threads" = isoc+posix; then
22195
22196
22197   if test -z "$gl_pthreadlib_body_done"; then
22198     gl_pthread_api=no
22199     LIBPTHREAD=
22200     LIBPMULTITHREAD=
22201     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
22202     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
22203     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
22204 if test "x$ac_cv_header_pthread_h" = xyes
22205 then :
22206   gl_have_pthread_h=yes
22207 else $as_nop
22208   gl_have_pthread_h=no
22209 fi
22210
22211     if test "$gl_have_pthread_h" = yes; then
22212       # Other possible tests:
22213       #   -lpthreads (FSU threads, PCthreads)
22214       #   -lgthreads
22215       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
22216       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
22217       # the second one only in libpthread, and lock.c needs it.
22218       #
22219       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
22220       # needs -pthread for some reason.  See:
22221       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
22222       save_LIBS=$LIBS
22223       for gl_pthread in '' '-pthread'; do
22224         LIBS="$LIBS $gl_pthread"
22225         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22226 /* end confdefs.h.  */
22227 #include <pthread.h>
22228                pthread_mutex_t m;
22229                pthread_mutexattr_t ma;
22230
22231 int
22232 main (void)
22233 {
22234 pthread_mutex_lock (&m);
22235                pthread_mutexattr_init (&ma);
22236   ;
22237   return 0;
22238 }
22239 _ACEOF
22240 if ac_fn_c_try_link "$LINENO"
22241 then :
22242   gl_pthread_api=yes
22243            LIBPTHREAD=$gl_pthread
22244            LIBPMULTITHREAD=$gl_pthread
22245 fi
22246 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22247     conftest$ac_exeext conftest.$ac_ext
22248         LIBS=$save_LIBS
22249         test $gl_pthread_api = yes && break
22250       done
22251
22252       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
22253       # since it is defined as a macro on OSF/1.)
22254       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
22255         # The program links fine without libpthread. But it may actually
22256         # need to link with libpthread in order to create multiple threads.
22257         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22258 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22259 if test ${ac_cv_lib_pthread_pthread_kill+y}
22260 then :
22261   printf %s "(cached) " >&6
22262 else $as_nop
22263   ac_check_lib_save_LIBS=$LIBS
22264 LIBS="-lpthread  $LIBS"
22265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22266 /* end confdefs.h.  */
22267
22268 /* Override any GCC internal prototype to avoid an error.
22269    Use char because int might match the return type of a GCC
22270    builtin and then its argument prototype would still apply.  */
22271 char pthread_kill ();
22272 int
22273 main (void)
22274 {
22275 return pthread_kill ();
22276   ;
22277   return 0;
22278 }
22279 _ACEOF
22280 if ac_fn_c_try_link "$LINENO"
22281 then :
22282   ac_cv_lib_pthread_pthread_kill=yes
22283 else $as_nop
22284   ac_cv_lib_pthread_pthread_kill=no
22285 fi
22286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22287     conftest$ac_exeext conftest.$ac_ext
22288 LIBS=$ac_check_lib_save_LIBS
22289 fi
22290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22291 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22292 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22293 then :
22294   LIBPMULTITHREAD=-lpthread
22295            # On Solaris and HP-UX, most pthread functions exist also in libc.
22296            # Therefore pthread_in_use() needs to actually try to create a
22297            # thread: pthread_create from libc will fail, whereas
22298            # pthread_create will actually create a thread.
22299            # On Solaris 10 or newer, this test is no longer needed, because
22300            # libc contains the fully functional pthread functions.
22301            case "$host_os" in
22302              solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
22303
22304 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22305
22306            esac
22307
22308 fi
22309
22310       elif test $gl_pthread_api != yes; then
22311         # Some library is needed. Try libpthread and libc_r.
22312         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22313 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22314 if test ${ac_cv_lib_pthread_pthread_kill+y}
22315 then :
22316   printf %s "(cached) " >&6
22317 else $as_nop
22318   ac_check_lib_save_LIBS=$LIBS
22319 LIBS="-lpthread  $LIBS"
22320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22321 /* end confdefs.h.  */
22322
22323 /* Override any GCC internal prototype to avoid an error.
22324    Use char because int might match the return type of a GCC
22325    builtin and then its argument prototype would still apply.  */
22326 char pthread_kill ();
22327 int
22328 main (void)
22329 {
22330 return pthread_kill ();
22331   ;
22332   return 0;
22333 }
22334 _ACEOF
22335 if ac_fn_c_try_link "$LINENO"
22336 then :
22337   ac_cv_lib_pthread_pthread_kill=yes
22338 else $as_nop
22339   ac_cv_lib_pthread_pthread_kill=no
22340 fi
22341 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22342     conftest$ac_exeext conftest.$ac_ext
22343 LIBS=$ac_check_lib_save_LIBS
22344 fi
22345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22346 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22347 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22348 then :
22349   gl_pthread_api=yes
22350            LIBPTHREAD=-lpthread
22351            LIBPMULTITHREAD=-lpthread
22352 fi
22353
22354         if test $gl_pthread_api != yes; then
22355           # For FreeBSD 4.
22356           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
22357 printf %s "checking for pthread_kill in -lc_r... " >&6; }
22358 if test ${ac_cv_lib_c_r_pthread_kill+y}
22359 then :
22360   printf %s "(cached) " >&6
22361 else $as_nop
22362   ac_check_lib_save_LIBS=$LIBS
22363 LIBS="-lc_r  $LIBS"
22364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22365 /* end confdefs.h.  */
22366
22367 /* Override any GCC internal prototype to avoid an error.
22368    Use char because int might match the return type of a GCC
22369    builtin and then its argument prototype would still apply.  */
22370 char pthread_kill ();
22371 int
22372 main (void)
22373 {
22374 return pthread_kill ();
22375   ;
22376   return 0;
22377 }
22378 _ACEOF
22379 if ac_fn_c_try_link "$LINENO"
22380 then :
22381   ac_cv_lib_c_r_pthread_kill=yes
22382 else $as_nop
22383   ac_cv_lib_c_r_pthread_kill=no
22384 fi
22385 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22386     conftest$ac_exeext conftest.$ac_ext
22387 LIBS=$ac_check_lib_save_LIBS
22388 fi
22389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22390 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22391 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22392 then :
22393   gl_pthread_api=yes
22394              LIBPTHREAD=-lc_r
22395              LIBPMULTITHREAD=-lc_r
22396 fi
22397
22398         fi
22399       fi
22400     fi
22401     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22402 printf %s "checking whether POSIX threads API is available... " >&6; }
22403     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22404 printf "%s\n" "$gl_pthread_api" >&6; }
22405
22406
22407     if test $gl_pthread_api = yes; then
22408
22409 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22410
22411     fi
22412
22413         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22414 /* end confdefs.h.  */
22415 #include <sched.h>
22416 int
22417 main (void)
22418 {
22419 sched_yield ();
22420   ;
22421   return 0;
22422 }
22423 _ACEOF
22424 if ac_fn_c_try_link "$LINENO"
22425 then :
22426   LIB_SCHED_YIELD=
22427
22428 else $as_nop
22429          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22430 printf %s "checking for sched_yield in -lrt... " >&6; }
22431 if test ${ac_cv_lib_rt_sched_yield+y}
22432 then :
22433   printf %s "(cached) " >&6
22434 else $as_nop
22435   ac_check_lib_save_LIBS=$LIBS
22436 LIBS="-lrt  $LIBS"
22437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22438 /* end confdefs.h.  */
22439
22440 /* Override any GCC internal prototype to avoid an error.
22441    Use char because int might match the return type of a GCC
22442    builtin and then its argument prototype would still apply.  */
22443 char sched_yield ();
22444 int
22445 main (void)
22446 {
22447 return sched_yield ();
22448   ;
22449   return 0;
22450 }
22451 _ACEOF
22452 if ac_fn_c_try_link "$LINENO"
22453 then :
22454   ac_cv_lib_rt_sched_yield=yes
22455 else $as_nop
22456   ac_cv_lib_rt_sched_yield=no
22457 fi
22458 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22459     conftest$ac_exeext conftest.$ac_ext
22460 LIBS=$ac_check_lib_save_LIBS
22461 fi
22462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22463 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22464 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22465 then :
22466   LIB_SCHED_YIELD=-lrt
22467 else $as_nop
22468             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22469 printf %s "checking for sched_yield in -lposix4... " >&6; }
22470 if test ${ac_cv_lib_posix4_sched_yield+y}
22471 then :
22472   printf %s "(cached) " >&6
22473 else $as_nop
22474   ac_check_lib_save_LIBS=$LIBS
22475 LIBS="-lposix4  $LIBS"
22476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22477 /* end confdefs.h.  */
22478
22479 /* Override any GCC internal prototype to avoid an error.
22480    Use char because int might match the return type of a GCC
22481    builtin and then its argument prototype would still apply.  */
22482 char sched_yield ();
22483 int
22484 main (void)
22485 {
22486 return sched_yield ();
22487   ;
22488   return 0;
22489 }
22490 _ACEOF
22491 if ac_fn_c_try_link "$LINENO"
22492 then :
22493   ac_cv_lib_posix4_sched_yield=yes
22494 else $as_nop
22495   ac_cv_lib_posix4_sched_yield=no
22496 fi
22497 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22498     conftest$ac_exeext conftest.$ac_ext
22499 LIBS=$ac_check_lib_save_LIBS
22500 fi
22501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22502 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22503 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22504 then :
22505   LIB_SCHED_YIELD=-lposix4
22506 fi
22507
22508 fi
22509
22510
22511 fi
22512 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22513     conftest$ac_exeext conftest.$ac_ext
22514
22515
22516     gl_pthreadlib_body_done=done
22517   fi
22518
22519       LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
22520       LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
22521       if test $gl_pthread_api = yes; then
22522         if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
22523           gl_threads_api='isoc+posix'
22524
22525 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
22526
22527           LIBTHREAD= LTLIBTHREAD=
22528         else
22529           gl_threads_api=posix
22530
22531 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
22532
22533           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
22534             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
22535
22536 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
22537
22538               LIBTHREAD= LTLIBTHREAD=
22539             else
22540               case "$host_os" in
22541                 freebsd* | dragonfly* | midnightbsd*)
22542                   if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
22543
22544 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22545
22546                   fi
22547                   ;;
22548               esac
22549             fi
22550           fi
22551         fi
22552       fi
22553     fi
22554     if test $gl_threads_api = none; then
22555       if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
22556
22557
22558
22559   if test -z "$gl_stdthreadlib_body_done"; then
22560
22561
22562     case "$host_os" in
22563       mingw*)
22564         LIBSTDTHREAD=
22565         ;;
22566       *)
22567
22568
22569   if test -z "$gl_pthreadlib_body_done"; then
22570     gl_pthread_api=no
22571     LIBPTHREAD=
22572     LIBPMULTITHREAD=
22573     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
22574     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
22575     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
22576 if test "x$ac_cv_header_pthread_h" = xyes
22577 then :
22578   gl_have_pthread_h=yes
22579 else $as_nop
22580   gl_have_pthread_h=no
22581 fi
22582
22583     if test "$gl_have_pthread_h" = yes; then
22584       # Other possible tests:
22585       #   -lpthreads (FSU threads, PCthreads)
22586       #   -lgthreads
22587       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
22588       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
22589       # the second one only in libpthread, and lock.c needs it.
22590       #
22591       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
22592       # needs -pthread for some reason.  See:
22593       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
22594       save_LIBS=$LIBS
22595       for gl_pthread in '' '-pthread'; do
22596         LIBS="$LIBS $gl_pthread"
22597         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22598 /* end confdefs.h.  */
22599 #include <pthread.h>
22600                pthread_mutex_t m;
22601                pthread_mutexattr_t ma;
22602
22603 int
22604 main (void)
22605 {
22606 pthread_mutex_lock (&m);
22607                pthread_mutexattr_init (&ma);
22608   ;
22609   return 0;
22610 }
22611 _ACEOF
22612 if ac_fn_c_try_link "$LINENO"
22613 then :
22614   gl_pthread_api=yes
22615            LIBPTHREAD=$gl_pthread
22616            LIBPMULTITHREAD=$gl_pthread
22617 fi
22618 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22619     conftest$ac_exeext conftest.$ac_ext
22620         LIBS=$save_LIBS
22621         test $gl_pthread_api = yes && break
22622       done
22623
22624       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
22625       # since it is defined as a macro on OSF/1.)
22626       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
22627         # The program links fine without libpthread. But it may actually
22628         # need to link with libpthread in order to create multiple threads.
22629         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22630 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22631 if test ${ac_cv_lib_pthread_pthread_kill+y}
22632 then :
22633   printf %s "(cached) " >&6
22634 else $as_nop
22635   ac_check_lib_save_LIBS=$LIBS
22636 LIBS="-lpthread  $LIBS"
22637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22638 /* end confdefs.h.  */
22639
22640 /* Override any GCC internal prototype to avoid an error.
22641    Use char because int might match the return type of a GCC
22642    builtin and then its argument prototype would still apply.  */
22643 char pthread_kill ();
22644 int
22645 main (void)
22646 {
22647 return pthread_kill ();
22648   ;
22649   return 0;
22650 }
22651 _ACEOF
22652 if ac_fn_c_try_link "$LINENO"
22653 then :
22654   ac_cv_lib_pthread_pthread_kill=yes
22655 else $as_nop
22656   ac_cv_lib_pthread_pthread_kill=no
22657 fi
22658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22659     conftest$ac_exeext conftest.$ac_ext
22660 LIBS=$ac_check_lib_save_LIBS
22661 fi
22662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22663 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22664 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22665 then :
22666   LIBPMULTITHREAD=-lpthread
22667            # On Solaris and HP-UX, most pthread functions exist also in libc.
22668            # Therefore pthread_in_use() needs to actually try to create a
22669            # thread: pthread_create from libc will fail, whereas
22670            # pthread_create will actually create a thread.
22671            # On Solaris 10 or newer, this test is no longer needed, because
22672            # libc contains the fully functional pthread functions.
22673            case "$host_os" in
22674              solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
22675
22676 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22677
22678            esac
22679
22680 fi
22681
22682       elif test $gl_pthread_api != yes; then
22683         # Some library is needed. Try libpthread and libc_r.
22684         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22685 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22686 if test ${ac_cv_lib_pthread_pthread_kill+y}
22687 then :
22688   printf %s "(cached) " >&6
22689 else $as_nop
22690   ac_check_lib_save_LIBS=$LIBS
22691 LIBS="-lpthread  $LIBS"
22692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22693 /* end confdefs.h.  */
22694
22695 /* Override any GCC internal prototype to avoid an error.
22696    Use char because int might match the return type of a GCC
22697    builtin and then its argument prototype would still apply.  */
22698 char pthread_kill ();
22699 int
22700 main (void)
22701 {
22702 return pthread_kill ();
22703   ;
22704   return 0;
22705 }
22706 _ACEOF
22707 if ac_fn_c_try_link "$LINENO"
22708 then :
22709   ac_cv_lib_pthread_pthread_kill=yes
22710 else $as_nop
22711   ac_cv_lib_pthread_pthread_kill=no
22712 fi
22713 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22714     conftest$ac_exeext conftest.$ac_ext
22715 LIBS=$ac_check_lib_save_LIBS
22716 fi
22717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22718 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22719 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22720 then :
22721   gl_pthread_api=yes
22722            LIBPTHREAD=-lpthread
22723            LIBPMULTITHREAD=-lpthread
22724 fi
22725
22726         if test $gl_pthread_api != yes; then
22727           # For FreeBSD 4.
22728           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
22729 printf %s "checking for pthread_kill in -lc_r... " >&6; }
22730 if test ${ac_cv_lib_c_r_pthread_kill+y}
22731 then :
22732   printf %s "(cached) " >&6
22733 else $as_nop
22734   ac_check_lib_save_LIBS=$LIBS
22735 LIBS="-lc_r  $LIBS"
22736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22737 /* end confdefs.h.  */
22738
22739 /* Override any GCC internal prototype to avoid an error.
22740    Use char because int might match the return type of a GCC
22741    builtin and then its argument prototype would still apply.  */
22742 char pthread_kill ();
22743 int
22744 main (void)
22745 {
22746 return pthread_kill ();
22747   ;
22748   return 0;
22749 }
22750 _ACEOF
22751 if ac_fn_c_try_link "$LINENO"
22752 then :
22753   ac_cv_lib_c_r_pthread_kill=yes
22754 else $as_nop
22755   ac_cv_lib_c_r_pthread_kill=no
22756 fi
22757 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22758     conftest$ac_exeext conftest.$ac_ext
22759 LIBS=$ac_check_lib_save_LIBS
22760 fi
22761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22762 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22763 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22764 then :
22765   gl_pthread_api=yes
22766              LIBPTHREAD=-lc_r
22767              LIBPMULTITHREAD=-lc_r
22768 fi
22769
22770         fi
22771       fi
22772     fi
22773     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22774 printf %s "checking whether POSIX threads API is available... " >&6; }
22775     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22776 printf "%s\n" "$gl_pthread_api" >&6; }
22777
22778
22779     if test $gl_pthread_api = yes; then
22780
22781 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22782
22783     fi
22784
22785         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22786 /* end confdefs.h.  */
22787 #include <sched.h>
22788 int
22789 main (void)
22790 {
22791 sched_yield ();
22792   ;
22793   return 0;
22794 }
22795 _ACEOF
22796 if ac_fn_c_try_link "$LINENO"
22797 then :
22798   LIB_SCHED_YIELD=
22799
22800 else $as_nop
22801          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22802 printf %s "checking for sched_yield in -lrt... " >&6; }
22803 if test ${ac_cv_lib_rt_sched_yield+y}
22804 then :
22805   printf %s "(cached) " >&6
22806 else $as_nop
22807   ac_check_lib_save_LIBS=$LIBS
22808 LIBS="-lrt  $LIBS"
22809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22810 /* end confdefs.h.  */
22811
22812 /* Override any GCC internal prototype to avoid an error.
22813    Use char because int might match the return type of a GCC
22814    builtin and then its argument prototype would still apply.  */
22815 char sched_yield ();
22816 int
22817 main (void)
22818 {
22819 return sched_yield ();
22820   ;
22821   return 0;
22822 }
22823 _ACEOF
22824 if ac_fn_c_try_link "$LINENO"
22825 then :
22826   ac_cv_lib_rt_sched_yield=yes
22827 else $as_nop
22828   ac_cv_lib_rt_sched_yield=no
22829 fi
22830 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22831     conftest$ac_exeext conftest.$ac_ext
22832 LIBS=$ac_check_lib_save_LIBS
22833 fi
22834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22835 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22836 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22837 then :
22838   LIB_SCHED_YIELD=-lrt
22839 else $as_nop
22840             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22841 printf %s "checking for sched_yield in -lposix4... " >&6; }
22842 if test ${ac_cv_lib_posix4_sched_yield+y}
22843 then :
22844   printf %s "(cached) " >&6
22845 else $as_nop
22846   ac_check_lib_save_LIBS=$LIBS
22847 LIBS="-lposix4  $LIBS"
22848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22849 /* end confdefs.h.  */
22850
22851 /* Override any GCC internal prototype to avoid an error.
22852    Use char because int might match the return type of a GCC
22853    builtin and then its argument prototype would still apply.  */
22854 char sched_yield ();
22855 int
22856 main (void)
22857 {
22858 return sched_yield ();
22859   ;
22860   return 0;
22861 }
22862 _ACEOF
22863 if ac_fn_c_try_link "$LINENO"
22864 then :
22865   ac_cv_lib_posix4_sched_yield=yes
22866 else $as_nop
22867   ac_cv_lib_posix4_sched_yield=no
22868 fi
22869 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22870     conftest$ac_exeext conftest.$ac_ext
22871 LIBS=$ac_check_lib_save_LIBS
22872 fi
22873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22874 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22875 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22876 then :
22877   LIB_SCHED_YIELD=-lposix4
22878 fi
22879
22880 fi
22881
22882
22883 fi
22884 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22885     conftest$ac_exeext conftest.$ac_ext
22886
22887
22888     gl_pthreadlib_body_done=done
22889   fi
22890
22891         if test $ac_cv_header_threads_h = yes; then
22892                                                   ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
22893 if test "x$ac_cv_func_thrd_create" = xyes
22894 then :
22895   printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
22896
22897 fi
22898
22899           if test $ac_cv_func_thrd_create = yes; then
22900             LIBSTDTHREAD=
22901           else
22902             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
22903 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
22904 if test ${ac_cv_lib_stdthreads_thrd_create+y}
22905 then :
22906   printf %s "(cached) " >&6
22907 else $as_nop
22908   ac_check_lib_save_LIBS=$LIBS
22909 LIBS="-lstdthreads  $LIBS"
22910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22911 /* end confdefs.h.  */
22912
22913 /* Override any GCC internal prototype to avoid an error.
22914    Use char because int might match the return type of a GCC
22915    builtin and then its argument prototype would still apply.  */
22916 char thrd_create ();
22917 int
22918 main (void)
22919 {
22920 return thrd_create ();
22921   ;
22922   return 0;
22923 }
22924 _ACEOF
22925 if ac_fn_c_try_link "$LINENO"
22926 then :
22927   ac_cv_lib_stdthreads_thrd_create=yes
22928 else $as_nop
22929   ac_cv_lib_stdthreads_thrd_create=no
22930 fi
22931 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22932     conftest$ac_exeext conftest.$ac_ext
22933 LIBS=$ac_check_lib_save_LIBS
22934 fi
22935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
22936 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
22937 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
22938 then :
22939
22940               LIBSTDTHREAD='-lstdthreads -lpthread'
22941
22942 else $as_nop
22943
22944                             LIBSTDTHREAD="$LIBPMULTITHREAD"
22945
22946 fi
22947
22948           fi
22949         else
22950                     LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
22951         fi
22952         ;;
22953     esac
22954
22955
22956     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
22957 printf %s "checking whether ISO C threads API is available... " >&6; }
22958     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
22959 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
22960     gl_stdthreadlib_body_done=done
22961   fi
22962
22963         LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
22964         LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
22965         gl_threads_api=isoc
22966
22967 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
22968
22969       fi
22970     fi
22971     if test $gl_threads_api = none; then
22972       case "$gl_use_threads" in
22973         yes | windows | win32) # The 'win32' is for backward compatibility.
22974           if { case "$host_os" in
22975                  mingw*) true;;
22976                  *) false;;
22977                esac
22978              }; then
22979             gl_threads_api=windows
22980
22981 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
22982
22983           fi
22984           ;;
22985       esac
22986     fi
22987   fi
22988   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
22989 printf %s "checking for multithread API to use... " >&6; }
22990   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
22991 printf "%s\n" "$gl_threads_api" >&6; }
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
23002 printf %s "checking for a sed that does not truncate output... " >&6; }
23003 if test ${ac_cv_path_SED+y}
23004 then :
23005   printf %s "(cached) " >&6
23006 else $as_nop
23007             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
23008      for ac_i in 1 2 3 4 5 6 7; do
23009        ac_script="$ac_script$as_nl$ac_script"
23010      done
23011      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
23012      { ac_script=; unset ac_script;}
23013      if test -z "$SED"; then
23014   ac_path_SED_found=false
23015   # Loop through the user's path and test for each of PROGNAME-LIST
23016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23017 for as_dir in $PATH
23018 do
23019   IFS=$as_save_IFS
23020   case $as_dir in #(((
23021     '') as_dir=./ ;;
23022     */) ;;
23023     *) as_dir=$as_dir/ ;;
23024   esac
23025     for ac_prog in sed gsed
23026    do
23027     for ac_exec_ext in '' $ac_executable_extensions; do
23028       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
23029       as_fn_executable_p "$ac_path_SED" || continue
23030 # Check for GNU ac_path_SED and select it if it is found.
23031   # Check for GNU $ac_path_SED
23032 case `"$ac_path_SED" --version 2>&1` in
23033 *GNU*)
23034   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
23035 *)
23036   ac_count=0
23037   printf %s 0123456789 >"conftest.in"
23038   while :
23039   do
23040     cat "conftest.in" "conftest.in" >"conftest.tmp"
23041     mv "conftest.tmp" "conftest.in"
23042     cp "conftest.in" "conftest.nl"
23043     printf "%s\n" '' >> "conftest.nl"
23044     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
23045     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
23046     as_fn_arith $ac_count + 1 && ac_count=$as_val
23047     if test $ac_count -gt ${ac_path_SED_max-0}; then
23048       # Best one so far, save it but keep looking for a better one
23049       ac_cv_path_SED="$ac_path_SED"
23050       ac_path_SED_max=$ac_count
23051     fi
23052     # 10*(2^10) chars as input seems more than enough
23053     test $ac_count -gt 10 && break
23054   done
23055   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
23056 esac
23057
23058       $ac_path_SED_found && break 3
23059     done
23060   done
23061   done
23062 IFS=$as_save_IFS
23063   if test -z "$ac_cv_path_SED"; then
23064     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
23065   fi
23066 else
23067   ac_cv_path_SED=$SED
23068 fi
23069
23070 fi
23071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
23072 printf "%s\n" "$ac_cv_path_SED" >&6; }
23073  SED="$ac_cv_path_SED"
23074   rm -f conftest.sed
23075
23076
23077
23078     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
23079 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
23080 if test ${ac_cv_func_malloc_0_nonnull+y}
23081 then :
23082   printf %s "(cached) " >&6
23083 else $as_nop
23084   if test "$cross_compiling" = yes
23085 then :
23086   case "$host_os" in
23087           # Guess yes on platforms where we know the result.
23088           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
23089           | gnu* | *-musl* | midnightbsd* \
23090           | hpux* | solaris* | cygwin* | mingw* | msys* )
23091             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
23092           # If we don't know, obey --enable-cross-guesses.
23093           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
23094         esac
23095
23096 else $as_nop
23097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23098 /* end confdefs.h.  */
23099 #include <stdlib.h>
23100
23101 int
23102 main (void)
23103 {
23104 void *p = malloc (0);
23105             int result = !p;
23106             free (p);
23107             return result;
23108   ;
23109   return 0;
23110 }
23111
23112 _ACEOF
23113 if ac_fn_c_try_run "$LINENO"
23114 then :
23115   ac_cv_func_malloc_0_nonnull=yes
23116 else $as_nop
23117   ac_cv_func_malloc_0_nonnull=no
23118 fi
23119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23120   conftest.$ac_objext conftest.beam conftest.$ac_ext
23121 fi
23122
23123
23124 fi
23125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
23126 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
23127   case $ac_cv_func_malloc_0_nonnull in #(
23128   *yes) :
23129     gl_cv_func_malloc_0_nonnull=1 ;; #(
23130   *) :
23131     gl_cv_func_malloc_0_nonnull=0 ;;
23132 esac
23133
23134
23135 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150      if test $gl_cv_have_include_next = yes; then
23151        gl_cv_next_math_h='<'math.h'>'
23152      else
23153        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
23154 printf %s "checking absolute name of <math.h>... " >&6; }
23155 if test ${gl_cv_next_math_h+y}
23156 then :
23157   printf %s "(cached) " >&6
23158 else $as_nop
23159
23160              if test $ac_cv_header_math_h = yes; then
23161
23162
23163
23164
23165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23166 /* end confdefs.h.  */
23167 #include <math.h>
23168 _ACEOF
23169                 case "$host_os" in
23170     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23171     *)    gl_absname_cpp="$ac_cpp" ;;
23172   esac
23173
23174   case "$host_os" in
23175     mingw*)
23176                                           gl_dirsep_regex='[/\\]'
23177       ;;
23178     *)
23179       gl_dirsep_regex='\/'
23180       ;;
23181   esac
23182       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23183   gl_header_literal_regex=`echo 'math.h' \
23184                            | sed -e "$gl_make_literal_regex_sed"`
23185   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23186       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23187       s|^/[^/]|//&|
23188       p
23189       q
23190     }'
23191
23192         gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23193   sed -n "$gl_absolute_header_sed"`
23194
23195            gl_header=$gl_cv_absolute_math_h
23196            gl_cv_next_math_h='"'$gl_header'"'
23197           else
23198                gl_cv_next_math_h='<'math.h'>'
23199              fi
23200
23201
23202 fi
23203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
23204 printf "%s\n" "$gl_cv_next_math_h" >&6; }
23205      fi
23206      NEXT_MATH_H=$gl_cv_next_math_h
23207
23208      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23209        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23210        gl_next_as_first_directive='<'math.h'>'
23211      else
23212        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23213        gl_next_as_first_directive=$gl_cv_next_math_h
23214      fi
23215      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23216
23217
23218
23219
23220
23221   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23222 printf %s "checking whether NAN macro works... " >&6; }
23223 if test ${gl_cv_header_math_nan_works+y}
23224 then :
23225   printf %s "(cached) " >&6
23226 else $as_nop
23227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23228 /* end confdefs.h.  */
23229 #include <math.h>
23230 int
23231 main (void)
23232 {
23233 /* Solaris 10 has a broken definition of NAN.  Other platforms
23234         fail to provide NAN, or provide it only in C99 mode; this
23235         test only needs to fail when NAN is provided but wrong.  */
23236          float f = 1.0f;
23237 #ifdef NAN
23238          f = NAN;
23239 #endif
23240          return f == 0;
23241   ;
23242   return 0;
23243 }
23244 _ACEOF
23245 if ac_fn_c_try_compile "$LINENO"
23246 then :
23247   gl_cv_header_math_nan_works=yes
23248 else $as_nop
23249   gl_cv_header_math_nan_works=no
23250 fi
23251 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23252 fi
23253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23254 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
23255   if test $gl_cv_header_math_nan_works = no; then
23256     REPLACE_NAN=1
23257   fi
23258   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23259 printf %s "checking whether HUGE_VAL works... " >&6; }
23260 if test ${gl_cv_header_math_huge_val_works+y}
23261 then :
23262   printf %s "(cached) " >&6
23263 else $as_nop
23264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23265 /* end confdefs.h.  */
23266 #include <math.h>
23267 int
23268 main (void)
23269 {
23270 /* Solaris 10 has a broken definition of HUGE_VAL.  */
23271          double d = HUGE_VAL;
23272          return d == 0;
23273   ;
23274   return 0;
23275 }
23276 _ACEOF
23277 if ac_fn_c_try_compile "$LINENO"
23278 then :
23279   gl_cv_header_math_huge_val_works=yes
23280 else $as_nop
23281   gl_cv_header_math_huge_val_works=no
23282 fi
23283 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23284 fi
23285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23286 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
23287   if test $gl_cv_header_math_huge_val_works = no; then
23288     REPLACE_HUGE_VAL=1
23289   fi
23290
23291
23292
23293
23294
23295    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
23296 printf %s "checking for mbstate_t... " >&6; }
23297 if test ${ac_cv_type_mbstate_t+y}
23298 then :
23299   printf %s "(cached) " >&6
23300 else $as_nop
23301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23302 /* end confdefs.h.  */
23303 $ac_includes_default
23304              #include <wchar.h>
23305 int
23306 main (void)
23307 {
23308 mbstate_t x; return sizeof x;
23309   ;
23310   return 0;
23311 }
23312 _ACEOF
23313 if ac_fn_c_try_compile "$LINENO"
23314 then :
23315   ac_cv_type_mbstate_t=yes
23316 else $as_nop
23317   ac_cv_type_mbstate_t=no
23318 fi
23319 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23320 fi
23321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
23322 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
23323    if test $ac_cv_type_mbstate_t = yes; then
23324
23325 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
23326
23327    else
23328
23329 printf "%s\n" "#define mbstate_t int" >>confdefs.h
23330
23331    fi
23332
23333
23334
23335
23336   HAVE_MBSLEN=0;
23337     HAVE_EXPLICIT_BZERO=1;
23338   HAVE_FFSL=1;
23339   HAVE_FFSLL=1;
23340   HAVE_DECL_MEMMEM=1;
23341   HAVE_MEMPCPY=1;
23342   HAVE_DECL_MEMRCHR=1;
23343   HAVE_RAWMEMCHR=1;
23344   HAVE_STPCPY=1;
23345   HAVE_STPNCPY=1;
23346   HAVE_STRCHRNUL=1;
23347   HAVE_DECL_STRDUP=1;
23348   HAVE_DECL_STRNDUP=1;
23349   HAVE_DECL_STRNLEN=1;
23350   HAVE_STRPBRK=1;
23351   HAVE_STRSEP=1;
23352   HAVE_STRCASESTR=1;
23353   HAVE_DECL_STRTOK_R=1;
23354   HAVE_DECL_STRERROR_R=1;
23355   HAVE_STRERRORNAME_NP=1;
23356   HAVE_SIGABBREV_NP=1;
23357   HAVE_SIGDESCR_NP=1;
23358   HAVE_DECL_STRSIGNAL=1;
23359   HAVE_STRVERSCMP=1;
23360   REPLACE_FFSLL=0;
23361   REPLACE_MEMCHR=0;
23362   REPLACE_MEMMEM=0;
23363   REPLACE_STPNCPY=0;
23364   REPLACE_STRCHRNUL=0;
23365   REPLACE_STRDUP=0;
23366   REPLACE_STRNCAT=0;
23367   REPLACE_STRNDUP=0;
23368   REPLACE_STRNLEN=0;
23369   REPLACE_STRSTR=0;
23370   REPLACE_STRCASESTR=0;
23371   REPLACE_STRTOK_R=0;
23372   REPLACE_STRERROR=0;
23373   REPLACE_STRERROR_R=0;
23374   REPLACE_STRERRORNAME_NP=0;
23375   REPLACE_STRSIGNAL=0;
23376   UNDEFINE_STRTOK_R=0;
23377
23378
23379
23380
23381   GL_M4_GNULIB_EXPLICIT_BZERO=0
23382
23383
23384
23385   GL_M4_GNULIB_FFSL=0
23386
23387
23388
23389   GL_M4_GNULIB_FFSLL=0
23390
23391
23392
23393   GL_M4_GNULIB_MEMCHR=0
23394
23395
23396
23397   GL_M4_GNULIB_MEMMEM=0
23398
23399
23400
23401   GL_M4_GNULIB_MEMPCPY=0
23402
23403
23404
23405   GL_M4_GNULIB_MEMRCHR=0
23406
23407
23408
23409   GL_M4_GNULIB_RAWMEMCHR=0
23410
23411
23412
23413   GL_M4_GNULIB_STPCPY=0
23414
23415
23416
23417   GL_M4_GNULIB_STPNCPY=0
23418
23419
23420
23421   GL_M4_GNULIB_STRCHRNUL=0
23422
23423
23424
23425   GL_M4_GNULIB_STRDUP=0
23426
23427
23428
23429   GL_M4_GNULIB_STRNCAT=0
23430
23431
23432
23433   GL_M4_GNULIB_STRNDUP=0
23434
23435
23436
23437   GL_M4_GNULIB_STRNLEN=0
23438
23439
23440
23441   GL_M4_GNULIB_STRPBRK=0
23442
23443
23444
23445   GL_M4_GNULIB_STRSEP=0
23446
23447
23448
23449   GL_M4_GNULIB_STRSTR=0
23450
23451
23452
23453   GL_M4_GNULIB_STRCASESTR=0
23454
23455
23456
23457   GL_M4_GNULIB_STRTOK_R=0
23458
23459
23460
23461   GL_M4_GNULIB_MBSLEN=0
23462
23463
23464
23465   GL_M4_GNULIB_MBSNLEN=0
23466
23467
23468
23469   GL_M4_GNULIB_MBSCHR=0
23470
23471
23472
23473   GL_M4_GNULIB_MBSRCHR=0
23474
23475
23476
23477   GL_M4_GNULIB_MBSSTR=0
23478
23479
23480
23481   GL_M4_GNULIB_MBSCASECMP=0
23482
23483
23484
23485   GL_M4_GNULIB_MBSNCASECMP=0
23486
23487
23488
23489   GL_M4_GNULIB_MBSPCASECMP=0
23490
23491
23492
23493   GL_M4_GNULIB_MBSCASESTR=0
23494
23495
23496
23497   GL_M4_GNULIB_MBSCSPN=0
23498
23499
23500
23501   GL_M4_GNULIB_MBSPBRK=0
23502
23503
23504
23505   GL_M4_GNULIB_MBSSPN=0
23506
23507
23508
23509   GL_M4_GNULIB_MBSSEP=0
23510
23511
23512
23513   GL_M4_GNULIB_MBSTOK_R=0
23514
23515
23516
23517   GL_M4_GNULIB_STRERROR=0
23518
23519
23520
23521   GL_M4_GNULIB_STRERROR_R=0
23522
23523
23524
23525   GL_M4_GNULIB_STRERRORNAME_NP=0
23526
23527
23528
23529   GL_M4_GNULIB_SIGABBREV_NP=0
23530
23531
23532
23533   GL_M4_GNULIB_SIGDESCR_NP=0
23534
23535
23536
23537   GL_M4_GNULIB_STRSIGNAL=0
23538
23539
23540
23541   GL_M4_GNULIB_STRVERSCMP=0
23542
23543
23544
23545   GL_M4_GNULIB_MDA_MEMCCPY=1
23546
23547
23548
23549   GL_M4_GNULIB_MDA_STRDUP=1
23550
23551
23552
23553
23554
23555
23556   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
23557   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
23558   # irrelevant for anonymous mappings.
23559   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
23560 if test "x$ac_cv_func_mmap" = xyes
23561 then :
23562   gl_have_mmap=yes
23563 else $as_nop
23564   gl_have_mmap=no
23565 fi
23566
23567
23568   # Try to allow MAP_ANONYMOUS.
23569   gl_have_mmap_anonymous=no
23570   if test $gl_have_mmap = yes; then
23571     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
23572 printf %s "checking for MAP_ANONYMOUS... " >&6; }
23573     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23574 /* end confdefs.h.  */
23575
23576 #include <sys/mman.h>
23577 #ifdef MAP_ANONYMOUS
23578     I cannot identify this map
23579 #endif
23580
23581 _ACEOF
23582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23583   $EGREP "I cannot identify this map" >/dev/null 2>&1
23584 then :
23585   gl_have_mmap_anonymous=yes
23586 fi
23587 rm -rf conftest*
23588
23589     if test $gl_have_mmap_anonymous != yes; then
23590       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23591 /* end confdefs.h.  */
23592
23593 #include <sys/mman.h>
23594 #ifdef MAP_ANON
23595     I cannot identify this map
23596 #endif
23597
23598 _ACEOF
23599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23600   $EGREP "I cannot identify this map" >/dev/null 2>&1
23601 then :
23602
23603 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
23604
23605          gl_have_mmap_anonymous=yes
23606 fi
23607 rm -rf conftest*
23608
23609     fi
23610     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
23611 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
23612     if test $gl_have_mmap_anonymous = yes; then
23613
23614 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
23615
23616     fi
23617   fi
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628   # Detect platform-specific bugs in some versions of glibc:
23629   # memchr should not dereference anything with length 0
23630   #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
23631   # memchr should not dereference overestimated length after a match
23632   #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
23633   #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
23634   # memchr should cast the second argument to 'unsigned char'.
23635   #   This bug exists in Android 4.3.
23636   # Assume that memchr works on platforms that lack mprotect.
23637   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
23638 printf %s "checking whether memchr works... " >&6; }
23639 if test ${gl_cv_func_memchr_works+y}
23640 then :
23641   printf %s "(cached) " >&6
23642 else $as_nop
23643   if test "$cross_compiling" = yes
23644 then :
23645   case "$host_os" in
23646                            # Guess no on Android.
23647           linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
23648                            # Guess yes on native Windows.
23649           mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
23650                            # If we don't know, obey --enable-cross-guesses.
23651           *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
23652         esac
23653
23654 else $as_nop
23655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23656 /* end confdefs.h.  */
23657
23658 #include <string.h>
23659 #if HAVE_SYS_MMAN_H
23660 # include <fcntl.h>
23661 # include <unistd.h>
23662 # include <sys/types.h>
23663 # include <sys/mman.h>
23664 # ifndef MAP_FILE
23665 #  define MAP_FILE 0
23666 # endif
23667 #endif
23668
23669 int
23670 main (void)
23671 {
23672
23673   int result = 0;
23674   char *fence = NULL;
23675 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
23676 # if HAVE_MAP_ANONYMOUS
23677   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
23678   const int fd = -1;
23679 # else /* !HAVE_MAP_ANONYMOUS */
23680   const int flags = MAP_FILE | MAP_PRIVATE;
23681   int fd = open ("/dev/zero", O_RDONLY, 0666);
23682   if (fd >= 0)
23683 # endif
23684     {
23685       int pagesize = getpagesize ();
23686       char *two_pages =
23687         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
23688                        flags, fd, 0);
23689       if (two_pages != (char *)(-1)
23690           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
23691         fence = two_pages + pagesize;
23692     }
23693 #endif
23694   if (fence)
23695     {
23696       /* Test against bugs on glibc systems.  */
23697       if (memchr (fence, 0, 0))
23698         result |= 1;
23699       strcpy (fence - 9, "12345678");
23700       if (memchr (fence - 9, 0, 79) != fence - 1)
23701         result |= 2;
23702       if (memchr (fence - 1, 0, 3) != fence - 1)
23703         result |= 4;
23704       /* Test against bug on AIX 7.2.  */
23705       if (memchr (fence - 4, '6', 16) != fence - 4)
23706         result |= 8;
23707     }
23708   /* Test against bug on Android 4.3.  */
23709   {
23710     char input[3];
23711     input[0] = 'a';
23712     input[1] = 'b';
23713     input[2] = 'c';
23714     if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
23715       result |= 16;
23716   }
23717   return result;
23718
23719   ;
23720   return 0;
23721 }
23722 _ACEOF
23723 if ac_fn_c_try_run "$LINENO"
23724 then :
23725   gl_cv_func_memchr_works=yes
23726 else $as_nop
23727   gl_cv_func_memchr_works=no
23728 fi
23729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23730   conftest.$ac_objext conftest.beam conftest.$ac_ext
23731 fi
23732
23733
23734 fi
23735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
23736 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
23737   case "$gl_cv_func_memchr_works" in
23738     *yes) ;;
23739     *) REPLACE_MEMCHR=1 ;;
23740   esac
23741
23742 ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23743 if test "x$ac_cv_have_decl_memrchr" = xyes
23744 then :
23745   ac_have_decl=1
23746 else $as_nop
23747   ac_have_decl=0
23748 fi
23749 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
23750
23751
23752
23753
23754
23755   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
23756 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
23757 if test ${gl_cv_minmax_in_limits_h+y}
23758 then :
23759   printf %s "(cached) " >&6
23760 else $as_nop
23761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23762 /* end confdefs.h.  */
23763 #include <limits.h>
23764             int x = MIN (42, 17);
23765 int
23766 main (void)
23767 {
23768
23769   ;
23770   return 0;
23771 }
23772 _ACEOF
23773 if ac_fn_c_try_compile "$LINENO"
23774 then :
23775   gl_cv_minmax_in_limits_h=yes
23776 else $as_nop
23777   gl_cv_minmax_in_limits_h=no
23778 fi
23779 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23780 fi
23781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
23782 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
23783   if test $gl_cv_minmax_in_limits_h = yes; then
23784
23785 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
23786
23787   fi
23788
23789
23790
23791
23792
23793
23794   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
23795 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
23796 if test ${gl_cv_minmax_in_sys_param_h+y}
23797 then :
23798   printf %s "(cached) " >&6
23799 else $as_nop
23800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23801 /* end confdefs.h.  */
23802 #include <sys/param.h>
23803             int x = MIN (42, 17);
23804 int
23805 main (void)
23806 {
23807
23808   ;
23809   return 0;
23810 }
23811 _ACEOF
23812 if ac_fn_c_try_compile "$LINENO"
23813 then :
23814   gl_cv_minmax_in_sys_param_h=yes
23815 else $as_nop
23816   gl_cv_minmax_in_sys_param_h=no
23817 fi
23818 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23819 fi
23820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
23821 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
23822   if test $gl_cv_minmax_in_sys_param_h = yes; then
23823
23824 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
23825
23826   fi
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
23838 printf %s "checking for O_CLOEXEC... " >&6; }
23839 if test ${gl_cv_macro_O_CLOEXEC+y}
23840 then :
23841   printf %s "(cached) " >&6
23842 else $as_nop
23843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23844 /* end confdefs.h.  */
23845 #include <fcntl.h>
23846                           #ifndef O_CLOEXEC
23847                             choke me;
23848                           #endif
23849
23850 int
23851 main (void)
23852 {
23853 return O_CLOEXEC;
23854   ;
23855   return 0;
23856 }
23857 _ACEOF
23858 if ac_fn_c_try_compile "$LINENO"
23859 then :
23860   gl_cv_macro_O_CLOEXEC=yes
23861 else $as_nop
23862   gl_cv_macro_O_CLOEXEC=no
23863 fi
23864 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23865 fi
23866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
23867 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
23868
23869
23870
23871   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
23872 printf %s "checking for promoted mode_t type... " >&6; }
23873 if test ${gl_cv_promoted_mode_t+y}
23874 then :
23875   printf %s "(cached) " >&6
23876 else $as_nop
23877
23878                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23879 /* end confdefs.h.  */
23880 #include <sys/types.h>
23881 int
23882 main (void)
23883 {
23884 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
23885   ;
23886   return 0;
23887 }
23888 _ACEOF
23889 if ac_fn_c_try_compile "$LINENO"
23890 then :
23891   gl_cv_promoted_mode_t='int'
23892 else $as_nop
23893   gl_cv_promoted_mode_t='mode_t'
23894 fi
23895 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23896
23897 fi
23898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
23899 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
23900
23901 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
23902
23903
23904
23905
23906
23907
23908     HAVE_POSIX_SPAWN=1;
23909   HAVE_POSIX_SPAWNATTR_T=1;
23910   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
23911
23912   HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1;
23913
23914   HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1;
23915
23916   REPLACE_POSIX_SPAWN=0;
23917   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
23918
23919   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
23920
23921   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
23922
23923   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
23924
23925   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
23926
23927
23928
23929
23930
23931   LIB_POSIX_SPAWN=
23932
23933   gl_saved_libs=$LIBS
23934     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
23935 printf %s "checking for library containing posix_spawn... " >&6; }
23936 if test ${ac_cv_search_posix_spawn+y}
23937 then :
23938   printf %s "(cached) " >&6
23939 else $as_nop
23940   ac_func_search_save_LIBS=$LIBS
23941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23942 /* end confdefs.h.  */
23943
23944 /* Override any GCC internal prototype to avoid an error.
23945    Use char because int might match the return type of a GCC
23946    builtin and then its argument prototype would still apply.  */
23947 char posix_spawn ();
23948 int
23949 main (void)
23950 {
23951 return posix_spawn ();
23952   ;
23953   return 0;
23954 }
23955 _ACEOF
23956 for ac_lib in '' rt
23957 do
23958   if test -z "$ac_lib"; then
23959     ac_res="none required"
23960   else
23961     ac_res=-l$ac_lib
23962     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23963   fi
23964   if ac_fn_c_try_link "$LINENO"
23965 then :
23966   ac_cv_search_posix_spawn=$ac_res
23967 fi
23968 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23969     conftest$ac_exeext
23970   if test ${ac_cv_search_posix_spawn+y}
23971 then :
23972   break
23973 fi
23974 done
23975 if test ${ac_cv_search_posix_spawn+y}
23976 then :
23977
23978 else $as_nop
23979   ac_cv_search_posix_spawn=no
23980 fi
23981 rm conftest.$ac_ext
23982 LIBS=$ac_func_search_save_LIBS
23983 fi
23984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
23985 printf "%s\n" "$ac_cv_search_posix_spawn" >&6; }
23986 ac_res=$ac_cv_search_posix_spawn
23987 if test "$ac_res" != no
23988 then :
23989   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23990   test "$ac_cv_search_posix_spawn" = "none required" ||
23991                     LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
23992 fi
23993
23994     ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
23995 if test "x$ac_cv_func_posix_spawn" = xyes
23996 then :
23997   printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
23998
23999 fi
24000
24001   LIBS=$gl_saved_libs
24002
24003   if test $ac_cv_func_posix_spawn != yes; then
24004     HAVE_POSIX_SPAWN=0
24005   fi
24006
24007
24008
24009
24010
24011                                       ac_fn_check_decl "$LINENO" "posix_spawn" "ac_cv_have_decl_posix_spawn" "#include <spawn.h>
24012 " "$ac_c_undeclared_builtin_options" "CFLAGS"
24013 if test "x$ac_cv_have_decl_posix_spawn" = xyes
24014 then :
24015   ac_have_decl=1
24016 else $as_nop
24017   ac_have_decl=0
24018 fi
24019 printf "%s\n" "#define HAVE_DECL_POSIX_SPAWN $ac_have_decl" >>confdefs.h
24020
24021   if test $ac_cv_func_posix_spawn = yes; then
24022
24023        if test $ac_cv_func_posix_spawn_file_actions_addchdir_np = no; then
24024                            REPLACE_POSIX_SPAWN=1
24025        fi
24026
24027
24028     if test $REPLACE_POSIX_SPAWN = 0; then
24029
24030
24031      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
24032 printf %s "checking whether posix_spawn works... " >&6; }
24033 if test ${gl_cv_func_posix_spawn_works+y}
24034 then :
24035   printf %s "(cached) " >&6
24036 else $as_nop
24037   if test $cross_compiling = no; then
24038        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24039 /* end confdefs.h.  */
24040
24041 #include <errno.h>
24042 #include <fcntl.h>
24043 #include <signal.h>
24044 #include <spawn.h>
24045 #include <stdbool.h>
24046 #include <stdio.h>
24047 #include <stdlib.h>
24048 #include <string.h>
24049 #include <unistd.h>
24050 #include <sys/types.h>
24051 #include <sys/wait.h>
24052
24053
24054 $gl_mda_defines
24055
24056
24057 extern char **environ;
24058
24059 #ifndef STDIN_FILENO
24060 # define STDIN_FILENO 0
24061 #endif
24062 #ifndef STDOUT_FILENO
24063 # define STDOUT_FILENO 1
24064 #endif
24065 #ifndef STDERR_FILENO
24066 # define STDERR_FILENO 2
24067 #endif
24068
24069 #ifndef WTERMSIG
24070 # define WTERMSIG(x) ((x) & 0x7f)
24071 #endif
24072 #ifndef WIFEXITED
24073 # define WIFEXITED(x) (WTERMSIG (x) == 0)
24074 #endif
24075 #ifndef WEXITSTATUS
24076 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
24077 #endif
24078
24079 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
24080
24081 static int
24082 fd_safer (int fd)
24083 {
24084   if (0 <= fd && fd <= 2)
24085     {
24086       int f = fd_safer (dup (fd));
24087       int e = errno;
24088       close (fd);
24089       errno = e;
24090       fd = f;
24091     }
24092
24093   return fd;
24094 }
24095
24096 int
24097 main ()
24098 {
24099   char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
24100   int ofd[2];
24101   sigset_t blocked_signals;
24102   sigset_t fatal_signal_set;
24103   posix_spawn_file_actions_t actions;
24104   bool actions_allocated;
24105   posix_spawnattr_t attrs;
24106   bool attrs_allocated;
24107   int err;
24108   pid_t child;
24109   int status;
24110   int exitstatus;
24111
24112   setvbuf (stdout, NULL, _IOFBF, 0);
24113   puts ("This should be seen only once.");
24114   if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
24115     {
24116       perror ("cannot create pipe");
24117       exit (1);
24118     }
24119   sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
24120   sigemptyset (&fatal_signal_set);
24121   sigaddset (&fatal_signal_set, SIGINT);
24122   sigaddset (&fatal_signal_set, SIGTERM);
24123   sigaddset (&fatal_signal_set, SIGHUP);
24124   sigaddset (&fatal_signal_set, SIGPIPE);
24125   sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
24126   actions_allocated = false;
24127   attrs_allocated = false;
24128   if ((err = posix_spawn_file_actions_init (&actions)) != 0
24129       || (actions_allocated = true,
24130           (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
24131           || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
24132           || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
24133           || (err = posix_spawnattr_init (&attrs)) != 0
24134           || (attrs_allocated = true,
24135               (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
24136               || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
24137           || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
24138     {
24139       if (actions_allocated)
24140         posix_spawn_file_actions_destroy (&actions);
24141       if (attrs_allocated)
24142         posix_spawnattr_destroy (&attrs);
24143       sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
24144       if (err == ENOENT)
24145         return 0;
24146       else
24147         {
24148           errno = err;
24149           perror ("subprocess failed");
24150           exit (1);
24151         }
24152     }
24153   posix_spawn_file_actions_destroy (&actions);
24154   posix_spawnattr_destroy (&attrs);
24155   sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
24156   close (ofd[0]);
24157   close (ofd[1]);
24158   status = 0;
24159   while (waitpid (child, &status, 0) != child)
24160     ;
24161   if (!WIFEXITED (status))
24162     {
24163       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
24164       exit (1);
24165     }
24166   exitstatus = WEXITSTATUS (status);
24167   if (exitstatus != 127)
24168     {
24169       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
24170       exit (1);
24171     }
24172   return 0;
24173 }
24174
24175 _ACEOF
24176 if ac_fn_c_try_link "$LINENO"
24177 then :
24178   if test -s conftest$ac_exeext \
24179              && ./conftest$ac_exeext > conftest.out \
24180              && echo 'This should be seen only once.' > conftest.ok \
24181              && cmp conftest.out conftest.ok >/dev/null 2>&1; then
24182             gl_cv_func_posix_spawn_works=yes
24183           else
24184             gl_cv_func_posix_spawn_works=no
24185           fi
24186 else $as_nop
24187   gl_cv_func_posix_spawn_works=no
24188 fi
24189 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24190     conftest$ac_exeext conftest.$ac_ext
24191        if test $gl_cv_func_posix_spawn_works = yes; then
24192          if test "$cross_compiling" = yes
24193 then :
24194   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24195 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
24196 as_fn_error $? "cannot run test program while cross compiling
24197 See \`config.log' for more details" "$LINENO" 5; }
24198 else $as_nop
24199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24200 /* end confdefs.h.  */
24201
24202 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
24203    that contain special characters such as '*'.  */
24204
24205 #include <errno.h>
24206 #include <fcntl.h>
24207 #include <signal.h>
24208 #include <spawn.h>
24209 #include <stdbool.h>
24210 #include <stdio.h>
24211 #include <string.h>
24212 #include <unistd.h>
24213 #include <sys/types.h>
24214 #include <sys/wait.h>
24215
24216
24217 $gl_mda_defines
24218
24219
24220 extern char **environ;
24221
24222 #ifndef STDIN_FILENO
24223 # define STDIN_FILENO 0
24224 #endif
24225 #ifndef STDOUT_FILENO
24226 # define STDOUT_FILENO 1
24227 #endif
24228 #ifndef STDERR_FILENO
24229 # define STDERR_FILENO 2
24230 #endif
24231
24232 #ifndef WTERMSIG
24233 # define WTERMSIG(x) ((x) & 0x7f)
24234 #endif
24235 #ifndef WIFEXITED
24236 # define WIFEXITED(x) (WTERMSIG (x) == 0)
24237 #endif
24238 #ifndef WEXITSTATUS
24239 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
24240 #endif
24241
24242 #define CHILD_PROGRAM_FILENAME "conftest"
24243 #define DATA_FILENAME "conftest%=*#?"
24244
24245 static int
24246 parent_main (void)
24247 {
24248   FILE *fp;
24249   char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
24250   posix_spawn_file_actions_t actions;
24251   bool actions_allocated;
24252   int err;
24253   pid_t child;
24254   int status;
24255   int exitstatus;
24256
24257   /* Create a data file with specific contents.  */
24258   fp = fopen (DATA_FILENAME, "wb");
24259   if (fp == NULL)
24260     {
24261       perror ("cannot create data file");
24262       return 1;
24263     }
24264   fwrite ("Halle Potta", 1, 11, fp);
24265   if (fflush (fp) || fclose (fp))
24266     {
24267       perror ("cannot prepare data file");
24268       return 2;
24269     }
24270
24271   /* Avoid reading from our stdin, as it could block.  */
24272   freopen ("/dev/null", "rb", stdin);
24273
24274   /* Test whether posix_spawn_file_actions_addopen with this file name
24275      actually works, but spawning a child that reads from this file.  */
24276   actions_allocated = false;
24277   if ((err = posix_spawn_file_actions_init (&actions)) != 0
24278       || (actions_allocated = true,
24279           (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
24280           || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
24281     {
24282       if (actions_allocated)
24283         posix_spawn_file_actions_destroy (&actions);
24284       errno = err;
24285       perror ("subprocess failed");
24286       return 3;
24287     }
24288   posix_spawn_file_actions_destroy (&actions);
24289   status = 0;
24290   while (waitpid (child, &status, 0) != child)
24291     ;
24292   if (!WIFEXITED (status))
24293     {
24294       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
24295       return 4;
24296     }
24297   exitstatus = WEXITSTATUS (status);
24298   if (exitstatus != 0)
24299     {
24300       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
24301       return 5;
24302     }
24303   return 0;
24304 }
24305
24306 static int
24307 child_main (void)
24308 {
24309   char buf[1024];
24310
24311   /* See if reading from STDIN_FILENO yields the expected contents.  */
24312   if (fread (buf, 1, sizeof (buf), stdin) == 11
24313       && memcmp (buf, "Halle Potta", 11) == 0)
24314     return 0;
24315   else
24316     return 8;
24317 }
24318
24319 static void
24320 cleanup_then_die (int sig)
24321 {
24322   /* Clean up data file.  */
24323   unlink (DATA_FILENAME);
24324
24325   /* Re-raise the signal and die from it.  */
24326   signal (sig, SIG_DFL);
24327   raise (sig);
24328 }
24329
24330 int
24331 main (int argc, char *argv[])
24332 {
24333   int exitstatus;
24334
24335   if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
24336     {
24337       /* This is the parent process.  */
24338       signal (SIGINT, cleanup_then_die);
24339       signal (SIGTERM, cleanup_then_die);
24340       #ifdef SIGHUP
24341       signal (SIGHUP, cleanup_then_die);
24342       #endif
24343
24344       exitstatus = parent_main ();
24345     }
24346   else
24347     {
24348       /* This is the child process.  */
24349
24350       exitstatus = child_main ();
24351     }
24352   unlink (DATA_FILENAME);
24353   return exitstatus;
24354 }
24355
24356 _ACEOF
24357 if ac_fn_c_try_run "$LINENO"
24358 then :
24359
24360 else $as_nop
24361   gl_cv_func_posix_spawn_works=no
24362 fi
24363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24364   conftest.$ac_objext conftest.beam conftest.$ac_ext
24365 fi
24366
24367        fi
24368      else
24369        case "$host_os" in
24370          aix*) gl_cv_func_posix_spawn_works="guessing no";;
24371          *)    gl_cv_func_posix_spawn_works="guessing yes";;
24372        esac
24373      fi
24374
24375 fi
24376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
24377 printf "%s\n" "$gl_cv_func_posix_spawn_works" >&6; }
24378
24379       case "$gl_cv_func_posix_spawn_works" in
24380         *yes) ;;
24381         *) REPLACE_POSIX_SPAWN=1 ;;
24382       esac
24383     fi
24384     if test $REPLACE_POSIX_SPAWN = 0; then
24385
24386
24387          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn rejects scripts without shebang" >&5
24388 printf %s "checking whether posix_spawn rejects scripts without shebang... " >&6; }
24389 if test ${gl_cv_func_posix_spawn_secure_exec+y}
24390 then :
24391   printf %s "(cached) " >&6
24392 else $as_nop
24393   echo ':' > conftest.scr
24394      chmod a+x conftest.scr
24395      if test "$cross_compiling" = yes
24396 then :
24397   case "$host_os" in
24398           # Guess no on GNU/Hurd.
24399           gnu*)
24400             gl_cv_func_posix_spawn_secure_exec="guessing no" ;;
24401           # Guess yes on all other platforms.
24402           *)
24403             gl_cv_func_posix_spawn_secure_exec="guessing yes" ;;
24404         esac
24405
24406 else $as_nop
24407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24408 /* end confdefs.h.  */
24409
24410        #include <errno.h>
24411        #include <spawn.h>
24412        #include <stddef.h>
24413        #include <sys/types.h>
24414        #include <sys/wait.h>
24415        int
24416        main ()
24417        {
24418          const char *prog_path = "./conftest.scr";
24419          const char *prog_argv[2] = { prog_path, NULL };
24420          const char *environment[2] = { "PATH=.", NULL };
24421          pid_t child;
24422          int status;
24423          int err = posix_spawn (&child, prog_path, NULL, NULL,
24424                                 (char **) prog_argv, (char **) environment);
24425          if (err == ENOEXEC)
24426            return 0;
24427          if (err != 0)
24428            return 1;
24429          status = 0;
24430          while (waitpid (child, &status, 0) != child)
24431            ;
24432          if (!WIFEXITED (status))
24433            return 2;
24434          if (WEXITSTATUS (status) != 127)
24435            return 3;
24436          return 0;
24437        }
24438
24439 _ACEOF
24440 if ac_fn_c_try_run "$LINENO"
24441 then :
24442   gl_cv_func_posix_spawn_secure_exec=yes
24443 else $as_nop
24444   gl_cv_func_posix_spawn_secure_exec=no
24445 fi
24446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24447   conftest.$ac_objext conftest.beam conftest.$ac_ext
24448 fi
24449
24450      rm -f conftest.scr
24451
24452 fi
24453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_secure_exec" >&5
24454 printf "%s\n" "$gl_cv_func_posix_spawn_secure_exec" >&6; }
24455   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnp rejects scripts without shebang" >&5
24456 printf %s "checking whether posix_spawnp rejects scripts without shebang... " >&6; }
24457 if test ${gl_cv_func_posix_spawnp_secure_exec+y}
24458 then :
24459   printf %s "(cached) " >&6
24460 else $as_nop
24461   echo ':' > conftest.scr
24462      chmod a+x conftest.scr
24463      if test "$cross_compiling" = yes
24464 then :
24465   case "$host_os" in
24466           # Guess yes on glibc systems (glibc >= 2.15 actually) except GNU/Hurd,
24467           # musl libc, NetBSD.
24468           *-gnu* | *-musl* | netbsd*)
24469             gl_cv_func_posix_spawnp_secure_exec="guessing yes" ;;
24470           # Guess no on GNU/Hurd, macOS, FreeBSD, OpenBSD, AIX, Solaris, Cygwin.
24471           gnu* | darwin* | freebsd* | dragonfly* | midnightbsd* | openbsd* | \
24472           aix* | solaris* | cygwin*)
24473             gl_cv_func_posix_spawnp_secure_exec="guessing no" ;;
24474           # If we don't know, obey --enable-cross-guesses.
24475           *)
24476             gl_cv_func_posix_spawnp_secure_exec="$gl_cross_guess_normal" ;;
24477         esac
24478
24479 else $as_nop
24480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24481 /* end confdefs.h.  */
24482
24483        #include <errno.h>
24484        #include <spawn.h>
24485        #include <stddef.h>
24486        #include <sys/types.h>
24487        #include <sys/wait.h>
24488        int
24489        main ()
24490        {
24491          const char *prog_path = "./conftest.scr";
24492          const char *prog_argv[2] = { prog_path, NULL };
24493          const char *environment[2] = { "PATH=.", NULL };
24494          pid_t child;
24495          int status;
24496          int err = posix_spawnp (&child, prog_path, NULL, NULL,
24497                                  (char **) prog_argv, (char **) environment);
24498          if (err == ENOEXEC)
24499            return 0;
24500          if (err != 0)
24501            return 1;
24502          status = 0;
24503          while (waitpid (child, &status, 0) != child)
24504            ;
24505          if (!WIFEXITED (status))
24506            return 2;
24507          if (WEXITSTATUS (status) != 127)
24508            return 3;
24509          return 0;
24510        }
24511
24512 _ACEOF
24513 if ac_fn_c_try_run "$LINENO"
24514 then :
24515   gl_cv_func_posix_spawnp_secure_exec=yes
24516 else $as_nop
24517   gl_cv_func_posix_spawnp_secure_exec=no
24518 fi
24519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24520   conftest.$ac_objext conftest.beam conftest.$ac_ext
24521 fi
24522
24523      rm -f conftest.scr
24524
24525 fi
24526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawnp_secure_exec" >&5
24527 printf "%s\n" "$gl_cv_func_posix_spawnp_secure_exec" >&6; }
24528
24529       case "$gl_cv_func_posix_spawn_secure_exec" in
24530         *yes) ;;
24531         *) REPLACE_POSIX_SPAWN=1 ;;
24532       esac
24533       case "$gl_cv_func_posix_spawnp_secure_exec" in
24534         *yes) ;;
24535         *) REPLACE_POSIX_SPAWN=1 ;;
24536       esac
24537     fi
24538     if test $REPLACE_POSIX_SPAWN = 0; then
24539                               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
24540 printf %s "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
24541 if test ${gl_cv_func_spawnattr_setschedpolicy+y}
24542 then :
24543   printf %s "(cached) " >&6
24544 else $as_nop
24545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24546 /* end confdefs.h.  */
24547
24548 #include <spawn.h>
24549 #if POSIX_SPAWN_SETSCHEDULER
24550  POSIX scheduling supported
24551 #endif
24552
24553 _ACEOF
24554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24555   $EGREP "POSIX scheduling supported" >/dev/null 2>&1
24556 then :
24557   gl_cv_func_spawnattr_setschedpolicy=yes
24558 else $as_nop
24559   gl_cv_func_spawnattr_setschedpolicy=no
24560 fi
24561 rm -rf conftest*
24562
24563
24564 fi
24565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
24566 printf "%s\n" "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
24567                               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
24568 printf %s "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
24569 if test ${gl_cv_func_spawnattr_setschedparam+y}
24570 then :
24571   printf %s "(cached) " >&6
24572 else $as_nop
24573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24574 /* end confdefs.h.  */
24575
24576 #include <spawn.h>
24577 #if POSIX_SPAWN_SETSCHEDPARAM
24578  POSIX scheduling supported
24579 #endif
24580
24581 _ACEOF
24582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24583   $EGREP "POSIX scheduling supported" >/dev/null 2>&1
24584 then :
24585   gl_cv_func_spawnattr_setschedparam=yes
24586 else $as_nop
24587   gl_cv_func_spawnattr_setschedparam=no
24588 fi
24589 rm -rf conftest*
24590
24591
24592 fi
24593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
24594 printf "%s\n" "$gl_cv_func_spawnattr_setschedparam" >&6; }
24595     fi
24596   else
24597                 if test $ac_cv_have_decl_posix_spawn = yes; then
24598                               REPLACE_POSIX_SPAWN=1
24599     fi
24600   fi
24601   if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
24602
24603 printf "%s\n" "#define REPLACE_POSIX_SPAWN 1" >>confdefs.h
24604
24605   fi
24606
24607
24608
24609   GL_M4_GNULIB_POSIX_SPAWN=0
24610
24611
24612
24613   GL_M4_GNULIB_POSIX_SPAWNP=0
24614
24615
24616
24617   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0
24618
24619
24620
24621   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
24622
24623
24624
24625   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0
24626
24627
24628
24629   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0
24630
24631
24632
24633   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0
24634
24635
24636
24637   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0
24638
24639
24640
24641   GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0
24642
24643
24644
24645   GL_M4_GNULIB_POSIX_SPAWNATTR_INIT=0
24646
24647
24648
24649   GL_M4_GNULIB_POSIX_SPAWNATTR_GETFLAGS=0
24650
24651
24652
24653   GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS=0
24654
24655
24656
24657   GL_M4_GNULIB_POSIX_SPAWNATTR_GETPGROUP=0
24658
24659
24660
24661   GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP=0
24662
24663
24664
24665   GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0
24666
24667
24668
24669   GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0
24670
24671
24672
24673   GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0
24674
24675
24676
24677   GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0
24678
24679
24680
24681   GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0
24682
24683
24684
24685   GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0
24686
24687
24688
24689   GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0
24690
24691
24692
24693   GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0
24694
24695
24696
24697   GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY=0
24698
24699
24700
24701
24702
24703     HAVE_POSIX_SIGNALBLOCKING=1;
24704   HAVE_PTHREAD_SIGMASK=1;
24705   HAVE_RAISE=1;
24706   HAVE_SIGSET_T=1;
24707   HAVE_SIGINFO_T=1;
24708   HAVE_SIGACTION=1;
24709   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
24710
24711   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
24712
24713   HAVE_SIGHANDLER_T=1;
24714   REPLACE_PTHREAD_SIGMASK=0;
24715   REPLACE_RAISE=0;
24716
24717
24718   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
24719       #include <signal.h>
24720       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
24721       #include <sys/types.h>
24722
24723 "
24724 if test "x$ac_cv_type_sigset_t" = xyes
24725 then :
24726
24727 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
24728
24729 gl_cv_type_sigset_t=yes
24730 else $as_nop
24731   gl_cv_type_sigset_t=no
24732 fi
24733
24734   if test $gl_cv_type_sigset_t != yes; then
24735     HAVE_SIGSET_T=0
24736   fi
24737
24738
24739
24740   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
24741 printf %s "checking for SIGPIPE... " >&6; }
24742 if test ${gl_cv_header_signal_h_SIGPIPE+y}
24743 then :
24744   printf %s "(cached) " >&6
24745 else $as_nop
24746
24747     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24748 /* end confdefs.h.  */
24749
24750 #include <signal.h>
24751 #if !defined SIGPIPE
24752 booboo
24753 #endif
24754
24755 _ACEOF
24756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24757   $EGREP "booboo" >/dev/null 2>&1
24758 then :
24759   gl_cv_header_signal_h_SIGPIPE=no
24760 else $as_nop
24761   gl_cv_header_signal_h_SIGPIPE=yes
24762 fi
24763 rm -rf conftest*
24764
24765
24766 fi
24767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
24768 printf "%s\n" "$gl_cv_header_signal_h_SIGPIPE" >&6; }
24769
24770
24771
24772   GL_M4_GNULIB_PTHREAD_SIGMASK=0
24773
24774
24775
24776   GL_M4_GNULIB_RAISE=0
24777
24778
24779
24780   GL_M4_GNULIB_SIGNAL_H_SIGPIPE=0
24781
24782
24783
24784   GL_M4_GNULIB_SIGPROCMASK=0
24785
24786
24787
24788   GL_M4_GNULIB_SIGACTION=0
24789
24790
24791
24792
24793
24794
24795
24796   if test $REPLACE_MALLOC = 1; then
24797     REPLACE_REALLOC=1
24798   fi
24799
24800
24801
24802
24803
24804
24805     HAVE_SCHED_YIELD=1;
24806   REPLACE_SCHED_YIELD=0;
24807
24808
24809
24810
24811
24812
24813
24814   ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
24815        #include <sys/cdefs.h>
24816       #endif
24817
24818 "
24819 if test "x$ac_cv_header_sched_h" = xyes
24820 then :
24821   printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
24822
24823 fi
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833      if test $gl_cv_have_include_next = yes; then
24834        gl_cv_next_sched_h='<'sched.h'>'
24835      else
24836        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
24837 printf %s "checking absolute name of <sched.h>... " >&6; }
24838 if test ${gl_cv_next_sched_h+y}
24839 then :
24840   printf %s "(cached) " >&6
24841 else $as_nop
24842
24843
24844
24845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24846 /* end confdefs.h.  */
24847 #include <sched.h>
24848 _ACEOF
24849                 case "$host_os" in
24850     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24851     *)    gl_absname_cpp="$ac_cpp" ;;
24852   esac
24853
24854   case "$host_os" in
24855     mingw*)
24856                                           gl_dirsep_regex='[/\\]'
24857       ;;
24858     *)
24859       gl_dirsep_regex='\/'
24860       ;;
24861   esac
24862       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24863   gl_header_literal_regex=`echo 'sched.h' \
24864                            | sed -e "$gl_make_literal_regex_sed"`
24865   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24866       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24867       s|^/[^/]|//&|
24868       p
24869       q
24870     }'
24871
24872         gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24873   sed -n "$gl_absolute_header_sed"`
24874
24875            gl_header=$gl_cv_absolute_sched_h
24876            gl_cv_next_sched_h='"'$gl_header'"'
24877
24878
24879 fi
24880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
24881 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
24882      fi
24883      NEXT_SCHED_H=$gl_cv_next_sched_h
24884
24885      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24886        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24887        gl_next_as_first_directive='<'sched.h'>'
24888      else
24889        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24890        gl_next_as_first_directive=$gl_cv_next_sched_h
24891      fi
24892      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
24893
24894
24895
24896
24897
24898   if test "$ac_cv_header_sched_h" = yes; then
24899     HAVE_SCHED_H=1
24900   else
24901     HAVE_SCHED_H=0
24902   fi
24903
24904
24905   if test "$HAVE_SCHED_H" = 1; then
24906     ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
24907          #include <sys/cdefs.h>
24908         #endif
24909         #include <sched.h>
24910
24911 "
24912 if test "x$ac_cv_type_struct_sched_param" = xyes
24913 then :
24914   HAVE_STRUCT_SCHED_PARAM=1
24915 else $as_nop
24916   HAVE_STRUCT_SCHED_PARAM=0
24917 fi
24918
24919   else
24920     HAVE_STRUCT_SCHED_PARAM=0
24921     case "$host_os" in
24922       os2*)
24923                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
24924 "
24925 if test "x$ac_cv_type_struct_sched_param" = xyes
24926 then :
24927   HAVE_STRUCT_SCHED_PARAM=1
24928 fi
24929
24930         ;;
24931       vms)
24932                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
24933 "
24934 if test "x$ac_cv_type_struct_sched_param" = xyes
24935 then :
24936   HAVE_STRUCT_SCHED_PARAM=1
24937 fi
24938
24939         ;;
24940     esac
24941   fi
24942
24943
24944   if test "$ac_cv_header_sys_cdefs_h" = yes; then
24945     HAVE_SYS_CDEFS_H=1
24946   else
24947     HAVE_SYS_CDEFS_H=0
24948   fi
24949
24950
24951
24952
24953
24954
24955
24956
24957   GL_M4_GNULIB_SCHED_YIELD=0
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
24968 printf %s "checking for uid_t in sys/types.h... " >&6; }
24969 if test ${ac_cv_type_uid_t+y}
24970 then :
24971   printf %s "(cached) " >&6
24972 else $as_nop
24973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974 /* end confdefs.h.  */
24975 #include <sys/types.h>
24976
24977 _ACEOF
24978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24979   $EGREP "uid_t" >/dev/null 2>&1
24980 then :
24981   ac_cv_type_uid_t=yes
24982 else $as_nop
24983   ac_cv_type_uid_t=no
24984 fi
24985 rm -rf conftest*
24986
24987 fi
24988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
24989 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
24990 if test $ac_cv_type_uid_t = no; then
24991
24992 printf "%s\n" "#define uid_t int" >>confdefs.h
24993
24994
24995 printf "%s\n" "#define gid_t int" >>confdefs.h
24996
24997 fi
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012      if test $gl_cv_have_include_next = yes; then
25013        gl_cv_next_signal_h='<'signal.h'>'
25014      else
25015        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25016 printf %s "checking absolute name of <signal.h>... " >&6; }
25017 if test ${gl_cv_next_signal_h+y}
25018 then :
25019   printf %s "(cached) " >&6
25020 else $as_nop
25021
25022
25023
25024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25025 /* end confdefs.h.  */
25026 #include <signal.h>
25027 _ACEOF
25028                 case "$host_os" in
25029     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25030     *)    gl_absname_cpp="$ac_cpp" ;;
25031   esac
25032
25033   case "$host_os" in
25034     mingw*)
25035                                           gl_dirsep_regex='[/\\]'
25036       ;;
25037     *)
25038       gl_dirsep_regex='\/'
25039       ;;
25040   esac
25041       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25042   gl_header_literal_regex=`echo 'signal.h' \
25043                            | sed -e "$gl_make_literal_regex_sed"`
25044   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25045       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25046       s|^/[^/]|//&|
25047       p
25048       q
25049     }'
25050
25051         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25052   sed -n "$gl_absolute_header_sed"`
25053
25054            gl_header=$gl_cv_absolute_signal_h
25055            gl_cv_next_signal_h='"'$gl_header'"'
25056
25057
25058 fi
25059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25060 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
25061      fi
25062      NEXT_SIGNAL_H=$gl_cv_next_signal_h
25063
25064      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25065        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25066        gl_next_as_first_directive='<'signal.h'>'
25067      else
25068        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25069        gl_next_as_first_directive=$gl_cv_next_signal_h
25070      fi
25071      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25072
25073
25074
25075
25076
25077 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25078 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
25079   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25080 #include <signal.h>
25081
25082 "
25083 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
25084 then :
25085
25086 else $as_nop
25087   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25088 fi
25089
25090
25091
25092
25093
25094
25095
25096   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25097 #include <signal.h>
25098
25099 "
25100 if test "x$ac_cv_type_sighandler_t" = xyes
25101 then :
25102
25103 else $as_nop
25104   HAVE_SIGHANDLER_T=0
25105 fi
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
25116 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
25117 if test ${gl_cv_prog_as_underscore+y}
25118 then :
25119   printf %s "(cached) " >&6
25120 else $as_nop
25121   cat > conftest.c <<EOF
25122 #ifdef __cplusplus
25123 extern "C" int foo (void);
25124 #endif
25125 int foo(void) { return 0; }
25126 EOF
25127      # Look for the assembly language name in the .s file.
25128      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
25129   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25130   (eval $ac_try) 2>&5
25131   ac_status=$?
25132   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25133   test $ac_status = 0; }; } >/dev/null 2>&1
25134      if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
25135        gl_cv_prog_as_underscore=yes
25136      else
25137        gl_cv_prog_as_underscore=no
25138      fi
25139      rm -f conftest*
25140
25141 fi
25142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
25143 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
25144   if test $gl_cv_prog_as_underscore = yes; then
25145     USER_LABEL_PREFIX=_
25146   else
25147     USER_LABEL_PREFIX=
25148   fi
25149
25150 printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
25151
25152   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
25165 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
25166 if test ${gl_cv_func_snprintf_retval_c99+y}
25167 then :
25168   printf %s "(cached) " >&6
25169 else $as_nop
25170
25171       if test "$cross_compiling" = yes
25172 then :
25173   case "$host_os" in
25174                                  # Guess yes on glibc systems.
25175            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
25176                                  # Guess yes on musl systems.
25177            *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
25178                                  # Guess yes on FreeBSD >= 5.
25179            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
25180            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25181            midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
25182                                  # Guess yes on Mac OS X >= 10.3.
25183            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
25184            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
25185                                  # Guess yes on OpenBSD >= 3.9.
25186            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
25187                                  gl_cv_func_snprintf_retval_c99="guessing no";;
25188            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
25189                                  # Guess yes on Solaris >= 2.10.
25190            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
25191            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
25192                                  # Guess yes on AIX >= 4.
25193            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
25194            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
25195                                  # Guess yes on NetBSD >= 3.
25196            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
25197                                  gl_cv_func_snprintf_retval_c99="guessing no";;
25198            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
25199                                  # Guess yes on BeOS.
25200            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
25201                                  # Guess yes on Android.
25202            linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
25203                                  # Guess yes on MSVC, no on mingw.
25204            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25205 /* end confdefs.h.  */
25206
25207 #ifdef _MSC_VER
25208  Known
25209 #endif
25210
25211 _ACEOF
25212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25213   $EGREP "Known" >/dev/null 2>&1
25214 then :
25215   gl_cv_func_snprintf_retval_c99="guessing yes"
25216 else $as_nop
25217   gl_cv_func_snprintf_retval_c99="guessing no"
25218 fi
25219 rm -rf conftest*
25220
25221                                  ;;
25222                                  # If we don't know, obey --enable-cross-guesses.
25223            *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
25224          esac
25225
25226 else $as_nop
25227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25228 /* end confdefs.h.  */
25229
25230 #include <stdio.h>
25231 #include <string.h>
25232 #if HAVE_SNPRINTF
25233 # define my_snprintf snprintf
25234 #else
25235 # include <stdarg.h>
25236 static int my_snprintf (char *buf, int size, const char *format, ...)
25237 {
25238   va_list args;
25239   int ret;
25240   va_start (args, format);
25241   ret = vsnprintf (buf, size, format, args);
25242   va_end (args);
25243   return ret;
25244 }
25245 #endif
25246 static char buf[100];
25247 int main ()
25248 {
25249   strcpy (buf, "ABCDEF");
25250   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
25251     return 1;
25252   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
25253     return 2;
25254   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
25255     return 3;
25256   return 0;
25257 }
25258 _ACEOF
25259 if ac_fn_c_try_run "$LINENO"
25260 then :
25261   gl_cv_func_snprintf_retval_c99=yes
25262 else $as_nop
25263   gl_cv_func_snprintf_retval_c99=no
25264 fi
25265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25266   conftest.$ac_objext conftest.beam conftest.$ac_ext
25267 fi
25268
25269
25270 fi
25271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
25272 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
25273
25274 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25275 if test "x$ac_cv_have_decl_snprintf" = xyes
25276 then :
25277   ac_have_decl=1
25278 else $as_nop
25279   ac_have_decl=0
25280 fi
25281 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296      if test $gl_cv_have_include_next = yes; then
25297        gl_cv_next_spawn_h='<'spawn.h'>'
25298      else
25299        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
25300 printf %s "checking absolute name of <spawn.h>... " >&6; }
25301 if test ${gl_cv_next_spawn_h+y}
25302 then :
25303   printf %s "(cached) " >&6
25304 else $as_nop
25305
25306              if test $ac_cv_header_spawn_h = yes; then
25307
25308
25309
25310
25311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25312 /* end confdefs.h.  */
25313 #include <spawn.h>
25314 _ACEOF
25315                 case "$host_os" in
25316     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25317     *)    gl_absname_cpp="$ac_cpp" ;;
25318   esac
25319
25320   case "$host_os" in
25321     mingw*)
25322                                           gl_dirsep_regex='[/\\]'
25323       ;;
25324     *)
25325       gl_dirsep_regex='\/'
25326       ;;
25327   esac
25328       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25329   gl_header_literal_regex=`echo 'spawn.h' \
25330                            | sed -e "$gl_make_literal_regex_sed"`
25331   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25332       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25333       s|^/[^/]|//&|
25334       p
25335       q
25336     }'
25337
25338         gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25339   sed -n "$gl_absolute_header_sed"`
25340
25341            gl_header=$gl_cv_absolute_spawn_h
25342            gl_cv_next_spawn_h='"'$gl_header'"'
25343           else
25344                gl_cv_next_spawn_h='<'spawn.h'>'
25345              fi
25346
25347
25348 fi
25349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
25350 printf "%s\n" "$gl_cv_next_spawn_h" >&6; }
25351      fi
25352      NEXT_SPAWN_H=$gl_cv_next_spawn_h
25353
25354      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25355        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25356        gl_next_as_first_directive='<'spawn.h'>'
25357      else
25358        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25359        gl_next_as_first_directive=$gl_cv_next_spawn_h
25360      fi
25361      NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
25362
25363
25364
25365
25366
25367   if test $ac_cv_header_spawn_h = yes; then
25368     HAVE_SPAWN_H=1
25369     ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
25370 #include <spawn.h>
25371
25372 "
25373 if test "x$ac_cv_type_posix_spawnattr_t" = xyes
25374 then :
25375
25376 printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_T 1" >>confdefs.h
25377
25378
25379 else $as_nop
25380   HAVE_POSIX_SPAWNATTR_T=0
25381 fi
25382
25383     ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
25384 #include <spawn.h>
25385
25386 "
25387 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes
25388 then :
25389
25390 printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1" >>confdefs.h
25391
25392
25393 else $as_nop
25394   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25395 fi
25396
25397   else
25398     HAVE_SPAWN_H=0
25399     HAVE_POSIX_SPAWNATTR_T=0
25400     HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25401   fi
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25416 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
25417 if test ${ac_cv_header_stdbool_h+y}
25418 then :
25419   printf %s "(cached) " >&6
25420 else $as_nop
25421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25422 /* end confdefs.h.  */
25423
25424              #include <stdbool.h>
25425
25426              #ifdef __cplusplus
25427               typedef bool Bool;
25428              #else
25429               typedef _Bool Bool;
25430               #ifndef bool
25431                "error: bool is not defined"
25432               #endif
25433               #ifndef false
25434                "error: false is not defined"
25435               #endif
25436               #if false
25437                "error: false is not 0"
25438               #endif
25439               #ifndef true
25440                "error: true is not defined"
25441               #endif
25442               #if true != 1
25443                "error: true is not 1"
25444               #endif
25445              #endif
25446
25447              #ifndef __bool_true_false_are_defined
25448               "error: __bool_true_false_are_defined is not defined"
25449              #endif
25450
25451              struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
25452
25453              char a[true == 1 ? 1 : -1];
25454              char b[false == 0 ? 1 : -1];
25455              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25456              char d[(bool) 0.5 == true ? 1 : -1];
25457              /* See body of main program for 'e'.  */
25458              char f[(Bool) 0.0 == false ? 1 : -1];
25459              char g[true];
25460              char h[sizeof (Bool)];
25461              char i[sizeof s.t];
25462              enum { j = false, k = true, l = false * true, m = true * 256 };
25463              /* The following fails for
25464                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25465              Bool n[m];
25466              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25467              char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25468              /* Catch a bug in an HP-UX C compiler.  See
25469                 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25470                 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
25471               */
25472              Bool q = true;
25473              Bool *pq = &q;
25474              bool *qq = &q;
25475
25476 int
25477 main (void)
25478 {
25479
25480              bool e = &s;
25481              *pq |= q; *pq |= ! q;
25482              *qq |= q; *qq |= ! q;
25483              /* Refer to every declared value, to avoid compiler optimizations.  */
25484              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25485                      + !m + !n + !o + !p + !q + !pq + !qq);
25486
25487   ;
25488   return 0;
25489 }
25490 _ACEOF
25491 if ac_fn_c_try_compile "$LINENO"
25492 then :
25493   ac_cv_header_stdbool_h=yes
25494 else $as_nop
25495   ac_cv_header_stdbool_h=no
25496 fi
25497 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25498 fi
25499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25500 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
25501    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25502 if test "x$ac_cv_type__Bool" = xyes
25503 then :
25504
25505 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
25506
25507
25508 fi
25509
25510
25511
25512
25513 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25514 if test "x$ac_cv_have_decl_fcloseall" = xyes
25515 then :
25516   ac_have_decl=1
25517 else $as_nop
25518   ac_have_decl=0
25519 fi
25520 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
25521
25522
25523
25524
25525   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535      if test $gl_cv_have_include_next = yes; then
25536        gl_cv_next_stdio_h='<'stdio.h'>'
25537      else
25538        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25539 printf %s "checking absolute name of <stdio.h>... " >&6; }
25540 if test ${gl_cv_next_stdio_h+y}
25541 then :
25542   printf %s "(cached) " >&6
25543 else $as_nop
25544
25545
25546
25547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25548 /* end confdefs.h.  */
25549 #include <stdio.h>
25550 _ACEOF
25551                 case "$host_os" in
25552     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25553     *)    gl_absname_cpp="$ac_cpp" ;;
25554   esac
25555
25556   case "$host_os" in
25557     mingw*)
25558                                           gl_dirsep_regex='[/\\]'
25559       ;;
25560     *)
25561       gl_dirsep_regex='\/'
25562       ;;
25563   esac
25564       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25565   gl_header_literal_regex=`echo 'stdio.h' \
25566                            | sed -e "$gl_make_literal_regex_sed"`
25567   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25568       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25569       s|^/[^/]|//&|
25570       p
25571       q
25572     }'
25573
25574         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25575   sed -n "$gl_absolute_header_sed"`
25576
25577            gl_header=$gl_cv_absolute_stdio_h
25578            gl_cv_next_stdio_h='"'$gl_header'"'
25579
25580
25581 fi
25582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25583 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25584      fi
25585      NEXT_STDIO_H=$gl_cv_next_stdio_h
25586
25587      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25588        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25589        gl_next_as_first_directive='<'stdio.h'>'
25590      else
25591        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25592        gl_next_as_first_directive=$gl_cv_next_stdio_h
25593      fi
25594      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25595
25596
25597
25598
25599
25600         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25601 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25602 if test ${gl_cv_func_printf_attribute_flavor+y}
25603 then :
25604   printf %s "(cached) " >&6
25605 else $as_nop
25606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25607 /* end confdefs.h.  */
25608
25609        #define __STDC_FORMAT_MACROS 1
25610        #include <stdio.h>
25611        #include <inttypes.h>
25612        /* For non-mingw systems, compilation will trivially succeed.
25613           For mingw, compilation will succeed for older mingw (system
25614           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25615        #if (defined _WIN32 && ! defined __CYGWIN__) && \
25616          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25617        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25618        #endif
25619
25620 int
25621 main (void)
25622 {
25623
25624   ;
25625   return 0;
25626 }
25627 _ACEOF
25628 if ac_fn_c_try_compile "$LINENO"
25629 then :
25630   gl_cv_func_printf_attribute_flavor=system
25631 else $as_nop
25632   gl_cv_func_printf_attribute_flavor=gnu
25633 fi
25634 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25635 fi
25636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25637 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
25638   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25639
25640 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25641
25642   fi
25643
25644
25645
25646
25647
25648
25649
25650     if test $gl_cv_header_signal_h_SIGPIPE != yes; then
25651       REPLACE_STDIO_WRITE_FUNCS=1
25652
25653
25654
25655
25656
25657
25658
25659
25660   M4_LIBOBJS="$M4_LIBOBJS stdio-write.$ac_objext"
25661
25662     fi
25663
25664
25665
25666
25667
25668
25669
25670
25671   if test $ac_cv_have_decl_fcloseall = no; then
25672     HAVE_DECL_FCLOSEALL=0
25673   fi
25674
25675 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25676 if test "x$ac_cv_have_decl_ecvt" = xyes
25677 then :
25678   ac_have_decl=1
25679 else $as_nop
25680   ac_have_decl=0
25681 fi
25682 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
25683
25684 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25685 if test "x$ac_cv_have_decl_fcvt" = xyes
25686 then :
25687   ac_have_decl=1
25688 else $as_nop
25689   ac_have_decl=0
25690 fi
25691 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
25692
25693 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25694 if test "x$ac_cv_have_decl_gcvt" = xyes
25695 then :
25696   ac_have_decl=1
25697 else $as_nop
25698   ac_have_decl=0
25699 fi
25700 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712      if test $gl_cv_have_include_next = yes; then
25713        gl_cv_next_stdlib_h='<'stdlib.h'>'
25714      else
25715        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25716 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25717 if test ${gl_cv_next_stdlib_h+y}
25718 then :
25719   printf %s "(cached) " >&6
25720 else $as_nop
25721
25722
25723
25724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25725 /* end confdefs.h.  */
25726 #include <stdlib.h>
25727 _ACEOF
25728                 case "$host_os" in
25729     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25730     *)    gl_absname_cpp="$ac_cpp" ;;
25731   esac
25732
25733   case "$host_os" in
25734     mingw*)
25735                                           gl_dirsep_regex='[/\\]'
25736       ;;
25737     *)
25738       gl_dirsep_regex='\/'
25739       ;;
25740   esac
25741       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25742   gl_header_literal_regex=`echo 'stdlib.h' \
25743                            | sed -e "$gl_make_literal_regex_sed"`
25744   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25745       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25746       s|^/[^/]|//&|
25747       p
25748       q
25749     }'
25750
25751         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25752   sed -n "$gl_absolute_header_sed"`
25753
25754            gl_header=$gl_cv_absolute_stdlib_h
25755            gl_cv_next_stdlib_h='"'$gl_header'"'
25756
25757
25758 fi
25759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25760 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25761      fi
25762      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25763
25764      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25765        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25766        gl_next_as_first_directive='<'stdlib.h'>'
25767      else
25768        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25769        gl_next_as_first_directive=$gl_cv_next_stdlib_h
25770      fi
25771      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782   if test $ac_cv_have_decl_ecvt = no; then
25783     HAVE_DECL_ECVT=0
25784   fi
25785
25786   if test $ac_cv_have_decl_fcvt = no; then
25787     HAVE_DECL_FCVT=0
25788   fi
25789
25790   if test $ac_cv_have_decl_gcvt = no; then
25791     HAVE_DECL_GCVT=0
25792   fi
25793
25794 ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25795 if test "x$ac_cv_have_decl_strdup" = xyes
25796 then :
25797   ac_have_decl=1
25798 else $as_nop
25799   ac_have_decl=0
25800 fi
25801 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
25802
25803
25804      REPLACE_STRERROR_0=0
25805   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
25806 printf %s "checking whether strerror(0) succeeds... " >&6; }
25807 if test ${gl_cv_func_strerror_0_works+y}
25808 then :
25809   printf %s "(cached) " >&6
25810 else $as_nop
25811   if test "$cross_compiling" = yes
25812 then :
25813   case "$host_os" in
25814                         # Guess yes on glibc systems.
25815          *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
25816                         # Guess yes on musl systems.
25817          *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
25818                         # Guess yes on native Windows.
25819          mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
25820                         # If we don't know, obey --enable-cross-guesses.
25821          *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
25822        esac
25823
25824 else $as_nop
25825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25826 /* end confdefs.h.  */
25827 #include <string.h>
25828            #include <errno.h>
25829
25830 int
25831 main (void)
25832 {
25833 int result = 0;
25834            char *str;
25835            errno = 0;
25836            str = strerror (0);
25837            if (!*str) result |= 1;
25838            if (errno) result |= 2;
25839            if (strstr (str, "nknown") || strstr (str, "ndefined"))
25840              result |= 4;
25841            return result;
25842   ;
25843   return 0;
25844 }
25845 _ACEOF
25846 if ac_fn_c_try_run "$LINENO"
25847 then :
25848   gl_cv_func_strerror_0_works=yes
25849 else $as_nop
25850   gl_cv_func_strerror_0_works=no
25851 fi
25852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25853   conftest.$ac_objext conftest.beam conftest.$ac_ext
25854 fi
25855
25856
25857 fi
25858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
25859 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
25860   case "$gl_cv_func_strerror_0_works" in
25861     *yes) ;;
25862     *)
25863       REPLACE_STRERROR_0=1
25864
25865 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
25866
25867       ;;
25868   esac
25869
25870
25871
25872
25873
25874
25875
25876
25877   if test $ac_cv_func_strerror_r = yes; then
25878     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
25879                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
25880 printf %s "checking for strerror_r with POSIX signature... " >&6; }
25881 if test ${gl_cv_func_strerror_r_posix_signature+y}
25882 then :
25883   printf %s "(cached) " >&6
25884 else $as_nop
25885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25886 /* end confdefs.h.  */
25887 #include <string.h>
25888                 int strerror_r (int, char *, size_t);
25889
25890 int
25891 main (void)
25892 {
25893
25894   ;
25895   return 0;
25896 }
25897 _ACEOF
25898 if ac_fn_c_try_compile "$LINENO"
25899 then :
25900   gl_cv_func_strerror_r_posix_signature=yes
25901 else $as_nop
25902   gl_cv_func_strerror_r_posix_signature=no
25903 fi
25904 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25905
25906 fi
25907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
25908 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
25909       if test $gl_cv_func_strerror_r_posix_signature = yes; then
25910                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
25911 printf %s "checking whether strerror_r works... " >&6; }
25912 if test ${gl_cv_func_strerror_r_works+y}
25913 then :
25914   printf %s "(cached) " >&6
25915 else $as_nop
25916   if test "$cross_compiling" = yes
25917 then :
25918
25919               case "$host_os" in
25920                        # Guess no on AIX.
25921                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
25922                        # Guess no on HP-UX.
25923                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
25924                        # Guess no on BSD variants.
25925                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
25926                        # Guess yes otherwise.
25927                 *)     gl_cv_func_strerror_r_works="guessing yes";;
25928               esac
25929
25930 else $as_nop
25931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25932 /* end confdefs.h.  */
25933 #include <errno.h>
25934                   #include <string.h>
25935
25936 int
25937 main (void)
25938 {
25939 int result = 0;
25940                   char buf[79];
25941                   if (strerror_r (EACCES, buf, 0) < 0)
25942                     result |= 1;
25943                   errno = 0;
25944                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
25945                     result |= 2;
25946                   strcpy (buf, "Unknown");
25947                   if (strerror_r (0, buf, sizeof buf) != 0)
25948                     result |= 4;
25949                   if (errno)
25950                     result |= 8;
25951                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
25952                     result |= 0x10;
25953                   errno = 0;
25954                   *buf = 0;
25955                   if (strerror_r (-3, buf, sizeof buf) < 0)
25956                     result |= 0x20;
25957                   if (errno)
25958                     result |= 0x40;
25959                   if (!*buf)
25960                     result |= 0x80;
25961                   return result;
25962
25963   ;
25964   return 0;
25965 }
25966 _ACEOF
25967 if ac_fn_c_try_run "$LINENO"
25968 then :
25969   gl_cv_func_strerror_r_works=yes
25970 else $as_nop
25971   gl_cv_func_strerror_r_works=no
25972 fi
25973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25974   conftest.$ac_objext conftest.beam conftest.$ac_ext
25975 fi
25976
25977
25978 fi
25979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
25980 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
25981       else
25982
25983                         if test $ac_cv_func___xpg_strerror_r = yes; then
25984           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
25985 printf %s "checking whether __xpg_strerror_r works... " >&6; }
25986 if test ${gl_cv_func_strerror_r_works+y}
25987 then :
25988   printf %s "(cached) " >&6
25989 else $as_nop
25990   if test "$cross_compiling" = yes
25991 then :
25992                                   gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
25993
25994 else $as_nop
25995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25996 /* end confdefs.h.  */
25997 #include <errno.h>
25998                     #include <string.h>
25999                     extern
26000                     #ifdef __cplusplus
26001                     "C"
26002                     #endif
26003                     int __xpg_strerror_r(int, char *, size_t);
26004
26005 int
26006 main (void)
26007 {
26008 int result = 0;
26009                     char buf[256] = "^";
26010                     char copy[256];
26011                     char *str = strerror (-1);
26012                     strcpy (copy, str);
26013                     if (__xpg_strerror_r (-2, buf, 1) == 0)
26014                       result |= 1;
26015                     if (*buf)
26016                       result |= 2;
26017                     __xpg_strerror_r (-2, buf, 256);
26018                     if (strcmp (str, copy))
26019                       result |= 4;
26020                     return result;
26021
26022   ;
26023   return 0;
26024 }
26025 _ACEOF
26026 if ac_fn_c_try_run "$LINENO"
26027 then :
26028   gl_cv_func_strerror_r_works=yes
26029 else $as_nop
26030   gl_cv_func_strerror_r_works=no
26031 fi
26032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26033   conftest.$ac_objext conftest.beam conftest.$ac_ext
26034 fi
26035
26036
26037 fi
26038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
26039 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
26040         fi
26041       fi
26042     fi
26043   fi
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055      if test $gl_cv_have_include_next = yes; then
26056        gl_cv_next_string_h='<'string.h'>'
26057      else
26058        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
26059 printf %s "checking absolute name of <string.h>... " >&6; }
26060 if test ${gl_cv_next_string_h+y}
26061 then :
26062   printf %s "(cached) " >&6
26063 else $as_nop
26064
26065
26066
26067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26068 /* end confdefs.h.  */
26069 #include <string.h>
26070 _ACEOF
26071                 case "$host_os" in
26072     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26073     *)    gl_absname_cpp="$ac_cpp" ;;
26074   esac
26075
26076   case "$host_os" in
26077     mingw*)
26078                                           gl_dirsep_regex='[/\\]'
26079       ;;
26080     *)
26081       gl_dirsep_regex='\/'
26082       ;;
26083   esac
26084       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26085   gl_header_literal_regex=`echo 'string.h' \
26086                            | sed -e "$gl_make_literal_regex_sed"`
26087   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26088       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26089       s|^/[^/]|//&|
26090       p
26091       q
26092     }'
26093
26094         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26095   sed -n "$gl_absolute_header_sed"`
26096
26097            gl_header=$gl_cv_absolute_string_h
26098            gl_cv_next_string_h='"'$gl_header'"'
26099
26100
26101 fi
26102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
26103 printf "%s\n" "$gl_cv_next_string_h" >&6; }
26104      fi
26105      NEXT_STRING_H=$gl_cv_next_string_h
26106
26107      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26108        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26109        gl_next_as_first_directive='<'string.h'>'
26110      else
26111        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26112        gl_next_as_first_directive=$gl_cv_next_string_h
26113      fi
26114      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124 ac_fn_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26125 if test "x$ac_cv_have_decl_strndup" = xyes
26126 then :
26127   ac_have_decl=1
26128 else $as_nop
26129   ac_have_decl=0
26130 fi
26131 printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
26132
26133
26134 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26135 if test "x$ac_cv_have_decl_strnlen" = xyes
26136 then :
26137   ac_have_decl=1
26138 else $as_nop
26139   ac_have_decl=0
26140 fi
26141 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
26142
26143 ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26144 if test "x$ac_cv_have_decl_strsignal" = xyes
26145 then :
26146   ac_have_decl=1
26147 else $as_nop
26148   ac_have_decl=0
26149 fi
26150 printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h
26151
26152
26153
26154
26155   if test $REPLACE_MEMCHR = 1; then
26156     REPLACE_STRSTR=1
26157   else
26158             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26159 printf %s "checking whether strstr works... " >&6; }
26160 if test ${gl_cv_func_strstr_works_always+y}
26161 then :
26162   printf %s "(cached) " >&6
26163 else $as_nop
26164   if test "$cross_compiling" = yes
26165 then :
26166                                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26167 /* end confdefs.h.  */
26168
26169 #ifdef __GNU_LIBRARY__
26170  #include <features.h>
26171  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26172      || defined __UCLIBC__
26173   Lucky user
26174  #endif
26175 #elif defined __CYGWIN__
26176  #include <cygwin/version.h>
26177  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26178   Lucky user
26179  #endif
26180 #else
26181   Lucky user
26182 #endif
26183
26184 _ACEOF
26185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26186   $EGREP "Lucky user" >/dev/null 2>&1
26187 then :
26188   gl_cv_func_strstr_works_always="guessing yes"
26189 else $as_nop
26190   gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
26191 fi
26192 rm -rf conftest*
26193
26194
26195 else $as_nop
26196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26197 /* end confdefs.h.  */
26198
26199 #include <string.h> /* for strstr */
26200 #ifdef __GNU_LIBRARY__
26201  #include <features.h>
26202  #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
26203   Unlucky user
26204  #endif
26205 #endif
26206 #define P "_EF_BF_BD"
26207 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26208 #define NEEDLE P P P P P
26209
26210 int
26211 main (void)
26212 {
26213 return !!strstr (HAYSTACK, NEEDLE);
26214
26215   ;
26216   return 0;
26217 }
26218 _ACEOF
26219 if ac_fn_c_try_run "$LINENO"
26220 then :
26221   gl_cv_func_strstr_works_always=yes
26222 else $as_nop
26223   gl_cv_func_strstr_works_always=no
26224 fi
26225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26226   conftest.$ac_objext conftest.beam conftest.$ac_ext
26227 fi
26228
26229
26230 fi
26231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26232 printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
26233     case "$gl_cv_func_strstr_works_always" in
26234       *yes) ;;
26235       *)
26236         REPLACE_STRSTR=1
26237         ;;
26238     esac
26239   fi
26240
26241
26242   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
26243 printf %s "checking whether ldexp() can be used without linking with libm... " >&6; }
26244 if test ${gl_cv_func_ldexp_no_libm+y}
26245 then :
26246   printf %s "(cached) " >&6
26247 else $as_nop
26248
26249       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26250 /* end confdefs.h.  */
26251 #ifndef __NO_MATH_INLINES
26252                            # define __NO_MATH_INLINES 1 /* for glibc */
26253                            #endif
26254                            #include <math.h>
26255                            double (*funcptr) (double, int) = ldexp;
26256                            double x;
26257 int
26258 main (void)
26259 {
26260 return ldexp (x, -1) > 0;
26261   ;
26262   return 0;
26263 }
26264 _ACEOF
26265 if ac_fn_c_try_link "$LINENO"
26266 then :
26267   gl_cv_func_ldexp_no_libm=yes
26268 else $as_nop
26269   gl_cv_func_ldexp_no_libm=no
26270 fi
26271 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26272     conftest$ac_exeext conftest.$ac_ext
26273
26274 fi
26275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
26276 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290      if test $gl_cv_have_include_next = yes; then
26291        gl_cv_next_sys_random_h='<'sys/random.h'>'
26292      else
26293        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
26294 printf %s "checking absolute name of <sys/random.h>... " >&6; }
26295 if test ${gl_cv_next_sys_random_h+y}
26296 then :
26297   printf %s "(cached) " >&6
26298 else $as_nop
26299
26300              if test $ac_cv_header_sys_random_h = yes; then
26301
26302
26303
26304
26305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26306 /* end confdefs.h.  */
26307 #include <sys/random.h>
26308 _ACEOF
26309                 case "$host_os" in
26310     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26311     *)    gl_absname_cpp="$ac_cpp" ;;
26312   esac
26313
26314   case "$host_os" in
26315     mingw*)
26316                                           gl_dirsep_regex='[/\\]'
26317       ;;
26318     *)
26319       gl_dirsep_regex='\/'
26320       ;;
26321   esac
26322       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26323   gl_header_literal_regex=`echo 'sys/random.h' \
26324                            | sed -e "$gl_make_literal_regex_sed"`
26325   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26326       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26327       s|^/[^/]|//&|
26328       p
26329       q
26330     }'
26331
26332         gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26333   sed -n "$gl_absolute_header_sed"`
26334
26335            gl_header=$gl_cv_absolute_sys_random_h
26336            gl_cv_next_sys_random_h='"'$gl_header'"'
26337           else
26338                gl_cv_next_sys_random_h='<'sys/random.h'>'
26339              fi
26340
26341
26342 fi
26343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
26344 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
26345      fi
26346      NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
26347
26348      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26349        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26350        gl_next_as_first_directive='<'sys/random.h'>'
26351      else
26352        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26353        gl_next_as_first_directive=$gl_cv_next_sys_random_h
26354      fi
26355      NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
26356
26357
26358
26359
26360   if test $ac_cv_header_sys_random_h = yes; then
26361     HAVE_SYS_RANDOM_H=1
26362   else
26363     HAVE_SYS_RANDOM_H=0
26364   fi
26365
26366
26367
26368   if test $ac_cv_header_sys_random_h = yes; then
26369     UNISTD_H_HAVE_SYS_RANDOM_H=1
26370   fi
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391      if test $gl_cv_have_include_next = yes; then
26392        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
26393      else
26394        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
26395 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
26396 if test ${gl_cv_next_sys_wait_h+y}
26397 then :
26398   printf %s "(cached) " >&6
26399 else $as_nop
26400
26401              if test $ac_cv_header_sys_wait_h = yes; then
26402
26403
26404
26405
26406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26407 /* end confdefs.h.  */
26408 #include <sys/wait.h>
26409 _ACEOF
26410                 case "$host_os" in
26411     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26412     *)    gl_absname_cpp="$ac_cpp" ;;
26413   esac
26414
26415   case "$host_os" in
26416     mingw*)
26417                                           gl_dirsep_regex='[/\\]'
26418       ;;
26419     *)
26420       gl_dirsep_regex='\/'
26421       ;;
26422   esac
26423       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26424   gl_header_literal_regex=`echo 'sys/wait.h' \
26425                            | sed -e "$gl_make_literal_regex_sed"`
26426   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26427       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26428       s|^/[^/]|//&|
26429       p
26430       q
26431     }'
26432
26433         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26434   sed -n "$gl_absolute_header_sed"`
26435
26436            gl_header=$gl_cv_absolute_sys_wait_h
26437            gl_cv_next_sys_wait_h='"'$gl_header'"'
26438           else
26439                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
26440              fi
26441
26442
26443 fi
26444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
26445 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
26446      fi
26447      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
26448
26449      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26450        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26451        gl_next_as_first_directive='<'sys/wait.h'>'
26452      else
26453        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26454        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
26455      fi
26456      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468   GL_M4_GNULIB_WAITPID=0
26469
26470
26471
26472
26473     HAVE_DECL_LOCALTIME_R=1;
26474   HAVE_NANOSLEEP=1;
26475   HAVE_STRPTIME=1;
26476   HAVE_TIMEGM=1;
26477   HAVE_TIMESPEC_GET=1;
26478     HAVE_TIMEZONE_T=0;
26479         REPLACE_CTIME=GNULIB_PORTCHECK;
26480   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
26481   REPLACE_MKTIME=GNULIB_PORTCHECK;
26482   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
26483   REPLACE_STRFTIME=GNULIB_PORTCHECK;
26484   REPLACE_TIMEGM=GNULIB_PORTCHECK;
26485   REPLACE_TZSET=GNULIB_PORTCHECK;
26486
26487       : ${GNULIB_GETTIMEOFDAY=0};
26488         REPLACE_GMTIME=0;
26489   REPLACE_LOCALTIME=0;
26490
26491
26492
26493   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
26494 printf %s "checking for struct timespec in <time.h>... " >&6; }
26495 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
26496 then :
26497   printf %s "(cached) " >&6
26498 else $as_nop
26499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500 /* end confdefs.h.  */
26501 #include <time.h>
26502
26503 int
26504 main (void)
26505 {
26506 static struct timespec x; x.tv_sec = x.tv_nsec;
26507   ;
26508   return 0;
26509 }
26510 _ACEOF
26511 if ac_fn_c_try_compile "$LINENO"
26512 then :
26513   gl_cv_sys_struct_timespec_in_time_h=yes
26514 else $as_nop
26515   gl_cv_sys_struct_timespec_in_time_h=no
26516 fi
26517 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26518 fi
26519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
26520 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
26521
26522   TIME_H_DEFINES_STRUCT_TIMESPEC=0
26523   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
26524   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
26525   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
26526   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
26527     TIME_H_DEFINES_STRUCT_TIMESPEC=1
26528   else
26529     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
26530 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
26531 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
26532 then :
26533   printf %s "(cached) " >&6
26534 else $as_nop
26535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26536 /* end confdefs.h.  */
26537 #include <sys/time.h>
26538
26539 int
26540 main (void)
26541 {
26542 static struct timespec x; x.tv_sec = x.tv_nsec;
26543   ;
26544   return 0;
26545 }
26546 _ACEOF
26547 if ac_fn_c_try_compile "$LINENO"
26548 then :
26549   gl_cv_sys_struct_timespec_in_sys_time_h=yes
26550 else $as_nop
26551   gl_cv_sys_struct_timespec_in_sys_time_h=no
26552 fi
26553 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26554 fi
26555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
26556 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
26557     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
26558       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
26559     else
26560       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
26561 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
26562 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
26563 then :
26564   printf %s "(cached) " >&6
26565 else $as_nop
26566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26567 /* end confdefs.h.  */
26568 #include <pthread.h>
26569
26570 int
26571 main (void)
26572 {
26573 static struct timespec x; x.tv_sec = x.tv_nsec;
26574   ;
26575   return 0;
26576 }
26577 _ACEOF
26578 if ac_fn_c_try_compile "$LINENO"
26579 then :
26580   gl_cv_sys_struct_timespec_in_pthread_h=yes
26581 else $as_nop
26582   gl_cv_sys_struct_timespec_in_pthread_h=no
26583 fi
26584 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26585 fi
26586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
26587 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
26588       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
26589         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
26590       else
26591         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
26592 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
26593 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
26594 then :
26595   printf %s "(cached) " >&6
26596 else $as_nop
26597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26598 /* end confdefs.h.  */
26599 #include <unistd.h>
26600
26601 int
26602 main (void)
26603 {
26604 static struct timespec x; x.tv_sec = x.tv_nsec;
26605   ;
26606   return 0;
26607 }
26608 _ACEOF
26609 if ac_fn_c_try_compile "$LINENO"
26610 then :
26611   gl_cv_sys_struct_timespec_in_unistd_h=yes
26612 else $as_nop
26613   gl_cv_sys_struct_timespec_in_unistd_h=no
26614 fi
26615 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26616 fi
26617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
26618 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
26619         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
26620           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
26621         fi
26622       fi
26623     fi
26624   fi
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641      if test $gl_cv_have_include_next = yes; then
26642        gl_cv_next_time_h='<'time.h'>'
26643      else
26644        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
26645 printf %s "checking absolute name of <time.h>... " >&6; }
26646 if test ${gl_cv_next_time_h+y}
26647 then :
26648   printf %s "(cached) " >&6
26649 else $as_nop
26650
26651
26652
26653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26654 /* end confdefs.h.  */
26655 #include <time.h>
26656 _ACEOF
26657                 case "$host_os" in
26658     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26659     *)    gl_absname_cpp="$ac_cpp" ;;
26660   esac
26661
26662   case "$host_os" in
26663     mingw*)
26664                                           gl_dirsep_regex='[/\\]'
26665       ;;
26666     *)
26667       gl_dirsep_regex='\/'
26668       ;;
26669   esac
26670       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26671   gl_header_literal_regex=`echo 'time.h' \
26672                            | sed -e "$gl_make_literal_regex_sed"`
26673   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26674       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26675       s|^/[^/]|//&|
26676       p
26677       q
26678     }'
26679
26680         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26681   sed -n "$gl_absolute_header_sed"`
26682
26683            gl_header=$gl_cv_absolute_time_h
26684            gl_cv_next_time_h='"'$gl_header'"'
26685
26686
26687 fi
26688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
26689 printf "%s\n" "$gl_cv_next_time_h" >&6; }
26690      fi
26691      NEXT_TIME_H=$gl_cv_next_time_h
26692
26693      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26694        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26695        gl_next_as_first_directive='<'time.h'>'
26696      else
26697        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26698        gl_next_as_first_directive=$gl_cv_next_time_h
26699      fi
26700      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
26701
26702
26703
26704
26705
26706
26707
26708
26709   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
26710 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
26711 if test ${gl_cv_time_h_has_TIME_UTC+y}
26712 then :
26713   printf %s "(cached) " >&6
26714 else $as_nop
26715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26716 /* end confdefs.h.  */
26717 #include <time.h>
26718
26719 int
26720 main (void)
26721 {
26722 static int x = TIME_UTC; x++;
26723   ;
26724   return 0;
26725 }
26726 _ACEOF
26727 if ac_fn_c_try_compile "$LINENO"
26728 then :
26729   gl_cv_time_h_has_TIME_UTC=yes
26730 else $as_nop
26731   gl_cv_time_h_has_TIME_UTC=no
26732 fi
26733 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26734 fi
26735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
26736 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
26737   if test $gl_cv_time_h_has_TIME_UTC = yes; then
26738     TIME_H_DEFINES_TIME_UTC=1
26739   else
26740     TIME_H_DEFINES_TIME_UTC=0
26741   fi
26742
26743
26744
26745
26746   GL_M4_GNULIB_CTIME=0
26747
26748
26749
26750   GL_M4_GNULIB_MKTIME=0
26751
26752
26753
26754   GL_M4_GNULIB_LOCALTIME=0
26755
26756
26757
26758   GL_M4_GNULIB_NANOSLEEP=0
26759
26760
26761
26762   GL_M4_GNULIB_STRFTIME=0
26763
26764
26765
26766   GL_M4_GNULIB_STRPTIME=0
26767
26768
26769
26770   GL_M4_GNULIB_TIMEGM=0
26771
26772
26773
26774   GL_M4_GNULIB_TIMESPEC_GET=0
26775
26776
26777
26778   GL_M4_GNULIB_TIME_R=0
26779
26780
26781
26782   GL_M4_GNULIB_TIME_RZ=0
26783
26784
26785
26786   GL_M4_GNULIB_TZSET=0
26787
26788
26789
26790   GL_M4_GNULIB_MDA_TZSET=1
26791
26792
26793
26794 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26795 if test "x$ac_cv_have_decl_execvpe" = xyes
26796 then :
26797   ac_have_decl=1
26798 else $as_nop
26799   ac_have_decl=0
26800 fi
26801 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815      if test $gl_cv_have_include_next = yes; then
26816        gl_cv_next_unistd_h='<'unistd.h'>'
26817      else
26818        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26819 printf %s "checking absolute name of <unistd.h>... " >&6; }
26820 if test ${gl_cv_next_unistd_h+y}
26821 then :
26822   printf %s "(cached) " >&6
26823 else $as_nop
26824
26825              if test $ac_cv_header_unistd_h = yes; then
26826
26827
26828
26829
26830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26831 /* end confdefs.h.  */
26832 #include <unistd.h>
26833 _ACEOF
26834                 case "$host_os" in
26835     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26836     *)    gl_absname_cpp="$ac_cpp" ;;
26837   esac
26838
26839   case "$host_os" in
26840     mingw*)
26841                                           gl_dirsep_regex='[/\\]'
26842       ;;
26843     *)
26844       gl_dirsep_regex='\/'
26845       ;;
26846   esac
26847       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26848   gl_header_literal_regex=`echo 'unistd.h' \
26849                            | sed -e "$gl_make_literal_regex_sed"`
26850   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26851       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26852       s|^/[^/]|//&|
26853       p
26854       q
26855     }'
26856
26857         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26858   sed -n "$gl_absolute_header_sed"`
26859
26860            gl_header=$gl_cv_absolute_unistd_h
26861            gl_cv_next_unistd_h='"'$gl_header'"'
26862           else
26863                gl_cv_next_unistd_h='<'unistd.h'>'
26864              fi
26865
26866
26867 fi
26868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26869 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26870      fi
26871      NEXT_UNISTD_H=$gl_cv_next_unistd_h
26872
26873      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26874        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26875        gl_next_as_first_directive='<'unistd.h'>'
26876      else
26877        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26878        gl_next_as_first_directive=$gl_cv_next_unistd_h
26879      fi
26880      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26881
26882
26883
26884
26885   if test $ac_cv_header_unistd_h = yes; then
26886     HAVE_UNISTD_H=1
26887   else
26888     HAVE_UNISTD_H=0
26889   fi
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901   if test $ac_cv_have_decl_execvpe = no; then
26902     HAVE_DECL_EXECVPE=0
26903   fi
26904
26905
26906
26907
26908
26909
26910
26911 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
26912 i\
26913 0
26914 q
26915 '
26916 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
26917 i\
26918 0
26919 q
26920 '
26921 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
26922 i\
26923 0
26924 q
26925 '
26926
26927
26928   if test "$HAVE_LIBUNISTRING" = yes; then
26929     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
26930     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
26931     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
26932   fi
26933
26934 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26935 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
26936 then :
26937   ac_have_decl=1
26938 else $as_nop
26939   ac_have_decl=0
26940 fi
26941 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
26942
26943 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26944 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
26945 then :
26946   ac_have_decl=1
26947 else $as_nop
26948   ac_have_decl=0
26949 fi
26950 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
26951
26952 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26953 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
26954 then :
26955   ac_have_decl=1
26956 else $as_nop
26957   ac_have_decl=0
26958 fi
26959 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
26960
26961 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26962 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
26963 then :
26964   ac_have_decl=1
26965 else $as_nop
26966   ac_have_decl=0
26967 fi
26968 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
26969
26970 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26971 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
26972 then :
26973   ac_have_decl=1
26974 else $as_nop
26975   ac_have_decl=0
26976 fi
26977 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
26978
26979 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26980 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
26981 then :
26982   ac_have_decl=1
26983 else $as_nop
26984   ac_have_decl=0
26985 fi
26986 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
26987
26988 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26989 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
26990 then :
26991   ac_have_decl=1
26992 else $as_nop
26993   ac_have_decl=0
26994 fi
26995 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
26996
26997 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26998 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
26999 then :
27000   ac_have_decl=1
27001 else $as_nop
27002   ac_have_decl=0
27003 fi
27004 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
27005
27006 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27007 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
27008 then :
27009   ac_have_decl=1
27010 else $as_nop
27011   ac_have_decl=0
27012 fi
27013 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
27014
27015 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27016 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
27017 then :
27018   ac_have_decl=1
27019 else $as_nop
27020   ac_have_decl=0
27021 fi
27022 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
27023
27024 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27025 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
27026 then :
27027   ac_have_decl=1
27028 else $as_nop
27029   ac_have_decl=0
27030 fi
27031 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
27032
27033 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27034 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
27035 then :
27036   ac_have_decl=1
27037 else $as_nop
27038   ac_have_decl=0
27039 fi
27040 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
27041
27042 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27043 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
27044 then :
27045   ac_have_decl=1
27046 else $as_nop
27047   ac_have_decl=0
27048 fi
27049 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
27050
27051
27052
27053
27054
27055   if test $ac_cv_header_features_h = yes; then
27056     HAVE_FEATURES_H=1
27057   else
27058     HAVE_FEATURES_H=0
27059   fi
27060
27061
27062
27063   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
27064 printf %s "checking for inttypes.h... " >&6; }
27065 if test ${gl_cv_header_inttypes_h+y}
27066 then :
27067   printf %s "(cached) " >&6
27068 else $as_nop
27069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27070 /* end confdefs.h.  */
27071
27072 #include <sys/types.h>
27073 #include <inttypes.h>
27074
27075 int
27076 main (void)
27077 {
27078 uintmax_t i = (uintmax_t) -1; return !i;
27079   ;
27080   return 0;
27081 }
27082 _ACEOF
27083 if ac_fn_c_try_compile "$LINENO"
27084 then :
27085   gl_cv_header_inttypes_h=yes
27086 else $as_nop
27087   gl_cv_header_inttypes_h=no
27088 fi
27089 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27090 fi
27091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
27092 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
27093   if test $gl_cv_header_inttypes_h = yes; then
27094
27095 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
27096
27097   fi
27098
27099
27100   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
27101 printf %s "checking for stdint.h... " >&6; }
27102 if test ${gl_cv_header_stdint_h+y}
27103 then :
27104   printf %s "(cached) " >&6
27105 else $as_nop
27106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27107 /* end confdefs.h.  */
27108 #include <sys/types.h>
27109             #include <stdint.h>
27110 int
27111 main (void)
27112 {
27113 uintmax_t i = (uintmax_t) -1; return !i;
27114   ;
27115   return 0;
27116 }
27117 _ACEOF
27118 if ac_fn_c_try_compile "$LINENO"
27119 then :
27120   gl_cv_header_stdint_h=yes
27121 else $as_nop
27122   gl_cv_header_stdint_h=no
27123 fi
27124 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27125 fi
27126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
27127 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
27128   if test $gl_cv_header_stdint_h = yes; then
27129
27130 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
27131
27132   fi
27133
27134
27135
27136
27137   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
27138 printf %s "checking for intmax_t... " >&6; }
27139 if test ${gt_cv_c_intmax_t+y}
27140 then :
27141   printf %s "(cached) " >&6
27142 else $as_nop
27143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27144 /* end confdefs.h.  */
27145
27146 #include <stddef.h>
27147 #include <stdlib.h>
27148 #if HAVE_STDINT_H_WITH_UINTMAX
27149 #include <stdint.h>
27150 #endif
27151 #if HAVE_INTTYPES_H_WITH_UINTMAX
27152 #include <inttypes.h>
27153 #endif
27154
27155 int
27156 main (void)
27157 {
27158 intmax_t x = -1; return !x;
27159   ;
27160   return 0;
27161 }
27162 _ACEOF
27163 if ac_fn_c_try_compile "$LINENO"
27164 then :
27165   gt_cv_c_intmax_t=yes
27166 else $as_nop
27167   gt_cv_c_intmax_t=no
27168 fi
27169 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27170 fi
27171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
27172 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
27173   if test $gt_cv_c_intmax_t = yes; then
27174
27175 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
27176
27177   else
27178
27179 printf "%s\n" "#define intmax_t long long" >>confdefs.h
27180
27181   fi
27182
27183
27184
27185
27186   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
27187 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
27188 if test ${gl_cv_func_snprintf_truncation_c99+y}
27189 then :
27190   printf %s "(cached) " >&6
27191 else $as_nop
27192
27193       if test "$cross_compiling" = yes
27194 then :
27195
27196          case "$host_os" in
27197                                  # Guess yes on glibc systems.
27198            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
27199                                  # Guess yes on musl systems.
27200            *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
27201                                  # Guess yes on FreeBSD >= 5.
27202            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
27203            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27204            midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
27205                                  # Guess yes on Mac OS X >= 10.3.
27206            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
27207            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
27208                                  # Guess yes on OpenBSD >= 3.9.
27209            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27210                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
27211            openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
27212                                  # Guess yes on Solaris >= 2.6.
27213            solaris2.[0-5] | solaris2.[0-5].*)
27214                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
27215            solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
27216                                  # Guess yes on AIX >= 4.
27217            aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
27218            aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
27219                                  # Guess yes on HP-UX >= 11.
27220            hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27221            hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
27222                                  # Guess yes on IRIX >= 6.5.
27223            irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
27224                                  # Guess yes on OSF/1 >= 5.
27225            osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
27226            osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
27227                                  # Guess yes on NetBSD >= 3.
27228            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27229                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
27230            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
27231                                  # Guess yes on BeOS.
27232            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
27233                                  # Guess yes on Android.
27234            linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
27235                                  # Guess no on native Windows.
27236            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
27237                                  # If we don't know, obey --enable-cross-guesses.
27238            *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
27239          esac
27240
27241 else $as_nop
27242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27243 /* end confdefs.h.  */
27244
27245 #include <stdio.h>
27246 #include <string.h>
27247 #if HAVE_SNPRINTF
27248 # define my_snprintf snprintf
27249 #else
27250 # include <stdarg.h>
27251 static int my_snprintf (char *buf, int size, const char *format, ...)
27252 {
27253   va_list args;
27254   int ret;
27255   va_start (args, format);
27256   ret = vsnprintf (buf, size, format, args);
27257   va_end (args);
27258   return ret;
27259 }
27260 #endif
27261 static char buf[100];
27262 int main ()
27263 {
27264   strcpy (buf, "ABCDEF");
27265   my_snprintf (buf, 3, "%d %d", 4567, 89);
27266   if (memcmp (buf, "45\0DEF", 6) != 0)
27267     return 1;
27268   return 0;
27269 }
27270 _ACEOF
27271 if ac_fn_c_try_run "$LINENO"
27272 then :
27273   gl_cv_func_snprintf_truncation_c99=yes
27274 else $as_nop
27275   gl_cv_func_snprintf_truncation_c99=no
27276 fi
27277 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27278   conftest.$ac_objext conftest.beam conftest.$ac_ext
27279 fi
27280
27281
27282 fi
27283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
27284 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
27285
27286
27287
27288
27289
27290   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
27291 if test "x$ac_cv_func_snprintf" = xyes
27292 then :
27293   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
27294
27295 fi
27296 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
27297 if test "x$ac_cv_func_strnlen" = xyes
27298 then :
27299   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
27300
27301 fi
27302 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
27303 if test "x$ac_cv_func_wcslen" = xyes
27304 then :
27305   printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
27306
27307 fi
27308 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
27309 if test "x$ac_cv_func_wcsnlen" = xyes
27310 then :
27311   printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
27312
27313 fi
27314 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
27315 if test "x$ac_cv_func_mbrtowc" = xyes
27316 then :
27317   printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
27318
27319 fi
27320 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
27321 if test "x$ac_cv_func_wcrtomb" = xyes
27322 then :
27323   printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
27324
27325 fi
27326
27327       ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
27328 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27329 if test "x$ac_cv_have_decl__snprintf" = xyes
27330 then :
27331   ac_have_decl=1
27332 else $as_nop
27333   ac_have_decl=0
27334 fi
27335 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
27336
27337
27338
27339   case "$gl_cv_func_snprintf_retval_c99" in
27340     *yes)
27341
27342 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
27343
27344       ;;
27345   esac
27346
27347   case "$gl_cv_func_snprintf_truncation_c99" in
27348     *yes)
27349
27350 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
27351
27352       ;;
27353   esac
27354
27355
27356
27357
27358
27359      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
27360 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
27361 if test ${gl_cv_func_printf_sizes_c99+y}
27362 then :
27363   printf %s "(cached) " >&6
27364 else $as_nop
27365
27366       if test "$cross_compiling" = yes
27367 then :
27368
27369          case "$host_os" in
27370                                  # Guess yes on glibc systems.
27371            *-gnu* | gnu*)        gl_cv_func_printf_sizes_c99="guessing yes";;
27372                                  # Guess yes on musl systems.
27373            *-musl*)              gl_cv_func_printf_sizes_c99="guessing yes";;
27374                                  # Guess yes on FreeBSD >= 5.
27375            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
27376            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
27377            midnightbsd*)         gl_cv_func_printf_sizes_c99="guessing yes";;
27378                                  # Guess yes on Mac OS X >= 10.3.
27379            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
27380            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
27381                                  # Guess yes on OpenBSD >= 3.9.
27382            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27383                                  gl_cv_func_printf_sizes_c99="guessing no";;
27384            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
27385                                  # Guess yes on Solaris >= 2.10.
27386            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
27387            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
27388                                  # Guess yes on NetBSD >= 3.
27389            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27390                                  gl_cv_func_printf_sizes_c99="guessing no";;
27391            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
27392                                  # Guess yes on Android.
27393            linux*-android*)      gl_cv_func_printf_sizes_c99="guessing yes";;
27394                                  # Guess yes on MSVC, no on mingw.
27395            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27396 /* end confdefs.h.  */
27397
27398 #ifdef _MSC_VER
27399  Known
27400 #endif
27401
27402 _ACEOF
27403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27404   $EGREP "Known" >/dev/null 2>&1
27405 then :
27406   gl_cv_func_printf_sizes_c99="guessing yes"
27407 else $as_nop
27408   gl_cv_func_printf_sizes_c99="guessing no"
27409 fi
27410 rm -rf conftest*
27411
27412                                  ;;
27413                                  # If we don't know, obey --enable-cross-guesses.
27414            *)                    gl_cv_func_printf_sizes_c99="$gl_cross_guess_normal";;
27415          esac
27416
27417 else $as_nop
27418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27419 /* end confdefs.h.  */
27420
27421 #include <stddef.h>
27422 #include <stdio.h>
27423 #include <string.h>
27424 #include <sys/types.h>
27425 #if HAVE_STDINT_H_WITH_UINTMAX
27426 # include <stdint.h>
27427 #endif
27428 #if HAVE_INTTYPES_H_WITH_UINTMAX
27429 # include <inttypes.h>
27430 #endif
27431 static char buf[100];
27432 int main ()
27433 {
27434   int result = 0;
27435 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
27436   buf[0] = '\0';
27437   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
27438       || strcmp (buf, "12345671 33") != 0)
27439     result |= 1;
27440 #else
27441   result |= 1;
27442 #endif
27443   buf[0] = '\0';
27444   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
27445       || strcmp (buf, "12345672 33") != 0)
27446     result |= 2;
27447   buf[0] = '\0';
27448   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
27449       || strcmp (buf, "12345673 33") != 0)
27450     result |= 4;
27451   buf[0] = '\0';
27452   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
27453       || strcmp (buf, "1.5 33") != 0)
27454     result |= 8;
27455   return result;
27456 }
27457 _ACEOF
27458 if ac_fn_c_try_run "$LINENO"
27459 then :
27460   gl_cv_func_printf_sizes_c99=yes
27461 else $as_nop
27462   gl_cv_func_printf_sizes_c99=no
27463 fi
27464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27465   conftest.$ac_objext conftest.beam conftest.$ac_ext
27466 fi
27467
27468
27469 fi
27470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
27471 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
27472
27473
27474
27475      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
27476 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
27477 if test ${gl_cv_func_printf_long_double+y}
27478 then :
27479   printf %s "(cached) " >&6
27480 else $as_nop
27481
27482       if test "$cross_compiling" = yes
27483 then :
27484   case "$host_os" in
27485                             # Guess no on BeOS.
27486            beos*)           gl_cv_func_printf_long_double="guessing no";;
27487                             # Guess yes on Android.
27488            linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
27489                             # Guess yes on MSVC, no on mingw.
27490            mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27491 /* end confdefs.h.  */
27492
27493 #ifdef _MSC_VER
27494  Known
27495 #endif
27496
27497 _ACEOF
27498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27499   $EGREP "Known" >/dev/null 2>&1
27500 then :
27501   gl_cv_func_printf_long_double="guessing yes"
27502 else $as_nop
27503   gl_cv_func_printf_long_double="guessing no"
27504 fi
27505 rm -rf conftest*
27506
27507                             ;;
27508            *)               gl_cv_func_printf_long_double="guessing yes";;
27509          esac
27510
27511 else $as_nop
27512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27513 /* end confdefs.h.  */
27514
27515 #include <stdio.h>
27516 #include <string.h>
27517 static char buf[10000];
27518 int main ()
27519 {
27520   int result = 0;
27521   buf[0] = '\0';
27522   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
27523       || strcmp (buf, "1.750000 33") != 0)
27524     result |= 1;
27525   buf[0] = '\0';
27526   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
27527       || strcmp (buf, "1.750000e+00 33") != 0)
27528     result |= 2;
27529   buf[0] = '\0';
27530   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
27531       || strcmp (buf, "1.75 33") != 0)
27532     result |= 4;
27533   return result;
27534 }
27535 _ACEOF
27536 if ac_fn_c_try_run "$LINENO"
27537 then :
27538   gl_cv_func_printf_long_double=yes
27539 else $as_nop
27540   gl_cv_func_printf_long_double=no
27541 fi
27542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27543   conftest.$ac_objext conftest.beam conftest.$ac_ext
27544 fi
27545
27546
27547 fi
27548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
27549 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
27550
27551
27552
27553      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
27554 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
27555 if test ${gl_cv_func_printf_infinite+y}
27556 then :
27557   printf %s "(cached) " >&6
27558 else $as_nop
27559
27560       if test "$cross_compiling" = yes
27561 then :
27562
27563          case "$host_os" in
27564                                  # Guess yes on glibc systems.
27565            *-gnu* | gnu*)        gl_cv_func_printf_infinite="guessing yes";;
27566                                  # Guess yes on musl systems.
27567            *-musl*)              gl_cv_func_printf_infinite="guessing yes";;
27568                                  # Guess yes on FreeBSD >= 6.
27569            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
27570            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
27571            midnightbsd*)         gl_cv_func_printf_infinite="guessing yes";;
27572                                  # Guess yes on Mac OS X >= 10.3.
27573            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
27574            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
27575                                  # Guess yes on HP-UX >= 11.
27576            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
27577            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
27578                                  # Guess yes on NetBSD >= 3.
27579            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27580                                  gl_cv_func_printf_infinite="guessing no";;
27581            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
27582                                  # Guess yes on OpenBSD >= 6.0.
27583            openbsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
27584            openbsd*)             gl_cv_func_printf_infinite="guessing yes";;
27585                                  # Guess yes on BeOS.
27586            beos*)                gl_cv_func_printf_infinite="guessing yes";;
27587                                  # Guess no on Android.
27588            linux*-android*)      gl_cv_func_printf_infinite="guessing no";;
27589                                  # Guess yes on MSVC, no on mingw.
27590            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27591 /* end confdefs.h.  */
27592
27593 #ifdef _MSC_VER
27594  Known
27595 #endif
27596
27597 _ACEOF
27598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27599   $EGREP "Known" >/dev/null 2>&1
27600 then :
27601   gl_cv_func_printf_infinite="guessing yes"
27602 else $as_nop
27603   gl_cv_func_printf_infinite="guessing no"
27604 fi
27605 rm -rf conftest*
27606
27607                                  ;;
27608                                  # If we don't know, obey --enable-cross-guesses.
27609            *)                    gl_cv_func_printf_infinite="$gl_cross_guess_normal";;
27610          esac
27611
27612 else $as_nop
27613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27614 /* end confdefs.h.  */
27615
27616 #include <stdio.h>
27617 #include <string.h>
27618 static int
27619 strisnan (const char *string, size_t start_index, size_t end_index)
27620 {
27621   if (start_index < end_index)
27622     {
27623       if (string[start_index] == '-')
27624         start_index++;
27625       if (start_index + 3 <= end_index
27626           && memcmp (string + start_index, "nan", 3) == 0)
27627         {
27628           start_index += 3;
27629           if (start_index == end_index
27630               || (string[start_index] == '(' && string[end_index - 1] == ')'))
27631             return 1;
27632         }
27633     }
27634   return 0;
27635 }
27636 static int
27637 have_minus_zero ()
27638 {
27639   static double plus_zero = 0.0;
27640   double minus_zero = - plus_zero;
27641   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
27642 }
27643 static char buf[10000];
27644 static double zero = 0.0;
27645 int main ()
27646 {
27647   int result = 0;
27648   if (sprintf (buf, "%f", 1.0 / zero) < 0
27649       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27650     result |= 1;
27651   if (sprintf (buf, "%f", -1.0 / zero) < 0
27652       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27653     result |= 1;
27654   if (sprintf (buf, "%f", zero / zero) < 0
27655       || !strisnan (buf, 0, strlen (buf)))
27656     result |= 2;
27657   if (sprintf (buf, "%e", 1.0 / zero) < 0
27658       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27659     result |= 4;
27660   if (sprintf (buf, "%e", -1.0 / zero) < 0
27661       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27662     result |= 4;
27663   if (sprintf (buf, "%e", zero / zero) < 0
27664       || !strisnan (buf, 0, strlen (buf)))
27665     result |= 8;
27666   if (sprintf (buf, "%g", 1.0 / zero) < 0
27667       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27668     result |= 16;
27669   if (sprintf (buf, "%g", -1.0 / zero) < 0
27670       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27671     result |= 16;
27672   if (sprintf (buf, "%g", zero / zero) < 0
27673       || !strisnan (buf, 0, strlen (buf)))
27674     result |= 32;
27675   /* This test fails on HP-UX 10.20.  */
27676   if (have_minus_zero ())
27677     if (sprintf (buf, "%g", - zero) < 0
27678         || strcmp (buf, "-0") != 0)
27679     result |= 64;
27680   return result;
27681 }
27682 _ACEOF
27683 if ac_fn_c_try_run "$LINENO"
27684 then :
27685   gl_cv_func_printf_infinite=yes
27686 else $as_nop
27687   gl_cv_func_printf_infinite=no
27688 fi
27689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27690   conftest.$ac_objext conftest.beam conftest.$ac_ext
27691 fi
27692
27693
27694 fi
27695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
27696 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
27697
27698
27699
27700
27701
27702
27703          if test -n "$gl_printf_safe"; then
27704
27705 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
27706
27707   fi
27708   case "$gl_cv_func_printf_long_double" in
27709     *yes)
27710       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
27711 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
27712 if test ${gl_cv_func_printf_infinite_long_double+y}
27713 then :
27714   printf %s "(cached) " >&6
27715 else $as_nop
27716
27717           if test "$cross_compiling" = yes
27718 then :
27719   case "$host_cpu" in
27720                                      # Guess no on ia64, x86_64, i386.
27721                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
27722                *)
27723                  case "$host_os" in
27724                                          # Guess yes on glibc systems.
27725                    *-gnu* | gnu*)        gl_cv_func_printf_infinite_long_double="guessing yes";;
27726                                          # Guess yes on musl systems.
27727                    *-musl*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
27728                                          # Guess yes on FreeBSD >= 6.
27729                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
27730                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27731                    midnightbsd*)         gl_cv_func_printf_infinite_long_double="guessing yes";;
27732                                          # Guess yes on HP-UX >= 11.
27733                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
27734                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
27735                                          # Guess yes on OpenBSD >= 6.0.
27736                    openbsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
27737                    openbsd*)             gl_cv_func_printf_infinite_long_double="guessing yes";;
27738                                          # Guess no on Android.
27739                    linux*-android*)      gl_cv_func_printf_infinite_long_double="guessing no";;
27740                                          # Guess yes on MSVC, no on mingw.
27741                    mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27742 /* end confdefs.h.  */
27743
27744 #ifdef _MSC_VER
27745  Known
27746 #endif
27747
27748 _ACEOF
27749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27750   $EGREP "Known" >/dev/null 2>&1
27751 then :
27752   gl_cv_func_printf_infinite_long_double="guessing yes"
27753 else $as_nop
27754   gl_cv_func_printf_infinite_long_double="guessing no"
27755 fi
27756 rm -rf conftest*
27757
27758                                          ;;
27759                                          # If we don't know, obey --enable-cross-guesses.
27760                    *)                    gl_cv_func_printf_infinite_long_double="$gl_cross_guess_normal";;
27761                  esac
27762                  ;;
27763              esac
27764
27765 else $as_nop
27766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767 /* end confdefs.h.  */
27768
27769
27770 #include <stdlib.h>
27771 #if defined __MACH__ && defined __APPLE__
27772 /* Avoid a crash on Mac OS X.  */
27773 #include <mach/mach.h>
27774 #include <mach/mach_error.h>
27775 #include <mach/thread_status.h>
27776 #include <mach/exception.h>
27777 #include <mach/task.h>
27778 #include <pthread.h>
27779 /* The exception port on which our thread listens.  */
27780 static mach_port_t our_exception_port;
27781 /* The main function of the thread listening for exceptions of type
27782    EXC_BAD_ACCESS.  */
27783 static void *
27784 mach_exception_thread (void *arg)
27785 {
27786   /* Buffer for a message to be received.  */
27787   struct {
27788     mach_msg_header_t head;
27789     mach_msg_body_t msgh_body;
27790     char data[1024];
27791   } msg;
27792   mach_msg_return_t retval;
27793   /* Wait for a message on the exception port.  */
27794   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
27795                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
27796   if (retval != MACH_MSG_SUCCESS)
27797     abort ();
27798   exit (1);
27799 }
27800 static void
27801 nocrash_init (void)
27802 {
27803   mach_port_t self = mach_task_self ();
27804   /* Allocate a port on which the thread shall listen for exceptions.  */
27805   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
27806       == KERN_SUCCESS) {
27807     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
27808     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
27809                                 MACH_MSG_TYPE_MAKE_SEND)
27810         == KERN_SUCCESS) {
27811       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
27812          for us.  */
27813       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
27814       /* Create the thread listening on the exception port.  */
27815       pthread_attr_t attr;
27816       pthread_t thread;
27817       if (pthread_attr_init (&attr) == 0
27818           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
27819           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
27820         pthread_attr_destroy (&attr);
27821         /* Replace the exception port info for these exceptions with our own.
27822            Note that we replace the exception port for the entire task, not only
27823            for a particular thread.  This has the effect that when our exception
27824            port gets the message, the thread specific exception port has already
27825            been asked, and we don't need to bother about it.
27826            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
27827         task_set_exception_ports (self, mask, our_exception_port,
27828                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
27829       }
27830     }
27831   }
27832 }
27833 #elif defined _WIN32 && ! defined __CYGWIN__
27834 /* Avoid a crash on native Windows.  */
27835 #define WIN32_LEAN_AND_MEAN
27836 #include <windows.h>
27837 #include <winerror.h>
27838 static LONG WINAPI
27839 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
27840 {
27841   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
27842     {
27843     case EXCEPTION_ACCESS_VIOLATION:
27844     case EXCEPTION_IN_PAGE_ERROR:
27845     case EXCEPTION_STACK_OVERFLOW:
27846     case EXCEPTION_GUARD_PAGE:
27847     case EXCEPTION_PRIV_INSTRUCTION:
27848     case EXCEPTION_ILLEGAL_INSTRUCTION:
27849     case EXCEPTION_DATATYPE_MISALIGNMENT:
27850     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
27851     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
27852       exit (1);
27853     }
27854   return EXCEPTION_CONTINUE_SEARCH;
27855 }
27856 static void
27857 nocrash_init (void)
27858 {
27859   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
27860 }
27861 #else
27862 /* Avoid a crash on POSIX systems.  */
27863 #include <signal.h>
27864 #include <unistd.h>
27865 /* A POSIX signal handler.  */
27866 static void
27867 exception_handler (int sig)
27868 {
27869   _exit (1);
27870 }
27871 static void
27872 nocrash_init (void)
27873 {
27874 #ifdef SIGSEGV
27875   signal (SIGSEGV, exception_handler);
27876 #endif
27877 #ifdef SIGBUS
27878   signal (SIGBUS, exception_handler);
27879 #endif
27880 }
27881 #endif
27882
27883 #include <float.h>
27884 #include <stdio.h>
27885 #include <string.h>
27886 static int
27887 strisnan (const char *string, size_t start_index, size_t end_index)
27888 {
27889   if (start_index < end_index)
27890     {
27891       if (string[start_index] == '-')
27892         start_index++;
27893       if (start_index + 3 <= end_index
27894           && memcmp (string + start_index, "nan", 3) == 0)
27895         {
27896           start_index += 3;
27897           if (start_index == end_index
27898               || (string[start_index] == '(' && string[end_index - 1] == ')'))
27899             return 1;
27900         }
27901     }
27902   return 0;
27903 }
27904 static char buf[10000];
27905 static long double zeroL = 0.0L;
27906 int main ()
27907 {
27908   int result = 0;
27909   nocrash_init();
27910   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
27911       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27912     result |= 1;
27913   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
27914       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27915     result |= 1;
27916   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
27917       || !strisnan (buf, 0, strlen (buf)))
27918     result |= 1;
27919   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
27920       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27921     result |= 1;
27922   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
27923       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27924     result |= 1;
27925   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
27926       || !strisnan (buf, 0, strlen (buf)))
27927     result |= 1;
27928   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
27929       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27930     result |= 1;
27931   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
27932       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27933     result |= 1;
27934   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
27935       || !strisnan (buf, 0, strlen (buf)))
27936     result |= 1;
27937 #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
27938 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27939    of 'unsigned int' words.  */
27940 # ifdef WORDS_BIGENDIAN
27941 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27942      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27943        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
27944        (unsigned int) (mantlo) << 16                                        \
27945      }
27946 # else
27947 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
27948      { mantlo, manthi, exponent }
27949 # endif
27950   { /* Quiet NaN.  */
27951     static union { unsigned int word[4]; long double value; } x =
27952       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27953     if (sprintf (buf, "%Lf", x.value) < 0
27954         || !strisnan (buf, 0, strlen (buf)))
27955       result |= 2;
27956     if (sprintf (buf, "%Le", x.value) < 0
27957         || !strisnan (buf, 0, strlen (buf)))
27958       result |= 2;
27959     if (sprintf (buf, "%Lg", x.value) < 0
27960         || !strisnan (buf, 0, strlen (buf)))
27961       result |= 2;
27962   }
27963   {
27964     /* Signalling NaN.  */
27965     static union { unsigned int word[4]; long double value; } x =
27966       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27967     if (sprintf (buf, "%Lf", x.value) < 0
27968         || !strisnan (buf, 0, strlen (buf)))
27969       result |= 2;
27970     if (sprintf (buf, "%Le", x.value) < 0
27971         || !strisnan (buf, 0, strlen (buf)))
27972       result |= 2;
27973     if (sprintf (buf, "%Lg", x.value) < 0
27974         || !strisnan (buf, 0, strlen (buf)))
27975       result |= 2;
27976   }
27977   { /* Pseudo-NaN.  */
27978     static union { unsigned int word[4]; long double value; } x =
27979       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27980     if (sprintf (buf, "%Lf", x.value) <= 0)
27981       result |= 4;
27982     if (sprintf (buf, "%Le", x.value) <= 0)
27983       result |= 4;
27984     if (sprintf (buf, "%Lg", x.value) <= 0)
27985       result |= 4;
27986   }
27987   { /* Pseudo-Infinity.  */
27988     static union { unsigned int word[4]; long double value; } x =
27989       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27990     if (sprintf (buf, "%Lf", x.value) <= 0)
27991       result |= 8;
27992     if (sprintf (buf, "%Le", x.value) <= 0)
27993       result |= 8;
27994     if (sprintf (buf, "%Lg", x.value) <= 0)
27995       result |= 8;
27996   }
27997   { /* Pseudo-Zero.  */
27998     static union { unsigned int word[4]; long double value; } x =
27999       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
28000     if (sprintf (buf, "%Lf", x.value) <= 0)
28001       result |= 16;
28002     if (sprintf (buf, "%Le", x.value) <= 0)
28003       result |= 16;
28004     if (sprintf (buf, "%Lg", x.value) <= 0)
28005       result |= 16;
28006   }
28007   { /* Unnormalized number.  */
28008     static union { unsigned int word[4]; long double value; } x =
28009       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
28010     if (sprintf (buf, "%Lf", x.value) <= 0)
28011       result |= 32;
28012     if (sprintf (buf, "%Le", x.value) <= 0)
28013       result |= 32;
28014     if (sprintf (buf, "%Lg", x.value) <= 0)
28015       result |= 32;
28016   }
28017   { /* Pseudo-Denormal.  */
28018     static union { unsigned int word[4]; long double value; } x =
28019       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
28020     if (sprintf (buf, "%Lf", x.value) <= 0)
28021       result |= 64;
28022     if (sprintf (buf, "%Le", x.value) <= 0)
28023       result |= 64;
28024     if (sprintf (buf, "%Lg", x.value) <= 0)
28025       result |= 64;
28026   }
28027 #endif
28028   return result;
28029 }
28030 _ACEOF
28031 if ac_fn_c_try_run "$LINENO"
28032 then :
28033   gl_cv_func_printf_infinite_long_double=yes
28034 else $as_nop
28035   gl_cv_func_printf_infinite_long_double=no
28036 fi
28037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28038   conftest.$ac_objext conftest.beam conftest.$ac_ext
28039 fi
28040
28041
28042 fi
28043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
28044 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
28045       ;;
28046     *)
28047       gl_cv_func_printf_infinite_long_double="irrelevant"
28048       ;;
28049   esac
28050
28051
28052
28053      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
28054 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
28055 if test ${gl_cv_func_printf_directive_a+y}
28056 then :
28057   printf %s "(cached) " >&6
28058 else $as_nop
28059
28060       if test "$cross_compiling" = yes
28061 then :
28062
28063          case "$host_os" in
28064                                  # Guess yes on glibc >= 2.5 systems.
28065            *-gnu* | gnu*)
28066              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28067 /* end confdefs.h.  */
28068
28069                #include <features.h>
28070                #ifdef __GNU_LIBRARY__
28071                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
28072                  BZ2908
28073                 #endif
28074                #endif
28075
28076 _ACEOF
28077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28078   $EGREP "BZ2908" >/dev/null 2>&1
28079 then :
28080   gl_cv_func_printf_directive_a="guessing yes"
28081 else $as_nop
28082   gl_cv_func_printf_directive_a="guessing no"
28083 fi
28084 rm -rf conftest*
28085
28086              ;;
28087                                  # Guess yes on musl systems.
28088            *-musl*)              gl_cv_func_printf_directive_a="guessing yes";;
28089                                  # Guess no on Android.
28090            linux*-android*)      gl_cv_func_printf_directive_a="guessing no";;
28091                                  # Guess no on native Windows.
28092            mingw*)               gl_cv_func_printf_directive_a="guessing no";;
28093                                  # If we don't know, obey --enable-cross-guesses.
28094            *)                    gl_cv_func_printf_directive_a="$gl_cross_guess_normal";;
28095          esac
28096
28097 else $as_nop
28098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28099 /* end confdefs.h.  */
28100
28101 #include <stdio.h>
28102 #include <string.h>
28103 static char buf[100];
28104 static double zero = 0.0;
28105 int main ()
28106 {
28107   int result = 0;
28108   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
28109       || (strcmp (buf, "0x1.922p+1 33") != 0
28110           && strcmp (buf, "0x3.244p+0 33") != 0
28111           && strcmp (buf, "0x6.488p-1 33") != 0
28112           && strcmp (buf, "0xc.91p-2 33") != 0))
28113     result |= 1;
28114   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
28115       || (strcmp (buf, "-0X1.922P+1 33") != 0
28116           && strcmp (buf, "-0X3.244P+0 33") != 0
28117           && strcmp (buf, "-0X6.488P-1 33") != 0
28118           && strcmp (buf, "-0XC.91P-2 33") != 0))
28119     result |= 2;
28120   /* This catches a FreeBSD 13.0 bug: it doesn't round.  */
28121   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
28122       || (strcmp (buf, "0x1.83p+0 33") != 0
28123           && strcmp (buf, "0x3.05p-1 33") != 0
28124           && strcmp (buf, "0x6.0ap-2 33") != 0
28125           && strcmp (buf, "0xc.14p-3 33") != 0))
28126     result |= 4;
28127   /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round.  */
28128   if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
28129       || (strcmp (buf, "0x2p+0 33") != 0
28130           && strcmp (buf, "0x3p-1 33") != 0
28131           && strcmp (buf, "0x6p-2 33") != 0
28132           && strcmp (buf, "0xcp-3 33") != 0))
28133     result |= 4;
28134   /* This catches a FreeBSD 6.1 bug.  See
28135      <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
28136   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
28137       || buf[0] == '0')
28138     result |= 8;
28139   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
28140   if (sprintf (buf, "%.1a", 1.999) < 0
28141       || (strcmp (buf, "0x1.0p+1") != 0
28142           && strcmp (buf, "0x2.0p+0") != 0
28143           && strcmp (buf, "0x4.0p-1") != 0
28144           && strcmp (buf, "0x8.0p-2") != 0))
28145     result |= 16;
28146   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
28147      glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
28148   if (sprintf (buf, "%.1La", 1.999L) < 0
28149       || (strcmp (buf, "0x1.0p+1") != 0
28150           && strcmp (buf, "0x2.0p+0") != 0
28151           && strcmp (buf, "0x4.0p-1") != 0
28152           && strcmp (buf, "0x8.0p-2") != 0))
28153     result |= 32;
28154   return result;
28155 }
28156 _ACEOF
28157 if ac_fn_c_try_run "$LINENO"
28158 then :
28159   gl_cv_func_printf_directive_a=yes
28160 else $as_nop
28161   gl_cv_func_printf_directive_a=no
28162 fi
28163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28164   conftest.$ac_objext conftest.beam conftest.$ac_ext
28165 fi
28166
28167
28168 fi
28169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
28170 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
28171
28172
28173
28174      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
28175 printf %s "checking whether printf supports the 'F' directive... " >&6; }
28176 if test ${gl_cv_func_printf_directive_f+y}
28177 then :
28178   printf %s "(cached) " >&6
28179 else $as_nop
28180
28181       if test "$cross_compiling" = yes
28182 then :
28183
28184          case "$host_os" in
28185                                  # Guess yes on glibc systems.
28186            *-gnu* | gnu*)        gl_cv_func_printf_directive_f="guessing yes";;
28187                                  # Guess yes on musl systems.
28188            *-musl*)              gl_cv_func_printf_directive_f="guessing yes";;
28189                                  # Guess yes on FreeBSD >= 6.
28190            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
28191            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
28192            midnightbsd*)         gl_cv_func_printf_directive_f="guessing yes";;
28193                                  # Guess yes on Mac OS X >= 10.3.
28194            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
28195            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
28196                                  # Guess yes on OpenBSD >= 6.0.
28197            openbsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
28198            openbsd*)             gl_cv_func_printf_directive_f="guessing yes";;
28199                                  # Guess yes on Solaris >= 2.10.
28200            solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
28201            solaris*)             gl_cv_func_printf_directive_f="guessing no";;
28202                                  # Guess no on Android.
28203            linux*-android*)      gl_cv_func_printf_directive_f="guessing no";;
28204                                  # Guess yes on MSVC, no on mingw.
28205            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206 /* end confdefs.h.  */
28207
28208 #ifdef _MSC_VER
28209  Known
28210 #endif
28211
28212 _ACEOF
28213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28214   $EGREP "Known" >/dev/null 2>&1
28215 then :
28216   gl_cv_func_printf_directive_f="guessing yes"
28217 else $as_nop
28218   gl_cv_func_printf_directive_f="guessing no"
28219 fi
28220 rm -rf conftest*
28221
28222                                  ;;
28223                                  # If we don't know, obey --enable-cross-guesses.
28224            *)                    gl_cv_func_printf_directive_f="$gl_cross_guess_normal";;
28225          esac
28226
28227 else $as_nop
28228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28229 /* end confdefs.h.  */
28230
28231 #include <stdio.h>
28232 #include <string.h>
28233 static char buf[100];
28234 static double zero = 0.0;
28235 int main ()
28236 {
28237   int result = 0;
28238   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
28239       || strcmp (buf, "1234567.000000 33") != 0)
28240     result |= 1;
28241   if (sprintf (buf, "%F", 1.0 / zero) < 0
28242       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
28243     result |= 2;
28244   /* This catches a Cygwin 1.5.x bug.  */
28245   if (sprintf (buf, "%.F", 1234.0) < 0
28246       || strcmp (buf, "1234") != 0)
28247     result |= 4;
28248   return result;
28249 }
28250 _ACEOF
28251 if ac_fn_c_try_run "$LINENO"
28252 then :
28253   gl_cv_func_printf_directive_f=yes
28254 else $as_nop
28255   gl_cv_func_printf_directive_f=no
28256 fi
28257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28258   conftest.$ac_objext conftest.beam conftest.$ac_ext
28259 fi
28260
28261
28262 fi
28263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
28264 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
28265
28266
28267
28268      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
28269 printf %s "checking whether printf supports the 'n' directive... " >&6; }
28270 if test ${gl_cv_func_printf_directive_n+y}
28271 then :
28272   printf %s "(cached) " >&6
28273 else $as_nop
28274
28275       if test "$cross_compiling" = yes
28276 then :
28277   case "$host_os" in
28278                             # Guess no on glibc when _FORTIFY_SOURCE >= 2.
28279            *-gnu* | gnu*)   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28280 /* end confdefs.h.  */
28281 #if _FORTIFY_SOURCE >= 2
28282                                     error fail
28283                                    #endif
28284
28285 _ACEOF
28286 if ac_fn_c_try_compile "$LINENO"
28287 then :
28288   gl_cv_func_printf_directive_n="guessing yes"
28289 else $as_nop
28290   gl_cv_func_printf_directive_n="guessing no"
28291 fi
28292 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28293                             ;;
28294                             # Guess no on Android.
28295            linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
28296                             # Guess no on native Windows.
28297            mingw*)          gl_cv_func_printf_directive_n="guessing no";;
28298            *)               gl_cv_func_printf_directive_n="guessing yes";;
28299          esac
28300
28301 else $as_nop
28302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28303 /* end confdefs.h.  */
28304
28305 #include <stdio.h>
28306 #include <stdlib.h>
28307 #include <string.h>
28308 #ifdef _MSC_VER
28309 #include <inttypes.h>
28310 /* See page about "Parameter Validation" on msdn.microsoft.com.
28311    <https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation>
28312    <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler>  */
28313 static void cdecl
28314 invalid_parameter_handler (const wchar_t *expression,
28315                            const wchar_t *function,
28316                            const wchar_t *file, unsigned int line,
28317                            uintptr_t dummy)
28318 {
28319   exit (1);
28320 }
28321 #endif
28322 static char fmtstring[10];
28323 static char buf[100];
28324 int main ()
28325 {
28326   int count = -1;
28327 #ifdef _MSC_VER
28328   _set_invalid_parameter_handler (invalid_parameter_handler);
28329 #endif
28330   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
28331      support %n in format strings in read-only memory but not in writable
28332      memory.  */
28333   strcpy (fmtstring, "%d %n");
28334   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
28335       || strcmp (buf, "123 ") != 0
28336       || count != 4)
28337     return 1;
28338   return 0;
28339 }
28340 _ACEOF
28341 if ac_fn_c_try_run "$LINENO"
28342 then :
28343   gl_cv_func_printf_directive_n=yes
28344 else $as_nop
28345   gl_cv_func_printf_directive_n=no
28346 fi
28347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28348   conftest.$ac_objext conftest.beam conftest.$ac_ext
28349 fi
28350
28351
28352 fi
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
28354 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
28355
28356
28357
28358      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
28359 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
28360 if test ${gl_cv_func_printf_directive_ls+y}
28361 then :
28362   printf %s "(cached) " >&6
28363 else $as_nop
28364
28365       if test "$cross_compiling" = yes
28366 then :
28367
28368          case "$host_os" in
28369                             # Guess yes on OpenBSD >= 6.0.
28370            openbsd[1-5].*)  gl_cv_func_printf_directive_ls="guessing no";;
28371            openbsd*)        gl_cv_func_printf_directive_ls="guessing yes";;
28372            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
28373            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
28374            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
28375            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
28376                             # Guess no on Android.
28377            linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
28378                             # Guess yes on native Windows.
28379            mingw*)          gl_cv_func_printf_directive_ls="guessing yes";;
28380            *)               gl_cv_func_printf_directive_ls="guessing yes";;
28381          esac
28382
28383 else $as_nop
28384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28385 /* end confdefs.h.  */
28386
28387 #include <stdio.h>
28388 #include <wchar.h>
28389 #include <string.h>
28390 int main ()
28391 {
28392   int result = 0;
28393   char buf[100];
28394   /* Test whether %ls works at all.
28395      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
28396      Cygwin 1.5.  */
28397   {
28398     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
28399     buf[0] = '\0';
28400     if (sprintf (buf, "%ls", wstring) < 0
28401         || strcmp (buf, "abc") != 0)
28402       result |= 1;
28403   }
28404   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
28405      assertion failure inside libc), but not on OpenBSD 4.0.  */
28406   {
28407     static const wchar_t wstring[] = { 'a', 0 };
28408     buf[0] = '\0';
28409     if (sprintf (buf, "%ls", wstring) < 0
28410         || strcmp (buf, "a") != 0)
28411       result |= 2;
28412   }
28413   /* Test whether precisions in %ls are supported as specified in ISO C 99
28414      section 7.19.6.1:
28415        "If a precision is specified, no more than that many bytes are written
28416         (including shift sequences, if any), and the array shall contain a
28417         null wide character if, to equal the multibyte character sequence
28418         length given by the precision, the function would need to access a
28419         wide character one past the end of the array."
28420      This test fails on Solaris 10.  */
28421   {
28422     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
28423     buf[0] = '\0';
28424     if (sprintf (buf, "%.2ls", wstring) < 0
28425         || strcmp (buf, "ab") != 0)
28426       result |= 8;
28427   }
28428   return result;
28429 }
28430 _ACEOF
28431 if ac_fn_c_try_run "$LINENO"
28432 then :
28433   gl_cv_func_printf_directive_ls=yes
28434 else $as_nop
28435   gl_cv_func_printf_directive_ls=no
28436 fi
28437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28438   conftest.$ac_objext conftest.beam conftest.$ac_ext
28439 fi
28440
28441
28442 fi
28443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
28444 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
28445
28446
28447
28448      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
28449 printf %s "checking whether printf supports the grouping flag... " >&6; }
28450 if test ${gl_cv_func_printf_flag_grouping+y}
28451 then :
28452   printf %s "(cached) " >&6
28453 else $as_nop
28454
28455       if test "$cross_compiling" = yes
28456 then :
28457
28458          case "$host_os" in
28459            cygwin*)         gl_cv_func_printf_flag_grouping="guessing no";;
28460            netbsd*)         gl_cv_func_printf_flag_grouping="guessing no";;
28461                             # Guess no on Android.
28462            linux*-android*) gl_cv_func_printf_flag_grouping="guessing no";;
28463                             # Guess no on native Windows.
28464            mingw* | pw*)    gl_cv_func_printf_flag_grouping="guessing no";;
28465            *)               gl_cv_func_printf_flag_grouping="guessing yes";;
28466          esac
28467
28468 else $as_nop
28469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28470 /* end confdefs.h.  */
28471
28472 #include <stdio.h>
28473 #include <string.h>
28474 static char buf[100];
28475 int main ()
28476 {
28477   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
28478       || buf[strlen (buf) - 1] != '9')
28479     return 1;
28480   return 0;
28481 }
28482 _ACEOF
28483 if ac_fn_c_try_run "$LINENO"
28484 then :
28485   gl_cv_func_printf_flag_grouping=yes
28486 else $as_nop
28487   gl_cv_func_printf_flag_grouping=no
28488 fi
28489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28490   conftest.$ac_objext conftest.beam conftest.$ac_ext
28491 fi
28492
28493
28494 fi
28495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
28496 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
28497
28498
28499
28500      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
28501 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
28502 if test ${gl_cv_func_printf_flag_leftadjust+y}
28503 then :
28504   printf %s "(cached) " >&6
28505 else $as_nop
28506
28507       if test "$cross_compiling" = yes
28508 then :
28509
28510          case "$host_os" in
28511                             # Guess yes on HP-UX 11.
28512            hpux11*)         gl_cv_func_printf_flag_leftadjust="guessing yes";;
28513                             # Guess no on HP-UX 10 and older.
28514            hpux*)           gl_cv_func_printf_flag_leftadjust="guessing no";;
28515                             # Guess yes on Android.
28516            linux*-android*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
28517                             # Guess yes on native Windows.
28518            mingw*)          gl_cv_func_printf_flag_leftadjust="guessing yes";;
28519                             # Guess yes otherwise.
28520            *)               gl_cv_func_printf_flag_leftadjust="guessing yes";;
28521          esac
28522
28523 else $as_nop
28524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28525 /* end confdefs.h.  */
28526
28527 #include <stdio.h>
28528 #include <string.h>
28529 static char buf[100];
28530 int main ()
28531 {
28532   /* Check that a '-' flag is not annihilated by a negative width.  */
28533   if (sprintf (buf, "a%-*sc", -3, "b") < 0
28534       || strcmp (buf, "ab  c") != 0)
28535     return 1;
28536   return 0;
28537 }
28538 _ACEOF
28539 if ac_fn_c_try_run "$LINENO"
28540 then :
28541   gl_cv_func_printf_flag_leftadjust=yes
28542 else $as_nop
28543   gl_cv_func_printf_flag_leftadjust=no
28544 fi
28545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28546   conftest.$ac_objext conftest.beam conftest.$ac_ext
28547 fi
28548
28549
28550 fi
28551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
28552 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
28553
28554
28555
28556      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
28557 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
28558 if test ${gl_cv_func_printf_flag_zero+y}
28559 then :
28560   printf %s "(cached) " >&6
28561 else $as_nop
28562
28563       if test "$cross_compiling" = yes
28564 then :
28565
28566          case "$host_os" in
28567                             # Guess yes on glibc systems.
28568            *-gnu* | gnu*)   gl_cv_func_printf_flag_zero="guessing yes";;
28569                             # Guess yes on musl systems.
28570            *-musl*)         gl_cv_func_printf_flag_zero="guessing yes";;
28571                             # Guess yes on BeOS.
28572            beos*)           gl_cv_func_printf_flag_zero="guessing yes";;
28573                             # Guess no on Android.
28574            linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
28575                             # Guess no on native Windows.
28576            mingw*)          gl_cv_func_printf_flag_zero="guessing no";;
28577                             # If we don't know, obey --enable-cross-guesses.
28578            *)               gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
28579          esac
28580
28581 else $as_nop
28582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28583 /* end confdefs.h.  */
28584
28585 #include <stdio.h>
28586 #include <string.h>
28587 static char buf[100];
28588 static double zero = 0.0;
28589 int main ()
28590 {
28591   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
28592       || (strcmp (buf, "       inf") != 0
28593           && strcmp (buf, "  infinity") != 0))
28594     return 1;
28595   return 0;
28596 }
28597 _ACEOF
28598 if ac_fn_c_try_run "$LINENO"
28599 then :
28600   gl_cv_func_printf_flag_zero=yes
28601 else $as_nop
28602   gl_cv_func_printf_flag_zero=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
28609 fi
28610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
28611 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
28612
28613
28614
28615      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
28616 printf %s "checking whether printf supports large precisions... " >&6; }
28617 if test ${gl_cv_func_printf_precision+y}
28618 then :
28619   printf %s "(cached) " >&6
28620 else $as_nop
28621
28622       if test "$cross_compiling" = yes
28623 then :
28624
28625          case "$host_os" in
28626            # Guess no only on Solaris, native Windows, and BeOS systems.
28627            solaris*)        gl_cv_func_printf_precision="guessing no" ;;
28628            mingw* | pw*)    gl_cv_func_printf_precision="guessing no" ;;
28629            beos*)           gl_cv_func_printf_precision="guessing no" ;;
28630                             # Guess yes on Android.
28631            linux*-android*) gl_cv_func_printf_precision="guessing yes" ;;
28632            *)               gl_cv_func_printf_precision="guessing yes" ;;
28633          esac
28634
28635 else $as_nop
28636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28637 /* end confdefs.h.  */
28638
28639 #include <stdio.h>
28640 #include <string.h>
28641 static char buf[5000];
28642 int main ()
28643 {
28644   int result = 0;
28645 #ifdef __BEOS__
28646   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
28647   return 1;
28648 #endif
28649   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
28650     result |= 1;
28651   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
28652     result |= 2;
28653   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
28654       || buf[0] != '1')
28655     result |= 4;
28656   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
28657       || buf[0] != '1')
28658     result |= 4;
28659   return result;
28660 }
28661 _ACEOF
28662 if ac_fn_c_try_run "$LINENO"
28663 then :
28664   gl_cv_func_printf_precision=yes
28665 else $as_nop
28666   gl_cv_func_printf_precision=no
28667 fi
28668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28669   conftest.$ac_objext conftest.beam conftest.$ac_ext
28670 fi
28671
28672
28673 fi
28674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
28675 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
28676
28677
28678
28679
28680      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
28681 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
28682 if test ${gl_cv_func_printf_enomem+y}
28683 then :
28684   printf %s "(cached) " >&6
28685 else $as_nop
28686
28687       gl_cv_func_printf_enomem="guessing no"
28688       if test "$cross_compiling" = no; then
28689         if test $APPLE_UNIVERSAL_BUILD = 0; then
28690           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28691 /* end confdefs.h.  */
28692
28693
28694 #include <stdlib.h>
28695 #if defined __MACH__ && defined __APPLE__
28696 /* Avoid a crash on Mac OS X.  */
28697 #include <mach/mach.h>
28698 #include <mach/mach_error.h>
28699 #include <mach/thread_status.h>
28700 #include <mach/exception.h>
28701 #include <mach/task.h>
28702 #include <pthread.h>
28703 /* The exception port on which our thread listens.  */
28704 static mach_port_t our_exception_port;
28705 /* The main function of the thread listening for exceptions of type
28706    EXC_BAD_ACCESS.  */
28707 static void *
28708 mach_exception_thread (void *arg)
28709 {
28710   /* Buffer for a message to be received.  */
28711   struct {
28712     mach_msg_header_t head;
28713     mach_msg_body_t msgh_body;
28714     char data[1024];
28715   } msg;
28716   mach_msg_return_t retval;
28717   /* Wait for a message on the exception port.  */
28718   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
28719                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
28720   if (retval != MACH_MSG_SUCCESS)
28721     abort ();
28722   exit (1);
28723 }
28724 static void
28725 nocrash_init (void)
28726 {
28727   mach_port_t self = mach_task_self ();
28728   /* Allocate a port on which the thread shall listen for exceptions.  */
28729   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
28730       == KERN_SUCCESS) {
28731     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
28732     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
28733                                 MACH_MSG_TYPE_MAKE_SEND)
28734         == KERN_SUCCESS) {
28735       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
28736          for us.  */
28737       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
28738       /* Create the thread listening on the exception port.  */
28739       pthread_attr_t attr;
28740       pthread_t thread;
28741       if (pthread_attr_init (&attr) == 0
28742           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
28743           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
28744         pthread_attr_destroy (&attr);
28745         /* Replace the exception port info for these exceptions with our own.
28746            Note that we replace the exception port for the entire task, not only
28747            for a particular thread.  This has the effect that when our exception
28748            port gets the message, the thread specific exception port has already
28749            been asked, and we don't need to bother about it.
28750            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
28751         task_set_exception_ports (self, mask, our_exception_port,
28752                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
28753       }
28754     }
28755   }
28756 }
28757 #elif defined _WIN32 && ! defined __CYGWIN__
28758 /* Avoid a crash on native Windows.  */
28759 #define WIN32_LEAN_AND_MEAN
28760 #include <windows.h>
28761 #include <winerror.h>
28762 static LONG WINAPI
28763 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
28764 {
28765   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
28766     {
28767     case EXCEPTION_ACCESS_VIOLATION:
28768     case EXCEPTION_IN_PAGE_ERROR:
28769     case EXCEPTION_STACK_OVERFLOW:
28770     case EXCEPTION_GUARD_PAGE:
28771     case EXCEPTION_PRIV_INSTRUCTION:
28772     case EXCEPTION_ILLEGAL_INSTRUCTION:
28773     case EXCEPTION_DATATYPE_MISALIGNMENT:
28774     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
28775     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
28776       exit (1);
28777     }
28778   return EXCEPTION_CONTINUE_SEARCH;
28779 }
28780 static void
28781 nocrash_init (void)
28782 {
28783   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
28784 }
28785 #else
28786 /* Avoid a crash on POSIX systems.  */
28787 #include <signal.h>
28788 #include <unistd.h>
28789 /* A POSIX signal handler.  */
28790 static void
28791 exception_handler (int sig)
28792 {
28793   _exit (1);
28794 }
28795 static void
28796 nocrash_init (void)
28797 {
28798 #ifdef SIGSEGV
28799   signal (SIGSEGV, exception_handler);
28800 #endif
28801 #ifdef SIGBUS
28802   signal (SIGBUS, exception_handler);
28803 #endif
28804 }
28805 #endif
28806
28807 #include <stdio.h>
28808 #include <sys/types.h>
28809 #include <sys/time.h>
28810 #include <sys/resource.h>
28811 #include <errno.h>
28812 int main()
28813 {
28814   struct rlimit limit;
28815   int ret;
28816   nocrash_init ();
28817   /* Some printf implementations allocate temporary space with malloc.  */
28818   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
28819 #ifdef RLIMIT_DATA
28820   if (getrlimit (RLIMIT_DATA, &limit) < 0)
28821     return 77;
28822   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28823     limit.rlim_max = 5000000;
28824   limit.rlim_cur = limit.rlim_max;
28825   if (setrlimit (RLIMIT_DATA, &limit) < 0)
28826     return 77;
28827 #endif
28828   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
28829 #ifdef RLIMIT_AS
28830   if (getrlimit (RLIMIT_AS, &limit) < 0)
28831     return 77;
28832   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28833     limit.rlim_max = 5000000;
28834   limit.rlim_cur = limit.rlim_max;
28835   if (setrlimit (RLIMIT_AS, &limit) < 0)
28836     return 77;
28837 #endif
28838   /* Some printf implementations allocate temporary space on the stack.  */
28839 #ifdef RLIMIT_STACK
28840   if (getrlimit (RLIMIT_STACK, &limit) < 0)
28841     return 77;
28842   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28843     limit.rlim_max = 5000000;
28844   limit.rlim_cur = limit.rlim_max;
28845   if (setrlimit (RLIMIT_STACK, &limit) < 0)
28846     return 77;
28847 #endif
28848   ret = printf ("%.5000000f", 1.0);
28849   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
28850 }
28851
28852 _ACEOF
28853           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28854   (eval $ac_link) 2>&5
28855   ac_status=$?
28856   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28857   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28858             (./conftest 2>&5
28859              result=$?
28860              printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
28861              if test $result != 0 && test $result != 77; then result=1; fi
28862              exit $result
28863             ) >/dev/null 2>/dev/null
28864             case $? in
28865               0) gl_cv_func_printf_enomem="yes" ;;
28866               77) gl_cv_func_printf_enomem="guessing no" ;;
28867               *) gl_cv_func_printf_enomem="no" ;;
28868             esac
28869           else
28870             gl_cv_func_printf_enomem="guessing no"
28871           fi
28872           rm -fr conftest*
28873         else
28874                                         gl_cv_func_printf_enomem="guessing no"
28875         fi
28876       fi
28877       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
28878         case "$host_os" in
28879                            # Guess yes on glibc systems.
28880           *-gnu* | gnu*)   gl_cv_func_printf_enomem="guessing yes";;
28881                            # Guess yes on Solaris.
28882           solaris*)        gl_cv_func_printf_enomem="guessing yes";;
28883                            # Guess yes on AIX.
28884           aix*)            gl_cv_func_printf_enomem="guessing yes";;
28885                            # Guess yes on HP-UX/hppa.
28886           hpux*)           case "$host_cpu" in
28887                              hppa*) gl_cv_func_printf_enomem="guessing yes";;
28888                              *)     gl_cv_func_printf_enomem="guessing no";;
28889                            esac
28890                            ;;
28891                            # Guess yes on IRIX.
28892           irix*)           gl_cv_func_printf_enomem="guessing yes";;
28893                            # Guess yes on OSF/1.
28894           osf*)            gl_cv_func_printf_enomem="guessing yes";;
28895                            # Guess yes on BeOS.
28896           beos*)           gl_cv_func_printf_enomem="guessing yes";;
28897                            # Guess yes on Haiku.
28898           haiku*)          gl_cv_func_printf_enomem="guessing yes";;
28899                            # Guess no on Android.
28900           linux*-android*) gl_cv_func_printf_enomem="guessing no";;
28901                            # If we don't know, obey --enable-cross-guesses.
28902           *)               gl_cv_func_printf_enomem="$gl_cross_guess_normal";;
28903         esac
28904       fi
28905
28906 fi
28907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
28908 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
28909
28910
28911
28912   case "$gl_cv_func_printf_long_double" in
28913     *yes)
28914       ;;
28915     *)
28916
28917 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28918
28919       ;;
28920   esac
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934      if test $gl_cv_have_include_next = yes; then
28935        gl_cv_next_wchar_h='<'wchar.h'>'
28936      else
28937        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28938 printf %s "checking absolute name of <wchar.h>... " >&6; }
28939 if test ${gl_cv_next_wchar_h+y}
28940 then :
28941   printf %s "(cached) " >&6
28942 else $as_nop
28943
28944              if test $ac_cv_header_wchar_h = yes; then
28945
28946
28947
28948
28949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28950 /* end confdefs.h.  */
28951 #include <wchar.h>
28952 _ACEOF
28953                 case "$host_os" in
28954     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28955     *)    gl_absname_cpp="$ac_cpp" ;;
28956   esac
28957
28958   case "$host_os" in
28959     mingw*)
28960                                           gl_dirsep_regex='[/\\]'
28961       ;;
28962     *)
28963       gl_dirsep_regex='\/'
28964       ;;
28965   esac
28966       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28967   gl_header_literal_regex=`echo 'wchar.h' \
28968                            | sed -e "$gl_make_literal_regex_sed"`
28969   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28970       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28971       s|^/[^/]|//&|
28972       p
28973       q
28974     }'
28975
28976         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28977   sed -n "$gl_absolute_header_sed"`
28978
28979            gl_header=$gl_cv_absolute_wchar_h
28980            gl_cv_next_wchar_h='"'$gl_header'"'
28981           else
28982                gl_cv_next_wchar_h='<'wchar.h'>'
28983              fi
28984
28985
28986 fi
28987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28988 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
28989      fi
28990      NEXT_WCHAR_H=$gl_cv_next_wchar_h
28991
28992      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28993        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28994        gl_next_as_first_directive='<'wchar.h'>'
28995      else
28996        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28997        gl_next_as_first_directive=$gl_cv_next_wchar_h
28998      fi
28999      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29000
29001
29002
29003
29004   if test $ac_cv_header_wchar_h = yes; then
29005     HAVE_WCHAR_H=1
29006   else
29007     HAVE_WCHAR_H=0
29008   fi
29009
29010
29011
29012
29013
29014   if test $gt_cv_c_wint_t = yes; then
29015     HAVE_WINT_T=1
29016   else
29017     HAVE_WINT_T=0
29018   fi
29019
29020
29021
29022
29023
29024
29025
29026
29027   ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
29028       #include <wchar.h>
29029
29030 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29031 if test "x$ac_cv_have_decl_wcsdup" = xyes
29032 then :
29033   ac_have_decl=1
29034 else $as_nop
29035   ac_have_decl=0
29036 fi
29037 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
29038
29039   if test $ac_cv_have_decl_wcsdup = no; then
29040     HAVE_DECL_WCSDUP=0
29041   fi
29042
29043
29044
29045
29046   HAVE_STRUCT_SOCKADDR_STORAGE=1;
29047   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
29048
29049   HAVE_SA_FAMILY_T=1;
29050   HAVE_ACCEPT4=1;
29051
29052
29053    if test $ac_cv_header_sys_socket_h = no; then
29054                          ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
29055 if test "x$ac_cv_header_ws2tcpip_h" = xyes
29056 then :
29057   printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
29058
29059 fi
29060
29061    fi
29062
29063
29064
29065
29066
29067         case "$host_os" in
29068     osf*)
29069
29070 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
29071
29072       ;;
29073   esac
29074
29075   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
29076 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
29077 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
29078 then :
29079   printf %s "(cached) " >&6
29080 else $as_nop
29081
29082       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29083 /* end confdefs.h.  */
29084 #include <sys/socket.h>
29085 int
29086 main (void)
29087 {
29088
29089   ;
29090   return 0;
29091 }
29092 _ACEOF
29093 if ac_fn_c_try_compile "$LINENO"
29094 then :
29095   gl_cv_header_sys_socket_h_selfcontained=yes
29096 else $as_nop
29097   gl_cv_header_sys_socket_h_selfcontained=no
29098 fi
29099 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29100
29101 fi
29102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
29103 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
29104   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
29105             ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
29106 if test "x$ac_cv_func_shutdown" = xyes
29107 then :
29108   printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
29109
29110 fi
29111
29112     if test $ac_cv_func_shutdown = yes; then
29113       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
29114 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
29115 if test ${gl_cv_header_sys_socket_h_shut+y}
29116 then :
29117   printf %s "(cached) " >&6
29118 else $as_nop
29119
29120           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29121 /* end confdefs.h.  */
29122 #include <sys/socket.h>
29123 int
29124 main (void)
29125 {
29126 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
29127   ;
29128   return 0;
29129 }
29130 _ACEOF
29131 if ac_fn_c_try_compile "$LINENO"
29132 then :
29133   gl_cv_header_sys_socket_h_shut=yes
29134 else $as_nop
29135   gl_cv_header_sys_socket_h_shut=no
29136 fi
29137 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29138
29139 fi
29140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
29141 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
29142       if test $gl_cv_header_sys_socket_h_shut = no; then
29143         SYS_SOCKET_H='sys/socket.h'
29144       fi
29145     fi
29146   fi
29147   # We need to check for ws2tcpip.h now.
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159      if test $gl_cv_have_include_next = yes; then
29160        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
29161      else
29162        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
29163 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
29164 if test ${gl_cv_next_sys_socket_h+y}
29165 then :
29166   printf %s "(cached) " >&6
29167 else $as_nop
29168
29169              if test $ac_cv_header_sys_socket_h = yes; then
29170
29171
29172
29173
29174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175 /* end confdefs.h.  */
29176 #include <sys/socket.h>
29177 _ACEOF
29178                 case "$host_os" in
29179     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29180     *)    gl_absname_cpp="$ac_cpp" ;;
29181   esac
29182
29183   case "$host_os" in
29184     mingw*)
29185                                           gl_dirsep_regex='[/\\]'
29186       ;;
29187     *)
29188       gl_dirsep_regex='\/'
29189       ;;
29190   esac
29191       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29192   gl_header_literal_regex=`echo 'sys/socket.h' \
29193                            | sed -e "$gl_make_literal_regex_sed"`
29194   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29195       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29196       s|^/[^/]|//&|
29197       p
29198       q
29199     }'
29200
29201         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29202   sed -n "$gl_absolute_header_sed"`
29203
29204            gl_header=$gl_cv_absolute_sys_socket_h
29205            gl_cv_next_sys_socket_h='"'$gl_header'"'
29206           else
29207                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
29208              fi
29209
29210
29211 fi
29212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
29213 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
29214      fi
29215      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
29216
29217      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29218        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29219        gl_next_as_first_directive='<'sys/socket.h'>'
29220      else
29221        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29222        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
29223      fi
29224      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
29225
29226
29227
29228
29229   if test $ac_cv_header_sys_socket_h = yes; then
29230     HAVE_SYS_SOCKET_H=1
29231   else
29232     HAVE_SYS_SOCKET_H=0
29233   fi
29234
29235
29236
29237   if test $ac_cv_header_sys_socket_h = yes; then
29238     HAVE_WS2TCPIP_H=0
29239   else
29240     if test $ac_cv_header_ws2tcpip_h = yes; then
29241       HAVE_WS2TCPIP_H=1
29242     else
29243       HAVE_WS2TCPIP_H=0
29244     fi
29245   fi
29246
29247
29248
29249   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
29250   /* sys/types.h is not needed according to POSIX, but the
29251      sys/socket.h in i386-unknown-freebsd4.10 and
29252      powerpc-apple-darwin5.5 required it. */
29253 #include <sys/types.h>
29254 #ifdef HAVE_SYS_SOCKET_H
29255 #include <sys/socket.h>
29256 #endif
29257 #ifdef HAVE_WS2TCPIP_H
29258 #include <ws2tcpip.h>
29259 #endif
29260
29261 "
29262 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
29263 then :
29264
29265 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
29266
29267
29268 fi
29269 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
29270   /* sys/types.h is not needed according to POSIX, but the
29271      sys/socket.h in i386-unknown-freebsd4.10 and
29272      powerpc-apple-darwin5.5 required it. */
29273 #include <sys/types.h>
29274 #ifdef HAVE_SYS_SOCKET_H
29275 #include <sys/socket.h>
29276 #endif
29277 #ifdef HAVE_WS2TCPIP_H
29278 #include <ws2tcpip.h>
29279 #endif
29280
29281 "
29282 if test "x$ac_cv_type_sa_family_t" = xyes
29283 then :
29284
29285 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
29286
29287
29288 fi
29289
29290   if test $ac_cv_type_struct_sockaddr_storage = no; then
29291     HAVE_STRUCT_SOCKADDR_STORAGE=0
29292   fi
29293   if test $ac_cv_type_sa_family_t = no; then
29294     HAVE_SA_FAMILY_T=0
29295   fi
29296   if test $ac_cv_type_struct_sockaddr_storage != no; then
29297     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
29298        #ifdef HAVE_SYS_SOCKET_H
29299        #include <sys/socket.h>
29300        #endif
29301        #ifdef HAVE_WS2TCPIP_H
29302        #include <ws2tcpip.h>
29303        #endif
29304
29305 "
29306 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
29307 then :
29308
29309 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
29310
29311
29312 else $as_nop
29313   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
29314 fi
29315
29316   fi
29317   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
29318      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
29319     SYS_SOCKET_H='sys/socket.h'
29320   fi
29321
29322
29323
29324
29325   if test $ac_cv_header_sys_socket_h != yes; then
29326                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29327 if test "x$ac_cv_header_winsock2_h" = xyes
29328 then :
29329   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29330
29331 fi
29332
29333   fi
29334   if test "$ac_cv_header_winsock2_h" = yes; then
29335     HAVE_WINSOCK2_H=1
29336     UNISTD_H_HAVE_WINSOCK2_H=1
29337     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29338   else
29339     HAVE_WINSOCK2_H=0
29340   fi
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350   GL_M4_GNULIB_SOCKET=0
29351
29352
29353
29354   GL_M4_GNULIB_CONNECT=0
29355
29356
29357
29358   GL_M4_GNULIB_ACCEPT=0
29359
29360
29361
29362   GL_M4_GNULIB_BIND=0
29363
29364
29365
29366   GL_M4_GNULIB_GETPEERNAME=0
29367
29368
29369
29370   GL_M4_GNULIB_GETSOCKNAME=0
29371
29372
29373
29374   GL_M4_GNULIB_GETSOCKOPT=0
29375
29376
29377
29378   GL_M4_GNULIB_LISTEN=0
29379
29380
29381
29382   GL_M4_GNULIB_RECV=0
29383
29384
29385
29386   GL_M4_GNULIB_SEND=0
29387
29388
29389
29390   GL_M4_GNULIB_RECVFROM=0
29391
29392
29393
29394   GL_M4_GNULIB_SENDTO=0
29395
29396
29397
29398   GL_M4_GNULIB_SETSOCKOPT=0
29399
29400
29401
29402   GL_M4_GNULIB_SHUTDOWN=0
29403
29404
29405
29406   GL_M4_GNULIB_ACCEPT4=0
29407
29408
29409
29410
29411     HAVE_DECL_INET_NTOP=1;
29412   HAVE_DECL_INET_PTON=1;
29413   REPLACE_INET_NTOP=0;
29414   REPLACE_INET_PTON=0;
29415
29416
29417
29418
29419
29420
29421   if test $ac_cv_header_arpa_inet_h = yes; then
29422     HAVE_ARPA_INET_H=1
29423   else
29424     HAVE_ARPA_INET_H=0
29425   fi
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436      if test $gl_cv_have_include_next = yes; then
29437        gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
29438      else
29439        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
29440 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
29441 if test ${gl_cv_next_arpa_inet_h+y}
29442 then :
29443   printf %s "(cached) " >&6
29444 else $as_nop
29445
29446              if test $ac_cv_header_arpa_inet_h = yes; then
29447
29448
29449
29450
29451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29452 /* end confdefs.h.  */
29453 #include <arpa/inet.h>
29454 _ACEOF
29455                 case "$host_os" in
29456     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29457     *)    gl_absname_cpp="$ac_cpp" ;;
29458   esac
29459
29460   case "$host_os" in
29461     mingw*)
29462                                           gl_dirsep_regex='[/\\]'
29463       ;;
29464     *)
29465       gl_dirsep_regex='\/'
29466       ;;
29467   esac
29468       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29469   gl_header_literal_regex=`echo 'arpa/inet.h' \
29470                            | sed -e "$gl_make_literal_regex_sed"`
29471   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29472       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29473       s|^/[^/]|//&|
29474       p
29475       q
29476     }'
29477
29478         gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29479   sed -n "$gl_absolute_header_sed"`
29480
29481            gl_header=$gl_cv_absolute_arpa_inet_h
29482            gl_cv_next_arpa_inet_h='"'$gl_header'"'
29483           else
29484                gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
29485              fi
29486
29487
29488 fi
29489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
29490 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
29491      fi
29492      NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
29493
29494      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29495        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29496        gl_next_as_first_directive='<'arpa/inet.h'>'
29497      else
29498        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29499        gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
29500      fi
29501      NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511   if test $ac_cv_header_sys_socket_h = yes; then
29512     HAVE_WS2TCPIP_H=0
29513   else
29514     if test $ac_cv_header_ws2tcpip_h = yes; then
29515       HAVE_WS2TCPIP_H=1
29516     else
29517       HAVE_WS2TCPIP_H=0
29518     fi
29519   fi
29520
29521
29522
29523
29524
29525
29526
29527   GL_M4_GNULIB_INET_NTOP=0
29528
29529
29530
29531   GL_M4_GNULIB_INET_PTON=0
29532
29533
29534
29535
29536
29537
29538                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library needed for semaphore functions" >&5
29539 printf %s "checking for library needed for semaphore functions... " >&6; }
29540 if test ${gl_cv_semaphore_lib+y}
29541 then :
29542   printf %s "(cached) " >&6
29543 else $as_nop
29544   save_LIBS="$LIBS"
29545      LIBS="$LIBS $LIBMULTITHREAD"
29546      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29547 /* end confdefs.h.  */
29548 #include <semaphore.h>
29549 int
29550 main (void)
29551 {
29552 sem_post ((sem_t *)0);
29553   ;
29554   return 0;
29555 }
29556 _ACEOF
29557 if ac_fn_c_try_link "$LINENO"
29558 then :
29559   gl_cv_semaphore_lib=none
29560 else $as_nop
29561   LIBS="$LIBS -lrt"
29562         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29563 /* end confdefs.h.  */
29564 #include <semaphore.h>
29565 int
29566 main (void)
29567 {
29568 sem_post ((sem_t *)0);
29569   ;
29570   return 0;
29571 }
29572 _ACEOF
29573 if ac_fn_c_try_link "$LINENO"
29574 then :
29575   gl_cv_semaphore_lib='-lrt'
29576 else $as_nop
29577   gl_cv_semaphore_lib=none
29578 fi
29579 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29580     conftest$ac_exeext conftest.$ac_ext
29581
29582 fi
29583 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29584     conftest$ac_exeext conftest.$ac_ext
29585      LIBS="$save_LIBS"
29586
29587 fi
29588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_semaphore_lib" >&5
29589 printf "%s\n" "$gl_cv_semaphore_lib" >&6; }
29590   if test "x$gl_cv_semaphore_lib" = xnone; then
29591     LIB_SEMAPHORE=
29592   else
29593     LIB_SEMAPHORE="$gl_cv_semaphore_lib"
29594   fi
29595
29596
29597
29598     HAVE_ISBLANK=1;
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611      if test $gl_cv_have_include_next = yes; then
29612        gl_cv_next_ctype_h='<'ctype.h'>'
29613      else
29614        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
29615 printf %s "checking absolute name of <ctype.h>... " >&6; }
29616 if test ${gl_cv_next_ctype_h+y}
29617 then :
29618   printf %s "(cached) " >&6
29619 else $as_nop
29620
29621
29622
29623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29624 /* end confdefs.h.  */
29625 #include <ctype.h>
29626 _ACEOF
29627                 case "$host_os" in
29628     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29629     *)    gl_absname_cpp="$ac_cpp" ;;
29630   esac
29631
29632   case "$host_os" in
29633     mingw*)
29634                                           gl_dirsep_regex='[/\\]'
29635       ;;
29636     *)
29637       gl_dirsep_regex='\/'
29638       ;;
29639   esac
29640       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29641   gl_header_literal_regex=`echo 'ctype.h' \
29642                            | sed -e "$gl_make_literal_regex_sed"`
29643   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29644       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29645       s|^/[^/]|//&|
29646       p
29647       q
29648     }'
29649
29650         gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29651   sed -n "$gl_absolute_header_sed"`
29652
29653            gl_header=$gl_cv_absolute_ctype_h
29654            gl_cv_next_ctype_h='"'$gl_header'"'
29655
29656
29657 fi
29658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
29659 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
29660      fi
29661      NEXT_CTYPE_H=$gl_cv_next_ctype_h
29662
29663      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29664        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29665        gl_next_as_first_directive='<'ctype.h'>'
29666      else
29667        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29668        gl_next_as_first_directive=$gl_cv_next_ctype_h
29669      fi
29670      NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680   GL_M4_GNULIB_ISBLANK=0
29681
29682
29683
29684
29685
29686
29687
29688     HAVE_GETTIMEOFDAY=1;
29689   HAVE_STRUCT_TIMEVAL=1;
29690   HAVE_SYS_TIME_H=1;
29691   REPLACE_GETTIMEOFDAY=0;
29692   REPLACE_STRUCT_TIMEVAL=0;
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707      if test $gl_cv_have_include_next = yes; then
29708        gl_cv_next_sys_time_h='<'sys/time.h'>'
29709      else
29710        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
29711 printf %s "checking absolute name of <sys/time.h>... " >&6; }
29712 if test ${gl_cv_next_sys_time_h+y}
29713 then :
29714   printf %s "(cached) " >&6
29715 else $as_nop
29716
29717              if test $ac_cv_header_sys_time_h = yes; then
29718
29719
29720
29721
29722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29723 /* end confdefs.h.  */
29724 #include <sys/time.h>
29725 _ACEOF
29726                 case "$host_os" in
29727     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29728     *)    gl_absname_cpp="$ac_cpp" ;;
29729   esac
29730
29731   case "$host_os" in
29732     mingw*)
29733                                           gl_dirsep_regex='[/\\]'
29734       ;;
29735     *)
29736       gl_dirsep_regex='\/'
29737       ;;
29738   esac
29739       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29740   gl_header_literal_regex=`echo 'sys/time.h' \
29741                            | sed -e "$gl_make_literal_regex_sed"`
29742   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29743       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29744       s|^/[^/]|//&|
29745       p
29746       q
29747     }'
29748
29749         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29750   sed -n "$gl_absolute_header_sed"`
29751
29752            gl_header=$gl_cv_absolute_sys_time_h
29753            gl_cv_next_sys_time_h='"'$gl_header'"'
29754           else
29755                gl_cv_next_sys_time_h='<'sys/time.h'>'
29756              fi
29757
29758
29759 fi
29760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
29761 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
29762      fi
29763      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
29764
29765      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29766        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29767        gl_next_as_first_directive='<'sys/time.h'>'
29768      else
29769        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29770        gl_next_as_first_directive=$gl_cv_next_sys_time_h
29771      fi
29772      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
29773
29774
29775
29776
29777
29778   if test $ac_cv_header_sys_time_h != yes; then
29779     HAVE_SYS_TIME_H=0
29780   fi
29781
29782
29783
29784
29785
29786   if test $ac_cv_header_sys_socket_h != yes; then
29787                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29788 if test "x$ac_cv_header_winsock2_h" = xyes
29789 then :
29790   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29791
29792 fi
29793
29794   fi
29795   if test "$ac_cv_header_winsock2_h" = yes; then
29796     HAVE_WINSOCK2_H=1
29797     UNISTD_H_HAVE_WINSOCK2_H=1
29798     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29799   else
29800     HAVE_WINSOCK2_H=0
29801   fi
29802
29803
29804   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
29805 printf %s "checking for struct timeval... " >&6; }
29806 if test ${gl_cv_sys_struct_timeval+y}
29807 then :
29808   printf %s "(cached) " >&6
29809 else $as_nop
29810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29811 /* end confdefs.h.  */
29812 #if HAVE_SYS_TIME_H
29813              #include <sys/time.h>
29814             #endif
29815             #include <time.h>
29816             #if HAVE_WINSOCK2_H
29817             # include <winsock2.h>
29818             #endif
29819
29820 int
29821 main (void)
29822 {
29823 static struct timeval x; x.tv_sec = x.tv_usec;
29824   ;
29825   return 0;
29826 }
29827 _ACEOF
29828 if ac_fn_c_try_compile "$LINENO"
29829 then :
29830   gl_cv_sys_struct_timeval=yes
29831 else $as_nop
29832   gl_cv_sys_struct_timeval=no
29833 fi
29834 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29835
29836 fi
29837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
29838 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
29839   if test $gl_cv_sys_struct_timeval != yes; then
29840     HAVE_STRUCT_TIMEVAL=0
29841   else
29842                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
29843 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
29844 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
29845 then :
29846   printf %s "(cached) " >&6
29847 else $as_nop
29848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849 /* end confdefs.h.  */
29850 #if HAVE_SYS_TIME_H
29851                #include <sys/time.h>
29852               #endif
29853               #include <time.h>
29854               #if HAVE_WINSOCK2_H
29855               # include <winsock2.h>
29856               #endif
29857
29858 int
29859 main (void)
29860 {
29861 static struct timeval x;
29862               typedef int verify_tv_sec_type[
29863                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
29864               ];
29865
29866   ;
29867   return 0;
29868 }
29869 _ACEOF
29870 if ac_fn_c_try_compile "$LINENO"
29871 then :
29872   gl_cv_sys_struct_timeval_tv_sec=yes
29873 else $as_nop
29874   gl_cv_sys_struct_timeval_tv_sec=no
29875 fi
29876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29877
29878 fi
29879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
29880 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
29881     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
29882       REPLACE_STRUCT_TIMEVAL=1
29883     fi
29884   fi
29885
29886
29887
29888
29889
29890
29891   GL_M4_GNULIB_GETTIMEOFDAY=0
29892
29893
29894
29895
29896
29897   case "$host_os" in
29898     *-musl*)
29899 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
29900  ;;
29901   esac
29902
29903
29904
29905
29906
29907
29908
29909   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
29910 printf %s "checking for IPv4 sockets... " >&6; }
29911 if test ${gl_cv_socket_ipv4+y}
29912 then :
29913   printf %s "(cached) " >&6
29914 else $as_nop
29915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29916 /* end confdefs.h.  */
29917 #include <sys/types.h>
29918 #ifdef HAVE_SYS_SOCKET_H
29919 #include <sys/socket.h>
29920 #endif
29921 #ifdef HAVE_NETINET_IN_H
29922 #include <netinet/in.h>
29923 #endif
29924 #ifdef HAVE_WINSOCK2_H
29925 #include <winsock2.h>
29926 #endif
29927 int
29928 main (void)
29929 {
29930 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
29931  if (&x && &y && &z) return 0;
29932   ;
29933   return 0;
29934 }
29935 _ACEOF
29936 if ac_fn_c_try_compile "$LINENO"
29937 then :
29938   gl_cv_socket_ipv4=yes
29939 else $as_nop
29940   gl_cv_socket_ipv4=no
29941 fi
29942 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29943 fi
29944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
29945 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
29946   if test $gl_cv_socket_ipv4 = yes; then
29947
29948 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
29949
29950   fi
29951
29952   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
29953 printf %s "checking for IPv6 sockets... " >&6; }
29954 if test ${gl_cv_socket_ipv6+y}
29955 then :
29956   printf %s "(cached) " >&6
29957 else $as_nop
29958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29959 /* end confdefs.h.  */
29960 #include <sys/types.h>
29961 #ifdef HAVE_SYS_SOCKET_H
29962 #include <sys/socket.h>
29963 #endif
29964 #ifdef HAVE_NETINET_IN_H
29965 #include <netinet/in.h>
29966 #endif
29967 #ifdef HAVE_WINSOCK2_H
29968 #include <winsock2.h>
29969 #endif
29970 #ifdef HAVE_WS2TCPIP_H
29971 #include <ws2tcpip.h>
29972 #endif
29973 int
29974 main (void)
29975 {
29976 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
29977  if (&x && &y && &z) return 0;
29978   ;
29979   return 0;
29980 }
29981 _ACEOF
29982 if ac_fn_c_try_compile "$LINENO"
29983 then :
29984   gl_cv_socket_ipv6=yes
29985 else $as_nop
29986   gl_cv_socket_ipv6=no
29987 fi
29988 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29989 fi
29990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
29991 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
29992   if test $gl_cv_socket_ipv6 = yes; then
29993
29994 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
29995
29996   fi
29997
29998 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
29999 if test "x$ac_cv_type_off_t" = xyes
30000 then :
30001
30002 else $as_nop
30003
30004 printf "%s\n" "#define off_t long int" >>confdefs.h
30005
30006 fi
30007
30008
30009
30010
30011   PRIPTR_PREFIX=
30012   if test -n "$STDINT_H"; then
30013             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30014 /* end confdefs.h.  */
30015
30016          #ifdef _WIN64
30017          LLP64
30018          #endif
30019
30020 int
30021 main (void)
30022 {
30023
30024   ;
30025   return 0;
30026 }
30027
30028 _ACEOF
30029 if ac_fn_c_try_compile "$LINENO"
30030 then :
30031   PRIPTR_PREFIX='"l"'
30032 else $as_nop
30033   PRIPTR_PREFIX='"ll"'
30034 fi
30035 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30036   else
30037         for glpfx in '' l ll I64; do
30038       case $glpfx in
30039         '')  gltype1='int';;
30040         l)   gltype1='long int';;
30041         ll)  gltype1='long long int';;
30042         I64) gltype1='__int64';;
30043       esac
30044       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30045 /* end confdefs.h.  */
30046 #include <stdint.h>
30047            extern intptr_t foo;
30048            extern $gltype1 foo;
30049 int
30050 main (void)
30051 {
30052
30053   ;
30054   return 0;
30055 }
30056 _ACEOF
30057 if ac_fn_c_try_compile "$LINENO"
30058 then :
30059   PRIPTR_PREFIX='"'$glpfx'"'
30060 fi
30061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30062       test -n "$PRIPTR_PREFIX" && break
30063     done
30064   fi
30065
30066
30067
30068   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
30069 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
30070 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
30071 then :
30072   printf %s "(cached) " >&6
30073 else $as_nop
30074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30075 /* end confdefs.h.  */
30076 /* Work also in C++ mode.  */
30077             #define __STDC_LIMIT_MACROS 1
30078
30079             /* Work if build is not clean.  */
30080             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30081
30082             #include <limits.h>
30083             #if HAVE_STDINT_H
30084              #include <stdint.h>
30085             #endif
30086
30087             #if defined INT32_MAX && defined INTMAX_MAX
30088              #define CONDITION (INT32_MAX < INTMAX_MAX)
30089             #else
30090              #define CONDITION (sizeof (int) < sizeof (long long int))
30091             #endif
30092             int test[CONDITION ? 1 : -1];
30093 int
30094 main (void)
30095 {
30096
30097   ;
30098   return 0;
30099 }
30100 _ACEOF
30101 if ac_fn_c_try_compile "$LINENO"
30102 then :
30103   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
30104 else $as_nop
30105   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
30106 fi
30107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30108 fi
30109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
30110 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
30111   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
30112     INT32_MAX_LT_INTMAX_MAX=1;
30113   else
30114     INT32_MAX_LT_INTMAX_MAX=0;
30115   fi
30116
30117
30118   if test $APPLE_UNIVERSAL_BUILD = 0; then
30119
30120   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
30121 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
30122 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
30123 then :
30124   printf %s "(cached) " >&6
30125 else $as_nop
30126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30127 /* end confdefs.h.  */
30128 /* Work also in C++ mode.  */
30129             #define __STDC_LIMIT_MACROS 1
30130
30131             /* Work if build is not clean.  */
30132             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30133
30134             #include <limits.h>
30135             #if HAVE_STDINT_H
30136              #include <stdint.h>
30137             #endif
30138
30139             #if defined INT64_MAX
30140              #define CONDITION (INT64_MAX == LONG_MAX)
30141             #else
30142              #define CONDITION (sizeof (long long int) == sizeof (long int))
30143             #endif
30144             int test[CONDITION ? 1 : -1];
30145 int
30146 main (void)
30147 {
30148
30149   ;
30150   return 0;
30151 }
30152 _ACEOF
30153 if ac_fn_c_try_compile "$LINENO"
30154 then :
30155   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
30156 else $as_nop
30157   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
30158 fi
30159 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30160 fi
30161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
30162 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
30163   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
30164     INT64_MAX_EQ_LONG_MAX=1;
30165   else
30166     INT64_MAX_EQ_LONG_MAX=0;
30167   fi
30168
30169
30170   else
30171     INT64_MAX_EQ_LONG_MAX=-1
30172   fi
30173
30174   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
30175 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
30176 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
30177 then :
30178   printf %s "(cached) " >&6
30179 else $as_nop
30180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181 /* end confdefs.h.  */
30182 /* Work also in C++ mode.  */
30183             #define __STDC_LIMIT_MACROS 1
30184
30185             /* Work if build is not clean.  */
30186             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30187
30188             #include <limits.h>
30189             #if HAVE_STDINT_H
30190              #include <stdint.h>
30191             #endif
30192
30193             #if defined UINT32_MAX && defined UINTMAX_MAX
30194              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
30195             #else
30196              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
30197             #endif
30198             int test[CONDITION ? 1 : -1];
30199 int
30200 main (void)
30201 {
30202
30203   ;
30204   return 0;
30205 }
30206 _ACEOF
30207 if ac_fn_c_try_compile "$LINENO"
30208 then :
30209   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
30210 else $as_nop
30211   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
30212 fi
30213 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30214 fi
30215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
30216 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
30217   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
30218     UINT32_MAX_LT_UINTMAX_MAX=1;
30219   else
30220     UINT32_MAX_LT_UINTMAX_MAX=0;
30221   fi
30222
30223
30224   if test $APPLE_UNIVERSAL_BUILD = 0; then
30225
30226   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
30227 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
30228 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
30229 then :
30230   printf %s "(cached) " >&6
30231 else $as_nop
30232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30233 /* end confdefs.h.  */
30234 /* Work also in C++ mode.  */
30235             #define __STDC_LIMIT_MACROS 1
30236
30237             /* Work if build is not clean.  */
30238             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30239
30240             #include <limits.h>
30241             #if HAVE_STDINT_H
30242              #include <stdint.h>
30243             #endif
30244
30245             #if defined UINT64_MAX
30246              #define CONDITION (UINT64_MAX == ULONG_MAX)
30247             #else
30248              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
30249             #endif
30250             int test[CONDITION ? 1 : -1];
30251 int
30252 main (void)
30253 {
30254
30255   ;
30256   return 0;
30257 }
30258 _ACEOF
30259 if ac_fn_c_try_compile "$LINENO"
30260 then :
30261   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
30262 else $as_nop
30263   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
30264 fi
30265 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30266 fi
30267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
30268 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
30269   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
30270     UINT64_MAX_EQ_ULONG_MAX=1;
30271   else
30272     UINT64_MAX_EQ_ULONG_MAX=0;
30273   fi
30274
30275
30276   else
30277     UINT64_MAX_EQ_ULONG_MAX=-1
30278   fi
30279
30280
30281
30282
30283   GL_M4_GNULIB_IOCTL=0
30284
30285
30286
30287
30288     HAVE_PSELECT=1;
30289   REPLACE_PSELECT=0;
30290   REPLACE_SELECT=0;
30291
30292
30293
30294
30295
30296   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
30297 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
30298 if test ${gl_cv_header_sys_select_h_selfcontained+y}
30299 then :
30300   printf %s "(cached) " >&6
30301 else $as_nop
30302
30303                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30304 /* end confdefs.h.  */
30305 #include <sys/select.h>
30306 int
30307 main (void)
30308 {
30309 struct timeval b;
30310   ;
30311   return 0;
30312 }
30313 _ACEOF
30314 if ac_fn_c_try_compile "$LINENO"
30315 then :
30316   gl_cv_header_sys_select_h_selfcontained=yes
30317 else $as_nop
30318   gl_cv_header_sys_select_h_selfcontained=no
30319 fi
30320 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30321                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
30322         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323 /* end confdefs.h.  */
30324 #include <sys/select.h>
30325 int
30326 main (void)
30327 {
30328 int memset; int bzero;
30329   ;
30330   return 0;
30331 }
30332
30333 _ACEOF
30334 if ac_fn_c_try_compile "$LINENO"
30335 then :
30336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30337 /* end confdefs.h.  */
30338 #include <sys/select.h>
30339 int
30340 main (void)
30341 {
30342
30343                   #undef memset
30344                   #define memset nonexistent_memset
30345                   extern
30346                   #ifdef __cplusplus
30347                   "C"
30348                   #endif
30349                   void *memset (void *, int, unsigned long);
30350                   #undef bzero
30351                   #define bzero nonexistent_bzero
30352                   extern
30353                   #ifdef __cplusplus
30354                   "C"
30355                   #endif
30356                   void bzero (void *, unsigned long);
30357                   fd_set fds;
30358                   FD_ZERO (&fds);
30359
30360   ;
30361   return 0;
30362 }
30363
30364 _ACEOF
30365 if ac_fn_c_try_link "$LINENO"
30366 then :
30367
30368 else $as_nop
30369   gl_cv_header_sys_select_h_selfcontained=no
30370 fi
30371 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30372     conftest$ac_exeext conftest.$ac_ext
30373
30374 fi
30375 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30376       fi
30377
30378 fi
30379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
30380 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390      if test $gl_cv_have_include_next = yes; then
30391        gl_cv_next_sys_select_h='<'sys/select.h'>'
30392      else
30393        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
30394 printf %s "checking absolute name of <sys/select.h>... " >&6; }
30395 if test ${gl_cv_next_sys_select_h+y}
30396 then :
30397   printf %s "(cached) " >&6
30398 else $as_nop
30399
30400              if test $ac_cv_header_sys_select_h = yes; then
30401
30402
30403
30404
30405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30406 /* end confdefs.h.  */
30407 #include <sys/select.h>
30408 _ACEOF
30409                 case "$host_os" in
30410     aix*) gl_absname_cpp="$ac_cpp -C" ;;
30411     *)    gl_absname_cpp="$ac_cpp" ;;
30412   esac
30413
30414   case "$host_os" in
30415     mingw*)
30416                                           gl_dirsep_regex='[/\\]'
30417       ;;
30418     *)
30419       gl_dirsep_regex='\/'
30420       ;;
30421   esac
30422       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30423   gl_header_literal_regex=`echo 'sys/select.h' \
30424                            | sed -e "$gl_make_literal_regex_sed"`
30425   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30426       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30427       s|^/[^/]|//&|
30428       p
30429       q
30430     }'
30431
30432         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30433   sed -n "$gl_absolute_header_sed"`
30434
30435            gl_header=$gl_cv_absolute_sys_select_h
30436            gl_cv_next_sys_select_h='"'$gl_header'"'
30437           else
30438                gl_cv_next_sys_select_h='<'sys/select.h'>'
30439              fi
30440
30441
30442 fi
30443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
30444 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
30445      fi
30446      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
30447
30448      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30449        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30450        gl_next_as_first_directive='<'sys/select.h'>'
30451      else
30452        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30453        gl_next_as_first_directive=$gl_cv_next_sys_select_h
30454      fi
30455      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
30456
30457
30458
30459
30460   if test $ac_cv_header_sys_select_h = yes; then
30461     HAVE_SYS_SELECT_H=1
30462   else
30463     HAVE_SYS_SELECT_H=0
30464   fi
30465
30466
30467
30468
30469
30470   if test $ac_cv_header_sys_socket_h != yes; then
30471                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30472 if test "x$ac_cv_header_winsock2_h" = xyes
30473 then :
30474   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
30475
30476 fi
30477
30478   fi
30479   if test "$ac_cv_header_winsock2_h" = yes; then
30480     HAVE_WINSOCK2_H=1
30481     UNISTD_H_HAVE_WINSOCK2_H=1
30482     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30483   else
30484     HAVE_WINSOCK2_H=0
30485   fi
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496   if test $ac_cv_header_sys_socket_h != yes; then
30497                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30498 if test "x$ac_cv_header_winsock2_h" = xyes
30499 then :
30500   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
30501
30502 fi
30503
30504   fi
30505   if test "$ac_cv_header_winsock2_h" = yes; then
30506     HAVE_WINSOCK2_H=1
30507     UNISTD_H_HAVE_WINSOCK2_H=1
30508     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30509   else
30510     HAVE_WINSOCK2_H=0
30511   fi
30512
30513    LIBSOCKET=
30514   if test $HAVE_WINSOCK2_H = 1; then
30515                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
30516 printf %s "checking for WSAStartup... " >&6; }
30517 if test ${gl_cv_func_wsastartup+y}
30518 then :
30519   printf %s "(cached) " >&6
30520 else $as_nop
30521
30522        gl_save_LIBS="$LIBS"
30523        LIBS="$LIBS -lws2_32"
30524        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30525 /* end confdefs.h.  */
30526
30527 #ifdef HAVE_WINSOCK2_H
30528 # include <winsock2.h>
30529 #endif
30530 int
30531 main (void)
30532 {
30533
30534             WORD wVersionRequested = MAKEWORD(1, 1);
30535             WSADATA wsaData;
30536             int err = WSAStartup(wVersionRequested, &wsaData);
30537             WSACleanup ();
30538
30539   ;
30540   return 0;
30541 }
30542
30543 _ACEOF
30544 if ac_fn_c_try_link "$LINENO"
30545 then :
30546   gl_cv_func_wsastartup=yes
30547 else $as_nop
30548   gl_cv_func_wsastartup=no
30549 fi
30550 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30551     conftest$ac_exeext conftest.$ac_ext
30552        LIBS="$gl_save_LIBS"
30553
30554 fi
30555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
30556 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
30557     if test "$gl_cv_func_wsastartup" = "yes"; then
30558
30559 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
30560
30561       LIBSOCKET='-lws2_32'
30562     fi
30563   else
30564                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
30565 printf %s "checking for library containing setsockopt... " >&6; }
30566 if test ${gl_cv_lib_socket+y}
30567 then :
30568   printf %s "(cached) " >&6
30569 else $as_nop
30570
30571       gl_cv_lib_socket=
30572       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30573 /* end confdefs.h.  */
30574 extern
30575 #ifdef __cplusplus
30576 "C"
30577 #endif
30578 char setsockopt();
30579 int
30580 main (void)
30581 {
30582 setsockopt();
30583   ;
30584   return 0;
30585 }
30586 _ACEOF
30587 if ac_fn_c_try_link "$LINENO"
30588 then :
30589
30590 else $as_nop
30591   gl_save_LIBS="$LIBS"
30592          LIBS="$gl_save_LIBS -lsocket"
30593          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30594 /* end confdefs.h.  */
30595 extern
30596 #ifdef __cplusplus
30597 "C"
30598 #endif
30599 char setsockopt();
30600 int
30601 main (void)
30602 {
30603 setsockopt();
30604   ;
30605   return 0;
30606 }
30607 _ACEOF
30608 if ac_fn_c_try_link "$LINENO"
30609 then :
30610   gl_cv_lib_socket="-lsocket"
30611 fi
30612 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30613     conftest$ac_exeext conftest.$ac_ext
30614          if test -z "$gl_cv_lib_socket"; then
30615            LIBS="$gl_save_LIBS -lnetwork"
30616            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30617 /* end confdefs.h.  */
30618 extern
30619 #ifdef __cplusplus
30620 "C"
30621 #endif
30622 char setsockopt();
30623 int
30624 main (void)
30625 {
30626 setsockopt();
30627   ;
30628   return 0;
30629 }
30630 _ACEOF
30631 if ac_fn_c_try_link "$LINENO"
30632 then :
30633   gl_cv_lib_socket="-lnetwork"
30634 fi
30635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30636     conftest$ac_exeext conftest.$ac_ext
30637            if test -z "$gl_cv_lib_socket"; then
30638              LIBS="$gl_save_LIBS -lnet"
30639              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30640 /* end confdefs.h.  */
30641 extern
30642 #ifdef __cplusplus
30643 "C"
30644 #endif
30645 char setsockopt();
30646 int
30647 main (void)
30648 {
30649 setsockopt();
30650   ;
30651   return 0;
30652 }
30653 _ACEOF
30654 if ac_fn_c_try_link "$LINENO"
30655 then :
30656   gl_cv_lib_socket="-lnet"
30657 fi
30658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30659     conftest$ac_exeext conftest.$ac_ext
30660            fi
30661          fi
30662          LIBS="$gl_save_LIBS"
30663
30664 fi
30665 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30666     conftest$ac_exeext conftest.$ac_ext
30667       if test -z "$gl_cv_lib_socket"; then
30668         gl_cv_lib_socket="none needed"
30669       fi
30670
30671 fi
30672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
30673 printf "%s\n" "$gl_cv_lib_socket" >&6; }
30674     if test "$gl_cv_lib_socket" != "none needed"; then
30675       LIBSOCKET="$gl_cv_lib_socket"
30676     fi
30677   fi
30678
30679
30680
30681
30682
30683
30684   :
30685
30686
30687
30688
30689
30690
30691   if test "$ac_cv_header_winsock2_h" = yes; then
30692     REPLACE_SELECT=1
30693   else
30694
30695     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
30696 printf %s "checking whether select supports a 0 argument... " >&6; }
30697 if test ${gl_cv_func_select_supports0+y}
30698 then :
30699   printf %s "(cached) " >&6
30700 else $as_nop
30701
30702         if test "$cross_compiling" = yes
30703 then :
30704
30705            case "$host_os" in
30706                        # Guess no on Interix.
30707              interix*) gl_cv_func_select_supports0="guessing no";;
30708                        # Guess yes otherwise.
30709              *)        gl_cv_func_select_supports0="guessing yes";;
30710            esac
30711
30712 else $as_nop
30713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30714 /* end confdefs.h.  */
30715
30716 #include <sys/types.h>
30717 #include <sys/time.h>
30718 #if HAVE_SYS_SELECT_H
30719 #include <sys/select.h>
30720 #endif
30721 int main ()
30722 {
30723   struct timeval timeout;
30724   timeout.tv_sec = 0;
30725   timeout.tv_usec = 5;
30726   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
30727 }
30728 _ACEOF
30729 if ac_fn_c_try_run "$LINENO"
30730 then :
30731   gl_cv_func_select_supports0=yes
30732 else $as_nop
30733   gl_cv_func_select_supports0=no
30734 fi
30735 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30736   conftest.$ac_objext conftest.beam conftest.$ac_ext
30737 fi
30738
30739
30740 fi
30741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
30742 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
30743     case "$gl_cv_func_select_supports0" in
30744       *yes) ;;
30745       *) REPLACE_SELECT=1 ;;
30746     esac
30747
30748         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
30749 printf %s "checking whether select detects invalid fds... " >&6; }
30750 if test ${gl_cv_func_select_detects_ebadf+y}
30751 then :
30752   printf %s "(cached) " >&6
30753 else $as_nop
30754
30755         if test "$cross_compiling" = yes
30756 then :
30757
30758            case "$host_os" in
30759                              # Guess yes on Linux systems.
30760             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
30761                              # Guess yes on glibc systems.
30762             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
30763                              # If we don't know, obey --enable-cross-guesses.
30764             *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
30765            esac
30766
30767 else $as_nop
30768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769 /* end confdefs.h.  */
30770
30771 #include <sys/types.h>
30772 #include <sys/time.h>
30773 #if HAVE_SYS_SELECT_H
30774 # include <sys/select.h>
30775 #endif
30776 #include <unistd.h>
30777 #include <errno.h>
30778
30779
30780 $gl_mda_defines
30781
30782 int
30783 main (void)
30784 {
30785
30786   fd_set set;
30787   dup2(0, 16);
30788   FD_ZERO(&set);
30789   FD_SET(16, &set);
30790   close(16);
30791   struct timeval timeout;
30792   timeout.tv_sec = 0;
30793   timeout.tv_usec = 5;
30794   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
30795
30796   ;
30797   return 0;
30798 }
30799 _ACEOF
30800 if ac_fn_c_try_run "$LINENO"
30801 then :
30802   gl_cv_func_select_detects_ebadf=yes
30803 else $as_nop
30804   gl_cv_func_select_detects_ebadf=no
30805 fi
30806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30807   conftest.$ac_objext conftest.beam conftest.$ac_ext
30808 fi
30809
30810
30811 fi
30812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
30813 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
30814     case $gl_cv_func_select_detects_ebadf in
30815       *yes) ;;
30816       *) REPLACE_SELECT=1 ;;
30817     esac
30818   fi
30819
30820     LIB_SELECT="$LIBSOCKET"
30821   if test $REPLACE_SELECT = 1; then
30822     case "$host_os" in
30823       mingw*)
30824                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30825 /* end confdefs.h.  */
30826
30827 #define WIN32_LEAN_AND_MEAN
30828 #include <windows.h>
30829 int
30830 main ()
30831 {
30832   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
30833   return 0;
30834 }
30835 _ACEOF
30836 if ac_fn_c_try_link "$LINENO"
30837 then :
30838
30839 else $as_nop
30840   LIB_SELECT="$LIB_SELECT -luser32"
30841 fi
30842 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30843     conftest$ac_exeext conftest.$ac_ext
30844         ;;
30845     esac
30846   fi
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856   if test $ac_cv_have_decl_strerror_r = no; then
30857     HAVE_DECL_STRERROR_R=0
30858   fi
30859
30860   if test $ac_cv_func_strerror_r = yes; then
30861     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30862       if test $gl_cv_func_strerror_r_posix_signature = yes; then
30863         case "$gl_cv_func_strerror_r_works" in
30864                     *no) REPLACE_STRERROR_R=1 ;;
30865         esac
30866       else
30867                 REPLACE_STRERROR_R=1
30868       fi
30869     else
30870                   REPLACE_STRERROR_R=1
30871     fi
30872   fi
30873
30874
30875     HAVE_PTHREAD_T=1;
30876   HAVE_PTHREAD_SPINLOCK_T=1;
30877   HAVE_PTHREAD_CREATE_DETACHED=1;
30878   HAVE_PTHREAD_MUTEX_RECURSIVE=1;
30879   HAVE_PTHREAD_MUTEX_ROBUST=1;
30880   HAVE_PTHREAD_PROCESS_SHARED=1;
30881   HAVE_PTHREAD_CREATE=1;
30882   HAVE_PTHREAD_ATTR_INIT=1;
30883   HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
30884   HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
30885   HAVE_PTHREAD_ATTR_DESTROY=1;
30886   HAVE_PTHREAD_SELF=1;
30887   HAVE_PTHREAD_EQUAL=1;
30888   HAVE_PTHREAD_DETACH=1;
30889   HAVE_PTHREAD_JOIN=1;
30890   HAVE_PTHREAD_EXIT=1;
30891   HAVE_PTHREAD_ONCE=1;
30892   HAVE_PTHREAD_MUTEX_INIT=1;
30893   HAVE_PTHREAD_MUTEXATTR_INIT=1;
30894   HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
30895   HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
30896   HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
30897   HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
30898   HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
30899   HAVE_PTHREAD_MUTEX_LOCK=1;
30900   HAVE_PTHREAD_MUTEX_TRYLOCK=1;
30901   HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
30902   HAVE_PTHREAD_MUTEX_UNLOCK=1;
30903   HAVE_PTHREAD_MUTEX_DESTROY=1;
30904   HAVE_PTHREAD_RWLOCK_INIT=1;
30905   HAVE_PTHREAD_RWLOCKATTR_INIT=1;
30906   HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
30907   HAVE_PTHREAD_RWLOCK_RDLOCK=1;
30908   HAVE_PTHREAD_RWLOCK_WRLOCK=1;
30909   HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
30910   HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
30911   HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
30912   HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
30913   HAVE_PTHREAD_RWLOCK_UNLOCK=1;
30914   HAVE_PTHREAD_RWLOCK_DESTROY=1;
30915   HAVE_PTHREAD_COND_INIT=1;
30916   HAVE_PTHREAD_CONDATTR_INIT=1;
30917   HAVE_PTHREAD_CONDATTR_DESTROY=1;
30918   HAVE_PTHREAD_COND_WAIT=1;
30919   HAVE_PTHREAD_COND_TIMEDWAIT=1;
30920   HAVE_PTHREAD_COND_SIGNAL=1;
30921   HAVE_PTHREAD_COND_BROADCAST=1;
30922   HAVE_PTHREAD_COND_DESTROY=1;
30923   HAVE_PTHREAD_KEY_CREATE=1;
30924   HAVE_PTHREAD_SETSPECIFIC=1;
30925   HAVE_PTHREAD_GETSPECIFIC=1;
30926   HAVE_PTHREAD_KEY_DELETE=1;
30927   HAVE_PTHREAD_SPIN_INIT=1;
30928   HAVE_PTHREAD_SPIN_LOCK=1;
30929   HAVE_PTHREAD_SPIN_TRYLOCK=1;
30930   HAVE_PTHREAD_SPIN_UNLOCK=1;
30931   HAVE_PTHREAD_SPIN_DESTROY=1;
30932   REPLACE_PTHREAD_CREATE=0;
30933   REPLACE_PTHREAD_ATTR_INIT=0;
30934   REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
30935   REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
30936   REPLACE_PTHREAD_ATTR_DESTROY=0;
30937   REPLACE_PTHREAD_SELF=0;
30938   REPLACE_PTHREAD_EQUAL=0;
30939   REPLACE_PTHREAD_DETACH=0;
30940   REPLACE_PTHREAD_JOIN=0;
30941   REPLACE_PTHREAD_EXIT=0;
30942   REPLACE_PTHREAD_ONCE=0;
30943   REPLACE_PTHREAD_MUTEX_INIT=0;
30944   REPLACE_PTHREAD_MUTEXATTR_INIT=0;
30945   REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
30946   REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
30947   REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
30948   REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
30949   REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
30950   REPLACE_PTHREAD_MUTEX_LOCK=0;
30951   REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
30952   REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
30953   REPLACE_PTHREAD_MUTEX_UNLOCK=0;
30954   REPLACE_PTHREAD_MUTEX_DESTROY=0;
30955   REPLACE_PTHREAD_RWLOCK_INIT=0;
30956   REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
30957   REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
30958   REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
30959   REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
30960   REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
30961   REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
30962   REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
30963   REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
30964   REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
30965   REPLACE_PTHREAD_RWLOCK_DESTROY=0;
30966   REPLACE_PTHREAD_COND_INIT=0;
30967   REPLACE_PTHREAD_CONDATTR_INIT=0;
30968   REPLACE_PTHREAD_CONDATTR_DESTROY=0;
30969   REPLACE_PTHREAD_COND_WAIT=0;
30970   REPLACE_PTHREAD_COND_TIMEDWAIT=0;
30971   REPLACE_PTHREAD_COND_SIGNAL=0;
30972   REPLACE_PTHREAD_COND_BROADCAST=0;
30973   REPLACE_PTHREAD_COND_DESTROY=0;
30974   REPLACE_PTHREAD_KEY_CREATE=0;
30975   REPLACE_PTHREAD_SETSPECIFIC=0;
30976   REPLACE_PTHREAD_GETSPECIFIC=0;
30977   REPLACE_PTHREAD_KEY_DELETE=0;
30978   REPLACE_PTHREAD_SPIN_INIT=0;
30979   REPLACE_PTHREAD_SPIN_LOCK=0;
30980   REPLACE_PTHREAD_SPIN_TRYLOCK=0;
30981   REPLACE_PTHREAD_SPIN_UNLOCK=0;
30982   REPLACE_PTHREAD_SPIN_DESTROY=0;
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999      if test $gl_cv_have_include_next = yes; then
31000        gl_cv_next_pthread_h='<'pthread.h'>'
31001      else
31002        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
31003 printf %s "checking absolute name of <pthread.h>... " >&6; }
31004 if test ${gl_cv_next_pthread_h+y}
31005 then :
31006   printf %s "(cached) " >&6
31007 else $as_nop
31008
31009              if test $ac_cv_header_pthread_h = yes; then
31010
31011
31012
31013
31014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31015 /* end confdefs.h.  */
31016 #include <pthread.h>
31017 _ACEOF
31018                 case "$host_os" in
31019     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31020     *)    gl_absname_cpp="$ac_cpp" ;;
31021   esac
31022
31023   case "$host_os" in
31024     mingw*)
31025                                           gl_dirsep_regex='[/\\]'
31026       ;;
31027     *)
31028       gl_dirsep_regex='\/'
31029       ;;
31030   esac
31031       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31032   gl_header_literal_regex=`echo 'pthread.h' \
31033                            | sed -e "$gl_make_literal_regex_sed"`
31034   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31035       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31036       s|^/[^/]|//&|
31037       p
31038       q
31039     }'
31040
31041         gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31042   sed -n "$gl_absolute_header_sed"`
31043
31044            gl_header=$gl_cv_absolute_pthread_h
31045            gl_cv_next_pthread_h='"'$gl_header'"'
31046           else
31047                gl_cv_next_pthread_h='<'pthread.h'>'
31048              fi
31049
31050
31051 fi
31052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
31053 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
31054      fi
31055      NEXT_PTHREAD_H=$gl_cv_next_pthread_h
31056
31057      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31058        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31059        gl_next_as_first_directive='<'pthread.h'>'
31060      else
31061        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31062        gl_next_as_first_directive=$gl_cv_next_pthread_h
31063      fi
31064      NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
31065
31066
31067
31068
31069   if test $ac_cv_header_pthread_h = yes; then
31070     HAVE_PTHREAD_H=1
31071
31072
31073       if { case "$host_os" in mingw*) true;; *) false;; esac; } \
31074          && test $gl_threads_api = windows; then
31075         HAVE_PTHREAD_H=0
31076       fi
31077
31078   else
31079     HAVE_PTHREAD_H=0
31080   fi
31081
31082
31083   ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
31084      #if HAVE_PTHREAD_H
31085       #include <pthread.h>
31086      #endif
31087 "
31088 if test "x$ac_cv_type_pthread_t" = xyes
31089 then :
31090
31091 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
31092
31093
31094 fi
31095 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
31096      #if HAVE_PTHREAD_H
31097       #include <pthread.h>
31098      #endif
31099 "
31100 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
31101 then :
31102
31103 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
31104
31105
31106 fi
31107
31108   if test $ac_cv_type_pthread_t != yes; then
31109     HAVE_PTHREAD_T=0
31110   fi
31111   if test $ac_cv_type_pthread_spinlock_t != yes; then
31112     HAVE_PTHREAD_SPINLOCK_T=0
31113   fi
31114
31115
31116   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
31117 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
31118 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
31119 then :
31120   printf %s "(cached) " >&6
31121 else $as_nop
31122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31123 /* end confdefs.h.  */
31124 #include <pthread.h>
31125             int x = PTHREAD_CREATE_DETACHED;
31126
31127 int
31128 main (void)
31129 {
31130
31131   ;
31132   return 0;
31133 }
31134 _ACEOF
31135 if ac_fn_c_try_compile "$LINENO"
31136 then :
31137   gl_cv_const_PTHREAD_CREATE_DETACHED=yes
31138 else $as_nop
31139   gl_cv_const_PTHREAD_CREATE_DETACHED=no
31140 fi
31141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31142
31143 fi
31144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
31145 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
31146   if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
31147     HAVE_PTHREAD_CREATE_DETACHED=0
31148   fi
31149
31150   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
31151 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
31152 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
31153 then :
31154   printf %s "(cached) " >&6
31155 else $as_nop
31156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31157 /* end confdefs.h.  */
31158 #include <pthread.h>
31159             int x = PTHREAD_MUTEX_RECURSIVE;
31160
31161 int
31162 main (void)
31163 {
31164
31165   ;
31166   return 0;
31167 }
31168 _ACEOF
31169 if ac_fn_c_try_compile "$LINENO"
31170 then :
31171   gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
31172 else $as_nop
31173   gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
31174 fi
31175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31176
31177 fi
31178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
31179 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
31180   if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
31181     HAVE_PTHREAD_MUTEX_RECURSIVE=0
31182   fi
31183
31184   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
31185 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
31186 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
31187 then :
31188   printf %s "(cached) " >&6
31189 else $as_nop
31190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31191 /* end confdefs.h.  */
31192 #include <pthread.h>
31193             int x = PTHREAD_MUTEX_ROBUST;
31194
31195 int
31196 main (void)
31197 {
31198
31199   ;
31200   return 0;
31201 }
31202 _ACEOF
31203 if ac_fn_c_try_compile "$LINENO"
31204 then :
31205   gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
31206 else $as_nop
31207   gl_cv_const_PTHREAD_MUTEX_ROBUST=no
31208 fi
31209 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31210
31211 fi
31212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
31213 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
31214   if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
31215     HAVE_PTHREAD_MUTEX_ROBUST=0
31216   fi
31217
31218   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
31219 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
31220 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
31221 then :
31222   printf %s "(cached) " >&6
31223 else $as_nop
31224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31225 /* end confdefs.h.  */
31226 #include <pthread.h>
31227             int x = PTHREAD_PROCESS_SHARED;
31228
31229 int
31230 main (void)
31231 {
31232
31233   ;
31234   return 0;
31235 }
31236 _ACEOF
31237 if ac_fn_c_try_compile "$LINENO"
31238 then :
31239   gl_cv_const_PTHREAD_PROCESS_SHARED=yes
31240 else $as_nop
31241   gl_cv_const_PTHREAD_PROCESS_SHARED=no
31242 fi
31243 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31244
31245 fi
31246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
31247 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
31248   if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
31249     HAVE_PTHREAD_PROCESS_SHARED=0
31250   fi
31251
31252
31253
31254
31255
31256     LIB_PTHREAD="$LIBPMULTITHREAD"
31257
31258
31259
31260
31261   GL_M4_GNULIB_PTHREAD_THREAD=0
31262
31263
31264
31265   GL_M4_GNULIB_PTHREAD_ONCE=0
31266
31267
31268
31269   GL_M4_GNULIB_PTHREAD_MUTEX=0
31270
31271
31272
31273   GL_M4_GNULIB_PTHREAD_RWLOCK=0
31274
31275
31276
31277   GL_M4_GNULIB_PTHREAD_COND=0
31278
31279
31280
31281   GL_M4_GNULIB_PTHREAD_TSS=0
31282
31283
31284
31285   GL_M4_GNULIB_PTHREAD_SPIN=0
31286
31287
31288
31289   GL_M4_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
31290
31291
31292
31293
31294
31295
31296   GL_M4_GNULIB_PSELECT=0
31297
31298
31299
31300   GL_M4_GNULIB_SELECT=0
31301
31302
31303
31304 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31305 if test "x$ac_cv_have_decl_setenv" = xyes
31306 then :
31307   ac_have_decl=1
31308 else $as_nop
31309   ac_have_decl=0
31310 fi
31311 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
31312
31313
31314
31315
31316
31317   if test $ac_cv_have_decl_setenv = no; then
31318     HAVE_DECL_SETENV=0
31319   fi
31320
31321
31322
31323
31324
31325   ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
31326 if test "x$ac_cv_header_search_h" = xyes
31327 then :
31328   printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
31329
31330 fi
31331
31332   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
31333 if test "x$ac_cv_func_tsearch" = xyes
31334 then :
31335   printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
31336
31337 fi
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348   if test $ac_cv_header_sys_ioctl_h = yes; then
31349     HAVE_SYS_IOCTL_H=1
31350             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
31351 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
31352 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
31353 then :
31354   printf %s "(cached) " >&6
31355 else $as_nop
31356          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31357 /* end confdefs.h.  */
31358 #include <sys/ioctl.h>
31359 int
31360 main (void)
31361 {
31362 (void) ioctl;
31363   ;
31364   return 0;
31365 }
31366 _ACEOF
31367 if ac_fn_c_try_compile "$LINENO"
31368 then :
31369   gl_cv_decl_ioctl_in_sys_ioctl_h=yes
31370 else $as_nop
31371   gl_cv_decl_ioctl_in_sys_ioctl_h=no
31372 fi
31373 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31374
31375 fi
31376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
31377 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
31378   else
31379     HAVE_SYS_IOCTL_H=0
31380   fi
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391      if test $gl_cv_have_include_next = yes; then
31392        gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
31393      else
31394        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
31395 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
31396 if test ${gl_cv_next_sys_ioctl_h+y}
31397 then :
31398   printf %s "(cached) " >&6
31399 else $as_nop
31400
31401              if test $ac_cv_header_sys_ioctl_h = yes; then
31402
31403
31404
31405
31406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31407 /* end confdefs.h.  */
31408 #include <sys/ioctl.h>
31409 _ACEOF
31410                 case "$host_os" in
31411     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31412     *)    gl_absname_cpp="$ac_cpp" ;;
31413   esac
31414
31415   case "$host_os" in
31416     mingw*)
31417                                           gl_dirsep_regex='[/\\]'
31418       ;;
31419     *)
31420       gl_dirsep_regex='\/'
31421       ;;
31422   esac
31423       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31424   gl_header_literal_regex=`echo 'sys/ioctl.h' \
31425                            | sed -e "$gl_make_literal_regex_sed"`
31426   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31427       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31428       s|^/[^/]|//&|
31429       p
31430       q
31431     }'
31432
31433         gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31434   sed -n "$gl_absolute_header_sed"`
31435
31436            gl_header=$gl_cv_absolute_sys_ioctl_h
31437            gl_cv_next_sys_ioctl_h='"'$gl_header'"'
31438           else
31439                gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
31440              fi
31441
31442
31443 fi
31444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
31445 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
31446      fi
31447      NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
31448
31449      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31450        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31451        gl_next_as_first_directive='<'sys/ioctl.h'>'
31452      else
31453        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31454        gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
31455      fi
31456      NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479      if test $gl_cv_have_include_next = yes; then
31480        gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31481      else
31482        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
31483 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
31484 if test ${gl_cv_next_sys_uio_h+y}
31485 then :
31486   printf %s "(cached) " >&6
31487 else $as_nop
31488
31489              if test $ac_cv_header_sys_uio_h = yes; then
31490
31491
31492
31493
31494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31495 /* end confdefs.h.  */
31496 #include <sys/uio.h>
31497 _ACEOF
31498                 case "$host_os" in
31499     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31500     *)    gl_absname_cpp="$ac_cpp" ;;
31501   esac
31502
31503   case "$host_os" in
31504     mingw*)
31505                                           gl_dirsep_regex='[/\\]'
31506       ;;
31507     *)
31508       gl_dirsep_regex='\/'
31509       ;;
31510   esac
31511       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31512   gl_header_literal_regex=`echo 'sys/uio.h' \
31513                            | sed -e "$gl_make_literal_regex_sed"`
31514   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31515       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31516       s|^/[^/]|//&|
31517       p
31518       q
31519     }'
31520
31521         gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31522   sed -n "$gl_absolute_header_sed"`
31523
31524            gl_header=$gl_cv_absolute_sys_uio_h
31525            gl_cv_next_sys_uio_h='"'$gl_header'"'
31526           else
31527                gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31528              fi
31529
31530
31531 fi
31532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
31533 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
31534      fi
31535      NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
31536
31537      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31538        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31539        gl_next_as_first_directive='<'sys/uio.h'>'
31540      else
31541        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31542        gl_next_as_first_directive=$gl_cv_next_sys_uio_h
31543      fi
31544      NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
31545
31546
31547
31548
31549   if test $ac_cv_header_sys_uio_h = yes; then
31550     HAVE_SYS_UIO_H=1
31551   else
31552     HAVE_SYS_UIO_H=0
31553   fi
31554
31555
31556
31557
31558 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31559 if test "x$ac_cv_have_decl_unsetenv" = xyes
31560 then :
31561   ac_have_decl=1
31562 else $as_nop
31563   ac_have_decl=0
31564 fi
31565 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
31566
31567
31568
31569
31570
31571
31572
31573
31574   if test $gl_threads_api = posix; then
31575     YIELD_LIB="$LIB_SCHED_YIELD"
31576   else
31577     YIELD_LIB=
31578   fi
31579
31580
31581
31582    if false; then
31583   GL_COND_LIBTOOL_TRUE=
31584   GL_COND_LIBTOOL_FALSE='#'
31585 else
31586   GL_COND_LIBTOOL_TRUE='#'
31587   GL_COND_LIBTOOL_FALSE=
31588 fi
31589
31590   gl_cond_libtool=false
31591   gl_libdeps=
31592   gl_ltlibdeps=
31593   gl_m4_base='m4'
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606   gl_source_base='lib'
31607
31608
31609
31610       case "$host_os" in
31611     mingw*) REPLACE_ACCESS=1 ;;
31612   esac
31613
31614   if test $REPLACE_ACCESS = 1; then
31615
31616
31617
31618
31619
31620
31621
31622
31623   M4_LIBOBJS="$M4_LIBOBJS access.$ac_objext"
31624
31625   fi
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635           GL_M4_GNULIB_ACCESS=1
31636
31637
31638
31639
31640
31641 printf "%s\n" "#define GNULIB_TEST_ACCESS 1" >>confdefs.h
31642
31643
31644
31645
31646
31647   if test $ac_cv_func_alloca_works = no; then
31648     :
31649   fi
31650
31651   # Define an additional variable used in the Makefile substitution.
31652   if test $ac_cv_working_alloca_h = yes; then
31653     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
31654 printf %s "checking for alloca as a compiler built-in... " >&6; }
31655 if test ${gl_cv_rpl_alloca+y}
31656 then :
31657   printf %s "(cached) " >&6
31658 else $as_nop
31659
31660       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31661 /* end confdefs.h.  */
31662
31663 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
31664         Need own alloca
31665 #endif
31666
31667 _ACEOF
31668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31669   $EGREP "Need own alloca" >/dev/null 2>&1
31670 then :
31671   gl_cv_rpl_alloca=yes
31672 else $as_nop
31673   gl_cv_rpl_alloca=no
31674 fi
31675 rm -rf conftest*
31676
31677
31678 fi
31679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
31680 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
31681     if test $gl_cv_rpl_alloca = yes; then
31682
31683 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
31684
31685       ALLOCA_H=alloca.h
31686     else
31687                   ALLOCA_H=
31688     fi
31689   else
31690     ALLOCA_H=alloca.h
31691   fi
31692
31693    if test -n "$ALLOCA_H"; then
31694   GL_GENERATE_ALLOCA_H_TRUE=
31695   GL_GENERATE_ALLOCA_H_FALSE='#'
31696 else
31697   GL_GENERATE_ALLOCA_H_TRUE='#'
31698   GL_GENERATE_ALLOCA_H_FALSE=
31699 fi
31700
31701
31702   if test $ac_cv_working_alloca_h = yes; then
31703     HAVE_ALLOCA_H=1
31704   else
31705     HAVE_ALLOCA_H=0
31706   fi
31707
31708
31709
31710   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
31711 printf %s "checking whether to enable assertions... " >&6; }
31712   # Check whether --enable-assert was given.
31713 if test ${enable_assert+y}
31714 then :
31715   enableval=$enable_assert; if test "x$enableval" = xno
31716 then :
31717
31718 printf "%s\n" "#define NDEBUG 1" >>confdefs.h
31719
31720 elif test "x$enableval" != xyes
31721 then :
31722   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
31723 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
31724       enable_assert=yes
31725 fi
31726 else $as_nop
31727   enable_assert=yes
31728 fi
31729
31730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
31731 printf "%s\n" "$enable_assert" >&6; }
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743   if test $ac_cv_func_btowc = no; then
31744     HAVE_BTOWC=0
31745   else
31746
31747
31748
31749
31750         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
31751 printf %s "checking whether btowc(0) is correct... " >&6; }
31752 if test ${gl_cv_func_btowc_nul+y}
31753 then :
31754   printf %s "(cached) " >&6
31755 else $as_nop
31756
31757         if test "$cross_compiling" = yes
31758 then :
31759
31760            case "$host_os" in
31761                       # Guess no on Cygwin.
31762              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
31763                       # Guess yes on native Windows.
31764              mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
31765                       # Guess yes otherwise.
31766              *)       gl_cv_func_btowc_nul="guessing yes" ;;
31767            esac
31768
31769 else $as_nop
31770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31771 /* end confdefs.h.  */
31772
31773 #include <wchar.h>
31774 int main ()
31775 {
31776   if (btowc ('\0') != 0)
31777     return 1;
31778   return 0;
31779 }
31780 _ACEOF
31781 if ac_fn_c_try_run "$LINENO"
31782 then :
31783   gl_cv_func_btowc_nul=yes
31784 else $as_nop
31785   gl_cv_func_btowc_nul=no
31786 fi
31787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31788   conftest.$ac_objext conftest.beam conftest.$ac_ext
31789 fi
31790
31791
31792 fi
31793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
31794 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
31795
31796         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
31797 printf %s "checking whether btowc(EOF) is correct... " >&6; }
31798 if test ${gl_cv_func_btowc_eof+y}
31799 then :
31800   printf %s "(cached) " >&6
31801 else $as_nop
31802
31803                         case "$host_os" in
31804                   # Guess no on IRIX.
31805           irix*)  gl_cv_func_btowc_eof="guessing no" ;;
31806                   # Guess yes on native Windows.
31807           mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
31808                   # Guess yes otherwise.
31809           *)      gl_cv_func_btowc_eof="guessing yes" ;;
31810         esac
31811         if test $LOCALE_FR != none; then
31812           if test "$cross_compiling" = yes
31813 then :
31814   :
31815 else $as_nop
31816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31817 /* end confdefs.h.  */
31818
31819 #include <locale.h>
31820 #include <stdio.h>
31821 #include <wchar.h>
31822 int main ()
31823 {
31824   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31825     {
31826       if (btowc (EOF) != WEOF)
31827         return 1;
31828     }
31829   return 0;
31830 }
31831 _ACEOF
31832 if ac_fn_c_try_run "$LINENO"
31833 then :
31834   gl_cv_func_btowc_eof=yes
31835 else $as_nop
31836   gl_cv_func_btowc_eof=no
31837 fi
31838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31839   conftest.$ac_objext conftest.beam conftest.$ac_ext
31840 fi
31841
31842         fi
31843
31844 fi
31845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
31846 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
31847
31848     case "$gl_cv_func_btowc_nul" in
31849       *yes) ;;
31850       *) REPLACE_BTOWC=1 ;;
31851     esac
31852     case "$gl_cv_func_btowc_eof" in
31853       *yes) ;;
31854       *) REPLACE_BTOWC=1 ;;
31855     esac
31856   fi
31857
31858   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
31859
31860
31861
31862
31863
31864
31865
31866
31867   M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
31868
31869
31870   :
31871
31872   fi
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882           GL_M4_GNULIB_BTOWC=1
31883
31884
31885
31886
31887
31888 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
31889
31890
31891
31892
31893   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
31894 printf %s "checking for __builtin_expect... " >&6; }
31895 if test ${gl_cv___builtin_expect+y}
31896 then :
31897   printf %s "(cached) " >&6
31898 else $as_nop
31899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31900 /* end confdefs.h.  */
31901
31902          int
31903          main (int argc, char **argv)
31904          {
31905            argc = __builtin_expect (argc, 100);
31906            return argv[argc != 100][0];
31907          }
31908 _ACEOF
31909 if ac_fn_c_try_link "$LINENO"
31910 then :
31911   gl_cv___builtin_expect=yes
31912 else $as_nop
31913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31914 /* end confdefs.h.  */
31915
31916              #include <builtins.h>
31917              int
31918              main (int argc, char **argv)
31919              {
31920                argc = __builtin_expect (argc, 100);
31921                return argv[argc != 100][0];
31922              }
31923 _ACEOF
31924 if ac_fn_c_try_link "$LINENO"
31925 then :
31926   gl_cv___builtin_expect="in <builtins.h>"
31927 else $as_nop
31928   gl_cv___builtin_expect=no
31929 fi
31930 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31931     conftest$ac_exeext conftest.$ac_ext
31932 fi
31933 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31934     conftest$ac_exeext conftest.$ac_ext
31935 fi
31936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
31937 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
31938   if test "$gl_cv___builtin_expect" = yes; then
31939     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
31940
31941   elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
31942     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
31943
31944   fi
31945
31946
31947
31948     if test "$with_libsigsegv" = yes; then
31949     if test "$gl_cv_lib_sigsegv" = yes; then
31950       LIBCSTACK=$LIBSIGSEGV
31951
31952       LTLIBCSTACK=$LTLIBSIGSEGV
31953
31954     fi
31955   fi
31956
31957
31958
31959
31960   if test $REPLACE_CALLOC = 0; then
31961
31962      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
31963 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
31964 if test ${ac_cv_func_calloc_0_nonnull+y}
31965 then :
31966   printf %s "(cached) " >&6
31967 else $as_nop
31968   if test $cross_compiling != yes; then
31969        ac_cv_func_calloc_0_nonnull=yes
31970        if test "$cross_compiling" = yes
31971 then :
31972   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31973 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31974 as_fn_error $? "cannot run test program while cross compiling
31975 See \`config.log' for more details" "$LINENO" 5; }
31976 else $as_nop
31977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31978 /* end confdefs.h.  */
31979 $ac_includes_default
31980 int
31981 main (void)
31982 {
31983 int result = 0;
31984               char * volatile p = calloc (0, 0);
31985               if (!p)
31986                 result |= 1;
31987               free (p);
31988               return result;
31989
31990   ;
31991   return 0;
31992 }
31993 _ACEOF
31994 if ac_fn_c_try_run "$LINENO"
31995 then :
31996
31997 else $as_nop
31998   ac_cv_func_calloc_0_nonnull=no
31999 fi
32000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32001   conftest.$ac_objext conftest.beam conftest.$ac_ext
32002 fi
32003
32004      else
32005        case "$host_os" in
32006                         # Guess yes on glibc systems.
32007          *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32008                         # Guess yes on musl systems.
32009          *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32010                         # Guess yes on native Windows.
32011          mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32012                         # If we don't know, obey --enable-cross-guesses.
32013          *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
32014        esac
32015      fi
32016
32017 fi
32018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
32019 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
32020   case $ac_cv_func_calloc_0_nonnull in #(
32021   *yes) :
32022      ;; #(
32023   *) :
32024     REPLACE_CALLOC=1 ;;
32025 esac
32026
32027   fi
32028
32029   if test $REPLACE_CALLOC = 1; then
32030
32031
32032
32033
32034
32035
32036
32037
32038   M4_LIBOBJS="$M4_LIBOBJS calloc.$ac_objext"
32039
32040   fi
32041
32042
32043
32044   if test $REPLACE_MALLOC = 1; then
32045     REPLACE_CALLOC=1
32046   fi
32047
32048   if test $REPLACE_CALLOC = 1; then
32049
32050
32051
32052
32053
32054
32055
32056
32057   M4_LIBOBJS="$M4_LIBOBJS calloc.$ac_objext"
32058
32059   fi
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069           GL_M4_GNULIB_CALLOC_POSIX=1
32070
32071
32072
32073
32074
32075 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085   if test $ac_cv_func_canonicalize_file_name = no; then
32086     HAVE_CANONICALIZE_FILE_NAME=0
32087   else
32088     case "$gl_cv_func_realpath_works" in
32089       *yes) ;;
32090       *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
32091     esac
32092   fi
32093
32094
32095
32096 printf "%s\n" "#define GNULIB_CANONICALIZE 1" >>confdefs.h
32097
32098
32099
32100
32101 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113           GL_M4_GNULIB_CANONICALIZE_FILE_NAME=1
32114
32115
32116
32117
32118
32119 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
32120
32121
32122
32123
32124
32125
32126   if test $ac_cv_func_canonicalize_file_name = no; then
32127     HAVE_CANONICALIZE_FILE_NAME=0
32128     if test $ac_cv_func_realpath = no; then
32129       HAVE_REALPATH=0
32130     else
32131       case "$gl_cv_func_realpath_works" in
32132         *yes) ;;
32133         *)    REPLACE_REALPATH=1 ;;
32134       esac
32135     fi
32136   else
32137     case "$gl_cv_func_realpath_works" in
32138       *yes)
32139         ;;
32140       *)
32141         REPLACE_CANONICALIZE_FILE_NAME=1
32142         REPLACE_REALPATH=1
32143         ;;
32144     esac
32145   fi
32146
32147   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
32148
32149
32150
32151
32152
32153
32154
32155
32156   M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
32157
32158   fi
32159
32160
32161 printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173           GL_M4_GNULIB_CANONICALIZE_FILE_NAME=1
32174
32175
32176
32177
32178
32179 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192           GL_M4_GNULIB_REALPATH=1
32193
32194
32195
32196
32197
32198 printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211           GL_M4_GNULIB_CHDIR=1
32212
32213
32214
32215
32216
32217 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
32218
32219
32220
32221
32222
32223   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
32224 printf %s "checking whether this system supports file names of any length... " >&6; }
32225 if test ${gl_cv_have_unlimited_file_name_length+y}
32226 then :
32227   printf %s "(cached) " >&6
32228 else $as_nop
32229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32230 /* end confdefs.h.  */
32231
32232 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
32233 #if HAVE_UNISTD_H
32234 # include <unistd.h>
32235 #endif
32236 #include <limits.h>
32237 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
32238 # include <sys/param.h>
32239 #endif
32240 #if !defined PATH_MAX && defined MAXPATHLEN
32241 # define PATH_MAX MAXPATHLEN
32242 #endif
32243 #ifdef __hpux
32244 # undef PATH_MAX
32245 # define PATH_MAX 1024
32246 #endif
32247 #if defined _WIN32 && ! defined __CYGWIN__
32248 # undef PATH_MAX
32249 # define PATH_MAX 260
32250 #endif
32251
32252 #ifdef PATH_MAX
32253 have_arbitrary_file_name_length_limit
32254 #endif
32255 _ACEOF
32256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32257   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
32258 then :
32259   gl_cv_have_unlimited_file_name_length=no
32260 else $as_nop
32261   gl_cv_have_unlimited_file_name_length=yes
32262 fi
32263 rm -rf conftest*
32264
32265 fi
32266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
32267 printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; }
32268
32269   if test $gl_cv_have_unlimited_file_name_length = no; then
32270
32271
32272
32273
32274
32275
32276
32277
32278   M4_LIBOBJS="$M4_LIBOBJS chdir-long.$ac_objext"
32279
32280     :
32281   fi
32282
32283 printf "%s\n" "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
32284
32285
32286
32287
32288   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
32289   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
32290
32291   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
32292   # programs in the package would end up linked with that potentially-shared
32293   # library, inducing unnecessary run-time overhead.
32294   LIB_CLOCK_GETTIME=
32295
32296   gl_saved_libs=$LIBS
32297     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
32298 printf %s "checking for library containing clock_gettime... " >&6; }
32299 if test ${ac_cv_search_clock_gettime+y}
32300 then :
32301   printf %s "(cached) " >&6
32302 else $as_nop
32303   ac_func_search_save_LIBS=$LIBS
32304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32305 /* end confdefs.h.  */
32306
32307 /* Override any GCC internal prototype to avoid an error.
32308    Use char because int might match the return type of a GCC
32309    builtin and then its argument prototype would still apply.  */
32310 char clock_gettime ();
32311 int
32312 main (void)
32313 {
32314 return clock_gettime ();
32315   ;
32316   return 0;
32317 }
32318 _ACEOF
32319 for ac_lib in '' rt posix4
32320 do
32321   if test -z "$ac_lib"; then
32322     ac_res="none required"
32323   else
32324     ac_res=-l$ac_lib
32325     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32326   fi
32327   if ac_fn_c_try_link "$LINENO"
32328 then :
32329   ac_cv_search_clock_gettime=$ac_res
32330 fi
32331 rm -f core conftest.err conftest.$ac_objext conftest.beam \
32332     conftest$ac_exeext
32333   if test ${ac_cv_search_clock_gettime+y}
32334 then :
32335   break
32336 fi
32337 done
32338 if test ${ac_cv_search_clock_gettime+y}
32339 then :
32340
32341 else $as_nop
32342   ac_cv_search_clock_gettime=no
32343 fi
32344 rm conftest.$ac_ext
32345 LIBS=$ac_func_search_save_LIBS
32346 fi
32347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
32348 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
32349 ac_res=$ac_cv_search_clock_gettime
32350 if test "$ac_res" != no
32351 then :
32352   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32353   test "$ac_cv_search_clock_gettime" = "none required" ||
32354                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
32355 fi
32356
32357     ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
32358 if test "x$ac_cv_func_clock_gettime" = xyes
32359 then :
32360   printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
32361
32362 fi
32363 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
32364 if test "x$ac_cv_func_clock_settime" = xyes
32365 then :
32366   printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
32367
32368 fi
32369
32370   LIBS=$gl_saved_libs
32371
32372
32373
32374 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
32375
32376
32377
32378
32379
32380
32381     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32382       REPLACE_CLOSE=1
32383     fi
32384
32385
32386
32387
32388
32389
32390   if test $ac_cv_header_sys_socket_h != yes; then
32391                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
32392 if test "x$ac_cv_header_winsock2_h" = xyes
32393 then :
32394   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
32395
32396 fi
32397
32398   fi
32399   if test "$ac_cv_header_winsock2_h" = yes; then
32400     HAVE_WINSOCK2_H=1
32401     UNISTD_H_HAVE_WINSOCK2_H=1
32402     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
32403   else
32404     HAVE_WINSOCK2_H=0
32405   fi
32406
32407
32408     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
32409                         REPLACE_CLOSE=1
32410     fi
32411
32412
32413     if test $REPLACE_CLOSE = 0; then
32414
32415
32416
32417   if test $ac_cv_func_fchdir = no; then
32418     HAVE_FCHDIR=0
32419   fi
32420
32421       if test $HAVE_FCHDIR = 0; then
32422         REPLACE_CLOSE=1
32423       fi
32424     fi
32425
32426
32427   if test $REPLACE_CLOSE = 1; then
32428
32429
32430
32431
32432
32433
32434
32435
32436   M4_LIBOBJS="$M4_LIBOBJS close.$ac_objext"
32437
32438   fi
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448           GL_M4_GNULIB_CLOSE=1
32449
32450
32451
32452
32453
32454 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
32455
32456
32457
32458
32459
32460 printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
32461
32462
32463
32464
32465
32466   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
32467 if test "x$ac_cv_func_closedir" = xyes
32468 then :
32469   printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
32470
32471 fi
32472
32473   if test $ac_cv_func_closedir = no; then
32474     HAVE_CLOSEDIR=0
32475   fi
32476
32477
32478
32479
32480   if test $ac_cv_func_fchdir = no; then
32481     HAVE_FCHDIR=0
32482   fi
32483
32484     if test $HAVE_FCHDIR = 0; then
32485       if test $HAVE_CLOSEDIR = 1; then
32486         REPLACE_CLOSEDIR=1
32487       fi
32488     fi
32489
32490     case $host_os,$HAVE_CLOSEDIR in
32491     os2*,1)
32492       REPLACE_CLOSEDIR=1;;
32493   esac
32494
32495   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
32496
32497
32498
32499
32500
32501
32502
32503
32504   M4_LIBOBJS="$M4_LIBOBJS closedir.$ac_objext"
32505
32506   fi
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516           GL_M4_GNULIB_CLOSEDIR=1
32517
32518
32519
32520
32521
32522 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
32523
32524
32525
32526
32527
32528   if test "x$lispdir" = x; then
32529     lispdir='${datarootdir}/emacs/site-lisp'
32530
32531   fi
32532     if test "x$runstatedir" = x; then
32533     runstatedir='${localstatedir}/run'
32534
32535   fi
32536
32537       pkglibexecdir='${libexecdir}/${PACKAGE}'
32538
32539
32540       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
32541 printf %s "checking for d_ino member in directory struct... " >&6; }
32542 if test ${gl_cv_struct_dirent_d_ino+y}
32543 then :
32544   printf %s "(cached) " >&6
32545 else $as_nop
32546   if test "$cross_compiling" = yes
32547 then :
32548   case "$host_os" in
32549                             # Guess yes on glibc systems with Linux kernel.
32550               linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
32551                             # Guess yes on musl systems with Linux kernel.
32552               linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
32553                             # Guess no on native Windows.
32554               mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
32555                             # If we don't know, obey --enable-cross-guesses.
32556               *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
32557             esac
32558
32559 else $as_nop
32560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32561 /* end confdefs.h.  */
32562 #include <sys/types.h>
32563              #include <sys/stat.h>
32564              #include <dirent.h>
32565
32566 int
32567 main (void)
32568 {
32569 DIR *dp = opendir (".");
32570              struct dirent *e;
32571              struct stat st;
32572              if (! dp)
32573                return 1;
32574              e = readdir (dp);
32575              if (! e)
32576                { closedir (dp); return 2; }
32577              if (lstat (e->d_name, &st) != 0)
32578                { closedir (dp); return 3; }
32579              if (e->d_ino != st.st_ino)
32580                { closedir (dp); return 4; }
32581              closedir (dp);
32582              return 0;
32583
32584   ;
32585   return 0;
32586 }
32587 _ACEOF
32588 if ac_fn_c_try_run "$LINENO"
32589 then :
32590   gl_cv_struct_dirent_d_ino=yes
32591 else $as_nop
32592   gl_cv_struct_dirent_d_ino=no
32593 fi
32594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32595   conftest.$ac_objext conftest.beam conftest.$ac_ext
32596 fi
32597
32598 fi
32599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
32600 printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
32601    case "$gl_cv_struct_dirent_d_ino" in
32602      *yes)
32603
32604 printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
32605
32606        ;;
32607    esac
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
32622 if test "x$ac_cv_func_dirfd" = xyes
32623 then :
32624   printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
32625
32626 fi
32627
32628   ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
32629       #include <dirent.h>
32630 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32631 if test "x$ac_cv_have_decl_dirfd" = xyes
32632 then :
32633   ac_have_decl=1
32634 else $as_nop
32635   ac_have_decl=0
32636 fi
32637 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
32638
32639   if test $ac_cv_have_decl_dirfd = no; then
32640     HAVE_DECL_DIRFD=0
32641   fi
32642
32643   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
32644 printf %s "checking whether dirfd is a macro... " >&6; }
32645 if test ${gl_cv_func_dirfd_macro+y}
32646 then :
32647   printf %s "(cached) " >&6
32648 else $as_nop
32649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32650 /* end confdefs.h.  */
32651
32652 #include <sys/types.h>
32653 #include <dirent.h>
32654 #ifdef dirfd
32655  dirent_header_defines_dirfd
32656 #endif
32657 _ACEOF
32658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32659   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
32660 then :
32661   gl_cv_func_dirfd_macro=yes
32662 else $as_nop
32663   gl_cv_func_dirfd_macro=no
32664 fi
32665 rm -rf conftest*
32666
32667 fi
32668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
32669 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
32670
32671   # Use the replacement if we have no function or macro with that name,
32672   # or if OS/2 kLIBC whose dirfd() does not work.
32673   # Replace only if the system declares dirfd already.
32674   case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
32675     no,no,*,yes | *,*,os2*,yes)
32676       REPLACE_DIRFD=1
32677
32678 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
32679 ;;
32680   esac
32681
32682   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
32683      || test $REPLACE_DIRFD = 1; then
32684
32685
32686
32687
32688
32689
32690
32691
32692   M4_LIBOBJS="$M4_LIBOBJS dirfd.$ac_objext"
32693
32694
32695   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
32696 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
32697 if test ${gl_cv_sys_dir_fd_member_name+y}
32698 then :
32699   printf %s "(cached) " >&6
32700 else $as_nop
32701
32702       dirfd_save_CFLAGS=$CFLAGS
32703       for ac_expr in d_fd dd_fd; do
32704
32705         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
32706         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32707 /* end confdefs.h.  */
32708
32709            #include <sys/types.h>
32710            #include <dirent.h>
32711 int
32712 main (void)
32713 {
32714 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
32715   ;
32716   return 0;
32717 }
32718 _ACEOF
32719 if ac_fn_c_try_compile "$LINENO"
32720 then :
32721   dir_fd_found=yes
32722
32723 fi
32724 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32725         CFLAGS=$dirfd_save_CFLAGS
32726         test "$dir_fd_found" = yes && break
32727       done
32728       test "$dir_fd_found" = yes || ac_expr=no_such_member
32729
32730       gl_cv_sys_dir_fd_member_name=$ac_expr
32731
32732
32733 fi
32734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
32735 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
32736   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
32737
32738 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
32739
32740   fi
32741
32742
32743   fi
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753           GL_M4_GNULIB_DIRFD=1
32754
32755
32756
32757
32758
32759 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
32760
32761
32762
32763
32764
32765 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
32766
32767
32768
32769
32770   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
32771 printf %s "checking whether // is distinct from /... " >&6; }
32772 if test ${gl_cv_double_slash_root+y}
32773 then :
32774   printf %s "(cached) " >&6
32775 else $as_nop
32776    if test x"$cross_compiling" = xyes ; then
32777         # When cross-compiling, there is no way to tell whether // is special
32778         # short of a list of hosts.  However, the only known hosts to date
32779         # that have a distinct // are Apollo DomainOS (too old to port to),
32780         # Cygwin, and z/OS.  If anyone knows of another system for which // has
32781         # special semantics and is distinct from /, please report it to
32782         # <bug-gnulib@gnu.org>.
32783         case $host in
32784           *-cygwin | i370-ibm-openedition)
32785             gl_cv_double_slash_root=yes ;;
32786           *)
32787             # Be optimistic and assume that / and // are the same when we
32788             # don't know.
32789             gl_cv_double_slash_root='unknown, assuming no' ;;
32790         esac
32791       else
32792         set x `ls -di / // 2>/dev/null`
32793         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
32794           gl_cv_double_slash_root=no
32795         else
32796           gl_cv_double_slash_root=yes
32797         fi
32798       fi
32799 fi
32800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
32801 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
32802   if test "$gl_cv_double_slash_root" = yes; then
32803
32804 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
32805
32806   fi
32807
32808
32809
32810
32811
32812     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32813       REPLACE_DUP=1
32814     fi
32815
32816
32817
32818
32819
32820   if test $ac_cv_func_fchdir = no; then
32821     HAVE_FCHDIR=0
32822   fi
32823
32824     if test $HAVE_FCHDIR = 0; then
32825       REPLACE_DUP=1
32826     fi
32827
32828   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
32829 printf %s "checking whether dup works... " >&6; }
32830 if test ${gl_cv_func_dup_works+y}
32831 then :
32832   printf %s "(cached) " >&6
32833 else $as_nop
32834   if test "$cross_compiling" = yes
32835 then :
32836   case "$host_os" in
32837                  # Guess no on native Windows.
32838          mingw*) gl_cv_func_dup_works="guessing no" ;;
32839          *)      gl_cv_func_dup_works="guessing yes" ;;
32840        esac
32841
32842 else $as_nop
32843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32844 /* end confdefs.h.  */
32845 #include <unistd.h>
32846                          #include <fcntl.h>
32847                          #include <errno.h>
32848
32849
32850 $gl_mda_defines
32851
32852 int
32853 main (void)
32854 {
32855 /* On OS/2 kLIBC, dup does not work on a directory fd.  */
32856            int fd = open (".", O_RDONLY);
32857            return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
32858
32859   ;
32860   return 0;
32861 }
32862
32863 _ACEOF
32864 if ac_fn_c_try_run "$LINENO"
32865 then :
32866   gl_cv_func_dup_works=yes
32867 else $as_nop
32868   gl_cv_func_dup_works=no
32869 fi
32870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32871   conftest.$ac_objext conftest.beam conftest.$ac_ext
32872 fi
32873
32874
32875 fi
32876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
32877 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
32878   case "$gl_cv_func_dup_works" in
32879     *yes) ;;
32880     *)
32881       REPLACE_DUP=1
32882       ;;
32883   esac
32884
32885   if test $REPLACE_DUP = 1; then
32886
32887
32888
32889
32890
32891
32892
32893
32894   M4_LIBOBJS="$M4_LIBOBJS dup.$ac_objext"
32895
32896     :
32897   fi
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907           GL_M4_GNULIB_DUP=1
32908
32909
32910
32911
32912
32913 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
32914
32915
32916
32917
32918
32919
32920   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
32921 printf %s "checking whether dup2 works... " >&6; }
32922 if test ${gl_cv_func_dup2_works+y}
32923 then :
32924   printf %s "(cached) " >&6
32925 else $as_nop
32926   if test "$cross_compiling" = yes
32927 then :
32928   case "$host_os" in
32929          mingw*) # on this platform, dup2 always returns 0 for success
32930            gl_cv_func_dup2_works="guessing no" ;;
32931          cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
32932            gl_cv_func_dup2_works="guessing no" ;;
32933          aix* | freebsd*)
32934                  # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
32935                  # not EBADF.
32936            gl_cv_func_dup2_works="guessing no" ;;
32937          haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
32938            gl_cv_func_dup2_works="guessing no" ;;
32939          *-android*) # implemented using dup3(), which fails if oldfd == newfd
32940            gl_cv_func_dup2_works="guessing no" ;;
32941          os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
32942            gl_cv_func_dup2_works="guessing no" ;;
32943          *) gl_cv_func_dup2_works="guessing yes" ;;
32944        esac
32945 else $as_nop
32946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32947 /* end confdefs.h.  */
32948
32949        #include <errno.h>
32950            #include <fcntl.h>
32951            #include <limits.h>
32952            #include <sys/resource.h>
32953            #include <unistd.h>
32954
32955
32956 $gl_mda_defines
32957
32958            #ifndef RLIM_SAVED_CUR
32959            # define RLIM_SAVED_CUR RLIM_INFINITY
32960            #endif
32961            #ifndef RLIM_SAVED_MAX
32962            # define RLIM_SAVED_MAX RLIM_INFINITY
32963            #endif
32964
32965 int
32966 main (void)
32967 {
32968 int result = 0;
32969            int bad_fd = INT_MAX;
32970            struct rlimit rlim;
32971            if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
32972                && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
32973                && rlim.rlim_cur != RLIM_INFINITY
32974                && rlim.rlim_cur != RLIM_SAVED_MAX
32975                && rlim.rlim_cur != RLIM_SAVED_CUR)
32976              bad_fd = rlim.rlim_cur;
32977            #ifdef FD_CLOEXEC
32978              if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
32979                result |= 1;
32980            #endif
32981            if (dup2 (1, 1) != 1)
32982              result |= 2;
32983            #ifdef FD_CLOEXEC
32984              if (fcntl (1, F_GETFD) != FD_CLOEXEC)
32985                result |= 4;
32986            #endif
32987            close (0);
32988            if (dup2 (0, 0) != -1)
32989              result |= 8;
32990            /* Many gnulib modules require POSIX conformance of EBADF.  */
32991            if (dup2 (2, bad_fd) == -1 && errno != EBADF)
32992              result |= 16;
32993            /* Flush out some cygwin core dumps.  */
32994            if (dup2 (2, -1) != -1 || errno != EBADF)
32995              result |= 32;
32996            dup2 (2, 255);
32997            dup2 (2, 256);
32998            /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
32999            {
33000              int fd = open (".", O_RDONLY);
33001              if (fd == -1)
33002                result |= 64;
33003              else if (dup2 (fd, fd + 1) == -1)
33004                result |= 128;
33005              close (fd);
33006            }
33007            return result;
33008   ;
33009   return 0;
33010 }
33011
33012 _ACEOF
33013 if ac_fn_c_try_run "$LINENO"
33014 then :
33015   gl_cv_func_dup2_works=yes
33016 else $as_nop
33017   gl_cv_func_dup2_works=no
33018 fi
33019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33020   conftest.$ac_objext conftest.beam conftest.$ac_ext
33021 fi
33022
33023
33024 fi
33025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
33026 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
33027   case "$gl_cv_func_dup2_works" in
33028     *yes) ;;
33029     *)
33030       REPLACE_DUP2=1
33031       ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
33032 if test "x$ac_cv_func_setdtablesize" = xyes
33033 then :
33034   printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
33035
33036 fi
33037
33038       ;;
33039   esac
33040
33041
33042
33043
33044   if test $ac_cv_func_fchdir = no; then
33045     HAVE_FCHDIR=0
33046   fi
33047
33048     if test $HAVE_FCHDIR = 0; then
33049       REPLACE_DUP2=1
33050     fi
33051
33052
33053   if test $REPLACE_DUP2 = 1; then
33054
33055
33056
33057
33058
33059
33060
33061
33062   M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
33063
33064
33065   fi
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075           GL_M4_GNULIB_DUP2=1
33076
33077
33078
33079
33080
33081 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095           GL_M4_GNULIB_ENVIRON=1
33096
33097
33098
33099
33100
33101 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
33102
33103
33104
33105
33106
33107       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
33108 printf %s "checking for error_at_line... " >&6; }
33109 if test ${ac_cv_lib_error_at_line+y}
33110 then :
33111   printf %s "(cached) " >&6
33112 else $as_nop
33113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33114 /* end confdefs.h.  */
33115 #include <error.h>
33116 int
33117 main (void)
33118 {
33119 error_at_line (0, 0, "", 0, "an error occurred");
33120   ;
33121   return 0;
33122 }
33123 _ACEOF
33124 if ac_fn_c_try_link "$LINENO"
33125 then :
33126   ac_cv_lib_error_at_line=yes
33127 else $as_nop
33128   ac_cv_lib_error_at_line=no
33129 fi
33130 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33131     conftest$ac_exeext conftest.$ac_ext
33132 fi
33133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
33134 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
33135
33136   if test $ac_cv_lib_error_at_line = no; then
33137
33138
33139
33140
33141
33142
33143
33144
33145   M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
33146
33147
33148
33149   :
33150
33151   fi
33152
33153
33154   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
33155
33156
33157
33158   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
33159
33160
33161
33162
33163
33164
33165
33166
33167   :
33168
33169
33170
33171
33172
33173
33174   if test $ac_cv_have_decl_fchdir = no; then
33175     HAVE_DECL_FCHDIR=0
33176   fi
33177
33178
33179   if test $HAVE_FCHDIR = 0; then
33180
33181
33182
33183
33184
33185
33186
33187
33188   M4_LIBOBJS="$M4_LIBOBJS fchdir.$ac_objext"
33189
33190     :
33191
33192 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
33193
33194                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
33195 printf %s "checking whether open can visit directories... " >&6; }
33196 if test ${gl_cv_func_open_directory_works+y}
33197 then :
33198   printf %s "(cached) " >&6
33199 else $as_nop
33200   if test "$cross_compiling" = yes
33201 then :
33202   case "$host_os" in
33203                              # Guess yes on Linux systems.
33204             linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
33205                              # Guess yes on glibc systems.
33206             *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
33207                              # Guess no on native Windows.
33208             mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
33209                              # If we don't know, obey --enable-cross-guesses.
33210             *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
33211           esac
33212
33213 else $as_nop
33214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33215 /* end confdefs.h.  */
33216 #include <fcntl.h>
33217
33218
33219 $gl_mda_defines
33220
33221 int
33222 main (void)
33223 {
33224 return open(".", O_RDONLY) < 0;
33225   ;
33226   return 0;
33227 }
33228 _ACEOF
33229 if ac_fn_c_try_run "$LINENO"
33230 then :
33231   gl_cv_func_open_directory_works=yes
33232 else $as_nop
33233   gl_cv_func_open_directory_works=no
33234 fi
33235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33236   conftest.$ac_objext conftest.beam conftest.$ac_ext
33237 fi
33238
33239 fi
33240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
33241 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
33242     case "$gl_cv_func_open_directory_works" in
33243       *yes) ;;
33244       *)
33245
33246 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
33247
33248         ;;
33249     esac
33250   fi
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261           GL_M4_GNULIB_FCHDIR=1
33262
33263
33264
33265
33266
33267 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
33278 printf %s "checking whether fflush works on input streams... " >&6; }
33279 if test ${gl_cv_func_fflush_stdin+y}
33280 then :
33281   printf %s "(cached) " >&6
33282 else $as_nop
33283   echo hello world > conftest.txt
33284      if test "$cross_compiling" = yes
33285 then :
33286   case "$host_os" in
33287                   # Guess no on native Windows.
33288           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
33289           *)      gl_cv_func_fflush_stdin=cross ;;
33290         esac
33291
33292 else $as_nop
33293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33294 /* end confdefs.h.  */
33295
33296 #include <stdio.h>
33297 #if HAVE_UNISTD_H
33298 # include <unistd.h>
33299 #else /* on Windows with MSVC */
33300 # include <io.h>
33301 #endif
33302
33303
33304 $gl_mda_defines
33305
33306 int
33307 main (void)
33308 {
33309 FILE *f = fopen ("conftest.txt", "r");
33310          char buffer[10];
33311          int fd;
33312          int c;
33313          if (f == NULL)
33314            return 1;
33315          fd = fileno (f);
33316          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
33317            { fclose (f); return 2; }
33318          /* For deterministic results, ensure f read a bigger buffer.  */
33319          if (lseek (fd, 0, SEEK_CUR) == 5)
33320            { fclose (f); return 3; }
33321          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
33322             on BSD systems and on mingw.  */
33323          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
33324            { fclose (f); return 4; }
33325          if (lseek (fd, 0, SEEK_CUR) != 5)
33326            { fclose (f); return 5; }
33327          /* Verify behaviour of fflush after ungetc. See
33328             <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
33329          /* Verify behaviour of fflush after a backup ungetc.  This fails on
33330             mingw.  */
33331          c = fgetc (f);
33332          ungetc (c, f);
33333          fflush (f);
33334          if (fgetc (f) != c)
33335            { fclose (f); return 6; }
33336          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
33337             on glibc 2.8 and on BSD systems.  */
33338          c = fgetc (f);
33339          ungetc ('@', f);
33340          fflush (f);
33341          if (fgetc (f) != c)
33342            { fclose (f); return 7; }
33343          fclose (f);
33344          return 0;
33345
33346   ;
33347   return 0;
33348 }
33349 _ACEOF
33350 if ac_fn_c_try_run "$LINENO"
33351 then :
33352   gl_cv_func_fflush_stdin=yes
33353 else $as_nop
33354   gl_cv_func_fflush_stdin=no
33355 fi
33356 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33357   conftest.$ac_objext conftest.beam conftest.$ac_ext
33358 fi
33359
33360      rm conftest.txt
33361
33362 fi
33363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
33364 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
33365   case "$gl_cv_func_fflush_stdin" in
33366     *yes) gl_func_fflush_stdin=1 ;;
33367     *no)  gl_func_fflush_stdin=0 ;;
33368     *)    gl_func_fflush_stdin='(-1)' ;;
33369   esac
33370
33371 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
33372
33373
33374   case "$gl_cv_func_fflush_stdin" in
33375     *yes) ;;
33376     *) REPLACE_FCLOSE=1 ;;
33377   esac
33378
33379
33380   if test $REPLACE_CLOSE = 1; then
33381     REPLACE_FCLOSE=1
33382   fi
33383
33384   case "$host_os" in
33385     openedition) REPLACE_FCLOSE=1 ;;
33386   esac
33387
33388   if test $REPLACE_FCLOSE = 0; then
33389
33390
33391   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
33392 printf %s "checking whether fclose works on input streams... " >&6; }
33393 if test ${gl_cv_func_fclose_stdin+y}
33394 then :
33395   printf %s "(cached) " >&6
33396 else $as_nop
33397   echo hello world > conftest.txt
33398      if test "$cross_compiling" = yes
33399 then :
33400   case "$host_os" in
33401                          # Guess no on glibc systems.
33402           *-gnu* | gnu*) gl_cv_func_fclose_stdin="guessing no" ;;
33403                          # Guess yes on musl systems.
33404           *-musl*)       gl_cv_func_fclose_stdin="guessing yes" ;;
33405                          # Guess no on native Windows.
33406           mingw*)        gl_cv_func_fclose_stdin="guessing no" ;;
33407                          # If we don't know, obey --enable-cross-guesses.
33408           *)             gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
33409         esac
33410
33411 else $as_nop
33412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33413 /* end confdefs.h.  */
33414 #include <fcntl.h>
33415             #include <stdio.h>
33416             #if HAVE_UNISTD_H
33417             # include <unistd.h>
33418             #else /* on Windows with MSVC */
33419             # include <io.h>
33420             #endif
33421
33422
33423 $gl_mda_defines
33424
33425 int
33426 main (void)
33427 {
33428 int fd;
33429             int fd2;
33430             FILE *fp;
33431             fd = open ("conftest.txt", O_RDONLY);
33432             if (fd < 0)
33433               return 1;
33434             if (lseek (fd, 1, SEEK_SET) != 1)
33435               return 2;
33436             fd2 = dup (fd);
33437             if (fd2 < 0)
33438               return 3;
33439             fp = fdopen (fd2, "r");
33440             if (fp == NULL)
33441               return 4;
33442             if (fgetc (fp) != 'e')
33443               { fclose (fp); return 5; }
33444             /* This fclose() call should reposition the underlying file
33445                descriptor.  */
33446             if (fclose (fp) != 0)
33447               return 6;
33448             if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
33449               return 7;
33450             /* Verify the file position.  */
33451             if (lseek (fd, 0, SEEK_CUR) != 2)
33452               return 8;
33453             return 0;
33454
33455   ;
33456   return 0;
33457 }
33458 _ACEOF
33459 if ac_fn_c_try_run "$LINENO"
33460 then :
33461   gl_cv_func_fclose_stdin=yes
33462 else $as_nop
33463   gl_cv_func_fclose_stdin=no
33464 fi
33465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33466   conftest.$ac_objext conftest.beam conftest.$ac_ext
33467 fi
33468
33469      rm conftest.txt
33470
33471 fi
33472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
33473 printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
33474
33475     case "$gl_cv_func_fclose_stdin" in
33476       *yes) ;;
33477       *) REPLACE_FCLOSE=1 ;;
33478     esac
33479   fi
33480
33481   if test $REPLACE_FCLOSE = 1; then
33482
33483
33484
33485
33486
33487
33488
33489
33490   M4_LIBOBJS="$M4_LIBOBJS fclose.$ac_objext"
33491
33492   fi
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502           GL_M4_GNULIB_FCLOSE=1
33503
33504
33505
33506
33507
33508 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
33509
33510
33511
33512
33513
33514
33515
33516
33517   if test $ac_cv_func_fcntl = no; then
33518
33519
33520
33521   if test $ac_cv_func_fcntl = no; then
33522     HAVE_FCNTL=0
33523   else
33524     REPLACE_FCNTL=1
33525   fi
33526
33527   else
33528             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
33529 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
33530 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
33531 then :
33532   printf %s "(cached) " >&6
33533 else $as_nop
33534   if test "$cross_compiling" = yes
33535 then :
33536   case $host_os in
33537             aix* | cygwin* | haiku*)
33538                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
33539             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
33540           esac
33541 else $as_nop
33542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33543 /* end confdefs.h.  */
33544 #include <errno.h>
33545               #include <fcntl.h>
33546               #include <limits.h>
33547               #include <sys/resource.h>
33548               #include <unistd.h>
33549
33550
33551 $gl_mda_defines
33552
33553               #ifndef RLIM_SAVED_CUR
33554               # define RLIM_SAVED_CUR RLIM_INFINITY
33555               #endif
33556               #ifndef RLIM_SAVED_MAX
33557               # define RLIM_SAVED_MAX RLIM_INFINITY
33558               #endif
33559
33560 int
33561 main (void)
33562 {
33563 int result = 0;
33564               int bad_fd = INT_MAX;
33565               struct rlimit rlim;
33566               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
33567                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
33568                   && rlim.rlim_cur != RLIM_INFINITY
33569                   && rlim.rlim_cur != RLIM_SAVED_MAX
33570                   && rlim.rlim_cur != RLIM_SAVED_CUR)
33571                 bad_fd = rlim.rlim_cur;
33572               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
33573               if (errno != EINVAL) result |= 2;
33574               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
33575               if (errno != EINVAL) result |= 8;
33576               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
33577               {
33578                 int fd;
33579                 fd = open (".", O_RDONLY);
33580                 if (fd == -1)
33581                   result |= 16;
33582                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
33583                   result |= 32;
33584
33585                 close (fd);
33586               }
33587               return result;
33588   ;
33589   return 0;
33590 }
33591 _ACEOF
33592 if ac_fn_c_try_run "$LINENO"
33593 then :
33594   gl_cv_func_fcntl_f_dupfd_works=yes
33595 else $as_nop
33596   gl_cv_func_fcntl_f_dupfd_works=no
33597 fi
33598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33599   conftest.$ac_objext conftest.beam conftest.$ac_ext
33600 fi
33601
33602 fi
33603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
33604 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
33605     case $gl_cv_func_fcntl_f_dupfd_works in
33606       *yes) ;;
33607       *)
33608
33609
33610   if test $ac_cv_func_fcntl = no; then
33611     HAVE_FCNTL=0
33612   else
33613     REPLACE_FCNTL=1
33614   fi
33615
33616
33617 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
33618  ;;
33619     esac
33620
33621             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
33622 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
33623 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
33624 then :
33625   printf %s "(cached) " >&6
33626 else $as_nop
33627   if test "$cross_compiling" = yes
33628 then :
33629   case "$host_os" in
33630                      # Guess no on NetBSD.
33631             netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
33632             *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
33633           esac
33634
33635 else $as_nop
33636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33637 /* end confdefs.h.  */
33638 #include <fcntl.h>
33639               #include <unistd.h>
33640               int main (int argc, char *argv[])
33641               {
33642                 if (argc == 1)
33643                   /* parent process */
33644                   {
33645                     if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
33646                       return 1;
33647                     return execl ("./conftest", "./conftest", "child", NULL);
33648                   }
33649                 else
33650                   /* child process */
33651                   return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
33652               }
33653
33654
33655 _ACEOF
33656 if ac_fn_c_try_run "$LINENO"
33657 then :
33658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33659 /* end confdefs.h.  */
33660
33661 #ifdef __linux__
33662 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
33663    it to support the semantics on older kernels that failed with EINVAL.  */
33664 choke me
33665 #endif
33666
33667 int
33668 main (void)
33669 {
33670
33671   ;
33672   return 0;
33673 }
33674 _ACEOF
33675 if ac_fn_c_try_compile "$LINENO"
33676 then :
33677   gl_cv_func_fcntl_f_dupfd_cloexec=yes
33678 else $as_nop
33679   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
33680 fi
33681 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33682
33683 else $as_nop
33684   gl_cv_func_fcntl_f_dupfd_cloexec=no
33685 fi
33686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33687   conftest.$ac_objext conftest.beam conftest.$ac_ext
33688 fi
33689
33690
33691 fi
33692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
33693 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
33694     case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
33695       *yes) ;;
33696       *)
33697
33698
33699   if test $ac_cv_func_fcntl = no; then
33700     HAVE_FCNTL=0
33701   else
33702     REPLACE_FCNTL=1
33703   fi
33704
33705                         ;;
33706     esac
33707   fi
33708
33709
33710
33711
33712   if test $ac_cv_func_fchdir = no; then
33713     HAVE_FCHDIR=0
33714   fi
33715
33716     if test $HAVE_FCHDIR = 0; then
33717
33718
33719
33720   if test $ac_cv_func_fcntl = no; then
33721     HAVE_FCNTL=0
33722   else
33723     REPLACE_FCNTL=1
33724   fi
33725
33726     fi
33727
33728
33729   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
33730
33731
33732
33733
33734
33735
33736
33737
33738   M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
33739
33740   fi
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750           GL_M4_GNULIB_FCNTL=1
33751
33752
33753
33754
33755
33756 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
33769
33770
33771
33772
33773
33774
33775
33776     ac_fn_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
33777 #include <dirent.h>
33778
33779 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33780 if test "x$ac_cv_have_decl_fdopendir" = xyes
33781 then :
33782   ac_have_decl=1
33783 else $as_nop
33784   ac_have_decl=0
33785 fi
33786 printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
33787 if test $ac_have_decl = 1
33788 then :
33789
33790 else $as_nop
33791   HAVE_DECL_FDOPENDIR=0
33792 fi
33793
33794
33795   if test $ac_cv_func_fdopendir = no; then
33796     HAVE_FDOPENDIR=0
33797   else
33798     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
33799 printf %s "checking whether fdopendir works... " >&6; }
33800 if test ${gl_cv_func_fdopendir_works+y}
33801 then :
33802   printf %s "(cached) " >&6
33803 else $as_nop
33804   if test "$cross_compiling" = yes
33805 then :
33806   case "$host_os" in
33807                      # Guess yes on glibc systems.
33808             *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
33809                      # Guess yes on musl systems.
33810             *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
33811                      # If we don't know, obey --enable-cross-guesses.
33812             *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
33813           esac
33814
33815 else $as_nop
33816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33817 /* end confdefs.h.  */
33818
33819 #include <dirent.h>
33820 #include <fcntl.h>
33821 #include <unistd.h>
33822
33823
33824 $gl_mda_defines
33825
33826 #if !HAVE_DECL_FDOPENDIR
33827 extern
33828 # ifdef __cplusplus
33829 "C"
33830 # endif
33831 DIR *fdopendir (int);
33832 #endif
33833
33834 int
33835 main (void)
33836 {
33837 int result = 0;
33838               int fd = open ("conftest.c", O_RDONLY);
33839               if (fd < 0) result |= 1;
33840               if (fdopendir (fd)) result |= 2;
33841               if (close (fd)) result |= 4;
33842               return result;
33843
33844   ;
33845   return 0;
33846 }
33847 _ACEOF
33848 if ac_fn_c_try_run "$LINENO"
33849 then :
33850   gl_cv_func_fdopendir_works=yes
33851 else $as_nop
33852   gl_cv_func_fdopendir_works=no
33853 fi
33854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33855   conftest.$ac_objext conftest.beam conftest.$ac_ext
33856 fi
33857
33858 fi
33859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
33860 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
33861     case "$gl_cv_func_fdopendir_works" in
33862       *yes) ;;
33863       *)
33864         REPLACE_FDOPENDIR=1
33865         ;;
33866     esac
33867   fi
33868
33869   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
33870
33871
33872
33873
33874
33875
33876
33877
33878   M4_LIBOBJS="$M4_LIBOBJS fdopendir.$ac_objext"
33879
33880   fi
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890           GL_M4_GNULIB_FDOPENDIR=1
33891
33892
33893
33894
33895
33896 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
33897
33898
33899
33900
33901
33902 printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
33903
33904
33905
33906
33907
33908
33909   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
33910 printf %s "checking whether fflush works on input streams... " >&6; }
33911 if test ${gl_cv_func_fflush_stdin+y}
33912 then :
33913   printf %s "(cached) " >&6
33914 else $as_nop
33915   echo hello world > conftest.txt
33916      if test "$cross_compiling" = yes
33917 then :
33918   case "$host_os" in
33919                   # Guess no on native Windows.
33920           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
33921           *)      gl_cv_func_fflush_stdin=cross ;;
33922         esac
33923
33924 else $as_nop
33925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33926 /* end confdefs.h.  */
33927
33928 #include <stdio.h>
33929 #if HAVE_UNISTD_H
33930 # include <unistd.h>
33931 #else /* on Windows with MSVC */
33932 # include <io.h>
33933 #endif
33934
33935
33936 $gl_mda_defines
33937
33938 int
33939 main (void)
33940 {
33941 FILE *f = fopen ("conftest.txt", "r");
33942          char buffer[10];
33943          int fd;
33944          int c;
33945          if (f == NULL)
33946            return 1;
33947          fd = fileno (f);
33948          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
33949            { fclose (f); return 2; }
33950          /* For deterministic results, ensure f read a bigger buffer.  */
33951          if (lseek (fd, 0, SEEK_CUR) == 5)
33952            { fclose (f); return 3; }
33953          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
33954             on BSD systems and on mingw.  */
33955          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
33956            { fclose (f); return 4; }
33957          if (lseek (fd, 0, SEEK_CUR) != 5)
33958            { fclose (f); return 5; }
33959          /* Verify behaviour of fflush after ungetc. See
33960             <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
33961          /* Verify behaviour of fflush after a backup ungetc.  This fails on
33962             mingw.  */
33963          c = fgetc (f);
33964          ungetc (c, f);
33965          fflush (f);
33966          if (fgetc (f) != c)
33967            { fclose (f); return 6; }
33968          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
33969             on glibc 2.8 and on BSD systems.  */
33970          c = fgetc (f);
33971          ungetc ('@', f);
33972          fflush (f);
33973          if (fgetc (f) != c)
33974            { fclose (f); return 7; }
33975          fclose (f);
33976          return 0;
33977
33978   ;
33979   return 0;
33980 }
33981 _ACEOF
33982 if ac_fn_c_try_run "$LINENO"
33983 then :
33984   gl_cv_func_fflush_stdin=yes
33985 else $as_nop
33986   gl_cv_func_fflush_stdin=no
33987 fi
33988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33989   conftest.$ac_objext conftest.beam conftest.$ac_ext
33990 fi
33991
33992      rm conftest.txt
33993
33994 fi
33995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
33996 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
33997   case "$gl_cv_func_fflush_stdin" in
33998     *yes) gl_func_fflush_stdin=1 ;;
33999     *no)  gl_func_fflush_stdin=0 ;;
34000     *)    gl_func_fflush_stdin='(-1)' ;;
34001   esac
34002
34003 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
34004
34005
34006   case "$gl_cv_func_fflush_stdin" in
34007     *yes) ;;
34008     *) REPLACE_FFLUSH=1 ;;
34009   esac
34010
34011   if test $REPLACE_FFLUSH = 1; then
34012
34013
34014
34015
34016
34017
34018
34019
34020   M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
34021
34022     :
34023   fi
34024
34025
34026 printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038           GL_M4_GNULIB_FFLUSH=1
34039
34040
34041
34042
34043
34044 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
34045
34046
34047
34048
34049
34050
34051
34052
34053 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
34064 printf %s "checking for flexible array member... " >&6; }
34065 if test ${ac_cv_c_flexmember+y}
34066 then :
34067   printf %s "(cached) " >&6
34068 else $as_nop
34069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34070 /* end confdefs.h.  */
34071 #include <stdlib.h>
34072             #include <stdio.h>
34073             #include <stddef.h>
34074             struct m { struct m *next, **list; char name[]; };
34075             struct s { struct s *p; struct m *m; int n; double d[]; };
34076 int
34077 main (void)
34078 {
34079 int m = getchar ();
34080             size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
34081             nbytes += sizeof (struct s) - 1;
34082             nbytes -= nbytes % sizeof (struct s);
34083             struct s *p = malloc (nbytes);
34084             p->p = p;
34085             p->m = NULL;
34086             p->d[0] = 0.0;
34087             return p->d != (double *) NULL;
34088   ;
34089   return 0;
34090 }
34091 _ACEOF
34092 if ac_fn_c_try_compile "$LINENO"
34093 then :
34094   ac_cv_c_flexmember=yes
34095 else $as_nop
34096   ac_cv_c_flexmember=no
34097 fi
34098 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34099 fi
34100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
34101 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
34102   if test $ac_cv_c_flexmember = yes; then
34103
34104 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
34105
34106   else
34107     printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
34108
34109   fi
34110
34111
34112
34113
34114   FLOAT_H=
34115   REPLACE_FLOAT_LDBL=0
34116   case "$host_os" in
34117     aix* | beos* | openbsd* | mirbsd* | irix*)
34118       FLOAT_H=float.h
34119       ;;
34120     freebsd* | dragonfly*)
34121       case "$host_cpu" in
34122         i[34567]86 )
34123           FLOAT_H=float.h
34124           ;;
34125         x86_64 )
34126           # On x86_64 systems, the C compiler may still be generating
34127           # 32-bit code.
34128           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34129 /* end confdefs.h.  */
34130 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
34131                   int ok;
34132                  #else
34133                   error fail
34134                  #endif
34135
34136 _ACEOF
34137 if ac_fn_c_try_compile "$LINENO"
34138 then :
34139
34140 else $as_nop
34141   FLOAT_H=float.h
34142 fi
34143 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34144           ;;
34145       esac
34146       ;;
34147     linux*)
34148       case "$host_cpu" in
34149         powerpc*)
34150           FLOAT_H=float.h
34151           ;;
34152       esac
34153       ;;
34154   esac
34155   case "$host_os" in
34156     aix* | freebsd* | dragonfly* | linux*)
34157       if test -n "$FLOAT_H"; then
34158         REPLACE_FLOAT_LDBL=1
34159       fi
34160       ;;
34161   esac
34162
34163     REPLACE_ITOLD=0
34164   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
34165 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
34166 if test ${gl_cv_func_itold_works+y}
34167 then :
34168   printf %s "(cached) " >&6
34169 else $as_nop
34170
34171       if test "$cross_compiling" = yes
34172 then :
34173   case "$host" in
34174            sparc*-*-linux*)
34175              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34176 /* end confdefs.h.  */
34177 #if defined __LP64__ || defined __arch64__
34178                     int ok;
34179                    #else
34180                     error fail
34181                    #endif
34182
34183 _ACEOF
34184 if ac_fn_c_try_compile "$LINENO"
34185 then :
34186   gl_cv_func_itold_works="guessing no"
34187 else $as_nop
34188   gl_cv_func_itold_works="guessing yes"
34189 fi
34190 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34191              ;;
34192                    # Guess yes on native Windows.
34193            mingw*) gl_cv_func_itold_works="guessing yes" ;;
34194            *)      gl_cv_func_itold_works="guessing yes" ;;
34195          esac
34196
34197 else $as_nop
34198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34199 /* end confdefs.h.  */
34200
34201 int i = -1;
34202 volatile long double ld;
34203 int main ()
34204 {
34205   ld += i * 1.0L;
34206   if (ld > 0)
34207     return 1;
34208   return 0;
34209 }
34210 _ACEOF
34211 if ac_fn_c_try_run "$LINENO"
34212 then :
34213   gl_cv_func_itold_works=yes
34214 else $as_nop
34215   gl_cv_func_itold_works=no
34216 fi
34217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34218   conftest.$ac_objext conftest.beam conftest.$ac_ext
34219 fi
34220
34221
34222 fi
34223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
34224 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
34225   case "$gl_cv_func_itold_works" in
34226     *no)
34227       REPLACE_ITOLD=1
34228                   FLOAT_H=float.h
34229       ;;
34230   esac
34231
34232   if test -n "$FLOAT_H"; then
34233
34234
34235
34236
34237
34238
34239
34240
34241      if test $gl_cv_have_include_next = yes; then
34242        gl_cv_next_float_h='<'float.h'>'
34243      else
34244        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
34245 printf %s "checking absolute name of <float.h>... " >&6; }
34246 if test ${gl_cv_next_float_h+y}
34247 then :
34248   printf %s "(cached) " >&6
34249 else $as_nop
34250
34251
34252
34253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254 /* end confdefs.h.  */
34255 #include <float.h>
34256 _ACEOF
34257                 case "$host_os" in
34258     aix*) gl_absname_cpp="$ac_cpp -C" ;;
34259     *)    gl_absname_cpp="$ac_cpp" ;;
34260   esac
34261
34262   case "$host_os" in
34263     mingw*)
34264                                           gl_dirsep_regex='[/\\]'
34265       ;;
34266     *)
34267       gl_dirsep_regex='\/'
34268       ;;
34269   esac
34270       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34271   gl_header_literal_regex=`echo 'float.h' \
34272                            | sed -e "$gl_make_literal_regex_sed"`
34273   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34274       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34275       s|^/[^/]|//&|
34276       p
34277       q
34278     }'
34279
34280         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34281   sed -n "$gl_absolute_header_sed"`
34282
34283            gl_header=$gl_cv_absolute_float_h
34284            gl_cv_next_float_h='"'$gl_header'"'
34285
34286
34287 fi
34288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
34289 printf "%s\n" "$gl_cv_next_float_h" >&6; }
34290      fi
34291      NEXT_FLOAT_H=$gl_cv_next_float_h
34292
34293      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34294        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34295        gl_next_as_first_directive='<'float.h'>'
34296      else
34297        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34298        gl_next_as_first_directive=$gl_cv_next_float_h
34299      fi
34300      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
34301
34302
34303
34304
34305   fi
34306
34307    if test -n "$FLOAT_H"; then
34308   GL_GENERATE_FLOAT_H_TRUE=
34309   GL_GENERATE_FLOAT_H_FALSE='#'
34310 else
34311   GL_GENERATE_FLOAT_H_TRUE='#'
34312   GL_GENERATE_FLOAT_H_FALSE=
34313 fi
34314
34315
34316
34317   if test $REPLACE_FLOAT_LDBL = 1; then
34318
34319
34320
34321
34322
34323
34324
34325
34326   M4_LIBOBJS="$M4_LIBOBJS float.$ac_objext"
34327
34328   fi
34329   if test $REPLACE_ITOLD = 1; then
34330
34331
34332
34333
34334
34335
34336
34337
34338   M4_LIBOBJS="$M4_LIBOBJS itold.$ac_objext"
34339
34340   fi
34341
34342
34343
34344   case "$host_os" in
34345     mingw* | pw*)
34346             REPLACE_FOPEN=1
34347             gl_cv_func_fopen_slash="guessing no"
34348       ;;
34349     *)
34350                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
34351 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
34352 if test ${gl_cv_func_fopen_slash+y}
34353 then :
34354   printf %s "(cached) " >&6
34355 else $as_nop
34356
34357           if test "$cross_compiling" = yes
34358 then :
34359
34360              case "$host_os" in
34361                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
34362                  gl_cv_func_fopen_slash="guessing no" ;;
34363                *)
34364                  gl_cv_func_fopen_slash="guessing yes" ;;
34365              esac
34366
34367 else $as_nop
34368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34369 /* end confdefs.h.  */
34370
34371 #include <stddef.h>
34372 #include <stdio.h>
34373 int main ()
34374 {
34375   FILE *fp = fopen ("conftest.sl/", "w");
34376   int result = (fp != NULL);
34377   if (fp != NULL)
34378     fclose (fp);
34379   return result;
34380 }
34381 _ACEOF
34382 if ac_fn_c_try_run "$LINENO"
34383 then :
34384   gl_cv_func_fopen_slash=yes
34385 else $as_nop
34386   gl_cv_func_fopen_slash=no
34387 fi
34388 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34389   conftest.$ac_objext conftest.beam conftest.$ac_ext
34390 fi
34391
34392           rm -f conftest.sl
34393
34394 fi
34395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
34396 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
34397       ;;
34398   esac
34399   case "$gl_cv_func_fopen_slash" in
34400     *no)
34401
34402 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
34403
34404       REPLACE_FOPEN=1
34405       ;;
34406   esac
34407
34408   if test $REPLACE_FOPEN = 1; then
34409
34410
34411
34412
34413
34414
34415
34416
34417   M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
34418
34419     :
34420   fi
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430           GL_M4_GNULIB_FOPEN=1
34431
34432
34433
34434
34435
34436 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
34437
34438
34439
34440
34441
34442   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
34443 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
34444 if test ${gl_cv_func_fopen_mode_x+y}
34445 then :
34446   printf %s "(cached) " >&6
34447 else $as_nop
34448   rm -f conftest.x
34449      if test "$cross_compiling" = yes
34450 then :
34451   case "$host_os" in
34452           # Guess yes on glibc and musl systems.
34453           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
34454             gl_cv_func_fopen_mode_x="guessing yes" ;;
34455           # If we don't know, obey --enable-cross-guesses.
34456           *)
34457             gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
34458         esac
34459
34460 else $as_nop
34461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34462 /* end confdefs.h.  */
34463
34464 #include <stdio.h>
34465 #include <errno.h>
34466 int main ()
34467 {
34468   FILE *fp;
34469   fp = fopen ("conftest.x", "w");
34470   fclose (fp);
34471   fp = fopen ("conftest.x", "wx");
34472   if (fp != NULL)
34473     /* 'x' ignored */
34474     return 1;
34475   else if (errno == EEXIST)
34476     return 0;
34477   else
34478     /* 'x' rejected */
34479     return 2;
34480 }
34481 _ACEOF
34482 if ac_fn_c_try_run "$LINENO"
34483 then :
34484   gl_cv_func_fopen_mode_x=yes
34485 else $as_nop
34486   gl_cv_func_fopen_mode_x=no
34487 fi
34488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34489   conftest.$ac_objext conftest.beam conftest.$ac_ext
34490 fi
34491
34492      rm -f conftest.x
34493
34494 fi
34495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
34496 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
34497   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
34498 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
34499 if test ${gl_cv_func_fopen_mode_e+y}
34500 then :
34501   printf %s "(cached) " >&6
34502 else $as_nop
34503   echo foo > conftest.x
34504      if test "$cross_compiling" = yes
34505 then :
34506   case "$host_os" in
34507           # Guess yes on glibc and musl systems.
34508           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
34509             gl_cv_func_fopen_mode_e="guessing yes" ;;
34510           # Guess no on native Windows.
34511           mingw*)
34512             gl_cv_func_fopen_mode_e="guessing no" ;;
34513           # If we don't know, obey --enable-cross-guesses.
34514           *)
34515             gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
34516         esac
34517
34518 else $as_nop
34519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34520 /* end confdefs.h.  */
34521
34522 #include <stdio.h>
34523 #include <errno.h>
34524 #include <fcntl.h>
34525
34526
34527 $gl_mda_defines
34528
34529 int main ()
34530 {
34531   FILE *fp = fopen ("conftest.x", "re");
34532   if (fp != NULL)
34533     {
34534       if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
34535         return 0;
34536       else
34537         /* 'e' ignored */
34538         return 1;
34539     }
34540   else
34541     /* 'e' rejected */
34542     return 2;
34543 }
34544 _ACEOF
34545 if ac_fn_c_try_run "$LINENO"
34546 then :
34547   gl_cv_func_fopen_mode_e=yes
34548 else $as_nop
34549   gl_cv_func_fopen_mode_e=no
34550 fi
34551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34552   conftest.$ac_objext conftest.beam conftest.$ac_ext
34553 fi
34554
34555      rm -f conftest.x
34556
34557 fi
34558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
34559 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
34560   case "$gl_cv_func_fopen_mode_x" in
34561     *no) REPLACE_FOPEN=1 ;;
34562   esac
34563   case "$gl_cv_func_fopen_mode_e" in
34564     *no) REPLACE_FOPEN=1 ;;
34565   esac
34566
34567   if test $REPLACE_FOPEN = 1; then
34568
34569
34570
34571
34572
34573
34574
34575
34576   M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
34577
34578     :
34579   fi
34580
34581
34582 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
34583
34584
34585
34586
34587 printf "%s\n" "#define GNULIB_FOPEN_SAFER 1" >>confdefs.h
34588
34589
34590
34591
34592   fp_headers='
34593     #include <stdio.h>
34594     #if HAVE_STDIO_EXT_H
34595     # include <stdio_ext.h>
34596     #endif
34597   '
34598   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
34599 printf %s "checking for __fpending... " >&6; }
34600 if test ${gl_cv_func___fpending+y}
34601 then :
34602   printf %s "(cached) " >&6
34603 else $as_nop
34604
34605       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34606 /* end confdefs.h.  */
34607 $fp_headers
34608 int
34609 main (void)
34610 {
34611 return ! __fpending (stdin);
34612   ;
34613   return 0;
34614 }
34615 _ACEOF
34616 if ac_fn_c_try_link "$LINENO"
34617 then :
34618   gl_cv_func___fpending=yes
34619 else $as_nop
34620   gl_cv_func___fpending=no
34621 fi
34622 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34623     conftest$ac_exeext conftest.$ac_ext
34624
34625 fi
34626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
34627 printf "%s\n" "$gl_cv_func___fpending" >&6; }
34628   if test $gl_cv_func___fpending = yes; then
34629     ac_fn_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
34630 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34631 if test "x$ac_cv_have_decl___fpending" = xyes
34632 then :
34633   ac_have_decl=1
34634 else $as_nop
34635   ac_have_decl=0
34636 fi
34637 printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
34638
34639   fi
34640
34641   if test $gl_cv_func___fpending = no; then
34642
34643
34644
34645
34646
34647
34648
34649
34650   M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
34651
34652   fi
34653
34654
34655
34656
34657
34658   ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
34659 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34660 if test "x$ac_cv_have_decl_fpurge" = xyes
34661 then :
34662   ac_have_decl=1
34663 else $as_nop
34664   ac_have_decl=0
34665 fi
34666 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
34667
34668   if test "x$ac_cv_func_fpurge" = xyes; then
34669     HAVE_FPURGE=1
34670     # Detect BSD bug.  Only cygwin 1.7 and musl are known to be immune.
34671     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
34672 printf %s "checking whether fpurge works... " >&6; }
34673 if test ${gl_cv_func_fpurge_works+y}
34674 then :
34675   printf %s "(cached) " >&6
34676 else $as_nop
34677   if test "$cross_compiling" = yes
34678 then :
34679   case "$host_os" in
34680                      # Guess yes on musl systems.
34681             *-musl*) gl_cv_func_fpurge_works="guessing yes" ;;
34682                      # Otherwise obey --enable-cross-guesses.
34683             *)       gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
34684           esac
34685
34686 else $as_nop
34687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34688 /* end confdefs.h.  */
34689 #include <stdio.h>
34690
34691 int
34692 main (void)
34693 {
34694 FILE *f = fopen ("conftest.txt", "w+");
34695               if (!f)
34696                 return 1;
34697               if (fputc ('a', f) != 'a')
34698                 { fclose (f); return 2; }
34699               rewind (f);
34700               if (fgetc (f) != 'a')
34701                 { fclose (f); return 3; }
34702               if (fgetc (f) != EOF)
34703                 { fclose (f); return 4; }
34704               if (fpurge (f) != 0)
34705                 { fclose (f); return 5; }
34706               if (putc ('b', f) != 'b')
34707                 { fclose (f); return 6; }
34708               if (fclose (f) != 0)
34709                 return 7;
34710               if ((f = fopen ("conftest.txt", "r")) == NULL)
34711                 return 8;
34712               if (fgetc (f) != 'a')
34713                 { fclose (f); return 9; }
34714               if (fgetc (f) != 'b')
34715                 { fclose (f); return 10; }
34716               if (fgetc (f) != EOF)
34717                 { fclose (f); return 11; }
34718               if (fclose (f) != 0)
34719                 return 12;
34720               if (remove ("conftest.txt") != 0)
34721                 return 13;
34722               return 0;
34723
34724   ;
34725   return 0;
34726 }
34727 _ACEOF
34728 if ac_fn_c_try_run "$LINENO"
34729 then :
34730   gl_cv_func_fpurge_works=yes
34731 else $as_nop
34732   gl_cv_func_fpurge_works=no
34733 fi
34734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34735   conftest.$ac_objext conftest.beam conftest.$ac_ext
34736 fi
34737
34738
34739 fi
34740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
34741 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
34742     case "$gl_cv_func_fpurge_works" in
34743       *yes) ;;
34744       *) REPLACE_FPURGE=1 ;;
34745     esac
34746   else
34747     HAVE_FPURGE=0
34748   fi
34749   if test "x$ac_cv_have_decl_fpurge" = xno; then
34750     HAVE_DECL_FPURGE=0
34751   fi
34752
34753   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
34754
34755
34756
34757
34758
34759
34760
34761
34762   M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
34763
34764   fi
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774           GL_M4_GNULIB_FPURGE=1
34775
34776
34777
34778
34779
34780 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
34781
34782
34783
34784
34785
34786
34787   if test $ac_cv_func___freadahead = no; then
34788
34789
34790
34791
34792
34793
34794
34795
34796   M4_LIBOBJS="$M4_LIBOBJS freadahead.$ac_objext"
34797
34798   fi
34799
34800
34801
34802
34803
34804
34805
34806                           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
34807 printf %s "checking whether free is known to preserve errno... " >&6; }
34808 if test ${gl_cv_func_free_preserves_errno+y}
34809 then :
34810   printf %s "(cached) " >&6
34811 else $as_nop
34812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34813 /* end confdefs.h.  */
34814 #include <stdlib.h>
34815
34816 int
34817 main (void)
34818 {
34819 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
34820             #elif defined __OpenBSD__
34821             #elif defined __sun
34822             #else
34823               #error "'free' is not known to preserve errno"
34824             #endif
34825
34826   ;
34827   return 0;
34828 }
34829 _ACEOF
34830 if ac_fn_c_try_compile "$LINENO"
34831 then :
34832   gl_cv_func_free_preserves_errno=yes
34833 else $as_nop
34834   gl_cv_func_free_preserves_errno=no
34835 fi
34836 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34837
34838 fi
34839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
34840 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
34841
34842   case $gl_cv_func_free_preserves_errno in
34843    *yes)
34844
34845 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
34846
34847     ;;
34848    *) REPLACE_FREE=1 ;;
34849   esac
34850
34851   if test $REPLACE_FREE = 1; then
34852
34853
34854
34855
34856
34857
34858
34859
34860   M4_LIBOBJS="$M4_LIBOBJS free.$ac_objext"
34861
34862     :
34863   fi
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873           GL_M4_GNULIB_FREE_POSIX=1
34874
34875
34876
34877
34878
34879 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
34880
34881
34882
34883
34884
34885
34886   if test $gl_cv_func_frexp_no_libm = yes; then
34887
34888
34889
34890   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
34891 printf %s "checking whether frexp works... " >&6; }
34892 if test ${gl_cv_func_frexp_works+y}
34893 then :
34894   printf %s "(cached) " >&6
34895 else $as_nop
34896
34897       if test "$cross_compiling" = yes
34898 then :
34899   case "$host_os" in
34900            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
34901            mingw*) # Guess yes with MSVC, no with mingw.
34902              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34903 /* end confdefs.h.  */
34904
34905 #ifdef _MSC_VER
34906  Good
34907 #endif
34908
34909 _ACEOF
34910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34911   $EGREP "Good" >/dev/null 2>&1
34912 then :
34913   gl_cv_func_frexp_works="guessing yes"
34914 else $as_nop
34915   gl_cv_func_frexp_works="guessing no"
34916 fi
34917 rm -rf conftest*
34918
34919              ;;
34920            *) gl_cv_func_frexp_works="guessing yes" ;;
34921          esac
34922
34923 else $as_nop
34924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34925 /* end confdefs.h.  */
34926
34927 #include <float.h>
34928 #include <math.h>
34929 #include <string.h>
34930 #if HAVE_DECL_ALARM
34931 # include <signal.h>
34932 # include <unistd.h>
34933 #endif
34934 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
34935    ICC 10.0 has a bug when optimizing the expression -zero.
34936    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
34937    to PowerPC on Mac OS X 10.5.  */
34938 #if defined __hpux || defined __sgi || defined __ICC
34939 static double
34940 compute_minus_zero (void)
34941 {
34942   return -DBL_MIN * DBL_MIN;
34943 }
34944 # define minus_zero compute_minus_zero ()
34945 #else
34946 double minus_zero = -0.0;
34947 #endif
34948 int main()
34949 {
34950   int result = 0;
34951   int i;
34952   volatile double x;
34953   double zero = 0.0;
34954 #if HAVE_DECL_ALARM
34955   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
34956      number.  Let the test fail in this case.  */
34957   signal (SIGALRM, SIG_DFL);
34958   alarm (5);
34959 #endif
34960   /* Test on denormalized numbers.  */
34961   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
34962     ;
34963   if (x > 0.0)
34964     {
34965       int exp;
34966       double y = frexp (x, &exp);
34967       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
34968          On NetBSD: y = 0.75. Correct: y = 0.5.  */
34969       if (y != 0.5)
34970         result |= 1;
34971     }
34972   /* Test on infinite numbers.  */
34973   x = 1.0 / zero;
34974   {
34975     int exp;
34976     double y = frexp (x, &exp);
34977     if (y != x)
34978       result |= 2;
34979   }
34980   /* Test on negative zero.  */
34981   x = minus_zero;
34982   {
34983     int exp;
34984     double y = frexp (x, &exp);
34985     if (memcmp (&y, &x, sizeof x))
34986       result |= 4;
34987   }
34988   return result;
34989 }
34990 _ACEOF
34991 if ac_fn_c_try_run "$LINENO"
34992 then :
34993   gl_cv_func_frexp_works=yes
34994 else $as_nop
34995   gl_cv_func_frexp_works=no
34996 fi
34997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34998   conftest.$ac_objext conftest.beam conftest.$ac_ext
34999 fi
35000
35001
35002 fi
35003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
35004 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
35005
35006     case "$gl_cv_func_frexp_works" in
35007       *yes) gl_func_frexp_no_libm=yes ;;
35008       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
35009     esac
35010   else
35011     gl_func_frexp_no_libm=no
35012         REPLACE_FREXP=1
35013   fi
35014   if test $gl_func_frexp_no_libm = yes; then
35015
35016 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
35017
35018   fi
35019
35020   if test $gl_func_frexp_no_libm != yes; then
35021
35022
35023
35024
35025
35026
35027
35028
35029   M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
35030
35031   fi
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041           GL_M4_GNULIB_FREXP=1
35042
35043
35044
35045
35046
35047 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
35048
35049
35050
35051
35052
35053
35054       ac_fn_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
35055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35056 if test "x$ac_cv_have_decl_frexpl" = xyes
35057 then :
35058
35059 else $as_nop
35060   HAVE_DECL_FREXPL=0
35061 fi
35062   if test $HAVE_DECL_FREXPL = 1; then
35063
35064   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
35065 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
35066 if test ${gl_cv_func_frexpl_no_libm+y}
35067 then :
35068   printf %s "(cached) " >&6
35069 else $as_nop
35070
35071       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35072 /* end confdefs.h.  */
35073 #include <math.h>
35074              long double x;
35075 int
35076 main (void)
35077 {
35078 int e; return frexpl (x, &e) > 0;
35079   ;
35080   return 0;
35081 }
35082 _ACEOF
35083 if ac_fn_c_try_link "$LINENO"
35084 then :
35085   gl_cv_func_frexpl_no_libm=yes
35086 else $as_nop
35087   gl_cv_func_frexpl_no_libm=no
35088 fi
35089 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35090     conftest$ac_exeext conftest.$ac_ext
35091
35092 fi
35093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
35094 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
35095
35096     if test $gl_cv_func_frexpl_no_libm = yes; then
35097
35098
35099      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
35100 printf %s "checking whether frexpl works... " >&6; }
35101 if test ${gl_cv_func_frexpl_works+y}
35102 then :
35103   printf %s "(cached) " >&6
35104 else $as_nop
35105
35106       if test "$cross_compiling" = yes
35107 then :
35108
35109          case "$host_os" in
35110            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
35111               gl_cv_func_frexpl_works="guessing no";;
35112            *) gl_cv_func_frexpl_works="guessing yes";;
35113          esac
35114
35115 else $as_nop
35116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35117 /* end confdefs.h.  */
35118
35119 #include <float.h>
35120 #include <math.h>
35121 /* Override the values of <float.h>, like done in float.in.h.  */
35122 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
35123 # undef LDBL_MIN_EXP
35124 # define LDBL_MIN_EXP    (-16381)
35125 #endif
35126 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
35127 # undef LDBL_MIN_EXP
35128 # define LDBL_MIN_EXP    (-16381)
35129 #endif
35130 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
35131 # undef LDBL_MIN_EXP
35132 # define LDBL_MIN_EXP DBL_MIN_EXP
35133 #endif
35134 #if defined __sgi && (LDBL_MANT_DIG >= 106)
35135 # if defined __GNUC__
35136 #  undef LDBL_MIN_EXP
35137 #  define LDBL_MIN_EXP DBL_MIN_EXP
35138 # endif
35139 #endif
35140 extern
35141 #ifdef __cplusplus
35142 "C"
35143 #endif
35144 long double frexpl (long double, int *);
35145 long double zero = 0.0L;
35146 int main()
35147 {
35148   int result = 0;
35149   volatile long double x;
35150   /* Test on finite numbers that fails on AIX 5.1.  */
35151   x = 16.0L;
35152   {
35153     int exp = -9999;
35154     frexpl (x, &exp);
35155     if (exp != 5)
35156       result |= 1;
35157   }
35158   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
35159      function returns an invalid (incorrectly normalized) value: it returns
35160                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
35161      but the correct result is
35162           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
35163   x = 1.01L;
35164   {
35165     int exp = -9999;
35166     long double y = frexpl (x, &exp);
35167     if (!(exp == 1 && y == 0.505L))
35168       result |= 2;
35169   }
35170   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
35171      LDBL_MAX_EXP = 16384.
35172      In the loop end test, we test x against Infinity, rather than comparing
35173      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
35174   {
35175     int i;
35176     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
35177       {
35178         int exp = -9999;
35179         frexpl (x, &exp);
35180         if (exp != i)
35181           {
35182             result |= 4;
35183             break;
35184           }
35185       }
35186   }
35187   /* Test on denormalized numbers.  */
35188   {
35189     int i;
35190     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
35191       ;
35192     if (x > 0.0L)
35193       {
35194         int exp;
35195         long double y = frexpl (x, &exp);
35196         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
35197            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
35198         if (exp != LDBL_MIN_EXP - 1)
35199           result |= 8;
35200       }
35201   }
35202   /* Test on infinite numbers.  */
35203   /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
35204   x = 1.0L / zero;
35205   {
35206     int exp;
35207     long double y = frexpl (x, &exp);
35208     if (y != x)
35209       result |= 16;
35210   }
35211   return result;
35212 }
35213 _ACEOF
35214 if ac_fn_c_try_run "$LINENO"
35215 then :
35216   gl_cv_func_frexpl_works=yes
35217 else $as_nop
35218   gl_cv_func_frexpl_works=no
35219 fi
35220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35221   conftest.$ac_objext conftest.beam conftest.$ac_ext
35222 fi
35223
35224
35225 fi
35226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
35227 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
35228
35229       case "$gl_cv_func_frexpl_works" in
35230         *yes) gl_func_frexpl_no_libm=yes ;;
35231         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
35232       esac
35233     else
35234       gl_func_frexpl_no_libm=no
35235             REPLACE_FREXPL=1
35236     fi
35237     if test $gl_func_frexpl_no_libm = yes; then
35238
35239 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
35240
35241     fi
35242   fi
35243
35244   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
35245
35246
35247
35248
35249
35250
35251
35252
35253   M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
35254
35255   fi
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265           GL_M4_GNULIB_FREXPL=1
35266
35267
35268
35269
35270
35271 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
35272
35273
35274
35275
35276
35277
35278     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
35279     REPLACE_FSEEK=1
35280   fi
35281
35282   if test $REPLACE_FSEEK = 1; then
35283
35284
35285
35286
35287
35288
35289
35290
35291   M4_LIBOBJS="$M4_LIBOBJS fseek.$ac_objext"
35292
35293   fi
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303           GL_M4_GNULIB_FSEEK=1
35304
35305
35306
35307
35308
35309 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
35322 printf %s "checking for fseeko... " >&6; }
35323 if test ${gl_cv_func_fseeko+y}
35324 then :
35325   printf %s "(cached) " >&6
35326 else $as_nop
35327
35328       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35329 /* end confdefs.h.  */
35330 #include <stdio.h>
35331
35332 int
35333 main (void)
35334 {
35335 fseeko (stdin, 0, 0);
35336   ;
35337   return 0;
35338 }
35339 _ACEOF
35340 if ac_fn_c_try_link "$LINENO"
35341 then :
35342   gl_cv_func_fseeko=yes
35343 else $as_nop
35344   gl_cv_func_fseeko=no
35345 fi
35346 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35347     conftest$ac_exeext conftest.$ac_ext
35348
35349 fi
35350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
35351 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
35352
35353
35354   if test $ac_cv_have_decl_fseeko = no; then
35355     HAVE_DECL_FSEEKO=0
35356   fi
35357
35358   if test $gl_cv_func_fseeko = no; then
35359     HAVE_FSEEKO=0
35360   else
35361     if test $WINDOWS_64_BIT_OFF_T = 1; then
35362       REPLACE_FSEEKO=1
35363     fi
35364     if test $gl_cv_var_stdin_large_offset = no; then
35365       REPLACE_FSEEKO=1
35366     fi
35367
35368
35369
35370   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
35371 printf %s "checking whether fflush works on input streams... " >&6; }
35372 if test ${gl_cv_func_fflush_stdin+y}
35373 then :
35374   printf %s "(cached) " >&6
35375 else $as_nop
35376   echo hello world > conftest.txt
35377      if test "$cross_compiling" = yes
35378 then :
35379   case "$host_os" in
35380                   # Guess no on native Windows.
35381           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
35382           *)      gl_cv_func_fflush_stdin=cross ;;
35383         esac
35384
35385 else $as_nop
35386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35387 /* end confdefs.h.  */
35388
35389 #include <stdio.h>
35390 #if HAVE_UNISTD_H
35391 # include <unistd.h>
35392 #else /* on Windows with MSVC */
35393 # include <io.h>
35394 #endif
35395
35396
35397 $gl_mda_defines
35398
35399 int
35400 main (void)
35401 {
35402 FILE *f = fopen ("conftest.txt", "r");
35403          char buffer[10];
35404          int fd;
35405          int c;
35406          if (f == NULL)
35407            return 1;
35408          fd = fileno (f);
35409          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
35410            { fclose (f); return 2; }
35411          /* For deterministic results, ensure f read a bigger buffer.  */
35412          if (lseek (fd, 0, SEEK_CUR) == 5)
35413            { fclose (f); return 3; }
35414          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
35415             on BSD systems and on mingw.  */
35416          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
35417            { fclose (f); return 4; }
35418          if (lseek (fd, 0, SEEK_CUR) != 5)
35419            { fclose (f); return 5; }
35420          /* Verify behaviour of fflush after ungetc. See
35421             <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
35422          /* Verify behaviour of fflush after a backup ungetc.  This fails on
35423             mingw.  */
35424          c = fgetc (f);
35425          ungetc (c, f);
35426          fflush (f);
35427          if (fgetc (f) != c)
35428            { fclose (f); return 6; }
35429          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
35430             on glibc 2.8 and on BSD systems.  */
35431          c = fgetc (f);
35432          ungetc ('@', f);
35433          fflush (f);
35434          if (fgetc (f) != c)
35435            { fclose (f); return 7; }
35436          fclose (f);
35437          return 0;
35438
35439   ;
35440   return 0;
35441 }
35442 _ACEOF
35443 if ac_fn_c_try_run "$LINENO"
35444 then :
35445   gl_cv_func_fflush_stdin=yes
35446 else $as_nop
35447   gl_cv_func_fflush_stdin=no
35448 fi
35449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35450   conftest.$ac_objext conftest.beam conftest.$ac_ext
35451 fi
35452
35453      rm conftest.txt
35454
35455 fi
35456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
35457 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
35458   case "$gl_cv_func_fflush_stdin" in
35459     *yes) gl_func_fflush_stdin=1 ;;
35460     *no)  gl_func_fflush_stdin=0 ;;
35461     *)    gl_func_fflush_stdin='(-1)' ;;
35462   esac
35463
35464 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
35465
35466
35467       case "$gl_cv_func_fflush_stdin" in
35468         *yes) ;;
35469         *) REPLACE_FSEEKO=1 ;;
35470       esac
35471
35472   fi
35473
35474   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
35475
35476
35477
35478
35479
35480
35481
35482
35483   M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
35484
35485
35486       ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
35487 if test "x$ac_cv_func__fseeki64" = xyes
35488 then :
35489   printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
35490
35491 fi
35492
35493   if test $ac_cv_func__fseeki64 = yes; then
35494     ac_fn_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35495 if test "x$ac_cv_have_decl__fseeki64" = xyes
35496 then :
35497   ac_have_decl=1
35498 else $as_nop
35499   ac_have_decl=0
35500 fi
35501 printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
35502
35503   fi
35504
35505   fi
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515           GL_M4_GNULIB_FSEEKO=1
35516
35517
35518
35519
35520
35521 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
35522
35523
35524
35525
35526
35527
35528
35529   case "$host_os" in
35530     mingw* | solaris*)
35531                         REPLACE_FSTAT=1
35532       ;;
35533   esac
35534
35535
35536
35537
35538
35539   if test $ac_cv_func_fchdir = no; then
35540     HAVE_FCHDIR=0
35541   fi
35542
35543     if test $HAVE_FCHDIR = 0; then
35544       case "$gl_cv_func_open_directory_works" in
35545         *yes) ;;
35546         *)
35547           REPLACE_FSTAT=1
35548           ;;
35549       esac
35550     fi
35551
35552
35553   if test $REPLACE_FSTAT = 1; then
35554
35555
35556
35557
35558
35559
35560
35561
35562   M4_LIBOBJS="$M4_LIBOBJS fstat.$ac_objext"
35563
35564     case "$host_os" in
35565       mingw*)
35566
35567
35568
35569
35570
35571
35572
35573
35574   M4_LIBOBJS="$M4_LIBOBJS stat-w32.$ac_objext"
35575
35576         ;;
35577     esac
35578
35579
35580
35581   :
35582
35583   fi
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593           GL_M4_GNULIB_FSTAT=1
35594
35595
35596
35597
35598
35599 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610   if test $ac_cv_func_fstatat = no; then
35611     HAVE_FSTATAT=0
35612   else
35613             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
35614 printf %s "checking whether fstatat (..., 0) works... " >&6; }
35615 if test ${gl_cv_func_fstatat_zero_flag+y}
35616 then :
35617   printf %s "(cached) " >&6
35618 else $as_nop
35619   if test "$cross_compiling" = yes
35620 then :
35621   case "$host_os" in
35622             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
35623             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
35624           esac
35625
35626 else $as_nop
35627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35628 /* end confdefs.h.  */
35629
35630               #include <fcntl.h>
35631               #include <sys/stat.h>
35632               int
35633               main (void)
35634               {
35635                 struct stat a;
35636                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
35637               }
35638
35639 _ACEOF
35640 if ac_fn_c_try_run "$LINENO"
35641 then :
35642   gl_cv_func_fstatat_zero_flag=yes
35643 else $as_nop
35644   gl_cv_func_fstatat_zero_flag=no
35645 fi
35646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35647   conftest.$ac_objext conftest.beam conftest.$ac_ext
35648 fi
35649
35650
35651 fi
35652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
35653 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
35654
35655     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
35656     *yes+*yes) ;;
35657     *) REPLACE_FSTATAT=1 ;;
35658     esac
35659
35660     case $host_os in
35661       solaris*)
35662         REPLACE_FSTATAT=1 ;;
35663     esac
35664
35665     case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
35666       1,*yes)
35667
35668 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
35669
35670          ;;
35671     esac
35672   fi
35673
35674   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
35675
35676
35677
35678
35679
35680
35681
35682
35683   M4_LIBOBJS="$M4_LIBOBJS fstatat.$ac_objext"
35684
35685   fi
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695           GL_M4_GNULIB_FSTATAT=1
35696
35697
35698
35699
35700
35701 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
35702
35703
35704
35705
35706
35707
35708     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
35709     REPLACE_FTELL=1
35710   fi
35711
35712   if test $REPLACE_FTELL = 1; then
35713
35714
35715
35716
35717
35718
35719
35720
35721   M4_LIBOBJS="$M4_LIBOBJS ftell.$ac_objext"
35722
35723   fi
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733           GL_M4_GNULIB_FTELL=1
35734
35735
35736
35737
35738
35739 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752   if test $ac_cv_have_decl_ftello = no; then
35753     HAVE_DECL_FTELLO=0
35754   fi
35755
35756   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
35757 printf %s "checking for ftello... " >&6; }
35758 if test ${gl_cv_func_ftello+y}
35759 then :
35760   printf %s "(cached) " >&6
35761 else $as_nop
35762
35763       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35764 /* end confdefs.h.  */
35765 #include <stdio.h>
35766 int
35767 main (void)
35768 {
35769 ftello (stdin);
35770   ;
35771   return 0;
35772 }
35773 _ACEOF
35774 if ac_fn_c_try_link "$LINENO"
35775 then :
35776   gl_cv_func_ftello=yes
35777 else $as_nop
35778   gl_cv_func_ftello=no
35779 fi
35780 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35781     conftest$ac_exeext conftest.$ac_ext
35782
35783 fi
35784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
35785 printf "%s\n" "$gl_cv_func_ftello" >&6; }
35786   if test $gl_cv_func_ftello = no; then
35787     HAVE_FTELLO=0
35788   else
35789     if test $WINDOWS_64_BIT_OFF_T = 1; then
35790       REPLACE_FTELLO=1
35791     fi
35792     if test $gl_cv_var_stdin_large_offset = no; then
35793       REPLACE_FTELLO=1
35794     fi
35795     if test $REPLACE_FTELLO = 0; then
35796
35797       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
35798 printf %s "checking whether ftello works... " >&6; }
35799 if test ${gl_cv_func_ftello_works+y}
35800 then :
35801   printf %s "(cached) " >&6
35802 else $as_nop
35803
35804                               case "$host_os" in
35805                       # Guess no on Solaris.
35806             solaris*) gl_cv_func_ftello_works="guessing no" ;;
35807                       # Guess yes on native Windows.
35808             mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
35809                       # Guess yes otherwise.
35810             *)        gl_cv_func_ftello_works="guessing yes" ;;
35811           esac
35812           if test "$cross_compiling" = yes
35813 then :
35814   :
35815 else $as_nop
35816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35817 /* end confdefs.h.  */
35818
35819 #include <stdio.h>
35820 #include <stdlib.h>
35821 #include <string.h>
35822 #define TESTFILE "conftest.tmp"
35823 int
35824 main (void)
35825 {
35826   FILE *fp;
35827
35828   /* Create a file with some contents.  */
35829   fp = fopen (TESTFILE, "w");
35830   if (fp == NULL)
35831     return 70;
35832   if (fwrite ("foogarsh", 1, 8, fp) < 8)
35833     { fclose (fp); return 71; }
35834   if (fclose (fp))
35835     return 72;
35836
35837   /* The file's contents is now "foogarsh".  */
35838
35839   /* Try writing after reading to EOF.  */
35840   fp = fopen (TESTFILE, "r+");
35841   if (fp == NULL)
35842     return 73;
35843   if (fseek (fp, -1, SEEK_END))
35844     { fclose (fp); return 74; }
35845   if (!(getc (fp) == 'h'))
35846     { fclose (fp); return 1; }
35847   if (!(getc (fp) == EOF))
35848     { fclose (fp); return 2; }
35849   if (!(ftell (fp) == 8))
35850     { fclose (fp); return 3; }
35851   if (!(ftell (fp) == 8))
35852     { fclose (fp); return 4; }
35853   if (!(putc ('!', fp) == '!'))
35854     { fclose (fp); return 5; }
35855   if (!(ftell (fp) == 9))
35856     { fclose (fp); return 6; }
35857   if (!(fclose (fp) == 0))
35858     return 7;
35859   fp = fopen (TESTFILE, "r");
35860   if (fp == NULL)
35861     return 75;
35862   {
35863     char buf[10];
35864     if (!(fread (buf, 1, 10, fp) == 9))
35865       { fclose (fp); return 10; }
35866     if (!(memcmp (buf, "foogarsh!", 9) == 0))
35867       { fclose (fp); return 11; }
35868   }
35869   if (!(fclose (fp) == 0))
35870     return 12;
35871
35872   /* The file's contents is now "foogarsh!".  */
35873
35874   return 0;
35875 }
35876 _ACEOF
35877 if ac_fn_c_try_run "$LINENO"
35878 then :
35879   gl_cv_func_ftello_works=yes
35880 else $as_nop
35881   gl_cv_func_ftello_works=no
35882 fi
35883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35884   conftest.$ac_objext conftest.beam conftest.$ac_ext
35885 fi
35886
35887
35888 fi
35889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
35890 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
35891       case "$gl_cv_func_ftello_works" in
35892         *yes) ;;
35893         *)
35894           REPLACE_FTELLO=1
35895
35896 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
35897
35898           ;;
35899       esac
35900     fi
35901     if test $REPLACE_FTELLO = 0; then
35902
35903       if test $gl_ftello_broken_after_ungetc = yes; then
35904         REPLACE_FTELLO=1
35905
35906 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
35907
35908       fi
35909     fi
35910   fi
35911
35912   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
35913
35914
35915
35916
35917
35918
35919
35920
35921   M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
35922
35923
35924       ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
35925 if test "x$ac_cv_func__ftelli64" = xyes
35926 then :
35927   printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
35928
35929 fi
35930
35931
35932   fi
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942           GL_M4_GNULIB_FTELLO=1
35943
35944
35945
35946
35947
35948 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
35949
35950
35951
35952
35953
35954
35955
35956
35957   gl_abort_bug=no
35958   case "$host_os" in
35959     mingw*)
35960       gl_cv_func_getcwd_path_max=yes
35961       ;;
35962     *)
35963
35964
35965
35966
35967
35968   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
35969 printf %s "checking whether getcwd handles long file names properly... " >&6; }
35970 if test ${gl_cv_func_getcwd_path_max+y}
35971 then :
35972   printf %s "(cached) " >&6
35973 else $as_nop
35974   # Arrange for deletion of the temporary directory this test creates.
35975      ac_clean_files="$ac_clean_files confdir3"
35976           if test "$cross_compiling" = yes
35977 then :
35978   # Cross-compilation guesses:
35979         case "$host_os" in
35980           aix*) # On AIX, it has the AIX bug.
35981             gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
35982           gnu*) # On Hurd, it is 'yes'.
35983             gl_cv_func_getcwd_path_max='guessing yes' ;;
35984           linux* | kfreebsd*)
35985             # On older Linux+glibc it's 'no, but it is partly working',
35986             # on newer Linux+glibc it's 'yes'.
35987             # On Linux+musl libc, it's 'no, but it is partly working'.
35988             # On kFreeBSD+glibc, it's 'no, but it is partly working'.
35989             gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
35990           *) # If we don't know, obey --enable-cross-guesses.
35991             gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
35992         esac
35993
35994 else $as_nop
35995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35996 /* end confdefs.h.  */
35997
35998 #include <errno.h>
35999 #include <stdlib.h>
36000 #if HAVE_UNISTD_H
36001 # include <unistd.h>
36002 #else
36003 # include <direct.h>
36004 #endif
36005 #include <string.h>
36006 #include <limits.h>
36007 #include <sys/stat.h>
36008 #include <sys/types.h>
36009 #include <fcntl.h>
36010
36011
36012 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
36013 #if HAVE_UNISTD_H
36014 # include <unistd.h>
36015 #endif
36016 #include <limits.h>
36017 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
36018 # include <sys/param.h>
36019 #endif
36020 #if !defined PATH_MAX && defined MAXPATHLEN
36021 # define PATH_MAX MAXPATHLEN
36022 #endif
36023 #ifdef __hpux
36024 # undef PATH_MAX
36025 # define PATH_MAX 1024
36026 #endif
36027 #if defined _WIN32 && ! defined __CYGWIN__
36028 # undef PATH_MAX
36029 # define PATH_MAX 260
36030 #endif
36031
36032
36033 #ifndef AT_FDCWD
36034 # define AT_FDCWD 0
36035 #endif
36036 #ifdef ENAMETOOLONG
36037 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
36038 #else
36039 # define is_ENAMETOOLONG(x) 0
36040 #endif
36041
36042 /* Use the getcwd function, not any macro.  */
36043 #undef getcwd
36044
36045
36046
36047 $gl_mda_defines
36048
36049
36050 #ifndef S_IRWXU
36051 # define S_IRWXU 0700
36052 #endif
36053
36054 /* The length of this name must be 8.  */
36055 #define DIR_NAME "confdir3"
36056 #define DIR_NAME_LEN 8
36057 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
36058
36059 /* The length of "../".  */
36060 #define DOTDOTSLASH_LEN 3
36061
36062 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
36063 #define BUF_SLOP 20
36064
36065 int
36066 main ()
36067 {
36068 #ifndef PATH_MAX
36069   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
36070      at least not on a local file system.  And if we were to start worrying
36071      about remote file systems, we'd have to enable the wrapper function
36072      all of the time, just to be safe.  That's not worth the cost.  */
36073   exit (0);
36074 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
36075         - DIR_NAME_SIZE - BUF_SLOP) \
36076        <= PATH_MAX)
36077   /* FIXME: Assuming there's a system for which this is true,
36078      this should be done in a compile test.  */
36079   exit (0);
36080 #else
36081   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
36082            + DIR_NAME_SIZE + BUF_SLOP];
36083   char *cwd = getcwd (buf, PATH_MAX);
36084   size_t initial_cwd_len;
36085   size_t cwd_len;
36086   int fail = 0;
36087   size_t n_chdirs = 0;
36088
36089   if (cwd == NULL)
36090     exit (10);
36091
36092   cwd_len = initial_cwd_len = strlen (cwd);
36093
36094   while (1)
36095     {
36096       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
36097       char *c = NULL;
36098
36099       cwd_len += DIR_NAME_SIZE;
36100       /* If mkdir or chdir fails, it could be that this system cannot create
36101          any file with an absolute name longer than PATH_MAX, such as cygwin.
36102          If so, leave fail as 0, because the current working directory can't
36103          be too long for getcwd if it can't even be created.  On Linux with
36104          the 9p file system, mkdir fails with error EINVAL when cwd_len gets
36105          too long; ignore this failure because the getcwd() system call
36106          produces good results whereas the gnulib substitute calls getdents64
36107          which fails with error EPROTO.
36108          For other errors, be pessimistic and consider that as a failure,
36109          too.  */
36110       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
36111         {
36112           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
36113             #ifdef __linux__
36114             if (! (errno == EINVAL))
36115             #endif
36116               fail = 20;
36117           break;
36118         }
36119
36120       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
36121         {
36122           struct stat sb;
36123
36124           c = getcwd (buf, PATH_MAX);
36125           if (!c && errno == ENOENT)
36126             {
36127               fail = 11;
36128               break;
36129             }
36130           if (c)
36131             {
36132               fail = 31;
36133               break;
36134             }
36135           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
36136             {
36137               fail = 21;
36138               break;
36139             }
36140
36141           /* Our replacement needs to be able to stat() long ../../paths,
36142              so generate a path larger than PATH_MAX to check,
36143              avoiding the replacement if we can't stat().  */
36144           c = getcwd (buf, cwd_len + 1);
36145           if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
36146             {
36147               fail = 32;
36148               break;
36149             }
36150         }
36151
36152       if (dotdot_max <= cwd_len - initial_cwd_len)
36153         {
36154           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
36155             break;
36156           c = getcwd (buf, cwd_len + 1);
36157           if (!c)
36158             {
36159               if (! (errno == ERANGE || errno == ENOENT
36160                      || is_ENAMETOOLONG (errno)))
36161                 {
36162                   fail = 22;
36163                   break;
36164                 }
36165               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
36166                 {
36167                   fail = 12;
36168                   break;
36169                 }
36170             }
36171         }
36172
36173       if (c && strlen (c) != cwd_len)
36174         {
36175           fail = 23;
36176           break;
36177         }
36178       ++n_chdirs;
36179     }
36180
36181   /* Leaving behind such a deep directory is not polite.
36182      So clean up here, right away, even though the driving
36183      shell script would also clean up.  */
36184   {
36185     size_t i;
36186
36187     /* Try rmdir first, in case the chdir failed.  */
36188     rmdir (DIR_NAME);
36189     for (i = 0; i <= n_chdirs; i++)
36190       {
36191         if (chdir ("..") < 0)
36192           break;
36193         if (rmdir (DIR_NAME) != 0)
36194           break;
36195       }
36196   }
36197
36198   exit (fail);
36199 #endif
36200 }
36201
36202 _ACEOF
36203 if ac_fn_c_try_run "$LINENO"
36204 then :
36205   gl_cv_func_getcwd_path_max=yes
36206 else $as_nop
36207   case $? in
36208         10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
36209         31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
36210         32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
36211         *) gl_cv_func_getcwd_path_max=no;;
36212         esac
36213 fi
36214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36215   conftest.$ac_objext conftest.beam conftest.$ac_ext
36216 fi
36217
36218
36219 fi
36220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
36221 printf "%s\n" "$gl_cv_func_getcwd_path_max" >&6; }
36222
36223       case "$gl_cv_func_getcwd_null" in
36224         *yes)
36225
36226
36227
36228
36229
36230
36231       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
36232 printf %s "checking for getpagesize... " >&6; }
36233 if test ${gl_cv_func_getpagesize+y}
36234 then :
36235   printf %s "(cached) " >&6
36236 else $as_nop
36237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36238 /* end confdefs.h.  */
36239 #include <unistd.h>
36240 int
36241 main (void)
36242 {
36243 return getpagesize();
36244   ;
36245   return 0;
36246 }
36247
36248 _ACEOF
36249 if ac_fn_c_try_link "$LINENO"
36250 then :
36251   gl_cv_func_getpagesize=yes
36252 else $as_nop
36253   gl_cv_func_getpagesize=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_getpagesize" >&5
36260 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
36261
36262   if test $gl_cv_func_getpagesize = yes; then
36263
36264 printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
36265
36266   fi
36267
36268   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
36269 printf %s "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
36270 if test ${gl_cv_func_getcwd_succeeds_beyond_4k+y}
36271 then :
36272   printf %s "(cached) " >&6
36273 else $as_nop
36274   # Remove any remnants of a previous test.
36275      rm -rf confdir-14B---
36276      # Arrange for deletion of the temporary directory this test creates.
36277      ac_clean_files="$ac_clean_files confdir-14B---"
36278           if test "$cross_compiling" = yes
36279 then :
36280   case "$host_os" in
36281              # Guess no otherwise, even on glibc systems and musl systems.
36282           *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
36283         esac
36284
36285 else $as_nop
36286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36287 /* end confdefs.h.  */
36288
36289 #include <errno.h>
36290 #include <stdlib.h>
36291 #if HAVE_UNISTD_H
36292 # include <unistd.h>
36293 #else /* on Windows with MSVC */
36294 # include <direct.h>
36295 #endif
36296 #include <string.h>
36297 #include <sys/stat.h>
36298
36299
36300 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
36301 #if HAVE_UNISTD_H
36302 # include <unistd.h>
36303 #endif
36304 #include <limits.h>
36305 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
36306 # include <sys/param.h>
36307 #endif
36308 #if !defined PATH_MAX && defined MAXPATHLEN
36309 # define PATH_MAX MAXPATHLEN
36310 #endif
36311 #ifdef __hpux
36312 # undef PATH_MAX
36313 # define PATH_MAX 1024
36314 #endif
36315 #if defined _WIN32 && ! defined __CYGWIN__
36316 # undef PATH_MAX
36317 # define PATH_MAX 260
36318 #endif
36319
36320
36321
36322 $gl_mda_defines
36323
36324
36325 #ifndef S_IRWXU
36326 # define S_IRWXU 0700
36327 #endif
36328
36329 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
36330 #if ! HAVE_GETPAGESIZE
36331 # define getpagesize() 0
36332 #endif
36333
36334 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
36335    the 16kB pagesize on ia64 linux.  Those conditions make the code below
36336    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
36337 #define TARGET_LEN (5 * 1024)
36338
36339 int
36340 main ()
36341 {
36342   char *cwd;
36343   size_t initial_cwd_len;
36344   int fail = 0;
36345
36346   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
36347      this relatively expensive and invasive test if that's not true.  */
36348 #ifdef PATH_MAX
36349   int bug_possible = PATH_MAX < getpagesize ();
36350 #else
36351   int bug_possible = 0;
36352 #endif
36353   if (! bug_possible)
36354     return 0;
36355
36356   cwd = getcwd (NULL, 0);
36357   if (cwd == NULL)
36358     return 2;
36359
36360   initial_cwd_len = strlen (cwd);
36361   free (cwd);
36362
36363   if (1)
36364     {
36365       static char const dir_name[] = "confdir-14B---";
36366       size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
36367                               / sizeof dir_name);
36368       size_t d;
36369       for (d = 0; d < desired_depth; d++)
36370         {
36371           if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
36372             {
36373               if (! (errno == ERANGE || errno == ENAMETOOLONG
36374                      || errno == ENOENT))
36375                 fail = 3; /* Unable to construct deep hierarchy.  */
36376               break;
36377             }
36378         }
36379
36380       /* If libc has the bug in question, this invocation of getcwd
36381          results in a failed assertion.  */
36382       cwd = getcwd (NULL, 0);
36383       if (cwd == NULL)
36384         fail = 4; /* getcwd didn't assert, but it failed for a long name
36385                      where the answer could have been learned.  */
36386       free (cwd);
36387
36388       /* Call rmdir first, in case the above chdir failed.  */
36389       rmdir (dir_name);
36390       while (0 < d--)
36391         {
36392           if (chdir ("..") < 0)
36393             {
36394               fail = 5;
36395               break;
36396             }
36397           rmdir (dir_name);
36398         }
36399     }
36400
36401   return fail;
36402 }
36403
36404 _ACEOF
36405 if ac_fn_c_try_run "$LINENO"
36406 then :
36407   gl_cv_func_getcwd_succeeds_beyond_4k=yes
36408 else $as_nop
36409                                                           ret=$?
36410         if test $ret -ge 128 || test $ret = 4; then
36411           gl_cv_func_getcwd_succeeds_beyond_4k=no
36412         else
36413           gl_cv_func_getcwd_succeeds_beyond_4k=yes
36414         fi
36415
36416 fi
36417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36418   conftest.$ac_objext conftest.beam conftest.$ac_ext
36419 fi
36420
36421
36422 fi
36423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
36424 printf "%s\n" "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
36425   case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
36426     *no)
36427       gl_abort_bug=yes
36428       ;;
36429     *)
36430
36431       ;;
36432   esac
36433
36434           ;;
36435       esac
36436       ;;
36437   esac
36438       case "$gl_cv_func_getcwd_path_max" in
36439     *"no" | *"no, it has the AIX bug") ;;
36440     *)
36441
36442 printf "%s\n" "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
36443
36444       ;;
36445   esac
36446   case "$gl_cv_func_getcwd_path_max" in
36447     *"no, but it is partly working")
36448
36449 printf "%s\n" "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
36450
36451       ;;
36452     *"yes, but with shorter paths")
36453
36454 printf "%s\n" "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
36455
36456       ;;
36457   esac
36458
36459   if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
36460      || test $gl_cv_func_getcwd_posix_signature != yes \
36461      || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
36462      || test $gl_abort_bug = yes; then
36463     REPLACE_GETCWD=1
36464   fi
36465
36466   if test $REPLACE_GETCWD = 1; then
36467
36468
36469
36470
36471
36472
36473
36474
36475   M4_LIBOBJS="$M4_LIBOBJS getcwd.$ac_objext"
36476
36477
36478
36479
36480   :
36481
36482   fi
36483
36484
36485 printf "%s\n" "#define GNULIB_GETCWD 1" >>confdefs.h
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497           GL_M4_GNULIB_GETCWD=1
36498
36499
36500
36501
36502
36503 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
36504
36505
36506
36507
36508
36509
36510
36511
36512   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
36513   *yes,yes) ;;
36514   *)
36515         REPLACE_GETCWD=1
36516     ;;
36517   esac
36518
36519   if test $REPLACE_GETCWD = 1; then
36520
36521
36522
36523
36524
36525
36526
36527
36528   M4_LIBOBJS="$M4_LIBOBJS getcwd-lgpl.$ac_objext"
36529
36530   fi
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540           GL_M4_GNULIB_GETCWD=1
36541
36542
36543
36544
36545
36546 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
36547
36548
36549
36550
36551
36552
36553
36554
36555   if test $ac_cv_func_getdtablesize = yes &&
36556      test $ac_cv_have_decl_getdtablesize = yes; then
36557     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
36558 printf %s "checking whether getdtablesize works... " >&6; }
36559 if test ${gl_cv_func_getdtablesize_works+y}
36560 then :
36561   printf %s "(cached) " >&6
36562 else $as_nop
36563                                                    case "$host_os" in
36564          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
36565          *)
36566                                                        if test "$cross_compiling" = yes
36567 then :
36568   case "$host_os" in
36569                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
36570                   gl_cv_func_getdtablesize_works="guessing no" ;;
36571                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
36572               esac
36573
36574 else $as_nop
36575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36576 /* end confdefs.h.  */
36577
36578              #include <unistd.h>
36579
36580
36581 $gl_mda_defines
36582
36583
36584 int
36585 main (void)
36586 {
36587 int size = getdtablesize();
36588                  if (dup2 (0, getdtablesize()) != -1)
36589                    return 1;
36590                  if (size != getdtablesize())
36591                    return 2;
36592
36593   ;
36594   return 0;
36595 }
36596 _ACEOF
36597 if ac_fn_c_try_run "$LINENO"
36598 then :
36599   gl_cv_func_getdtablesize_works=yes
36600 else $as_nop
36601   gl_cv_func_getdtablesize_works=no
36602 fi
36603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36604   conftest.$ac_objext conftest.beam conftest.$ac_ext
36605 fi
36606
36607            ;;
36608        esac
36609
36610 fi
36611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
36612 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
36613     case "$gl_cv_func_getdtablesize_works" in
36614       *yes | "no (limitation)") ;;
36615       *) REPLACE_GETDTABLESIZE=1 ;;
36616     esac
36617   else
36618     HAVE_GETDTABLESIZE=0
36619   fi
36620
36621   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
36622
36623
36624
36625
36626
36627
36628
36629
36630   M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
36631
36632     :
36633   fi
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643           GL_M4_GNULIB_GETDTABLESIZE=1
36644
36645
36646
36647
36648
36649 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662     REPLACE_GETOPT=0
36663     if test -n "$gl_replace_getopt"; then
36664       REPLACE_GETOPT=1
36665     fi
36666
36667   if test $REPLACE_GETOPT = 1; then
36668
36669
36670   if test $ac_cv_header_sys_cdefs_h = yes; then
36671     HAVE_SYS_CDEFS_H=1
36672   else
36673     HAVE_SYS_CDEFS_H=0
36674   fi
36675
36676
36677
36678 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
36679
36680   GETOPT_H=getopt.h
36681   GETOPT_CDEFS_H=getopt-cdefs.h
36682
36683
36684
36685   fi
36686
36687   if test $REPLACE_GETOPT = 1; then
36688
36689
36690
36691
36692
36693
36694
36695
36696   M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706   M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
36707
36708         GNULIB_GL_M4_UNISTD_H_GETOPT=1
36709   fi
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720           GL_M4_GNULIB_GETOPT_POSIX=1
36721
36722
36723
36724
36725
36726 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
36727
36728
36729
36730
36731
36732
36733
36734       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
36735 printf %s "checking for getpagesize... " >&6; }
36736 if test ${gl_cv_func_getpagesize+y}
36737 then :
36738   printf %s "(cached) " >&6
36739 else $as_nop
36740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36741 /* end confdefs.h.  */
36742 #include <unistd.h>
36743 int
36744 main (void)
36745 {
36746 return getpagesize();
36747   ;
36748   return 0;
36749 }
36750
36751 _ACEOF
36752 if ac_fn_c_try_link "$LINENO"
36753 then :
36754   gl_cv_func_getpagesize=yes
36755 else $as_nop
36756   gl_cv_func_getpagesize=no
36757 fi
36758 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36759     conftest$ac_exeext conftest.$ac_ext
36760
36761 fi
36762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
36763 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
36764
36765   if test $gl_cv_func_getpagesize = no; then
36766     HAVE_GETPAGESIZE=0
36767     ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
36768 if test "x$ac_cv_header_OS_h" = xyes
36769 then :
36770   printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
36771
36772 fi
36773
36774     if test $ac_cv_header_OS_h = yes; then
36775       HAVE_OS_H=1
36776     fi
36777     ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
36778 if test "x$ac_cv_header_sys_param_h" = xyes
36779 then :
36780   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
36781
36782 fi
36783
36784     if test $ac_cv_header_sys_param_h = yes; then
36785       HAVE_SYS_PARAM_H=1
36786     fi
36787   fi
36788   case "$host_os" in
36789     mingw*)
36790       REPLACE_GETPAGESIZE=1
36791       ;;
36792   esac
36793       ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
36794 if test "x$ac_cv_have_decl_getpagesize" = xyes
36795 then :
36796
36797 else $as_nop
36798   HAVE_DECL_GETPAGESIZE=0
36799 fi
36800
36801   if test $REPLACE_GETPAGESIZE = 1; then
36802
36803
36804
36805
36806
36807
36808
36809
36810   M4_LIBOBJS="$M4_LIBOBJS getpagesize.$ac_objext"
36811
36812   fi
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822           GL_M4_GNULIB_GETPAGESIZE=1
36823
36824
36825
36826
36827
36828 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
36829
36830
36831
36832
36833
36834
36835   ac_found=0
36836   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
36837 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36838 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
36839 then :
36840   ac_have_decl=1
36841 else $as_nop
36842   ac_have_decl=0
36843 fi
36844 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
36845 if test $ac_have_decl = 1
36846 then :
36847   ac_found=1
36848 fi
36849
36850   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
36851 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36852 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
36853 then :
36854   ac_have_decl=1
36855 else $as_nop
36856   ac_have_decl=0
36857 fi
36858 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
36859 if test $ac_have_decl = 1
36860 then :
36861   ac_found=1
36862 fi
36863
36864   ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
36865 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36866 if test "x$ac_cv_have_decl___argv" = xyes
36867 then :
36868   ac_have_decl=1
36869 else $as_nop
36870   ac_have_decl=0
36871 fi
36872 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
36873 if test $ac_have_decl = 1
36874 then :
36875   ac_found=1
36876 fi
36877
36878
36879   # Incur the cost of this test only if none of the above worked.
36880   if test $ac_found = 0; then
36881     # On OpenBSD 5.1, using the global __progname variable appears to be
36882     # the only way to implement getprogname.
36883     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
36884 printf %s "checking whether __progname is defined in default libraries... " >&6; }
36885 if test ${gl_cv_var___progname+y}
36886 then :
36887   printf %s "(cached) " >&6
36888 else $as_nop
36889
36890         gl_cv_var___progname=
36891         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36892 /* end confdefs.h.  */
36893 extern char *__progname;
36894 int
36895 main (void)
36896 {
36897 return *__progname;
36898
36899   ;
36900   return 0;
36901 }
36902 _ACEOF
36903 if ac_fn_c_try_link "$LINENO"
36904 then :
36905   gl_cv_var___progname=yes
36906
36907 fi
36908 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36909     conftest$ac_exeext conftest.$ac_ext
36910
36911
36912 fi
36913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
36914 printf "%s\n" "$gl_cv_var___progname" >&6; }
36915     if test "$gl_cv_var___progname" = yes; then
36916
36917 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
36918
36919     fi
36920   fi
36921
36922
36923
36924
36925
36926   if test "$ac_cv_func_getrandom" != yes; then
36927     HAVE_GETRANDOM=0
36928   else
36929         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
36930 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
36931 if test ${gl_cv_func_getrandom_ok+y}
36932 then :
36933   printf %s "(cached) " >&6
36934 else $as_nop
36935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36936 /* end confdefs.h.  */
36937 /* Additional includes are needed before <sys/random.h> on uClibc
36938                  and Mac OS X.  */
36939               #include <sys/types.h>
36940               #include <stdlib.h>
36941               #include <sys/random.h>
36942               ssize_t getrandom (void *, size_t, unsigned int);
36943
36944 int
36945 main (void)
36946 {
36947
36948   ;
36949   return 0;
36950 }
36951
36952 _ACEOF
36953 if ac_fn_c_try_compile "$LINENO"
36954 then :
36955   gl_cv_func_getrandom_ok=yes
36956 else $as_nop
36957   gl_cv_func_getrandom_ok=no
36958 fi
36959 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36960
36961 fi
36962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
36963 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
36964     if test $gl_cv_func_getrandom_ok = no; then
36965       REPLACE_GETRANDOM=1
36966     fi
36967   fi
36968
36969   case "$host_os" in
36970     mingw*)
36971       ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
36972
36973 "
36974 if test "x$ac_cv_header_bcrypt_h" = xyes
36975 then :
36976   printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
36977
36978 fi
36979
36980       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
36981 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
36982 if test ${gl_cv_lib_assume_bcrypt+y}
36983 then :
36984   printf %s "(cached) " >&6
36985 else $as_nop
36986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36987 /* end confdefs.h.  */
36988 #include <windows.h>
36989 int
36990 main (void)
36991 {
36992 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
36993                   cannot assume it
36994                 #endif
36995
36996   ;
36997   return 0;
36998 }
36999
37000 _ACEOF
37001 if ac_fn_c_try_compile "$LINENO"
37002 then :
37003   gl_cv_lib_assume_bcrypt=yes
37004 else $as_nop
37005   gl_cv_lib_assume_bcrypt=no
37006 fi
37007 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37008
37009 fi
37010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
37011 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
37012       if test $gl_cv_lib_assume_bcrypt = yes; then
37013
37014 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
37015
37016         LIB_GETRANDOM='-lbcrypt'
37017       else
37018         LIB_GETRANDOM='-ladvapi32'
37019       fi
37020       ;;
37021     *)
37022       LIB_GETRANDOM= ;;
37023   esac
37024
37025
37026   if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
37027
37028
37029
37030
37031
37032
37033
37034
37035   M4_LIBOBJS="$M4_LIBOBJS getrandom.$ac_objext"
37036
37037   fi
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047           GL_M4_GNULIB_GETRANDOM=1
37048
37049
37050
37051
37052
37053 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
37054
37055
37056
37057
37058
37059   # Autoconf 2.61a.99 and earlier don't support linking a file only
37060   # in VPATH builds.  But since GNUmakefile is for maintainer use
37061   # only, it does not matter if we skip the link with older autoconf.
37062   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
37063   # builds, so use a shell variable to bypass this.
37064   GNUmakefile=GNUmakefile
37065   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
37066
37067
37068   LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082           GL_M4_GNULIB_ICONV=1
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097   if test "$am_cv_func_iconv" = yes; then
37098
37099
37100
37101
37102
37103
37104   ICONV_H='iconv.h'
37105    if test -n "$ICONV_H"; then
37106   GL_GENERATE_ICONV_H_TRUE=
37107   GL_GENERATE_ICONV_H_FALSE='#'
37108 else
37109   GL_GENERATE_ICONV_H_TRUE='#'
37110   GL_GENERATE_ICONV_H_FALSE=
37111 fi
37112
37113
37114             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37115 /* end confdefs.h.  */
37116
37117       #include <iconv.h>
37118       #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
37119        gnu_iconv
37120       #endif
37121
37122 _ACEOF
37123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37124   $EGREP "gnu_iconv" >/dev/null 2>&1
37125 then :
37126   gl_func_iconv_gnu=yes
37127 else $as_nop
37128   gl_func_iconv_gnu=no
37129 fi
37130 rm -rf conftest*
37131
37132     if test $gl_func_iconv_gnu = no; then
37133       iconv_flavor=
37134       case "$host_os" in
37135         aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
37136         irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
37137         hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
37138         osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
37139         solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
37140         openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
37141       esac
37142       if test -n "$iconv_flavor"; then
37143
37144 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
37145
37146
37147
37148
37149
37150
37151
37152
37153   ICONV_H='iconv.h'
37154    if test -n "$ICONV_H"; then
37155   GL_GENERATE_ICONV_H_TRUE=
37156   GL_GENERATE_ICONV_H_FALSE='#'
37157 else
37158   GL_GENERATE_ICONV_H_TRUE='#'
37159   GL_GENERATE_ICONV_H_FALSE=
37160 fi
37161
37162
37163   REPLACE_ICONV_OPEN=1
37164
37165       fi
37166     fi
37167
37168   fi
37169
37170   if test $REPLACE_ICONV_OPEN = 1; then
37171
37172
37173
37174
37175
37176
37177
37178
37179   M4_LIBOBJS="$M4_LIBOBJS iconv_open.$ac_objext"
37180
37181   fi
37182   if test $REPLACE_ICONV = 1; then
37183
37184
37185
37186
37187
37188
37189
37190
37191   M4_LIBOBJS="$M4_LIBOBJS iconv.$ac_objext"
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201   M4_LIBOBJS="$M4_LIBOBJS iconv_close.$ac_objext"
37202
37203   fi
37204
37205
37206   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
37207 printf %s "checking whether the compiler generally respects inline... " >&6; }
37208 if test ${gl_cv_c_inline_effective+y}
37209 then :
37210   printf %s "(cached) " >&6
37211 else $as_nop
37212   if test $ac_cv_c_inline = no; then
37213        gl_cv_c_inline_effective=no
37214      else
37215                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37216 /* end confdefs.h.  */
37217
37218 int
37219 main (void)
37220 {
37221 #ifdef __NO_INLINE__
37222                #error "inline is not effective"
37223              #endif
37224   ;
37225   return 0;
37226 }
37227 _ACEOF
37228 if ac_fn_c_try_compile "$LINENO"
37229 then :
37230   gl_cv_c_inline_effective=yes
37231 else $as_nop
37232   gl_cv_c_inline_effective=no
37233 fi
37234 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37235      fi
37236
37237 fi
37238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
37239 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
37240   if test $gl_cv_c_inline_effective = yes; then
37241
37242 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
37243
37244   fi
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
37255 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
37256 if test ${gl_cv_func_isnand_no_libm+y}
37257 then :
37258   printf %s "(cached) " >&6
37259 else $as_nop
37260
37261       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37262 /* end confdefs.h.  */
37263 #include <math.h>
37264              #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37265              # undef isnand
37266              # define isnand(x) __builtin_isnan ((double)(x))
37267              #else
37268              # undef isnand
37269              # define isnand(x) isnan ((double)(x))
37270              #endif
37271              double x;
37272 int
37273 main (void)
37274 {
37275 return isnand (x);
37276   ;
37277   return 0;
37278 }
37279 _ACEOF
37280 if ac_fn_c_try_link "$LINENO"
37281 then :
37282   gl_cv_func_isnand_no_libm=yes
37283 else $as_nop
37284   gl_cv_func_isnand_no_libm=no
37285 fi
37286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37287     conftest$ac_exeext conftest.$ac_ext
37288
37289 fi
37290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
37291 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
37292
37293   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
37294   if test $gl_cv_func_isnand_no_libm = yes; then
37295
37296 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
37297
37298   fi
37299
37300   if test $gl_func_isnand_no_libm != yes; then
37301
37302
37303
37304
37305
37306
37307
37308
37309   M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
37310
37311
37312
37313
37314   fi
37315
37316
37317   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
37318 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
37319 if test ${gl_cv_func_isnanf_no_libm+y}
37320 then :
37321   printf %s "(cached) " >&6
37322 else $as_nop
37323
37324       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37325 /* end confdefs.h.  */
37326 #include <math.h>
37327              #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37328              # undef isnanf
37329              # define isnanf(x) __builtin_isnan ((float)(x))
37330              #elif defined isnan
37331              # undef isnanf
37332              # define isnanf(x) isnan ((float)(x))
37333              #endif
37334              float x;
37335 int
37336 main (void)
37337 {
37338 return isnanf (x);
37339   ;
37340   return 0;
37341 }
37342 _ACEOF
37343 if ac_fn_c_try_link "$LINENO"
37344 then :
37345   gl_cv_func_isnanf_no_libm=yes
37346 else $as_nop
37347   gl_cv_func_isnanf_no_libm=no
37348 fi
37349 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37350     conftest$ac_exeext conftest.$ac_ext
37351
37352 fi
37353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
37354 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
37355
37356   if test $gl_cv_func_isnanf_no_libm = yes; then
37357
37358
37359
37360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
37361 printf %s "checking whether isnan(float) works... " >&6; }
37362 if test ${gl_cv_func_isnanf_works+y}
37363 then :
37364   printf %s "(cached) " >&6
37365 else $as_nop
37366
37367       if test "$cross_compiling" = yes
37368 then :
37369   case "$host_os" in
37370            irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
37371            mingw*) # Guess yes on mingw, no on MSVC.
37372              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37373 /* end confdefs.h.  */
37374
37375 #ifdef __MINGW32__
37376  Known
37377 #endif
37378
37379 _ACEOF
37380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37381   $EGREP "Known" >/dev/null 2>&1
37382 then :
37383   gl_cv_func_isnanf_works="guessing yes"
37384 else $as_nop
37385   gl_cv_func_isnanf_works="guessing no"
37386 fi
37387 rm -rf conftest*
37388
37389              ;;
37390            *) gl_cv_func_isnanf_works="guessing yes" ;;
37391          esac
37392
37393 else $as_nop
37394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37395 /* end confdefs.h.  */
37396
37397 #include <math.h>
37398 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37399 # undef isnanf
37400 # define isnanf(x) __builtin_isnan ((float)(x))
37401 #elif defined isnan
37402 # undef isnanf
37403 # define isnanf(x) isnan ((float)(x))
37404 #endif
37405 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
37406 #ifdef __DECC
37407 static float
37408 NaN ()
37409 {
37410   static float zero = 0.0f;
37411   return zero / zero;
37412 }
37413 #else
37414 # define NaN() (0.0f / 0.0f)
37415 #endif
37416 #define NWORDS \
37417   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37418 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
37419 int main()
37420 {
37421   int result = 0;
37422
37423   if (isnanf (1.0f / 0.0f))
37424     result |= 1;
37425
37426   if (!isnanf (NaN ()))
37427     result |= 2;
37428
37429 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
37430   /* The isnanf function should be immune against changes in the sign bit and
37431      in the mantissa bits.  The xor operation twiddles a bit that can only be
37432      a sign bit or a mantissa bit.  */
37433   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
37434     {
37435       memory_float m;
37436
37437       m.value = NaN ();
37438       /* Set the bits below the exponent to 01111...111.  */
37439       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
37440       m.word[0] |= (1U << (FLT_EXPBIT0_BIT - 1)) - 1;
37441       if (!isnanf (m.value))
37442         result |= 4;
37443     }
37444 #endif
37445
37446   return result;
37447 }
37448 _ACEOF
37449 if ac_fn_c_try_run "$LINENO"
37450 then :
37451   gl_cv_func_isnanf_works=yes
37452 else $as_nop
37453   gl_cv_func_isnanf_works=no
37454 fi
37455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37456   conftest.$ac_objext conftest.beam conftest.$ac_ext
37457 fi
37458
37459
37460 fi
37461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
37462 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
37463
37464   fi
37465   if test $gl_cv_func_isnanf_no_libm = yes \
37466      && { case "$gl_cv_func_isnanf_works" in
37467             *yes) true;;
37468             *) false;;
37469           esac
37470         }; then
37471     gl_func_isnanf_no_libm=yes
37472
37473 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
37474
37475   else
37476     gl_func_isnanf_no_libm=no
37477   fi
37478
37479   if test $gl_func_isnanf_no_libm != yes; then
37480
37481
37482
37483
37484
37485
37486
37487
37488   M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
37489
37490
37491
37492   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
37493 printf %s "checking where to find the exponent in a 'float'... " >&6; }
37494 if test ${gl_cv_cc_float_expbit0+y}
37495 then :
37496   printf %s "(cached) " >&6
37497 else $as_nop
37498
37499       if test "$cross_compiling" = yes
37500 then :
37501   gl_cv_cc_float_expbit0="word 0 bit 23"
37502 else $as_nop
37503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37504 /* end confdefs.h.  */
37505
37506 #include <float.h>
37507 #include <stddef.h>
37508 #include <stdio.h>
37509 #include <string.h>
37510 #define NWORDS \
37511   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37512 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
37513 static unsigned int ored_words[NWORDS];
37514 static unsigned int anded_words[NWORDS];
37515 static void add_to_ored_words (float x)
37516 {
37517   memory_float m;
37518   size_t i;
37519   /* Clear it first, in case
37520      sizeof (float) < sizeof (memory_float).  */
37521   memset (&m, 0, sizeof (memory_float));
37522   m.value = x;
37523   for (i = 0; i < NWORDS; i++)
37524     {
37525       ored_words[i] |= m.word[i];
37526       anded_words[i] &= m.word[i];
37527     }
37528 }
37529 int main ()
37530 {
37531   size_t j;
37532   FILE *fp = fopen ("conftest.out", "w");
37533   if (fp == NULL)
37534     return 1;
37535   for (j = 0; j < NWORDS; j++)
37536     anded_words[j] = ~ (unsigned int) 0;
37537   add_to_ored_words (0.25f);
37538   add_to_ored_words (0.5f);
37539   add_to_ored_words (1.0f);
37540   add_to_ored_words (2.0f);
37541   add_to_ored_words (4.0f);
37542   /* Remove bits that are common (e.g. if representation of the first mantissa
37543      bit is explicit).  */
37544   for (j = 0; j < NWORDS; j++)
37545     ored_words[j] &= ~anded_words[j];
37546   /* Now find the nonzero word.  */
37547   for (j = 0; j < NWORDS; j++)
37548     if (ored_words[j] != 0)
37549       break;
37550   if (j < NWORDS)
37551     {
37552       size_t i;
37553       for (i = j + 1; i < NWORDS; i++)
37554         if (ored_words[i] != 0)
37555           {
37556             fprintf (fp, "unknown");
37557             return (fclose (fp) != 0);
37558           }
37559       for (i = 0; ; i++)
37560         if ((ored_words[j] >> i) & 1)
37561           {
37562             fprintf (fp, "word %d bit %d", (int) j, (int) i);
37563             return (fclose (fp) != 0);
37564           }
37565     }
37566   fprintf (fp, "unknown");
37567   return (fclose (fp) != 0);
37568 }
37569
37570 _ACEOF
37571 if ac_fn_c_try_run "$LINENO"
37572 then :
37573   gl_cv_cc_float_expbit0=`cat conftest.out`
37574 else $as_nop
37575   gl_cv_cc_float_expbit0="unknown"
37576 fi
37577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37578   conftest.$ac_objext conftest.beam conftest.$ac_ext
37579 fi
37580
37581       rm -f conftest.out
37582
37583 fi
37584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
37585 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
37586   case "$gl_cv_cc_float_expbit0" in
37587     word*bit*)
37588       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
37589       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
37590
37591 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
37592
37593
37594 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
37595
37596       ;;
37597   esac
37598
37599
37600   fi
37601
37602
37603   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
37604 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
37605 if test ${gl_cv_func_isnanl_no_libm+y}
37606 then :
37607   printf %s "(cached) " >&6
37608 else $as_nop
37609
37610       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37611 /* end confdefs.h.  */
37612 #include <math.h>
37613              #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37614              # undef isnanl
37615              # define isnanl(x) __builtin_isnan ((long double)(x))
37616              #elif defined isnan
37617              # undef isnanl
37618              # define isnanl(x) isnan ((long double)(x))
37619              #endif
37620              long double x;
37621 int
37622 main (void)
37623 {
37624 return isnanl (x);
37625   ;
37626   return 0;
37627 }
37628 _ACEOF
37629 if ac_fn_c_try_link "$LINENO"
37630 then :
37631   gl_cv_func_isnanl_no_libm=yes
37632 else $as_nop
37633   gl_cv_func_isnanl_no_libm=no
37634 fi
37635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37636     conftest$ac_exeext conftest.$ac_ext
37637
37638 fi
37639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
37640 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
37641
37642   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
37643   if test $gl_func_isnanl_no_libm = yes; then
37644
37645
37646
37647
37648      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
37649 printf %s "checking whether isnanl works... " >&6; }
37650 if test ${gl_cv_func_isnanl_works+y}
37651 then :
37652   printf %s "(cached) " >&6
37653 else $as_nop
37654
37655       if test "$cross_compiling" = yes
37656 then :
37657   case "$host_os" in
37658            mingw*) # Guess yes on mingw, no on MSVC.
37659              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37660 /* end confdefs.h.  */
37661
37662 #ifdef __MINGW32__
37663  Known
37664 #endif
37665
37666 _ACEOF
37667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37668   $EGREP "Known" >/dev/null 2>&1
37669 then :
37670   gl_cv_func_isnanl_works="guessing yes"
37671 else $as_nop
37672   gl_cv_func_isnanl_works="guessing no"
37673 fi
37674 rm -rf conftest*
37675
37676              ;;
37677            *) gl_cv_func_isnanl_works="guessing yes" ;;
37678          esac
37679
37680 else $as_nop
37681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37682 /* end confdefs.h.  */
37683
37684 #include <float.h>
37685 #include <limits.h>
37686 #include <math.h>
37687 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37688 # undef isnanl
37689 # define isnanl(x) __builtin_isnan ((long double)(x))
37690 #elif defined isnan
37691 # undef isnanl
37692 # define isnanl(x) isnan ((long double)(x))
37693 #endif
37694 #define NWORDS \
37695   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37696 typedef union { unsigned int word[NWORDS]; long double value; }
37697         memory_long_double;
37698 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
37699    runtime type conversion.  */
37700 #ifdef __sgi
37701 static long double NaNl ()
37702 {
37703   double zero = 0.0;
37704   return zero / zero;
37705 }
37706 #else
37707 # define NaNl() (0.0L / 0.0L)
37708 #endif
37709 int main ()
37710 {
37711   int result = 0;
37712
37713   if (!isnanl (NaNl ()))
37714     result |= 1;
37715
37716   {
37717     memory_long_double m;
37718     unsigned int i;
37719
37720     /* The isnanl function should be immune against changes in the sign bit and
37721        in the mantissa bits.  The xor operation twiddles a bit that can only be
37722        a sign bit or a mantissa bit (since the exponent never extends to
37723        bit 31).  */
37724     m.value = NaNl ();
37725     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
37726     for (i = 0; i < NWORDS; i++)
37727       m.word[i] |= 1;
37728     if (!isnanl (m.value))
37729       result |= 1;
37730   }
37731
37732 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
37733 /* Representation of an 80-bit 'long double' as an initializer for a sequence
37734    of 'unsigned int' words.  */
37735 # ifdef WORDS_BIGENDIAN
37736 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
37737      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
37738        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
37739        (unsigned int) (mantlo) << 16                                        \
37740      }
37741 # else
37742 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
37743      { mantlo, manthi, exponent }
37744 # endif
37745   { /* Quiet NaN.  */
37746     static memory_long_double x =
37747       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
37748     if (!isnanl (x.value))
37749       result |= 2;
37750   }
37751   {
37752     /* Signalling NaN.  */
37753     static memory_long_double x =
37754       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
37755     if (!isnanl (x.value))
37756       result |= 2;
37757   }
37758   /* isnanl should return something even for noncanonical values.  */
37759   { /* Pseudo-NaN.  */
37760     static memory_long_double x =
37761       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
37762     if (isnanl (x.value) && !isnanl (x.value))
37763       result |= 4;
37764   }
37765   { /* Pseudo-Infinity.  */
37766     static memory_long_double x =
37767       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
37768     if (isnanl (x.value) && !isnanl (x.value))
37769       result |= 8;
37770   }
37771   { /* Pseudo-Zero.  */
37772     static memory_long_double x =
37773       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
37774     if (isnanl (x.value) && !isnanl (x.value))
37775       result |= 16;
37776   }
37777   { /* Unnormalized number.  */
37778     static memory_long_double x =
37779       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
37780     if (isnanl (x.value) && !isnanl (x.value))
37781       result |= 32;
37782   }
37783   { /* Pseudo-Denormal.  */
37784     static memory_long_double x =
37785       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
37786     if (isnanl (x.value) && !isnanl (x.value))
37787       result |= 64;
37788   }
37789 #endif
37790
37791   return result;
37792 }
37793 _ACEOF
37794 if ac_fn_c_try_run "$LINENO"
37795 then :
37796   gl_cv_func_isnanl_works=yes
37797 else $as_nop
37798   gl_cv_func_isnanl_works=no
37799 fi
37800 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37801   conftest.$ac_objext conftest.beam conftest.$ac_ext
37802 fi
37803
37804
37805 fi
37806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
37807 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
37808
37809     case "$gl_cv_func_isnanl_works" in
37810       *yes) ;;
37811       *)    gl_func_isnanl_no_libm=no ;;
37812     esac
37813   fi
37814   if test $gl_func_isnanl_no_libm = yes; then
37815
37816 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
37817
37818   fi
37819
37820   if test $gl_func_isnanl_no_libm != yes; then
37821
37822
37823
37824
37825
37826
37827
37828
37829   M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
37830
37831
37832
37833
37834      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
37835 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
37836 if test ${gl_cv_cc_long_double_expbit0+y}
37837 then :
37838   printf %s "(cached) " >&6
37839 else $as_nop
37840
37841       if test "$cross_compiling" = yes
37842 then :
37843
37844                               gl_cv_cc_long_double_expbit0="unknown"
37845           case "$host_os" in
37846             mingw*) # On native Windows (little-endian), we know the result
37847                     # in two cases: mingw, MSVC.
37848               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37849 /* end confdefs.h.  */
37850
37851 #ifdef __MINGW32__
37852  Known
37853 #endif
37854
37855 _ACEOF
37856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37857   $EGREP "Known" >/dev/null 2>&1
37858 then :
37859   gl_cv_cc_long_double_expbit0="word 2 bit 0"
37860 fi
37861 rm -rf conftest*
37862
37863               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37864 /* end confdefs.h.  */
37865
37866 #ifdef _MSC_VER
37867  Known
37868 #endif
37869
37870 _ACEOF
37871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37872   $EGREP "Known" >/dev/null 2>&1
37873 then :
37874   gl_cv_cc_long_double_expbit0="word 1 bit 20"
37875 fi
37876 rm -rf conftest*
37877
37878               ;;
37879           esac
37880
37881 else $as_nop
37882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37883 /* end confdefs.h.  */
37884
37885 #include <float.h>
37886 #include <stddef.h>
37887 #include <stdio.h>
37888 #include <string.h>
37889 #define NWORDS \
37890   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37891 typedef union { long double value; unsigned int word[NWORDS]; }
37892         memory_long_double;
37893 static unsigned int ored_words[NWORDS];
37894 static unsigned int anded_words[NWORDS];
37895 static void add_to_ored_words (long double *x)
37896 {
37897   memory_long_double m;
37898   size_t i;
37899   /* Clear it first, in case
37900      sizeof (long double) < sizeof (memory_long_double).  */
37901   memset (&m, 0, sizeof (memory_long_double));
37902   m.value = *x;
37903   for (i = 0; i < NWORDS; i++)
37904     {
37905       ored_words[i] |= m.word[i];
37906       anded_words[i] &= m.word[i];
37907     }
37908 }
37909 int main ()
37910 {
37911   static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
37912   size_t j;
37913   FILE *fp = fopen ("conftest.out", "w");
37914   if (fp == NULL)
37915     return 1;
37916   for (j = 0; j < NWORDS; j++)
37917     anded_words[j] = ~ (unsigned int) 0;
37918   for (j = 0; j < 5; j++)
37919     add_to_ored_words (&samples[j]);
37920   /* Remove bits that are common (e.g. if representation of the first mantissa
37921      bit is explicit).  */
37922   for (j = 0; j < NWORDS; j++)
37923     ored_words[j] &= ~anded_words[j];
37924   /* Now find the nonzero word.  */
37925   for (j = 0; j < NWORDS; j++)
37926     if (ored_words[j] != 0)
37927       break;
37928   if (j < NWORDS)
37929     {
37930       size_t i;
37931       for (i = j + 1; i < NWORDS; i++)
37932         if (ored_words[i] != 0)
37933           {
37934             fprintf (fp, "unknown");
37935             return (fclose (fp) != 0);
37936           }
37937       for (i = 0; ; i++)
37938         if ((ored_words[j] >> i) & 1)
37939           {
37940             fprintf (fp, "word %d bit %d", (int) j, (int) i);
37941             return (fclose (fp) != 0);
37942           }
37943     }
37944   fprintf (fp, "unknown");
37945   return (fclose (fp) != 0);
37946 }
37947
37948 _ACEOF
37949 if ac_fn_c_try_run "$LINENO"
37950 then :
37951   gl_cv_cc_long_double_expbit0=`cat conftest.out`
37952 else $as_nop
37953   gl_cv_cc_long_double_expbit0="unknown"
37954 fi
37955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37956   conftest.$ac_objext conftest.beam conftest.$ac_ext
37957 fi
37958
37959       rm -f conftest.out
37960
37961 fi
37962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
37963 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
37964   case "$gl_cv_cc_long_double_expbit0" in
37965     word*bit*)
37966       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
37967       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
37968
37969 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
37970
37971
37972 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
37973
37974       ;;
37975   esac
37976
37977
37978
37979   fi
37980
37981
37982
37983
37984
37985   ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
37986     #include <wchar.h>
37987     #include <wctype.h>
37988
37989 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37990 if test "x$ac_cv_have_decl_iswblank" = xyes
37991 then :
37992   ac_have_decl=1
37993 else $as_nop
37994   ac_have_decl=0
37995 fi
37996 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
37997
37998   if test $ac_cv_func_iswblank = no; then
37999     HAVE_ISWBLANK=0
38000     if test $ac_cv_have_decl_iswblank = yes; then
38001       REPLACE_ISWBLANK=1
38002     fi
38003   fi
38004   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38005         :
38006   else
38007     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
38008             :
38009     fi
38010   fi
38011
38012
38013   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38014     :
38015   else
38016     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
38017
38018
38019
38020
38021
38022
38023
38024
38025   M4_LIBOBJS="$M4_LIBOBJS iswblank.$ac_objext"
38026
38027     fi
38028   fi
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038           GL_M4_GNULIB_ISWBLANK=1
38039
38040
38041
38042
38043
38044 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38057         REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
38058   else
38059     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
38060 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
38061 if test ${gl_cv_func_iswdigit_works+y}
38062 then :
38063   printf %s "(cached) " >&6
38064 else $as_nop
38065
38066                      case "$host_os" in
38067          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
38068          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
38069            gl_cv_func_iswdigit_works="guessing no" ;;
38070          # Guess yes otherwise.
38071          *) gl_cv_func_iswdigit_works="guessing yes" ;;
38072        esac
38073        if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
38074          if test "$cross_compiling" = yes
38075 then :
38076   :
38077 else $as_nop
38078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38079 /* end confdefs.h.  */
38080
38081 #include <locale.h>
38082 #include <stdlib.h>
38083 #include <string.h>
38084 #include <wchar.h>
38085 #include <wctype.h>
38086
38087 /* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
38088 static int
38089 for_character (const char *s, size_t n)
38090 {
38091   mbstate_t state;
38092   wchar_t wc;
38093   size_t ret;
38094
38095   memset (&state, '\0', sizeof (mbstate_t));
38096   wc = (wchar_t) 0xBADFACE;
38097   ret = mbrtowc (&wc, s, n, &state);
38098   if (ret != n)
38099     abort ();
38100
38101   return iswdigit (wc);
38102 }
38103
38104 int
38105 main (int argc, char *argv[])
38106 {
38107   int is;
38108   int result = 0;
38109
38110   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
38111     {
38112       /* This fails on mingw, MSVC 14.  */
38113       /* U+00B2 SUPERSCRIPT TWO */
38114       is = for_character ("\262", 1);
38115       if (!(is == 0))
38116         result |= 1;
38117     }
38118   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38119     {
38120       /* This fails on NetBSD 8.0.  */
38121       /* U+FF11 FULLWIDTH DIGIT ONE */
38122       is = for_character ("\243\261", 2);
38123       if (!(is == 0))
38124         result |= 2;
38125     }
38126   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38127     {
38128       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
38129       /* U+0663 ARABIC-INDIC DIGIT THREE */
38130       is = for_character ("\331\243", 2);
38131       if (!(is == 0))
38132         result |= 4;
38133       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
38134       /* U+FF11 FULLWIDTH DIGIT ONE */
38135       is = for_character ("\357\274\221", 3);
38136       if (!(is == 0))
38137         result |= 8;
38138     }
38139   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38140     {
38141       /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
38142       /* U+FF11 FULLWIDTH DIGIT ONE */
38143       is = for_character ("\243\261", 2);
38144       if (!(is == 0))
38145         result |= 16;
38146     }
38147   return result;
38148 }
38149 _ACEOF
38150 if ac_fn_c_try_run "$LINENO"
38151 then :
38152   gl_cv_func_iswdigit_works=yes
38153 else $as_nop
38154   gl_cv_func_iswdigit_works=no
38155 fi
38156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38157   conftest.$ac_objext conftest.beam conftest.$ac_ext
38158 fi
38159
38160        fi
38161
38162 fi
38163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
38164 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
38165     case "$gl_cv_func_iswdigit_works" in
38166       *yes) ;;
38167       *) REPLACE_ISWDIGIT=1 ;;
38168     esac
38169   fi
38170
38171   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38172     :
38173   else
38174     if test $REPLACE_ISWDIGIT = 1; then
38175
38176
38177
38178
38179
38180
38181
38182
38183   M4_LIBOBJS="$M4_LIBOBJS iswdigit.$ac_objext"
38184
38185     fi
38186   fi
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196           GL_M4_GNULIB_ISWDIGIT=1
38197
38198
38199
38200
38201
38202 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38214         REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
38215   else
38216     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
38217 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
38218 if test ${gl_cv_func_iswxdigit_works+y}
38219 then :
38220   printf %s "(cached) " >&6
38221 else $as_nop
38222
38223                      case "$host_os" in
38224          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
38225          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
38226            gl_cv_func_iswxdigit_works="guessing no" ;;
38227          # Guess yes otherwise.
38228          *) gl_cv_func_iswxdigit_works="guessing yes" ;;
38229        esac
38230        if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
38231          if test "$cross_compiling" = yes
38232 then :
38233   :
38234 else $as_nop
38235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38236 /* end confdefs.h.  */
38237
38238 #include <locale.h>
38239 #include <stdlib.h>
38240 #include <string.h>
38241 #include <wchar.h>
38242 #include <wctype.h>
38243
38244 /* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
38245 static int
38246 for_character (const char *s, size_t n)
38247 {
38248   mbstate_t state;
38249   wchar_t wc;
38250   size_t ret;
38251
38252   memset (&state, '\0', sizeof (mbstate_t));
38253   wc = (wchar_t) 0xBADFACE;
38254   ret = mbrtowc (&wc, s, n, &state);
38255   if (ret != n)
38256     abort ();
38257
38258   return iswxdigit (wc);
38259 }
38260
38261 int
38262 main (int argc, char *argv[])
38263 {
38264   int is;
38265   int result = 0;
38266
38267   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38268     {
38269       /* This fails on NetBSD 8.0.  */
38270       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
38271       is = for_character ("\243\301", 2);
38272       if (!(is == 0))
38273         result |= 1;
38274     }
38275   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38276     {
38277       /* This fails on FreeBSD 13.0.  */
38278       /* U+0663 ARABIC-INDIC DIGIT THREE */
38279       is = for_character ("\331\243", 2);
38280       if (!(is == 0))
38281         result |= 2;
38282       /* This fails on MSVC 14.  */
38283       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
38284       is = for_character ("\357\274\241", 3);
38285       if (!(is == 0))
38286         result |= 4;
38287     }
38288   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38289     {
38290       /* This fails on Solaris 10, Solaris 11.4.  */
38291       /* U+FF11 FULLWIDTH DIGIT ONE */
38292       is = for_character ("\243\261", 2);
38293       if (!(is == 0))
38294         result |= 8;
38295     }
38296   return result;
38297 }
38298 _ACEOF
38299 if ac_fn_c_try_run "$LINENO"
38300 then :
38301   gl_cv_func_iswxdigit_works=yes
38302 else $as_nop
38303   gl_cv_func_iswxdigit_works=no
38304 fi
38305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38306   conftest.$ac_objext conftest.beam conftest.$ac_ext
38307 fi
38308
38309        fi
38310
38311 fi
38312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
38313 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
38314     case "$gl_cv_func_iswxdigit_works" in
38315       *yes) ;;
38316       *) REPLACE_ISWXDIGIT=1 ;;
38317     esac
38318   fi
38319
38320   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38321     :
38322   else
38323     if test $REPLACE_ISWXDIGIT = 1; then
38324
38325
38326
38327
38328
38329
38330
38331
38332   M4_LIBOBJS="$M4_LIBOBJS iswxdigit.$ac_objext"
38333
38334     fi
38335   fi
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345           GL_M4_GNULIB_ISWXDIGIT=1
38346
38347
38348
38349
38350
38351 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
38364 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
38365 if test ${gl_cv_c___inline+y}
38366 then :
38367   printf %s "(cached) " >&6
38368 else $as_nop
38369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38370 /* end confdefs.h.  */
38371 typedef int foo_t;
38372            static __inline foo_t foo (void) { return 0; }
38373 int
38374 main (void)
38375 {
38376 return foo ();
38377   ;
38378   return 0;
38379 }
38380 _ACEOF
38381 if ac_fn_c_try_compile "$LINENO"
38382 then :
38383   gl_cv_c___inline=yes
38384 else $as_nop
38385   gl_cv_c___inline=no
38386 fi
38387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38388 fi
38389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
38390 printf "%s\n" "$gl_cv_c___inline" >&6; }
38391   if test $gl_cv_c___inline = yes; then
38392
38393 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
38394
38395   fi
38396
38397
38398
38399
38400
38401     LOCALCHARSET_TESTS_ENVIRONMENT=
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413   if test $REPLACE_STRUCT_LCONV = 1; then
38414     REPLACE_LOCALECONV=1
38415   fi
38416
38417   if test $REPLACE_LOCALECONV = 1; then
38418
38419
38420
38421
38422
38423
38424
38425
38426   M4_LIBOBJS="$M4_LIBOBJS localeconv.$ac_objext"
38427
38428
38429   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
38430 "
38431 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
38432 then :
38433
38434 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
38435
38436
38437 fi
38438
38439
38440   fi
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450           GL_M4_GNULIB_LOCALECONV=1
38451
38452
38453
38454
38455
38456 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467   if test $HAVE_LOCALE_T = 1; then
38468
38469     gl_func_newlocale="$ac_cv_func_newlocale"
38470     gl_func_duplocale="$ac_cv_func_duplocale"
38471     gl_func_freelocale="$ac_cv_func_freelocale"
38472   else
38473             gl_func_newlocale=no
38474     gl_func_duplocale=no
38475     gl_func_freelocale=no
38476   fi
38477   if test $gl_func_newlocale != yes; then
38478     HAVE_NEWLOCALE=0
38479   fi
38480   if test $gl_func_duplocale != yes; then
38481     HAVE_DUPLOCALE=0
38482   fi
38483   if test $gl_func_freelocale != yes; then
38484     HAVE_FREELOCALE=0
38485   fi
38486   if test $gt_localename_enhances_locale_funcs = yes; then
38487     REPLACE_NEWLOCALE=1
38488     REPLACE_DUPLOCALE=1
38489     REPLACE_FREELOCALE=1
38490   fi
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501           GL_M4_GNULIB_LOCALENAME=1
38502
38503
38504
38505
38506
38507 printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
38508
38509
38510
38511
38512
38513   if test "$gl_threads_api" = posix; then
38514     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
38515     # pthread_rwlock_* functions.
38516     has_rwlock=false
38517     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
38518 "
38519 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
38520 then :
38521   has_rwlock=true
38522
38523 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
38524
38525 fi
38526
38527     if $has_rwlock; then
38528
38529
38530      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
38531 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
38532 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
38533 then :
38534   printf %s "(cached) " >&6
38535 else $as_nop
38536   save_LIBS="$LIBS"
38537      LIBS="$LIBS $LIBMULTITHREAD"
38538      if test "$cross_compiling" = yes
38539 then :
38540   case "$host_os" in
38541                          # Guess no on glibc systems.
38542           *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38543                          # Guess no on musl systems.
38544           *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38545                          # Guess no on bionic systems.
38546           *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38547                          # Guess yes on native Windows with the mingw-w64 winpthreads library.
38548                          # Guess no on native Windows with the gnulib windows-rwlock module.
38549           mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
38550                            gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
38551                          else
38552                            gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
38553                          fi
38554                          ;;
38555                          # If we don't know, obey --enable-cross-guesses.
38556           *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
38557          esac
38558
38559 else $as_nop
38560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38561 /* end confdefs.h.  */
38562
38563 #include <errno.h>
38564 #include <pthread.h>
38565 #include <stdlib.h>
38566 #include <unistd.h>
38567
38568 #define SUCCEED() exit (0)
38569 #define FAILURE() exit (1)
38570 #define UNEXPECTED(n) (exit (10 + (n)))
38571
38572 /* The main thread creates the waiting writer and the requesting reader threads
38573    in the default way; this guarantees that they have the same priority.
38574    We can reuse the main thread as first reader thread.  */
38575
38576 static pthread_rwlock_t lock;
38577 static pthread_t reader1;
38578 static pthread_t writer;
38579 static pthread_t reader2;
38580 static pthread_t timer;
38581 /* Used to pass control from writer to reader2 and from reader2 to timer,
38582    as in a relay race.
38583    Passing control from one running thread to another running thread
38584    is most likely faster than to create the second thread.  */
38585 static pthread_mutex_t baton;
38586
38587 static void *
38588 timer_func (void *ignored)
38589 {
38590   /* Step 13 (can be before or after step 12):
38591      The timer thread takes the baton, then waits a moment to make sure
38592      it can tell whether the second reader thread is blocked at step 12.  */
38593   if (pthread_mutex_lock (&baton))
38594     UNEXPECTED (13);
38595   usleep (100000);
38596   /* By the time we get here, it's clear that the second reader thread is
38597      blocked at step 12.  This is the desired behaviour.  */
38598   SUCCEED ();
38599 }
38600
38601 static void *
38602 reader2_func (void *ignored)
38603 {
38604   int err;
38605
38606   /* Step 8 (can be before or after step 7):
38607      The second reader thread takes the baton, then waits a moment to make sure
38608      the writer thread has reached step 7.  */
38609   if (pthread_mutex_lock (&baton))
38610     UNEXPECTED (8);
38611   usleep (100000);
38612   /* Step 9: The second reader thread requests the lock.  */
38613   err = pthread_rwlock_tryrdlock (&lock);
38614   if (err == 0)
38615     FAILURE ();
38616   else if (err != EBUSY)
38617     UNEXPECTED (9);
38618   /* Step 10: Launch a timer, to test whether the next call blocks.  */
38619   if (pthread_create (&timer, NULL, timer_func, NULL))
38620     UNEXPECTED (10);
38621   /* Step 11: Release the baton.  */
38622   if (pthread_mutex_unlock (&baton))
38623     UNEXPECTED (11);
38624   /* Step 12: The second reader thread requests the lock.  */
38625   err = pthread_rwlock_rdlock (&lock);
38626   if (err == 0)
38627     FAILURE ();
38628   else
38629     UNEXPECTED (12);
38630 }
38631
38632 static void *
38633 writer_func (void *ignored)
38634 {
38635   /* Step 4: Take the baton, so that the second reader thread does not go ahead
38636      too early.  */
38637   if (pthread_mutex_lock (&baton))
38638     UNEXPECTED (4);
38639   /* Step 5: Create the second reader thread.  */
38640   if (pthread_create (&reader2, NULL, reader2_func, NULL))
38641     UNEXPECTED (5);
38642   /* Step 6: Release the baton.  */
38643   if (pthread_mutex_unlock (&baton))
38644     UNEXPECTED (6);
38645   /* Step 7: The writer thread requests the lock.  */
38646   if (pthread_rwlock_wrlock (&lock))
38647     UNEXPECTED (7);
38648   return NULL;
38649 }
38650
38651 int
38652 main ()
38653 {
38654   reader1 = pthread_self ();
38655
38656   /* Step 1: The main thread initializes the lock and the baton.  */
38657   if (pthread_rwlock_init (&lock, NULL))
38658     UNEXPECTED (1);
38659   if (pthread_mutex_init (&baton, NULL))
38660     UNEXPECTED (1);
38661   /* Step 2: The main thread acquires the lock as a reader.  */
38662   if (pthread_rwlock_rdlock (&lock))
38663     UNEXPECTED (2);
38664   /* Step 3: Create the writer thread.  */
38665   if (pthread_create (&writer, NULL, writer_func, NULL))
38666     UNEXPECTED (3);
38667   /* Job done.  Go to sleep.  */
38668   for (;;)
38669     {
38670       sleep (1);
38671     }
38672 }
38673
38674 _ACEOF
38675 if ac_fn_c_try_run "$LINENO"
38676 then :
38677   gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
38678 else $as_nop
38679   gl_cv_pthread_rwlock_rdlock_prefer_writer=no
38680 fi
38681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38682   conftest.$ac_objext conftest.beam conftest.$ac_ext
38683 fi
38684
38685      LIBS="$save_LIBS"
38686
38687 fi
38688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
38689 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
38690   case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
38691     *yes)
38692
38693 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
38694
38695       ;;
38696   esac
38697
38698     fi
38699     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
38700     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38701 /* end confdefs.h.  */
38702
38703       #include <pthread.h>
38704 int
38705 main (void)
38706 {
38707
38708 #if __FreeBSD__ == 4
38709 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
38710 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
38711        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
38712 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
38713 #else
38714 int x = (int)PTHREAD_MUTEX_RECURSIVE;
38715 return !x;
38716 #endif
38717
38718   ;
38719   return 0;
38720 }
38721 _ACEOF
38722 if ac_fn_c_try_compile "$LINENO"
38723 then :
38724
38725 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
38726
38727 fi
38728 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38729   fi
38730   :
38731
38732
38733
38734 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
38735
38736
38737
38738
38739
38740
38741
38742
38743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
38744 printf %s "checking whether lseek detects pipes... " >&6; }
38745 if test ${gl_cv_func_lseek_pipe+y}
38746 then :
38747   printf %s "(cached) " >&6
38748 else $as_nop
38749   case "$host_os" in
38750        mingw*)
38751                                                                gl_cv_func_lseek_pipe=no
38752          ;;
38753        *)
38754          if test $cross_compiling = no; then
38755            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38756 /* end confdefs.h.  */
38757
38758 #include <sys/types.h> /* for off_t */
38759 #include <stdio.h> /* for SEEK_CUR */
38760 #if HAVE_UNISTD_H
38761 # include <unistd.h>
38762 #else /* on Windows with MSVC */
38763 # include <io.h>
38764 #endif
38765
38766
38767 $gl_mda_defines
38768
38769 int
38770 main (void)
38771 {
38772
38773   /* Exit with success only if stdin is seekable.  */
38774   return lseek (0, (off_t)0, SEEK_CUR) < 0;
38775
38776   ;
38777   return 0;
38778 }
38779 _ACEOF
38780 if ac_fn_c_try_link "$LINENO"
38781 then :
38782   if test -s conftest$ac_exeext \
38783                  && ./conftest$ac_exeext < conftest.$ac_ext \
38784                  && test 1 = "`echo hi \
38785                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
38786                 gl_cv_func_lseek_pipe=yes
38787               else
38788                 gl_cv_func_lseek_pipe=no
38789               fi
38790
38791 else $as_nop
38792   gl_cv_func_lseek_pipe=no
38793 fi
38794 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38795     conftest$ac_exeext conftest.$ac_ext
38796          else
38797            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38798 /* end confdefs.h.  */
38799
38800 #if defined __BEOS__
38801 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
38802   Choke me.
38803 #endif
38804 _ACEOF
38805 if ac_fn_c_try_compile "$LINENO"
38806 then :
38807   gl_cv_func_lseek_pipe=yes
38808 else $as_nop
38809   gl_cv_func_lseek_pipe=no
38810 fi
38811 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38812          fi
38813          ;;
38814      esac
38815
38816 fi
38817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
38818 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
38819   if test $gl_cv_func_lseek_pipe = no; then
38820     REPLACE_LSEEK=1
38821
38822 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
38823
38824   fi
38825
38826
38827   if test $WINDOWS_64_BIT_OFF_T = 1; then
38828     REPLACE_LSEEK=1
38829   fi
38830
38831   if test $REPLACE_LSEEK = 1; then
38832
38833
38834
38835
38836
38837
38838
38839
38840   M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
38841
38842   fi
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852           GL_M4_GNULIB_LSEEK=1
38853
38854
38855
38856
38857
38858 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
38859
38860
38861
38862
38863
38864
38865
38866   if test $ac_cv_func_lstat = yes; then
38867
38868     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
38869       solaris* | *no)
38870         REPLACE_LSTAT=1
38871         ;;
38872     esac
38873   else
38874     HAVE_LSTAT=0
38875   fi
38876
38877   if test $REPLACE_LSTAT = 1; then
38878
38879
38880
38881
38882
38883
38884
38885
38886   M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
38887
38888     :
38889   fi
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899           GL_M4_GNULIB_LSTAT=1
38900
38901
38902
38903
38904
38905 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915   if test $REPLACE_MALLOC = 0; then
38916
38917     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
38918 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
38919 if test ${ac_cv_func_malloc_0_nonnull+y}
38920 then :
38921   printf %s "(cached) " >&6
38922 else $as_nop
38923   if test "$cross_compiling" = yes
38924 then :
38925   case "$host_os" in
38926           # Guess yes on platforms where we know the result.
38927           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
38928           | gnu* | *-musl* | midnightbsd* \
38929           | hpux* | solaris* | cygwin* | mingw* | msys* )
38930             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
38931           # If we don't know, obey --enable-cross-guesses.
38932           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
38933         esac
38934
38935 else $as_nop
38936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38937 /* end confdefs.h.  */
38938 #include <stdlib.h>
38939
38940 int
38941 main (void)
38942 {
38943 void *p = malloc (0);
38944             int result = !p;
38945             free (p);
38946             return result;
38947   ;
38948   return 0;
38949 }
38950
38951 _ACEOF
38952 if ac_fn_c_try_run "$LINENO"
38953 then :
38954   ac_cv_func_malloc_0_nonnull=yes
38955 else $as_nop
38956   ac_cv_func_malloc_0_nonnull=no
38957 fi
38958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38959   conftest.$ac_objext conftest.beam conftest.$ac_ext
38960 fi
38961
38962
38963 fi
38964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
38965 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
38966   case $ac_cv_func_malloc_0_nonnull in #(
38967   *yes) :
38968      ;; #(
38969   *) :
38970     REPLACE_MALLOC=1 ;;
38971 esac
38972
38973   fi
38974
38975   if test $REPLACE_MALLOC = 1; then
38976
38977
38978
38979
38980
38981
38982
38983
38984   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
38985
38986   fi
38987
38988   if test $REPLACE_MALLOC = 1; then
38989
38990
38991
38992
38993
38994
38995
38996
38997   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
38998
38999   fi
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009           GL_M4_GNULIB_MALLOC_POSIX=1
39010
39011
39012
39013
39014
39015 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033   :
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048         if case "$host_os" in
39049        mingw*) true ;;
39050        *) test $ac_cv_func_mbsinit = yes ;;
39051      esac \
39052     && test $ac_cv_func_mbrtowc = yes; then
39053
39054
39055
39056
39057      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
39058 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
39059 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
39060 then :
39061   printf %s "(cached) " >&6
39062 else $as_nop
39063
39064                   case "$host_os" in
39065                      # Guess no on AIX and OSF/1.
39066         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
39067                      # Guess yes otherwise.
39068         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
39069       esac
39070       if test $LOCALE_JA != none; then
39071         if test "$cross_compiling" = yes
39072 then :
39073   :
39074 else $as_nop
39075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39076 /* end confdefs.h.  */
39077
39078 #include <locale.h>
39079 #include <string.h>
39080 #include <wchar.h>
39081 int main ()
39082 {
39083   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
39084     {
39085       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
39086       mbstate_t state;
39087       wchar_t wc;
39088
39089       memset (&state, '\0', sizeof (mbstate_t));
39090       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39091         if (mbsinit (&state))
39092           return 2;
39093     }
39094   return 0;
39095 }
39096 _ACEOF
39097 if ac_fn_c_try_run "$LINENO"
39098 then :
39099   gl_cv_func_mbrtowc_incomplete_state=yes
39100 else $as_nop
39101   gl_cv_func_mbrtowc_incomplete_state=no
39102 fi
39103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39104   conftest.$ac_objext conftest.beam conftest.$ac_ext
39105 fi
39106
39107       else
39108         if test $LOCALE_FR_UTF8 != none; then
39109           if test "$cross_compiling" = yes
39110 then :
39111   :
39112 else $as_nop
39113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39114 /* end confdefs.h.  */
39115
39116 #include <locale.h>
39117 #include <string.h>
39118 #include <wchar.h>
39119 int main ()
39120 {
39121   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39122     {
39123       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
39124       mbstate_t state;
39125       wchar_t wc;
39126
39127       memset (&state, '\0', sizeof (mbstate_t));
39128       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39129         if (mbsinit (&state))
39130           return 2;
39131     }
39132   return 0;
39133 }
39134 _ACEOF
39135 if ac_fn_c_try_run "$LINENO"
39136 then :
39137   gl_cv_func_mbrtowc_incomplete_state=yes
39138 else $as_nop
39139   gl_cv_func_mbrtowc_incomplete_state=no
39140 fi
39141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39142   conftest.$ac_objext conftest.beam conftest.$ac_ext
39143 fi
39144
39145         fi
39146       fi
39147
39148 fi
39149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
39150 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
39151
39152
39153
39154
39155      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
39156 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
39157 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
39158 then :
39159   printf %s "(cached) " >&6
39160 else $as_nop
39161
39162                   case "$host_os" in
39163                     # Guess no on Solaris 8.
39164         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
39165                     # Guess yes otherwise.
39166         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
39167       esac
39168       if test $LOCALE_ZH_CN != none; then
39169         if test "$cross_compiling" = yes
39170 then :
39171   :
39172 else $as_nop
39173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39174 /* end confdefs.h.  */
39175
39176 #include <locale.h>
39177 #include <stdlib.h>
39178 #include <string.h>
39179 #include <wchar.h>
39180 int main ()
39181 {
39182   /* This fails on Solaris 8:
39183      mbrtowc returns 2, and sets wc to 0x00F0.
39184      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
39185   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
39186     {
39187       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
39188       mbstate_t state;
39189       wchar_t wc;
39190
39191       memset (&state, '\0', sizeof (mbstate_t));
39192       if (mbrtowc (&wc, input + 3, 6, &state) != 4
39193           && mbtowc (&wc, input + 3, 6) == 4)
39194         return 2;
39195     }
39196   return 0;
39197 }
39198 _ACEOF
39199 if ac_fn_c_try_run "$LINENO"
39200 then :
39201   gl_cv_func_mbrtowc_sanitycheck=yes
39202 else $as_nop
39203   gl_cv_func_mbrtowc_sanitycheck=no
39204 fi
39205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39206   conftest.$ac_objext conftest.beam conftest.$ac_ext
39207 fi
39208
39209       fi
39210
39211 fi
39212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
39213 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
39214
39215     REPLACE_MBSTATE_T=0
39216     case "$gl_cv_func_mbrtowc_incomplete_state" in
39217       *yes) ;;
39218       *) REPLACE_MBSTATE_T=1 ;;
39219     esac
39220     case "$gl_cv_func_mbrtowc_sanitycheck" in
39221       *yes) ;;
39222       *) REPLACE_MBSTATE_T=1 ;;
39223     esac
39224   else
39225     REPLACE_MBSTATE_T=1
39226   fi
39227
39228
39229
39230   if test $ac_cv_func_mbrtowc = no; then
39231     HAVE_MBRTOWC=0
39232     ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
39233       #include <wchar.h>
39234
39235 " "$ac_c_undeclared_builtin_options" "CFLAGS"
39236 if test "x$ac_cv_have_decl_mbrtowc" = xyes
39237 then :
39238   ac_have_decl=1
39239 else $as_nop
39240   ac_have_decl=0
39241 fi
39242 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
39243
39244     if test $ac_cv_have_decl_mbrtowc = yes; then
39245                         REPLACE_MBRTOWC=1
39246     fi
39247   else
39248     if test $REPLACE_MBSTATE_T = 1; then
39249       REPLACE_MBRTOWC=1
39250     else
39251
39252
39253
39254      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
39255 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
39256 if test ${gl_cv_func_mbrtowc_null_arg1+y}
39257 then :
39258   printf %s "(cached) " >&6
39259 else $as_nop
39260
39261                   case "$host_os" in
39262                   # Guess no on Solaris.
39263         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
39264                   # Guess yes otherwise.
39265         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
39266       esac
39267       if test $LOCALE_FR_UTF8 != none; then
39268         if test "$cross_compiling" = yes
39269 then :
39270   :
39271 else $as_nop
39272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39273 /* end confdefs.h.  */
39274
39275 #include <locale.h>
39276 #include <stdlib.h>
39277 #include <string.h>
39278 #include <wchar.h>
39279 int main ()
39280 {
39281   int result = 0;
39282
39283   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39284     {
39285       char input[] = "\303\237er";
39286       mbstate_t state;
39287       wchar_t wc;
39288       size_t ret;
39289
39290       memset (&state, '\0', sizeof (mbstate_t));
39291       wc = (wchar_t) 0xBADFACE;
39292       ret = mbrtowc (&wc, input, 5, &state);
39293       if (ret != 2)
39294         result |= 1;
39295       if (!mbsinit (&state))
39296         result |= 2;
39297
39298       memset (&state, '\0', sizeof (mbstate_t));
39299       ret = mbrtowc (NULL, input, 5, &state);
39300       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
39301         result |= 4;
39302       if (!mbsinit (&state))
39303         result |= 8;
39304     }
39305   return result;
39306 }
39307 _ACEOF
39308 if ac_fn_c_try_run "$LINENO"
39309 then :
39310   gl_cv_func_mbrtowc_null_arg1=yes
39311 else $as_nop
39312   gl_cv_func_mbrtowc_null_arg1=no
39313 fi
39314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39315   conftest.$ac_objext conftest.beam conftest.$ac_ext
39316 fi
39317
39318       fi
39319
39320 fi
39321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
39322 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
39323
39324
39325
39326
39327      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
39328 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
39329 if test ${gl_cv_func_mbrtowc_null_arg2+y}
39330 then :
39331   printf %s "(cached) " >&6
39332 else $as_nop
39333
39334                   case "$host_os" in
39335               # Guess no on OSF/1.
39336         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
39337               # Guess yes otherwise.
39338         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
39339       esac
39340       if test $LOCALE_FR_UTF8 != none; then
39341         if test "$cross_compiling" = yes
39342 then :
39343   :
39344 else $as_nop
39345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39346 /* end confdefs.h.  */
39347
39348 #include <locale.h>
39349 #include <string.h>
39350 #include <wchar.h>
39351 int main ()
39352 {
39353   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39354     {
39355       mbstate_t state;
39356       wchar_t wc;
39357       int ret;
39358
39359       memset (&state, '\0', sizeof (mbstate_t));
39360       wc = (wchar_t) 0xBADFACE;
39361       mbrtowc (&wc, NULL, 5, &state);
39362       /* Check that wc was not modified.  */
39363       if (wc != (wchar_t) 0xBADFACE)
39364         return 2;
39365     }
39366   return 0;
39367 }
39368 _ACEOF
39369 if ac_fn_c_try_run "$LINENO"
39370 then :
39371   gl_cv_func_mbrtowc_null_arg2=yes
39372 else $as_nop
39373   gl_cv_func_mbrtowc_null_arg2=no
39374 fi
39375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39376   conftest.$ac_objext conftest.beam conftest.$ac_ext
39377 fi
39378
39379       fi
39380
39381 fi
39382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
39383 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
39384
39385
39386
39387
39388
39389
39390   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
39391 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
39392 if test ${gl_cv_func_mbrtowc_retval+y}
39393 then :
39394   printf %s "(cached) " >&6
39395 else $as_nop
39396
39397                   case "$host_os" in
39398                                    # Guess no on HP-UX, Solaris, native Windows.
39399         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
39400                                    # Guess yes otherwise.
39401         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
39402       esac
39403       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
39404          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
39405         if test "$cross_compiling" = yes
39406 then :
39407   :
39408 else $as_nop
39409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39410 /* end confdefs.h.  */
39411
39412 #include <locale.h>
39413 #include <string.h>
39414 #include <wchar.h>
39415 int main ()
39416 {
39417   int result = 0;
39418   int found_some_locale = 0;
39419   /* This fails on Solaris.  */
39420   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39421     {
39422       char input[] = "B\303\274\303\237er"; /* "Büßer" */
39423       mbstate_t state;
39424       wchar_t wc;
39425
39426       memset (&state, '\0', sizeof (mbstate_t));
39427       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39428         {
39429           input[1] = '\0';
39430           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
39431             result |= 1;
39432         }
39433       found_some_locale = 1;
39434     }
39435   /* This fails on HP-UX 11.11.  */
39436   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
39437     {
39438       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
39439       mbstate_t state;
39440       wchar_t wc;
39441
39442       memset (&state, '\0', sizeof (mbstate_t));
39443       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39444         {
39445           input[1] = '\0';
39446           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
39447             result |= 2;
39448         }
39449       found_some_locale = 1;
39450     }
39451   /* This fails on native Windows.  */
39452   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
39453     {
39454       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
39455       mbstate_t state;
39456       wchar_t wc;
39457
39458       memset (&state, '\0', sizeof (mbstate_t));
39459       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39460         {
39461           input[3] = '\0';
39462           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39463             result |= 4;
39464         }
39465       found_some_locale = 1;
39466     }
39467   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
39468     {
39469       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
39470       mbstate_t state;
39471       wchar_t wc;
39472
39473       memset (&state, '\0', sizeof (mbstate_t));
39474       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39475         {
39476           input[3] = '\0';
39477           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39478             result |= 8;
39479         }
39480       found_some_locale = 1;
39481     }
39482   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
39483     {
39484       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
39485       mbstate_t state;
39486       wchar_t wc;
39487
39488       memset (&state, '\0', sizeof (mbstate_t));
39489       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39490         {
39491           input[3] = '\0';
39492           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39493             result |= 16;
39494         }
39495       found_some_locale = 1;
39496     }
39497   return (found_some_locale ? result : 77);
39498 }
39499 _ACEOF
39500 if ac_fn_c_try_run "$LINENO"
39501 then :
39502   gl_cv_func_mbrtowc_retval=yes
39503 else $as_nop
39504   if test $? != 77; then
39505              gl_cv_func_mbrtowc_retval=no
39506            fi
39507
39508 fi
39509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39510   conftest.$ac_objext conftest.beam conftest.$ac_ext
39511 fi
39512
39513       fi
39514
39515 fi
39516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
39517 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
39518
39519
39520
39521
39522      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
39523 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
39524 if test ${gl_cv_func_mbrtowc_nul_retval+y}
39525 then :
39526   printf %s "(cached) " >&6
39527 else $as_nop
39528
39529                   case "$host_os" in
39530                        # Guess no on Solaris 8 and 9.
39531         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
39532                        # Guess yes otherwise.
39533         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
39534       esac
39535       if test $LOCALE_ZH_CN != none; then
39536         if test "$cross_compiling" = yes
39537 then :
39538   :
39539 else $as_nop
39540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39541 /* end confdefs.h.  */
39542
39543 #include <locale.h>
39544 #include <string.h>
39545 #include <wchar.h>
39546 int main ()
39547 {
39548   /* This fails on Solaris 8 and 9.  */
39549   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
39550     {
39551       mbstate_t state;
39552       wchar_t wc;
39553
39554       memset (&state, '\0', sizeof (mbstate_t));
39555       if (mbrtowc (&wc, "", 1, &state) != 0)
39556         return 2;
39557     }
39558   return 0;
39559 }
39560 _ACEOF
39561 if ac_fn_c_try_run "$LINENO"
39562 then :
39563   gl_cv_func_mbrtowc_nul_retval=yes
39564 else $as_nop
39565   gl_cv_func_mbrtowc_nul_retval=no
39566 fi
39567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39568   conftest.$ac_objext conftest.beam conftest.$ac_ext
39569 fi
39570
39571       fi
39572
39573 fi
39574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
39575 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
39576
39577
39578
39579      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
39580 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
39581 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
39582 then :
39583   printf %s "(cached) " >&6
39584 else $as_nop
39585
39586                case "$host_os" in
39587                # Guess yes on native Windows.
39588        mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
39589        *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
39590      esac
39591      case "$host_os" in
39592        mingw*)
39593          if test "$cross_compiling" = yes
39594 then :
39595   :
39596 else $as_nop
39597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39598 /* end confdefs.h.  */
39599
39600 #include <locale.h>
39601 #include <string.h>
39602 #include <wchar.h>
39603 int main ()
39604 {
39605   int result = 0;
39606   if (setlocale (LC_ALL, "French_France.65001") != NULL)
39607     {
39608       wchar_t wc = (wchar_t) 0xBADFACE;
39609       mbstate_t state;
39610
39611       memset (&state, '\0', sizeof (mbstate_t));
39612       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
39613           && wc != (wchar_t) 0xBADFACE)
39614         result |= 1;
39615     }
39616   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
39617     {
39618       wchar_t wc = (wchar_t) 0xBADFACE;
39619       mbstate_t state;
39620
39621       memset (&state, '\0', sizeof (mbstate_t));
39622       if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
39623           && wc != (wchar_t) 0xBADFACE)
39624         result |= 2;
39625     }
39626   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
39627     {
39628       wchar_t wc = (wchar_t) 0xBADFACE;
39629       mbstate_t state;
39630
39631       memset (&state, '\0', sizeof (mbstate_t));
39632       if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
39633           && wc != (wchar_t) 0xBADFACE)
39634         result |= 4;
39635     }
39636   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
39637     {
39638       wchar_t wc = (wchar_t) 0xBADFACE;
39639       mbstate_t state;
39640
39641       memset (&state, '\0', sizeof (mbstate_t));
39642       if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
39643           && wc != (wchar_t) 0xBADFACE)
39644         result |= 8;
39645     }
39646   return result;
39647 }
39648 _ACEOF
39649 if ac_fn_c_try_run "$LINENO"
39650 then :
39651   gl_cv_func_mbrtowc_stores_incomplete=no
39652 else $as_nop
39653   gl_cv_func_mbrtowc_stores_incomplete=yes
39654 fi
39655 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39656   conftest.$ac_objext conftest.beam conftest.$ac_ext
39657 fi
39658
39659          ;;
39660        *)
39661
39662          if test $LOCALE_FR_UTF8 != none; then
39663            if test "$cross_compiling" = yes
39664 then :
39665   :
39666 else $as_nop
39667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39668 /* end confdefs.h.  */
39669
39670 #include <locale.h>
39671 #include <string.h>
39672 #include <wchar.h>
39673 int main ()
39674 {
39675   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39676     {
39677       wchar_t wc = (wchar_t) 0xBADFACE;
39678       mbstate_t state;
39679
39680       memset (&state, '\0', sizeof (mbstate_t));
39681       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
39682           && wc != (wchar_t) 0xBADFACE)
39683         return 1;
39684     }
39685   return 0;
39686 }
39687 _ACEOF
39688 if ac_fn_c_try_run "$LINENO"
39689 then :
39690   gl_cv_func_mbrtowc_stores_incomplete=no
39691 else $as_nop
39692   gl_cv_func_mbrtowc_stores_incomplete=yes
39693 fi
39694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39695   conftest.$ac_objext conftest.beam conftest.$ac_ext
39696 fi
39697
39698          fi
39699          ;;
39700      esac
39701
39702 fi
39703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
39704 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
39705
39706
39707
39708      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
39709 printf %s "checking whether mbrtowc works on empty input... " >&6; }
39710 if test ${gl_cv_func_mbrtowc_empty_input+y}
39711 then :
39712   printf %s "(cached) " >&6
39713 else $as_nop
39714
39715                   case "$host_os" in
39716                               # Guess no on AIX and glibc systems.
39717         aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
39718                               # Guess yes on native Windows.
39719         mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
39720         *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
39721       esac
39722       if test "$cross_compiling" = yes
39723 then :
39724   :
39725 else $as_nop
39726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39727 /* end confdefs.h.  */
39728
39729            #include <wchar.h>
39730            static wchar_t wc;
39731            static mbstate_t mbs;
39732            int
39733            main (void)
39734            {
39735              return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
39736            }
39737 _ACEOF
39738 if ac_fn_c_try_run "$LINENO"
39739 then :
39740   gl_cv_func_mbrtowc_empty_input=yes
39741 else $as_nop
39742   gl_cv_func_mbrtowc_empty_input=no
39743 fi
39744 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39745   conftest.$ac_objext conftest.beam conftest.$ac_ext
39746 fi
39747
39748
39749 fi
39750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
39751 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
39752
39753
39754      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
39755 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
39756 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
39757 then :
39758   printf %s "(cached) " >&6
39759 else $as_nop
39760
39761                gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
39762
39763      if test "$cross_compiling" = yes
39764 then :
39765   case "$host_os" in
39766                  # Guess yes on native Windows.
39767          mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
39768        esac
39769
39770 else $as_nop
39771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39772 /* end confdefs.h.  */
39773 #include <limits.h>
39774             #include <locale.h>
39775             #include <wchar.h>
39776
39777 int
39778 main (void)
39779 {
39780
39781             int i;
39782             char *locale = setlocale (LC_ALL, "C");
39783             if (! locale)
39784               return 2;
39785             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
39786               {
39787                 char c = i;
39788                 wchar_t wc;
39789                 mbstate_t mbs = { 0, };
39790                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
39791                 if (1 < ss)
39792                   return 3;
39793               }
39794             return 0;
39795
39796   ;
39797   return 0;
39798 }
39799 _ACEOF
39800 if ac_fn_c_try_run "$LINENO"
39801 then :
39802   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
39803 else $as_nop
39804   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
39805 fi
39806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39807   conftest.$ac_objext conftest.beam conftest.$ac_ext
39808 fi
39809
39810
39811 fi
39812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
39813 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
39814
39815       case "$gl_cv_func_mbrtowc_null_arg1" in
39816         *yes) ;;
39817         *)
39818 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
39819
39820            REPLACE_MBRTOWC=1
39821            ;;
39822       esac
39823       case "$gl_cv_func_mbrtowc_null_arg2" in
39824         *yes) ;;
39825         *)
39826 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
39827
39828            REPLACE_MBRTOWC=1
39829            ;;
39830       esac
39831       case "$gl_cv_func_mbrtowc_retval" in
39832         *yes) ;;
39833         *)
39834 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
39835
39836            REPLACE_MBRTOWC=1
39837            ;;
39838       esac
39839       case "$gl_cv_func_mbrtowc_nul_retval" in
39840         *yes) ;;
39841         *)
39842 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
39843
39844            REPLACE_MBRTOWC=1
39845            ;;
39846       esac
39847       case "$gl_cv_func_mbrtowc_stores_incomplete" in
39848         *no) ;;
39849         *)
39850 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
39851
39852            REPLACE_MBRTOWC=1
39853            ;;
39854       esac
39855       case "$gl_cv_func_mbrtowc_empty_input" in
39856         *yes) ;;
39857         *)
39858 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
39859
39860            REPLACE_MBRTOWC=1
39861            ;;
39862       esac
39863       case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
39864         *yes) ;;
39865         *)
39866 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
39867
39868            REPLACE_MBRTOWC=1
39869            ;;
39870       esac
39871     fi
39872   fi
39873   if test $REPLACE_MBSTATE_T = 1; then
39874     case "$host_os" in
39875       mingw*) LIB_MBRTOWC= ;;
39876       *)
39877
39878
39879   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
39880 printf %s "checking whether imported symbols can be declared weak... " >&6; }
39881 if test ${gl_cv_have_weak+y}
39882 then :
39883   printf %s "(cached) " >&6
39884 else $as_nop
39885   gl_cv_have_weak=no
39886           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39887 /* end confdefs.h.  */
39888 extern void xyzzy ();
39889 #pragma weak xyzzy
39890 int
39891 main (void)
39892 {
39893 xyzzy();
39894   ;
39895   return 0;
39896 }
39897 _ACEOF
39898 if ac_fn_c_try_link "$LINENO"
39899 then :
39900   gl_cv_have_weak=maybe
39901 fi
39902 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39903     conftest$ac_exeext conftest.$ac_ext
39904      if test $gl_cv_have_weak = maybe; then
39905                      if test "$cross_compiling" = yes
39906 then :
39907                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39908 /* end confdefs.h.  */
39909 #ifdef __ELF__
39910              Extensible Linking Format
39911              #endif
39912
39913 _ACEOF
39914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39915   $EGREP "Extensible Linking Format" >/dev/null 2>&1
39916 then :
39917   gl_cv_have_weak="guessing yes"
39918 else $as_nop
39919   gl_cv_have_weak="guessing no"
39920 fi
39921 rm -rf conftest*
39922
39923
39924 else $as_nop
39925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39926 /* end confdefs.h.  */
39927
39928 #include <stdio.h>
39929 #pragma weak fputs
39930 int main ()
39931 {
39932   return (fputs == NULL);
39933 }
39934 _ACEOF
39935 if ac_fn_c_try_run "$LINENO"
39936 then :
39937   gl_cv_have_weak=yes
39938 else $as_nop
39939   gl_cv_have_weak=no
39940 fi
39941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39942   conftest.$ac_objext conftest.beam conftest.$ac_ext
39943 fi
39944
39945      fi
39946           case " $LDFLAGS " in
39947        *" -static "*) gl_cv_have_weak=no ;;
39948      esac
39949                     case "$gl_cv_have_weak" in
39950        *yes)
39951          case "$host_os" in
39952            freebsd* | dragonfly* | midnightbsd*)
39953              : > conftest1.c
39954              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
39955              cat <<EOF > conftest2.c
39956 #include <pthread.h>
39957 #pragma weak pthread_mutexattr_gettype
39958 int main ()
39959 {
39960   return (pthread_mutexattr_gettype != NULL);
39961 }
39962 EOF
39963              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
39964                || gl_cv_have_weak=no
39965              rm -f conftest1.c libempty.so conftest2.c conftest
39966              ;;
39967          esac
39968          ;;
39969      esac
39970
39971 fi
39972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
39973 printf "%s\n" "$gl_cv_have_weak" >&6; }
39974   case "$gl_cv_have_weak" in
39975     *yes)
39976
39977 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
39978
39979       ;;
39980   esac
39981
39982         case "$gl_cv_have_weak" in
39983           *yes) LIB_MBRTOWC= ;;
39984           *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
39985         esac
39986         ;;
39987     esac
39988   else
39989     LIB_MBRTOWC=
39990   fi
39991
39992
39993   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
39994
39995
39996
39997
39998
39999
40000
40001
40002   M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
40003
40004     if test $REPLACE_MBSTATE_T = 1; then
40005
40006
40007
40008
40009
40010
40011
40012
40013   M4_LIBOBJS="$M4_LIBOBJS lc-charset-dispatch.$ac_objext"
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023   M4_LIBOBJS="$M4_LIBOBJS mbtowc-lock.$ac_objext"
40024
40025
40026
40027
40028   CFLAG_VISIBILITY=
40029   HAVE_VISIBILITY=0
40030   if test -n "$GCC"; then
40031                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
40032 printf %s "checking whether the -Werror option is usable... " >&6; }
40033 if test ${gl_cv_cc_vis_werror+y}
40034 then :
40035   printf %s "(cached) " >&6
40036 else $as_nop
40037   gl_save_CFLAGS="$CFLAGS"
40038        CFLAGS="$CFLAGS -Werror"
40039        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40040 /* end confdefs.h.  */
40041
40042 int
40043 main (void)
40044 {
40045
40046   ;
40047   return 0;
40048 }
40049 _ACEOF
40050 if ac_fn_c_try_compile "$LINENO"
40051 then :
40052   gl_cv_cc_vis_werror=yes
40053 else $as_nop
40054   gl_cv_cc_vis_werror=no
40055 fi
40056 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40057        CFLAGS="$gl_save_CFLAGS"
40058
40059 fi
40060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
40061 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
40062         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
40063 printf %s "checking for simple visibility declarations... " >&6; }
40064 if test ${gl_cv_cc_visibility+y}
40065 then :
40066   printf %s "(cached) " >&6
40067 else $as_nop
40068   gl_save_CFLAGS="$CFLAGS"
40069        CFLAGS="$CFLAGS -fvisibility=hidden"
40070                                           if test $gl_cv_cc_vis_werror = yes; then
40071          CFLAGS="$CFLAGS -Werror"
40072        fi
40073        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40074 /* end confdefs.h.  */
40075 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
40076               extern __attribute__((__visibility__("default"))) int exportedvar;
40077               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
40078               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
40079               void dummyfunc (void);
40080               void dummyfunc (void) {}
40081
40082 int
40083 main (void)
40084 {
40085
40086   ;
40087   return 0;
40088 }
40089 _ACEOF
40090 if ac_fn_c_try_compile "$LINENO"
40091 then :
40092   gl_cv_cc_visibility=yes
40093 else $as_nop
40094   gl_cv_cc_visibility=no
40095 fi
40096 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40097        CFLAGS="$gl_save_CFLAGS"
40098
40099 fi
40100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
40101 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
40102     if test $gl_cv_cc_visibility = yes; then
40103       CFLAG_VISIBILITY="-fvisibility=hidden"
40104       HAVE_VISIBILITY=1
40105     fi
40106   fi
40107
40108
40109
40110 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
40111
40112
40113
40114     fi
40115
40116
40117   :
40118
40119   fi
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129           GL_M4_GNULIB_MBRTOWC=1
40130
40131
40132
40133
40134
40135 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151         if case "$host_os" in
40152        mingw*) true ;;
40153        *) test $ac_cv_func_mbsinit = yes ;;
40154      esac \
40155     && test $ac_cv_func_mbrtowc = yes; then
40156
40157
40158
40159
40160      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
40161 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
40162 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
40163 then :
40164   printf %s "(cached) " >&6
40165 else $as_nop
40166
40167                   case "$host_os" in
40168                      # Guess no on AIX and OSF/1.
40169         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
40170                      # Guess yes otherwise.
40171         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
40172       esac
40173       if test $LOCALE_JA != none; then
40174         if test "$cross_compiling" = yes
40175 then :
40176   :
40177 else $as_nop
40178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40179 /* end confdefs.h.  */
40180
40181 #include <locale.h>
40182 #include <string.h>
40183 #include <wchar.h>
40184 int main ()
40185 {
40186   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
40187     {
40188       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
40189       mbstate_t state;
40190       wchar_t wc;
40191
40192       memset (&state, '\0', sizeof (mbstate_t));
40193       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
40194         if (mbsinit (&state))
40195           return 2;
40196     }
40197   return 0;
40198 }
40199 _ACEOF
40200 if ac_fn_c_try_run "$LINENO"
40201 then :
40202   gl_cv_func_mbrtowc_incomplete_state=yes
40203 else $as_nop
40204   gl_cv_func_mbrtowc_incomplete_state=no
40205 fi
40206 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40207   conftest.$ac_objext conftest.beam conftest.$ac_ext
40208 fi
40209
40210       else
40211         if test $LOCALE_FR_UTF8 != none; then
40212           if test "$cross_compiling" = yes
40213 then :
40214   :
40215 else $as_nop
40216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40217 /* end confdefs.h.  */
40218
40219 #include <locale.h>
40220 #include <string.h>
40221 #include <wchar.h>
40222 int main ()
40223 {
40224   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
40225     {
40226       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
40227       mbstate_t state;
40228       wchar_t wc;
40229
40230       memset (&state, '\0', sizeof (mbstate_t));
40231       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
40232         if (mbsinit (&state))
40233           return 2;
40234     }
40235   return 0;
40236 }
40237 _ACEOF
40238 if ac_fn_c_try_run "$LINENO"
40239 then :
40240   gl_cv_func_mbrtowc_incomplete_state=yes
40241 else $as_nop
40242   gl_cv_func_mbrtowc_incomplete_state=no
40243 fi
40244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40245   conftest.$ac_objext conftest.beam conftest.$ac_ext
40246 fi
40247
40248         fi
40249       fi
40250
40251 fi
40252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
40253 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
40254
40255
40256
40257
40258      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
40259 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
40260 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
40261 then :
40262   printf %s "(cached) " >&6
40263 else $as_nop
40264
40265                   case "$host_os" in
40266                     # Guess no on Solaris 8.
40267         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
40268                     # Guess yes otherwise.
40269         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
40270       esac
40271       if test $LOCALE_ZH_CN != none; then
40272         if test "$cross_compiling" = yes
40273 then :
40274   :
40275 else $as_nop
40276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40277 /* end confdefs.h.  */
40278
40279 #include <locale.h>
40280 #include <stdlib.h>
40281 #include <string.h>
40282 #include <wchar.h>
40283 int main ()
40284 {
40285   /* This fails on Solaris 8:
40286      mbrtowc returns 2, and sets wc to 0x00F0.
40287      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
40288   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
40289     {
40290       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
40291       mbstate_t state;
40292       wchar_t wc;
40293
40294       memset (&state, '\0', sizeof (mbstate_t));
40295       if (mbrtowc (&wc, input + 3, 6, &state) != 4
40296           && mbtowc (&wc, input + 3, 6) == 4)
40297         return 2;
40298     }
40299   return 0;
40300 }
40301 _ACEOF
40302 if ac_fn_c_try_run "$LINENO"
40303 then :
40304   gl_cv_func_mbrtowc_sanitycheck=yes
40305 else $as_nop
40306   gl_cv_func_mbrtowc_sanitycheck=no
40307 fi
40308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40309   conftest.$ac_objext conftest.beam conftest.$ac_ext
40310 fi
40311
40312       fi
40313
40314 fi
40315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
40316 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
40317
40318     REPLACE_MBSTATE_T=0
40319     case "$gl_cv_func_mbrtowc_incomplete_state" in
40320       *yes) ;;
40321       *) REPLACE_MBSTATE_T=1 ;;
40322     esac
40323     case "$gl_cv_func_mbrtowc_sanitycheck" in
40324       *yes) ;;
40325       *) REPLACE_MBSTATE_T=1 ;;
40326     esac
40327   else
40328     REPLACE_MBSTATE_T=1
40329   fi
40330
40331
40332
40333   if test $ac_cv_func_mbsinit = no; then
40334     HAVE_MBSINIT=0
40335     ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
40336       #include <wchar.h>
40337
40338 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40339 if test "x$ac_cv_have_decl_mbsinit" = xyes
40340 then :
40341   ac_have_decl=1
40342 else $as_nop
40343   ac_have_decl=0
40344 fi
40345 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
40346
40347     if test $ac_cv_have_decl_mbsinit = yes; then
40348                         REPLACE_MBSINIT=1
40349     fi
40350   else
40351     if test $REPLACE_MBSTATE_T = 1; then
40352       REPLACE_MBSINIT=1
40353     else
40354                         case "$host_os" in
40355         mingw*) REPLACE_MBSINIT=1 ;;
40356       esac
40357     fi
40358   fi
40359
40360   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
40361
40362
40363
40364
40365
40366
40367
40368
40369   M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
40370
40371
40372   :
40373
40374   fi
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384           GL_M4_GNULIB_MBSINIT=1
40385
40386
40387
40388
40389
40390 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
40391
40392
40393
40394
40395
40396
40397   if test $ac_cv_func_mbslen = yes; then
40398     HAVE_MBSLEN=1
40399   else
40400     HAVE_MBSLEN=0
40401   fi
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412           GL_M4_GNULIB_MBSLEN=1
40413
40414
40415
40416
40417
40418 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431           GL_M4_GNULIB_MBSSTR=1
40432
40433
40434
40435
40436
40437 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
40438
40439
40440
40441
40442
40443
40444   ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
40445 if test "x$ac_cv_func_mbtowc" = xyes
40446 then :
40447   printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
40448
40449 fi
40450
40451   if test $ac_cv_func_mbtowc = no; then
40452     HAVE_MBTOWC=0
40453   else
40454     if false; then
40455       REPLACE_MBTOWC=1
40456     fi
40457   fi
40458
40459   if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
40460
40461
40462
40463
40464
40465
40466
40467
40468   M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
40469
40470
40471   :
40472
40473   fi
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483           GL_M4_GNULIB_MBTOWC=1
40484
40485
40486
40487
40488
40489 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
40490
40491
40492
40493
40494
40495   :
40496
40497
40498   if test $REPLACE_MEMCHR = 1; then
40499
40500
40501
40502
40503
40504
40505
40506
40507   M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
40508
40509
40510   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
40511 if test "x$ac_cv_header_bp_sym_h" = xyes
40512 then :
40513   printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
40514
40515 fi
40516
40517
40518   fi
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528           GL_M4_GNULIB_MEMCHR=1
40529
40530
40531
40532
40533
40534 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
40545 if test "x$ac_cv_func_mempcpy" = xyes
40546 then :
40547   printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
40548
40549 fi
40550
40551   if test $ac_cv_func_mempcpy = no; then
40552     HAVE_MEMPCPY=0
40553   fi
40554
40555   if test $HAVE_MEMPCPY = 0; then
40556
40557
40558
40559
40560
40561
40562
40563
40564   M4_LIBOBJS="$M4_LIBOBJS mempcpy.$ac_objext"
40565
40566
40567   :
40568
40569   fi
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579           GL_M4_GNULIB_MEMPCPY=1
40580
40581
40582
40583
40584
40585 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
40586
40587
40588
40589
40590
40591
40592
40593
40594   if test $ac_cv_have_decl_memrchr = no; then
40595     HAVE_DECL_MEMRCHR=0
40596   fi
40597
40598   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
40599 if test "x$ac_cv_func_memrchr" = xyes
40600 then :
40601   printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
40602
40603 fi
40604
40605
40606   if test $ac_cv_func_memrchr = no; then
40607
40608
40609
40610
40611
40612
40613
40614
40615   M4_LIBOBJS="$M4_LIBOBJS memrchr.$ac_objext"
40616
40617     :
40618   fi
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628           GL_M4_GNULIB_MEMRCHR=1
40629
40630
40631
40632
40633
40634 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
40635
40636
40637
40638
40639
40640
40641
40642
40643   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
40644 printf %s "checking whether mkdir handles trailing slash... " >&6; }
40645 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
40646 then :
40647   printf %s "(cached) " >&6
40648 else $as_nop
40649   rm -rf conftest.dir
40650      if test "$cross_compiling" = yes
40651 then :
40652   case "$host_os" in
40653                            # Guess yes on Linux systems.
40654           linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
40655                            # Guess yes on glibc systems.
40656           *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
40657                            # Guess yes on MSVC, no on mingw.
40658           mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40659 /* end confdefs.h.  */
40660
40661 #ifdef _MSC_VER
40662  Known
40663 #endif
40664
40665 _ACEOF
40666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40667   $EGREP "Known" >/dev/null 2>&1
40668 then :
40669   gl_cv_func_mkdir_trailing_slash_works="guessing yes"
40670 else $as_nop
40671   gl_cv_func_mkdir_trailing_slash_works="guessing no"
40672 fi
40673 rm -rf conftest*
40674
40675                            ;;
40676                            # If we don't know, obey --enable-cross-guesses.
40677           *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
40678         esac
40679
40680 else $as_nop
40681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40682 /* end confdefs.h.  */
40683
40684           #include <sys/types.h>
40685           #include <sys/stat.h>
40686
40687
40688 $gl_mda_defines
40689
40690 int
40691 main (void)
40692 {
40693 return mkdir ("conftest.dir/", 0700);
40694   ;
40695   return 0;
40696 }
40697 _ACEOF
40698 if ac_fn_c_try_run "$LINENO"
40699 then :
40700   gl_cv_func_mkdir_trailing_slash_works=yes
40701 else $as_nop
40702   gl_cv_func_mkdir_trailing_slash_works=no
40703 fi
40704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40705   conftest.$ac_objext conftest.beam conftest.$ac_ext
40706 fi
40707
40708      rm -rf conftest.dir
40709
40710 fi
40711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
40712 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
40713   case "$gl_cv_func_mkdir_trailing_slash_works" in
40714     *yes) ;;
40715     *)
40716       REPLACE_MKDIR=1
40717       ;;
40718   esac
40719
40720   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
40721 printf %s "checking whether mkdir handles trailing dot... " >&6; }
40722 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
40723 then :
40724   printf %s "(cached) " >&6
40725 else $as_nop
40726   rm -rf conftest.dir
40727      if test "$cross_compiling" = yes
40728 then :
40729   case "$host_os" in
40730                          # Guess yes on glibc systems.
40731           *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
40732                          # Guess yes on musl systems.
40733           *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
40734                          # Guess no on native Windows.
40735           mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
40736                          # If we don't know, obey --enable-cross-guesses.
40737           *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
40738         esac
40739
40740 else $as_nop
40741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40742 /* end confdefs.h.  */
40743
40744           #include <sys/types.h>
40745           #include <sys/stat.h>
40746
40747
40748 $gl_mda_defines
40749
40750 int
40751 main (void)
40752 {
40753 return !mkdir ("conftest.dir/./", 0700);
40754   ;
40755   return 0;
40756 }
40757 _ACEOF
40758 if ac_fn_c_try_run "$LINENO"
40759 then :
40760   gl_cv_func_mkdir_trailing_dot_works=yes
40761 else $as_nop
40762   gl_cv_func_mkdir_trailing_dot_works=no
40763 fi
40764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40765   conftest.$ac_objext conftest.beam conftest.$ac_ext
40766 fi
40767
40768      rm -rf conftest.dir
40769
40770
40771 fi
40772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
40773 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
40774   case "$gl_cv_func_mkdir_trailing_dot_works" in
40775     *yes) ;;
40776     *)
40777       REPLACE_MKDIR=1
40778
40779 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
40780
40781       ;;
40782   esac
40783
40784   if test $REPLACE_MKDIR = 1; then
40785
40786
40787
40788
40789
40790
40791
40792
40793   M4_LIBOBJS="$M4_LIBOBJS mkdir.$ac_objext"
40794
40795   fi
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805           GL_M4_GNULIB_MKDIR=1
40806
40807
40808
40809
40810
40811 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
40812
40813
40814
40815
40816
40817   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
40818 if test "x$ac_cv_func_mkdtemp" = xyes
40819 then :
40820   printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
40821
40822 fi
40823
40824   if test $ac_cv_func_mkdtemp = no; then
40825     HAVE_MKDTEMP=0
40826   fi
40827
40828   if test $HAVE_MKDTEMP = 0; then
40829
40830
40831
40832
40833
40834
40835
40836
40837   M4_LIBOBJS="$M4_LIBOBJS mkdtemp.$ac_objext"
40838
40839     :
40840
40841   fi
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851           GL_M4_GNULIB_MKDTEMP=1
40852
40853
40854
40855
40856
40857 printf "%s\n" "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
40858
40859
40860
40861
40862
40863
40864
40865   if test $ac_cv_func_mkstemp = yes; then
40866     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
40867 printf %s "checking for working mkstemp... " >&6; }
40868 if test ${gl_cv_func_working_mkstemp+y}
40869 then :
40870   printf %s "(cached) " >&6
40871 else $as_nop
40872
40873         mkdir conftest.mkstemp
40874         if test "$cross_compiling" = yes
40875 then :
40876   case "$host_os" in
40877                             # Guess yes on glibc systems.
40878              *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
40879                             # Guess yes on musl systems.
40880              *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
40881                             # Guess no on native Windows.
40882              mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
40883                             # If we don't know, obey --enable-cross-guesses.
40884              *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
40885            esac
40886
40887 else $as_nop
40888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40889 /* end confdefs.h.  */
40890 $ac_includes_default
40891
40892
40893 $gl_mda_defines
40894
40895 int
40896 main (void)
40897 {
40898 int result = 0;
40899               int i;
40900               off_t large = (off_t) 4294967295u;
40901               if (large < 0)
40902                 large = 2147483647;
40903               umask (0);
40904               for (i = 0; i < 70; i++)
40905                 {
40906                   char templ[] = "conftest.mkstemp/coXXXXXX";
40907                   int (*mkstemp_function) (char *) = mkstemp;
40908                   int fd = mkstemp_function (templ);
40909                   if (fd < 0)
40910                     result |= 1;
40911                   else
40912                     {
40913                       struct stat st;
40914                       if (lseek (fd, large, SEEK_SET) != large)
40915                         result |= 2;
40916                       if (fstat (fd, &st) < 0)
40917                         result |= 4;
40918                       else if (st.st_mode & 0077)
40919                         result |= 8;
40920                       if (close (fd))
40921                         result |= 16;
40922                     }
40923                 }
40924               return result;
40925   ;
40926   return 0;
40927 }
40928 _ACEOF
40929 if ac_fn_c_try_run "$LINENO"
40930 then :
40931   gl_cv_func_working_mkstemp=yes
40932 else $as_nop
40933   gl_cv_func_working_mkstemp=no
40934 fi
40935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40936   conftest.$ac_objext conftest.beam conftest.$ac_ext
40937 fi
40938
40939         rm -rf conftest.mkstemp
40940
40941 fi
40942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
40943 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
40944     case "$gl_cv_func_working_mkstemp" in
40945       *yes) ;;
40946       *)
40947         REPLACE_MKSTEMP=1
40948         ;;
40949     esac
40950   else
40951     HAVE_MKSTEMP=0
40952   fi
40953
40954   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
40955
40956
40957
40958
40959
40960
40961
40962
40963   M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
40964
40965
40966
40967   fi
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977           GL_M4_GNULIB_MKSTEMP=1
40978
40979
40980
40981
40982
40983 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
40984
40985
40986
40987
40988   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40989
40990
40991
40992
40993
40994
40995
40996
40997   M4_LIBOBJS="$M4_LIBOBJS msvc-inval.$ac_objext"
40998
40999   fi
41000
41001   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
41002
41003
41004
41005
41006
41007
41008
41009
41010   M4_LIBOBJS="$M4_LIBOBJS msvc-nothrow.$ac_objext"
41011
41012   fi
41013
41014
41015 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027   if test $ac_cv_func_nl_langinfo = yes; then
41028     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
41029     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
41030 printf %s "checking whether YESEXPR works... " >&6; }
41031 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
41032 then :
41033   printf %s "(cached) " >&6
41034 else $as_nop
41035   if test "$cross_compiling" = yes
41036 then :
41037
41038          case "$host_os" in
41039                    # Guess no on irix systems.
41040            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
41041                    # Guess yes elsewhere.
41042            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
41043          esac
41044
41045 else $as_nop
41046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41047 /* end confdefs.h.  */
41048 #include <langinfo.h>
41049
41050 int
41051 main (void)
41052 {
41053 return !*nl_langinfo(YESEXPR);
41054
41055   ;
41056   return 0;
41057 }
41058 _ACEOF
41059 if ac_fn_c_try_run "$LINENO"
41060 then :
41061   gl_cv_func_nl_langinfo_yesexpr_works=yes
41062 else $as_nop
41063   gl_cv_func_nl_langinfo_yesexpr_works=no
41064 fi
41065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41066   conftest.$ac_objext conftest.beam conftest.$ac_ext
41067 fi
41068
41069
41070 fi
41071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
41072 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
41073     case $gl_cv_func_nl_langinfo_yesexpr_works in
41074       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
41075       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
41076     esac
41077
41078 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
41079
41080     # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
41081     case "$host_os" in
41082       solaris*) NL_LANGINFO_MTSAFE=0 ;;
41083       *)        NL_LANGINFO_MTSAFE=1 ;;
41084     esac
41085
41086 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
41087
41088     if test $HAVE_LANGINFO_CODESET = 1 \
41089        && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
41090        && test $HAVE_LANGINFO_ALTMON = 1 \
41091        && test $HAVE_LANGINFO_ERA = 1 \
41092        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
41093        && test $NL_LANGINFO_MTSAFE = 1; then
41094       :
41095     else
41096       REPLACE_NL_LANGINFO=1
41097
41098 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
41099
41100     fi
41101   else
41102     HAVE_NL_LANGINFO=0
41103   fi
41104   if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
41105     LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
41106   else
41107     LIB_NL_LANGINFO=
41108   fi
41109
41110
41111   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
41112
41113
41114
41115
41116
41117
41118
41119
41120   M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
41121
41122   fi
41123   if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
41124
41125
41126
41127
41128
41129
41130
41131
41132   M4_LIBOBJS="$M4_LIBOBJS nl_langinfo-lock.$ac_objext"
41133
41134
41135
41136
41137   CFLAG_VISIBILITY=
41138   HAVE_VISIBILITY=0
41139   if test -n "$GCC"; then
41140                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
41141 printf %s "checking whether the -Werror option is usable... " >&6; }
41142 if test ${gl_cv_cc_vis_werror+y}
41143 then :
41144   printf %s "(cached) " >&6
41145 else $as_nop
41146   gl_save_CFLAGS="$CFLAGS"
41147        CFLAGS="$CFLAGS -Werror"
41148        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41149 /* end confdefs.h.  */
41150
41151 int
41152 main (void)
41153 {
41154
41155   ;
41156   return 0;
41157 }
41158 _ACEOF
41159 if ac_fn_c_try_compile "$LINENO"
41160 then :
41161   gl_cv_cc_vis_werror=yes
41162 else $as_nop
41163   gl_cv_cc_vis_werror=no
41164 fi
41165 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41166        CFLAGS="$gl_save_CFLAGS"
41167
41168 fi
41169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
41170 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
41171         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
41172 printf %s "checking for simple visibility declarations... " >&6; }
41173 if test ${gl_cv_cc_visibility+y}
41174 then :
41175   printf %s "(cached) " >&6
41176 else $as_nop
41177   gl_save_CFLAGS="$CFLAGS"
41178        CFLAGS="$CFLAGS -fvisibility=hidden"
41179                                           if test $gl_cv_cc_vis_werror = yes; then
41180          CFLAGS="$CFLAGS -Werror"
41181        fi
41182        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41183 /* end confdefs.h.  */
41184 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
41185               extern __attribute__((__visibility__("default"))) int exportedvar;
41186               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
41187               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
41188               void dummyfunc (void);
41189               void dummyfunc (void) {}
41190
41191 int
41192 main (void)
41193 {
41194
41195   ;
41196   return 0;
41197 }
41198 _ACEOF
41199 if ac_fn_c_try_compile "$LINENO"
41200 then :
41201   gl_cv_cc_visibility=yes
41202 else $as_nop
41203   gl_cv_cc_visibility=no
41204 fi
41205 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41206        CFLAGS="$gl_save_CFLAGS"
41207
41208 fi
41209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
41210 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
41211     if test $gl_cv_cc_visibility = yes; then
41212       CFLAG_VISIBILITY="-fvisibility=hidden"
41213       HAVE_VISIBILITY=1
41214     fi
41215   fi
41216
41217
41218
41219 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
41220
41221
41222
41223   fi
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233           GL_M4_GNULIB_NL_LANGINFO=1
41234
41235
41236
41237
41238
41239 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
41256 printf %s "checking for obstacks that work with any size object... " >&6; }
41257 if test ${ac_cv_func_obstack+y}
41258 then :
41259   printf %s "(cached) " >&6
41260 else $as_nop
41261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41262 /* end confdefs.h.  */
41263 #include "obstack.h"
41264              void *obstack_chunk_alloc (size_t n) { return 0; }
41265              void obstack_chunk_free (void *p) { }
41266              /* Check that an internal function returns size_t, not int.  */
41267              size_t _obstack_memory_used (struct obstack *);
41268
41269 int
41270 main (void)
41271 {
41272 struct obstack mem;
41273              obstack_init (&mem);
41274              obstack_free (&mem, 0);
41275
41276   ;
41277   return 0;
41278 }
41279 _ACEOF
41280 if ac_fn_c_try_link "$LINENO"
41281 then :
41282   ac_cv_func_obstack=yes
41283 else $as_nop
41284   ac_cv_func_obstack=no
41285 fi
41286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41287     conftest$ac_exeext conftest.$ac_ext
41288 fi
41289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
41290 printf "%s\n" "$ac_cv_func_obstack" >&6; }
41291    if test "$ac_cv_func_obstack" = yes; then
41292
41293 printf "%s\n" "#define HAVE_OBSTACK 1" >>confdefs.h
41294
41295    else
41296
41297
41298
41299
41300
41301
41302
41303
41304   M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
41305
41306    fi
41307
41308
41309
41310
41311   case "$host_os" in
41312     mingw* | pw*)
41313       REPLACE_OPEN=1
41314       ;;
41315     *)
41316
41317       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
41318         REPLACE_OPEN=1
41319       fi
41320
41321
41322   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
41323 printf %s "checking whether open recognizes a trailing slash... " >&6; }
41324 if test ${gl_cv_func_open_slash+y}
41325 then :
41326   printf %s "(cached) " >&6
41327 else $as_nop
41328   # Assume that if we have lstat, we can also check symlinks.
41329      if test $ac_cv_func_lstat = yes; then
41330        touch conftest.tmp
41331        ln -s conftest.tmp conftest.lnk
41332      fi
41333      if test "$cross_compiling" = yes
41334 then :
41335
41336         case "$host_os" in
41337           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
41338             gl_cv_func_open_slash="guessing no" ;;
41339           *)
41340             gl_cv_func_open_slash="guessing yes" ;;
41341         esac
41342
41343 else $as_nop
41344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41345 /* end confdefs.h.  */
41346
41347 #include <fcntl.h>
41348 #if HAVE_UNISTD_H
41349 # include <unistd.h>
41350 #endif
41351
41352
41353 $gl_mda_defines
41354
41355 int main ()
41356 {
41357   int result = 0;
41358 #if HAVE_LSTAT
41359   if (open ("conftest.lnk/", O_RDONLY) != -1)
41360     result |= 1;
41361 #endif
41362   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
41363     result |= 2;
41364   return result;
41365 }
41366 _ACEOF
41367 if ac_fn_c_try_run "$LINENO"
41368 then :
41369   gl_cv_func_open_slash=yes
41370 else $as_nop
41371   gl_cv_func_open_slash=no
41372 fi
41373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41374   conftest.$ac_objext conftest.beam conftest.$ac_ext
41375 fi
41376
41377      rm -f conftest.sl conftest.tmp conftest.lnk
41378
41379 fi
41380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
41381 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
41382   case "$gl_cv_func_open_slash" in
41383     *no)
41384
41385 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
41386
41387       ;;
41388   esac
41389
41390       case "$gl_cv_func_open_slash" in
41391         *no)
41392           REPLACE_OPEN=1
41393           ;;
41394       esac
41395       ;;
41396   esac
41397
41398     if test $REPLACE_OPEN = 0; then
41399
41400
41401
41402   if test $ac_cv_func_fchdir = no; then
41403     HAVE_FCHDIR=0
41404   fi
41405
41406       if test $HAVE_FCHDIR = 0; then
41407         REPLACE_OPEN=1
41408       fi
41409     fi
41410
41411
41412
41413   if test $REPLACE_OPEN = 1; then
41414
41415
41416
41417
41418
41419
41420
41421
41422   M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
41423
41424
41425
41426   :
41427
41428   fi
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438           GL_M4_GNULIB_OPEN=1
41439
41440
41441
41442
41443
41444 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
41455   yes+*yes+yes)
41456     ;;
41457   yes+*)
41458     # Solaris 10 lacks O_CLOEXEC.
41459     # Solaris 9 has *at functions, but uniformly mishandles trailing
41460     # slash in all of them.
41461     REPLACE_OPENAT=1
41462     ;;
41463   *)
41464     HAVE_OPENAT=0
41465     ;;
41466   esac
41467
41468   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
41469
41470
41471
41472
41473
41474
41475
41476
41477   M4_LIBOBJS="$M4_LIBOBJS openat.$ac_objext"
41478
41479
41480
41481   :
41482
41483   fi
41484
41485
41486 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497           GL_M4_GNULIB_OPENAT=1
41498
41499
41500
41501
41502
41503 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
41504
41505
41506
41507
41508
41509
41510   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
41511 if test "x$ac_cv_func_opendir" = xyes
41512 then :
41513   printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
41514
41515 fi
41516
41517   if test $ac_cv_func_opendir = no; then
41518     HAVE_OPENDIR=0
41519   fi
41520
41521
41522
41523
41524   if test $ac_cv_func_fchdir = no; then
41525     HAVE_FCHDIR=0
41526   fi
41527
41528     if test $HAVE_FCHDIR = 0; then
41529       if test $HAVE_OPENDIR = 1; then
41530         REPLACE_OPENDIR=1
41531       fi
41532     fi
41533
41534       case $host_os,$HAVE_OPENDIR in
41535     os2*,1)
41536       REPLACE_OPENDIR=1;;
41537   esac
41538
41539   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
41540
41541
41542
41543
41544
41545
41546
41547
41548   M4_LIBOBJS="$M4_LIBOBJS opendir.$ac_objext"
41549
41550   fi
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560           GL_M4_GNULIB_OPENDIR=1
41561
41562
41563
41564
41565
41566 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577   if test $ac_cv_func_pipe != yes; then
41578     HAVE_PIPE=0
41579   fi
41580
41581   if test $HAVE_PIPE = 0; then
41582
41583
41584
41585
41586
41587
41588
41589
41590   M4_LIBOBJS="$M4_LIBOBJS pipe.$ac_objext"
41591
41592   fi
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602           GL_M4_GNULIB_PIPE=1
41603
41604
41605
41606
41607
41608 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618   if test $ac_cv_func_pipe2 != yes; then
41619     HAVE_PIPE2=0
41620   fi
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631           GL_M4_GNULIB_PIPE2=1
41632
41633
41634
41635
41636
41637 printf "%s\n" "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
41638
41639
41640
41641
41642
41643 printf "%s\n" "#define GNULIB_PIPE2_SAFER 1" >>confdefs.h
41644
41645
41646
41647
41648
41649   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41650
41651
41652
41653
41654
41655
41656
41657
41658   M4_LIBOBJS="$M4_LIBOBJS spawn.$ac_objext"
41659
41660   fi
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670           GL_M4_GNULIB_POSIX_SPAWN=1
41671
41672
41673
41674
41675
41676 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN 1" >>confdefs.h
41677
41678
41679
41680
41681
41682
41683   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41684
41685
41686
41687
41688
41689
41690
41691
41692   M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
41693
41694
41695   ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
41696 if test "x$ac_cv_header_paths_h" = xyes
41697 then :
41698   printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
41699
41700 fi
41701
41702   ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
41703 if test "x$ac_cv_func_confstr" = xyes
41704 then :
41705   printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
41706
41707 fi
41708 ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
41709 if test "x$ac_cv_func_sched_setparam" = xyes
41710 then :
41711   printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
41712
41713 fi
41714 ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
41715 if test "x$ac_cv_func_sched_setscheduler" = xyes
41716 then :
41717   printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
41718
41719 fi
41720 ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
41721 if test "x$ac_cv_func_setegid" = xyes
41722 then :
41723   printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
41724
41725 fi
41726 ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
41727 if test "x$ac_cv_func_seteuid" = xyes
41728 then :
41729   printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
41730
41731 fi
41732 ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
41733 if test "x$ac_cv_func_vfork" = xyes
41734 then :
41735   printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
41736
41737 fi
41738
41739
41740   fi
41741
41742
41743
41744
41745
41746
41747
41748   if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
41749             REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
41750   else
41751     HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
41752   fi
41753
41754   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 1; then
41755
41756
41757
41758
41759
41760
41761
41762
41763   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addchdir.$ac_objext"
41764
41765   fi
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
41776
41777
41778
41779
41780
41781 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791   if test $REPLACE_POSIX_SPAWN = 1; then
41792     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41793   else
41794             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
41795 printf %s "checking whether posix_spawn_file_actions_addclose works... " >&6; }
41796 if test ${gl_cv_func_posix_spawn_file_actions_addclose_works+y}
41797 then :
41798   printf %s "(cached) " >&6
41799 else $as_nop
41800   if test "$cross_compiling" = yes
41801 then :
41802   # Guess no on musl libc and Solaris, yes otherwise.
41803           case "$host_os" in
41804             *-musl*)  gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41805             solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41806                       # Guess no on native Windows.
41807             mingw*)   gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41808             *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
41809           esac
41810
41811 else $as_nop
41812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41813 /* end confdefs.h.  */
41814
41815 #include <spawn.h>
41816 int main ()
41817 {
41818   posix_spawn_file_actions_t actions;
41819   if (posix_spawn_file_actions_init (&actions) != 0)
41820     return 1;
41821   if (posix_spawn_file_actions_addclose (&actions, -5) == 0)
41822     return 2;
41823   return 0;
41824 }
41825 _ACEOF
41826 if ac_fn_c_try_run "$LINENO"
41827 then :
41828   gl_cv_func_posix_spawn_file_actions_addclose_works=yes
41829 else $as_nop
41830   gl_cv_func_posix_spawn_file_actions_addclose_works=no
41831 fi
41832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41833   conftest.$ac_objext conftest.beam conftest.$ac_ext
41834 fi
41835
41836
41837 fi
41838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
41839 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
41840     case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
41841       *yes) ;;
41842       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
41843     esac
41844   fi
41845
41846   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
41847
41848
41849
41850
41851
41852
41853
41854
41855   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
41856
41857   fi
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41868
41869
41870
41871
41872
41873 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883   if test $REPLACE_POSIX_SPAWN = 1; then
41884     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41885   else
41886             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
41887 printf %s "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
41888 if test ${gl_cv_func_posix_spawn_file_actions_adddup2_works+y}
41889 then :
41890   printf %s "(cached) " >&6
41891 else $as_nop
41892   if test "$cross_compiling" = yes
41893 then :
41894   # Guess no on musl libc and Solaris, yes otherwise.
41895           case "$host_os" in
41896             *-musl*)  gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
41897             solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
41898                       # Guess no on native Windows.
41899             mingw*)   gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
41900             *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
41901           esac
41902
41903 else $as_nop
41904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41905 /* end confdefs.h.  */
41906
41907 #include <spawn.h>
41908 int main ()
41909 {
41910   posix_spawn_file_actions_t actions;
41911   if (posix_spawn_file_actions_init (&actions) != 0)
41912     return 1;
41913   if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
41914     return 2;
41915   return 0;
41916 }
41917 _ACEOF
41918 if ac_fn_c_try_run "$LINENO"
41919 then :
41920   gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
41921 else $as_nop
41922   gl_cv_func_posix_spawn_file_actions_adddup2_works=no
41923 fi
41924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41925   conftest.$ac_objext conftest.beam conftest.$ac_ext
41926 fi
41927
41928
41929 fi
41930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
41931 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
41932     case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
41933       *yes) ;;
41934       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
41935     esac
41936   fi
41937
41938   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
41939
41940
41941
41942
41943
41944
41945
41946
41947   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
41948
41949   fi
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41960
41961
41962
41963
41964
41965 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975   if test $REPLACE_POSIX_SPAWN = 1; then
41976     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
41977   else
41978             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
41979 printf %s "checking whether posix_spawn_file_actions_addopen works... " >&6; }
41980 if test ${gl_cv_func_posix_spawn_file_actions_addopen_works+y}
41981 then :
41982   printf %s "(cached) " >&6
41983 else $as_nop
41984   if test "$cross_compiling" = yes
41985 then :
41986   # Guess no on musl libc and Solaris, yes otherwise.
41987           case "$host_os" in
41988             *-musl*)  gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
41989             solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
41990                       # Guess no on native Windows.
41991             mingw*)   gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
41992             *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
41993           esac
41994
41995 else $as_nop
41996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41997 /* end confdefs.h.  */
41998
41999 #include <spawn.h>
42000 #include <fcntl.h>
42001 int main ()
42002 {
42003   posix_spawn_file_actions_t actions;
42004   if (posix_spawn_file_actions_init (&actions) != 0)
42005     return 1;
42006   if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
42007       == 0)
42008     return 2;
42009   return 0;
42010 }
42011 _ACEOF
42012 if ac_fn_c_try_run "$LINENO"
42013 then :
42014   gl_cv_func_posix_spawn_file_actions_addopen_works=yes
42015 else $as_nop
42016   gl_cv_func_posix_spawn_file_actions_addopen_works=no
42017 fi
42018 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42019   conftest.$ac_objext conftest.beam conftest.$ac_ext
42020 fi
42021
42022
42023 fi
42024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
42025 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
42026     case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
42027       *yes) ;;
42028       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
42029     esac
42030   fi
42031
42032   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
42033
42034
42035
42036
42037
42038
42039
42040
42041   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
42042
42043   fi
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
42054
42055
42056
42057
42058
42059 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
42060
42061
42062
42063
42064
42065
42066   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42067
42068
42069
42070
42071
42072
42073
42074
42075   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
42076
42077   fi
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
42088
42089
42090
42091
42092
42093 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
42094
42095
42096
42097
42098
42099
42100   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42101
42102
42103
42104
42105
42106
42107
42108
42109   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
42110
42111   fi
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121           GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
42122
42123
42124
42125
42126
42127 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
42128
42129
42130
42131
42132
42133
42134   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42135
42136
42137
42138
42139
42140
42141
42142
42143   M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
42144
42145   fi
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155           GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY=1
42156
42157
42158
42159
42160
42161 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
42162
42163
42164
42165
42166
42167
42168   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42169
42170
42171
42172
42173
42174
42175
42176
42177   M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
42178
42179   fi
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189           GL_M4_GNULIB_POSIX_SPAWNATTR_INIT=1
42190
42191
42192
42193
42194
42195 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
42196
42197
42198
42199
42200
42201
42202   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42203
42204
42205
42206
42207
42208
42209
42210
42211   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
42212
42213   fi
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223           GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
42224
42225
42226
42227
42228
42229 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
42230
42231
42232
42233
42234
42235
42236   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42237
42238
42239
42240
42241
42242
42243
42244
42245   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setpgroup.$ac_objext"
42246
42247   fi
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257           GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP=1
42258
42259
42260
42261
42262
42263 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP 1" >>confdefs.h
42264
42265
42266
42267
42268
42269
42270   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42271
42272
42273
42274
42275
42276
42277
42278
42279   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
42280
42281   fi
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291           GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
42292
42293
42294
42295
42296
42297 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
42298
42299
42300
42301
42302
42303
42304   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42305
42306
42307
42308
42309
42310
42311
42312
42313   M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
42314
42315   fi
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325           GL_M4_GNULIB_POSIX_SPAWNP=1
42326
42327
42328
42329
42330
42331 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
42332
42333
42334
42335
42336
42337   if test $gl_cv_func_frexp_no_libm = yes; then
42338
42339
42340
42341   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
42342 printf %s "checking whether frexp works... " >&6; }
42343 if test ${gl_cv_func_frexp_works+y}
42344 then :
42345   printf %s "(cached) " >&6
42346 else $as_nop
42347
42348       if test "$cross_compiling" = yes
42349 then :
42350   case "$host_os" in
42351            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
42352            mingw*) # Guess yes with MSVC, no with mingw.
42353              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42354 /* end confdefs.h.  */
42355
42356 #ifdef _MSC_VER
42357  Good
42358 #endif
42359
42360 _ACEOF
42361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42362   $EGREP "Good" >/dev/null 2>&1
42363 then :
42364   gl_cv_func_frexp_works="guessing yes"
42365 else $as_nop
42366   gl_cv_func_frexp_works="guessing no"
42367 fi
42368 rm -rf conftest*
42369
42370              ;;
42371            *) gl_cv_func_frexp_works="guessing yes" ;;
42372          esac
42373
42374 else $as_nop
42375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42376 /* end confdefs.h.  */
42377
42378 #include <float.h>
42379 #include <math.h>
42380 #include <string.h>
42381 #if HAVE_DECL_ALARM
42382 # include <signal.h>
42383 # include <unistd.h>
42384 #endif
42385 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
42386    ICC 10.0 has a bug when optimizing the expression -zero.
42387    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
42388    to PowerPC on Mac OS X 10.5.  */
42389 #if defined __hpux || defined __sgi || defined __ICC
42390 static double
42391 compute_minus_zero (void)
42392 {
42393   return -DBL_MIN * DBL_MIN;
42394 }
42395 # define minus_zero compute_minus_zero ()
42396 #else
42397 double minus_zero = -0.0;
42398 #endif
42399 int main()
42400 {
42401   int result = 0;
42402   int i;
42403   volatile double x;
42404   double zero = 0.0;
42405 #if HAVE_DECL_ALARM
42406   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
42407      number.  Let the test fail in this case.  */
42408   signal (SIGALRM, SIG_DFL);
42409   alarm (5);
42410 #endif
42411   /* Test on denormalized numbers.  */
42412   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
42413     ;
42414   if (x > 0.0)
42415     {
42416       int exp;
42417       double y = frexp (x, &exp);
42418       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
42419          On NetBSD: y = 0.75. Correct: y = 0.5.  */
42420       if (y != 0.5)
42421         result |= 1;
42422     }
42423   /* Test on infinite numbers.  */
42424   x = 1.0 / zero;
42425   {
42426     int exp;
42427     double y = frexp (x, &exp);
42428     if (y != x)
42429       result |= 2;
42430   }
42431   /* Test on negative zero.  */
42432   x = minus_zero;
42433   {
42434     int exp;
42435     double y = frexp (x, &exp);
42436     if (memcmp (&y, &x, sizeof x))
42437       result |= 4;
42438   }
42439   return result;
42440 }
42441 _ACEOF
42442 if ac_fn_c_try_run "$LINENO"
42443 then :
42444   gl_cv_func_frexp_works=yes
42445 else $as_nop
42446   gl_cv_func_frexp_works=no
42447 fi
42448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42449   conftest.$ac_objext conftest.beam conftest.$ac_ext
42450 fi
42451
42452
42453 fi
42454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
42455 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
42456
42457     case "$gl_cv_func_frexp_works" in
42458       *yes)
42459
42460 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
42461
42462         ;;
42463     esac
42464   fi
42465
42466   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
42467 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
42468 if test ${gl_cv_func_ldexp_no_libm+y}
42469 then :
42470   printf %s "(cached) " >&6
42471 else $as_nop
42472
42473       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42474 /* end confdefs.h.  */
42475 #include <math.h>
42476              double x;
42477              int y;
42478 int
42479 main (void)
42480 {
42481 return ldexp (x, y) < 1;
42482   ;
42483   return 0;
42484 }
42485 _ACEOF
42486 if ac_fn_c_try_link "$LINENO"
42487 then :
42488   gl_cv_func_ldexp_no_libm=yes
42489 else $as_nop
42490   gl_cv_func_ldexp_no_libm=no
42491 fi
42492 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42493     conftest$ac_exeext conftest.$ac_ext
42494
42495 fi
42496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
42497 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
42498   if test $gl_cv_func_ldexp_no_libm = yes; then
42499
42500 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
42501
42502   fi
42503
42504
42505
42506
42507
42508
42509   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
42510 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
42511 if test ${gl_cv_func_frexpl_no_libm+y}
42512 then :
42513   printf %s "(cached) " >&6
42514 else $as_nop
42515
42516       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42517 /* end confdefs.h.  */
42518 #include <math.h>
42519              long double x;
42520 int
42521 main (void)
42522 {
42523 int e; return frexpl (x, &e) > 0;
42524   ;
42525   return 0;
42526 }
42527 _ACEOF
42528 if ac_fn_c_try_link "$LINENO"
42529 then :
42530   gl_cv_func_frexpl_no_libm=yes
42531 else $as_nop
42532   gl_cv_func_frexpl_no_libm=no
42533 fi
42534 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42535     conftest$ac_exeext conftest.$ac_ext
42536
42537 fi
42538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
42539 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
42540
42541   if test $gl_cv_func_frexpl_no_libm = yes; then
42542
42543
42544      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
42545 printf %s "checking whether frexpl works... " >&6; }
42546 if test ${gl_cv_func_frexpl_works+y}
42547 then :
42548   printf %s "(cached) " >&6
42549 else $as_nop
42550
42551       if test "$cross_compiling" = yes
42552 then :
42553
42554          case "$host_os" in
42555            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
42556               gl_cv_func_frexpl_works="guessing no";;
42557            *) gl_cv_func_frexpl_works="guessing yes";;
42558          esac
42559
42560 else $as_nop
42561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42562 /* end confdefs.h.  */
42563
42564 #include <float.h>
42565 #include <math.h>
42566 /* Override the values of <float.h>, like done in float.in.h.  */
42567 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
42568 # undef LDBL_MIN_EXP
42569 # define LDBL_MIN_EXP    (-16381)
42570 #endif
42571 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
42572 # undef LDBL_MIN_EXP
42573 # define LDBL_MIN_EXP    (-16381)
42574 #endif
42575 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
42576 # undef LDBL_MIN_EXP
42577 # define LDBL_MIN_EXP DBL_MIN_EXP
42578 #endif
42579 #if defined __sgi && (LDBL_MANT_DIG >= 106)
42580 # if defined __GNUC__
42581 #  undef LDBL_MIN_EXP
42582 #  define LDBL_MIN_EXP DBL_MIN_EXP
42583 # endif
42584 #endif
42585 extern
42586 #ifdef __cplusplus
42587 "C"
42588 #endif
42589 long double frexpl (long double, int *);
42590 long double zero = 0.0L;
42591 int main()
42592 {
42593   int result = 0;
42594   volatile long double x;
42595   /* Test on finite numbers that fails on AIX 5.1.  */
42596   x = 16.0L;
42597   {
42598     int exp = -9999;
42599     frexpl (x, &exp);
42600     if (exp != 5)
42601       result |= 1;
42602   }
42603   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
42604      function returns an invalid (incorrectly normalized) value: it returns
42605                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
42606      but the correct result is
42607           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
42608   x = 1.01L;
42609   {
42610     int exp = -9999;
42611     long double y = frexpl (x, &exp);
42612     if (!(exp == 1 && y == 0.505L))
42613       result |= 2;
42614   }
42615   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
42616      LDBL_MAX_EXP = 16384.
42617      In the loop end test, we test x against Infinity, rather than comparing
42618      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
42619   {
42620     int i;
42621     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
42622       {
42623         int exp = -9999;
42624         frexpl (x, &exp);
42625         if (exp != i)
42626           {
42627             result |= 4;
42628             break;
42629           }
42630       }
42631   }
42632   /* Test on denormalized numbers.  */
42633   {
42634     int i;
42635     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
42636       ;
42637     if (x > 0.0L)
42638       {
42639         int exp;
42640         long double y = frexpl (x, &exp);
42641         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
42642            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
42643         if (exp != LDBL_MIN_EXP - 1)
42644           result |= 8;
42645       }
42646   }
42647   /* Test on infinite numbers.  */
42648   /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
42649   x = 1.0L / zero;
42650   {
42651     int exp;
42652     long double y = frexpl (x, &exp);
42653     if (y != x)
42654       result |= 16;
42655   }
42656   return result;
42657 }
42658 _ACEOF
42659 if ac_fn_c_try_run "$LINENO"
42660 then :
42661   gl_cv_func_frexpl_works=yes
42662 else $as_nop
42663   gl_cv_func_frexpl_works=no
42664 fi
42665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42666   conftest.$ac_objext conftest.beam conftest.$ac_ext
42667 fi
42668
42669
42670 fi
42671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
42672 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
42673
42674     case "$gl_cv_func_frexpl_works" in
42675       *yes) gl_func_frexpl_no_libm=yes ;;
42676       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
42677     esac
42678   else
42679     gl_func_frexpl_no_libm=no
42680         REPLACE_FREXPL=1
42681   fi
42682   if test $gl_func_frexpl_no_libm = yes; then
42683
42684 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
42685
42686             ac_fn_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
42687 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42688 if test "x$ac_cv_have_decl_frexpl" = xyes
42689 then :
42690
42691 else $as_nop
42692   HAVE_DECL_FREXPL=0
42693 fi
42694   fi
42695
42696
42697   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
42698 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
42699 if test ${gl_cv_func_ldexpl_no_libm+y}
42700 then :
42701   printf %s "(cached) " >&6
42702 else $as_nop
42703
42704       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42705 /* end confdefs.h.  */
42706 #include <math.h>
42707              long double x;
42708 int
42709 main (void)
42710 {
42711 return ldexpl (x, -1) > 0;
42712   ;
42713   return 0;
42714 }
42715 _ACEOF
42716 if ac_fn_c_try_link "$LINENO"
42717 then :
42718   gl_cv_func_ldexpl_no_libm=yes
42719 else $as_nop
42720   gl_cv_func_ldexpl_no_libm=no
42721 fi
42722 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42723     conftest$ac_exeext conftest.$ac_ext
42724
42725 fi
42726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
42727 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
42728
42729   if test $gl_cv_func_ldexpl_no_libm = yes; then
42730
42731
42732      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
42733 printf %s "checking whether ldexpl works... " >&6; }
42734 if test ${gl_cv_func_ldexpl_works+y}
42735 then :
42736   printf %s "(cached) " >&6
42737 else $as_nop
42738
42739       if test "$cross_compiling" = yes
42740 then :
42741
42742          case "$host_os" in
42743            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
42744                             # Guess yes on native Windows.
42745            mingw*)          gl_cv_func_ldexpl_works="guessing yes" ;;
42746            *)               gl_cv_func_ldexpl_works="guessing yes" ;;
42747          esac
42748
42749 else $as_nop
42750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42751 /* end confdefs.h.  */
42752
42753 #include <math.h>
42754 extern
42755 #ifdef __cplusplus
42756 "C"
42757 #endif
42758 long double ldexpl (long double, int);
42759 int main()
42760 {
42761   int result = 0;
42762   {
42763     volatile long double x = 1.0;
42764     volatile long double y = ldexpl (x, -1);
42765     if (y != 0.5L)
42766       result |= 1;
42767   }
42768   {
42769     volatile long double x = 1.73205L;
42770     volatile long double y = ldexpl (x, 0);
42771     if (y != x)
42772       result |= 2;
42773   }
42774   return result;
42775 }
42776 _ACEOF
42777 if ac_fn_c_try_run "$LINENO"
42778 then :
42779   gl_cv_func_ldexpl_works=yes
42780 else $as_nop
42781   gl_cv_func_ldexpl_works=no
42782 fi
42783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42784   conftest.$ac_objext conftest.beam conftest.$ac_ext
42785 fi
42786
42787
42788 fi
42789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
42790 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
42791
42792     case "$gl_cv_func_ldexpl_works" in
42793       *yes)
42794
42795 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
42796
42797                         ac_fn_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
42798 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42799 if test "x$ac_cv_have_decl_ldexpl" = xyes
42800 then :
42801
42802 else $as_nop
42803   HAVE_DECL_LDEXPL=0
42804 fi
42805         ;;
42806     esac
42807   fi
42808
42809
42810   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
42811 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42812 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
42813 then :
42814   ac_have_decl=1
42815 else $as_nop
42816   ac_have_decl=0
42817 fi
42818 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
42819
42820   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
42821 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42822 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
42823 then :
42824   ac_have_decl=1
42825 else $as_nop
42826   ac_have_decl=0
42827 fi
42828 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
42829
42830
42831
42832   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
42833
42834
42835
42836   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
42837
42838
42839
42840   :
42841
42842
42843
42844
42845   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
42846 if test "x$ac_cv_func_raise" = xyes
42847 then :
42848   printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
42849
42850 fi
42851
42852   if test $ac_cv_func_raise = no; then
42853     HAVE_RAISE=0
42854   else
42855
42856
42857       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
42858         REPLACE_RAISE=1
42859       fi
42860
42861
42862
42863
42864
42865   HAVE_POSIX_SIGNALBLOCKING=0
42866   if test "$gl_cv_type_sigset_t" = yes; then
42867     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
42868 if test "x$ac_cv_func_sigprocmask" = xyes
42869 then :
42870   HAVE_POSIX_SIGNALBLOCKING=1
42871 fi
42872
42873   fi
42874
42875       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
42876
42877
42878
42879
42880           if test $gl_cv_header_signal_h_SIGPIPE != yes; then
42881             REPLACE_RAISE=1
42882           fi
42883
42884       fi
42885
42886   fi
42887
42888   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
42889
42890
42891
42892
42893
42894
42895
42896
42897   M4_LIBOBJS="$M4_LIBOBJS raise.$ac_objext"
42898
42899     :
42900   fi
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910           GL_M4_GNULIB_RAISE=1
42911
42912
42913
42914
42915
42916 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
42917
42918
42919
42920
42921
42922
42923
42924   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
42925 if test "x$ac_cv_func_rawmemchr" = xyes
42926 then :
42927   printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
42928
42929 fi
42930
42931   if test $ac_cv_func_rawmemchr = no; then
42932     HAVE_RAWMEMCHR=0
42933   fi
42934
42935   if test $HAVE_RAWMEMCHR = 0; then
42936
42937
42938
42939
42940
42941
42942
42943
42944   M4_LIBOBJS="$M4_LIBOBJS rawmemchr.$ac_objext"
42945
42946     :
42947   fi
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957           GL_M4_GNULIB_RAWMEMCHR=1
42958
42959
42960
42961
42962
42963 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
42964
42965
42966
42967
42968
42969
42970   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
42971 if test "x$ac_cv_func_readdir" = xyes
42972 then :
42973   printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
42974
42975 fi
42976
42977   if test $ac_cv_func_readdir = no; then
42978     HAVE_READDIR=0
42979   fi
42980
42981   if test $HAVE_READDIR = 0; then
42982
42983
42984
42985
42986
42987
42988
42989
42990   M4_LIBOBJS="$M4_LIBOBJS readdir.$ac_objext"
42991
42992   fi
42993
42994
42995
42996
42997
42998
42999
43000
43001
43002           GL_M4_GNULIB_READDIR=1
43003
43004
43005
43006
43007
43008 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
43009
43010
43011
43012
43013
43014
43015   if test $ac_cv_func_readlink = no; then
43016     HAVE_READLINK=0
43017   else
43018     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
43019 printf %s "checking whether readlink signature is correct... " >&6; }
43020 if test ${gl_cv_decl_readlink_works+y}
43021 then :
43022   printf %s "(cached) " >&6
43023 else $as_nop
43024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43025 /* end confdefs.h.  */
43026 #include <unistd.h>
43027       /* Cause compilation failure if original declaration has wrong type.  */
43028       ssize_t readlink (const char *, char *, size_t);
43029 int
43030 main (void)
43031 {
43032
43033   ;
43034   return 0;
43035 }
43036 _ACEOF
43037 if ac_fn_c_try_compile "$LINENO"
43038 then :
43039   gl_cv_decl_readlink_works=yes
43040 else $as_nop
43041   gl_cv_decl_readlink_works=no
43042 fi
43043 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43044 fi
43045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
43046 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
43047             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
43048 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
43049 if test ${gl_cv_func_readlink_trailing_slash+y}
43050 then :
43051   printf %s "(cached) " >&6
43052 else $as_nop
43053   # We have readlink, so assume ln -s works.
43054        ln -s conftest.no-such conftest.link
43055        ln -s conftest.link conftest.lnk2
43056        if test "$cross_compiling" = yes
43057 then :
43058   case "$host_os" in
43059             # Guess yes on Linux or glibc systems.
43060             linux-* | linux | *-gnu* | gnu*)
43061               gl_cv_func_readlink_trailing_slash="guessing yes" ;;
43062             # Guess no on AIX or HP-UX.
43063             aix* | hpux*)
43064               gl_cv_func_readlink_trailing_slash="guessing no" ;;
43065             # If we don't know, obey --enable-cross-guesses.
43066             *)
43067               gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
43068           esac
43069
43070 else $as_nop
43071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43072 /* end confdefs.h.  */
43073 #include <unistd.h>
43074
43075 int
43076 main (void)
43077 {
43078 char buf[20];
43079       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
43080   ;
43081   return 0;
43082 }
43083 _ACEOF
43084 if ac_fn_c_try_run "$LINENO"
43085 then :
43086   gl_cv_func_readlink_trailing_slash=yes
43087 else $as_nop
43088   gl_cv_func_readlink_trailing_slash=no
43089 fi
43090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43091   conftest.$ac_objext conftest.beam conftest.$ac_ext
43092 fi
43093
43094       rm -f conftest.link conftest.lnk2
43095 fi
43096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
43097 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
43098     case "$gl_cv_func_readlink_trailing_slash" in
43099       *yes)
43100         if test "$gl_cv_decl_readlink_works" != yes; then
43101           REPLACE_READLINK=1
43102         fi
43103         ;;
43104       *)
43105
43106 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
43107
43108         REPLACE_READLINK=1
43109         ;;
43110     esac
43111
43112     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
43113 printf %s "checking whether readlink truncates results correctly... " >&6; }
43114 if test ${gl_cv_func_readlink_truncate+y}
43115 then :
43116   printf %s "(cached) " >&6
43117 else $as_nop
43118   # We have readlink, so assume ln -s works.
43119        ln -s ab conftest.link
43120        if test "$cross_compiling" = yes
43121 then :
43122   case "$host_os" in
43123             # Guess yes on Linux or glibc systems.
43124             linux-* | linux | *-gnu* | gnu*)
43125               gl_cv_func_readlink_truncate="guessing yes" ;;
43126             # Guess no on AIX or HP-UX.
43127             aix* | hpux*)
43128               gl_cv_func_readlink_truncate="guessing no" ;;
43129             # If we don't know, obey --enable-cross-guesses.
43130             *)
43131               gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
43132           esac
43133
43134 else $as_nop
43135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43136 /* end confdefs.h.  */
43137 #include <unistd.h>
43138
43139 int
43140 main (void)
43141 {
43142 char c;
43143       return readlink ("conftest.link", &c, 1) != 1;
43144   ;
43145   return 0;
43146 }
43147 _ACEOF
43148 if ac_fn_c_try_run "$LINENO"
43149 then :
43150   gl_cv_func_readlink_truncate=yes
43151 else $as_nop
43152   gl_cv_func_readlink_truncate=no
43153 fi
43154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43155   conftest.$ac_objext conftest.beam conftest.$ac_ext
43156 fi
43157
43158       rm -f conftest.link conftest.lnk2
43159 fi
43160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
43161 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
43162     case $gl_cv_func_readlink_truncate in
43163       *yes)
43164         if test "$gl_cv_decl_readlink_works" != yes; then
43165           REPLACE_READLINK=1
43166         fi
43167         ;;
43168       *)
43169
43170 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
43171
43172         REPLACE_READLINK=1
43173         ;;
43174     esac
43175   fi
43176
43177   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
43178
43179
43180
43181
43182
43183
43184
43185
43186   M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
43187
43188
43189   :
43190
43191   fi
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201           GL_M4_GNULIB_READLINK=1
43202
43203
43204
43205
43206
43207 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
43208
43209
43210
43211
43212
43213
43214   if test $REPLACE_REALLOC = 0; then
43215
43216     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
43217 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
43218 if test ${ac_cv_func_realloc_0_nonnull+y}
43219 then :
43220   printf %s "(cached) " >&6
43221 else $as_nop
43222   if test "$cross_compiling" = yes
43223 then :
43224   case "$host_os" in
43225           # Guess yes on platforms where we know the result.
43226           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
43227           | gnu* | *-musl* | midnightbsd* \
43228           | hpux* | solaris* | cygwin* | mingw* | msys* )
43229             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
43230           # If we don't know, obey --enable-cross-guesses.
43231           *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
43232         esac
43233
43234 else $as_nop
43235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43236 /* end confdefs.h.  */
43237 #include <stdlib.h>
43238
43239 int
43240 main (void)
43241 {
43242 void *p = realloc (0, 0);
43243             int result = !p;
43244             free (p);
43245             return result;
43246   ;
43247   return 0;
43248 }
43249
43250 _ACEOF
43251 if ac_fn_c_try_run "$LINENO"
43252 then :
43253   ac_cv_func_realloc_0_nonnull=yes
43254 else $as_nop
43255   ac_cv_func_realloc_0_nonnull=no
43256 fi
43257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43258   conftest.$ac_objext conftest.beam conftest.$ac_ext
43259 fi
43260
43261
43262 fi
43263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
43264 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
43265   case $ac_cv_func_realloc_0_nonnull in #(
43266   *yes) :
43267      ;; #(
43268   *) :
43269     REPLACE_REALLOC=1 ;;
43270 esac
43271
43272   fi
43273
43274   if test $REPLACE_REALLOC = 1; then
43275
43276
43277
43278
43279
43280
43281
43282
43283   M4_LIBOBJS="$M4_LIBOBJS realloc.$ac_objext"
43284
43285   fi
43286
43287
43288
43289   if test $REPLACE_MALLOC = 1; then
43290     REPLACE_REALLOC=1
43291   fi
43292
43293   if test $REPLACE_REALLOC = 1; then
43294
43295
43296
43297
43298
43299
43300
43301
43302   M4_LIBOBJS="$M4_LIBOBJS realloc.$ac_objext"
43303
43304   fi
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314           GL_M4_GNULIB_REALLOC_POSIX=1
43315
43316
43317
43318
43319
43320 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
43321
43322
43323
43324
43325
43326
43327
43328
43329   ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
43330 if test "x$ac_cv_func_reallocarray" = xyes
43331 then :
43332   printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
43333
43334 fi
43335
43336   if test "$ac_cv_func_reallocarray" = no; then
43337     HAVE_REALLOCARRAY=0
43338   elif test "$gl_cv_malloc_ptrdiff" = no; then
43339     REPLACE_REALLOCARRAY=1
43340   fi
43341
43342   if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
43343
43344
43345
43346
43347
43348
43349
43350
43351   M4_LIBOBJS="$M4_LIBOBJS reallocarray.$ac_objext"
43352
43353     :
43354   fi
43355
43356
43357 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369           GL_M4_GNULIB_REALLOCARRAY=1
43370
43371
43372
43373
43374
43375 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
43376
43377
43378
43379
43380
43381 # Check whether --with-included-regex was given.
43382 if test ${with_included_regex+y}
43383 then :
43384   withval=$with_included_regex;
43385 fi
43386
43387
43388   case $with_included_regex in #(
43389   yes|no) ac_use_included_regex=$with_included_regex
43390         ;;
43391   '')
43392     # If the system regex support is good enough that it passes the
43393     # following run test, then default to *not* using the included regex.c.
43394     # If cross compiling, assume the test would fail and use the included
43395     # regex.c.
43396
43397
43398     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
43399 printf %s "checking for working re_compile_pattern... " >&6; }
43400 if test ${gl_cv_func_re_compile_pattern_working+y}
43401 then :
43402   printf %s "(cached) " >&6
43403 else $as_nop
43404   if test "$cross_compiling" = yes
43405 then :
43406   case "$host_os" in
43407                    # Guess no on native Windows.
43408            mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
43409                    # Otherwise obey --enable-cross-guesses.
43410            *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
43411          esac
43412
43413 else $as_nop
43414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43415 /* end confdefs.h.  */
43416 #include <regex.h>
43417
43418             #include <locale.h>
43419             #include <limits.h>
43420             #include <string.h>
43421
43422             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
43423             # include <signal.h>
43424             # include <unistd.h>
43425             #endif
43426
43427             #if HAVE_MALLOC_H
43428             # include <malloc.h>
43429             #endif
43430
43431             #ifdef M_CHECK_ACTION
43432             /* Exit with distinguishable exit code.  */
43433             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
43434             #endif
43435
43436 int
43437 main (void)
43438 {
43439 int result = 0;
43440             static struct re_pattern_buffer regex;
43441             unsigned char folded_chars[UCHAR_MAX + 1];
43442             int i;
43443             const char *s;
43444             struct re_registers regs;
43445
43446             /* Some builds of glibc go into an infinite loop on this
43447                test.  Use alarm to force death, and mallopt to avoid
43448                malloc recursion in diagnosing the corrupted heap. */
43449 #if HAVE_DECL_ALARM
43450             signal (SIGALRM, SIG_DFL);
43451             alarm (2);
43452 #endif
43453 #ifdef M_CHECK_ACTION
43454             signal (SIGABRT, sigabrt_no_core);
43455             mallopt (M_CHECK_ACTION, 2);
43456 #endif
43457
43458             if (setlocale (LC_ALL, "en_US.UTF-8"))
43459               {
43460                 {
43461                   /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
43462                      This test needs valgrind to catch the bug on Debian
43463                      GNU/Linux 3.1 x86, but it might catch the bug better
43464                      on other platforms and it shouldn't hurt to try the
43465                      test here.  */
43466                   static char const pat[] = "insert into";
43467                   static char const data[] =
43468                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
43469                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
43470                                  | RE_ICASE);
43471                   memset (&regex, 0, sizeof regex);
43472                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
43473                   if (s)
43474                     result |= 1;
43475                   else
43476                     {
43477                       if (re_search (&regex, data, sizeof data - 1,
43478                                      0, sizeof data - 1, &regs)
43479                           != -1)
43480                         result |= 1;
43481                       regfree (&regex);
43482                     }
43483                 }
43484
43485                 {
43486                   /* This test is from glibc bug 15078.
43487                      The test case is from Andreas Schwab in
43488                      <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
43489                      */
43490                   static char const pat[] = "[^x]x";
43491                   static char const data[] =
43492                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
43493                     "\xe1\x80\x80"
43494                     "\xe1\x80\xbb"
43495                     "\xe1\x80\xbd"
43496                     "\xe1\x80\x94"
43497                     "\xe1\x80\xba"
43498                     "\xe1\x80\xaf"
43499                     "\xe1\x80\x95"
43500                     "\xe1\x80\xba"
43501                     "x";
43502                   re_set_syntax (0);
43503                   memset (&regex, 0, sizeof regex);
43504                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
43505                   if (s)
43506                     result |= 1;
43507                   else
43508                     {
43509                       i = re_search (&regex, data, sizeof data - 1,
43510                                      0, sizeof data - 1, 0);
43511                       if (i != 0 && i != 21)
43512                         result |= 1;
43513                       regfree (&regex);
43514                     }
43515                 }
43516
43517                 if (! setlocale (LC_ALL, "C"))
43518                   return 1;
43519               }
43520
43521             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
43522             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
43523             memset (&regex, 0, sizeof regex);
43524             s = re_compile_pattern ("a[^x]b", 6, &regex);
43525             if (s)
43526               result |= 2;
43527             else
43528               {
43529                 /* This should fail, but succeeds for glibc-2.5.  */
43530                 if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
43531                   result |= 2;
43532                 regfree (&regex);
43533               }
43534
43535             /* This regular expression is from Spencer ere test number 75
43536                in grep-2.3.  */
43537             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
43538             memset (&regex, 0, sizeof regex);
43539             for (i = 0; i <= UCHAR_MAX; i++)
43540               folded_chars[i] = i;
43541             regex.translate = folded_chars;
43542             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
43543             /* This should fail with _Invalid character class name_ error.  */
43544             if (!s)
43545               {
43546                 result |= 4;
43547                 regfree (&regex);
43548               }
43549
43550             /* Ensure that [b-a] is diagnosed as invalid, when
43551                using RE_NO_EMPTY_RANGES. */
43552             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
43553             memset (&regex, 0, sizeof regex);
43554             s = re_compile_pattern ("a[b-a]", 6, &regex);
43555             if (s == 0)
43556               {
43557                 result |= 8;
43558                 regfree (&regex);
43559               }
43560
43561             /* This should succeed, but does not for glibc-2.1.3.  */
43562             memset (&regex, 0, sizeof regex);
43563             s = re_compile_pattern ("{1", 2, &regex);
43564             if (s)
43565               result |= 8;
43566             else
43567               regfree (&regex);
43568
43569             /* The following example is derived from a problem report
43570                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
43571             memset (&regex, 0, sizeof regex);
43572             s = re_compile_pattern ("[an\371]*n", 7, &regex);
43573             if (s)
43574               result |= 8;
43575             else
43576               {
43577                 /* This should match, but does not for glibc-2.2.1.  */
43578                 if (re_match (&regex, "an", 2, 0, &regs) != 2)
43579                   result |= 8;
43580                 else
43581                   {
43582                     free (regs.start);
43583                     free (regs.end);
43584                   }
43585                 regfree (&regex);
43586               }
43587
43588             memset (&regex, 0, sizeof regex);
43589             s = re_compile_pattern ("x", 1, &regex);
43590             if (s)
43591               result |= 8;
43592             else
43593               {
43594                 /* glibc-2.2.93 does not work with a negative RANGE argument.  */
43595                 if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
43596                   result |= 8;
43597                 else
43598                   {
43599                     free (regs.start);
43600                     free (regs.end);
43601                   }
43602                 regfree (&regex);
43603               }
43604
43605             /* The version of regex.c in older versions of gnulib
43606                ignored RE_ICASE.  Detect that problem too.  */
43607             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
43608             memset (&regex, 0, sizeof regex);
43609             s = re_compile_pattern ("x", 1, &regex);
43610             if (s)
43611               result |= 16;
43612             else
43613               {
43614                 if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
43615                   result |= 16;
43616                 else
43617                   {
43618                     free (regs.start);
43619                     free (regs.end);
43620                   }
43621                 regfree (&regex);
43622               }
43623
43624             /* Catch a bug reported by Vin Shelton in
43625                https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
43626                */
43627             re_set_syntax (RE_SYNTAX_POSIX_BASIC
43628                            & ~RE_CONTEXT_INVALID_DUP
43629                            & ~RE_NO_EMPTY_RANGES);
43630             memset (&regex, 0, sizeof regex);
43631             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
43632             if (s)
43633               result |= 32;
43634             else
43635               regfree (&regex);
43636
43637             /* REG_STARTEND was added to glibc on 2004-01-15.
43638                Reject older versions.  */
43639             if (! REG_STARTEND)
43640               result |= 64;
43641
43642             /* Matching with the compiled form of this regexp would provoke
43643                an assertion failure prior to glibc-2.28:
43644                  regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
43645                With glibc-2.28, compilation fails and reports the invalid
43646                back reference.  */
43647             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
43648             memset (&regex, 0, sizeof regex);
43649             s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
43650             if (!s)
43651               result |= 64;
43652             else
43653               {
43654                 if (strcmp (s, "Invalid back reference"))
43655                   result |= 64;
43656                 regfree (&regex);
43657               }
43658
43659 #if 0
43660             /* It would be nice to reject hosts whose regoff_t values are too
43661                narrow (including glibc on hosts with 64-bit ptrdiff_t and
43662                32-bit int), but we should wait until glibc implements this
43663                feature.  Otherwise, support for equivalence classes and
43664                multibyte collation symbols would always be broken except
43665                when compiling --without-included-regex.   */
43666             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
43667                 || sizeof (regoff_t) < sizeof (ssize_t))
43668               result |= 64;
43669 #endif
43670
43671             return result;
43672
43673   ;
43674   return 0;
43675 }
43676 _ACEOF
43677 if ac_fn_c_try_run "$LINENO"
43678 then :
43679   gl_cv_func_re_compile_pattern_working=yes
43680 else $as_nop
43681   gl_cv_func_re_compile_pattern_working=no
43682 fi
43683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43684   conftest.$ac_objext conftest.beam conftest.$ac_ext
43685 fi
43686
43687
43688 fi
43689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
43690 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
43691     case "$gl_cv_func_re_compile_pattern_working" in #(
43692       *yes) ac_use_included_regex=no;; #(
43693       *no) ac_use_included_regex=yes;;
43694     esac
43695     ;;
43696   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
43697     ;;
43698   esac
43699
43700   if test $ac_use_included_regex = yes; then
43701
43702 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
43703
43704
43705 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
43706
43707
43708 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
43709
43710
43711 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
43712
43713
43714 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
43715
43716
43717 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
43718
43719
43720 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
43721
43722
43723 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
43724
43725
43726 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
43727
43728
43729 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
43730
43731
43732 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
43733
43734
43735 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
43736
43737
43738 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
43739
43740
43741 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
43742
43743
43744 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
43745
43746
43747 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
43748
43749
43750 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
43751
43752   fi
43753
43754   if test $ac_use_included_regex = yes; then
43755
43756
43757
43758
43759
43760
43761
43762
43763   M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
43764
43765
43766
43767
43768
43769
43770
43771   ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
43772 if test "x$ac_cv_header_libintl_h" = xyes
43773 then :
43774   printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
43775
43776 fi
43777
43778
43779   ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
43780 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43781 if test "x$ac_cv_have_decl_isblank" = xyes
43782 then :
43783   ac_have_decl=1
43784 else $as_nop
43785   ac_have_decl=0
43786 fi
43787 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
43788
43789
43790   fi
43791
43792
43793
43794
43795
43796                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
43797 printf %s "checking whether rename honors trailing slash on destination... " >&6; }
43798 if test ${gl_cv_func_rename_slash_dst_works+y}
43799 then :
43800   printf %s "(cached) " >&6
43801 else $as_nop
43802   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
43803     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
43804       as_fn_error $? "cannot create temporary files" "$LINENO" 5
43805     # Assume that if we have lstat, we can also check symlinks.
43806     if test $ac_cv_func_lstat = yes; then
43807       ln -s conftest.f conftest.lnk
43808     fi
43809     if test "$cross_compiling" = yes
43810 then :
43811         case "$host_os" in
43812                           # Guess yes on Linux systems.
43813          linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
43814                           # Guess yes on glibc systems.
43815          *-gnu*)          gl_cv_func_rename_slash_dst_works="guessing yes" ;;
43816                           # Guess no on native Windows.
43817          mingw*)          gl_cv_func_rename_slash_dst_works="guessing no" ;;
43818                           # If we don't know, obey --enable-cross-guesses.
43819          *)               gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
43820        esac
43821
43822 else $as_nop
43823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43824 /* end confdefs.h.  */
43825
43826 #        include <stdio.h>
43827 #        include <stdlib.h>
43828
43829 int
43830 main (void)
43831 {
43832 int result = 0;
43833            if (rename ("conftest.f1", "conftest.f2/") == 0)
43834              result |= 1;
43835            if (rename ("conftest.d1", "conftest.d2/") != 0)
43836              result |= 2;
43837 #if HAVE_LSTAT
43838            if (rename ("conftest.f", "conftest.lnk/") == 0)
43839              result |= 4;
43840 #endif
43841            return result;
43842
43843   ;
43844   return 0;
43845 }
43846 _ACEOF
43847 if ac_fn_c_try_run "$LINENO"
43848 then :
43849   gl_cv_func_rename_slash_dst_works=yes
43850 else $as_nop
43851   gl_cv_func_rename_slash_dst_works=no
43852 fi
43853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43854   conftest.$ac_objext conftest.beam conftest.$ac_ext
43855 fi
43856
43857     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
43858
43859 fi
43860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
43861 printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
43862   case "$gl_cv_func_rename_slash_dst_works" in
43863     *yes) ;;
43864     *)
43865       REPLACE_RENAME=1
43866
43867 printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
43868
43869       ;;
43870   esac
43871
43872             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
43873 printf %s "checking whether rename honors trailing slash on source... " >&6; }
43874 if test ${gl_cv_func_rename_slash_src_works+y}
43875 then :
43876   printf %s "(cached) " >&6
43877 else $as_nop
43878   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
43879     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
43880       as_fn_error $? "cannot create temporary files" "$LINENO" 5
43881     # Assume that if we have lstat, we can also check symlinks.
43882     if test $ac_cv_func_lstat = yes; then
43883       ln -s conftest.f conftest.lnk
43884     fi
43885     if test "$cross_compiling" = yes
43886 then :
43887         case "$host_os" in
43888                           # Guess yes on Linux systems.
43889          linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
43890                           # Guess yes on glibc systems.
43891          *-gnu*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
43892                           # Guess yes on native Windows.
43893          mingw*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
43894                           # If we don't know, obey --enable-cross-guesses.
43895          *)               gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
43896        esac
43897
43898 else $as_nop
43899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900 /* end confdefs.h.  */
43901
43902 #        include <stdio.h>
43903 #        include <stdlib.h>
43904
43905 int
43906 main (void)
43907 {
43908 int result = 0;
43909            if (rename ("conftest.f1/", "conftest.d3") == 0)
43910              result |= 1;
43911            if (rename ("conftest.d1/", "conftest.d2") != 0)
43912              result |= 2;
43913 #if HAVE_LSTAT
43914            if (rename ("conftest.lnk/", "conftest.f") == 0)
43915              result |= 4;
43916 #endif
43917            return result;
43918
43919   ;
43920   return 0;
43921 }
43922 _ACEOF
43923 if ac_fn_c_try_run "$LINENO"
43924 then :
43925   gl_cv_func_rename_slash_src_works=yes
43926 else $as_nop
43927   gl_cv_func_rename_slash_src_works=no
43928 fi
43929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43930   conftest.$ac_objext conftest.beam conftest.$ac_ext
43931 fi
43932
43933     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
43934
43935 fi
43936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
43937 printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
43938   case "$gl_cv_func_rename_slash_src_works" in
43939     *yes) ;;
43940     *)
43941       REPLACE_RENAME=1
43942
43943 printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
43944
43945       ;;
43946   esac
43947
43948
43949   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
43950 printf %s "checking whether rename manages hard links correctly... " >&6; }
43951 if test ${gl_cv_func_rename_link_works+y}
43952 then :
43953   printf %s "(cached) " >&6
43954 else $as_nop
43955   if test $ac_cv_func_link = yes; then
43956        if test $cross_compiling != yes; then
43957          rm -rf conftest.f conftest.f1 conftest.f2
43958          if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
43959              set x `ls -i conftest.f conftest.f1` && test "" = ""; then
43960            if test "$cross_compiling" = yes
43961 then :
43962                 :
43963
43964 else $as_nop
43965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43966 /* end confdefs.h.  */
43967
43968 #               include <errno.h>
43969 #               include <stdio.h>
43970 #               include <stdlib.h>
43971 #               include <unistd.h>
43972
43973
43974 $gl_mda_defines
43975
43976 int
43977 main (void)
43978 {
43979 int result = 0;
43980                   if (rename ("conftest.f", "conftest.f1"))
43981                     result |= 1;
43982                   if (unlink ("conftest.f1"))
43983                     result |= 2;
43984
43985                   /* Allow either the POSIX-required behavior, where the
43986                      previous rename kept conftest.f, or the (better) NetBSD
43987                      behavior, where it removed conftest.f.  */
43988                   if (rename ("conftest.f", "conftest.f") != 0
43989                       && errno != ENOENT)
43990                     result |= 4;
43991
43992                   if (rename ("conftest.f1", "conftest.f1") == 0)
43993                     result |= 8;
43994                   if (rename ("conftest.f2", "conftest.f2") != 0)
43995                     result |= 16;
43996                   return result;
43997
43998   ;
43999   return 0;
44000 }
44001 _ACEOF
44002 if ac_fn_c_try_run "$LINENO"
44003 then :
44004   gl_cv_func_rename_link_works=yes
44005 else $as_nop
44006   gl_cv_func_rename_link_works=no
44007 fi
44008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44009   conftest.$ac_objext conftest.beam conftest.$ac_ext
44010 fi
44011
44012          else
44013            gl_cv_func_rename_link_works="guessing no"
44014          fi
44015          rm -rf conftest.f conftest.f1 conftest.f2
44016        else
44017                   case "$host_os" in
44018                             # Guess yes on Linux systems.
44019            linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
44020                             # Guess yes on glibc systems.
44021            *-gnu*)          gl_cv_func_rename_link_works="guessing yes" ;;
44022                             # Guess yes on native Windows.
44023            mingw*)          gl_cv_func_rename_link_works="guessing yes" ;;
44024                             # If we don't know, obey --enable-cross-guesses.
44025            *)               gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
44026          esac
44027        fi
44028      else
44029        gl_cv_func_rename_link_works=yes
44030      fi
44031
44032 fi
44033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
44034 printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
44035   case "$gl_cv_func_rename_link_works" in
44036     *yes) ;;
44037     *)
44038       REPLACE_RENAME=1
44039
44040 printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
44041
44042       ;;
44043   esac
44044
44045           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
44046 printf %s "checking whether rename manages existing destinations correctly... " >&6; }
44047 if test ${gl_cv_func_rename_dest_works+y}
44048 then :
44049   printf %s "(cached) " >&6
44050 else $as_nop
44051   rm -rf conftest.f conftest.d1 conftest.d2
44052     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
44053       as_fn_error $? "cannot create temporary files" "$LINENO" 5
44054     if test "$cross_compiling" = yes
44055 then :
44056         case "$host_os" in
44057                           # Guess yes on Linux systems.
44058          linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
44059                           # Guess yes on glibc systems.
44060          *-gnu*)          gl_cv_func_rename_dest_works="guessing yes" ;;
44061                           # Guess no on native Windows.
44062          mingw*)          gl_cv_func_rename_dest_works="guessing no" ;;
44063                           # If we don't know, obey --enable-cross-guesses.
44064          *)               gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
44065        esac
44066
44067 else $as_nop
44068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44069 /* end confdefs.h.  */
44070
44071 #        include <stdio.h>
44072 #        include <stdlib.h>
44073
44074 int
44075 main (void)
44076 {
44077 int result = 0;
44078            if (rename ("conftest.d1", "conftest.d2") != 0)
44079              result |= 1;
44080            if (rename ("conftest.d2", "conftest.f") == 0)
44081              result |= 2;
44082            return result;
44083
44084   ;
44085   return 0;
44086 }
44087 _ACEOF
44088 if ac_fn_c_try_run "$LINENO"
44089 then :
44090   gl_cv_func_rename_dest_works=yes
44091 else $as_nop
44092   gl_cv_func_rename_dest_works=no
44093 fi
44094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44095   conftest.$ac_objext conftest.beam conftest.$ac_ext
44096 fi
44097
44098     rm -rf conftest.f conftest.d1 conftest.d2
44099
44100 fi
44101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
44102 printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
44103   case "$gl_cv_func_rename_dest_works" in
44104     *yes) ;;
44105     *)
44106       REPLACE_RENAME=1
44107
44108 printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
44109
44110       ;;
44111   esac
44112
44113   if test $REPLACE_RENAME = 1; then
44114
44115
44116
44117
44118
44119
44120
44121
44122   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
44123
44124   fi
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134           GL_M4_GNULIB_RENAME=1
44135
44136
44137
44138
44139
44140 printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
44141
44142
44143
44144
44145
44146
44147   ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
44148 if test "x$ac_cv_func_rewinddir" = xyes
44149 then :
44150   printf "%s\n" "#define HAVE_REWINDDIR 1" >>confdefs.h
44151
44152 fi
44153
44154   if test $ac_cv_func_rewinddir = no; then
44155     HAVE_REWINDDIR=0
44156   fi
44157
44158   if test $HAVE_REWINDDIR = 0; then
44159
44160
44161
44162
44163
44164
44165
44166
44167   M4_LIBOBJS="$M4_LIBOBJS rewinddir.$ac_objext"
44168
44169   fi
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179           GL_M4_GNULIB_REWINDDIR=1
44180
44181
44182
44183
44184
44185 printf "%s\n" "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
44186
44187
44188
44189
44190
44191
44192   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
44193 printf %s "checking whether rmdir works... " >&6; }
44194 if test ${gl_cv_func_rmdir_works+y}
44195 then :
44196   printf %s "(cached) " >&6
44197 else $as_nop
44198   mkdir conftest.dir
44199      touch conftest.file
44200      if test "$cross_compiling" = yes
44201 then :
44202   case "$host_os" in
44203                            # Guess yes on Linux systems.
44204           linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
44205                            # Guess yes on glibc systems.
44206           *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
44207                            # Guess no on native Windows.
44208           mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
44209                            # If we don't know, obey --enable-cross-guesses.
44210           *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
44211         esac
44212
44213 else $as_nop
44214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44215 /* end confdefs.h.  */
44216 #include <stdio.h>
44217            #include <errno.h>
44218            #if HAVE_UNISTD_H
44219            # include <unistd.h>
44220            #else /* on Windows with MSVC */
44221            # include <direct.h>
44222            #endif
44223
44224
44225 $gl_mda_defines
44226
44227 int
44228 main (void)
44229 {
44230 int result = 0;
44231            if (!rmdir ("conftest.file/"))
44232              result |= 1;
44233            else if (errno != ENOTDIR)
44234              result |= 2;
44235            if (!rmdir ("conftest.dir/./"))
44236              result |= 4;
44237            return result;
44238
44239   ;
44240   return 0;
44241 }
44242 _ACEOF
44243 if ac_fn_c_try_run "$LINENO"
44244 then :
44245   gl_cv_func_rmdir_works=yes
44246 else $as_nop
44247   gl_cv_func_rmdir_works=no
44248 fi
44249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44250   conftest.$ac_objext conftest.beam conftest.$ac_ext
44251 fi
44252
44253      rm -rf conftest.dir conftest.file
44254 fi
44255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
44256 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
44257   case "$gl_cv_func_rmdir_works" in
44258     *yes) ;;
44259     *)
44260       REPLACE_RMDIR=1
44261       ;;
44262   esac
44263
44264   if test $REPLACE_RMDIR = 1; then
44265
44266
44267
44268
44269
44270
44271
44272
44273   M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
44274
44275   fi
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285           GL_M4_GNULIB_RMDIR=1
44286
44287
44288
44289
44290
44291 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309   if test $ac_cv_func_secure_getenv = no; then
44310     HAVE_SECURE_GETENV=0
44311   fi
44312
44313   if test $HAVE_SECURE_GETENV = 0; then
44314
44315
44316
44317
44318
44319
44320
44321
44322   M4_LIBOBJS="$M4_LIBOBJS secure_getenv.$ac_objext"
44323
44324
44325   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
44326 if test "x$ac_cv_func___secure_getenv" = xyes
44327 then :
44328   printf "%s\n" "#define HAVE___SECURE_GETENV 1" >>confdefs.h
44329
44330 fi
44331
44332   if test $ac_cv_func___secure_getenv = no; then
44333     ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
44334 if test "x$ac_cv_func_issetugid" = xyes
44335 then :
44336   printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
44337
44338 fi
44339
44340   fi
44341
44342
44343   fi
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353           GL_M4_GNULIB_SECURE_GETENV=1
44354
44355
44356
44357
44358
44359 printf "%s\n" "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
44360
44361
44362
44363
44364
44365
44366
44367
44368     NEED_SETLOCALE_IMPROVED=0
44369   case "$host_os" in
44370             mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
44371             cygwin*)
44372       case `uname -r` in
44373         1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
44374       esac
44375       ;;
44376         *)
44377       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
44378 printf %s "checking whether setlocale supports the C locale... " >&6; }
44379 if test ${gl_cv_func_setlocale_works+y}
44380 then :
44381   printf %s "(cached) " >&6
44382 else $as_nop
44383   if test "$cross_compiling" = yes
44384 then :
44385   case "$host_os" in
44386                                # Guess no on Android.
44387               linux*-android*) gl_cv_func_setlocale_works="guessing no";;
44388                                # Guess yes otherwise.
44389               *)               gl_cv_func_setlocale_works="guessing yes";;
44390             esac
44391
44392 else $as_nop
44393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44394 /* end confdefs.h.  */
44395
44396 #include <locale.h>
44397 int main ()
44398 {
44399   return setlocale (LC_ALL, "C") == NULL;
44400 }
44401 _ACEOF
44402 if ac_fn_c_try_run "$LINENO"
44403 then :
44404   gl_cv_func_setlocale_works=yes
44405 else $as_nop
44406   gl_cv_func_setlocale_works=no
44407 fi
44408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44409   conftest.$ac_objext conftest.beam conftest.$ac_ext
44410 fi
44411
44412
44413 fi
44414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
44415 printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
44416       case "$gl_cv_func_setlocale_works" in
44417         *yes) ;;
44418         *) NEED_SETLOCALE_IMPROVED=1 ;;
44419       esac
44420       ;;
44421   esac
44422
44423 printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
44424
44425
44426     NEED_SETLOCALE_MTSAFE=0
44427   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44428     NEED_SETLOCALE_MTSAFE=1
44429   fi
44430
44431 printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
44432
44433
44434   if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
44435     REPLACE_SETLOCALE=1
44436   fi
44437
44438   if test $NEED_SETLOCALE_MTSAFE = 1; then
44439     LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
44440   else
44441     LIB_SETLOCALE=
44442   fi
44443
44444
44445   if test $REPLACE_SETLOCALE = 1; then
44446
44447
44448
44449
44450
44451
44452
44453
44454   M4_LIBOBJS="$M4_LIBOBJS setlocale.$ac_objext"
44455
44456
44457         :
44458
44459   fi
44460
44461
44462
44463
44464
44465
44466
44467
44468
44469           GL_M4_GNULIB_SETLOCALE=1
44470
44471
44472
44473
44474
44475 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
44476
44477
44478
44479
44480
44481
44482
44483
44484   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
44485 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
44486 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
44487 then :
44488   printf %s "(cached) " >&6
44489 else $as_nop
44490   case "$host_os" in
44491        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
44492        *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
44493          gl_cv_func_setlocale_null_all_mtsafe=no ;;
44494        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
44495        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
44496          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
44497        # If we don't know, obey --enable-cross-guesses.
44498        *)
44499          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
44500      esac
44501
44502 fi
44503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
44504 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
44505     case "$host_os" in
44506     mingw*) ;;
44507     *)
44508       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
44509         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
44510       fi
44511       ;;
44512   esac
44513   case "$gl_cv_func_setlocale_null_all_mtsafe" in
44514     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
44515     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
44516   esac
44517
44518 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
44519
44520
44521     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
44522 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
44523 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
44524 then :
44525   printf %s "(cached) " >&6
44526 else $as_nop
44527   case "$host_os" in
44528        # Guess no on OpenBSD, AIX.
44529        openbsd* | aix*)
44530          gl_cv_func_setlocale_null_one_mtsafe=no ;;
44531        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
44532        *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
44533          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
44534        # If we don't know, obey --enable-cross-guesses.
44535        *)
44536          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
44537      esac
44538
44539 fi
44540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
44541 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
44542     case "$host_os" in
44543     mingw*) ;;
44544     *)
44545       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
44546         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
44547       fi
44548       ;;
44549   esac
44550   case "$gl_cv_func_setlocale_null_one_mtsafe" in
44551     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
44552     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
44553   esac
44554
44555 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
44556
44557
44558     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44559     case "$host_os" in
44560       mingw*) LIB_SETLOCALE_NULL= ;;
44561       *)
44562
44563
44564   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
44565 printf %s "checking whether imported symbols can be declared weak... " >&6; }
44566 if test ${gl_cv_have_weak+y}
44567 then :
44568   printf %s "(cached) " >&6
44569 else $as_nop
44570   gl_cv_have_weak=no
44571           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44572 /* end confdefs.h.  */
44573 extern void xyzzy ();
44574 #pragma weak xyzzy
44575 int
44576 main (void)
44577 {
44578 xyzzy();
44579   ;
44580   return 0;
44581 }
44582 _ACEOF
44583 if ac_fn_c_try_link "$LINENO"
44584 then :
44585   gl_cv_have_weak=maybe
44586 fi
44587 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44588     conftest$ac_exeext conftest.$ac_ext
44589      if test $gl_cv_have_weak = maybe; then
44590                      if test "$cross_compiling" = yes
44591 then :
44592                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44593 /* end confdefs.h.  */
44594 #ifdef __ELF__
44595              Extensible Linking Format
44596              #endif
44597
44598 _ACEOF
44599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44600   $EGREP "Extensible Linking Format" >/dev/null 2>&1
44601 then :
44602   gl_cv_have_weak="guessing yes"
44603 else $as_nop
44604   gl_cv_have_weak="guessing no"
44605 fi
44606 rm -rf conftest*
44607
44608
44609 else $as_nop
44610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44611 /* end confdefs.h.  */
44612
44613 #include <stdio.h>
44614 #pragma weak fputs
44615 int main ()
44616 {
44617   return (fputs == NULL);
44618 }
44619 _ACEOF
44620 if ac_fn_c_try_run "$LINENO"
44621 then :
44622   gl_cv_have_weak=yes
44623 else $as_nop
44624   gl_cv_have_weak=no
44625 fi
44626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44627   conftest.$ac_objext conftest.beam conftest.$ac_ext
44628 fi
44629
44630      fi
44631           case " $LDFLAGS " in
44632        *" -static "*) gl_cv_have_weak=no ;;
44633      esac
44634                     case "$gl_cv_have_weak" in
44635        *yes)
44636          case "$host_os" in
44637            freebsd* | dragonfly* | midnightbsd*)
44638              : > conftest1.c
44639              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
44640              cat <<EOF > conftest2.c
44641 #include <pthread.h>
44642 #pragma weak pthread_mutexattr_gettype
44643 int main ()
44644 {
44645   return (pthread_mutexattr_gettype != NULL);
44646 }
44647 EOF
44648              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
44649                || gl_cv_have_weak=no
44650              rm -f conftest1.c libempty.so conftest2.c conftest
44651              ;;
44652          esac
44653          ;;
44654      esac
44655
44656 fi
44657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
44658 printf "%s\n" "$gl_cv_have_weak" >&6; }
44659   case "$gl_cv_have_weak" in
44660     *yes)
44661
44662 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
44663
44664       ;;
44665   esac
44666
44667         case "$gl_cv_have_weak" in
44668           *yes) LIB_SETLOCALE_NULL= ;;
44669           *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
44670         esac
44671         ;;
44672     esac
44673   else
44674     LIB_SETLOCALE_NULL=
44675   fi
44676
44677
44678   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44679
44680
44681
44682
44683
44684
44685
44686
44687   M4_LIBOBJS="$M4_LIBOBJS setlocale-lock.$ac_objext"
44688
44689
44690
44691
44692   CFLAG_VISIBILITY=
44693   HAVE_VISIBILITY=0
44694   if test -n "$GCC"; then
44695                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
44696 printf %s "checking whether the -Werror option is usable... " >&6; }
44697 if test ${gl_cv_cc_vis_werror+y}
44698 then :
44699   printf %s "(cached) " >&6
44700 else $as_nop
44701   gl_save_CFLAGS="$CFLAGS"
44702        CFLAGS="$CFLAGS -Werror"
44703        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44704 /* end confdefs.h.  */
44705
44706 int
44707 main (void)
44708 {
44709
44710   ;
44711   return 0;
44712 }
44713 _ACEOF
44714 if ac_fn_c_try_compile "$LINENO"
44715 then :
44716   gl_cv_cc_vis_werror=yes
44717 else $as_nop
44718   gl_cv_cc_vis_werror=no
44719 fi
44720 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44721        CFLAGS="$gl_save_CFLAGS"
44722
44723 fi
44724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
44725 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
44726         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
44727 printf %s "checking for simple visibility declarations... " >&6; }
44728 if test ${gl_cv_cc_visibility+y}
44729 then :
44730   printf %s "(cached) " >&6
44731 else $as_nop
44732   gl_save_CFLAGS="$CFLAGS"
44733        CFLAGS="$CFLAGS -fvisibility=hidden"
44734                                           if test $gl_cv_cc_vis_werror = yes; then
44735          CFLAGS="$CFLAGS -Werror"
44736        fi
44737        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44738 /* end confdefs.h.  */
44739 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
44740               extern __attribute__((__visibility__("default"))) int exportedvar;
44741               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
44742               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
44743               void dummyfunc (void);
44744               void dummyfunc (void) {}
44745
44746 int
44747 main (void)
44748 {
44749
44750   ;
44751   return 0;
44752 }
44753 _ACEOF
44754 if ac_fn_c_try_compile "$LINENO"
44755 then :
44756   gl_cv_cc_visibility=yes
44757 else $as_nop
44758   gl_cv_cc_visibility=no
44759 fi
44760 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44761        CFLAGS="$gl_save_CFLAGS"
44762
44763 fi
44764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
44765 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
44766     if test $gl_cv_cc_visibility = yes; then
44767       CFLAG_VISIBILITY="-fvisibility=hidden"
44768       HAVE_VISIBILITY=1
44769     fi
44770   fi
44771
44772
44773
44774 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
44775
44776
44777
44778   fi
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788           GL_M4_GNULIB_SETLOCALE_NULL=1
44789
44790
44791
44792
44793
44794 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804   if test $ac_cv_func_sigaction = yes; then
44805     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
44806 "
44807 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
44808 then :
44809
44810 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
44811
44812
44813 fi
44814
44815     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
44816       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
44817     fi
44818   else
44819     HAVE_SIGACTION=0
44820   fi
44821
44822   if test $HAVE_SIGACTION = 0; then
44823
44824
44825
44826
44827
44828
44829
44830
44831   M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
44832
44833
44834
44835
44836
44837
44838
44839   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
44840 #include <signal.h>
44841
44842 "
44843 if test "x$ac_cv_type_siginfo_t" = xyes
44844 then :
44845
44846 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
44847
44848
44849 fi
44850
44851   if test $ac_cv_type_siginfo_t = no; then
44852     HAVE_SIGINFO_T=0
44853   fi
44854
44855   fi
44856
44857
44858
44859
44860
44861
44862
44863
44864
44865           GL_M4_GNULIB_SIGACTION=1
44866
44867
44868
44869
44870
44871 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
44885 printf %s "checking for signbit macro... " >&6; }
44886 if test ${gl_cv_func_signbit+y}
44887 then :
44888   printf %s "(cached) " >&6
44889 else $as_nop
44890
44891       if test "$cross_compiling" = yes
44892 then :
44893   case "$host_os" in
44894                           # Guess yes on glibc systems.
44895            *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
44896                           # Guess yes on musl systems.
44897            *-musl*)       gl_cv_func_signbit="guessing yes" ;;
44898                           # Guess yes on native Windows.
44899            mingw*)        gl_cv_func_signbit="guessing yes" ;;
44900                           # If we don't know, obey --enable-cross-guesses.
44901            *)             gl_cv_func_signbit="$gl_cross_guess_normal" ;;
44902          esac
44903
44904 else $as_nop
44905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44906 /* end confdefs.h.  */
44907
44908 #include <math.h>
44909 /* If signbit is defined as a function, don't use it, since calling it for
44910    'float' or 'long double' arguments would involve conversions.
44911    If signbit is not declared at all but exists as a library function, don't
44912    use it, since the prototype may not match.
44913    If signbit is not declared at all but exists as a compiler built-in, don't
44914    use it, since it's preferable to use __builtin_signbit* (no warnings,
44915    no conversions).  */
44916 #ifndef signbit
44917 # error "signbit should be a macro"
44918 #endif
44919 #include <string.h>
44920
44921 /* Global variables.
44922    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
44923    but cannot constant-fold            __builtin_signbitl (variable).  */
44924 float vf;
44925 double vd;
44926 long double vl;
44927 int main ()
44928 {
44929 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
44930    So we use -p0f and -p0d instead.  */
44931 float p0f = 0.0f;
44932 float m0f = -p0f;
44933 double p0d = 0.0;
44934 double m0d = -p0d;
44935 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
44936    So we use another constant expression instead.
44937    But that expression does not work on other platforms, such as when
44938    cross-compiling to PowerPC on Mac OS X 10.5.  */
44939 long double p0l = 0.0L;
44940 #if defined __hpux || defined __sgi
44941 long double m0l = -LDBL_MIN * LDBL_MIN;
44942 #else
44943 long double m0l = -p0l;
44944 #endif
44945   int result = 0;
44946   if (signbit (vf)) /* link check */
44947     vf++;
44948   {
44949     float plus_inf = 1.0f / p0f;
44950     float minus_inf = -1.0f / p0f;
44951     if (!(!signbit (255.0f)
44952           && signbit (-255.0f)
44953           && !signbit (p0f)
44954           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
44955           && !signbit (plus_inf)
44956           && signbit (minus_inf)))
44957       result |= 1;
44958   }
44959   if (signbit (vd)) /* link check */
44960     vd++;
44961   {
44962     double plus_inf = 1.0 / p0d;
44963     double minus_inf = -1.0 / p0d;
44964     if (!(!signbit (255.0)
44965           && signbit (-255.0)
44966           && !signbit (p0d)
44967           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
44968           && !signbit (plus_inf)
44969           && signbit (minus_inf)))
44970       result |= 2;
44971   }
44972   if (signbit (vl)) /* link check */
44973     vl++;
44974   {
44975     long double plus_inf = 1.0L / p0l;
44976     long double minus_inf = -1.0L / p0l;
44977     if (signbit (255.0L))
44978       result |= 4;
44979     if (!signbit (-255.0L))
44980       result |= 4;
44981     if (signbit (p0l))
44982       result |= 8;
44983     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
44984       result |= 16;
44985     if (signbit (plus_inf))
44986       result |= 32;
44987     if (!signbit (minus_inf))
44988       result |= 64;
44989   }
44990   return result;
44991 }
44992
44993
44994 _ACEOF
44995 if ac_fn_c_try_run "$LINENO"
44996 then :
44997   gl_cv_func_signbit=yes
44998 else $as_nop
44999   gl_cv_func_signbit=no
45000 fi
45001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45002   conftest.$ac_objext conftest.beam conftest.$ac_ext
45003 fi
45004
45005
45006 fi
45007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
45008 printf "%s\n" "$gl_cv_func_signbit" >&6; }
45009           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
45010 printf %s "checking for signbit compiler built-ins... " >&6; }
45011 if test ${gl_cv_func_signbit_builtins+y}
45012 then :
45013   printf %s "(cached) " >&6
45014 else $as_nop
45015
45016       if test "$cross_compiling" = yes
45017 then :
45018   case "$host_os" in
45019                           # Guess yes on glibc systems.
45020            *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;;
45021                           # Guess yes on musl systems.
45022            *-musl*)       gl_cv_func_signbit_builtins="guessing yes" ;;
45023                           # Guess yes on mingw, no on MSVC.
45024            mingw*)        if test -n "$GCC"; then
45025                             gl_cv_func_signbit_builtins="guessing yes"
45026                           else
45027                             gl_cv_func_signbit_builtins="guessing no"
45028                           fi
45029                           ;;
45030                           # If we don't know, obey --enable-cross-guesses.
45031            *)             gl_cv_func_signbit_builtins="$gl_cross_guess_normal" ;;
45032          esac
45033
45034 else $as_nop
45035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45036 /* end confdefs.h.  */
45037
45038 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
45039 # define signbit(x) \
45040    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
45041     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
45042     __builtin_signbitf (x))
45043 #else
45044 # error "signbit should be three compiler built-ins"
45045 #endif
45046 #include <string.h>
45047
45048 /* Global variables.
45049    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
45050    but cannot constant-fold            __builtin_signbitl (variable).  */
45051 float vf;
45052 double vd;
45053 long double vl;
45054 int main ()
45055 {
45056 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
45057    So we use -p0f and -p0d instead.  */
45058 float p0f = 0.0f;
45059 float m0f = -p0f;
45060 double p0d = 0.0;
45061 double m0d = -p0d;
45062 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
45063    So we use another constant expression instead.
45064    But that expression does not work on other platforms, such as when
45065    cross-compiling to PowerPC on Mac OS X 10.5.  */
45066 long double p0l = 0.0L;
45067 #if defined __hpux || defined __sgi
45068 long double m0l = -LDBL_MIN * LDBL_MIN;
45069 #else
45070 long double m0l = -p0l;
45071 #endif
45072   int result = 0;
45073   if (signbit (vf)) /* link check */
45074     vf++;
45075   {
45076     float plus_inf = 1.0f / p0f;
45077     float minus_inf = -1.0f / p0f;
45078     if (!(!signbit (255.0f)
45079           && signbit (-255.0f)
45080           && !signbit (p0f)
45081           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
45082           && !signbit (plus_inf)
45083           && signbit (minus_inf)))
45084       result |= 1;
45085   }
45086   if (signbit (vd)) /* link check */
45087     vd++;
45088   {
45089     double plus_inf = 1.0 / p0d;
45090     double minus_inf = -1.0 / p0d;
45091     if (!(!signbit (255.0)
45092           && signbit (-255.0)
45093           && !signbit (p0d)
45094           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
45095           && !signbit (plus_inf)
45096           && signbit (minus_inf)))
45097       result |= 2;
45098   }
45099   if (signbit (vl)) /* link check */
45100     vl++;
45101   {
45102     long double plus_inf = 1.0L / p0l;
45103     long double minus_inf = -1.0L / p0l;
45104     if (signbit (255.0L))
45105       result |= 4;
45106     if (!signbit (-255.0L))
45107       result |= 4;
45108     if (signbit (p0l))
45109       result |= 8;
45110     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
45111       result |= 16;
45112     if (signbit (plus_inf))
45113       result |= 32;
45114     if (!signbit (minus_inf))
45115       result |= 64;
45116   }
45117   return result;
45118 }
45119
45120
45121 _ACEOF
45122 if ac_fn_c_try_run "$LINENO"
45123 then :
45124   gl_cv_func_signbit_builtins=yes
45125 else $as_nop
45126   gl_cv_func_signbit_builtins=no
45127 fi
45128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45129   conftest.$ac_objext conftest.beam conftest.$ac_ext
45130 fi
45131
45132
45133 fi
45134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_builtins" >&5
45135 printf "%s\n" "$gl_cv_func_signbit_builtins" >&6; }
45136       case "$gl_cv_func_signbit_builtins" in
45137     *yes)
45138       REPLACE_SIGNBIT_USING_BUILTINS=1
45139       ;;
45140     *)
45141       case "$gl_cv_func_signbit" in
45142         *yes) ;;
45143         *)
45144                     REPLACE_SIGNBIT=1
45145           ;;
45146       esac
45147       ;;
45148   esac
45149           case "$host_os" in
45150     solaris*)
45151       REPLACE_SIGNBIT=1
45152       ;;
45153   esac
45154   if test $REPLACE_SIGNBIT = 1; then
45155
45156
45157   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
45158 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
45159 if test ${gl_cv_cc_float_signbit+y}
45160 then :
45161   printf %s "(cached) " >&6
45162 else $as_nop
45163
45164       if test "$cross_compiling" = yes
45165 then :
45166
45167                               gl_cv_cc_float_signbit="unknown"
45168
45169 else $as_nop
45170   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45171 /* end confdefs.h.  */
45172
45173 #include <stddef.h>
45174 #include <stdio.h>
45175 #define NWORDS \
45176   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45177 typedef union { float value; unsigned int word[NWORDS]; }
45178         memory_float;
45179 static memory_float plus = { 1.0f };
45180 static memory_float minus = { -1.0f };
45181 int main ()
45182 {
45183   size_t j, k, i;
45184   unsigned int m;
45185   FILE *fp = fopen ("conftest.out", "w");
45186   if (fp == NULL)
45187     return 1;
45188   /* Find the different bit.  */
45189   k = 0; m = 0;
45190   for (j = 0; j < NWORDS; j++)
45191     {
45192       unsigned int x = plus.word[j] ^ minus.word[j];
45193       if ((x & (x - 1)) || (x && m))
45194         {
45195           /* More than one bit difference.  */
45196           fprintf (fp, "unknown");
45197           fclose (fp);
45198           return 2;
45199         }
45200       if (x)
45201         {
45202           k = j;
45203           m = x;
45204         }
45205     }
45206   if (m == 0)
45207     {
45208       /* No difference.  */
45209       fprintf (fp, "unknown");
45210       fclose (fp);
45211       return 3;
45212     }
45213   /* Now m = plus.word[k] ^ ~minus.word[k].  */
45214   if (plus.word[k] & ~minus.word[k])
45215     {
45216       /* Oh? The sign bit is set in the positive and cleared in the negative
45217          numbers?  */
45218       fprintf (fp, "unknown");
45219       fclose (fp);
45220       return 4;
45221     }
45222   for (i = 0; ; i++)
45223     if ((m >> i) & 1)
45224       break;
45225   fprintf (fp, "word %d bit %d", (int) k, (int) i);
45226   if (fclose (fp) != 0)
45227     return 5;
45228   return 0;
45229 }
45230
45231 _ACEOF
45232 if ac_fn_c_try_run "$LINENO"
45233 then :
45234   gl_cv_cc_float_signbit=`cat conftest.out`
45235 else $as_nop
45236   gl_cv_cc_float_signbit="unknown"
45237 fi
45238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45239   conftest.$ac_objext conftest.beam conftest.$ac_ext
45240 fi
45241
45242       rm -f conftest.out
45243
45244 fi
45245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
45246 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
45247   case "$gl_cv_cc_float_signbit" in
45248     word*bit*)
45249       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45250       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
45251
45252 printf "%s\n" "#define FLT_SIGNBIT_WORD $word" >>confdefs.h
45253
45254
45255 printf "%s\n" "#define FLT_SIGNBIT_BIT $bit" >>confdefs.h
45256
45257       ;;
45258   esac
45259
45260
45261
45262
45263   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
45264 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
45265 if test ${gl_cv_cc_double_signbit+y}
45266 then :
45267   printf %s "(cached) " >&6
45268 else $as_nop
45269
45270       if test "$cross_compiling" = yes
45271 then :
45272
45273                               gl_cv_cc_double_signbit="unknown"
45274
45275 else $as_nop
45276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45277 /* end confdefs.h.  */
45278
45279 #include <stddef.h>
45280 #include <stdio.h>
45281 #define NWORDS \
45282   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45283 typedef union { double value; unsigned int word[NWORDS]; }
45284         memory_float;
45285 static memory_float plus = { 1.0 };
45286 static memory_float minus = { -1.0 };
45287 int main ()
45288 {
45289   size_t j, k, i;
45290   unsigned int m;
45291   FILE *fp = fopen ("conftest.out", "w");
45292   if (fp == NULL)
45293     return 1;
45294   /* Find the different bit.  */
45295   k = 0; m = 0;
45296   for (j = 0; j < NWORDS; j++)
45297     {
45298       unsigned int x = plus.word[j] ^ minus.word[j];
45299       if ((x & (x - 1)) || (x && m))
45300         {
45301           /* More than one bit difference.  */
45302           fprintf (fp, "unknown");
45303           fclose (fp);
45304           return 2;
45305         }
45306       if (x)
45307         {
45308           k = j;
45309           m = x;
45310         }
45311     }
45312   if (m == 0)
45313     {
45314       /* No difference.  */
45315       fprintf (fp, "unknown");
45316       fclose (fp);
45317       return 3;
45318     }
45319   /* Now m = plus.word[k] ^ ~minus.word[k].  */
45320   if (plus.word[k] & ~minus.word[k])
45321     {
45322       /* Oh? The sign bit is set in the positive and cleared in the negative
45323          numbers?  */
45324       fprintf (fp, "unknown");
45325       fclose (fp);
45326       return 4;
45327     }
45328   for (i = 0; ; i++)
45329     if ((m >> i) & 1)
45330       break;
45331   fprintf (fp, "word %d bit %d", (int) k, (int) i);
45332   if (fclose (fp) != 0)
45333     return 5;
45334   return 0;
45335 }
45336
45337 _ACEOF
45338 if ac_fn_c_try_run "$LINENO"
45339 then :
45340   gl_cv_cc_double_signbit=`cat conftest.out`
45341 else $as_nop
45342   gl_cv_cc_double_signbit="unknown"
45343 fi
45344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45345   conftest.$ac_objext conftest.beam conftest.$ac_ext
45346 fi
45347
45348       rm -f conftest.out
45349
45350 fi
45351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
45352 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
45353   case "$gl_cv_cc_double_signbit" in
45354     word*bit*)
45355       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45356       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
45357
45358 printf "%s\n" "#define DBL_SIGNBIT_WORD $word" >>confdefs.h
45359
45360
45361 printf "%s\n" "#define DBL_SIGNBIT_BIT $bit" >>confdefs.h
45362
45363       ;;
45364   esac
45365
45366
45367
45368
45369   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
45370 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
45371 if test ${gl_cv_cc_long_double_signbit+y}
45372 then :
45373   printf %s "(cached) " >&6
45374 else $as_nop
45375
45376       if test "$cross_compiling" = yes
45377 then :
45378
45379                               gl_cv_cc_long_double_signbit="unknown"
45380
45381 else $as_nop
45382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45383 /* end confdefs.h.  */
45384
45385 #include <stddef.h>
45386 #include <stdio.h>
45387 #define NWORDS \
45388   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45389 typedef union { long double value; unsigned int word[NWORDS]; }
45390         memory_float;
45391 static memory_float plus = { 1.0L };
45392 static memory_float minus = { -1.0L };
45393 int main ()
45394 {
45395   size_t j, k, i;
45396   unsigned int m;
45397   FILE *fp = fopen ("conftest.out", "w");
45398   if (fp == NULL)
45399     return 1;
45400   /* Find the different bit.  */
45401   k = 0; m = 0;
45402   for (j = 0; j < NWORDS; j++)
45403     {
45404       unsigned int x = plus.word[j] ^ minus.word[j];
45405       if ((x & (x - 1)) || (x && m))
45406         {
45407           /* More than one bit difference.  */
45408           fprintf (fp, "unknown");
45409           fclose (fp);
45410           return 2;
45411         }
45412       if (x)
45413         {
45414           k = j;
45415           m = x;
45416         }
45417     }
45418   if (m == 0)
45419     {
45420       /* No difference.  */
45421       fprintf (fp, "unknown");
45422       fclose (fp);
45423       return 3;
45424     }
45425   /* Now m = plus.word[k] ^ ~minus.word[k].  */
45426   if (plus.word[k] & ~minus.word[k])
45427     {
45428       /* Oh? The sign bit is set in the positive and cleared in the negative
45429          numbers?  */
45430       fprintf (fp, "unknown");
45431       fclose (fp);
45432       return 4;
45433     }
45434   for (i = 0; ; i++)
45435     if ((m >> i) & 1)
45436       break;
45437   fprintf (fp, "word %d bit %d", (int) k, (int) i);
45438   if (fclose (fp) != 0)
45439     return 5;
45440   return 0;
45441 }
45442
45443 _ACEOF
45444 if ac_fn_c_try_run "$LINENO"
45445 then :
45446   gl_cv_cc_long_double_signbit=`cat conftest.out`
45447 else $as_nop
45448   gl_cv_cc_long_double_signbit="unknown"
45449 fi
45450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45451   conftest.$ac_objext conftest.beam conftest.$ac_ext
45452 fi
45453
45454       rm -f conftest.out
45455
45456 fi
45457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
45458 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
45459   case "$gl_cv_cc_long_double_signbit" in
45460     word*bit*)
45461       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45462       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
45463
45464 printf "%s\n" "#define LDBL_SIGNBIT_WORD $word" >>confdefs.h
45465
45466
45467 printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h
45468
45469       ;;
45470   esac
45471
45472
45473     if test "$gl_cv_cc_float_signbit" = unknown; then
45474             ac_fn_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
45475 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45476 if test "x$ac_cv_have_decl_copysignf" = xyes
45477 then :
45478   ac_have_decl=1
45479 else $as_nop
45480   ac_have_decl=0
45481 fi
45482 printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h
45483
45484       if test "$ac_cv_have_decl_copysignf" = yes; then
45485                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
45486 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
45487 if test ${gl_cv_func_copysignf_no_libm+y}
45488 then :
45489   printf %s "(cached) " >&6
45490 else $as_nop
45491
45492             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45493 /* end confdefs.h.  */
45494 #include <math.h>
45495                    float x, y;
45496 int
45497 main (void)
45498 {
45499 return copysignf (x, y) < 0;
45500   ;
45501   return 0;
45502 }
45503 _ACEOF
45504 if ac_fn_c_try_link "$LINENO"
45505 then :
45506   gl_cv_func_copysignf_no_libm=yes
45507 else $as_nop
45508   gl_cv_func_copysignf_no_libm=no
45509 fi
45510 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45511     conftest$ac_exeext conftest.$ac_ext
45512
45513 fi
45514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
45515 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
45516         if test $gl_cv_func_copysignf_no_libm = yes; then
45517
45518 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
45519
45520         fi
45521       fi
45522     fi
45523     if test "$gl_cv_cc_double_signbit" = unknown; then
45524             ac_fn_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
45525 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45526 if test "x$ac_cv_have_decl_copysign" = xyes
45527 then :
45528   ac_have_decl=1
45529 else $as_nop
45530   ac_have_decl=0
45531 fi
45532 printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h
45533
45534       if test "$ac_cv_have_decl_copysign" = yes; then
45535                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
45536 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
45537 if test ${gl_cv_func_copysign_no_libm+y}
45538 then :
45539   printf %s "(cached) " >&6
45540 else $as_nop
45541
45542             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45543 /* end confdefs.h.  */
45544 #include <math.h>
45545                    double x, y;
45546 int
45547 main (void)
45548 {
45549 return copysign (x, y) < 0;
45550   ;
45551   return 0;
45552 }
45553 _ACEOF
45554 if ac_fn_c_try_link "$LINENO"
45555 then :
45556   gl_cv_func_copysign_no_libm=yes
45557 else $as_nop
45558   gl_cv_func_copysign_no_libm=no
45559 fi
45560 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45561     conftest$ac_exeext conftest.$ac_ext
45562
45563 fi
45564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
45565 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
45566         if test $gl_cv_func_copysign_no_libm = yes; then
45567
45568 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
45569
45570         fi
45571       fi
45572     fi
45573     if test "$gl_cv_cc_long_double_signbit" = unknown; then
45574             ac_fn_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
45575 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45576 if test "x$ac_cv_have_decl_copysignl" = xyes
45577 then :
45578   ac_have_decl=1
45579 else $as_nop
45580   ac_have_decl=0
45581 fi
45582 printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h
45583
45584       if test "$ac_cv_have_decl_copysignl" = yes; then
45585                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
45586 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
45587 if test ${gl_cv_func_copysignl_no_libm+y}
45588 then :
45589   printf %s "(cached) " >&6
45590 else $as_nop
45591
45592             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45593 /* end confdefs.h.  */
45594 #include <math.h>
45595                    long double x, y;
45596 int
45597 main (void)
45598 {
45599 return copysignl (x, y) < 0;
45600   ;
45601   return 0;
45602 }
45603 _ACEOF
45604 if ac_fn_c_try_link "$LINENO"
45605 then :
45606   gl_cv_func_copysignl_no_libm=yes
45607 else $as_nop
45608   gl_cv_func_copysignl_no_libm=no
45609 fi
45610 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45611     conftest$ac_exeext conftest.$ac_ext
45612
45613 fi
45614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
45615 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
45616         if test $gl_cv_func_copysignl_no_libm = yes; then
45617
45618 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
45619
45620         fi
45621       fi
45622     fi
45623   fi
45624
45625   if test $REPLACE_SIGNBIT = 1; then
45626
45627
45628
45629
45630
45631
45632
45633
45634   M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644   M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654   M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
45655
45656   fi
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666           GL_M4_GNULIB_SIGNBIT=1
45667
45668
45669
45670
45671
45672 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
45673
45674
45675
45676
45677
45678
45679
45680
45681 printf "%s\n" "#define GNULIB_SIGPIPE 1" >>confdefs.h
45682
45683
45684
45685
45686
45687
45688
45689
45690   GL_M4_GNULIB_SIGNAL_H_SIGPIPE=1
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700   GL_M4_GNULIB_STDIO_H_SIGPIPE=1
45701
45702
45703
45704
45705
45706
45707
45708
45709   GL_M4_GNULIB_UNISTD_H_SIGPIPE=1
45710
45711
45712
45713
45714
45715   HAVE_POSIX_SIGNALBLOCKING=0
45716   if test "$gl_cv_type_sigset_t" = yes; then
45717     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
45718 if test "x$ac_cv_func_sigprocmask" = xyes
45719 then :
45720   HAVE_POSIX_SIGNALBLOCKING=1
45721 fi
45722
45723   fi
45724
45725   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
45726
45727
45728
45729
45730
45731
45732
45733
45734   M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
45735
45736     :
45737   fi
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747           GL_M4_GNULIB_SIGPROCMASK=1
45748
45749
45750
45751
45752
45753 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
45754
45755
45756
45757
45758 # Check whether --with-libsigsegv was given.
45759 if test ${with_libsigsegv+y}
45760 then :
45761   withval=$with_libsigsegv;
45762 fi
45763
45764   SIGSEGV_H=sigsegv.h
45765   if test "$with_libsigsegv" = yes; then
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779     use_additional=yes
45780
45781   acl_save_prefix="$prefix"
45782   prefix="$acl_final_prefix"
45783   acl_save_exec_prefix="$exec_prefix"
45784   exec_prefix="$acl_final_exec_prefix"
45785
45786     eval additional_includedir=\"$includedir\"
45787     eval additional_libdir=\"$libdir\"
45788     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
45789     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
45790
45791   exec_prefix="$acl_save_exec_prefix"
45792   prefix="$acl_save_prefix"
45793
45794
45795 # Check whether --with-libsigsegv-prefix was given.
45796 if test ${with_libsigsegv_prefix+y}
45797 then :
45798   withval=$with_libsigsegv_prefix;
45799     if test "X$withval" = "Xno"; then
45800       use_additional=no
45801     else
45802       if test "X$withval" = "X"; then
45803
45804   acl_save_prefix="$prefix"
45805   prefix="$acl_final_prefix"
45806   acl_save_exec_prefix="$exec_prefix"
45807   exec_prefix="$acl_final_exec_prefix"
45808
45809           eval additional_includedir=\"$includedir\"
45810           eval additional_libdir=\"$libdir\"
45811           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
45812           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
45813
45814   exec_prefix="$acl_save_exec_prefix"
45815   prefix="$acl_save_prefix"
45816
45817       else
45818         additional_includedir="$withval/include"
45819         additional_libdir="$withval/$acl_libdirstem"
45820         additional_libdir2="$withval/$acl_libdirstem2"
45821         additional_libdir3="$withval/$acl_libdirstem3"
45822       fi
45823     fi
45824
45825 fi
45826
45827   if test "X$additional_libdir2" = "X$additional_libdir"; then
45828     additional_libdir2=
45829   fi
45830   if test "X$additional_libdir3" = "X$additional_libdir"; then
45831     additional_libdir3=
45832   fi
45833       LIBSIGSEGV=
45834   LTLIBSIGSEGV=
45835   INCSIGSEGV=
45836   LIBSIGSEGV_PREFIX=
45837       HAVE_LIBSIGSEGV=
45838   rpathdirs=
45839   ltrpathdirs=
45840   names_already_handled=
45841   names_next_round='sigsegv '
45842   while test -n "$names_next_round"; do
45843     names_this_round="$names_next_round"
45844     names_next_round=
45845     for name in $names_this_round; do
45846       already_handled=
45847       for n in $names_already_handled; do
45848         if test "$n" = "$name"; then
45849           already_handled=yes
45850           break
45851         fi
45852       done
45853       if test -z "$already_handled"; then
45854         names_already_handled="$names_already_handled $name"
45855                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
45856         eval value=\"\$HAVE_LIB$uppername\"
45857         if test -n "$value"; then
45858           if test "$value" = yes; then
45859             eval value=\"\$LIB$uppername\"
45860             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
45861             eval value=\"\$LTLIB$uppername\"
45862             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
45863           else
45864                                     :
45865           fi
45866         else
45867                               found_dir=
45868           found_la=
45869           found_so=
45870           found_a=
45871           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
45872           if test -n "$acl_shlibext"; then
45873             shrext=".$acl_shlibext"             # typically: shrext=.so
45874           else
45875             shrext=
45876           fi
45877           if test $use_additional = yes; then
45878             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
45879               if test "X$found_dir" = "X"; then
45880                 eval dir=\$$additional_libdir_variable
45881                 if test -n "$dir"; then
45882                                                       if test -n "$acl_shlibext"; then
45883                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
45884                       found_dir="$dir"
45885                       found_so="$dir/$libname$shrext"
45886                     else
45887                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
45888                         ver=`(cd "$dir" && \
45889                               for f in "$libname$shrext".*; do echo "$f"; done \
45890                               | sed -e "s,^$libname$shrext\\\\.,," \
45891                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
45892                               | sed 1q ) 2>/dev/null`
45893                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
45894                           found_dir="$dir"
45895                           found_so="$dir/$libname$shrext.$ver"
45896                         fi
45897                       else
45898                         eval library_names=\"$acl_library_names_spec\"
45899                         for f in $library_names; do
45900                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
45901                             found_dir="$dir"
45902                             found_so="$dir/$f"
45903                             break
45904                           fi
45905                         done
45906                       fi
45907                     fi
45908                   fi
45909                                     if test "X$found_dir" = "X"; then
45910                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
45911                       found_dir="$dir"
45912                       found_a="$dir/$libname.$acl_libext"
45913                     fi
45914                   fi
45915                   if test "X$found_dir" != "X"; then
45916                     if test -f "$dir/$libname.la"; then
45917                       found_la="$dir/$libname.la"
45918                     fi
45919                   fi
45920                 fi
45921               fi
45922             done
45923           fi
45924           if test "X$found_dir" = "X"; then
45925             for x in $LDFLAGS $LTLIBSIGSEGV; do
45926
45927   acl_save_prefix="$prefix"
45928   prefix="$acl_final_prefix"
45929   acl_save_exec_prefix="$exec_prefix"
45930   exec_prefix="$acl_final_exec_prefix"
45931   eval x=\"$x\"
45932   exec_prefix="$acl_save_exec_prefix"
45933   prefix="$acl_save_prefix"
45934
45935               case "$x" in
45936                 -L*)
45937                   dir=`echo "X$x" | sed -e 's/^X-L//'`
45938                                     if test -n "$acl_shlibext"; then
45939                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
45940                       found_dir="$dir"
45941                       found_so="$dir/$libname$shrext"
45942                     else
45943                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
45944                         ver=`(cd "$dir" && \
45945                               for f in "$libname$shrext".*; do echo "$f"; done \
45946                               | sed -e "s,^$libname$shrext\\\\.,," \
45947                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
45948                               | sed 1q ) 2>/dev/null`
45949                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
45950                           found_dir="$dir"
45951                           found_so="$dir/$libname$shrext.$ver"
45952                         fi
45953                       else
45954                         eval library_names=\"$acl_library_names_spec\"
45955                         for f in $library_names; do
45956                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
45957                             found_dir="$dir"
45958                             found_so="$dir/$f"
45959                             break
45960                           fi
45961                         done
45962                       fi
45963                     fi
45964                   fi
45965                                     if test "X$found_dir" = "X"; then
45966                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
45967                       found_dir="$dir"
45968                       found_a="$dir/$libname.$acl_libext"
45969                     fi
45970                   fi
45971                   if test "X$found_dir" != "X"; then
45972                     if test -f "$dir/$libname.la"; then
45973                       found_la="$dir/$libname.la"
45974                     fi
45975                   fi
45976                   ;;
45977               esac
45978               if test "X$found_dir" != "X"; then
45979                 break
45980               fi
45981             done
45982           fi
45983           if test "X$found_dir" != "X"; then
45984                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
45985             if test "X$found_so" != "X"; then
45986                                                         if test "$enable_rpath" = no \
45987                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
45988                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
45989                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
45990                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
45991               else
45992                                                                                 haveit=
45993                 for x in $ltrpathdirs; do
45994                   if test "X$x" = "X$found_dir"; then
45995                     haveit=yes
45996                     break
45997                   fi
45998                 done
45999                 if test -z "$haveit"; then
46000                   ltrpathdirs="$ltrpathdirs $found_dir"
46001                 fi
46002                                 if test "$acl_hardcode_direct" = yes; then
46003                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46004                 else
46005                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
46006                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46007                                                             haveit=
46008                     for x in $rpathdirs; do
46009                       if test "X$x" = "X$found_dir"; then
46010                         haveit=yes
46011                         break
46012                       fi
46013                     done
46014                     if test -z "$haveit"; then
46015                       rpathdirs="$rpathdirs $found_dir"
46016                     fi
46017                   else
46018                                                                                 haveit=
46019                     for x in $LDFLAGS $LIBSIGSEGV; do
46020
46021   acl_save_prefix="$prefix"
46022   prefix="$acl_final_prefix"
46023   acl_save_exec_prefix="$exec_prefix"
46024   exec_prefix="$acl_final_exec_prefix"
46025   eval x=\"$x\"
46026   exec_prefix="$acl_save_exec_prefix"
46027   prefix="$acl_save_prefix"
46028
46029                       if test "X$x" = "X-L$found_dir"; then
46030                         haveit=yes
46031                         break
46032                       fi
46033                     done
46034                     if test -z "$haveit"; then
46035                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
46036                     fi
46037                     if test "$acl_hardcode_minus_L" != no; then
46038                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46039                     else
46040                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
46041                     fi
46042                   fi
46043                 fi
46044               fi
46045             else
46046               if test "X$found_a" != "X"; then
46047                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
46048               else
46049                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
46050               fi
46051             fi
46052                         additional_includedir=
46053             case "$found_dir" in
46054               */$acl_libdirstem | */$acl_libdirstem/)
46055                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
46056                 if test "$name" = 'sigsegv'; then
46057                   LIBSIGSEGV_PREFIX="$basedir"
46058                 fi
46059                 additional_includedir="$basedir/include"
46060                 ;;
46061               */$acl_libdirstem2 | */$acl_libdirstem2/)
46062                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
46063                 if test "$name" = 'sigsegv'; then
46064                   LIBSIGSEGV_PREFIX="$basedir"
46065                 fi
46066                 additional_includedir="$basedir/include"
46067                 ;;
46068               */$acl_libdirstem3 | */$acl_libdirstem3/)
46069                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
46070                 if test "$name" = 'sigsegv'; then
46071                   LIBSIGSEGV_PREFIX="$basedir"
46072                 fi
46073                 additional_includedir="$basedir/include"
46074                 ;;
46075             esac
46076             if test "X$additional_includedir" != "X"; then
46077                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
46078                 haveit=
46079                 if test "X$additional_includedir" = "X/usr/local/include"; then
46080                   if test -n "$GCC"; then
46081                     case $host_os in
46082                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
46083                     esac
46084                   fi
46085                 fi
46086                 if test -z "$haveit"; then
46087                   for x in $CPPFLAGS $INCSIGSEGV; do
46088
46089   acl_save_prefix="$prefix"
46090   prefix="$acl_final_prefix"
46091   acl_save_exec_prefix="$exec_prefix"
46092   exec_prefix="$acl_final_exec_prefix"
46093   eval x=\"$x\"
46094   exec_prefix="$acl_save_exec_prefix"
46095   prefix="$acl_save_prefix"
46096
46097                     if test "X$x" = "X-I$additional_includedir"; then
46098                       haveit=yes
46099                       break
46100                     fi
46101                   done
46102                   if test -z "$haveit"; then
46103                     if test -d "$additional_includedir"; then
46104                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
46105                     fi
46106                   fi
46107                 fi
46108               fi
46109             fi
46110                         if test -n "$found_la"; then
46111                                                         save_libdir="$libdir"
46112               case "$found_la" in
46113                 */* | *\\*) . "$found_la" ;;
46114                 *) . "./$found_la" ;;
46115               esac
46116               libdir="$save_libdir"
46117                             for dep in $dependency_libs; do
46118                 case "$dep" in
46119                   -L*)
46120                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
46121                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
46122                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
46123                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
46124                       haveit=
46125                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
46126                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
46127                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
46128                         if test -n "$GCC"; then
46129                           case $host_os in
46130                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
46131                           esac
46132                         fi
46133                       fi
46134                       if test -z "$haveit"; then
46135                         haveit=
46136                         for x in $LDFLAGS $LIBSIGSEGV; do
46137
46138   acl_save_prefix="$prefix"
46139   prefix="$acl_final_prefix"
46140   acl_save_exec_prefix="$exec_prefix"
46141   exec_prefix="$acl_final_exec_prefix"
46142   eval x=\"$x\"
46143   exec_prefix="$acl_save_exec_prefix"
46144   prefix="$acl_save_prefix"
46145
46146                           if test "X$x" = "X-L$dependency_libdir"; then
46147                             haveit=yes
46148                             break
46149                           fi
46150                         done
46151                         if test -z "$haveit"; then
46152                           if test -d "$dependency_libdir"; then
46153                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
46154                           fi
46155                         fi
46156                         haveit=
46157                         for x in $LDFLAGS $LTLIBSIGSEGV; do
46158
46159   acl_save_prefix="$prefix"
46160   prefix="$acl_final_prefix"
46161   acl_save_exec_prefix="$exec_prefix"
46162   exec_prefix="$acl_final_exec_prefix"
46163   eval x=\"$x\"
46164   exec_prefix="$acl_save_exec_prefix"
46165   prefix="$acl_save_prefix"
46166
46167                           if test "X$x" = "X-L$dependency_libdir"; then
46168                             haveit=yes
46169                             break
46170                           fi
46171                         done
46172                         if test -z "$haveit"; then
46173                           if test -d "$dependency_libdir"; then
46174                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
46175                           fi
46176                         fi
46177                       fi
46178                     fi
46179                     ;;
46180                   -R*)
46181                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
46182                     if test "$enable_rpath" != no; then
46183                                                                   haveit=
46184                       for x in $rpathdirs; do
46185                         if test "X$x" = "X$dir"; then
46186                           haveit=yes
46187                           break
46188                         fi
46189                       done
46190                       if test -z "$haveit"; then
46191                         rpathdirs="$rpathdirs $dir"
46192                       fi
46193                                                                   haveit=
46194                       for x in $ltrpathdirs; do
46195                         if test "X$x" = "X$dir"; then
46196                           haveit=yes
46197                           break
46198                         fi
46199                       done
46200                       if test -z "$haveit"; then
46201                         ltrpathdirs="$ltrpathdirs $dir"
46202                       fi
46203                     fi
46204                     ;;
46205                   -l*)
46206                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
46207                     if test "X$dep" != Xc \
46208                        || case $host_os in
46209                             linux* | gnu* | k*bsd*-gnu) false ;;
46210                             *)                          true ;;
46211                           esac; then
46212                       names_next_round="$names_next_round $dep"
46213                     fi
46214                     ;;
46215                   *.la)
46216                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
46217                     ;;
46218                   *)
46219                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
46220                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
46221                     ;;
46222                 esac
46223               done
46224             fi
46225           else
46226                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
46227             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
46228           fi
46229         fi
46230       fi
46231     done
46232   done
46233   if test "X$rpathdirs" != "X"; then
46234     if test -n "$acl_hardcode_libdir_separator"; then
46235                         alldirs=
46236       for found_dir in $rpathdirs; do
46237         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
46238       done
46239             acl_save_libdir="$libdir"
46240       libdir="$alldirs"
46241       eval flag=\"$acl_hardcode_libdir_flag_spec\"
46242       libdir="$acl_save_libdir"
46243       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
46244     else
46245             for found_dir in $rpathdirs; do
46246         acl_save_libdir="$libdir"
46247         libdir="$found_dir"
46248         eval flag=\"$acl_hardcode_libdir_flag_spec\"
46249         libdir="$acl_save_libdir"
46250         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
46251       done
46252     fi
46253   fi
46254   if test "X$ltrpathdirs" != "X"; then
46255             for found_dir in $ltrpathdirs; do
46256       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
46257     done
46258   fi
46259
46260
46261
46262
46263
46264
46265         ac_save_CPPFLAGS="$CPPFLAGS"
46266
46267   for element in $INCSIGSEGV; do
46268     haveit=
46269     for x in $CPPFLAGS; do
46270
46271   acl_save_prefix="$prefix"
46272   prefix="$acl_final_prefix"
46273   acl_save_exec_prefix="$exec_prefix"
46274   exec_prefix="$acl_final_exec_prefix"
46275   eval x=\"$x\"
46276   exec_prefix="$acl_save_exec_prefix"
46277   prefix="$acl_save_prefix"
46278
46279       if test "X$x" = "X$element"; then
46280         haveit=yes
46281         break
46282       fi
46283     done
46284     if test -z "$haveit"; then
46285       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
46286     fi
46287   done
46288
46289
46290   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
46291 printf %s "checking for libsigsegv... " >&6; }
46292 if test ${ac_cv_libsigsegv+y}
46293 then :
46294   printf %s "(cached) " >&6
46295 else $as_nop
46296
46297     ac_save_LIBS="$LIBS"
46298                                 case " $LIBSIGSEGV" in
46299       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
46300       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
46301     esac
46302     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46303 /* end confdefs.h.  */
46304 #include <sigsegv.h>
46305 int
46306 main (void)
46307 {
46308 sigsegv_deinstall_handler();
46309   ;
46310   return 0;
46311 }
46312 _ACEOF
46313 if ac_fn_c_try_link "$LINENO"
46314 then :
46315   ac_cv_libsigsegv=yes
46316 else $as_nop
46317   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
46318 fi
46319 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46320     conftest$ac_exeext conftest.$ac_ext
46321     LIBS="$ac_save_LIBS"
46322
46323 fi
46324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
46325 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
46326   if test "$ac_cv_libsigsegv" = yes; then
46327     HAVE_LIBSIGSEGV=yes
46328
46329 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
46330
46331     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
46332 printf %s "checking how to link with libsigsegv... " >&6; }
46333     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
46334 printf "%s\n" "$LIBSIGSEGV" >&6; }
46335   else
46336     HAVE_LIBSIGSEGV=no
46337             CPPFLAGS="$ac_save_CPPFLAGS"
46338     LIBSIGSEGV=
46339     LTLIBSIGSEGV=
46340     LIBSIGSEGV_PREFIX=
46341   fi
46342
46343
46344
46345
46346
46347
46348
46349     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
46350
46351     if test "$gl_cv_lib_sigsegv" = yes; then
46352       SIGSEGV_H=
46353     fi
46354   fi
46355
46356    if test -n "$SIGSEGV_H"; then
46357   GL_GENERATE_SIGSEGV_H_TRUE=
46358   GL_GENERATE_SIGSEGV_H_FALSE='#'
46359 else
46360   GL_GENERATE_SIGSEGV_H_TRUE='#'
46361   GL_GENERATE_SIGSEGV_H_FALSE=
46362 fi
46363
46364   if test -n "$SIGSEGV_H"; then
46365
46366
46367     case "$host_os" in
46368       solaris2.11)
46369
46370 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
46371
46372         ;;
46373     esac
46374
46375
46376
46377   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
46378 printf %s "checking for stack direction... " >&6; }
46379 if test ${sv_cv_stack_direction_msg+y}
46380 then :
46381   printf %s "(cached) " >&6
46382 else $as_nop
46383
46384     case "$host_cpu" in
46385             a29k | \
46386       aarch64* | \
46387       alpha* | \
46388       arc | \
46389       arm* | strongarm* | xscale* | \
46390       avr | avr32 | \
46391       bfin | \
46392       c1 | c2 | c32 | c34 | c38 | \
46393       clipper | \
46394       cris | \
46395       d30v | \
46396       elxsi | \
46397       fr30 | \
46398       h8300 | \
46399       i?86 | x86_64 | \
46400       i860 | \
46401       ia64 | \
46402       m32r | \
46403       m68* | \
46404       m88k | \
46405       mcore | \
46406       microblaze | \
46407       mips* | \
46408       mmix | \
46409       mn10200 | \
46410       mn10300 | \
46411       nios2 | \
46412       nds32* | \
46413       ns32k | \
46414       pdp11 | \
46415       pj* | \
46416       powerpc* | rs6000 | \
46417       riscv* | \
46418       romp | \
46419       s390* | \
46420       sh* | \
46421       sparc* | \
46422       v850 | \
46423       vax | \
46424       xtensa)
46425         sv_cv_stack_direction=-1 ;;
46426       c4x | \
46427       dsp16xx | \
46428       i960 | \
46429       hppa* | parisc* | \
46430       stormy16 | \
46431       we32k)
46432         sv_cv_stack_direction=1 ;;
46433       *)
46434         if test $cross_compiling = no; then
46435           cat > conftest.c <<EOF
46436 #include <stdio.h>
46437 int
46438 find_stack_direction (int *addr, int depth)
46439 {
46440   int dir, dummy = 0;
46441   if (! addr)
46442     addr = &dummy;
46443   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
46444   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
46445   return dir + dummy;
46446 }
46447 int
46448 main (int argc, char *argv)
46449 {
46450   printf ("%d\n", find_stack_direction (NULL, argc + 20));
46451   return 0;
46452 }
46453 EOF
46454           { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46455   (eval $ac_link) 2>&5
46456   ac_status=$?
46457   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46458   test $ac_status = 0; }
46459           sv_cv_stack_direction=`./conftest`
46460         else
46461           sv_cv_stack_direction=0
46462         fi
46463         ;;
46464     esac
46465     case $sv_cv_stack_direction in
46466       1)  sv_cv_stack_direction_msg="grows up";;
46467       -1) sv_cv_stack_direction_msg="grows down";;
46468       *)  sv_cv_stack_direction_msg="unknown";;
46469     esac
46470
46471 fi
46472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
46473 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
46474
46475 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
46476
46477
46478
46479
46480
46481
46482
46483
46484   if test "$ac_cv_func_sigaltstack" = yes; then
46485     ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
46486 #include <signal.h>
46487 #if HAVE_SYS_SIGNAL_H
46488 # include <sys/signal.h>
46489 #endif
46490
46491 "
46492 if test "x$ac_cv_type_stack_t" = xyes
46493 then :
46494
46495 else $as_nop
46496
46497 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
46498
46499
46500 fi
46501
46502   fi
46503
46504   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
46505 printf %s "checking for working sigaltstack... " >&6; }
46506 if test ${sv_cv_sigaltstack+y}
46507 then :
46508   printf %s "(cached) " >&6
46509 else $as_nop
46510
46511     if test "$ac_cv_func_sigaltstack" = yes; then
46512       case "$host_os" in
46513         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
46514           # On MacOS X 10.2 or newer, just assume that if it compiles, it will
46515           # work. If we were to perform the real test, 1 Crash Report dialog
46516           # window would pop up.
46517           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46518 /* end confdefs.h.  */
46519
46520             #include <signal.h>
46521 int
46522 main (void)
46523 {
46524 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
46525   ;
46526   return 0;
46527 }
46528 _ACEOF
46529 if ac_fn_c_try_link "$LINENO"
46530 then :
46531   sv_cv_sigaltstack="guessing yes"
46532 else $as_nop
46533   sv_cv_sigaltstack=no
46534 fi
46535 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46536     conftest$ac_exeext conftest.$ac_ext
46537           ;;
46538         *)
46539           if test "$cross_compiling" = yes
46540 then :
46541
46542                             case "$host_os" in
46543                 *)
46544                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46545 /* end confdefs.h.  */
46546
46547                     #include <signal.h>
46548 int
46549 main (void)
46550 {
46551 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
46552   ;
46553   return 0;
46554 }
46555 _ACEOF
46556 if ac_fn_c_try_link "$LINENO"
46557 then :
46558   sv_cv_sigaltstack="guessing yes"
46559 else $as_nop
46560   sv_cv_sigaltstack=no
46561 fi
46562 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46563     conftest$ac_exeext conftest.$ac_ext
46564                   ;;
46565               esac
46566
46567 else $as_nop
46568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46569 /* end confdefs.h.  */
46570
46571
46572 #include <stdlib.h>
46573 #include <signal.h>
46574 #if HAVE_SYS_SIGNAL_H
46575 # include <sys/signal.h>
46576 #endif
46577 #if HAVE_SETRLIMIT
46578 # include <sys/types.h>
46579 # include <sys/time.h>
46580 # include <sys/resource.h>
46581 #endif
46582 void stackoverflow_handler (int sig)
46583 {
46584   /* If we get here, the stack overflow was caught.  */
46585   exit (0);
46586 }
46587 volatile int * recurse_1 (volatile int n, volatile int *p)
46588 {
46589   if (n >= 0)
46590     *recurse_1 (n + 1, p) += n;
46591   return p;
46592 }
46593 int recurse (volatile int n)
46594 {
46595   int sum = 0;
46596   return *recurse_1 (n, &sum);
46597 }
46598 char mystack[2 * (1 << 24)];
46599 int main ()
46600 {
46601   stack_t altstack;
46602   struct sigaction action;
46603 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
46604   /* Before starting the endless recursion, try to be friendly to the user's
46605      machine.  On some Linux 2.2.x systems, there is no stack limit for user
46606      processes at all.  We don't want to kill such systems.  */
46607   struct rlimit rl;
46608   rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
46609   setrlimit (RLIMIT_STACK, &rl);
46610 #endif
46611   /* Install the alternate stack.  Use the midpoint of mystack, to guard
46612      against a buggy interpretation of ss_sp on IRIX.  */
46613 #ifdef SIGSTKSZ
46614   if (sizeof mystack / 2 < SIGSTKSZ)
46615     exit (3);
46616 #endif
46617   altstack.ss_sp = mystack + sizeof mystack / 2;
46618   altstack.ss_size = sizeof mystack / 2;
46619   altstack.ss_flags = 0; /* no SS_DISABLE */
46620   if (sigaltstack (&altstack, NULL) < 0)
46621     exit (1);
46622   /* Install the SIGSEGV handler.  */
46623   sigemptyset (&action.sa_mask);
46624   action.sa_handler = &stackoverflow_handler;
46625   action.sa_flags = SA_ONSTACK;
46626   sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
46627   sigaction (SIGBUS, &action, (struct sigaction *) NULL);
46628   /* Provoke a stack overflow.  */
46629   recurse (0);
46630   exit (2);
46631 }
46632 _ACEOF
46633 if ac_fn_c_try_run "$LINENO"
46634 then :
46635   sv_cv_sigaltstack=yes
46636 else $as_nop
46637   sv_cv_sigaltstack=no
46638 fi
46639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46640   conftest.$ac_objext conftest.beam conftest.$ac_ext
46641 fi
46642
46643           ;;
46644       esac
46645     else
46646       sv_cv_sigaltstack=no
46647     fi
46648
46649 fi
46650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
46651 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
46652   if test "$sv_cv_sigaltstack" != no; then
46653
46654 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
46655
46656
46657                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
46658 printf %s "checking for correct stack_t interpretation... " >&6; }
46659 if test ${sv_cv_sigaltstack_low_base+y}
46660 then :
46661   printf %s "(cached) " >&6
46662 else $as_nop
46663
46664       if test "$cross_compiling" = yes
46665 then :
46666
46667                 case "$host_os" in
46668           irix5*) sv_cv_sigaltstack_low_base="no" ;;
46669           *)      sv_cv_sigaltstack_low_base="guessing yes" ;;
46670         esac
46671
46672 else $as_nop
46673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46674 /* end confdefs.h.  */
46675
46676
46677 #include <stdlib.h>
46678 #include <signal.h>
46679 #if HAVE_SYS_SIGNAL_H
46680 # include <sys/signal.h>
46681 #endif
46682 volatile char *stack_lower_bound;
46683 volatile char *stack_upper_bound;
46684 static void check_stack_location (volatile char *addr)
46685 {
46686   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
46687     exit (0);
46688   else
46689     exit (1);
46690 }
46691 static void stackoverflow_handler (int sig)
46692 {
46693   char dummy;
46694   check_stack_location (&dummy);
46695 }
46696 char mystack[2 * (1 << 24)];
46697 int main ()
46698 {
46699   stack_t altstack;
46700   struct sigaction action;
46701   /* Install the alternate stack.  */
46702   altstack.ss_sp = mystack + sizeof mystack / 2;
46703   altstack.ss_size = sizeof mystack / 2;
46704   stack_lower_bound = (char *) altstack.ss_sp;
46705   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
46706   altstack.ss_flags = 0; /* no SS_DISABLE */
46707   if (sigaltstack (&altstack, NULL) < 0)
46708     exit (2);
46709   /* Install the SIGSEGV handler.  */
46710   sigemptyset (&action.sa_mask);
46711   action.sa_handler = &stackoverflow_handler;
46712   action.sa_flags = SA_ONSTACK;
46713   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
46714     exit(3);
46715   /* Provoke a SIGSEGV.  */
46716   raise (SIGSEGV);
46717   exit (3);
46718 }
46719 _ACEOF
46720 if ac_fn_c_try_run "$LINENO"
46721 then :
46722   sv_cv_sigaltstack_low_base=yes
46723 else $as_nop
46724   sv_cv_sigaltstack_low_base=no
46725 fi
46726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46727   conftest.$ac_objext conftest.beam conftest.$ac_ext
46728 fi
46729
46730
46731 fi
46732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
46733 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
46734     if test "$sv_cv_sigaltstack_low_base" = no; then
46735
46736 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
46737
46738     fi
46739   fi
46740
46741
46742   fi
46743
46744   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
46745 if test "x$ac_cv_header_stdint_h" = xyes
46746 then :
46747   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
46748
46749 fi
46750
46751     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
46752 printf %s "checking for SIZE_MAX... " >&6; }
46753 if test ${gl_cv_size_max+y}
46754 then :
46755   printf %s "(cached) " >&6
46756 else $as_nop
46757
46758     gl_cv_size_max=no
46759     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46760 /* end confdefs.h.  */
46761
46762 #include <limits.h>
46763 #if HAVE_STDINT_H
46764 #include <stdint.h>
46765 #endif
46766 #ifdef SIZE_MAX
46767 Found it
46768 #endif
46769
46770 _ACEOF
46771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46772   $EGREP "Found it" >/dev/null 2>&1
46773 then :
46774   gl_cv_size_max=yes
46775 fi
46776 rm -rf conftest*
46777
46778     if test $gl_cv_size_max != yes; then
46779                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
46780 #include <limits.h>"
46781 then :
46782
46783 else $as_nop
46784   size_t_bits_minus_1=
46785 fi
46786
46787       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
46788 then :
46789
46790 else $as_nop
46791   fits_in_uint=
46792 fi
46793
46794       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
46795         if test $fits_in_uint = 1; then
46796                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46797 /* end confdefs.h.  */
46798 #include <stddef.h>
46799                  extern size_t foo;
46800                  extern unsigned long foo;
46801
46802 int
46803 main (void)
46804 {
46805
46806   ;
46807   return 0;
46808 }
46809 _ACEOF
46810 if ac_fn_c_try_compile "$LINENO"
46811 then :
46812   fits_in_uint=0
46813 fi
46814 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46815         fi
46816                                 if test $fits_in_uint = 1; then
46817           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
46818         else
46819           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
46820         fi
46821       else
46822                 gl_cv_size_max='((size_t)~(size_t)0)'
46823       fi
46824     fi
46825
46826 fi
46827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
46828 printf "%s\n" "$gl_cv_size_max" >&6; }
46829   if test "$gl_cv_size_max" != yes; then
46830
46831 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
46832
46833   fi
46834
46835
46836
46837
46838   gl_cv_func_snprintf_usable=no
46839   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
46840 if test "x$ac_cv_func_snprintf" = xyes
46841 then :
46842   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
46843
46844 fi
46845
46846   if test $ac_cv_func_snprintf = yes; then
46847
46848
46849
46850   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
46851 printf %s "checking whether snprintf respects a size of 1... " >&6; }
46852 if test ${gl_cv_func_snprintf_size1+y}
46853 then :
46854   printf %s "(cached) " >&6
46855 else $as_nop
46856
46857       if test "$cross_compiling" = yes
46858 then :
46859   case "$host_os" in
46860                             # Guess yes on Android.
46861            linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
46862                             # Guess yes on native Windows.
46863            mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
46864            *)               gl_cv_func_snprintf_size1="guessing yes" ;;
46865          esac
46866
46867 else $as_nop
46868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46869 /* end confdefs.h.  */
46870
46871 #include <stdio.h>
46872 #if HAVE_SNPRINTF
46873 # define my_snprintf snprintf
46874 #else
46875 # include <stdarg.h>
46876 static int my_snprintf (char *buf, int size, const char *format, ...)
46877 {
46878   va_list args;
46879   int ret;
46880   va_start (args, format);
46881   ret = vsnprintf (buf, size, format, args);
46882   va_end (args);
46883   return ret;
46884 }
46885 #endif
46886 int main()
46887 {
46888   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
46889   my_snprintf (buf, 1, "%d", 12345);
46890   return buf[1] != 'E';
46891 }
46892 _ACEOF
46893 if ac_fn_c_try_run "$LINENO"
46894 then :
46895   gl_cv_func_snprintf_size1=yes
46896 else $as_nop
46897   gl_cv_func_snprintf_size1=no
46898 fi
46899 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46900   conftest.$ac_objext conftest.beam conftest.$ac_ext
46901 fi
46902
46903
46904 fi
46905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
46906 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
46907
46908     case "$gl_cv_func_snprintf_size1" in
46909       *yes)
46910
46911         case "$gl_cv_func_snprintf_retval_c99" in
46912           *yes)
46913
46914
46915      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
46916 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
46917 if test ${gl_cv_func_printf_positions+y}
46918 then :
46919   printf %s "(cached) " >&6
46920 else $as_nop
46921
46922       if test "$cross_compiling" = yes
46923 then :
46924
46925          case "$host_os" in
46926            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
46927                             gl_cv_func_printf_positions="guessing no";;
46928            beos*)           gl_cv_func_printf_positions="guessing no";;
46929                             # Guess yes on Android.
46930            linux*-android*) gl_cv_func_printf_positions="guessing yes";;
46931                             # Guess no on native Windows.
46932            mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
46933            *)               gl_cv_func_printf_positions="guessing yes";;
46934          esac
46935
46936 else $as_nop
46937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46938 /* end confdefs.h.  */
46939
46940 #include <stdio.h>
46941 #include <string.h>
46942 /* The string "%2$d %1$d", with dollar characters protected from the shell's
46943    dollar expansion (possibly an autoconf bug).  */
46944 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
46945 static char buf[100];
46946 int main ()
46947 {
46948   sprintf (buf, format, 33, 55);
46949   return (strcmp (buf, "55 33") != 0);
46950 }
46951 _ACEOF
46952 if ac_fn_c_try_run "$LINENO"
46953 then :
46954   gl_cv_func_printf_positions=yes
46955 else $as_nop
46956   gl_cv_func_printf_positions=no
46957 fi
46958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46959   conftest.$ac_objext conftest.beam conftest.$ac_ext
46960 fi
46961
46962
46963 fi
46964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
46965 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
46966
46967             case "$gl_cv_func_printf_positions" in
46968               *yes)
46969                 gl_cv_func_snprintf_usable=yes
46970                 ;;
46971             esac
46972             ;;
46973         esac
46974         ;;
46975     esac
46976   fi
46977   if test $gl_cv_func_snprintf_usable = no; then
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988   M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
46989
46990   if test $ac_cv_func_snprintf = yes; then
46991     REPLACE_SNPRINTF=1
46992   else
46993
46994     if test $ac_cv_have_decl_snprintf = yes; then
46995                         REPLACE_SNPRINTF=1
46996     fi
46997   fi
46998   :
46999
47000   fi
47001
47002   if test $ac_cv_have_decl_snprintf = no; then
47003     HAVE_DECL_SNPRINTF=0
47004   fi
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015           GL_M4_GNULIB_SNPRINTF=1
47016
47017
47018
47019
47020
47021 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
47022
47023
47024
47025
47026
47027 printf "%s\n" "#define GNULIB_SNPRINTF 1" >>confdefs.h
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040   case "$host_os" in
47041     os2*)
47042
47043
47044
47045
47046
47047
47048
47049
47050   M4_LIBOBJS="$M4_LIBOBJS os2-spawn.$ac_objext"
47051
47052       ;;
47053   esac
47054
47055   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
47056 printf %s "checking for ssize_t... " >&6; }
47057 if test ${gt_cv_ssize_t+y}
47058 then :
47059   printf %s "(cached) " >&6
47060 else $as_nop
47061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47062 /* end confdefs.h.  */
47063 #include <sys/types.h>
47064 int
47065 main (void)
47066 {
47067 int x = sizeof (ssize_t *) + sizeof (ssize_t);
47068             return !x;
47069   ;
47070   return 0;
47071 }
47072 _ACEOF
47073 if ac_fn_c_try_compile "$LINENO"
47074 then :
47075   gt_cv_ssize_t=yes
47076 else $as_nop
47077   gt_cv_ssize_t=no
47078 fi
47079 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47080 fi
47081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
47082 printf "%s\n" "$gt_cv_ssize_t" >&6; }
47083   if test $gt_cv_ssize_t = no; then
47084
47085 printf "%s\n" "#define ssize_t int" >>confdefs.h
47086
47087   fi
47088
47089
47090
47091
47092
47093   case "$host_os" in
47094     mingw*)
47095                   REPLACE_STAT=1
47096       ;;
47097     *)
47098                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
47099 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
47100 if test ${gl_cv_func_stat_file_slash+y}
47101 then :
47102   printf %s "(cached) " >&6
47103 else $as_nop
47104   touch conftest.tmp
47105          # Assume that if we have lstat, we can also check symlinks.
47106          if test $ac_cv_func_lstat = yes; then
47107            ln -s conftest.tmp conftest.lnk
47108          fi
47109          if test "$cross_compiling" = yes
47110 then :
47111   case "$host_os" in
47112                                # Guess yes on Linux systems.
47113               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
47114                                # Guess yes on glibc systems.
47115               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
47116                                # If we don't know, obey --enable-cross-guesses.
47117               *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
47118             esac
47119
47120 else $as_nop
47121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47122 /* end confdefs.h.  */
47123 #include <sys/stat.h>
47124
47125 int
47126 main (void)
47127 {
47128 int result = 0;
47129                struct stat st;
47130                if (!stat ("conftest.tmp/", &st))
47131                  result |= 1;
47132 #if HAVE_LSTAT
47133                if (!stat ("conftest.lnk/", &st))
47134                  result |= 2;
47135 #endif
47136                return result;
47137
47138   ;
47139   return 0;
47140 }
47141 _ACEOF
47142 if ac_fn_c_try_run "$LINENO"
47143 then :
47144   gl_cv_func_stat_file_slash=yes
47145 else $as_nop
47146   gl_cv_func_stat_file_slash=no
47147 fi
47148 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47149   conftest.$ac_objext conftest.beam conftest.$ac_ext
47150 fi
47151
47152          rm -f conftest.tmp conftest.lnk
47153 fi
47154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
47155 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
47156       case $gl_cv_func_stat_file_slash in
47157         *no)
47158           REPLACE_STAT=1
47159
47160 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
47161 ;;
47162       esac
47163       case $host_os in
47164                 solaris*)
47165           REPLACE_FSTAT=1 ;;
47166       esac
47167       ;;
47168   esac
47169
47170   if test $REPLACE_STAT = 1; then
47171
47172
47173
47174
47175
47176
47177
47178
47179   M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
47180
47181     case "$host_os" in
47182       mingw*)
47183
47184
47185
47186
47187
47188
47189
47190
47191   M4_LIBOBJS="$M4_LIBOBJS stat-w32.$ac_objext"
47192
47193         ;;
47194     esac
47195
47196
47197
47198   :
47199
47200   fi
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210           GL_M4_GNULIB_STAT=1
47211
47212
47213
47214
47215
47216 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
47217
47218
47219
47220
47221
47222
47223
47224   ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
47225      #include <sys/stat.h>
47226 "
47227 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
47228 then :
47229
47230 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
47231
47232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
47233 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
47234 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
47235 then :
47236   printf %s "(cached) " >&6
47237 else $as_nop
47238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47239 /* end confdefs.h.  */
47240
47241             #include <sys/types.h>
47242             #include <sys/stat.h>
47243             #if HAVE_SYS_TIME_H
47244             # include <sys/time.h>
47245             #endif
47246             #include <time.h>
47247             struct timespec ts;
47248             struct stat st;
47249
47250 int
47251 main (void)
47252 {
47253
47254             st.st_atim = ts;
47255
47256   ;
47257   return 0;
47258 }
47259 _ACEOF
47260 if ac_fn_c_try_compile "$LINENO"
47261 then :
47262   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
47263 else $as_nop
47264   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
47265 fi
47266 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47267 fi
47268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
47269 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
47270      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
47271
47272 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
47273
47274      fi
47275 else $as_nop
47276   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
47277         #include <sys/stat.h>
47278 "
47279 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
47280 then :
47281
47282 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
47283
47284
47285 else $as_nop
47286   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
47287            #include <sys/stat.h>
47288 "
47289 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
47290 then :
47291
47292 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
47293
47294
47295 else $as_nop
47296   ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
47297               #include <sys/stat.h>
47298 "
47299 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
47300 then :
47301
47302 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
47303
47304
47305 fi
47306
47307 fi
47308
47309 fi
47310
47311 fi
47312
47313
47314
47315
47316
47317   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
47318      #include <sys/stat.h>
47319 "
47320 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
47321 then :
47322
47323 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
47324
47325
47326 else $as_nop
47327   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
47328         #include <sys/stat.h>
47329 "
47330 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
47331 then :
47332
47333 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
47334
47335
47336 else $as_nop
47337   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
47338           #include <sys/stat.h>
47339 "
47340 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
47341 then :
47342
47343 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
47344
47345
47346 fi
47347
47348 fi
47349
47350 fi
47351
47352
47353
47354   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
47355 printf %s "checking for working stdalign.h... " >&6; }
47356 if test ${gl_cv_header_working_stdalign_h+y}
47357 then :
47358   printf %s "(cached) " >&6
47359 else $as_nop
47360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47361 /* end confdefs.h.  */
47362 #include <stdint.h>
47363             #include <stdalign.h>
47364             #include <stddef.h>
47365
47366             /* Test that alignof yields a result consistent with offsetof.
47367                This catches GCC bug 52023
47368                <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
47369             #ifdef __cplusplus
47370                template <class t> struct alignof_helper { char a; t b; };
47371             # define ao(type) offsetof (alignof_helper<type>, b)
47372             #else
47373             # define ao(type) offsetof (struct { char a; type b; }, b)
47374             #endif
47375             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
47376             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
47377             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
47378
47379             /* Test _Alignas only on platforms where gnulib can help.  */
47380             #if \
47381                 ((defined __cplusplus && 201103 <= __cplusplus) \
47382                  || (__TINYC__ && defined __attribute__) \
47383                  || (defined __APPLE__ && defined __MACH__ \
47384                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
47385                      : __GNUC__) \
47386                  || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
47387                  || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
47388                  || 1300 <= _MSC_VER)
47389               struct alignas_test { char c; char alignas (8) alignas_8; };
47390               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
47391                                 ? 1 : -1];
47392             #endif
47393
47394 int
47395 main (void)
47396 {
47397
47398   ;
47399   return 0;
47400 }
47401 _ACEOF
47402 if ac_fn_c_try_compile "$LINENO"
47403 then :
47404   gl_cv_header_working_stdalign_h=yes
47405 else $as_nop
47406   gl_cv_header_working_stdalign_h=no
47407 fi
47408 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47409 fi
47410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
47411 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
47412
47413   if test $gl_cv_header_working_stdalign_h = yes; then
47414     STDALIGN_H=''
47415   else
47416     STDALIGN_H='stdalign.h'
47417   fi
47418
47419
47420    if test -n "$STDALIGN_H"; then
47421   GL_GENERATE_STDALIGN_H_TRUE=
47422   GL_GENERATE_STDALIGN_H_FALSE='#'
47423 else
47424   GL_GENERATE_STDALIGN_H_TRUE='#'
47425   GL_GENERATE_STDALIGN_H_FALSE=
47426 fi
47427
47428
47429
47430   STDARG_H=''
47431   NEXT_STDARG_H='<stdarg.h>'
47432   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
47433 printf %s "checking for va_copy... " >&6; }
47434 if test ${gl_cv_func_va_copy+y}
47435 then :
47436   printf %s "(cached) " >&6
47437 else $as_nop
47438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47439 /* end confdefs.h.  */
47440 #include <stdarg.h>
47441 int
47442 main (void)
47443 {
47444
47445 #ifndef va_copy
47446 void (*func) (va_list, va_list) = va_copy;
47447 #endif
47448
47449   ;
47450   return 0;
47451 }
47452 _ACEOF
47453 if ac_fn_c_try_compile "$LINENO"
47454 then :
47455   gl_cv_func_va_copy=yes
47456 else $as_nop
47457   gl_cv_func_va_copy=no
47458 fi
47459 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47460
47461 fi
47462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
47463 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
47464   if test $gl_cv_func_va_copy = no; then
47465                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47466 /* end confdefs.h.  */
47467 #if defined _AIX && !defined __GNUC__
47468         AIX vaccine
47469        #endif
47470
47471 _ACEOF
47472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47473   $EGREP "vaccine" >/dev/null 2>&1
47474 then :
47475   gl_aixcc=yes
47476 else $as_nop
47477   gl_aixcc=no
47478 fi
47479 rm -rf conftest*
47480
47481     if test $gl_aixcc = yes; then
47482             STDARG_H=stdarg.h
47483
47484
47485
47486
47487
47488
47489
47490
47491      if test $gl_cv_have_include_next = yes; then
47492        gl_cv_next_stdarg_h='<'stdarg.h'>'
47493      else
47494        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
47495 printf %s "checking absolute name of <stdarg.h>... " >&6; }
47496 if test ${gl_cv_next_stdarg_h+y}
47497 then :
47498   printf %s "(cached) " >&6
47499 else $as_nop
47500
47501
47502
47503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47504 /* end confdefs.h.  */
47505 #include <stdarg.h>
47506 _ACEOF
47507                 case "$host_os" in
47508     aix*) gl_absname_cpp="$ac_cpp -C" ;;
47509     *)    gl_absname_cpp="$ac_cpp" ;;
47510   esac
47511
47512   case "$host_os" in
47513     mingw*)
47514                                           gl_dirsep_regex='[/\\]'
47515       ;;
47516     *)
47517       gl_dirsep_regex='\/'
47518       ;;
47519   esac
47520       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47521   gl_header_literal_regex=`echo 'stdarg.h' \
47522                            | sed -e "$gl_make_literal_regex_sed"`
47523   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47524       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47525       s|^/[^/]|//&|
47526       p
47527       q
47528     }'
47529
47530         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47531   sed -n "$gl_absolute_header_sed"`
47532
47533            gl_header=$gl_cv_absolute_stdarg_h
47534            gl_cv_next_stdarg_h='"'$gl_header'"'
47535
47536
47537 fi
47538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
47539 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
47540      fi
47541      NEXT_STDARG_H=$gl_cv_next_stdarg_h
47542
47543      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47544        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47545        gl_next_as_first_directive='<'stdarg.h'>'
47546      else
47547        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47548        gl_next_as_first_directive=$gl_cv_next_stdarg_h
47549      fi
47550      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
47551
47552
47553
47554
47555             if test "$gl_cv_next_stdarg_h" = '""'; then
47556         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
47557         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
47558       fi
47559     else
47560
47561
47562   exec 9>&6 6>/dev/null
47563
47564     if test ${gl_cv_func___va_copy+y}
47565 then :
47566   printf %s "(cached) " >&6
47567 else $as_nop
47568
47569         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47570 /* end confdefs.h.  */
47571 #include <stdarg.h>
47572 int
47573 main (void)
47574 {
47575
47576 #ifndef __va_copy
47577 error, bail out
47578 #endif
47579
47580   ;
47581   return 0;
47582 }
47583 _ACEOF
47584 if ac_fn_c_try_compile "$LINENO"
47585 then :
47586   gl_cv_func___va_copy=yes
47587 else $as_nop
47588   gl_cv_func___va_copy=no
47589 fi
47590 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47591 fi
47592
47593
47594   exec 6>&9 9>&-
47595
47596
47597       if test $gl_cv_func___va_copy = yes; then
47598
47599 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
47600
47601       else
47602
47603
47604 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
47605
47606       fi
47607     fi
47608   fi
47609
47610    if test -n "$STDARG_H"; then
47611   GL_GENERATE_STDARG_H_TRUE=
47612   GL_GENERATE_STDARG_H_FALSE='#'
47613 else
47614   GL_GENERATE_STDARG_H_TRUE='#'
47615   GL_GENERATE_STDARG_H_FALSE=
47616 fi
47617
47618
47619
47620
47621
47622
47623
47624           if test "$ac_cv_header_stdbool_h" = yes; then
47625     case "$host_os" in
47626       solaris*)
47627         if test -z "$GCC"; then
47628           STDBOOL_H='stdbool.h'
47629         else
47630           STDBOOL_H=''
47631         fi
47632         ;;
47633       *)
47634         STDBOOL_H=''
47635         ;;
47636     esac
47637   else
47638     STDBOOL_H='stdbool.h'
47639   fi
47640
47641    if test -n "$STDBOOL_H"; then
47642   GL_GENERATE_STDBOOL_H_TRUE=
47643   GL_GENERATE_STDBOOL_H_FALSE='#'
47644 else
47645   GL_GENERATE_STDBOOL_H_TRUE='#'
47646   GL_GENERATE_STDBOOL_H_FALSE=
47647 fi
47648
47649
47650   if test "$ac_cv_type__Bool" = yes; then
47651     HAVE__BOOL=1
47652   else
47653     HAVE__BOOL=0
47654   fi
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679           GL_M4_GNULIB_FSCANF=1
47680
47681
47682
47683
47684
47685 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
47686
47687
47688
47689
47690
47691 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703           GL_M4_GNULIB_SCANF=1
47704
47705
47706
47707
47708
47709 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
47710
47711
47712
47713
47714
47715 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727           GL_M4_GNULIB_FGETC=1
47728
47729
47730
47731
47732
47733 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746           GL_M4_GNULIB_GETC=1
47747
47748
47749
47750
47751
47752 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765           GL_M4_GNULIB_GETCHAR=1
47766
47767
47768
47769
47770
47771 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784           GL_M4_GNULIB_FGETS=1
47785
47786
47787
47788
47789
47790 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803           GL_M4_GNULIB_FREAD=1
47804
47805
47806
47807
47808
47809 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822           GL_M4_GNULIB_FPRINTF=1
47823
47824
47825
47826
47827
47828 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841           GL_M4_GNULIB_PRINTF=1
47842
47843
47844
47845
47846
47847 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860           GL_M4_GNULIB_VFPRINTF=1
47861
47862
47863
47864
47865
47866 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879           GL_M4_GNULIB_VPRINTF=1
47880
47881
47882
47883
47884
47885 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898           GL_M4_GNULIB_FPUTC=1
47899
47900
47901
47902
47903
47904 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917           GL_M4_GNULIB_PUTC=1
47918
47919
47920
47921
47922
47923 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936           GL_M4_GNULIB_PUTCHAR=1
47937
47938
47939
47940
47941
47942 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955           GL_M4_GNULIB_FPUTS=1
47956
47957
47958
47959
47960
47961 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974           GL_M4_GNULIB_PUTS=1
47975
47976
47977
47978
47979
47980 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993           GL_M4_GNULIB_FWRITE=1
47994
47995
47996
47997
47998
47999 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
48016 if test "x$ac_cv_func_stpcpy" = xyes
48017 then :
48018   printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
48019
48020 fi
48021
48022   if test $ac_cv_func_stpcpy = no; then
48023     HAVE_STPCPY=0
48024   fi
48025
48026   if test $HAVE_STPCPY = 0; then
48027
48028
48029
48030
48031
48032
48033
48034
48035   M4_LIBOBJS="$M4_LIBOBJS stpcpy.$ac_objext"
48036
48037
48038   :
48039
48040   fi
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050           GL_M4_GNULIB_STPCPY=1
48051
48052
48053
48054
48055
48056 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
48057
48058
48059
48060
48061
48062
48063
48064   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
48065 if test "x$ac_cv_func_strchrnul" = xyes
48066 then :
48067   printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
48068
48069 fi
48070
48071   if test $ac_cv_func_strchrnul = no; then
48072     HAVE_STRCHRNUL=0
48073   else
48074     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
48075 printf %s "checking whether strchrnul works... " >&6; }
48076 if test ${gl_cv_func_strchrnul_works+y}
48077 then :
48078   printf %s "(cached) " >&6
48079 else $as_nop
48080   if test "$cross_compiling" = yes
48081 then :
48082            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48083 /* end confdefs.h.  */
48084
48085 #if defined __CYGWIN__
48086  #include <cygwin/version.h>
48087  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
48088   Lucky user
48089  #endif
48090 #else
48091   Lucky user
48092 #endif
48093
48094 _ACEOF
48095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48096   $EGREP "Lucky user" >/dev/null 2>&1
48097 then :
48098   gl_cv_func_strchrnul_works="guessing yes"
48099 else $as_nop
48100   gl_cv_func_strchrnul_works="guessing no"
48101 fi
48102 rm -rf conftest*
48103
48104
48105 else $as_nop
48106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48107 /* end confdefs.h.  */
48108
48109 #include <string.h> /* for strchrnul */
48110
48111 int
48112 main (void)
48113 {
48114 const char *buf = "a";
48115       return strchrnul (buf, 'b') != buf + 1;
48116
48117   ;
48118   return 0;
48119 }
48120 _ACEOF
48121 if ac_fn_c_try_run "$LINENO"
48122 then :
48123   gl_cv_func_strchrnul_works=yes
48124 else $as_nop
48125   gl_cv_func_strchrnul_works=no
48126 fi
48127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48128   conftest.$ac_objext conftest.beam conftest.$ac_ext
48129 fi
48130
48131
48132 fi
48133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
48134 printf "%s\n" "$gl_cv_func_strchrnul_works" >&6; }
48135     case "$gl_cv_func_strchrnul_works" in
48136       *yes) ;;
48137       *) REPLACE_STRCHRNUL=1 ;;
48138     esac
48139   fi
48140
48141   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
48142
48143
48144
48145
48146
48147
48148
48149
48150   M4_LIBOBJS="$M4_LIBOBJS strchrnul.$ac_objext"
48151
48152     :
48153   fi
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163           GL_M4_GNULIB_STRCHRNUL=1
48164
48165
48166
48167
48168
48169 printf "%s\n" "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
48170
48171
48172
48173
48174
48175
48176   if test $gl_cv_func_malloc_posix != yes; then
48177     REPLACE_STRDUP=1
48178   fi
48179
48180   if test $ac_cv_have_decl_strdup = no; then
48181     HAVE_DECL_STRDUP=0
48182   fi
48183
48184   if test $REPLACE_STRDUP = 1; then
48185
48186
48187
48188
48189
48190
48191
48192
48193   M4_LIBOBJS="$M4_LIBOBJS strdup.$ac_objext"
48194
48195     :
48196   fi
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206           GL_M4_GNULIB_STRDUP=1
48207
48208
48209
48210
48211
48212 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
48224     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
48225 printf %s "checking for working strerror function... " >&6; }
48226 if test ${gl_cv_func_working_strerror+y}
48227 then :
48228   printf %s "(cached) " >&6
48229 else $as_nop
48230   if test "$cross_compiling" = yes
48231 then :
48232   case "$host_os" in
48233                           # Guess yes on glibc systems.
48234            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
48235                           # Guess yes on musl systems.
48236            *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
48237                           # If we don't know, obey --enable-cross-guesses.
48238            *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
48239          esac
48240
48241 else $as_nop
48242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48243 /* end confdefs.h.  */
48244 #include <string.h>
48245
48246 int
48247 main (void)
48248 {
48249 if (!*strerror (-2)) return 1;
48250   ;
48251   return 0;
48252 }
48253 _ACEOF
48254 if ac_fn_c_try_run "$LINENO"
48255 then :
48256   gl_cv_func_working_strerror=yes
48257 else $as_nop
48258   gl_cv_func_working_strerror=no
48259 fi
48260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48261   conftest.$ac_objext conftest.beam conftest.$ac_ext
48262 fi
48263
48264
48265 fi
48266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
48267 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
48268     case "$gl_cv_func_working_strerror" in
48269       *yes) ;;
48270       *)
48271                         REPLACE_STRERROR=1
48272         ;;
48273     esac
48274
48275                   case "$gl_cv_func_strerror_r_works" in
48276         *no) REPLACE_STRERROR=1 ;;
48277       esac
48278
48279   else
48280             REPLACE_STRERROR=1
48281   fi
48282
48283   if test $REPLACE_STRERROR = 1; then
48284
48285
48286
48287
48288
48289
48290
48291
48292   M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
48293
48294   fi
48295
48296
48297 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309           GL_M4_GNULIB_STRERROR=1
48310
48311
48312
48313
48314
48315 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
48316
48317
48318
48319
48320
48321   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
48322
48323
48324
48325
48326
48327
48328
48329
48330   M4_LIBOBJS="$M4_LIBOBJS strerror-override.$ac_objext"
48331
48332
48333
48334
48335
48336   if test $ac_cv_header_sys_socket_h != yes; then
48337                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
48338 if test "x$ac_cv_header_winsock2_h" = xyes
48339 then :
48340   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
48341
48342 fi
48343
48344   fi
48345   if test "$ac_cv_header_winsock2_h" = yes; then
48346     HAVE_WINSOCK2_H=1
48347     UNISTD_H_HAVE_WINSOCK2_H=1
48348     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
48349   else
48350     HAVE_WINSOCK2_H=0
48351   fi
48352
48353
48354   fi
48355   if test $gl_cond_libtool = false; then
48356     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
48357     gl_libdeps="$gl_libdeps $LIBICONV"
48358   fi
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371   if test $ac_cv_have_decl_strndup = no; then
48372     HAVE_DECL_STRNDUP=0
48373   fi
48374
48375   if test $ac_cv_func_strndup = yes; then
48376     HAVE_STRNDUP=1
48377     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
48378     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
48379 printf %s "checking for working strndup... " >&6; }
48380 if test ${gl_cv_func_strndup_works+y}
48381 then :
48382   printf %s "(cached) " >&6
48383 else $as_nop
48384   if test "$cross_compiling" = yes
48385 then :
48386
48387           case $host_os in
48388             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
48389             *)               gl_cv_func_strndup_works="guessing yes";;
48390           esac
48391
48392 else $as_nop
48393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48394 /* end confdefs.h.  */
48395
48396          #include <string.h>
48397                            #include <stdlib.h>
48398 int
48399 main (void)
48400 {
48401
48402 #if !HAVE_DECL_STRNDUP
48403   extern
48404   #ifdef __cplusplus
48405   "C"
48406   #endif
48407   char *strndup (const char *, size_t);
48408 #endif
48409   int result;
48410   char *s;
48411   s = strndup ("some longer string", 15);
48412   free (s);
48413   s = strndup ("shorter string", 13);
48414   result = s[13] != '\0';
48415   free (s);
48416   return result;
48417   ;
48418   return 0;
48419 }
48420 _ACEOF
48421 if ac_fn_c_try_run "$LINENO"
48422 then :
48423   gl_cv_func_strndup_works=yes
48424 else $as_nop
48425   gl_cv_func_strndup_works=no
48426 fi
48427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48428   conftest.$ac_objext conftest.beam conftest.$ac_ext
48429 fi
48430
48431 fi
48432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
48433 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
48434     case $gl_cv_func_strndup_works in
48435       *no) REPLACE_STRNDUP=1 ;;
48436     esac
48437   else
48438     HAVE_STRNDUP=0
48439   fi
48440
48441   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
48442
48443
48444
48445
48446
48447
48448
48449
48450   M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
48451
48452   fi
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462           GL_M4_GNULIB_STRNDUP=1
48463
48464
48465
48466
48467
48468 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478   if test $ac_cv_have_decl_strnlen = no; then
48479     HAVE_DECL_STRNLEN=0
48480   else
48481
48482          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
48483 printf %s "checking for working strnlen... " >&6; }
48484 if test ${ac_cv_func_strnlen_working+y}
48485 then :
48486   printf %s "(cached) " >&6
48487 else $as_nop
48488   if test "$cross_compiling" = yes
48489 then :
48490   # Guess no on AIX systems, yes otherwise.
48491                 case "$host_os" in
48492                   aix*) ac_cv_func_strnlen_working=no;;
48493                   *)    ac_cv_func_strnlen_working=yes;;
48494                 esac
48495 else $as_nop
48496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48497 /* end confdefs.h.  */
48498 $ac_includes_default
48499 int
48500 main (void)
48501 {
48502
48503 #define S "foobar"
48504 #define S_LEN (sizeof S - 1)
48505
48506   /* At least one implementation is buggy: that of AIX 4.3 would
48507      give strnlen (S, 1) == 3.  */
48508
48509   int i;
48510   for (i = 0; i < S_LEN + 1; ++i)
48511     {
48512       int expected = i <= S_LEN ? i : S_LEN;
48513       if (strnlen (S, i) != expected)
48514         return 1;
48515     }
48516   return 0;
48517
48518   ;
48519   return 0;
48520 }
48521 _ACEOF
48522 if ac_fn_c_try_run "$LINENO"
48523 then :
48524   ac_cv_func_strnlen_working=yes
48525 else $as_nop
48526   ac_cv_func_strnlen_working=no
48527 fi
48528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48529   conftest.$ac_objext conftest.beam conftest.$ac_ext
48530 fi
48531
48532 fi
48533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
48534 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
48535 test $ac_cv_func_strnlen_working = no && :
48536
48537
48538     if test $ac_cv_func_strnlen_working = no; then
48539       REPLACE_STRNLEN=1
48540     fi
48541   fi
48542
48543   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
48544
48545
48546
48547
48548
48549
48550
48551
48552   M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
48553
48554     :
48555   fi
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565           GL_M4_GNULIB_STRNLEN=1
48566
48567
48568
48569
48570
48571 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581   if test $ac_cv_have_decl_strsignal = no; then
48582     HAVE_DECL_STRSIGNAL=0
48583   fi
48584
48585   ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
48586 if test "x$ac_cv_func_strsignal" = xyes
48587 then :
48588   printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
48589
48590 fi
48591
48592   if test $ac_cv_func_strsignal = yes; then
48593     HAVE_STRSIGNAL=1
48594             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
48595 printf %s "checking whether strsignal always returns a string... " >&6; }
48596 if test ${gl_cv_func_working_strsignal+y}
48597 then :
48598   printf %s "(cached) " >&6
48599 else $as_nop
48600   if test "$cross_compiling" = yes
48601 then :
48602   case "$host_os" in
48603             solaris* | aix*) gl_cv_func_working_strsignal=no;;
48604             *)               gl_cv_func_working_strsignal="guessing yes";;
48605           esac
48606 else $as_nop
48607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48608 /* end confdefs.h.  */
48609 #include <string.h>
48610 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
48611
48612 int
48613 main (void)
48614 {
48615 int result = 0;
48616               char *s = strsignal (-1);
48617               if (s == (char *) 0)
48618                 result |= 1;
48619               if (s == (char *) -1)
48620                 result |= 2;
48621               return result;
48622
48623   ;
48624   return 0;
48625 }
48626 _ACEOF
48627 if ac_fn_c_try_run "$LINENO"
48628 then :
48629   gl_cv_func_working_strsignal=yes
48630 else $as_nop
48631   gl_cv_func_working_strsignal=no
48632 fi
48633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48634   conftest.$ac_objext conftest.beam conftest.$ac_ext
48635 fi
48636
48637 fi
48638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
48639 printf "%s\n" "$gl_cv_func_working_strsignal" >&6; }
48640     if test "$gl_cv_func_working_strsignal" = no; then
48641       REPLACE_STRSIGNAL=1
48642     fi
48643   else
48644     HAVE_STRSIGNAL=0
48645   fi
48646
48647   if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
48648
48649
48650
48651
48652
48653
48654
48655
48656   M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
48657
48658
48659
48660   ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
48661 " "$ac_c_undeclared_builtin_options" "CFLAGS"
48662 if test "x$ac_cv_have_decl_sys_siglist" = xyes
48663 then :
48664   ac_have_decl=1
48665 else $as_nop
48666   ac_have_decl=0
48667 fi
48668 printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h
48669
48670   ac_fn_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
48671 " "$ac_c_undeclared_builtin_options" "CFLAGS"
48672 if test "x$ac_cv_have_decl__sys_siglist" = xyes
48673 then :
48674   ac_have_decl=1
48675 else $as_nop
48676   ac_have_decl=0
48677 fi
48678 printf "%s\n" "#define HAVE_DECL__SYS_SIGLIST $ac_have_decl" >>confdefs.h
48679
48680
48681   fi
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691           GL_M4_GNULIB_STRSIGNAL=1
48692
48693
48694
48695
48696
48697 printf "%s\n" "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
48698
48699
48700
48701
48702
48703   if test $REPLACE_STRSTR = 0; then
48704     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
48705 printf %s "checking whether strstr works in linear time... " >&6; }
48706 if test ${gl_cv_func_strstr_linear+y}
48707 then :
48708   printf %s "(cached) " >&6
48709 else $as_nop
48710   if test "$cross_compiling" = yes
48711 then :
48712                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48713 /* end confdefs.h.  */
48714
48715 #include <features.h>
48716 #ifdef __GNU_LIBRARY__
48717  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
48718      && !(defined __i386__ || defined __x86_64__) \
48719      && !defined __UCLIBC__
48720   Lucky user
48721  #endif
48722 #endif
48723 #ifdef __CYGWIN__
48724  #include <cygwin/version.h>
48725  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
48726   Lucky user
48727  #endif
48728 #endif
48729
48730 _ACEOF
48731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48732   $EGREP "Lucky user" >/dev/null 2>&1
48733 then :
48734   gl_cv_func_strstr_linear="guessing yes"
48735 else $as_nop
48736   gl_cv_func_strstr_linear="$gl_cross_guess_normal"
48737 fi
48738 rm -rf conftest*
48739
48740
48741 else $as_nop
48742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48743 /* end confdefs.h.  */
48744
48745 #ifdef __MVS__
48746 /* z/OS does not deliver signals while strstr() is running (thanks to
48747    restrictions on its LE runtime), which prevents us from limiting the
48748    running time of this test.  */
48749 # error "This test does not work properly on z/OS"
48750 #endif
48751 #include <signal.h> /* for signal */
48752 #include <string.h> /* for strstr */
48753 #include <stdlib.h> /* for malloc */
48754 #include <unistd.h> /* for alarm */
48755 static void quit (int sig) { _exit (sig + 128); }
48756
48757 int
48758 main (void)
48759 {
48760
48761     int result = 0;
48762     size_t m = 1000000;
48763     char *haystack = (char *) malloc (2 * m + 2);
48764     char *needle = (char *) malloc (m + 2);
48765     /* Failure to compile this test due to missing alarm is okay,
48766        since all such platforms (mingw) also have quadratic strstr.  */
48767     signal (SIGALRM, quit);
48768     alarm (5);
48769     /* Check for quadratic performance.  */
48770     if (haystack && needle)
48771       {
48772         memset (haystack, 'A', 2 * m);
48773         haystack[2 * m] = 'B';
48774         haystack[2 * m + 1] = 0;
48775         memset (needle, 'A', m);
48776         needle[m] = 'B';
48777         needle[m + 1] = 0;
48778         if (!strstr (haystack, needle))
48779           result |= 1;
48780       }
48781     /* Free allocated memory, in case some sanitizer is watching.  */
48782     free (haystack);
48783     free (needle);
48784     return result;
48785
48786   ;
48787   return 0;
48788 }
48789 _ACEOF
48790 if ac_fn_c_try_run "$LINENO"
48791 then :
48792   gl_cv_func_strstr_linear=yes
48793 else $as_nop
48794   gl_cv_func_strstr_linear=no
48795 fi
48796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48797   conftest.$ac_objext conftest.beam conftest.$ac_ext
48798 fi
48799
48800
48801 fi
48802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
48803 printf "%s\n" "$gl_cv_func_strstr_linear" >&6; }
48804     case "$gl_cv_func_strstr_linear" in
48805       *yes) ;;
48806       *)
48807         REPLACE_STRSTR=1
48808         ;;
48809     esac
48810   fi
48811
48812   if test $REPLACE_STRSTR = 1; then
48813
48814
48815
48816
48817
48818
48819
48820
48821   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
48822
48823   fi
48824
48825
48826
48827   if test $REPLACE_MEMCHR = 1; then
48828     REPLACE_STRSTR=1
48829   else
48830             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
48831 printf %s "checking whether strstr works... " >&6; }
48832 if test ${gl_cv_func_strstr_works_always+y}
48833 then :
48834   printf %s "(cached) " >&6
48835 else $as_nop
48836   if test "$cross_compiling" = yes
48837 then :
48838                                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48839 /* end confdefs.h.  */
48840
48841 #ifdef __GNU_LIBRARY__
48842  #include <features.h>
48843  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
48844      || defined __UCLIBC__
48845   Lucky user
48846  #endif
48847 #elif defined __CYGWIN__
48848  #include <cygwin/version.h>
48849  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
48850   Lucky user
48851  #endif
48852 #else
48853   Lucky user
48854 #endif
48855
48856 _ACEOF
48857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48858   $EGREP "Lucky user" >/dev/null 2>&1
48859 then :
48860   gl_cv_func_strstr_works_always="guessing yes"
48861 else $as_nop
48862   gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
48863 fi
48864 rm -rf conftest*
48865
48866
48867 else $as_nop
48868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48869 /* end confdefs.h.  */
48870
48871 #include <string.h> /* for strstr */
48872 #ifdef __GNU_LIBRARY__
48873  #include <features.h>
48874  #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
48875   Unlucky user
48876  #endif
48877 #endif
48878 #define P "_EF_BF_BD"
48879 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
48880 #define NEEDLE P P P P P
48881
48882 int
48883 main (void)
48884 {
48885 return !!strstr (HAYSTACK, NEEDLE);
48886
48887   ;
48888   return 0;
48889 }
48890 _ACEOF
48891 if ac_fn_c_try_run "$LINENO"
48892 then :
48893   gl_cv_func_strstr_works_always=yes
48894 else $as_nop
48895   gl_cv_func_strstr_works_always=no
48896 fi
48897 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48898   conftest.$ac_objext conftest.beam conftest.$ac_ext
48899 fi
48900
48901
48902 fi
48903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
48904 printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
48905     case "$gl_cv_func_strstr_works_always" in
48906       *yes) ;;
48907       *)
48908         REPLACE_STRSTR=1
48909         ;;
48910     esac
48911   fi
48912
48913   if test $REPLACE_STRSTR = 1; then
48914
48915
48916
48917
48918
48919
48920
48921
48922   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
48923
48924   fi
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934           GL_M4_GNULIB_STRSTR=1
48935
48936
48937
48938
48939
48940 printf "%s\n" "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
48941
48942
48943
48944
48945
48946
48947   if test $HAVE_STRTOD = 1; then
48948     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
48949 printf %s "checking whether strtod obeys C99... " >&6; }
48950 if test ${gl_cv_func_strtod_works+y}
48951 then :
48952   printf %s "(cached) " >&6
48953 else $as_nop
48954   if test "$cross_compiling" = yes
48955 then :
48956                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48957 /* end confdefs.h.  */
48958
48959 #include <features.h>
48960 #ifdef __GNU_LIBRARY__
48961  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
48962      && !defined __UCLIBC__
48963   Lucky user
48964  #endif
48965 #endif
48966
48967 _ACEOF
48968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48969   $EGREP "Lucky user" >/dev/null 2>&1
48970 then :
48971   gl_cv_func_strtod_works="guessing yes"
48972 else $as_nop
48973   case "$host_os" in
48974                        # Guess yes on musl systems.
48975               *-musl*) gl_cv_func_strtod_works="guessing yes" ;;
48976                        # Guess yes on native Windows.
48977               mingw*)  gl_cv_func_strtod_works="guessing yes" ;;
48978               *)       gl_cv_func_strtod_works="$gl_cross_guess_normal" ;;
48979             esac
48980
48981 fi
48982 rm -rf conftest*
48983
48984
48985 else $as_nop
48986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987 /* end confdefs.h.  */
48988
48989 #include <stdlib.h>
48990 #include <math.h>
48991 #include <errno.h>
48992 /* Compare two numbers with ==.
48993    This is a separate function because IRIX 6.5 "cc -O" miscompiles an
48994    'x == x' test.  */
48995 static int
48996 numeric_equal (double x, double y)
48997 {
48998   return x == y;
48999 }
49000
49001 int
49002 main (void)
49003 {
49004
49005   int result = 0;
49006   {
49007     /* In some old versions of Linux (2000 or before), strtod mis-parses
49008        strings with leading '+'.  */
49009     const char *string = " +69";
49010     char *term;
49011     double value = strtod (string, &term);
49012     if (value != 69 || term != (string + 4))
49013       result |= 1;
49014   }
49015   {
49016     /* Under Solaris 2.4, strtod returns the wrong value for the
49017        terminating character under some conditions.  */
49018     const char *string = "NaN";
49019     char *term;
49020     strtod (string, &term);
49021     if (term != string && *(term - 1) == 0)
49022       result |= 2;
49023   }
49024   {
49025     /* Older glibc and Cygwin mis-parse "-0x".  */
49026     const char *string = "-0x";
49027     char *term;
49028     double value = strtod (string, &term);
49029     double zero = 0.0;
49030     if (1.0 / value != -1.0 / zero || term != (string + 2))
49031       result |= 4;
49032   }
49033   {
49034     /* Many platforms do not parse hex floats.  */
49035     const char *string = "0XaP+1";
49036     char *term;
49037     double value = strtod (string, &term);
49038     if (value != 20.0 || term != (string + 6))
49039       result |= 8;
49040   }
49041   {
49042     /* Many platforms do not parse infinities.  HP-UX 11.31 parses inf,
49043        but mistakenly sets errno.  */
49044     const char *string = "inf";
49045     char *term;
49046     double value;
49047     errno = 0;
49048     value = strtod (string, &term);
49049     if (value != HUGE_VAL || term != (string + 3) || errno)
49050       result |= 16;
49051   }
49052   {
49053     /* glibc 2.7 and cygwin 1.5.24 misparse "nan()".  */
49054     const char *string = "nan()";
49055     char *term;
49056     double value = strtod (string, &term);
49057     if (numeric_equal (value, value) || term != (string + 5))
49058       result |= 32;
49059   }
49060   {
49061     /* darwin 10.6.1 misparses "nan(".  */
49062     const char *string = "nan(";
49063     char *term;
49064     double value = strtod (string, &term);
49065     if (numeric_equal (value, value) || term != (string + 3))
49066       result |= 64;
49067   }
49068   return result;
49069
49070   ;
49071   return 0;
49072 }
49073 _ACEOF
49074 if ac_fn_c_try_run "$LINENO"
49075 then :
49076   gl_cv_func_strtod_works=yes
49077 else $as_nop
49078   gl_cv_func_strtod_works=no
49079 fi
49080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49081   conftest.$ac_objext conftest.beam conftest.$ac_ext
49082 fi
49083
49084
49085 fi
49086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
49087 printf "%s\n" "$gl_cv_func_strtod_works" >&6; }
49088     case "$gl_cv_func_strtod_works" in
49089       *yes) ;;
49090       *)
49091         REPLACE_STRTOD=1
49092         ;;
49093     esac
49094   fi
49095
49096   if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
49097
49098
49099
49100
49101
49102
49103
49104
49105   M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
49106
49107
49108
49109   if test $gl_cv_func_ldexp_no_libm = yes; then
49110
49111 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
49112
49113   fi
49114   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
49115 if test "x$ac_cv_func_nl_langinfo" = xyes
49116 then :
49117   printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
49118
49119 fi
49120
49121
49122   fi
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132           GL_M4_GNULIB_STRTOD=1
49133
49134
49135
49136
49137
49138 printf "%s\n" "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172   :
49173
49174
49175
49176
49177 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
49178
49179
49180   ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
49181 if test "x$ac_cv_header_sys_single_threaded_h" = xyes
49182 then :
49183   printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
49184
49185 fi
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197   :
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209       if  { test "$HAVE_LIBUNISTRING" != yes \
49210     || {
49211
49212
49213
49214             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49215             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49216                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49217                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49218                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49219                          }
49220                     }
49221                }
49222
49223
49224
49225
49226        }
49227   }; then
49228     LIBUNISTRING_UNISTR_H='unistr.h'
49229   else
49230     LIBUNISTRING_UNISTR_H=
49231   fi
49232
49233
49234
49235
49236 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
49237
49238
49239
49240
49241        if  { test "$HAVE_LIBUNISTRING" != yes \
49242     || {
49243
49244
49245
49246             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49247             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49248                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49249                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49250                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
49251                          }
49252                     }
49253                }
49254
49255
49256
49257
49258        }
49259   }; then
49260   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
49261   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
49262 else
49263   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
49264   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
49265 fi
49266
49267
49268
49269
49270 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
49271
49272
49273
49274
49275        if  { test "$HAVE_LIBUNISTRING" != yes \
49276     || {
49277
49278
49279
49280             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49281             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49282                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49283                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49284                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
49285                          }
49286                     }
49287                }
49288
49289
49290
49291
49292        }
49293   }; then
49294   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
49295   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
49296 else
49297   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
49298   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
49299 fi
49300
49301
49302
49303
49304       if  { test "$HAVE_LIBUNISTRING" != yes \
49305     || {
49306
49307
49308
49309             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49310             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49311                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49312                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49313                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49314                          }
49315                     }
49316                }
49317
49318
49319
49320
49321        }
49322   }; then
49323     LIBUNISTRING_UNITYPES_H='unitypes.h'
49324   else
49325     LIBUNISTRING_UNITYPES_H=
49326   fi
49327
49328
49329
49330
49331       if  { test "$HAVE_LIBUNISTRING" != yes \
49332     || {
49333
49334
49335
49336             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49337             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49338                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49339                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49340                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49341                          }
49342                     }
49343                }
49344
49345
49346
49347
49348        }
49349   }; then
49350     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
49351   else
49352     LIBUNISTRING_UNIWIDTH_H=
49353   fi
49354
49355
49356
49357
49358        if  { test "$HAVE_LIBUNISTRING" != yes \
49359     || {
49360
49361
49362
49363             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49364             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49365                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49366                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49367                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
49368                          }
49369                     }
49370                }
49371
49372
49373
49374
49375        }
49376   }; then
49377   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
49378   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
49379 else
49380   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
49381   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
49382 fi
49383
49384
49385
49386 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
49387
49388
49389 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411   if test $ac_cv_func_vasnprintf = no; then
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
49453
49454   if test $ac_cv_func_vasnprintf = yes; then
49455
49456 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
49457
49458   fi
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
49469 if test "x$ac_cv_type_ptrdiff_t" = xyes
49470 then :
49471
49472 else $as_nop
49473
49474 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
49475
49476
49477 fi
49478
49479
49480
49481
49482
49483
49484
49485   fi
49486
49487
49488   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
49489 if test "x$ac_cv_func_vasprintf" = xyes
49490 then :
49491   printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
49492
49493 fi
49494
49495   if test $ac_cv_func_vasprintf = no; then
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
49516
49517
49518   if test $ac_cv_func_vasprintf = yes; then
49519     REPLACE_VASPRINTF=1
49520   else
49521     HAVE_VASPRINTF=0
49522   fi
49523
49524
49525
49526
49527
49528
49529
49530
49531   fi
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542           GL_M4_GNULIB_VASPRINTF=1
49543
49544
49545
49546
49547
49548 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
49549
49550
49551
49552
49553
49554   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
49555
49556
49557
49558   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575   gl_cv_func_vasprintf_posix=no
49576   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
49577 if test "x$ac_cv_func_vasprintf" = xyes
49578 then :
49579   printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
49580
49581 fi
49582
49583   case "$gl_cv_func_printf_sizes_c99" in
49584     *yes)
49585       case "$gl_cv_func_printf_long_double" in
49586         *yes)
49587           case "$gl_cv_func_printf_infinite" in
49588             *yes)
49589               case "$gl_cv_func_printf_infinite_long_double" in
49590                 *yes)
49591                   case "$gl_cv_func_printf_directive_a" in
49592                     *yes)
49593                       case "$gl_cv_func_printf_directive_f" in
49594                         *yes)
49595                           case "$gl_cv_func_printf_directive_n" in
49596                             *yes)
49597                               case "$gl_cv_func_printf_directive_ls" in
49598                                 *yes)
49599                                   case "$gl_cv_func_printf_positions" in
49600                                     *yes)
49601                                       case "$gl_cv_func_printf_flag_grouping" in
49602                                         *yes)
49603                                           case "$gl_cv_func_printf_flag_leftadjust" in
49604                                             *yes)
49605                                               case "$gl_cv_func_printf_flag_zero" in
49606                                                 *yes)
49607                                                   case "$gl_cv_func_printf_precision" in
49608                                                     *yes)
49609                                                       case "$gl_cv_func_printf_enomem" in
49610                                                         *yes)
49611                                                           if test $ac_cv_func_vasprintf = yes; then
49612                                                             # vasprintf exists and is
49613                                                             # already POSIX compliant.
49614                                                             gl_cv_func_vasprintf_posix=yes
49615                                                           fi
49616                                                           ;;
49617                                                       esac
49618                                                       ;;
49619                                                   esac
49620                                                   ;;
49621                                               esac
49622                                               ;;
49623                                           esac
49624                                           ;;
49625                                       esac
49626                                       ;;
49627                                   esac
49628                                   ;;
49629                               esac
49630                               ;;
49631                           esac
49632                           ;;
49633                       esac
49634                       ;;
49635                   esac
49636                   ;;
49637               esac
49638               ;;
49639           esac
49640           ;;
49641       esac
49642       ;;
49643   esac
49644   if test $gl_cv_func_vasprintf_posix = no; then
49645
49646
49647
49648   case "$gl_cv_func_printf_infinite" in
49649     *yes)
49650       ;;
49651     *)
49652
49653 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
49654
49655       ;;
49656   esac
49657
49658
49659
49660
49661   case "$gl_cv_func_printf_long_double" in
49662     *yes)
49663       case "$gl_cv_func_printf_infinite_long_double" in
49664         *yes)
49665           ;;
49666         *)
49667
49668 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
49669
49670           ;;
49671       esac
49672       ;;
49673   esac
49674
49675
49676
49677   case "$gl_cv_func_printf_directive_a" in
49678     *yes)
49679       ;;
49680     *)
49681
49682 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
49683
49684       ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
49685 if test "x$ac_cv_func_nl_langinfo" = xyes
49686 then :
49687   printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
49688
49689 fi
49690
49691       ;;
49692   esac
49693
49694
49695
49696   case "$gl_cv_func_printf_directive_f" in
49697     *yes)
49698       ;;
49699     *)
49700
49701 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
49702
49703       ;;
49704   esac
49705
49706
49707
49708   case "$gl_cv_func_printf_directive_ls" in
49709     *yes)
49710       ;;
49711     *)
49712
49713 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
49714
49715       ;;
49716   esac
49717
49718
49719
49720   case "$gl_cv_func_printf_flag_grouping" in
49721     *yes)
49722       ;;
49723     *)
49724
49725 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
49726
49727       ;;
49728   esac
49729
49730
49731
49732   case "$gl_cv_func_printf_flag_leftadjust" in
49733     *yes)
49734       ;;
49735     *)
49736
49737 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
49738
49739       ;;
49740   esac
49741
49742
49743
49744   case "$gl_cv_func_printf_flag_zero" in
49745     *yes)
49746       ;;
49747     *)
49748
49749 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
49750
49751       ;;
49752   esac
49753
49754
49755
49756   case "$gl_cv_func_printf_precision" in
49757     *yes)
49758       ;;
49759     *)
49760
49761 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
49762
49763
49764 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
49765
49766
49767 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
49768
49769       ;;
49770   esac
49771
49772
49773
49774   case "$gl_cv_func_printf_enomem" in
49775     *yes)
49776       ;;
49777     *)
49778
49779 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
49780
49781
49782 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
49783
49784
49785 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
49786
49787       ;;
49788   esac
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
49831
49832   if test $ac_cv_func_vasnprintf = yes; then
49833
49834 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
49835
49836   fi
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
49847 if test "x$ac_cv_type_ptrdiff_t" = xyes
49848 then :
49849
49850 else $as_nop
49851
49852 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
49853
49854
49855 fi
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
49883
49884
49885   if test $ac_cv_func_vasprintf = yes; then
49886     REPLACE_VASPRINTF=1
49887   else
49888     HAVE_VASPRINTF=0
49889   fi
49890
49891
49892
49893
49894
49895
49896
49897
49898   fi
49899
49900
49901
49902   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
49903
49904
49905
49906   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
49907
49908
49909 # Check whether --with-packager was given.
49910 if test ${with_packager+y}
49911 then :
49912   withval=$with_packager;       case $withval in
49913         yes|no) ;;
49914         *)
49915 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
49916  ;;
49917       esac
49918
49919 fi
49920
49921
49922
49923 # Check whether --with-packager-version was given.
49924 if test ${with_packager_version+y}
49925 then :
49926   withval=$with_packager_version;       case $withval in
49927         yes|no) ;;
49928         *)
49929 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
49930  ;;
49931       esac
49932
49933 fi
49934
49935
49936
49937 # Check whether --with-packager-bug-reports was given.
49938 if test ${with_packager_bug_reports+y}
49939 then :
49940   withval=$with_packager_bug_reports;       case $withval in
49941         yes|no) ;;
49942         *)
49943 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
49944  ;;
49945       esac
49946
49947 fi
49948
49949
49950   if test "X$with_packager" = "X" && \
49951      test "X$with_packager_version$with_packager_bug_reports" != "X"
49952   then
49953     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
49954   fi
49955
49956
49957
49958   ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
49959 if test "x$ac_cv_func_waitid" = xyes
49960 then :
49961   printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
49962
49963 fi
49964
49965
49966
49967
49968   HAVE_WAITPID=1
49969   case $host_os in
49970     mingw*) HAVE_WAITPID=0 ;;
49971   esac
49972
49973   if test $HAVE_WAITPID = 0; then
49974
49975
49976
49977
49978
49979
49980
49981
49982   M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
49983
49984   fi
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994           GL_M4_GNULIB_WAITPID=1
49995
49996
49997
49998
49999
50000 printf "%s\n" "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021         if case "$host_os" in
50022        mingw*) true ;;
50023        *) test $ac_cv_func_mbsinit = yes ;;
50024      esac \
50025     && test $ac_cv_func_mbrtowc = yes; then
50026
50027
50028
50029
50030      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
50031 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
50032 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
50033 then :
50034   printf %s "(cached) " >&6
50035 else $as_nop
50036
50037                   case "$host_os" in
50038                      # Guess no on AIX and OSF/1.
50039         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
50040                      # Guess yes otherwise.
50041         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
50042       esac
50043       if test $LOCALE_JA != none; then
50044         if test "$cross_compiling" = yes
50045 then :
50046   :
50047 else $as_nop
50048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50049 /* end confdefs.h.  */
50050
50051 #include <locale.h>
50052 #include <string.h>
50053 #include <wchar.h>
50054 int main ()
50055 {
50056   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
50057     {
50058       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
50059       mbstate_t state;
50060       wchar_t wc;
50061
50062       memset (&state, '\0', sizeof (mbstate_t));
50063       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
50064         if (mbsinit (&state))
50065           return 2;
50066     }
50067   return 0;
50068 }
50069 _ACEOF
50070 if ac_fn_c_try_run "$LINENO"
50071 then :
50072   gl_cv_func_mbrtowc_incomplete_state=yes
50073 else $as_nop
50074   gl_cv_func_mbrtowc_incomplete_state=no
50075 fi
50076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50077   conftest.$ac_objext conftest.beam conftest.$ac_ext
50078 fi
50079
50080       else
50081         if test $LOCALE_FR_UTF8 != none; then
50082           if test "$cross_compiling" = yes
50083 then :
50084   :
50085 else $as_nop
50086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50087 /* end confdefs.h.  */
50088
50089 #include <locale.h>
50090 #include <string.h>
50091 #include <wchar.h>
50092 int main ()
50093 {
50094   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
50095     {
50096       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
50097       mbstate_t state;
50098       wchar_t wc;
50099
50100       memset (&state, '\0', sizeof (mbstate_t));
50101       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
50102         if (mbsinit (&state))
50103           return 2;
50104     }
50105   return 0;
50106 }
50107 _ACEOF
50108 if ac_fn_c_try_run "$LINENO"
50109 then :
50110   gl_cv_func_mbrtowc_incomplete_state=yes
50111 else $as_nop
50112   gl_cv_func_mbrtowc_incomplete_state=no
50113 fi
50114 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50115   conftest.$ac_objext conftest.beam conftest.$ac_ext
50116 fi
50117
50118         fi
50119       fi
50120
50121 fi
50122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
50123 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
50124
50125
50126
50127
50128      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
50129 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
50130 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
50131 then :
50132   printf %s "(cached) " >&6
50133 else $as_nop
50134
50135                   case "$host_os" in
50136                     # Guess no on Solaris 8.
50137         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
50138                     # Guess yes otherwise.
50139         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
50140       esac
50141       if test $LOCALE_ZH_CN != none; then
50142         if test "$cross_compiling" = yes
50143 then :
50144   :
50145 else $as_nop
50146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50147 /* end confdefs.h.  */
50148
50149 #include <locale.h>
50150 #include <stdlib.h>
50151 #include <string.h>
50152 #include <wchar.h>
50153 int main ()
50154 {
50155   /* This fails on Solaris 8:
50156      mbrtowc returns 2, and sets wc to 0x00F0.
50157      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
50158   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50159     {
50160       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
50161       mbstate_t state;
50162       wchar_t wc;
50163
50164       memset (&state, '\0', sizeof (mbstate_t));
50165       if (mbrtowc (&wc, input + 3, 6, &state) != 4
50166           && mbtowc (&wc, input + 3, 6) == 4)
50167         return 2;
50168     }
50169   return 0;
50170 }
50171 _ACEOF
50172 if ac_fn_c_try_run "$LINENO"
50173 then :
50174   gl_cv_func_mbrtowc_sanitycheck=yes
50175 else $as_nop
50176   gl_cv_func_mbrtowc_sanitycheck=no
50177 fi
50178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50179   conftest.$ac_objext conftest.beam conftest.$ac_ext
50180 fi
50181
50182       fi
50183
50184 fi
50185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
50186 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
50187
50188     REPLACE_MBSTATE_T=0
50189     case "$gl_cv_func_mbrtowc_incomplete_state" in
50190       *yes) ;;
50191       *) REPLACE_MBSTATE_T=1 ;;
50192     esac
50193     case "$gl_cv_func_mbrtowc_sanitycheck" in
50194       *yes) ;;
50195       *) REPLACE_MBSTATE_T=1 ;;
50196     esac
50197   else
50198     REPLACE_MBSTATE_T=1
50199   fi
50200
50201
50202
50203   if test $ac_cv_func_wcrtomb = no; then
50204     HAVE_WCRTOMB=0
50205     ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
50206       #include <wchar.h>
50207
50208 " "$ac_c_undeclared_builtin_options" "CFLAGS"
50209 if test "x$ac_cv_have_decl_wcrtomb" = xyes
50210 then :
50211   ac_have_decl=1
50212 else $as_nop
50213   ac_have_decl=0
50214 fi
50215 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
50216
50217     if test $ac_cv_have_decl_wcrtomb = yes; then
50218                         REPLACE_WCRTOMB=1
50219     fi
50220   else
50221                         if test $REPLACE_WCRTOMB = 0; then
50222
50223
50224
50225
50226
50227              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
50228 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
50229 if test ${gl_cv_func_wcrtomb_works+y}
50230 then :
50231   printf %s "(cached) " >&6
50232 else $as_nop
50233   if test "$cross_compiling" = yes
50234 then :
50235   case "$host_os" in
50236                                # Guess no on Android.
50237               linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
50238                                # Guess yes otherwise.
50239               *)               gl_cv_func_wcrtomb_works="guessing yes";;
50240             esac
50241
50242 else $as_nop
50243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50244 /* end confdefs.h.  */
50245
50246 #include <string.h>
50247 #include <stdlib.h>
50248 #include <wchar.h>
50249 int main ()
50250 {
50251   mbstate_t state;
50252   char out[64];
50253   int count;
50254   memset (&state, 0, sizeof (state));
50255   out[0] = 'x';
50256   count = wcrtomb (out, L'a', &state);
50257   return !(count == 1 && out[0] == 'a');
50258 }
50259 _ACEOF
50260 if ac_fn_c_try_run "$LINENO"
50261 then :
50262   gl_cv_func_wcrtomb_works=yes
50263 else $as_nop
50264   gl_cv_func_wcrtomb_works=no
50265 fi
50266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50267   conftest.$ac_objext conftest.beam conftest.$ac_ext
50268 fi
50269
50270
50271 fi
50272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
50273 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
50274       case "$gl_cv_func_wcrtomb_works" in
50275         *yes) ;;
50276         *)
50277 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
50278
50279            REPLACE_WCRTOMB=1 ;;
50280       esac
50281     fi
50282     if test $REPLACE_WCRTOMB = 0; then
50283       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
50284 printf %s "checking whether wcrtomb return value is correct... " >&6; }
50285 if test ${gl_cv_func_wcrtomb_retval+y}
50286 then :
50287   printf %s "(cached) " >&6
50288 else $as_nop
50289
50290                               case "$host_os" in
50291             # Guess no on AIX 4, OSF/1, Solaris, native Windows.
50292             aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
50293             # Guess yes otherwise.
50294             *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
50295           esac
50296           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
50297             if test "$cross_compiling" = yes
50298 then :
50299   :
50300 else $as_nop
50301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50302 /* end confdefs.h.  */
50303
50304 #include <locale.h>
50305 #include <string.h>
50306 #include <wchar.h>
50307 #include <stdlib.h>
50308 int main ()
50309 {
50310   int result = 0;
50311   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
50312     {
50313       if (wcrtomb (NULL, 0, NULL) != 1)
50314         result |= 1;
50315     }
50316   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
50317     {
50318       if (wcrtomb (NULL, 0, NULL) != 1)
50319         result |= 2;
50320       {
50321         wchar_t wc = (wchar_t) 0xBADFACE;
50322         if (mbtowc (&wc, "\303\274", 2) == 2)
50323           if (wcrtomb (NULL, wc, NULL) != 1)
50324             result |= 2;
50325       }
50326     }
50327   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
50328     {
50329       if (wcrtomb (NULL, 0, NULL) != 1)
50330         result |= 4;
50331     }
50332   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50333     {
50334       if (wcrtomb (NULL, 0, NULL) != 1)
50335         result |= 8;
50336     }
50337   return result;
50338 }
50339 _ACEOF
50340 if ac_fn_c_try_run "$LINENO"
50341 then :
50342   gl_cv_func_wcrtomb_retval=yes
50343 else $as_nop
50344   gl_cv_func_wcrtomb_retval=no
50345 fi
50346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50347   conftest.$ac_objext conftest.beam conftest.$ac_ext
50348 fi
50349
50350           fi
50351
50352 fi
50353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
50354 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
50355       case "$gl_cv_func_wcrtomb_retval" in
50356         *yes) ;;
50357         *)
50358 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
50359
50360            REPLACE_WCRTOMB=1 ;;
50361       esac
50362     fi
50363   fi
50364
50365   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
50366
50367
50368
50369
50370
50371
50372
50373
50374   M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
50375
50376
50377   :
50378
50379   fi
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389           GL_M4_GNULIB_WCRTOMB=1
50390
50391
50392
50393
50394
50395 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416   ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
50417     #include <wchar.h>
50418
50419 " "$ac_c_undeclared_builtin_options" "CFLAGS"
50420 if test "x$ac_cv_have_decl_wcwidth" = xyes
50421 then :
50422   ac_have_decl=1
50423 else $as_nop
50424   ac_have_decl=0
50425 fi
50426 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
50427
50428   if test $ac_cv_have_decl_wcwidth != yes; then
50429     HAVE_DECL_WCWIDTH=0
50430   fi
50431
50432   if test $ac_cv_func_wcwidth != yes; then
50433     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
50434 printf %s "checking whether wcwidth is a macro... " >&6; }
50435 if test ${gl_cv_func_wcwidth_macro+y}
50436 then :
50437   printf %s "(cached) " >&6
50438 else $as_nop
50439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50440 /* end confdefs.h.  */
50441
50442 #include <wchar.h>
50443 #ifdef wcwidth
50444  wchar_header_defines_wcwidth
50445 #endif
50446 _ACEOF
50447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50448   $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
50449 then :
50450   gl_cv_func_wcwidth_macro=yes
50451 else $as_nop
50452   gl_cv_func_wcwidth_macro=no
50453 fi
50454 rm -rf conftest*
50455
50456
50457 fi
50458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
50459 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
50460   fi
50461
50462   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
50463     HAVE_WCWIDTH=1
50464                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
50465 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
50466 if test ${gl_cv_func_wcwidth_works+y}
50467 then :
50468   printf %s "(cached) " >&6
50469 else $as_nop
50470
50471         if test "$cross_compiling" = yes
50472 then :
50473
50474            case "$host_os" in
50475                             # Guess yes on glibc systems.
50476              *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
50477                             # Guess yes on musl systems.
50478              *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
50479                             # Guess yes on AIX 7 systems.
50480              aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
50481              *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
50482            esac
50483
50484 else $as_nop
50485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50486 /* end confdefs.h.  */
50487
50488 #include <locale.h>
50489 #include <wchar.h>
50490 #if !HAVE_DECL_WCWIDTH
50491 extern
50492 # ifdef __cplusplus
50493 "C"
50494 # endif
50495 int wcwidth (int);
50496 #endif
50497 int main ()
50498 {
50499   int result = 0;
50500   if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
50501     {
50502       if (wcwidth (0x0301) > 0)
50503         result |= 1;
50504       if (wcwidth (0x05B0) > 0)
50505         result |= 2;
50506       if (wcwidth (0x200B) > 0)
50507         result |= 4;
50508       if (wcwidth (0xFF1A) == 0)
50509         result |= 8;
50510       if (wcwidth (0x2202) > 1)
50511         result |= 16;
50512     }
50513   return result;
50514 }
50515 _ACEOF
50516 if ac_fn_c_try_run "$LINENO"
50517 then :
50518   gl_cv_func_wcwidth_works=yes
50519 else $as_nop
50520   gl_cv_func_wcwidth_works=no
50521 fi
50522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50523   conftest.$ac_objext conftest.beam conftest.$ac_ext
50524 fi
50525
50526
50527 fi
50528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
50529 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
50530     case "$gl_cv_func_wcwidth_works" in
50531       *yes) ;;
50532       *no) REPLACE_WCWIDTH=1 ;;
50533     esac
50534   else
50535     HAVE_WCWIDTH=0
50536   fi
50537
50538   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
50539
50540
50541
50542
50543
50544
50545
50546
50547   M4_LIBOBJS="$M4_LIBOBJS wcwidth.$ac_objext"
50548
50549
50550
50551   :
50552
50553   fi
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563           GL_M4_GNULIB_WCWIDTH=1
50564
50565
50566
50567
50568
50569 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
50570
50571
50572
50573
50574   case "$host_os" in
50575     mingw*)
50576
50577
50578
50579
50580
50581
50582
50583
50584   M4_LIBOBJS="$M4_LIBOBJS windows-mutex.$ac_objext"
50585
50586       ;;
50587   esac
50588
50589   case "$host_os" in
50590     mingw*)
50591
50592
50593
50594
50595
50596
50597
50598
50599   M4_LIBOBJS="$M4_LIBOBJS windows-once.$ac_objext"
50600
50601       ;;
50602   esac
50603
50604   case "$host_os" in
50605     mingw*)
50606
50607
50608
50609
50610
50611
50612
50613
50614   M4_LIBOBJS="$M4_LIBOBJS windows-recmutex.$ac_objext"
50615
50616       ;;
50617   esac
50618
50619   case "$host_os" in
50620     mingw*)
50621
50622
50623
50624
50625
50626
50627
50628
50629   M4_LIBOBJS="$M4_LIBOBJS windows-rwlock.$ac_objext"
50630
50631       ;;
50632   esac
50633
50634   case "$host_os" in
50635     mingw*)
50636
50637
50638
50639
50640
50641
50642
50643
50644   M4_LIBOBJS="$M4_LIBOBJS windows-spawn.$ac_objext"
50645
50646       ;;
50647   esac
50648
50649   case "$host_os" in
50650     mingw*)
50651
50652
50653
50654
50655
50656
50657
50658
50659   M4_LIBOBJS="$M4_LIBOBJS windows-spin.$ac_objext"
50660
50661       ;;
50662   esac
50663
50664   case "$host_os" in
50665     mingw*)
50666
50667
50668
50669
50670
50671
50672
50673
50674   M4_LIBOBJS="$M4_LIBOBJS windows-tls.$ac_objext"
50675
50676       ;;
50677   esac
50678   :
50679
50680
50681 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
50682
50683
50684
50685
50686 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
50687
50688
50689
50690
50691   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
50692
50693
50694
50695   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
50696
50697
50698
50699   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
50700
50701
50702
50703   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
50704
50705
50706
50707   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
50708 if test "x$ac_cv_header_stdint_h" = xyes
50709 then :
50710   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
50711
50712 fi
50713
50714
50715
50716
50717   :
50718
50719
50720   :
50721
50722
50723   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
50724
50725   # End of code from modules
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737   gltests_libdeps=
50738   gltests_ltlibdeps=
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751   gl_source_base='tests'
50752   M4tests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
50753
50754   gl_module_indicator_condition=$M4tests_WITNESS
50755
50756
50757   if test "$ac_cv_header_winsock2_h" = yes; then
50758
50759
50760
50761
50762
50763
50764
50765
50766   M4tests_LIBOBJS="$M4tests_LIBOBJS accept.$ac_objext"
50767
50768   fi
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778     if test "$GL_M4_GNULIB_ACCEPT" != 1; then
50779         if test "$GL_M4_GNULIB_ACCEPT" = 0; then
50780       GL_M4_GNULIB_ACCEPT=$gl_module_indicator_condition
50781     else
50782       GL_M4_GNULIB_ACCEPT="($GL_M4_GNULIB_ACCEPT || $gl_module_indicator_condition)"
50783     fi
50784   fi
50785
50786
50787
50788
50789
50790 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806   if test "$ac_cv_header_winsock2_h" = yes; then
50807
50808
50809
50810
50811
50812
50813
50814
50815   M4tests_LIBOBJS="$M4tests_LIBOBJS bind.$ac_objext"
50816
50817   fi
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827     if test "$GL_M4_GNULIB_BIND" != 1; then
50828         if test "$GL_M4_GNULIB_BIND" = 0; then
50829       GL_M4_GNULIB_BIND=$gl_module_indicator_condition
50830     else
50831       GL_M4_GNULIB_BIND="($GL_M4_GNULIB_BIND || $gl_module_indicator_condition)"
50832     fi
50833   fi
50834
50835
50836
50837
50838
50839 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
50840
50841
50842
50843
50844
50845
50846   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
50847 printf %s "checking for a traditional french locale... " >&6; }
50848 if test ${gt_cv_locale_fr+y}
50849 then :
50850   printf %s "(cached) " >&6
50851 else $as_nop
50852
50853     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50854 /* end confdefs.h.  */
50855
50856 #include <locale.h>
50857 #include <time.h>
50858 #if HAVE_LANGINFO_CODESET
50859 # include <langinfo.h>
50860 #endif
50861 #include <stdlib.h>
50862 #include <string.h>
50863 struct tm t;
50864 char buf[16];
50865 int main () {
50866   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
50867      imitates locale dependent behaviour by looking at the environment
50868      variables, and all locales use the UTF-8 encoding.  */
50869 #if defined __BEOS__ || defined __HAIKU__
50870   return 1;
50871 #else
50872   /* Check whether the given locale name is recognized by the system.  */
50873 # if defined _WIN32 && !defined __CYGWIN__
50874   /* On native Windows, setlocale(category, "") looks at the system settings,
50875      not at the environment variables.  Also, when an encoding suffix such
50876      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
50877      category of the locale to "C".  */
50878   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
50879       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
50880     return 1;
50881 # else
50882   if (setlocale (LC_ALL, "") == NULL) return 1;
50883 # endif
50884   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
50885      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
50886      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
50887      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
50888      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
50889      some unit tests fail.
50890      On MirBSD 10, when an unsupported locale is specified, setlocale()
50891      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
50892 # if HAVE_LANGINFO_CODESET
50893   {
50894     const char *cs = nl_langinfo (CODESET);
50895     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
50896         || strcmp (cs, "UTF-8") == 0)
50897       return 1;
50898   }
50899 # endif
50900 # ifdef __CYGWIN__
50901   /* On Cygwin, avoid locale names without encoding suffix, because the
50902      locale_charset() function relies on the encoding suffix.  Note that
50903      LC_ALL is set on the command line.  */
50904   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
50905 # endif
50906   /* Check whether in the abbreviation of the second month, the second
50907      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
50908      one byte long. This excludes the UTF-8 encoding.  */
50909   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
50910   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
50911 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
50912   /* Check whether the decimal separator is a comma.
50913      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
50914      are nl_langinfo(RADIXCHAR) are both ".".  */
50915   if (localeconv () ->decimal_point[0] != ',') return 1;
50916 # endif
50917   return 0;
50918 #endif
50919 }
50920
50921 _ACEOF
50922     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
50923   (eval $ac_link) 2>&5
50924   ac_status=$?
50925   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50926   test $ac_status = 0; } && test -s conftest$ac_exeext; then
50927       case "$host_os" in
50928         # Handle native Windows specially, because there setlocale() interprets
50929         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
50930         # "fr" or "fra" as "French" or "French_France.1252",
50931         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
50932         # "ja" as "Japanese" or "Japanese_Japan.932",
50933         # and similar.
50934         mingw*)
50935           # Test for the native Windows locale name.
50936           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50937             gt_cv_locale_fr=French_France.1252
50938           else
50939             # None found.
50940             gt_cv_locale_fr=none
50941           fi
50942           ;;
50943         *)
50944           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
50945           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
50946           # configure script would override the LC_ALL setting. Likewise for
50947           # LC_CTYPE, which is also set at the beginning of the configure script.
50948           # Test for the usual locale name.
50949           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50950             gt_cv_locale_fr=fr_FR
50951           else
50952             # Test for the locale name with explicit encoding suffix.
50953             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50954               gt_cv_locale_fr=fr_FR.ISO-8859-1
50955             else
50956               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
50957               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50958                 gt_cv_locale_fr=fr_FR.ISO8859-1
50959               else
50960                 # Test for the HP-UX locale name.
50961                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50962                   gt_cv_locale_fr=fr_FR.iso88591
50963                 else
50964                   # Test for the Solaris 7 locale name.
50965                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50966                     gt_cv_locale_fr=fr
50967                   else
50968                     # None found.
50969                     gt_cv_locale_fr=none
50970                   fi
50971                 fi
50972               fi
50973             fi
50974           fi
50975           ;;
50976       esac
50977     fi
50978     rm -fr conftest*
50979
50980 fi
50981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
50982 printf "%s\n" "$gt_cv_locale_fr" >&6; }
50983   LOCALE_FR=$gt_cv_locale_fr
50984
50985
50986
50987
50988   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
50989 printf %s "checking for a french Unicode locale... " >&6; }
50990 if test ${gt_cv_locale_fr_utf8+y}
50991 then :
50992   printf %s "(cached) " >&6
50993 else $as_nop
50994
50995     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50996 /* end confdefs.h.  */
50997
50998 #include <locale.h>
50999 #include <time.h>
51000 #if HAVE_LANGINFO_CODESET
51001 # include <langinfo.h>
51002 #endif
51003 #include <stdlib.h>
51004 #include <string.h>
51005 struct tm t;
51006 char buf[16];
51007 int main () {
51008   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
51009      imitates locale dependent behaviour by looking at the environment
51010      variables, and all locales use the UTF-8 encoding.  */
51011 #if !(defined __BEOS__ || defined __HAIKU__)
51012   /* Check whether the given locale name is recognized by the system.  */
51013 # if defined _WIN32 && !defined __CYGWIN__
51014   /* On native Windows, setlocale(category, "") looks at the system settings,
51015      not at the environment variables.  Also, when an encoding suffix such
51016      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51017      category of the locale to "C".  */
51018   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51019       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51020     return 1;
51021 # else
51022   if (setlocale (LC_ALL, "") == NULL) return 1;
51023 # endif
51024   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51025      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51026      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51027      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51028      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51029      some unit tests fail.  */
51030 # if HAVE_LANGINFO_CODESET
51031   {
51032     const char *cs = nl_langinfo (CODESET);
51033     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
51034       return 1;
51035   }
51036 # endif
51037 # ifdef __CYGWIN__
51038   /* On Cygwin, avoid locale names without encoding suffix, because the
51039      locale_charset() function relies on the encoding suffix.  Note that
51040      LC_ALL is set on the command line.  */
51041   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51042 # endif
51043   /* Check whether in the abbreviation of the second month, the second
51044      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
51045      two bytes long, with UTF-8 encoding.  */
51046   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51047   if (strftime (buf, sizeof (buf), "%b", &t) < 4
51048       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
51049     return 1;
51050 #endif
51051 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
51052   /* Check whether the decimal separator is a comma.
51053      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51054      are nl_langinfo(RADIXCHAR) are both ".".  */
51055   if (localeconv () ->decimal_point[0] != ',') return 1;
51056 #endif
51057   return 0;
51058 }
51059
51060 _ACEOF
51061     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51062   (eval $ac_link) 2>&5
51063   ac_status=$?
51064   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51065   test $ac_status = 0; } && test -s conftest$ac_exeext; then
51066       case "$host_os" in
51067         # Handle native Windows specially, because there setlocale() interprets
51068         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51069         # "fr" or "fra" as "French" or "French_France.1252",
51070         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51071         # "ja" as "Japanese" or "Japanese_Japan.932",
51072         # and similar.
51073         mingw*)
51074           # Test for the hypothetical native Windows locale name.
51075           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51076             gt_cv_locale_fr_utf8=French_France.65001
51077           else
51078             # None found.
51079             gt_cv_locale_fr_utf8=none
51080           fi
51081           ;;
51082         *)
51083           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51084           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51085           # configure script would override the LC_ALL setting. Likewise for
51086           # LC_CTYPE, which is also set at the beginning of the configure script.
51087           # Test for the usual locale name.
51088           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51089             gt_cv_locale_fr_utf8=fr_FR
51090           else
51091             # Test for the locale name with explicit encoding suffix.
51092             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51093               gt_cv_locale_fr_utf8=fr_FR.UTF-8
51094             else
51095               # Test for the Solaris 7 locale name.
51096               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51097                 gt_cv_locale_fr_utf8=fr.UTF-8
51098               else
51099                 # None found.
51100                 gt_cv_locale_fr_utf8=none
51101               fi
51102             fi
51103           fi
51104           ;;
51105       esac
51106     fi
51107     rm -fr conftest*
51108
51109 fi
51110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
51111 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
51112   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
51113
51114
51115
51116
51117
51118   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
51119 printf %s "checking for a traditional french locale... " >&6; }
51120 if test ${gt_cv_locale_fr+y}
51121 then :
51122   printf %s "(cached) " >&6
51123 else $as_nop
51124
51125     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51126 /* end confdefs.h.  */
51127
51128 #include <locale.h>
51129 #include <time.h>
51130 #if HAVE_LANGINFO_CODESET
51131 # include <langinfo.h>
51132 #endif
51133 #include <stdlib.h>
51134 #include <string.h>
51135 struct tm t;
51136 char buf[16];
51137 int main () {
51138   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
51139      imitates locale dependent behaviour by looking at the environment
51140      variables, and all locales use the UTF-8 encoding.  */
51141 #if defined __BEOS__ || defined __HAIKU__
51142   return 1;
51143 #else
51144   /* Check whether the given locale name is recognized by the system.  */
51145 # if defined _WIN32 && !defined __CYGWIN__
51146   /* On native Windows, setlocale(category, "") looks at the system settings,
51147      not at the environment variables.  Also, when an encoding suffix such
51148      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51149      category of the locale to "C".  */
51150   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51151       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51152     return 1;
51153 # else
51154   if (setlocale (LC_ALL, "") == NULL) return 1;
51155 # endif
51156   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51157      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51158      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51159      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51160      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51161      some unit tests fail.
51162      On MirBSD 10, when an unsupported locale is specified, setlocale()
51163      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
51164 # if HAVE_LANGINFO_CODESET
51165   {
51166     const char *cs = nl_langinfo (CODESET);
51167     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
51168         || strcmp (cs, "UTF-8") == 0)
51169       return 1;
51170   }
51171 # endif
51172 # ifdef __CYGWIN__
51173   /* On Cygwin, avoid locale names without encoding suffix, because the
51174      locale_charset() function relies on the encoding suffix.  Note that
51175      LC_ALL is set on the command line.  */
51176   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51177 # endif
51178   /* Check whether in the abbreviation of the second month, the second
51179      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
51180      one byte long. This excludes the UTF-8 encoding.  */
51181   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51182   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
51183 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
51184   /* Check whether the decimal separator is a comma.
51185      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51186      are nl_langinfo(RADIXCHAR) are both ".".  */
51187   if (localeconv () ->decimal_point[0] != ',') return 1;
51188 # endif
51189   return 0;
51190 #endif
51191 }
51192
51193 _ACEOF
51194     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51195   (eval $ac_link) 2>&5
51196   ac_status=$?
51197   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51198   test $ac_status = 0; } && test -s conftest$ac_exeext; then
51199       case "$host_os" in
51200         # Handle native Windows specially, because there setlocale() interprets
51201         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51202         # "fr" or "fra" as "French" or "French_France.1252",
51203         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51204         # "ja" as "Japanese" or "Japanese_Japan.932",
51205         # and similar.
51206         mingw*)
51207           # Test for the native Windows locale name.
51208           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51209             gt_cv_locale_fr=French_France.1252
51210           else
51211             # None found.
51212             gt_cv_locale_fr=none
51213           fi
51214           ;;
51215         *)
51216           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51217           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51218           # configure script would override the LC_ALL setting. Likewise for
51219           # LC_CTYPE, which is also set at the beginning of the configure script.
51220           # Test for the usual locale name.
51221           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51222             gt_cv_locale_fr=fr_FR
51223           else
51224             # Test for the locale name with explicit encoding suffix.
51225             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51226               gt_cv_locale_fr=fr_FR.ISO-8859-1
51227             else
51228               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
51229               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51230                 gt_cv_locale_fr=fr_FR.ISO8859-1
51231               else
51232                 # Test for the HP-UX locale name.
51233                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51234                   gt_cv_locale_fr=fr_FR.iso88591
51235                 else
51236                   # Test for the Solaris 7 locale name.
51237                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51238                     gt_cv_locale_fr=fr
51239                   else
51240                     # None found.
51241                     gt_cv_locale_fr=none
51242                   fi
51243                 fi
51244               fi
51245             fi
51246           fi
51247           ;;
51248       esac
51249     fi
51250     rm -fr conftest*
51251
51252 fi
51253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
51254 printf "%s\n" "$gt_cv_locale_fr" >&6; }
51255   LOCALE_FR=$gt_cv_locale_fr
51256
51257
51258
51259
51260
51261   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
51262 printf %s "checking for a turkish Unicode locale... " >&6; }
51263 if test ${gt_cv_locale_tr_utf8+y}
51264 then :
51265   printf %s "(cached) " >&6
51266 else $as_nop
51267
51268     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51269 /* end confdefs.h.  */
51270
51271 #include <locale.h>
51272 #include <time.h>
51273 #if HAVE_LANGINFO_CODESET
51274 # include <langinfo.h>
51275 #endif
51276 #include <stdlib.h>
51277 #include <string.h>
51278 #include <wctype.h>
51279 struct tm t;
51280 char buf[16];
51281 int main () {
51282   /* On BeOS, locales are not implemented in libc.  Rather, libintl
51283      imitates locale dependent behaviour by looking at the environment
51284      variables, and all locales use the UTF-8 encoding.  But BeOS does not
51285      implement the Turkish upper-/lowercase mappings.  Therefore, let this
51286      program return 1 on BeOS.  */
51287   /* Check whether the given locale name is recognized by the system.  */
51288 #if defined _WIN32 && !defined __CYGWIN__
51289   /* On native Windows, setlocale(category, "") looks at the system settings,
51290      not at the environment variables.  Also, when an encoding suffix such
51291      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51292      category of the locale to "C".  */
51293   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51294       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51295     return 1;
51296 #else
51297   if (setlocale (LC_ALL, "") == NULL) return 1;
51298 #endif
51299   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51300      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
51301      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51302      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51303      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51304      some unit tests fail.  */
51305 #if HAVE_LANGINFO_CODESET
51306   {
51307     const char *cs = nl_langinfo (CODESET);
51308     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
51309       return 1;
51310   }
51311 #endif
51312 #ifdef __CYGWIN__
51313   /* On Cygwin, avoid locale names without encoding suffix, because the
51314      locale_charset() function relies on the encoding suffix.  Note that
51315      LC_ALL is set on the command line.  */
51316   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51317 #endif
51318   /* Check whether in the abbreviation of the eighth month, the second
51319      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
51320      two bytes long, with UTF-8 encoding.  */
51321   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
51322   if (strftime (buf, sizeof (buf), "%b", &t) < 4
51323       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
51324     return 1;
51325   /* Check whether the upper-/lowercase mappings are as expected for
51326      Turkish.  */
51327   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
51328       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
51329     return 1;
51330   return 0;
51331 }
51332
51333 _ACEOF
51334     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51335   (eval $ac_link) 2>&5
51336   ac_status=$?
51337   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51338   test $ac_status = 0; } && test -s conftest$ac_exeext; then
51339       case "$host_os" in
51340         # Handle native Windows specially, because there setlocale() interprets
51341         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51342         # "fr" or "fra" as "French" or "French_France.1252",
51343         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51344         # "ja" as "Japanese" or "Japanese_Japan.932",
51345         # and similar.
51346         mingw*)
51347           # Test for the hypothetical native Windows locale name.
51348           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51349             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
51350           else
51351             # None found.
51352             gt_cv_locale_tr_utf8=none
51353           fi
51354           ;;
51355         *)
51356           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51357           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51358           # configure script would override the LC_ALL setting. Likewise for
51359           # LC_CTYPE, which is also set at the beginning of the configure script.
51360           # Test for the usual locale name.
51361           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51362             gt_cv_locale_tr_utf8=tr_TR
51363           else
51364             # Test for the locale name with explicit encoding suffix.
51365             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51366               gt_cv_locale_tr_utf8=tr_TR.UTF-8
51367             else
51368               # Test for the Solaris 7 locale name.
51369               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51370                 gt_cv_locale_tr_utf8=tr.UTF-8
51371               else
51372                 # None found.
51373                 gt_cv_locale_tr_utf8=none
51374               fi
51375             fi
51376           fi
51377           ;;
51378       esac
51379     else
51380       gt_cv_locale_tr_utf8=none
51381     fi
51382     rm -fr conftest*
51383
51384 fi
51385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
51386 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
51387   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
51388
51389
51390
51391   if test "$ac_cv_header_winsock2_h" = yes; then
51392
51393
51394
51395
51396
51397
51398
51399
51400   M4tests_LIBOBJS="$M4tests_LIBOBJS connect.$ac_objext"
51401
51402   fi
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412     if test "$GL_M4_GNULIB_CONNECT" != 1; then
51413         if test "$GL_M4_GNULIB_CONNECT" = 0; then
51414       GL_M4_GNULIB_CONNECT=$gl_module_indicator_condition
51415     else
51416       GL_M4_GNULIB_CONNECT="($GL_M4_GNULIB_CONNECT || $gl_module_indicator_condition)"
51417     fi
51418   fi
51419
51420
51421
51422
51423
51424 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
51425
51426
51427
51428
51429
51430   case "$host_os" in
51431     mingw*)
51432       REPLACE_CREAT=1
51433       ;;
51434     *)
51435
51436
51437   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
51438 printf %s "checking whether open recognizes a trailing slash... " >&6; }
51439 if test ${gl_cv_func_open_slash+y}
51440 then :
51441   printf %s "(cached) " >&6
51442 else $as_nop
51443   # Assume that if we have lstat, we can also check symlinks.
51444      if test $ac_cv_func_lstat = yes; then
51445        touch conftest.tmp
51446        ln -s conftest.tmp conftest.lnk
51447      fi
51448      if test "$cross_compiling" = yes
51449 then :
51450
51451         case "$host_os" in
51452           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
51453             gl_cv_func_open_slash="guessing no" ;;
51454           *)
51455             gl_cv_func_open_slash="guessing yes" ;;
51456         esac
51457
51458 else $as_nop
51459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51460 /* end confdefs.h.  */
51461
51462 #include <fcntl.h>
51463 #if HAVE_UNISTD_H
51464 # include <unistd.h>
51465 #endif
51466
51467
51468 $gl_mda_defines
51469
51470 int main ()
51471 {
51472   int result = 0;
51473 #if HAVE_LSTAT
51474   if (open ("conftest.lnk/", O_RDONLY) != -1)
51475     result |= 1;
51476 #endif
51477   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
51478     result |= 2;
51479   return result;
51480 }
51481 _ACEOF
51482 if ac_fn_c_try_run "$LINENO"
51483 then :
51484   gl_cv_func_open_slash=yes
51485 else $as_nop
51486   gl_cv_func_open_slash=no
51487 fi
51488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51489   conftest.$ac_objext conftest.beam conftest.$ac_ext
51490 fi
51491
51492      rm -f conftest.sl conftest.tmp conftest.lnk
51493
51494 fi
51495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
51496 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
51497   case "$gl_cv_func_open_slash" in
51498     *no)
51499
51500 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
51501
51502       ;;
51503   esac
51504
51505       case "$gl_cv_func_open_slash" in
51506         *no)
51507           REPLACE_CREAT=1
51508           ;;
51509       esac
51510       ;;
51511   esac
51512
51513   if test $REPLACE_CREAT = 1; then
51514
51515
51516
51517
51518
51519
51520
51521
51522   M4tests_LIBOBJS="$M4tests_LIBOBJS creat.$ac_objext"
51523
51524   fi
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534     if test "$GL_M4_GNULIB_CREAT" != 1; then
51535         if test "$GL_M4_GNULIB_CREAT" = 0; then
51536       GL_M4_GNULIB_CREAT=$gl_module_indicator_condition
51537     else
51538       GL_M4_GNULIB_CREAT="($GL_M4_GNULIB_CREAT || $gl_module_indicator_condition)"
51539     fi
51540   fi
51541
51542
51543
51544
51545
51546 printf "%s\n" "#define GNULIB_TEST_CREAT 1" >>confdefs.h
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556     ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
51557 if test "x$ac_cv_func_close_range" = xyes
51558 then :
51559   printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
51560
51561 fi
51562
51563
51564
51565
51566
51567
51568
51569   if test $ac_cv_func_explicit_bzero = no; then
51570     HAVE_EXPLICIT_BZERO=0
51571   fi
51572
51573   if test $HAVE_EXPLICIT_BZERO = 0; then
51574
51575
51576
51577
51578
51579
51580
51581
51582   M4tests_LIBOBJS="$M4tests_LIBOBJS explicit_bzero.$ac_objext"
51583
51584
51585   ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
51586 if test "x$ac_cv_func_explicit_memset" = xyes
51587 then :
51588   printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
51589
51590 fi
51591
51592
51593
51594   fi
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604     if test "$GL_M4_GNULIB_EXPLICIT_BZERO" != 1; then
51605         if test "$GL_M4_GNULIB_EXPLICIT_BZERO" = 0; then
51606       GL_M4_GNULIB_EXPLICIT_BZERO=$gl_module_indicator_condition
51607     else
51608       GL_M4_GNULIB_EXPLICIT_BZERO="($GL_M4_GNULIB_EXPLICIT_BZERO || $gl_module_indicator_condition)"
51609     fi
51610   fi
51611
51612
51613
51614
51615
51616 printf "%s\n" "#define GNULIB_TEST_EXPLICIT_BZERO 1" >>confdefs.h
51617
51618
51619
51620
51621
51622
51623
51624     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
51625       REPLACE_FDOPEN=1
51626     fi
51627
51628   if test $REPLACE_FDOPEN = 0; then
51629         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
51630 printf %s "checking whether fdopen sets errno... " >&6; }
51631 if test ${gl_cv_func_fdopen_works+y}
51632 then :
51633   printf %s "(cached) " >&6
51634 else $as_nop
51635
51636         if test "$cross_compiling" = yes
51637 then :
51638   case "$host_os" in
51639              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
51640              *)      gl_cv_func_fdopen_works="guessing yes" ;;
51641            esac
51642
51643 else $as_nop
51644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51645 /* end confdefs.h.  */
51646
51647 #include <stdio.h>
51648 #include <errno.h>
51649
51650
51651 $gl_mda_defines
51652
51653 int
51654 main (void)
51655 {
51656   FILE *fp;
51657   errno = 0;
51658   fp = fdopen (-1, "r");
51659   if (fp == NULL && errno == 0)
51660     return 1;
51661   return 0;
51662 }
51663 _ACEOF
51664 if ac_fn_c_try_run "$LINENO"
51665 then :
51666   gl_cv_func_fdopen_works=yes
51667 else $as_nop
51668   gl_cv_func_fdopen_works=no
51669 fi
51670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51671   conftest.$ac_objext conftest.beam conftest.$ac_ext
51672 fi
51673
51674
51675 fi
51676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
51677 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
51678     case "$gl_cv_func_fdopen_works" in
51679       *no) REPLACE_FDOPEN=1 ;;
51680     esac
51681   fi
51682
51683   if test $REPLACE_FDOPEN = 1; then
51684
51685
51686
51687
51688
51689
51690
51691
51692   M4tests_LIBOBJS="$M4tests_LIBOBJS fdopen.$ac_objext"
51693
51694
51695   fi
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705     if test "$GL_M4_GNULIB_FDOPEN" != 1; then
51706         if test "$GL_M4_GNULIB_FDOPEN" = 0; then
51707       GL_M4_GNULIB_FDOPEN=$gl_module_indicator_condition
51708     else
51709       GL_M4_GNULIB_FDOPEN="($GL_M4_GNULIB_FDOPEN || $gl_module_indicator_condition)"
51710     fi
51711   fi
51712
51713
51714
51715
51716
51717 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727   case "$host_os" in
51728     mingw* | pw* | os2*)
51729       REPLACE_FREOPEN=1
51730       ;;
51731     *)
51732       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
51733 printf %s "checking whether freopen works on closed fds... " >&6; }
51734 if test ${gl_cv_func_freopen_works_on_closed+y}
51735 then :
51736   printf %s "(cached) " >&6
51737 else $as_nop
51738   if test "$cross_compiling" = yes
51739 then :
51740   case $host_os in
51741               *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
51742               *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
51743             esac
51744 else $as_nop
51745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51746 /* end confdefs.h.  */
51747 #include <stdio.h>
51748                 #include <unistd.h>
51749
51750
51751 $gl_mda_defines
51752
51753 int
51754 main (void)
51755 {
51756 close (0);
51757                 return !(freopen ("/dev/null", "r", stdin)
51758                          && getchar () == EOF
51759                          && !ferror (stdin) && feof (stdin));
51760   ;
51761   return 0;
51762 }
51763 _ACEOF
51764 if ac_fn_c_try_run "$LINENO"
51765 then :
51766   gl_cv_func_freopen_works_on_closed=yes
51767 else $as_nop
51768   gl_cv_func_freopen_works_on_closed=no
51769 fi
51770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51771   conftest.$ac_objext conftest.beam conftest.$ac_ext
51772 fi
51773
51774 fi
51775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
51776 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
51777       case $gl_cv_func_freopen_works_on_closed in
51778         *no) REPLACE_FREOPEN=1;;
51779       esac
51780   esac
51781
51782   if test $REPLACE_FREOPEN = 1; then
51783
51784
51785
51786
51787
51788
51789
51790
51791   M4tests_LIBOBJS="$M4tests_LIBOBJS freopen.$ac_objext"
51792
51793     :
51794   fi
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804     if test "$GL_M4_GNULIB_FREOPEN" != 1; then
51805         if test "$GL_M4_GNULIB_FREOPEN" = 0; then
51806       GL_M4_GNULIB_FREOPEN=$gl_module_indicator_condition
51807     else
51808       GL_M4_GNULIB_FREOPEN="($GL_M4_GNULIB_FREOPEN || $gl_module_indicator_condition)"
51809     fi
51810   fi
51811
51812
51813
51814
51815
51816 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827   if test $ac_cv_func_ftruncate = yes; then
51828
51829
51830       case "$host_os" in
51831         mingw*)
51832                                                                       REPLACE_FTRUNCATE=1
51833           ;;
51834       esac
51835
51836   else
51837     HAVE_FTRUNCATE=0
51838   fi
51839
51840   if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
51841
51842
51843
51844
51845
51846
51847
51848
51849   M4tests_LIBOBJS="$M4tests_LIBOBJS ftruncate.$ac_objext"
51850
51851
51852   ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
51853 if test "x$ac_cv_func__chsize" = xyes
51854 then :
51855   printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
51856
51857 fi
51858
51859
51860   fi
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870     if test "$GL_M4_GNULIB_FTRUNCATE" != 1; then
51871         if test "$GL_M4_GNULIB_FTRUNCATE" = 0; then
51872       GL_M4_GNULIB_FTRUNCATE=$gl_module_indicator_condition
51873     else
51874       GL_M4_GNULIB_FTRUNCATE="($GL_M4_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
51875     fi
51876   fi
51877
51878
51879
51880
51881
51882 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893   gl_gettimeofday_timezone=void
51894   if test $ac_cv_func_gettimeofday != yes; then
51895     HAVE_GETTIMEOFDAY=0
51896   else
51897     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
51898 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
51899 if test ${gl_cv_func_gettimeofday_posix_signature+y}
51900 then :
51901   printf %s "(cached) " >&6
51902 else $as_nop
51903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51904 /* end confdefs.h.  */
51905 #include <sys/time.h>
51906               struct timeval c;
51907               int gettimeofday (struct timeval *restrict, void *restrict);
51908
51909 int
51910 main (void)
51911 {
51912 /* glibc uses struct timezone * rather than the POSIX void *
51913                  if _GNU_SOURCE is defined.  However, since the only portable
51914                  use of gettimeofday uses NULL as the second parameter, and
51915                  since the glibc definition is actually more typesafe, it is
51916                  not worth wrapping this to get a compliant signature.  */
51917               int (*f) (struct timeval *restrict, void *restrict)
51918                 = gettimeofday;
51919               int x = f (&c, 0);
51920               return !(x | c.tv_sec | c.tv_usec);
51921
51922   ;
51923   return 0;
51924 }
51925 _ACEOF
51926 if ac_fn_c_try_compile "$LINENO"
51927 then :
51928   gl_cv_func_gettimeofday_posix_signature=yes
51929 else $as_nop
51930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51931 /* end confdefs.h.  */
51932 #include <sys/time.h>
51933 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
51934
51935 int
51936 main (void)
51937 {
51938
51939   ;
51940   return 0;
51941 }
51942 _ACEOF
51943 if ac_fn_c_try_compile "$LINENO"
51944 then :
51945   gl_cv_func_gettimeofday_posix_signature=almost
51946 else $as_nop
51947   gl_cv_func_gettimeofday_posix_signature=no
51948 fi
51949 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
51950 fi
51951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
51952 fi
51953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
51954 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
51955     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
51956       gl_gettimeofday_timezone='struct timezone'
51957     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
51958       REPLACE_GETTIMEOFDAY=1
51959     fi
51960         if test $REPLACE_STRUCT_TIMEVAL = 1; then
51961       REPLACE_GETTIMEOFDAY=1
51962     fi
51963             case "$host_os" in
51964       mingw*) REPLACE_GETTIMEOFDAY=1 ;;
51965     esac
51966   fi
51967
51968 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
51969
51970
51971   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
51972
51973
51974
51975
51976
51977
51978
51979
51980   M4tests_LIBOBJS="$M4tests_LIBOBJS gettimeofday.$ac_objext"
51981
51982     :
51983   fi
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993     if test "$GL_M4_GNULIB_GETTIMEOFDAY" != 1; then
51994         if test "$GL_M4_GNULIB_GETTIMEOFDAY" = 0; then
51995       GL_M4_GNULIB_GETTIMEOFDAY=$gl_module_indicator_condition
51996     else
51997       GL_M4_GNULIB_GETTIMEOFDAY="($GL_M4_GNULIB_GETTIMEOFDAY || $gl_module_indicator_condition)"
51998     fi
51999   fi
52000
52001
52002
52003
52004
52005 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018                 HAVE_INET_PTON=1
52019   INET_PTON_LIB=
52020
52021
52022
52023
52024   if test $ac_cv_header_sys_socket_h != yes; then
52025                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
52026 if test "x$ac_cv_header_winsock2_h" = xyes
52027 then :
52028   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
52029
52030 fi
52031
52032   fi
52033   if test "$ac_cv_header_winsock2_h" = yes; then
52034     HAVE_WINSOCK2_H=1
52035     UNISTD_H_HAVE_WINSOCK2_H=1
52036     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
52037   else
52038     HAVE_WINSOCK2_H=0
52039   fi
52040
52041
52042   if test $HAVE_WINSOCK2_H = 1; then
52043                     REPLACE_INET_PTON=1
52044     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
52045 " "$ac_c_undeclared_builtin_options" "CFLAGS"
52046 if test "x$ac_cv_have_decl_inet_pton" = xyes
52047 then :
52048   ac_have_decl=1
52049 else $as_nop
52050   ac_have_decl=0
52051 fi
52052 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
52053
52054     if test $ac_cv_have_decl_inet_pton = yes; then
52055       INET_PTON_LIB="-lws2_32"
52056     else
52057       HAVE_DECL_INET_PTON=0
52058     fi
52059   else
52060     gl_save_LIBS=$LIBS
52061     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
52062 printf %s "checking for library containing inet_pton... " >&6; }
52063 if test ${ac_cv_search_inet_pton+y}
52064 then :
52065   printf %s "(cached) " >&6
52066 else $as_nop
52067   ac_func_search_save_LIBS=$LIBS
52068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52069 /* end confdefs.h.  */
52070
52071 /* Override any GCC internal prototype to avoid an error.
52072    Use char because int might match the return type of a GCC
52073    builtin and then its argument prototype would still apply.  */
52074 char inet_pton ();
52075 int
52076 main (void)
52077 {
52078 return inet_pton ();
52079   ;
52080   return 0;
52081 }
52082 _ACEOF
52083 for ac_lib in '' nsl resolv network
52084 do
52085   if test -z "$ac_lib"; then
52086     ac_res="none required"
52087   else
52088     ac_res=-l$ac_lib
52089     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
52090   fi
52091   if ac_fn_c_try_link "$LINENO"
52092 then :
52093   ac_cv_search_inet_pton=$ac_res
52094 fi
52095 rm -f core conftest.err conftest.$ac_objext conftest.beam \
52096     conftest$ac_exeext
52097   if test ${ac_cv_search_inet_pton+y}
52098 then :
52099   break
52100 fi
52101 done
52102 if test ${ac_cv_search_inet_pton+y}
52103 then :
52104
52105 else $as_nop
52106   ac_cv_search_inet_pton=no
52107 fi
52108 rm conftest.$ac_ext
52109 LIBS=$ac_func_search_save_LIBS
52110 fi
52111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
52112 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
52113 ac_res=$ac_cv_search_inet_pton
52114 if test "$ac_res" != no
52115 then :
52116   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
52117
52118 else $as_nop
52119   ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
52120 if test "x$ac_cv_func_inet_pton" = xyes
52121 then :
52122   printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
52123
52124 fi
52125
52126        if test $ac_cv_func_inet_pton = no; then
52127          HAVE_INET_PTON=0
52128        fi
52129
52130 fi
52131
52132     LIBS=$gl_save_LIBS
52133
52134     if test "$ac_cv_search_inet_pton" != "no" \
52135        && test "$ac_cv_search_inet_pton" != "none required"; then
52136       INET_PTON_LIB="$ac_cv_search_inet_pton"
52137     fi
52138
52139
52140     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
52141         #if HAVE_NETDB_H
52142         # include <netdb.h>
52143         #endif
52144
52145 " "$ac_c_undeclared_builtin_options" "CFLAGS"
52146 if test "x$ac_cv_have_decl_inet_pton" = xyes
52147 then :
52148   ac_have_decl=1
52149 else $as_nop
52150   ac_have_decl=0
52151 fi
52152 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
52153
52154     if test $ac_cv_have_decl_inet_pton = no; then
52155       HAVE_DECL_INET_PTON=0
52156     fi
52157   fi
52158
52159
52160   if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
52161
52162
52163
52164
52165
52166
52167
52168
52169   M4tests_LIBOBJS="$M4tests_LIBOBJS inet_pton.$ac_objext"
52170
52171
52172
52173
52174   fi
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184     if test "$GL_M4_GNULIB_INET_PTON" != 1; then
52185         if test "$GL_M4_GNULIB_INET_PTON" = 0; then
52186       GL_M4_GNULIB_INET_PTON=$gl_module_indicator_condition
52187     else
52188       GL_M4_GNULIB_INET_PTON="($GL_M4_GNULIB_INET_PTON || $gl_module_indicator_condition)"
52189     fi
52190   fi
52191
52192
52193
52194
52195    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
52196 printf %s "checking whether byte ordering is bigendian... " >&6; }
52197 if test ${ac_cv_c_bigendian+y}
52198 then :
52199   printf %s "(cached) " >&6
52200 else $as_nop
52201   ac_cv_c_bigendian=unknown
52202     # See if we're dealing with a universal compiler.
52203     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52204 /* end confdefs.h.  */
52205 #ifndef __APPLE_CC__
52206                not a universal capable compiler
52207              #endif
52208              typedef int dummy;
52209
52210 _ACEOF
52211 if ac_fn_c_try_compile "$LINENO"
52212 then :
52213
52214         # Check for potential -arch flags.  It is not universal unless
52215         # there are at least two -arch flags with different values.
52216         ac_arch=
52217         ac_prev=
52218         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
52219          if test -n "$ac_prev"; then
52220            case $ac_word in
52221              i?86 | x86_64 | ppc | ppc64)
52222                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
52223                  ac_arch=$ac_word
52224                else
52225                  ac_cv_c_bigendian=universal
52226                  break
52227                fi
52228                ;;
52229            esac
52230            ac_prev=
52231          elif test "x$ac_word" = "x-arch"; then
52232            ac_prev=arch
52233          fi
52234        done
52235 fi
52236 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52237     if test $ac_cv_c_bigendian = unknown; then
52238       # See if sys/param.h defines the BYTE_ORDER macro.
52239       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52240 /* end confdefs.h.  */
52241 #include <sys/types.h>
52242              #include <sys/param.h>
52243
52244 int
52245 main (void)
52246 {
52247 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
52248                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
52249                      && LITTLE_ENDIAN)
52250               bogus endian macros
52251              #endif
52252
52253   ;
52254   return 0;
52255 }
52256 _ACEOF
52257 if ac_fn_c_try_compile "$LINENO"
52258 then :
52259   # It does; now see whether it defined to BIG_ENDIAN or not.
52260          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52261 /* end confdefs.h.  */
52262 #include <sys/types.h>
52263                 #include <sys/param.h>
52264
52265 int
52266 main (void)
52267 {
52268 #if BYTE_ORDER != BIG_ENDIAN
52269                  not big endian
52270                 #endif
52271
52272   ;
52273   return 0;
52274 }
52275 _ACEOF
52276 if ac_fn_c_try_compile "$LINENO"
52277 then :
52278   ac_cv_c_bigendian=yes
52279 else $as_nop
52280   ac_cv_c_bigendian=no
52281 fi
52282 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52283 fi
52284 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52285     fi
52286     if test $ac_cv_c_bigendian = unknown; then
52287       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
52288       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52289 /* end confdefs.h.  */
52290 #include <limits.h>
52291
52292 int
52293 main (void)
52294 {
52295 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
52296               bogus endian macros
52297              #endif
52298
52299   ;
52300   return 0;
52301 }
52302 _ACEOF
52303 if ac_fn_c_try_compile "$LINENO"
52304 then :
52305   # It does; now see whether it defined to _BIG_ENDIAN or not.
52306          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52307 /* end confdefs.h.  */
52308 #include <limits.h>
52309
52310 int
52311 main (void)
52312 {
52313 #ifndef _BIG_ENDIAN
52314                  not big endian
52315                 #endif
52316
52317   ;
52318   return 0;
52319 }
52320 _ACEOF
52321 if ac_fn_c_try_compile "$LINENO"
52322 then :
52323   ac_cv_c_bigendian=yes
52324 else $as_nop
52325   ac_cv_c_bigendian=no
52326 fi
52327 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52328 fi
52329 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52330     fi
52331     if test $ac_cv_c_bigendian = unknown; then
52332       # Compile a test program.
52333       if test "$cross_compiling" = yes
52334 then :
52335   # Try to guess by grepping values from an object file.
52336          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52337 /* end confdefs.h.  */
52338 unsigned short int ascii_mm[] =
52339                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
52340                 unsigned short int ascii_ii[] =
52341                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
52342                 int use_ascii (int i) {
52343                   return ascii_mm[i] + ascii_ii[i];
52344                 }
52345                 unsigned short int ebcdic_ii[] =
52346                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
52347                 unsigned short int ebcdic_mm[] =
52348                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
52349                 int use_ebcdic (int i) {
52350                   return ebcdic_mm[i] + ebcdic_ii[i];
52351                 }
52352                 extern int foo;
52353
52354 int
52355 main (void)
52356 {
52357 return use_ascii (foo) == use_ebcdic (foo);
52358   ;
52359   return 0;
52360 }
52361 _ACEOF
52362 if ac_fn_c_try_compile "$LINENO"
52363 then :
52364   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
52365               ac_cv_c_bigendian=yes
52366             fi
52367             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
52368               if test "$ac_cv_c_bigendian" = unknown; then
52369                 ac_cv_c_bigendian=no
52370               else
52371                 # finding both strings is unlikely to happen, but who knows?
52372                 ac_cv_c_bigendian=unknown
52373               fi
52374             fi
52375 fi
52376 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52377 else $as_nop
52378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52379 /* end confdefs.h.  */
52380 $ac_includes_default
52381 int
52382 main (void)
52383 {
52384
52385              /* Are we little or big endian?  From Harbison&Steele.  */
52386              union
52387              {
52388                long int l;
52389                char c[sizeof (long int)];
52390              } u;
52391              u.l = 1;
52392              return u.c[sizeof (long int) - 1] == 1;
52393
52394   ;
52395   return 0;
52396 }
52397 _ACEOF
52398 if ac_fn_c_try_run "$LINENO"
52399 then :
52400   ac_cv_c_bigendian=no
52401 else $as_nop
52402   ac_cv_c_bigendian=yes
52403 fi
52404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52405   conftest.$ac_objext conftest.beam conftest.$ac_ext
52406 fi
52407
52408     fi
52409 fi
52410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
52411 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
52412  case $ac_cv_c_bigendian in #(
52413    yes)
52414      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
52415 ;; #(
52416    no)
52417       ;; #(
52418    universal)
52419
52420 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
52421
52422      ;; #(
52423    *)
52424      as_fn_error $? "unknown endianness
52425  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
52426  esac
52427
52428
52429
52430
52431   :
52432
52433   :
52434   :
52435   :
52436   :
52437
52438
52439
52440
52441
52442   HAVE_IOCTL=1
52443   if test "$ac_cv_header_winsock2_h" = yes; then
52444                 HAVE_IOCTL=0
52445   else
52446     ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
52447 if test "x$ac_cv_func_ioctl" = xyes
52448 then :
52449   printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
52450
52451 fi
52452
52453                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
52454 printf %s "checking for ioctl with POSIX signature... " >&6; }
52455 if test ${gl_cv_func_ioctl_posix_signature+y}
52456 then :
52457   printf %s "(cached) " >&6
52458 else $as_nop
52459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52460 /* end confdefs.h.  */
52461 #include <sys/ioctl.h>
52462               /* On some platforms, ioctl() is declared in <unistd.h>.  */
52463               #include <unistd.h>
52464
52465 int
52466 main (void)
52467 {
52468 extern
52469               #ifdef __cplusplus
52470               "C"
52471               #endif
52472               int ioctl (int, int, ...);
52473
52474   ;
52475   return 0;
52476 }
52477
52478 _ACEOF
52479 if ac_fn_c_try_compile "$LINENO"
52480 then :
52481   gl_cv_func_ioctl_posix_signature=yes
52482 else $as_nop
52483   gl_cv_func_ioctl_posix_signature=no
52484 fi
52485 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52486
52487 fi
52488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
52489 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
52490     if test $gl_cv_func_ioctl_posix_signature != yes; then
52491       REPLACE_IOCTL=1
52492     fi
52493   fi
52494
52495   if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
52496
52497
52498
52499
52500
52501
52502
52503
52504   M4tests_LIBOBJS="$M4tests_LIBOBJS ioctl.$ac_objext"
52505
52506   fi
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516     if test "$GL_M4_GNULIB_IOCTL" != 1; then
52517         if test "$GL_M4_GNULIB_IOCTL" = 0; then
52518       GL_M4_GNULIB_IOCTL=$gl_module_indicator_condition
52519     else
52520       GL_M4_GNULIB_IOCTL="($GL_M4_GNULIB_IOCTL || $gl_module_indicator_condition)"
52521     fi
52522   fi
52523
52524
52525
52526
52527
52528 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
52529
52530
52531
52532
52533
52534
52535
52536
52537   if test $ac_cv_func_isblank = no; then
52538     HAVE_ISBLANK=0
52539   fi
52540
52541   if test $HAVE_ISBLANK = 0; then
52542
52543
52544
52545
52546
52547
52548
52549
52550   M4tests_LIBOBJS="$M4tests_LIBOBJS isblank.$ac_objext"
52551
52552   fi
52553
52554
52555 printf "%s\n" "#define GNULIB_ISBLANK $gl_module_indicator_condition" >>confdefs.h
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567     if test "$GL_M4_GNULIB_ISBLANK" != 1; then
52568         if test "$GL_M4_GNULIB_ISBLANK" = 0; then
52569       GL_M4_GNULIB_ISBLANK=$gl_module_indicator_condition
52570     else
52571       GL_M4_GNULIB_ISBLANK="($GL_M4_GNULIB_ISBLANK || $gl_module_indicator_condition)"
52572     fi
52573   fi
52574
52575
52576
52577
52578
52579   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
52580 printf %s "checking where to find the exponent in a 'double'... " >&6; }
52581 if test ${gl_cv_cc_double_expbit0+y}
52582 then :
52583   printf %s "(cached) " >&6
52584 else $as_nop
52585
52586       if test "$cross_compiling" = yes
52587 then :
52588
52589                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52590 /* end confdefs.h.  */
52591
52592 #if defined arm || defined __arm || defined __arm__
52593   mixed_endianness
52594 #endif
52595
52596 _ACEOF
52597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52598   $EGREP "mixed_endianness" >/dev/null 2>&1
52599 then :
52600   gl_cv_cc_double_expbit0="unknown"
52601 else $as_nop
52602
52603                                                          :
52604 if test ${ac_cv_c_bigendian+y}
52605 then :
52606   printf %s "(cached) " >&6
52607 else $as_nop
52608   ac_cv_c_bigendian=unknown
52609     # See if we're dealing with a universal compiler.
52610     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52611 /* end confdefs.h.  */
52612 #ifndef __APPLE_CC__
52613                not a universal capable compiler
52614              #endif
52615              typedef int dummy;
52616
52617 _ACEOF
52618 if ac_fn_c_try_compile "$LINENO"
52619 then :
52620
52621         # Check for potential -arch flags.  It is not universal unless
52622         # there are at least two -arch flags with different values.
52623         ac_arch=
52624         ac_prev=
52625         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
52626          if test -n "$ac_prev"; then
52627            case $ac_word in
52628              i?86 | x86_64 | ppc | ppc64)
52629                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
52630                  ac_arch=$ac_word
52631                else
52632                  ac_cv_c_bigendian=universal
52633                  break
52634                fi
52635                ;;
52636            esac
52637            ac_prev=
52638          elif test "x$ac_word" = "x-arch"; then
52639            ac_prev=arch
52640          fi
52641        done
52642 fi
52643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52644     if test $ac_cv_c_bigendian = unknown; then
52645       # See if sys/param.h defines the BYTE_ORDER macro.
52646       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52647 /* end confdefs.h.  */
52648 #include <sys/types.h>
52649              #include <sys/param.h>
52650
52651 int
52652 main (void)
52653 {
52654 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
52655                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
52656                      && LITTLE_ENDIAN)
52657               bogus endian macros
52658              #endif
52659
52660   ;
52661   return 0;
52662 }
52663 _ACEOF
52664 if ac_fn_c_try_compile "$LINENO"
52665 then :
52666   # It does; now see whether it defined to BIG_ENDIAN or not.
52667          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52668 /* end confdefs.h.  */
52669 #include <sys/types.h>
52670                 #include <sys/param.h>
52671
52672 int
52673 main (void)
52674 {
52675 #if BYTE_ORDER != BIG_ENDIAN
52676                  not big endian
52677                 #endif
52678
52679   ;
52680   return 0;
52681 }
52682 _ACEOF
52683 if ac_fn_c_try_compile "$LINENO"
52684 then :
52685   ac_cv_c_bigendian=yes
52686 else $as_nop
52687   ac_cv_c_bigendian=no
52688 fi
52689 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52690 fi
52691 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52692     fi
52693     if test $ac_cv_c_bigendian = unknown; then
52694       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
52695       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52696 /* end confdefs.h.  */
52697 #include <limits.h>
52698
52699 int
52700 main (void)
52701 {
52702 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
52703               bogus endian macros
52704              #endif
52705
52706   ;
52707   return 0;
52708 }
52709 _ACEOF
52710 if ac_fn_c_try_compile "$LINENO"
52711 then :
52712   # It does; now see whether it defined to _BIG_ENDIAN or not.
52713          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52714 /* end confdefs.h.  */
52715 #include <limits.h>
52716
52717 int
52718 main (void)
52719 {
52720 #ifndef _BIG_ENDIAN
52721                  not big endian
52722                 #endif
52723
52724   ;
52725   return 0;
52726 }
52727 _ACEOF
52728 if ac_fn_c_try_compile "$LINENO"
52729 then :
52730   ac_cv_c_bigendian=yes
52731 else $as_nop
52732   ac_cv_c_bigendian=no
52733 fi
52734 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52735 fi
52736 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52737     fi
52738     if test $ac_cv_c_bigendian = unknown; then
52739       # Compile a test program.
52740       if test "$cross_compiling" = yes
52741 then :
52742   # Try to guess by grepping values from an object file.
52743          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52744 /* end confdefs.h.  */
52745 unsigned short int ascii_mm[] =
52746                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
52747                 unsigned short int ascii_ii[] =
52748                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
52749                 int use_ascii (int i) {
52750                   return ascii_mm[i] + ascii_ii[i];
52751                 }
52752                 unsigned short int ebcdic_ii[] =
52753                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
52754                 unsigned short int ebcdic_mm[] =
52755                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
52756                 int use_ebcdic (int i) {
52757                   return ebcdic_mm[i] + ebcdic_ii[i];
52758                 }
52759                 extern int foo;
52760
52761 int
52762 main (void)
52763 {
52764 return use_ascii (foo) == use_ebcdic (foo);
52765   ;
52766   return 0;
52767 }
52768 _ACEOF
52769 if ac_fn_c_try_compile "$LINENO"
52770 then :
52771   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
52772               ac_cv_c_bigendian=yes
52773             fi
52774             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
52775               if test "$ac_cv_c_bigendian" = unknown; then
52776                 ac_cv_c_bigendian=no
52777               else
52778                 # finding both strings is unlikely to happen, but who knows?
52779                 ac_cv_c_bigendian=unknown
52780               fi
52781             fi
52782 fi
52783 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52784 else $as_nop
52785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52786 /* end confdefs.h.  */
52787 $ac_includes_default
52788 int
52789 main (void)
52790 {
52791
52792              /* Are we little or big endian?  From Harbison&Steele.  */
52793              union
52794              {
52795                long int l;
52796                char c[sizeof (long int)];
52797              } u;
52798              u.l = 1;
52799              return u.c[sizeof (long int) - 1] == 1;
52800
52801   ;
52802   return 0;
52803 }
52804 _ACEOF
52805 if ac_fn_c_try_run "$LINENO"
52806 then :
52807   ac_cv_c_bigendian=no
52808 else $as_nop
52809   ac_cv_c_bigendian=yes
52810 fi
52811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52812   conftest.$ac_objext conftest.beam conftest.$ac_ext
52813 fi
52814
52815     fi
52816 fi
52817 :
52818  case $ac_cv_c_bigendian in #(
52819    yes)
52820      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
52821    no)
52822      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
52823    universal)
52824
52825 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
52826
52827      ;; #(
52828    *)
52829      gl_cv_cc_double_expbit0="unknown" ;;
52830  esac
52831
52832
52833 fi
52834 rm -rf conftest*
52835
52836
52837 else $as_nop
52838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52839 /* end confdefs.h.  */
52840
52841 #include <float.h>
52842 #include <stddef.h>
52843 #include <stdio.h>
52844 #include <string.h>
52845 #define NWORDS \
52846   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
52847 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
52848 static unsigned int ored_words[NWORDS];
52849 static unsigned int anded_words[NWORDS];
52850 static void add_to_ored_words (double x)
52851 {
52852   memory_double m;
52853   size_t i;
52854   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
52855   memset (&m, 0, sizeof (memory_double));
52856   m.value = x;
52857   for (i = 0; i < NWORDS; i++)
52858     {
52859       ored_words[i] |= m.word[i];
52860       anded_words[i] &= m.word[i];
52861     }
52862 }
52863 int main ()
52864 {
52865   size_t j;
52866   FILE *fp = fopen ("conftest.out", "w");
52867   if (fp == NULL)
52868     return 1;
52869   for (j = 0; j < NWORDS; j++)
52870     anded_words[j] = ~ (unsigned int) 0;
52871   add_to_ored_words (0.25);
52872   add_to_ored_words (0.5);
52873   add_to_ored_words (1.0);
52874   add_to_ored_words (2.0);
52875   add_to_ored_words (4.0);
52876   /* Remove bits that are common (e.g. if representation of the first mantissa
52877      bit is explicit).  */
52878   for (j = 0; j < NWORDS; j++)
52879     ored_words[j] &= ~anded_words[j];
52880   /* Now find the nonzero word.  */
52881   for (j = 0; j < NWORDS; j++)
52882     if (ored_words[j] != 0)
52883       break;
52884   if (j < NWORDS)
52885     {
52886       size_t i;
52887       for (i = j + 1; i < NWORDS; i++)
52888         if (ored_words[i] != 0)
52889           {
52890             fprintf (fp, "unknown");
52891             return (fclose (fp) != 0);
52892           }
52893       for (i = 0; ; i++)
52894         if ((ored_words[j] >> i) & 1)
52895           {
52896             fprintf (fp, "word %d bit %d", (int) j, (int) i);
52897             return (fclose (fp) != 0);
52898           }
52899     }
52900   fprintf (fp, "unknown");
52901   return (fclose (fp) != 0);
52902 }
52903
52904 _ACEOF
52905 if ac_fn_c_try_run "$LINENO"
52906 then :
52907   gl_cv_cc_double_expbit0=`cat conftest.out`
52908 else $as_nop
52909   gl_cv_cc_double_expbit0="unknown"
52910 fi
52911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52912   conftest.$ac_objext conftest.beam conftest.$ac_ext
52913 fi
52914
52915       rm -f conftest.out
52916
52917 fi
52918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
52919 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
52920   case "$gl_cv_cc_double_expbit0" in
52921     word*bit*)
52922       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
52923       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
52924
52925 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
52926
52927
52928 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
52929
52930       ;;
52931   esac
52932
52933
52934   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
52935 printf %s "checking where to find the exponent in a 'float'... " >&6; }
52936 if test ${gl_cv_cc_float_expbit0+y}
52937 then :
52938   printf %s "(cached) " >&6
52939 else $as_nop
52940
52941       if test "$cross_compiling" = yes
52942 then :
52943   gl_cv_cc_float_expbit0="word 0 bit 23"
52944 else $as_nop
52945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52946 /* end confdefs.h.  */
52947
52948 #include <float.h>
52949 #include <stddef.h>
52950 #include <stdio.h>
52951 #include <string.h>
52952 #define NWORDS \
52953   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
52954 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
52955 static unsigned int ored_words[NWORDS];
52956 static unsigned int anded_words[NWORDS];
52957 static void add_to_ored_words (float x)
52958 {
52959   memory_float m;
52960   size_t i;
52961   /* Clear it first, in case
52962      sizeof (float) < sizeof (memory_float).  */
52963   memset (&m, 0, sizeof (memory_float));
52964   m.value = x;
52965   for (i = 0; i < NWORDS; i++)
52966     {
52967       ored_words[i] |= m.word[i];
52968       anded_words[i] &= m.word[i];
52969     }
52970 }
52971 int main ()
52972 {
52973   size_t j;
52974   FILE *fp = fopen ("conftest.out", "w");
52975   if (fp == NULL)
52976     return 1;
52977   for (j = 0; j < NWORDS; j++)
52978     anded_words[j] = ~ (unsigned int) 0;
52979   add_to_ored_words (0.25f);
52980   add_to_ored_words (0.5f);
52981   add_to_ored_words (1.0f);
52982   add_to_ored_words (2.0f);
52983   add_to_ored_words (4.0f);
52984   /* Remove bits that are common (e.g. if representation of the first mantissa
52985      bit is explicit).  */
52986   for (j = 0; j < NWORDS; j++)
52987     ored_words[j] &= ~anded_words[j];
52988   /* Now find the nonzero word.  */
52989   for (j = 0; j < NWORDS; j++)
52990     if (ored_words[j] != 0)
52991       break;
52992   if (j < NWORDS)
52993     {
52994       size_t i;
52995       for (i = j + 1; i < NWORDS; i++)
52996         if (ored_words[i] != 0)
52997           {
52998             fprintf (fp, "unknown");
52999             return (fclose (fp) != 0);
53000           }
53001       for (i = 0; ; i++)
53002         if ((ored_words[j] >> i) & 1)
53003           {
53004             fprintf (fp, "word %d bit %d", (int) j, (int) i);
53005             return (fclose (fp) != 0);
53006           }
53007     }
53008   fprintf (fp, "unknown");
53009   return (fclose (fp) != 0);
53010 }
53011
53012 _ACEOF
53013 if ac_fn_c_try_run "$LINENO"
53014 then :
53015   gl_cv_cc_float_expbit0=`cat conftest.out`
53016 else $as_nop
53017   gl_cv_cc_float_expbit0="unknown"
53018 fi
53019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53020   conftest.$ac_objext conftest.beam conftest.$ac_ext
53021 fi
53022
53023       rm -f conftest.out
53024
53025 fi
53026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
53027 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
53028   case "$gl_cv_cc_float_expbit0" in
53029     word*bit*)
53030       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
53031       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
53032
53033 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
53034
53035
53036 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
53037
53038       ;;
53039   esac
53040
53041
53042
53043      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
53044 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
53045 if test ${gl_cv_cc_long_double_expbit0+y}
53046 then :
53047   printf %s "(cached) " >&6
53048 else $as_nop
53049
53050       if test "$cross_compiling" = yes
53051 then :
53052
53053                               gl_cv_cc_long_double_expbit0="unknown"
53054           case "$host_os" in
53055             mingw*) # On native Windows (little-endian), we know the result
53056                     # in two cases: mingw, MSVC.
53057               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53058 /* end confdefs.h.  */
53059
53060 #ifdef __MINGW32__
53061  Known
53062 #endif
53063
53064 _ACEOF
53065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53066   $EGREP "Known" >/dev/null 2>&1
53067 then :
53068   gl_cv_cc_long_double_expbit0="word 2 bit 0"
53069 fi
53070 rm -rf conftest*
53071
53072               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53073 /* end confdefs.h.  */
53074
53075 #ifdef _MSC_VER
53076  Known
53077 #endif
53078
53079 _ACEOF
53080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53081   $EGREP "Known" >/dev/null 2>&1
53082 then :
53083   gl_cv_cc_long_double_expbit0="word 1 bit 20"
53084 fi
53085 rm -rf conftest*
53086
53087               ;;
53088           esac
53089
53090 else $as_nop
53091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53092 /* end confdefs.h.  */
53093
53094 #include <float.h>
53095 #include <stddef.h>
53096 #include <stdio.h>
53097 #include <string.h>
53098 #define NWORDS \
53099   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
53100 typedef union { long double value; unsigned int word[NWORDS]; }
53101         memory_long_double;
53102 static unsigned int ored_words[NWORDS];
53103 static unsigned int anded_words[NWORDS];
53104 static void add_to_ored_words (long double *x)
53105 {
53106   memory_long_double m;
53107   size_t i;
53108   /* Clear it first, in case
53109      sizeof (long double) < sizeof (memory_long_double).  */
53110   memset (&m, 0, sizeof (memory_long_double));
53111   m.value = *x;
53112   for (i = 0; i < NWORDS; i++)
53113     {
53114       ored_words[i] |= m.word[i];
53115       anded_words[i] &= m.word[i];
53116     }
53117 }
53118 int main ()
53119 {
53120   static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
53121   size_t j;
53122   FILE *fp = fopen ("conftest.out", "w");
53123   if (fp == NULL)
53124     return 1;
53125   for (j = 0; j < NWORDS; j++)
53126     anded_words[j] = ~ (unsigned int) 0;
53127   for (j = 0; j < 5; j++)
53128     add_to_ored_words (&samples[j]);
53129   /* Remove bits that are common (e.g. if representation of the first mantissa
53130      bit is explicit).  */
53131   for (j = 0; j < NWORDS; j++)
53132     ored_words[j] &= ~anded_words[j];
53133   /* Now find the nonzero word.  */
53134   for (j = 0; j < NWORDS; j++)
53135     if (ored_words[j] != 0)
53136       break;
53137   if (j < NWORDS)
53138     {
53139       size_t i;
53140       for (i = j + 1; i < NWORDS; i++)
53141         if (ored_words[i] != 0)
53142           {
53143             fprintf (fp, "unknown");
53144             return (fclose (fp) != 0);
53145           }
53146       for (i = 0; ; i++)
53147         if ((ored_words[j] >> i) & 1)
53148           {
53149             fprintf (fp, "word %d bit %d", (int) j, (int) i);
53150             return (fclose (fp) != 0);
53151           }
53152     }
53153   fprintf (fp, "unknown");
53154   return (fclose (fp) != 0);
53155 }
53156
53157 _ACEOF
53158 if ac_fn_c_try_run "$LINENO"
53159 then :
53160   gl_cv_cc_long_double_expbit0=`cat conftest.out`
53161 else $as_nop
53162   gl_cv_cc_long_double_expbit0="unknown"
53163 fi
53164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53165   conftest.$ac_objext conftest.beam conftest.$ac_ext
53166 fi
53167
53168       rm -f conftest.out
53169
53170 fi
53171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
53172 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
53173   case "$gl_cv_cc_long_double_expbit0" in
53174     word*bit*)
53175       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
53176       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
53177
53178 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
53179
53180
53181 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
53182
53183       ;;
53184   esac
53185
53186
53187
53188
53189
53190   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
53191 printf %s "checking for a traditional french locale... " >&6; }
53192 if test ${gt_cv_locale_fr+y}
53193 then :
53194   printf %s "(cached) " >&6
53195 else $as_nop
53196
53197     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53198 /* end confdefs.h.  */
53199
53200 #include <locale.h>
53201 #include <time.h>
53202 #if HAVE_LANGINFO_CODESET
53203 # include <langinfo.h>
53204 #endif
53205 #include <stdlib.h>
53206 #include <string.h>
53207 struct tm t;
53208 char buf[16];
53209 int main () {
53210   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53211      imitates locale dependent behaviour by looking at the environment
53212      variables, and all locales use the UTF-8 encoding.  */
53213 #if defined __BEOS__ || defined __HAIKU__
53214   return 1;
53215 #else
53216   /* Check whether the given locale name is recognized by the system.  */
53217 # if defined _WIN32 && !defined __CYGWIN__
53218   /* On native Windows, setlocale(category, "") looks at the system settings,
53219      not at the environment variables.  Also, when an encoding suffix such
53220      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53221      category of the locale to "C".  */
53222   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53223       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53224     return 1;
53225 # else
53226   if (setlocale (LC_ALL, "") == NULL) return 1;
53227 # endif
53228   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53229      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53230      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53231      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53232      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53233      some unit tests fail.
53234      On MirBSD 10, when an unsupported locale is specified, setlocale()
53235      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
53236 # if HAVE_LANGINFO_CODESET
53237   {
53238     const char *cs = nl_langinfo (CODESET);
53239     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53240         || strcmp (cs, "UTF-8") == 0)
53241       return 1;
53242   }
53243 # endif
53244 # ifdef __CYGWIN__
53245   /* On Cygwin, avoid locale names without encoding suffix, because the
53246      locale_charset() function relies on the encoding suffix.  Note that
53247      LC_ALL is set on the command line.  */
53248   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53249 # endif
53250   /* Check whether in the abbreviation of the second month, the second
53251      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
53252      one byte long. This excludes the UTF-8 encoding.  */
53253   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53254   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
53255 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53256   /* Check whether the decimal separator is a comma.
53257      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53258      are nl_langinfo(RADIXCHAR) are both ".".  */
53259   if (localeconv () ->decimal_point[0] != ',') return 1;
53260 # endif
53261   return 0;
53262 #endif
53263 }
53264
53265 _ACEOF
53266     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53267   (eval $ac_link) 2>&5
53268   ac_status=$?
53269   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53270   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53271       case "$host_os" in
53272         # Handle native Windows specially, because there setlocale() interprets
53273         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53274         # "fr" or "fra" as "French" or "French_France.1252",
53275         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53276         # "ja" as "Japanese" or "Japanese_Japan.932",
53277         # and similar.
53278         mingw*)
53279           # Test for the native Windows locale name.
53280           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53281             gt_cv_locale_fr=French_France.1252
53282           else
53283             # None found.
53284             gt_cv_locale_fr=none
53285           fi
53286           ;;
53287         *)
53288           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53289           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53290           # configure script would override the LC_ALL setting. Likewise for
53291           # LC_CTYPE, which is also set at the beginning of the configure script.
53292           # Test for the usual locale name.
53293           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53294             gt_cv_locale_fr=fr_FR
53295           else
53296             # Test for the locale name with explicit encoding suffix.
53297             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53298               gt_cv_locale_fr=fr_FR.ISO-8859-1
53299             else
53300               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
53301               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53302                 gt_cv_locale_fr=fr_FR.ISO8859-1
53303               else
53304                 # Test for the HP-UX locale name.
53305                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53306                   gt_cv_locale_fr=fr_FR.iso88591
53307                 else
53308                   # Test for the Solaris 7 locale name.
53309                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53310                     gt_cv_locale_fr=fr
53311                   else
53312                     # None found.
53313                     gt_cv_locale_fr=none
53314                   fi
53315                 fi
53316               fi
53317             fi
53318           fi
53319           ;;
53320       esac
53321     fi
53322     rm -fr conftest*
53323
53324 fi
53325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
53326 printf "%s\n" "$gt_cv_locale_fr" >&6; }
53327   LOCALE_FR=$gt_cv_locale_fr
53328
53329
53330
53331
53332   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
53333 printf %s "checking for a french Unicode locale... " >&6; }
53334 if test ${gt_cv_locale_fr_utf8+y}
53335 then :
53336   printf %s "(cached) " >&6
53337 else $as_nop
53338
53339     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53340 /* end confdefs.h.  */
53341
53342 #include <locale.h>
53343 #include <time.h>
53344 #if HAVE_LANGINFO_CODESET
53345 # include <langinfo.h>
53346 #endif
53347 #include <stdlib.h>
53348 #include <string.h>
53349 struct tm t;
53350 char buf[16];
53351 int main () {
53352   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53353      imitates locale dependent behaviour by looking at the environment
53354      variables, and all locales use the UTF-8 encoding.  */
53355 #if !(defined __BEOS__ || defined __HAIKU__)
53356   /* Check whether the given locale name is recognized by the system.  */
53357 # if defined _WIN32 && !defined __CYGWIN__
53358   /* On native Windows, setlocale(category, "") looks at the system settings,
53359      not at the environment variables.  Also, when an encoding suffix such
53360      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53361      category of the locale to "C".  */
53362   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53363       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53364     return 1;
53365 # else
53366   if (setlocale (LC_ALL, "") == NULL) return 1;
53367 # endif
53368   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53369      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53370      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53371      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53372      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53373      some unit tests fail.  */
53374 # if HAVE_LANGINFO_CODESET
53375   {
53376     const char *cs = nl_langinfo (CODESET);
53377     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
53378       return 1;
53379   }
53380 # endif
53381 # ifdef __CYGWIN__
53382   /* On Cygwin, avoid locale names without encoding suffix, because the
53383      locale_charset() function relies on the encoding suffix.  Note that
53384      LC_ALL is set on the command line.  */
53385   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53386 # endif
53387   /* Check whether in the abbreviation of the second month, the second
53388      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
53389      two bytes long, with UTF-8 encoding.  */
53390   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53391   if (strftime (buf, sizeof (buf), "%b", &t) < 4
53392       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
53393     return 1;
53394 #endif
53395 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53396   /* Check whether the decimal separator is a comma.
53397      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53398      are nl_langinfo(RADIXCHAR) are both ".".  */
53399   if (localeconv () ->decimal_point[0] != ',') return 1;
53400 #endif
53401   return 0;
53402 }
53403
53404 _ACEOF
53405     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53406   (eval $ac_link) 2>&5
53407   ac_status=$?
53408   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53409   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53410       case "$host_os" in
53411         # Handle native Windows specially, because there setlocale() interprets
53412         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53413         # "fr" or "fra" as "French" or "French_France.1252",
53414         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53415         # "ja" as "Japanese" or "Japanese_Japan.932",
53416         # and similar.
53417         mingw*)
53418           # Test for the hypothetical native Windows locale name.
53419           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53420             gt_cv_locale_fr_utf8=French_France.65001
53421           else
53422             # None found.
53423             gt_cv_locale_fr_utf8=none
53424           fi
53425           ;;
53426         *)
53427           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53428           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53429           # configure script would override the LC_ALL setting. Likewise for
53430           # LC_CTYPE, which is also set at the beginning of the configure script.
53431           # Test for the usual locale name.
53432           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53433             gt_cv_locale_fr_utf8=fr_FR
53434           else
53435             # Test for the locale name with explicit encoding suffix.
53436             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53437               gt_cv_locale_fr_utf8=fr_FR.UTF-8
53438             else
53439               # Test for the Solaris 7 locale name.
53440               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53441                 gt_cv_locale_fr_utf8=fr.UTF-8
53442               else
53443                 # None found.
53444                 gt_cv_locale_fr_utf8=none
53445               fi
53446             fi
53447           fi
53448           ;;
53449       esac
53450     fi
53451     rm -fr conftest*
53452
53453 fi
53454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
53455 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
53456   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
53457
53458
53459
53460
53461
53462   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
53463 printf %s "checking for a traditional japanese locale... " >&6; }
53464 if test ${gt_cv_locale_ja+y}
53465 then :
53466   printf %s "(cached) " >&6
53467 else $as_nop
53468
53469     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53470 /* end confdefs.h.  */
53471
53472 #include <locale.h>
53473 #include <time.h>
53474 #if HAVE_LANGINFO_CODESET
53475 # include <langinfo.h>
53476 #endif
53477 #include <stdlib.h>
53478 #include <string.h>
53479 struct tm t;
53480 char buf[16];
53481 int main ()
53482 {
53483   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53484      imitates locale dependent behaviour by looking at the environment
53485      variables, and all locales use the UTF-8 encoding.  */
53486 #if defined __BEOS__ || defined __HAIKU__
53487   return 1;
53488 #else
53489   /* Check whether the given locale name is recognized by the system.  */
53490 # if defined _WIN32 && !defined __CYGWIN__
53491   /* On native Windows, setlocale(category, "") looks at the system settings,
53492      not at the environment variables.  Also, when an encoding suffix such
53493      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53494      category of the locale to "C".  */
53495   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53496       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53497     return 1;
53498 # else
53499   if (setlocale (LC_ALL, "") == NULL) return 1;
53500 # endif
53501   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53502      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53503      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53504      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53505      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53506      some unit tests fail.
53507      On MirBSD 10, when an unsupported locale is specified, setlocale()
53508      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
53509 # if HAVE_LANGINFO_CODESET
53510   {
53511     const char *cs = nl_langinfo (CODESET);
53512     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53513         || strcmp (cs, "UTF-8") == 0)
53514       return 1;
53515   }
53516 # endif
53517 # ifdef __CYGWIN__
53518   /* On Cygwin, avoid locale names without encoding suffix, because the
53519      locale_charset() function relies on the encoding suffix.  Note that
53520      LC_ALL is set on the command line.  */
53521   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53522 # endif
53523   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
53524      on Cygwin 1.5.x.  */
53525   if (MB_CUR_MAX == 1)
53526     return 1;
53527   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
53528      This excludes the UTF-8 encoding (except on MirBSD).  */
53529   {
53530     const char *p;
53531     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53532     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
53533     for (p = buf; *p != '\0'; p++)
53534       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
53535         return 1;
53536   }
53537   return 0;
53538 #endif
53539 }
53540
53541 _ACEOF
53542     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53543   (eval $ac_link) 2>&5
53544   ac_status=$?
53545   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53546   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53547       case "$host_os" in
53548         # Handle native Windows specially, because there setlocale() interprets
53549         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53550         # "fr" or "fra" as "French" or "French_France.1252",
53551         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53552         # "ja" as "Japanese" or "Japanese_Japan.932",
53553         # and similar.
53554         mingw*)
53555           # Note that on native Windows, the Japanese locale is
53556           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
53557           # cannot use it here.
53558           gt_cv_locale_ja=none
53559           ;;
53560         *)
53561           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53562           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53563           # configure script would override the LC_ALL setting. Likewise for
53564           # LC_CTYPE, which is also set at the beginning of the configure script.
53565           # Test for the AIX locale name.
53566           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53567             gt_cv_locale_ja=ja_JP
53568           else
53569             # Test for the locale name with explicit encoding suffix.
53570             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53571               gt_cv_locale_ja=ja_JP.EUC-JP
53572             else
53573               # Test for the HP-UX, OSF/1, NetBSD locale name.
53574               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53575                 gt_cv_locale_ja=ja_JP.eucJP
53576               else
53577                 # Test for the IRIX, FreeBSD locale name.
53578                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53579                   gt_cv_locale_ja=ja_JP.EUC
53580                 else
53581                   # Test for the Solaris 7 locale name.
53582                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53583                     gt_cv_locale_ja=ja
53584                   else
53585                     # Special test for NetBSD 1.6.
53586                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
53587                       gt_cv_locale_ja=ja_JP.eucJP
53588                     else
53589                       # None found.
53590                       gt_cv_locale_ja=none
53591                     fi
53592                   fi
53593                 fi
53594               fi
53595             fi
53596           fi
53597           ;;
53598       esac
53599     fi
53600     rm -fr conftest*
53601
53602 fi
53603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
53604 printf "%s\n" "$gt_cv_locale_ja" >&6; }
53605   LOCALE_JA=$gt_cv_locale_ja
53606
53607
53608
53609
53610
53611   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
53612 printf %s "checking for a transitional chinese locale... " >&6; }
53613 if test ${gt_cv_locale_zh_CN+y}
53614 then :
53615   printf %s "(cached) " >&6
53616 else $as_nop
53617
53618     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53619 /* end confdefs.h.  */
53620
53621 #include <locale.h>
53622 #include <stdlib.h>
53623 #include <time.h>
53624 #if HAVE_LANGINFO_CODESET
53625 # include <langinfo.h>
53626 #endif
53627 #include <stdlib.h>
53628 #include <string.h>
53629 struct tm t;
53630 char buf[16];
53631 int main ()
53632 {
53633   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53634      imitates locale dependent behaviour by looking at the environment
53635      variables, and all locales use the UTF-8 encoding.  */
53636 #if defined __BEOS__ || defined __HAIKU__
53637   return 1;
53638 #else
53639   /* Check whether the given locale name is recognized by the system.  */
53640 # if defined _WIN32 && !defined __CYGWIN__
53641   /* On native Windows, setlocale(category, "") looks at the system settings,
53642      not at the environment variables.  Also, when an encoding suffix such
53643      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53644      category of the locale to "C".  */
53645   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53646       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53647     return 1;
53648 # else
53649   if (setlocale (LC_ALL, "") == NULL) return 1;
53650 # endif
53651   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53652      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53653      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53654      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53655      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53656      some unit tests fail.
53657      On MirBSD 10, when an unsupported locale is specified, setlocale()
53658      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
53659 # if HAVE_LANGINFO_CODESET
53660   {
53661     const char *cs = nl_langinfo (CODESET);
53662     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53663         || strcmp (cs, "UTF-8") == 0)
53664       return 1;
53665   }
53666 # endif
53667 # ifdef __CYGWIN__
53668   /* On Cygwin, avoid locale names without encoding suffix, because the
53669      locale_charset() function relies on the encoding suffix.  Note that
53670      LC_ALL is set on the command line.  */
53671   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53672 # endif
53673   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
53674      This excludes the UTF-8 encoding (except on MirBSD).  */
53675   {
53676     const char *p;
53677     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53678     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
53679     for (p = buf; *p != '\0'; p++)
53680       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
53681         return 1;
53682   }
53683   /* Check whether a typical GB18030 multibyte sequence is recognized as a
53684      single wide character.  This excludes the GB2312 and GBK encodings.  */
53685   if (mblen ("\203\062\332\066", 5) != 4)
53686     return 1;
53687   return 0;
53688 #endif
53689 }
53690
53691 _ACEOF
53692     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53693   (eval $ac_link) 2>&5
53694   ac_status=$?
53695   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53696   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53697       case "$host_os" in
53698         # Handle native Windows specially, because there setlocale() interprets
53699         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53700         # "fr" or "fra" as "French" or "French_France.1252",
53701         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53702         # "ja" as "Japanese" or "Japanese_Japan.932",
53703         # and similar.
53704         mingw*)
53705           # Test for the hypothetical native Windows locale name.
53706           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53707             gt_cv_locale_zh_CN=Chinese_China.54936
53708           else
53709             # None found.
53710             gt_cv_locale_zh_CN=none
53711           fi
53712           ;;
53713         solaris2.8)
53714           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
53715           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
53716           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
53717           gt_cv_locale_zh_CN=none
53718           ;;
53719         *)
53720           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53721           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53722           # configure script would override the LC_ALL setting. Likewise for
53723           # LC_CTYPE, which is also set at the beginning of the configure script.
53724           # Test for the locale name without encoding suffix.
53725           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53726             gt_cv_locale_zh_CN=zh_CN
53727           else
53728             # Test for the locale name with explicit encoding suffix.
53729             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53730               gt_cv_locale_zh_CN=zh_CN.GB18030
53731             else
53732               # None found.
53733               gt_cv_locale_zh_CN=none
53734             fi
53735           fi
53736           ;;
53737       esac
53738     else
53739       # If there was a link error, due to mblen(), the system is so old that
53740       # it certainly doesn't have a chinese locale.
53741       gt_cv_locale_zh_CN=none
53742     fi
53743     rm -fr conftest*
53744
53745 fi
53746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
53747 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
53748   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
53749
53750
53751
53752
53753
53754   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
53755 printf %s "checking for a traditional french locale... " >&6; }
53756 if test ${gt_cv_locale_fr+y}
53757 then :
53758   printf %s "(cached) " >&6
53759 else $as_nop
53760
53761     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53762 /* end confdefs.h.  */
53763
53764 #include <locale.h>
53765 #include <time.h>
53766 #if HAVE_LANGINFO_CODESET
53767 # include <langinfo.h>
53768 #endif
53769 #include <stdlib.h>
53770 #include <string.h>
53771 struct tm t;
53772 char buf[16];
53773 int main () {
53774   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53775      imitates locale dependent behaviour by looking at the environment
53776      variables, and all locales use the UTF-8 encoding.  */
53777 #if defined __BEOS__ || defined __HAIKU__
53778   return 1;
53779 #else
53780   /* Check whether the given locale name is recognized by the system.  */
53781 # if defined _WIN32 && !defined __CYGWIN__
53782   /* On native Windows, setlocale(category, "") looks at the system settings,
53783      not at the environment variables.  Also, when an encoding suffix such
53784      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53785      category of the locale to "C".  */
53786   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53787       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53788     return 1;
53789 # else
53790   if (setlocale (LC_ALL, "") == NULL) return 1;
53791 # endif
53792   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53793      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53794      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53795      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53796      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53797      some unit tests fail.
53798      On MirBSD 10, when an unsupported locale is specified, setlocale()
53799      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
53800 # if HAVE_LANGINFO_CODESET
53801   {
53802     const char *cs = nl_langinfo (CODESET);
53803     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53804         || strcmp (cs, "UTF-8") == 0)
53805       return 1;
53806   }
53807 # endif
53808 # ifdef __CYGWIN__
53809   /* On Cygwin, avoid locale names without encoding suffix, because the
53810      locale_charset() function relies on the encoding suffix.  Note that
53811      LC_ALL is set on the command line.  */
53812   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53813 # endif
53814   /* Check whether in the abbreviation of the second month, the second
53815      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
53816      one byte long. This excludes the UTF-8 encoding.  */
53817   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53818   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
53819 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53820   /* Check whether the decimal separator is a comma.
53821      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53822      are nl_langinfo(RADIXCHAR) are both ".".  */
53823   if (localeconv () ->decimal_point[0] != ',') return 1;
53824 # endif
53825   return 0;
53826 #endif
53827 }
53828
53829 _ACEOF
53830     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53831   (eval $ac_link) 2>&5
53832   ac_status=$?
53833   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53834   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53835       case "$host_os" in
53836         # Handle native Windows specially, because there setlocale() interprets
53837         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53838         # "fr" or "fra" as "French" or "French_France.1252",
53839         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53840         # "ja" as "Japanese" or "Japanese_Japan.932",
53841         # and similar.
53842         mingw*)
53843           # Test for the native Windows locale name.
53844           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53845             gt_cv_locale_fr=French_France.1252
53846           else
53847             # None found.
53848             gt_cv_locale_fr=none
53849           fi
53850           ;;
53851         *)
53852           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53853           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53854           # configure script would override the LC_ALL setting. Likewise for
53855           # LC_CTYPE, which is also set at the beginning of the configure script.
53856           # Test for the usual locale name.
53857           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53858             gt_cv_locale_fr=fr_FR
53859           else
53860             # Test for the locale name with explicit encoding suffix.
53861             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53862               gt_cv_locale_fr=fr_FR.ISO-8859-1
53863             else
53864               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
53865               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53866                 gt_cv_locale_fr=fr_FR.ISO8859-1
53867               else
53868                 # Test for the HP-UX locale name.
53869                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53870                   gt_cv_locale_fr=fr_FR.iso88591
53871                 else
53872                   # Test for the Solaris 7 locale name.
53873                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53874                     gt_cv_locale_fr=fr
53875                   else
53876                     # None found.
53877                     gt_cv_locale_fr=none
53878                   fi
53879                 fi
53880               fi
53881             fi
53882           fi
53883           ;;
53884       esac
53885     fi
53886     rm -fr conftest*
53887
53888 fi
53889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
53890 printf "%s\n" "$gt_cv_locale_fr" >&6; }
53891   LOCALE_FR=$gt_cv_locale_fr
53892
53893
53894
53895
53896   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
53897 printf %s "checking for a french Unicode locale... " >&6; }
53898 if test ${gt_cv_locale_fr_utf8+y}
53899 then :
53900   printf %s "(cached) " >&6
53901 else $as_nop
53902
53903     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53904 /* end confdefs.h.  */
53905
53906 #include <locale.h>
53907 #include <time.h>
53908 #if HAVE_LANGINFO_CODESET
53909 # include <langinfo.h>
53910 #endif
53911 #include <stdlib.h>
53912 #include <string.h>
53913 struct tm t;
53914 char buf[16];
53915 int main () {
53916   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
53917      imitates locale dependent behaviour by looking at the environment
53918      variables, and all locales use the UTF-8 encoding.  */
53919 #if !(defined __BEOS__ || defined __HAIKU__)
53920   /* Check whether the given locale name is recognized by the system.  */
53921 # if defined _WIN32 && !defined __CYGWIN__
53922   /* On native Windows, setlocale(category, "") looks at the system settings,
53923      not at the environment variables.  Also, when an encoding suffix such
53924      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53925      category of the locale to "C".  */
53926   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53927       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53928     return 1;
53929 # else
53930   if (setlocale (LC_ALL, "") == NULL) return 1;
53931 # endif
53932   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53933      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53934      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53935      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53936      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53937      some unit tests fail.  */
53938 # if HAVE_LANGINFO_CODESET
53939   {
53940     const char *cs = nl_langinfo (CODESET);
53941     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
53942       return 1;
53943   }
53944 # endif
53945 # ifdef __CYGWIN__
53946   /* On Cygwin, avoid locale names without encoding suffix, because the
53947      locale_charset() function relies on the encoding suffix.  Note that
53948      LC_ALL is set on the command line.  */
53949   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53950 # endif
53951   /* Check whether in the abbreviation of the second month, the second
53952      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
53953      two bytes long, with UTF-8 encoding.  */
53954   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53955   if (strftime (buf, sizeof (buf), "%b", &t) < 4
53956       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
53957     return 1;
53958 #endif
53959 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
53960   /* Check whether the decimal separator is a comma.
53961      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53962      are nl_langinfo(RADIXCHAR) are both ".".  */
53963   if (localeconv () ->decimal_point[0] != ',') return 1;
53964 #endif
53965   return 0;
53966 }
53967
53968 _ACEOF
53969     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53970   (eval $ac_link) 2>&5
53971   ac_status=$?
53972   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53973   test $ac_status = 0; } && test -s conftest$ac_exeext; then
53974       case "$host_os" in
53975         # Handle native Windows specially, because there setlocale() interprets
53976         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53977         # "fr" or "fra" as "French" or "French_France.1252",
53978         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53979         # "ja" as "Japanese" or "Japanese_Japan.932",
53980         # and similar.
53981         mingw*)
53982           # Test for the hypothetical native Windows locale name.
53983           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53984             gt_cv_locale_fr_utf8=French_France.65001
53985           else
53986             # None found.
53987             gt_cv_locale_fr_utf8=none
53988           fi
53989           ;;
53990         *)
53991           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53992           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53993           # configure script would override the LC_ALL setting. Likewise for
53994           # LC_CTYPE, which is also set at the beginning of the configure script.
53995           # Test for the usual locale name.
53996           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53997             gt_cv_locale_fr_utf8=fr_FR
53998           else
53999             # Test for the locale name with explicit encoding suffix.
54000             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54001               gt_cv_locale_fr_utf8=fr_FR.UTF-8
54002             else
54003               # Test for the Solaris 7 locale name.
54004               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54005                 gt_cv_locale_fr_utf8=fr.UTF-8
54006               else
54007                 # None found.
54008                 gt_cv_locale_fr_utf8=none
54009               fi
54010             fi
54011           fi
54012           ;;
54013       esac
54014     fi
54015     rm -fr conftest*
54016
54017 fi
54018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
54019 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
54020   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
54021
54022
54023
54024
54025
54026   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
54027 printf %s "checking for a traditional japanese locale... " >&6; }
54028 if test ${gt_cv_locale_ja+y}
54029 then :
54030   printf %s "(cached) " >&6
54031 else $as_nop
54032
54033     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54034 /* end confdefs.h.  */
54035
54036 #include <locale.h>
54037 #include <time.h>
54038 #if HAVE_LANGINFO_CODESET
54039 # include <langinfo.h>
54040 #endif
54041 #include <stdlib.h>
54042 #include <string.h>
54043 struct tm t;
54044 char buf[16];
54045 int main ()
54046 {
54047   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54048      imitates locale dependent behaviour by looking at the environment
54049      variables, and all locales use the UTF-8 encoding.  */
54050 #if defined __BEOS__ || defined __HAIKU__
54051   return 1;
54052 #else
54053   /* Check whether the given locale name is recognized by the system.  */
54054 # if defined _WIN32 && !defined __CYGWIN__
54055   /* On native Windows, setlocale(category, "") looks at the system settings,
54056      not at the environment variables.  Also, when an encoding suffix such
54057      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54058      category of the locale to "C".  */
54059   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54060       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54061     return 1;
54062 # else
54063   if (setlocale (LC_ALL, "") == NULL) return 1;
54064 # endif
54065   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54066      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54067      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54068      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54069      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54070      some unit tests fail.
54071      On MirBSD 10, when an unsupported locale is specified, setlocale()
54072      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
54073 # if HAVE_LANGINFO_CODESET
54074   {
54075     const char *cs = nl_langinfo (CODESET);
54076     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54077         || strcmp (cs, "UTF-8") == 0)
54078       return 1;
54079   }
54080 # endif
54081 # ifdef __CYGWIN__
54082   /* On Cygwin, avoid locale names without encoding suffix, because the
54083      locale_charset() function relies on the encoding suffix.  Note that
54084      LC_ALL is set on the command line.  */
54085   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54086 # endif
54087   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
54088      on Cygwin 1.5.x.  */
54089   if (MB_CUR_MAX == 1)
54090     return 1;
54091   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54092      This excludes the UTF-8 encoding (except on MirBSD).  */
54093   {
54094     const char *p;
54095     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54096     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54097     for (p = buf; *p != '\0'; p++)
54098       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54099         return 1;
54100   }
54101   return 0;
54102 #endif
54103 }
54104
54105 _ACEOF
54106     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54107   (eval $ac_link) 2>&5
54108   ac_status=$?
54109   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54110   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54111       case "$host_os" in
54112         # Handle native Windows specially, because there setlocale() interprets
54113         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54114         # "fr" or "fra" as "French" or "French_France.1252",
54115         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54116         # "ja" as "Japanese" or "Japanese_Japan.932",
54117         # and similar.
54118         mingw*)
54119           # Note that on native Windows, the Japanese locale is
54120           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
54121           # cannot use it here.
54122           gt_cv_locale_ja=none
54123           ;;
54124         *)
54125           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54126           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54127           # configure script would override the LC_ALL setting. Likewise for
54128           # LC_CTYPE, which is also set at the beginning of the configure script.
54129           # Test for the AIX locale name.
54130           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54131             gt_cv_locale_ja=ja_JP
54132           else
54133             # Test for the locale name with explicit encoding suffix.
54134             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54135               gt_cv_locale_ja=ja_JP.EUC-JP
54136             else
54137               # Test for the HP-UX, OSF/1, NetBSD locale name.
54138               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54139                 gt_cv_locale_ja=ja_JP.eucJP
54140               else
54141                 # Test for the IRIX, FreeBSD locale name.
54142                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54143                   gt_cv_locale_ja=ja_JP.EUC
54144                 else
54145                   # Test for the Solaris 7 locale name.
54146                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54147                     gt_cv_locale_ja=ja
54148                   else
54149                     # Special test for NetBSD 1.6.
54150                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
54151                       gt_cv_locale_ja=ja_JP.eucJP
54152                     else
54153                       # None found.
54154                       gt_cv_locale_ja=none
54155                     fi
54156                   fi
54157                 fi
54158               fi
54159             fi
54160           fi
54161           ;;
54162       esac
54163     fi
54164     rm -fr conftest*
54165
54166 fi
54167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
54168 printf "%s\n" "$gt_cv_locale_ja" >&6; }
54169   LOCALE_JA=$gt_cv_locale_ja
54170
54171
54172
54173
54174
54175   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
54176 printf %s "checking for a transitional chinese locale... " >&6; }
54177 if test ${gt_cv_locale_zh_CN+y}
54178 then :
54179   printf %s "(cached) " >&6
54180 else $as_nop
54181
54182     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54183 /* end confdefs.h.  */
54184
54185 #include <locale.h>
54186 #include <stdlib.h>
54187 #include <time.h>
54188 #if HAVE_LANGINFO_CODESET
54189 # include <langinfo.h>
54190 #endif
54191 #include <stdlib.h>
54192 #include <string.h>
54193 struct tm t;
54194 char buf[16];
54195 int main ()
54196 {
54197   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54198      imitates locale dependent behaviour by looking at the environment
54199      variables, and all locales use the UTF-8 encoding.  */
54200 #if defined __BEOS__ || defined __HAIKU__
54201   return 1;
54202 #else
54203   /* Check whether the given locale name is recognized by the system.  */
54204 # if defined _WIN32 && !defined __CYGWIN__
54205   /* On native Windows, setlocale(category, "") looks at the system settings,
54206      not at the environment variables.  Also, when an encoding suffix such
54207      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54208      category of the locale to "C".  */
54209   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54210       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54211     return 1;
54212 # else
54213   if (setlocale (LC_ALL, "") == NULL) return 1;
54214 # endif
54215   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54216      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54217      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54218      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54219      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54220      some unit tests fail.
54221      On MirBSD 10, when an unsupported locale is specified, setlocale()
54222      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
54223 # if HAVE_LANGINFO_CODESET
54224   {
54225     const char *cs = nl_langinfo (CODESET);
54226     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54227         || strcmp (cs, "UTF-8") == 0)
54228       return 1;
54229   }
54230 # endif
54231 # ifdef __CYGWIN__
54232   /* On Cygwin, avoid locale names without encoding suffix, because the
54233      locale_charset() function relies on the encoding suffix.  Note that
54234      LC_ALL is set on the command line.  */
54235   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54236 # endif
54237   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54238      This excludes the UTF-8 encoding (except on MirBSD).  */
54239   {
54240     const char *p;
54241     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54242     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54243     for (p = buf; *p != '\0'; p++)
54244       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54245         return 1;
54246   }
54247   /* Check whether a typical GB18030 multibyte sequence is recognized as a
54248      single wide character.  This excludes the GB2312 and GBK encodings.  */
54249   if (mblen ("\203\062\332\066", 5) != 4)
54250     return 1;
54251   return 0;
54252 #endif
54253 }
54254
54255 _ACEOF
54256     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54257   (eval $ac_link) 2>&5
54258   ac_status=$?
54259   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54260   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54261       case "$host_os" in
54262         # Handle native Windows specially, because there setlocale() interprets
54263         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54264         # "fr" or "fra" as "French" or "French_France.1252",
54265         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54266         # "ja" as "Japanese" or "Japanese_Japan.932",
54267         # and similar.
54268         mingw*)
54269           # Test for the hypothetical native Windows locale name.
54270           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54271             gt_cv_locale_zh_CN=Chinese_China.54936
54272           else
54273             # None found.
54274             gt_cv_locale_zh_CN=none
54275           fi
54276           ;;
54277         solaris2.8)
54278           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
54279           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
54280           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
54281           gt_cv_locale_zh_CN=none
54282           ;;
54283         *)
54284           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54285           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54286           # configure script would override the LC_ALL setting. Likewise for
54287           # LC_CTYPE, which is also set at the beginning of the configure script.
54288           # Test for the locale name without encoding suffix.
54289           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54290             gt_cv_locale_zh_CN=zh_CN
54291           else
54292             # Test for the locale name with explicit encoding suffix.
54293             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54294               gt_cv_locale_zh_CN=zh_CN.GB18030
54295             else
54296               # None found.
54297               gt_cv_locale_zh_CN=none
54298             fi
54299           fi
54300           ;;
54301       esac
54302     else
54303       # If there was a link error, due to mblen(), the system is so old that
54304       # it certainly doesn't have a chinese locale.
54305       gt_cv_locale_zh_CN=none
54306     fi
54307     rm -fr conftest*
54308
54309 fi
54310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
54311 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
54312   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
54313
54314
54315
54316
54317
54318   if test $ac_cv_func_link = no; then
54319     HAVE_LINK=0
54320   else
54321     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
54322 printf %s "checking whether link obeys POSIX... " >&6; }
54323 if test ${gl_cv_func_link_works+y}
54324 then :
54325   printf %s "(cached) " >&6
54326 else $as_nop
54327   touch conftest.a
54328        # Assume that if we have lstat, we can also check symlinks.
54329        if test $ac_cv_func_lstat = yes; then
54330          ln -s conftest.a conftest.lnk
54331        fi
54332        if test "$cross_compiling" = yes
54333 then :
54334   case "$host_os" in
54335                              # Guess yes on Linux systems.
54336             linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
54337                              # Guess yes on glibc systems.
54338             *-gnu* | gnu*)   gl_cv_func_link_works="guessing yes" ;;
54339                              # If we don't know, obey --enable-cross-guesses.
54340             *)               gl_cv_func_link_works="$gl_cross_guess_normal" ;;
54341           esac
54342
54343 else $as_nop
54344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54345 /* end confdefs.h.  */
54346 #include <unistd.h>
54347              #include <stdio.h>
54348
54349 int
54350 main (void)
54351 {
54352 int result = 0;
54353              if (!link ("conftest.a", "conftest.b/"))
54354                result |= 1;
54355 #if HAVE_LSTAT
54356              if (!link ("conftest.lnk/", "conftest.b"))
54357                result |= 2;
54358              if (rename ("conftest.a", "conftest.b"))
54359                result |= 4;
54360              if (!link ("conftest.b", "conftest.lnk"))
54361                result |= 8;
54362 #endif
54363              return result;
54364
54365   ;
54366   return 0;
54367 }
54368 _ACEOF
54369 if ac_fn_c_try_run "$LINENO"
54370 then :
54371   gl_cv_func_link_works=yes
54372 else $as_nop
54373   gl_cv_func_link_works=no
54374 fi
54375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54376   conftest.$ac_objext conftest.beam conftest.$ac_ext
54377 fi
54378
54379        rm -f conftest.a conftest.b conftest.lnk
54380 fi
54381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
54382 printf "%s\n" "$gl_cv_func_link_works" >&6; }
54383     case "$gl_cv_func_link_works" in
54384       *yes) ;;
54385       *)
54386         REPLACE_LINK=1
54387         ;;
54388     esac
54389   fi
54390
54391   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
54392
54393
54394
54395
54396
54397
54398
54399
54400   M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
54401
54402   fi
54403
54404
54405
54406
54407
54408
54409
54410
54411
54412     if test "$GL_M4_GNULIB_LINK" != 1; then
54413         if test "$GL_M4_GNULIB_LINK" = 0; then
54414       GL_M4_GNULIB_LINK=$gl_module_indicator_condition
54415     else
54416       GL_M4_GNULIB_LINK="($GL_M4_GNULIB_LINK || $gl_module_indicator_condition)"
54417     fi
54418   fi
54419
54420
54421
54422
54423
54424 printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
54425
54426
54427
54428
54429   if test "$ac_cv_header_winsock2_h" = yes; then
54430
54431
54432
54433
54434
54435
54436
54437
54438   M4tests_LIBOBJS="$M4tests_LIBOBJS listen.$ac_objext"
54439
54440   fi
54441
54442
54443
54444
54445
54446
54447
54448
54449
54450     if test "$GL_M4_GNULIB_LISTEN" != 1; then
54451         if test "$GL_M4_GNULIB_LISTEN" = 0; then
54452       GL_M4_GNULIB_LISTEN=$gl_module_indicator_condition
54453     else
54454       GL_M4_GNULIB_LISTEN="($GL_M4_GNULIB_LISTEN || $gl_module_indicator_condition)"
54455     fi
54456   fi
54457
54458
54459
54460
54461
54462 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
54463
54464
54465
54466
54467
54468
54469
54470
54471   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
54472 printf %s "checking for a traditional french locale... " >&6; }
54473 if test ${gt_cv_locale_fr+y}
54474 then :
54475   printf %s "(cached) " >&6
54476 else $as_nop
54477
54478     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54479 /* end confdefs.h.  */
54480
54481 #include <locale.h>
54482 #include <time.h>
54483 #if HAVE_LANGINFO_CODESET
54484 # include <langinfo.h>
54485 #endif
54486 #include <stdlib.h>
54487 #include <string.h>
54488 struct tm t;
54489 char buf[16];
54490 int main () {
54491   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54492      imitates locale dependent behaviour by looking at the environment
54493      variables, and all locales use the UTF-8 encoding.  */
54494 #if defined __BEOS__ || defined __HAIKU__
54495   return 1;
54496 #else
54497   /* Check whether the given locale name is recognized by the system.  */
54498 # if defined _WIN32 && !defined __CYGWIN__
54499   /* On native Windows, setlocale(category, "") looks at the system settings,
54500      not at the environment variables.  Also, when an encoding suffix such
54501      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54502      category of the locale to "C".  */
54503   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54504       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54505     return 1;
54506 # else
54507   if (setlocale (LC_ALL, "") == NULL) return 1;
54508 # endif
54509   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54510      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54511      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54512      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54513      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54514      some unit tests fail.
54515      On MirBSD 10, when an unsupported locale is specified, setlocale()
54516      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
54517 # if HAVE_LANGINFO_CODESET
54518   {
54519     const char *cs = nl_langinfo (CODESET);
54520     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54521         || strcmp (cs, "UTF-8") == 0)
54522       return 1;
54523   }
54524 # endif
54525 # ifdef __CYGWIN__
54526   /* On Cygwin, avoid locale names without encoding suffix, because the
54527      locale_charset() function relies on the encoding suffix.  Note that
54528      LC_ALL is set on the command line.  */
54529   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54530 # endif
54531   /* Check whether in the abbreviation of the second month, the second
54532      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
54533      one byte long. This excludes the UTF-8 encoding.  */
54534   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54535   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
54536 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
54537   /* Check whether the decimal separator is a comma.
54538      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54539      are nl_langinfo(RADIXCHAR) are both ".".  */
54540   if (localeconv () ->decimal_point[0] != ',') return 1;
54541 # endif
54542   return 0;
54543 #endif
54544 }
54545
54546 _ACEOF
54547     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54548   (eval $ac_link) 2>&5
54549   ac_status=$?
54550   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54551   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54552       case "$host_os" in
54553         # Handle native Windows specially, because there setlocale() interprets
54554         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54555         # "fr" or "fra" as "French" or "French_France.1252",
54556         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54557         # "ja" as "Japanese" or "Japanese_Japan.932",
54558         # and similar.
54559         mingw*)
54560           # Test for the native Windows locale name.
54561           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54562             gt_cv_locale_fr=French_France.1252
54563           else
54564             # None found.
54565             gt_cv_locale_fr=none
54566           fi
54567           ;;
54568         *)
54569           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54570           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54571           # configure script would override the LC_ALL setting. Likewise for
54572           # LC_CTYPE, which is also set at the beginning of the configure script.
54573           # Test for the usual locale name.
54574           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54575             gt_cv_locale_fr=fr_FR
54576           else
54577             # Test for the locale name with explicit encoding suffix.
54578             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54579               gt_cv_locale_fr=fr_FR.ISO-8859-1
54580             else
54581               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
54582               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54583                 gt_cv_locale_fr=fr_FR.ISO8859-1
54584               else
54585                 # Test for the HP-UX locale name.
54586                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54587                   gt_cv_locale_fr=fr_FR.iso88591
54588                 else
54589                   # Test for the Solaris 7 locale name.
54590                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54591                     gt_cv_locale_fr=fr
54592                   else
54593                     # None found.
54594                     gt_cv_locale_fr=none
54595                   fi
54596                 fi
54597               fi
54598             fi
54599           fi
54600           ;;
54601       esac
54602     fi
54603     rm -fr conftest*
54604
54605 fi
54606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
54607 printf "%s\n" "$gt_cv_locale_fr" >&6; }
54608   LOCALE_FR=$gt_cv_locale_fr
54609
54610
54611
54612
54613   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
54614 printf %s "checking for a french Unicode locale... " >&6; }
54615 if test ${gt_cv_locale_fr_utf8+y}
54616 then :
54617   printf %s "(cached) " >&6
54618 else $as_nop
54619
54620     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54621 /* end confdefs.h.  */
54622
54623 #include <locale.h>
54624 #include <time.h>
54625 #if HAVE_LANGINFO_CODESET
54626 # include <langinfo.h>
54627 #endif
54628 #include <stdlib.h>
54629 #include <string.h>
54630 struct tm t;
54631 char buf[16];
54632 int main () {
54633   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54634      imitates locale dependent behaviour by looking at the environment
54635      variables, and all locales use the UTF-8 encoding.  */
54636 #if !(defined __BEOS__ || defined __HAIKU__)
54637   /* Check whether the given locale name is recognized by the system.  */
54638 # if defined _WIN32 && !defined __CYGWIN__
54639   /* On native Windows, setlocale(category, "") looks at the system settings,
54640      not at the environment variables.  Also, when an encoding suffix such
54641      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54642      category of the locale to "C".  */
54643   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54644       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54645     return 1;
54646 # else
54647   if (setlocale (LC_ALL, "") == NULL) return 1;
54648 # endif
54649   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54650      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54651      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54652      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54653      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54654      some unit tests fail.  */
54655 # if HAVE_LANGINFO_CODESET
54656   {
54657     const char *cs = nl_langinfo (CODESET);
54658     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
54659       return 1;
54660   }
54661 # endif
54662 # ifdef __CYGWIN__
54663   /* On Cygwin, avoid locale names without encoding suffix, because the
54664      locale_charset() function relies on the encoding suffix.  Note that
54665      LC_ALL is set on the command line.  */
54666   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54667 # endif
54668   /* Check whether in the abbreviation of the second month, the second
54669      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
54670      two bytes long, with UTF-8 encoding.  */
54671   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54672   if (strftime (buf, sizeof (buf), "%b", &t) < 4
54673       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
54674     return 1;
54675 #endif
54676 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
54677   /* Check whether the decimal separator is a comma.
54678      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54679      are nl_langinfo(RADIXCHAR) are both ".".  */
54680   if (localeconv () ->decimal_point[0] != ',') return 1;
54681 #endif
54682   return 0;
54683 }
54684
54685 _ACEOF
54686     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54687   (eval $ac_link) 2>&5
54688   ac_status=$?
54689   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54690   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54691       case "$host_os" in
54692         # Handle native Windows specially, because there setlocale() interprets
54693         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54694         # "fr" or "fra" as "French" or "French_France.1252",
54695         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54696         # "ja" as "Japanese" or "Japanese_Japan.932",
54697         # and similar.
54698         mingw*)
54699           # Test for the hypothetical native Windows locale name.
54700           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54701             gt_cv_locale_fr_utf8=French_France.65001
54702           else
54703             # None found.
54704             gt_cv_locale_fr_utf8=none
54705           fi
54706           ;;
54707         *)
54708           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54709           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54710           # configure script would override the LC_ALL setting. Likewise for
54711           # LC_CTYPE, which is also set at the beginning of the configure script.
54712           # Test for the usual locale name.
54713           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54714             gt_cv_locale_fr_utf8=fr_FR
54715           else
54716             # Test for the locale name with explicit encoding suffix.
54717             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54718               gt_cv_locale_fr_utf8=fr_FR.UTF-8
54719             else
54720               # Test for the Solaris 7 locale name.
54721               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54722                 gt_cv_locale_fr_utf8=fr.UTF-8
54723               else
54724                 # None found.
54725                 gt_cv_locale_fr_utf8=none
54726               fi
54727             fi
54728           fi
54729           ;;
54730       esac
54731     fi
54732     rm -fr conftest*
54733
54734 fi
54735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
54736 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
54737   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
54738
54739
54740
54741
54742
54743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
54744 printf %s "checking for a traditional japanese locale... " >&6; }
54745 if test ${gt_cv_locale_ja+y}
54746 then :
54747   printf %s "(cached) " >&6
54748 else $as_nop
54749
54750     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54751 /* end confdefs.h.  */
54752
54753 #include <locale.h>
54754 #include <time.h>
54755 #if HAVE_LANGINFO_CODESET
54756 # include <langinfo.h>
54757 #endif
54758 #include <stdlib.h>
54759 #include <string.h>
54760 struct tm t;
54761 char buf[16];
54762 int main ()
54763 {
54764   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54765      imitates locale dependent behaviour by looking at the environment
54766      variables, and all locales use the UTF-8 encoding.  */
54767 #if defined __BEOS__ || defined __HAIKU__
54768   return 1;
54769 #else
54770   /* Check whether the given locale name is recognized by the system.  */
54771 # if defined _WIN32 && !defined __CYGWIN__
54772   /* On native Windows, setlocale(category, "") looks at the system settings,
54773      not at the environment variables.  Also, when an encoding suffix such
54774      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54775      category of the locale to "C".  */
54776   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54777       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54778     return 1;
54779 # else
54780   if (setlocale (LC_ALL, "") == NULL) return 1;
54781 # endif
54782   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54783      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54784      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54785      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54786      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54787      some unit tests fail.
54788      On MirBSD 10, when an unsupported locale is specified, setlocale()
54789      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
54790 # if HAVE_LANGINFO_CODESET
54791   {
54792     const char *cs = nl_langinfo (CODESET);
54793     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54794         || strcmp (cs, "UTF-8") == 0)
54795       return 1;
54796   }
54797 # endif
54798 # ifdef __CYGWIN__
54799   /* On Cygwin, avoid locale names without encoding suffix, because the
54800      locale_charset() function relies on the encoding suffix.  Note that
54801      LC_ALL is set on the command line.  */
54802   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54803 # endif
54804   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
54805      on Cygwin 1.5.x.  */
54806   if (MB_CUR_MAX == 1)
54807     return 1;
54808   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54809      This excludes the UTF-8 encoding (except on MirBSD).  */
54810   {
54811     const char *p;
54812     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54813     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54814     for (p = buf; *p != '\0'; p++)
54815       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54816         return 1;
54817   }
54818   return 0;
54819 #endif
54820 }
54821
54822 _ACEOF
54823     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54824   (eval $ac_link) 2>&5
54825   ac_status=$?
54826   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54827   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54828       case "$host_os" in
54829         # Handle native Windows specially, because there setlocale() interprets
54830         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54831         # "fr" or "fra" as "French" or "French_France.1252",
54832         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54833         # "ja" as "Japanese" or "Japanese_Japan.932",
54834         # and similar.
54835         mingw*)
54836           # Note that on native Windows, the Japanese locale is
54837           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
54838           # cannot use it here.
54839           gt_cv_locale_ja=none
54840           ;;
54841         *)
54842           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54843           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54844           # configure script would override the LC_ALL setting. Likewise for
54845           # LC_CTYPE, which is also set at the beginning of the configure script.
54846           # Test for the AIX locale name.
54847           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54848             gt_cv_locale_ja=ja_JP
54849           else
54850             # Test for the locale name with explicit encoding suffix.
54851             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54852               gt_cv_locale_ja=ja_JP.EUC-JP
54853             else
54854               # Test for the HP-UX, OSF/1, NetBSD locale name.
54855               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54856                 gt_cv_locale_ja=ja_JP.eucJP
54857               else
54858                 # Test for the IRIX, FreeBSD locale name.
54859                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54860                   gt_cv_locale_ja=ja_JP.EUC
54861                 else
54862                   # Test for the Solaris 7 locale name.
54863                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54864                     gt_cv_locale_ja=ja
54865                   else
54866                     # Special test for NetBSD 1.6.
54867                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
54868                       gt_cv_locale_ja=ja_JP.eucJP
54869                     else
54870                       # None found.
54871                       gt_cv_locale_ja=none
54872                     fi
54873                   fi
54874                 fi
54875               fi
54876             fi
54877           fi
54878           ;;
54879       esac
54880     fi
54881     rm -fr conftest*
54882
54883 fi
54884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
54885 printf "%s\n" "$gt_cv_locale_ja" >&6; }
54886   LOCALE_JA=$gt_cv_locale_ja
54887
54888
54889
54890
54891
54892   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
54893 printf %s "checking for a transitional chinese locale... " >&6; }
54894 if test ${gt_cv_locale_zh_CN+y}
54895 then :
54896   printf %s "(cached) " >&6
54897 else $as_nop
54898
54899     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54900 /* end confdefs.h.  */
54901
54902 #include <locale.h>
54903 #include <stdlib.h>
54904 #include <time.h>
54905 #if HAVE_LANGINFO_CODESET
54906 # include <langinfo.h>
54907 #endif
54908 #include <stdlib.h>
54909 #include <string.h>
54910 struct tm t;
54911 char buf[16];
54912 int main ()
54913 {
54914   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
54915      imitates locale dependent behaviour by looking at the environment
54916      variables, and all locales use the UTF-8 encoding.  */
54917 #if defined __BEOS__ || defined __HAIKU__
54918   return 1;
54919 #else
54920   /* Check whether the given locale name is recognized by the system.  */
54921 # if defined _WIN32 && !defined __CYGWIN__
54922   /* On native Windows, setlocale(category, "") looks at the system settings,
54923      not at the environment variables.  Also, when an encoding suffix such
54924      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54925      category of the locale to "C".  */
54926   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54927       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54928     return 1;
54929 # else
54930   if (setlocale (LC_ALL, "") == NULL) return 1;
54931 # endif
54932   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54933      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54934      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54935      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54936      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54937      some unit tests fail.
54938      On MirBSD 10, when an unsupported locale is specified, setlocale()
54939      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
54940 # if HAVE_LANGINFO_CODESET
54941   {
54942     const char *cs = nl_langinfo (CODESET);
54943     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54944         || strcmp (cs, "UTF-8") == 0)
54945       return 1;
54946   }
54947 # endif
54948 # ifdef __CYGWIN__
54949   /* On Cygwin, avoid locale names without encoding suffix, because the
54950      locale_charset() function relies on the encoding suffix.  Note that
54951      LC_ALL is set on the command line.  */
54952   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54953 # endif
54954   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54955      This excludes the UTF-8 encoding (except on MirBSD).  */
54956   {
54957     const char *p;
54958     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54959     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54960     for (p = buf; *p != '\0'; p++)
54961       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54962         return 1;
54963   }
54964   /* Check whether a typical GB18030 multibyte sequence is recognized as a
54965      single wide character.  This excludes the GB2312 and GBK encodings.  */
54966   if (mblen ("\203\062\332\066", 5) != 4)
54967     return 1;
54968   return 0;
54969 #endif
54970 }
54971
54972 _ACEOF
54973     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54974   (eval $ac_link) 2>&5
54975   ac_status=$?
54976   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54977   test $ac_status = 0; } && test -s conftest$ac_exeext; then
54978       case "$host_os" in
54979         # Handle native Windows specially, because there setlocale() interprets
54980         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54981         # "fr" or "fra" as "French" or "French_France.1252",
54982         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54983         # "ja" as "Japanese" or "Japanese_Japan.932",
54984         # and similar.
54985         mingw*)
54986           # Test for the hypothetical native Windows locale name.
54987           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54988             gt_cv_locale_zh_CN=Chinese_China.54936
54989           else
54990             # None found.
54991             gt_cv_locale_zh_CN=none
54992           fi
54993           ;;
54994         solaris2.8)
54995           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
54996           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
54997           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
54998           gt_cv_locale_zh_CN=none
54999           ;;
55000         *)
55001           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55002           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55003           # configure script would override the LC_ALL setting. Likewise for
55004           # LC_CTYPE, which is also set at the beginning of the configure script.
55005           # Test for the locale name without encoding suffix.
55006           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55007             gt_cv_locale_zh_CN=zh_CN
55008           else
55009             # Test for the locale name with explicit encoding suffix.
55010             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55011               gt_cv_locale_zh_CN=zh_CN.GB18030
55012             else
55013               # None found.
55014               gt_cv_locale_zh_CN=none
55015             fi
55016           fi
55017           ;;
55018       esac
55019     else
55020       # If there was a link error, due to mblen(), the system is so old that
55021       # it certainly doesn't have a chinese locale.
55022       gt_cv_locale_zh_CN=none
55023     fi
55024     rm -fr conftest*
55025
55026 fi
55027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
55028 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
55029   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
55030
55031
55032
55033
55034   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55035 printf %s "checking for a french Unicode locale... " >&6; }
55036 if test ${gt_cv_locale_fr_utf8+y}
55037 then :
55038   printf %s "(cached) " >&6
55039 else $as_nop
55040
55041     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55042 /* end confdefs.h.  */
55043
55044 #include <locale.h>
55045 #include <time.h>
55046 #if HAVE_LANGINFO_CODESET
55047 # include <langinfo.h>
55048 #endif
55049 #include <stdlib.h>
55050 #include <string.h>
55051 struct tm t;
55052 char buf[16];
55053 int main () {
55054   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
55055      imitates locale dependent behaviour by looking at the environment
55056      variables, and all locales use the UTF-8 encoding.  */
55057 #if !(defined __BEOS__ || defined __HAIKU__)
55058   /* Check whether the given locale name is recognized by the system.  */
55059 # if defined _WIN32 && !defined __CYGWIN__
55060   /* On native Windows, setlocale(category, "") looks at the system settings,
55061      not at the environment variables.  Also, when an encoding suffix such
55062      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55063      category of the locale to "C".  */
55064   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55065       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55066     return 1;
55067 # else
55068   if (setlocale (LC_ALL, "") == NULL) return 1;
55069 # endif
55070   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55071      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55072      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55073      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55074      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55075      some unit tests fail.  */
55076 # if HAVE_LANGINFO_CODESET
55077   {
55078     const char *cs = nl_langinfo (CODESET);
55079     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
55080       return 1;
55081   }
55082 # endif
55083 # ifdef __CYGWIN__
55084   /* On Cygwin, avoid locale names without encoding suffix, because the
55085      locale_charset() function relies on the encoding suffix.  Note that
55086      LC_ALL is set on the command line.  */
55087   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55088 # endif
55089   /* Check whether in the abbreviation of the second month, the second
55090      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
55091      two bytes long, with UTF-8 encoding.  */
55092   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55093   if (strftime (buf, sizeof (buf), "%b", &t) < 4
55094       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
55095     return 1;
55096 #endif
55097 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
55098   /* Check whether the decimal separator is a comma.
55099      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55100      are nl_langinfo(RADIXCHAR) are both ".".  */
55101   if (localeconv () ->decimal_point[0] != ',') return 1;
55102 #endif
55103   return 0;
55104 }
55105
55106 _ACEOF
55107     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55108   (eval $ac_link) 2>&5
55109   ac_status=$?
55110   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55111   test $ac_status = 0; } && test -s conftest$ac_exeext; then
55112       case "$host_os" in
55113         # Handle native Windows specially, because there setlocale() interprets
55114         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55115         # "fr" or "fra" as "French" or "French_France.1252",
55116         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55117         # "ja" as "Japanese" or "Japanese_Japan.932",
55118         # and similar.
55119         mingw*)
55120           # Test for the hypothetical native Windows locale name.
55121           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55122             gt_cv_locale_fr_utf8=French_France.65001
55123           else
55124             # None found.
55125             gt_cv_locale_fr_utf8=none
55126           fi
55127           ;;
55128         *)
55129           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55130           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55131           # configure script would override the LC_ALL setting. Likewise for
55132           # LC_CTYPE, which is also set at the beginning of the configure script.
55133           # Test for the usual locale name.
55134           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55135             gt_cv_locale_fr_utf8=fr_FR
55136           else
55137             # Test for the locale name with explicit encoding suffix.
55138             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55139               gt_cv_locale_fr_utf8=fr_FR.UTF-8
55140             else
55141               # Test for the Solaris 7 locale name.
55142               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55143                 gt_cv_locale_fr_utf8=fr.UTF-8
55144               else
55145                 # None found.
55146                 gt_cv_locale_fr_utf8=none
55147               fi
55148             fi
55149           fi
55150           ;;
55151       esac
55152     fi
55153     rm -fr conftest*
55154
55155 fi
55156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
55157 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
55158   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
55159
55160
55161
55162
55163   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55164 printf %s "checking for a french Unicode locale... " >&6; }
55165 if test ${gt_cv_locale_fr_utf8+y}
55166 then :
55167   printf %s "(cached) " >&6
55168 else $as_nop
55169
55170     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55171 /* end confdefs.h.  */
55172
55173 #include <locale.h>
55174 #include <time.h>
55175 #if HAVE_LANGINFO_CODESET
55176 # include <langinfo.h>
55177 #endif
55178 #include <stdlib.h>
55179 #include <string.h>
55180 struct tm t;
55181 char buf[16];
55182 int main () {
55183   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
55184      imitates locale dependent behaviour by looking at the environment
55185      variables, and all locales use the UTF-8 encoding.  */
55186 #if !(defined __BEOS__ || defined __HAIKU__)
55187   /* Check whether the given locale name is recognized by the system.  */
55188 # if defined _WIN32 && !defined __CYGWIN__
55189   /* On native Windows, setlocale(category, "") looks at the system settings,
55190      not at the environment variables.  Also, when an encoding suffix such
55191      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55192      category of the locale to "C".  */
55193   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55194       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55195     return 1;
55196 # else
55197   if (setlocale (LC_ALL, "") == NULL) return 1;
55198 # endif
55199   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55200      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55201      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55202      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55203      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55204      some unit tests fail.  */
55205 # if HAVE_LANGINFO_CODESET
55206   {
55207     const char *cs = nl_langinfo (CODESET);
55208     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
55209       return 1;
55210   }
55211 # endif
55212 # ifdef __CYGWIN__
55213   /* On Cygwin, avoid locale names without encoding suffix, because the
55214      locale_charset() function relies on the encoding suffix.  Note that
55215      LC_ALL is set on the command line.  */
55216   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55217 # endif
55218   /* Check whether in the abbreviation of the second month, the second
55219      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
55220      two bytes long, with UTF-8 encoding.  */
55221   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55222   if (strftime (buf, sizeof (buf), "%b", &t) < 4
55223       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
55224     return 1;
55225 #endif
55226 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
55227   /* Check whether the decimal separator is a comma.
55228      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55229      are nl_langinfo(RADIXCHAR) are both ".".  */
55230   if (localeconv () ->decimal_point[0] != ',') return 1;
55231 #endif
55232   return 0;
55233 }
55234
55235 _ACEOF
55236     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55237   (eval $ac_link) 2>&5
55238   ac_status=$?
55239   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55240   test $ac_status = 0; } && test -s conftest$ac_exeext; then
55241       case "$host_os" in
55242         # Handle native Windows specially, because there setlocale() interprets
55243         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55244         # "fr" or "fra" as "French" or "French_France.1252",
55245         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55246         # "ja" as "Japanese" or "Japanese_Japan.932",
55247         # and similar.
55248         mingw*)
55249           # Test for the hypothetical native Windows locale name.
55250           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55251             gt_cv_locale_fr_utf8=French_France.65001
55252           else
55253             # None found.
55254             gt_cv_locale_fr_utf8=none
55255           fi
55256           ;;
55257         *)
55258           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55259           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55260           # configure script would override the LC_ALL setting. Likewise for
55261           # LC_CTYPE, which is also set at the beginning of the configure script.
55262           # Test for the usual locale name.
55263           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55264             gt_cv_locale_fr_utf8=fr_FR
55265           else
55266             # Test for the locale name with explicit encoding suffix.
55267             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55268               gt_cv_locale_fr_utf8=fr_FR.UTF-8
55269             else
55270               # Test for the Solaris 7 locale name.
55271               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55272                 gt_cv_locale_fr_utf8=fr.UTF-8
55273               else
55274                 # None found.
55275                 gt_cv_locale_fr_utf8=none
55276               fi
55277             fi
55278           fi
55279           ;;
55280       esac
55281     fi
55282     rm -fr conftest*
55283
55284 fi
55285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
55286 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
55287   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
55288
55289
55290
55291
55292
55293   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
55294 printf %s "checking for a transitional chinese locale... " >&6; }
55295 if test ${gt_cv_locale_zh_CN+y}
55296 then :
55297   printf %s "(cached) " >&6
55298 else $as_nop
55299
55300     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55301 /* end confdefs.h.  */
55302
55303 #include <locale.h>
55304 #include <stdlib.h>
55305 #include <time.h>
55306 #if HAVE_LANGINFO_CODESET
55307 # include <langinfo.h>
55308 #endif
55309 #include <stdlib.h>
55310 #include <string.h>
55311 struct tm t;
55312 char buf[16];
55313 int main ()
55314 {
55315   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
55316      imitates locale dependent behaviour by looking at the environment
55317      variables, and all locales use the UTF-8 encoding.  */
55318 #if defined __BEOS__ || defined __HAIKU__
55319   return 1;
55320 #else
55321   /* Check whether the given locale name is recognized by the system.  */
55322 # if defined _WIN32 && !defined __CYGWIN__
55323   /* On native Windows, setlocale(category, "") looks at the system settings,
55324      not at the environment variables.  Also, when an encoding suffix such
55325      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55326      category of the locale to "C".  */
55327   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55328       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55329     return 1;
55330 # else
55331   if (setlocale (LC_ALL, "") == NULL) return 1;
55332 # endif
55333   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55334      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55335      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55336      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55337      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55338      some unit tests fail.
55339      On MirBSD 10, when an unsupported locale is specified, setlocale()
55340      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
55341 # if HAVE_LANGINFO_CODESET
55342   {
55343     const char *cs = nl_langinfo (CODESET);
55344     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
55345         || strcmp (cs, "UTF-8") == 0)
55346       return 1;
55347   }
55348 # endif
55349 # ifdef __CYGWIN__
55350   /* On Cygwin, avoid locale names without encoding suffix, because the
55351      locale_charset() function relies on the encoding suffix.  Note that
55352      LC_ALL is set on the command line.  */
55353   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55354 # endif
55355   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
55356      This excludes the UTF-8 encoding (except on MirBSD).  */
55357   {
55358     const char *p;
55359     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55360     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
55361     for (p = buf; *p != '\0'; p++)
55362       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
55363         return 1;
55364   }
55365   /* Check whether a typical GB18030 multibyte sequence is recognized as a
55366      single wide character.  This excludes the GB2312 and GBK encodings.  */
55367   if (mblen ("\203\062\332\066", 5) != 4)
55368     return 1;
55369   return 0;
55370 #endif
55371 }
55372
55373 _ACEOF
55374     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55375   (eval $ac_link) 2>&5
55376   ac_status=$?
55377   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55378   test $ac_status = 0; } && test -s conftest$ac_exeext; then
55379       case "$host_os" in
55380         # Handle native Windows specially, because there setlocale() interprets
55381         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55382         # "fr" or "fra" as "French" or "French_France.1252",
55383         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55384         # "ja" as "Japanese" or "Japanese_Japan.932",
55385         # and similar.
55386         mingw*)
55387           # Test for the hypothetical native Windows locale name.
55388           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55389             gt_cv_locale_zh_CN=Chinese_China.54936
55390           else
55391             # None found.
55392             gt_cv_locale_zh_CN=none
55393           fi
55394           ;;
55395         solaris2.8)
55396           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
55397           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
55398           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
55399           gt_cv_locale_zh_CN=none
55400           ;;
55401         *)
55402           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55403           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55404           # configure script would override the LC_ALL setting. Likewise for
55405           # LC_CTYPE, which is also set at the beginning of the configure script.
55406           # Test for the locale name without encoding suffix.
55407           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55408             gt_cv_locale_zh_CN=zh_CN
55409           else
55410             # Test for the locale name with explicit encoding suffix.
55411             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55412               gt_cv_locale_zh_CN=zh_CN.GB18030
55413             else
55414               # None found.
55415               gt_cv_locale_zh_CN=none
55416             fi
55417           fi
55418           ;;
55419       esac
55420     else
55421       # If there was a link error, due to mblen(), the system is so old that
55422       # it certainly doesn't have a chinese locale.
55423       gt_cv_locale_zh_CN=none
55424     fi
55425     rm -fr conftest*
55426
55427 fi
55428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
55429 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
55430   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
55431
55432
55433
55434
55435
55436
55437
55438
55439
55440
55441
55442
55443
55444
55445
55446
55447
55448
55449
55450
55451
55452  nanosleep_save_libs=$LIBS
55453
55454  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
55455  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
55456  LIB_NANOSLEEP=
55457
55458  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
55459 printf %s "checking for library containing nanosleep... " >&6; }
55460 if test ${ac_cv_search_nanosleep+y}
55461 then :
55462   printf %s "(cached) " >&6
55463 else $as_nop
55464   ac_func_search_save_LIBS=$LIBS
55465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55466 /* end confdefs.h.  */
55467
55468 /* Override any GCC internal prototype to avoid an error.
55469    Use char because int might match the return type of a GCC
55470    builtin and then its argument prototype would still apply.  */
55471 char nanosleep ();
55472 int
55473 main (void)
55474 {
55475 return nanosleep ();
55476   ;
55477   return 0;
55478 }
55479 _ACEOF
55480 for ac_lib in '' rt posix4
55481 do
55482   if test -z "$ac_lib"; then
55483     ac_res="none required"
55484   else
55485     ac_res=-l$ac_lib
55486     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
55487   fi
55488   if ac_fn_c_try_link "$LINENO"
55489 then :
55490   ac_cv_search_nanosleep=$ac_res
55491 fi
55492 rm -f core conftest.err conftest.$ac_objext conftest.beam \
55493     conftest$ac_exeext
55494   if test ${ac_cv_search_nanosleep+y}
55495 then :
55496   break
55497 fi
55498 done
55499 if test ${ac_cv_search_nanosleep+y}
55500 then :
55501
55502 else $as_nop
55503   ac_cv_search_nanosleep=no
55504 fi
55505 rm conftest.$ac_ext
55506 LIBS=$ac_func_search_save_LIBS
55507 fi
55508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
55509 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
55510 ac_res=$ac_cv_search_nanosleep
55511 if test "$ac_res" != no
55512 then :
55513   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
55514   test "$ac_cv_search_nanosleep" = "none required" ||
55515                  LIB_NANOSLEEP=$ac_cv_search_nanosleep
55516 fi
55517
55518  if test "x$ac_cv_search_nanosleep" != xno; then
55519
55520
55521    if test $APPLE_UNIVERSAL_BUILD = 1; then
55522      # A universal build on Apple Mac OS X platforms.
55523      # The test result would be 'no (mishandles large arguments)' in 64-bit
55524      # mode but 'yes' in 32-bit mode. But we need a configuration result that
55525      # is valid in both modes.
55526      gl_cv_func_nanosleep='no (mishandles large arguments)'
55527    fi
55528
55529    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
55530 printf %s "checking for working nanosleep... " >&6; }
55531 if test ${gl_cv_func_nanosleep+y}
55532 then :
55533   printf %s "(cached) " >&6
55534 else $as_nop
55535
55536      if test "$cross_compiling" = yes
55537 then :
55538   case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
55539             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
55540           mingw*) # Guess no on native Windows.
55541             gl_cv_func_nanosleep='guessing no' ;;
55542           *)      # If we don't know, obey --enable-cross-guesses.
55543             gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
55544         esac
55545
55546 else $as_nop
55547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55548 /* end confdefs.h.  */
55549
55550           #include <errno.h>
55551           #include <limits.h>
55552           #include <signal.h>
55553           #if HAVE_SYS_TIME_H
55554            #include <sys/time.h>
55555           #endif
55556           #include <time.h>
55557           #include <unistd.h>
55558           #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
55559           #define TYPE_MAXIMUM(t) \
55560             ((t) (! TYPE_SIGNED (t) \
55561                   ? (t) -1 \
55562                   : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
55563
55564           #if HAVE_DECL_ALARM
55565           static void
55566           check_for_SIGALRM (int sig)
55567           {
55568             if (sig != SIGALRM)
55569               _exit (1);
55570           }
55571           #endif
55572
55573           int
55574           main ()
55575           {
55576             static struct timespec ts_sleep;
55577             static struct timespec ts_remaining;
55578             /* Test for major problems first.  */
55579             if (! nanosleep)
55580               return 2;
55581             ts_sleep.tv_sec = 0;
55582             ts_sleep.tv_nsec = 1;
55583             #if HAVE_DECL_ALARM
55584             {
55585               static struct sigaction act;
55586               act.sa_handler = check_for_SIGALRM;
55587               sigemptyset (&act.sa_mask);
55588               sigaction (SIGALRM, &act, NULL);
55589               alarm (1);
55590               if (nanosleep (&ts_sleep, NULL) != 0)
55591                 return 3;
55592               /* Test for a minor problem: the handling of large arguments.  */
55593               ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
55594               ts_sleep.tv_nsec = 999999999;
55595               alarm (1);
55596               if (nanosleep (&ts_sleep, &ts_remaining) != -1)
55597                 return 4;
55598               if (errno != EINTR)
55599                 return 5;
55600               if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
55601                 return 6;
55602             }
55603             #else /* A simpler test for native Windows.  */
55604             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
55605               return 3;
55606             #endif
55607             return 0;
55608           }
55609 _ACEOF
55610 if ac_fn_c_try_run "$LINENO"
55611 then :
55612   gl_cv_func_nanosleep=yes
55613 else $as_nop
55614   case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
55615         esac
55616 fi
55617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55618   conftest.$ac_objext conftest.beam conftest.$ac_ext
55619 fi
55620
55621
55622 fi
55623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
55624 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
55625    case "$gl_cv_func_nanosleep" in
55626      *yes)
55627        REPLACE_NANOSLEEP=0
55628        ;;
55629      *)
55630        REPLACE_NANOSLEEP=1
55631        case "$gl_cv_func_nanosleep" in
55632          *"mishandles large arguments"*)
55633
55634 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
55635
55636            ;;
55637          *)
55638            # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
55639            for ac_lib in $LIBSOCKET; do
55640              case " $LIB_NANOSLEEP " in
55641                *" $ac_lib "*) ;;
55642                *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
55643              esac
55644            done
55645            ;;
55646        esac
55647        ;;
55648    esac
55649  else
55650    HAVE_NANOSLEEP=0
55651  fi
55652  LIBS=$nanosleep_save_libs
55653
55654   if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
55655
55656
55657
55658
55659
55660
55661
55662
55663   M4tests_LIBOBJS="$M4tests_LIBOBJS nanosleep.$ac_objext"
55664
55665
55666
55667   :
55668
55669   fi
55670
55671
55672
55673
55674
55675
55676
55677
55678
55679     if test "$GL_M4_GNULIB_NANOSLEEP" != 1; then
55680         if test "$GL_M4_GNULIB_NANOSLEEP" = 0; then
55681       GL_M4_GNULIB_NANOSLEEP=$gl_module_indicator_condition
55682     else
55683       GL_M4_GNULIB_NANOSLEEP="($GL_M4_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
55684     fi
55685   fi
55686
55687
55688
55689
55690
55691 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
55692
55693
55694
55695
55696
55697   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
55698 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
55699 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
55700 then :
55701   printf %s "(cached) " >&6
55702 else $as_nop
55703
55704       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55705 /* end confdefs.h.  */
55706 #include <netinet/in.h>
55707 int
55708 main (void)
55709 {
55710
55711   ;
55712   return 0;
55713 }
55714 _ACEOF
55715 if ac_fn_c_try_compile "$LINENO"
55716 then :
55717   gl_cv_header_netinet_in_h_selfcontained=yes
55718 else $as_nop
55719   gl_cv_header_netinet_in_h_selfcontained=no
55720 fi
55721 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55722
55723 fi
55724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
55725 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
55726   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
55727     NETINET_IN_H=''
55728   else
55729     NETINET_IN_H='netinet/in.h'
55730     ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
55731 if test "x$ac_cv_header_netinet_in_h" = xyes
55732 then :
55733   printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
55734
55735 fi
55736
55737
55738
55739
55740
55741
55742
55743
55744
55745
55746      if test $gl_cv_have_include_next = yes; then
55747        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
55748      else
55749        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
55750 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
55751 if test ${gl_cv_next_netinet_in_h+y}
55752 then :
55753   printf %s "(cached) " >&6
55754 else $as_nop
55755
55756              if test $ac_cv_header_netinet_in_h = yes; then
55757
55758
55759
55760
55761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55762 /* end confdefs.h.  */
55763 #include <netinet/in.h>
55764 _ACEOF
55765                 case "$host_os" in
55766     aix*) gl_absname_cpp="$ac_cpp -C" ;;
55767     *)    gl_absname_cpp="$ac_cpp" ;;
55768   esac
55769
55770   case "$host_os" in
55771     mingw*)
55772                                           gl_dirsep_regex='[/\\]'
55773       ;;
55774     *)
55775       gl_dirsep_regex='\/'
55776       ;;
55777   esac
55778       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
55779   gl_header_literal_regex=`echo 'netinet/in.h' \
55780                            | sed -e "$gl_make_literal_regex_sed"`
55781   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
55782       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
55783       s|^/[^/]|//&|
55784       p
55785       q
55786     }'
55787
55788         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
55789   sed -n "$gl_absolute_header_sed"`
55790
55791            gl_header=$gl_cv_absolute_netinet_in_h
55792            gl_cv_next_netinet_in_h='"'$gl_header'"'
55793           else
55794                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
55795              fi
55796
55797
55798 fi
55799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
55800 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
55801      fi
55802      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
55803
55804      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
55805        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55806        gl_next_as_first_directive='<'netinet/in.h'>'
55807      else
55808        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55809        gl_next_as_first_directive=$gl_cv_next_netinet_in_h
55810      fi
55811      NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
55812
55813
55814
55815
55816     if test $ac_cv_header_netinet_in_h = yes; then
55817       HAVE_NETINET_IN_H=1
55818     else
55819       HAVE_NETINET_IN_H=0
55820     fi
55821
55822   fi
55823
55824    if test -n "$NETINET_IN_H"; then
55825   GL_GENERATE_NETINET_IN_H_TRUE=
55826   GL_GENERATE_NETINET_IN_H_FALSE='#'
55827 else
55828   GL_GENERATE_NETINET_IN_H_TRUE='#'
55829   GL_GENERATE_NETINET_IN_H_FALSE=
55830 fi
55831
55832
55833
55834
55835
55836
55837   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
55838 printf %s "checking for a traditional french locale... " >&6; }
55839 if test ${gt_cv_locale_fr+y}
55840 then :
55841   printf %s "(cached) " >&6
55842 else $as_nop
55843
55844     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55845 /* end confdefs.h.  */
55846
55847 #include <locale.h>
55848 #include <time.h>
55849 #if HAVE_LANGINFO_CODESET
55850 # include <langinfo.h>
55851 #endif
55852 #include <stdlib.h>
55853 #include <string.h>
55854 struct tm t;
55855 char buf[16];
55856 int main () {
55857   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
55858      imitates locale dependent behaviour by looking at the environment
55859      variables, and all locales use the UTF-8 encoding.  */
55860 #if defined __BEOS__ || defined __HAIKU__
55861   return 1;
55862 #else
55863   /* Check whether the given locale name is recognized by the system.  */
55864 # if defined _WIN32 && !defined __CYGWIN__
55865   /* On native Windows, setlocale(category, "") looks at the system settings,
55866      not at the environment variables.  Also, when an encoding suffix such
55867      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55868      category of the locale to "C".  */
55869   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55870       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55871     return 1;
55872 # else
55873   if (setlocale (LC_ALL, "") == NULL) return 1;
55874 # endif
55875   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55876      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55877      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55878      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55879      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55880      some unit tests fail.
55881      On MirBSD 10, when an unsupported locale is specified, setlocale()
55882      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
55883 # if HAVE_LANGINFO_CODESET
55884   {
55885     const char *cs = nl_langinfo (CODESET);
55886     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
55887         || strcmp (cs, "UTF-8") == 0)
55888       return 1;
55889   }
55890 # endif
55891 # ifdef __CYGWIN__
55892   /* On Cygwin, avoid locale names without encoding suffix, because the
55893      locale_charset() function relies on the encoding suffix.  Note that
55894      LC_ALL is set on the command line.  */
55895   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55896 # endif
55897   /* Check whether in the abbreviation of the second month, the second
55898      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
55899      one byte long. This excludes the UTF-8 encoding.  */
55900   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55901   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
55902 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
55903   /* Check whether the decimal separator is a comma.
55904      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55905      are nl_langinfo(RADIXCHAR) are both ".".  */
55906   if (localeconv () ->decimal_point[0] != ',') return 1;
55907 # endif
55908   return 0;
55909 #endif
55910 }
55911
55912 _ACEOF
55913     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55914   (eval $ac_link) 2>&5
55915   ac_status=$?
55916   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55917   test $ac_status = 0; } && test -s conftest$ac_exeext; then
55918       case "$host_os" in
55919         # Handle native Windows specially, because there setlocale() interprets
55920         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55921         # "fr" or "fra" as "French" or "French_France.1252",
55922         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55923         # "ja" as "Japanese" or "Japanese_Japan.932",
55924         # and similar.
55925         mingw*)
55926           # Test for the native Windows locale name.
55927           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55928             gt_cv_locale_fr=French_France.1252
55929           else
55930             # None found.
55931             gt_cv_locale_fr=none
55932           fi
55933           ;;
55934         *)
55935           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55936           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55937           # configure script would override the LC_ALL setting. Likewise for
55938           # LC_CTYPE, which is also set at the beginning of the configure script.
55939           # Test for the usual locale name.
55940           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55941             gt_cv_locale_fr=fr_FR
55942           else
55943             # Test for the locale name with explicit encoding suffix.
55944             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55945               gt_cv_locale_fr=fr_FR.ISO-8859-1
55946             else
55947               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
55948               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55949                 gt_cv_locale_fr=fr_FR.ISO8859-1
55950               else
55951                 # Test for the HP-UX locale name.
55952                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55953                   gt_cv_locale_fr=fr_FR.iso88591
55954                 else
55955                   # Test for the Solaris 7 locale name.
55956                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55957                     gt_cv_locale_fr=fr
55958                   else
55959                     # None found.
55960                     gt_cv_locale_fr=none
55961                   fi
55962                 fi
55963               fi
55964             fi
55965           fi
55966           ;;
55967       esac
55968     fi
55969     rm -fr conftest*
55970
55971 fi
55972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
55973 printf "%s\n" "$gt_cv_locale_fr" >&6; }
55974   LOCALE_FR=$gt_cv_locale_fr
55975
55976
55977
55978
55979   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55980 printf %s "checking for a french Unicode locale... " >&6; }
55981 if test ${gt_cv_locale_fr_utf8+y}
55982 then :
55983   printf %s "(cached) " >&6
55984 else $as_nop
55985
55986     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55987 /* end confdefs.h.  */
55988
55989 #include <locale.h>
55990 #include <time.h>
55991 #if HAVE_LANGINFO_CODESET
55992 # include <langinfo.h>
55993 #endif
55994 #include <stdlib.h>
55995 #include <string.h>
55996 struct tm t;
55997 char buf[16];
55998 int main () {
55999   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
56000      imitates locale dependent behaviour by looking at the environment
56001      variables, and all locales use the UTF-8 encoding.  */
56002 #if !(defined __BEOS__ || defined __HAIKU__)
56003   /* Check whether the given locale name is recognized by the system.  */
56004 # if defined _WIN32 && !defined __CYGWIN__
56005   /* On native Windows, setlocale(category, "") looks at the system settings,
56006      not at the environment variables.  Also, when an encoding suffix such
56007      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
56008      category of the locale to "C".  */
56009   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
56010       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
56011     return 1;
56012 # else
56013   if (setlocale (LC_ALL, "") == NULL) return 1;
56014 # endif
56015   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
56016      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
56017      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
56018      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
56019      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
56020      some unit tests fail.  */
56021 # if HAVE_LANGINFO_CODESET
56022   {
56023     const char *cs = nl_langinfo (CODESET);
56024     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
56025       return 1;
56026   }
56027 # endif
56028 # ifdef __CYGWIN__
56029   /* On Cygwin, avoid locale names without encoding suffix, because the
56030      locale_charset() function relies on the encoding suffix.  Note that
56031      LC_ALL is set on the command line.  */
56032   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
56033 # endif
56034   /* Check whether in the abbreviation of the second month, the second
56035      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
56036      two bytes long, with UTF-8 encoding.  */
56037   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
56038   if (strftime (buf, sizeof (buf), "%b", &t) < 4
56039       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
56040     return 1;
56041 #endif
56042 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
56043   /* Check whether the decimal separator is a comma.
56044      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
56045      are nl_langinfo(RADIXCHAR) are both ".".  */
56046   if (localeconv () ->decimal_point[0] != ',') return 1;
56047 #endif
56048   return 0;
56049 }
56050
56051 _ACEOF
56052     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
56053   (eval $ac_link) 2>&5
56054   ac_status=$?
56055   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56056   test $ac_status = 0; } && test -s conftest$ac_exeext; then
56057       case "$host_os" in
56058         # Handle native Windows specially, because there setlocale() interprets
56059         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
56060         # "fr" or "fra" as "French" or "French_France.1252",
56061         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
56062         # "ja" as "Japanese" or "Japanese_Japan.932",
56063         # and similar.
56064         mingw*)
56065           # Test for the hypothetical native Windows locale name.
56066           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56067             gt_cv_locale_fr_utf8=French_France.65001
56068           else
56069             # None found.
56070             gt_cv_locale_fr_utf8=none
56071           fi
56072           ;;
56073         *)
56074           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
56075           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
56076           # configure script would override the LC_ALL setting. Likewise for
56077           # LC_CTYPE, which is also set at the beginning of the configure script.
56078           # Test for the usual locale name.
56079           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56080             gt_cv_locale_fr_utf8=fr_FR
56081           else
56082             # Test for the locale name with explicit encoding suffix.
56083             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56084               gt_cv_locale_fr_utf8=fr_FR.UTF-8
56085             else
56086               # Test for the Solaris 7 locale name.
56087               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56088                 gt_cv_locale_fr_utf8=fr.UTF-8
56089               else
56090                 # None found.
56091                 gt_cv_locale_fr_utf8=none
56092               fi
56093             fi
56094           fi
56095           ;;
56096       esac
56097     fi
56098     rm -fr conftest*
56099
56100 fi
56101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
56102 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
56103   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
56104
56105
56106
56107
56108
56109
56110
56111              if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
56112             REPLACE_PERROR=1
56113   fi
56114   case ${gl_cv_func_strerror_r_works-unset} in
56115     unset|*yes)
56116       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
56117 printf %s "checking whether perror matches strerror... " >&6; }
56118 if test ${gl_cv_func_perror_works+y}
56119 then :
56120   printf %s "(cached) " >&6
56121 else $as_nop
56122   if test "$cross_compiling" = yes
56123 then :
56124   case "$host_os" in
56125                        # Guess yes on musl systems.
56126               *-musl*) gl_cv_func_perror_works="guessing yes" ;;
56127                        # Guess yes on native Windows.
56128               mingw*)  gl_cv_func_perror_works="guessing yes" ;;
56129                        # Otherwise obey --enable-cross-guesses.
56130               *)       gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
56131             esac
56132
56133 else $as_nop
56134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56135 /* end confdefs.h.  */
56136 #include <errno.h>
56137                 #include <stdio.h>
56138                 #include <stdlib.h>
56139                 #include <string.h>
56140
56141 int
56142 main (void)
56143 {
56144 char *str = strerror (-1);
56145                 if (!getenv("CONFTEST_OUTPUT")) return 0;
56146                 if (!str) str = "";
56147                 puts (str);
56148                 errno = -1;
56149                 perror ("");
56150                 return 0;
56151
56152   ;
56153   return 0;
56154 }
56155 _ACEOF
56156 if ac_fn_c_try_run "$LINENO"
56157 then :
56158   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
56159                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
56160               gl_cv_func_perror_works=yes
56161             else
56162               gl_cv_func_perror_works=no
56163             fi
56164             rm -rf conftest.txt1 conftest.txt2
56165 else $as_nop
56166   gl_cv_func_perror_works=no
56167 fi
56168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56169   conftest.$ac_objext conftest.beam conftest.$ac_ext
56170 fi
56171
56172
56173 fi
56174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
56175 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
56176       case "$gl_cv_func_perror_works" in
56177         *yes) ;;
56178         *) REPLACE_PERROR=1 ;;
56179       esac
56180       ;;
56181     *)
56182                   REPLACE_PERROR=1
56183       ;;
56184   esac
56185
56186   if test $REPLACE_PERROR = 1; then
56187
56188
56189
56190
56191
56192
56193
56194
56195   M4tests_LIBOBJS="$M4tests_LIBOBJS perror.$ac_objext"
56196
56197   fi
56198
56199
56200
56201
56202
56203
56204
56205
56206
56207     if test "$GL_M4_GNULIB_PERROR" != 1; then
56208         if test "$GL_M4_GNULIB_PERROR" = 0; then
56209       GL_M4_GNULIB_PERROR=$gl_module_indicator_condition
56210     else
56211       GL_M4_GNULIB_PERROR="($GL_M4_GNULIB_PERROR || $gl_module_indicator_condition)"
56212     fi
56213   fi
56214
56215
56216
56217
56218
56219 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
56220
56221
56222
56223
56224
56225
56226
56227
56228
56229
56230
56231
56232
56233   if { case "$host_os" in mingw*) true;; *) false;; esac; } \
56234      && test $gl_threads_api = windows; then
56235             REPLACE_PTHREAD_CREATE=1
56236     REPLACE_PTHREAD_ATTR_INIT=1
56237     REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
56238     REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
56239     REPLACE_PTHREAD_ATTR_DESTROY=1
56240     REPLACE_PTHREAD_SELF=1
56241     REPLACE_PTHREAD_EQUAL=1
56242     REPLACE_PTHREAD_DETACH=1
56243     REPLACE_PTHREAD_JOIN=1
56244     REPLACE_PTHREAD_EXIT=1
56245   else
56246     if test $HAVE_PTHREAD_H = 0; then
56247       HAVE_PTHREAD_CREATE=0
56248       HAVE_PTHREAD_ATTR_INIT=0
56249       HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
56250       HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
56251       HAVE_PTHREAD_ATTR_DESTROY=0
56252       HAVE_PTHREAD_SELF=0
56253       HAVE_PTHREAD_EQUAL=0
56254       HAVE_PTHREAD_DETACH=0
56255       HAVE_PTHREAD_JOIN=0
56256       HAVE_PTHREAD_EXIT=0
56257     else
56258                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
56259 printf %s "checking whether pthread_create exists as a global function... " >&6; }
56260 if test ${gl_cv_func_pthread_create+y}
56261 then :
56262   printf %s "(cached) " >&6
56263 else $as_nop
56264   saved_LIBS="$LIBS"
56265          LIBS="$LIBS $LIBPMULTITHREAD"
56266          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56267 /* end confdefs.h.  */
56268 extern
56269                 #ifdef __cplusplus
56270                 "C"
56271                 #endif
56272                 int pthread_create (void);
56273                 int main ()
56274                 {
56275                   return pthread_create ();
56276                 }
56277
56278 _ACEOF
56279 if ac_fn_c_try_link "$LINENO"
56280 then :
56281   gl_cv_func_pthread_create=yes
56282 else $as_nop
56283   gl_cv_func_pthread_create=no
56284 fi
56285 rm -f core conftest.err conftest.$ac_objext conftest.beam \
56286     conftest$ac_exeext conftest.$ac_ext
56287          LIBS="$saved_LIBS"
56288
56289 fi
56290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
56291 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
56292       if test $gl_cv_func_pthread_create = no; then
56293         REPLACE_PTHREAD_CREATE=1
56294         REPLACE_PTHREAD_ATTR_INIT=1
56295
56296 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
56297
56298       fi
56299     fi
56300   fi
56301
56302   if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
56303
56304
56305
56306
56307
56308
56309
56310
56311   M4tests_LIBOBJS="$M4tests_LIBOBJS pthread-thread.$ac_objext"
56312
56313   fi
56314
56315
56316
56317
56318
56319
56320
56321
56322
56323     if test "$GL_M4_GNULIB_PTHREAD_THREAD" != 1; then
56324         if test "$GL_M4_GNULIB_PTHREAD_THREAD" = 0; then
56325       GL_M4_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
56326     else
56327       GL_M4_GNULIB_PTHREAD_THREAD="($GL_M4_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
56328     fi
56329   fi
56330
56331
56332
56333
56334
56335 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
56336
56337
56338
56339
56340
56341
56342
56343
56344       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
56345 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
56346 if test ${gl_cv_func_pthread_sigmask_macro+y}
56347 then :
56348   printf %s "(cached) " >&6
56349 else $as_nop
56350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56351 /* end confdefs.h.  */
56352
56353 #include <pthread.h>
56354 #include <signal.h>
56355 #ifdef pthread_sigmask
56356  headers_define_pthread_sigmask
56357 #endif
56358 _ACEOF
56359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56360   $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
56361 then :
56362   gl_cv_func_pthread_sigmask_macro=yes
56363 else $as_nop
56364   gl_cv_func_pthread_sigmask_macro=no
56365 fi
56366 rm -rf conftest*
56367
56368
56369 fi
56370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
56371 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
56372
56373   LIB_PTHREAD_SIGMASK=
56374
56375   if test $gl_cv_func_pthread_sigmask_macro = yes; then
56376         HAVE_PTHREAD_SIGMASK=0
56377         REPLACE_PTHREAD_SIGMASK=1
56378   else
56379
56380
56381
56382       if test "$gl_threads_api" = posix; then
56383         if test $ac_cv_func_pthread_sigmask = yes; then
56384                     :
56385         else
56386           if test -n "$LIBMULTITHREAD"; then
56387             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
56388 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
56389 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
56390 then :
56391   printf %s "(cached) " >&6
56392 else $as_nop
56393   gl_save_LIBS="$LIBS"
56394                LIBS="$LIBS $LIBMULTITHREAD"
56395                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56396 /* end confdefs.h.  */
56397 #include <pthread.h>
56398                       #include <signal.h>
56399
56400 int
56401 main (void)
56402 {
56403 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
56404   ;
56405   return 0;
56406 }
56407
56408 _ACEOF
56409 if ac_fn_c_try_link "$LINENO"
56410 then :
56411   gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
56412 else $as_nop
56413   gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
56414 fi
56415 rm -f core conftest.err conftest.$ac_objext conftest.beam \
56416     conftest$ac_exeext conftest.$ac_ext
56417                LIBS="$gl_save_LIBS"
56418
56419 fi
56420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
56421 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
56422             if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
56423                             LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
56424             else
56425                             HAVE_PTHREAD_SIGMASK=0
56426             fi
56427           else
56428                         HAVE_PTHREAD_SIGMASK=0
56429           fi
56430         fi
56431       else
56432                         if test $ac_cv_func_pthread_sigmask = yes; then
56433           REPLACE_PTHREAD_SIGMASK=1
56434         else
56435           HAVE_PTHREAD_SIGMASK=0
56436         fi
56437       fi
56438
56439   fi
56440
56441
56442
56443     if test $HAVE_PTHREAD_SIGMASK = 1; then
56444
56445
56446                 if test -z "$LIB_PTHREAD_SIGMASK"; then
56447       case " $LIBS " in
56448         *' -pthread '*) ;;
56449         *' -lpthread '*) ;;
56450         *)
56451           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
56452 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
56453 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
56454 then :
56455   printf %s "(cached) " >&6
56456 else $as_nop
56457
56458               if test "$cross_compiling" = yes
56459 then :
56460
56461                                   case "$host_os" in
56462                    freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
56463                      gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
56464                    *)
56465                      gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
56466                  esac
56467
56468 else $as_nop
56469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56470 /* end confdefs.h.  */
56471
56472                    #include <pthread.h>
56473                    #include <signal.h>
56474                    #include <stddef.h>
56475                    int main ()
56476                    {
56477                      sigset_t set;
56478                      sigemptyset (&set);
56479                      return pthread_sigmask (1729, &set, NULL) != 0;
56480                    }
56481 _ACEOF
56482 if ac_fn_c_try_run "$LINENO"
56483 then :
56484   gl_cv_func_pthread_sigmask_in_libc_works=no
56485 else $as_nop
56486   gl_cv_func_pthread_sigmask_in_libc_works=yes
56487 fi
56488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56489   conftest.$ac_objext conftest.beam conftest.$ac_ext
56490 fi
56491
56492
56493 fi
56494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
56495 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
56496           case "$gl_cv_func_pthread_sigmask_in_libc_works" in
56497             *no)
56498               REPLACE_PTHREAD_SIGMASK=1
56499
56500 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
56501
56502               ;;
56503           esac;;
56504       esac
56505     fi
56506
56507             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
56508 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
56509 if test ${gl_cv_func_pthread_sigmask_return_works+y}
56510 then :
56511   printf %s "(cached) " >&6
56512 else $as_nop
56513
56514         gl_save_LIBS="$LIBS"
56515         LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
56516         if test "$cross_compiling" = yes
56517 then :
56518   case "$host_os" in
56519              cygwin*)
56520                gl_cv_func_pthread_sigmask_return_works="guessing no";;
56521              *)
56522                gl_cv_func_pthread_sigmask_return_works="guessing yes";;
56523            esac
56524
56525 else $as_nop
56526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56527 /* end confdefs.h.  */
56528
56529 #include <pthread.h>
56530 #include <signal.h>
56531 #include <stddef.h>
56532 int main ()
56533 {
56534   sigset_t set;
56535   sigemptyset (&set);
56536   if (pthread_sigmask (1729, &set, NULL) == -1)
56537     return 1;
56538   return 0;
56539 }
56540 _ACEOF
56541 if ac_fn_c_try_run "$LINENO"
56542 then :
56543   gl_cv_func_pthread_sigmask_return_works=yes
56544 else $as_nop
56545   gl_cv_func_pthread_sigmask_return_works=no
56546 fi
56547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56548   conftest.$ac_objext conftest.beam conftest.$ac_ext
56549 fi
56550
56551         LIBS="$gl_save_LIBS"
56552
56553 fi
56554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
56555 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
56556     case "$gl_cv_func_pthread_sigmask_return_works" in
56557       *no)
56558         REPLACE_PTHREAD_SIGMASK=1
56559
56560 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
56561
56562         ;;
56563     esac
56564
56565                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
56566 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
56567 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
56568 then :
56569   printf %s "(cached) " >&6
56570 else $as_nop
56571
56572         case "$host_os" in
56573           irix*)
56574             gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
56575           *)
56576             gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
56577         esac
56578                                          gl_save_LIBS=$LIBS
56579            LIBS="$LIBS $LIBMULTITHREAD"
56580         if test "$cross_compiling" = yes
56581 then :
56582   :
56583 else $as_nop
56584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56585 /* end confdefs.h.  */
56586
56587 #include <pthread.h>
56588 #include <signal.h>
56589 #include <stdio.h>
56590 #include <stdlib.h>
56591 #include <unistd.h>
56592
56593
56594 $gl_mda_defines
56595
56596 static volatile int sigint_occurred;
56597 static void
56598 sigint_handler (int sig)
56599 {
56600   sigint_occurred++;
56601 }
56602 int main ()
56603 {
56604   sigset_t set;
56605   int pid = getpid ();
56606   char command[80];
56607   signal (SIGINT, sigint_handler);
56608   sigemptyset (&set);
56609   sigaddset (&set, SIGINT);
56610   if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
56611     return 1;
56612   sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
56613   if (!(system (command) == 0))
56614     return 2;
56615   sleep (2);
56616   if (!(sigint_occurred == 0))
56617     return 3;
56618   if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
56619     return 4;
56620   if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
56621     return 5;
56622   return 0;
56623 }
56624 _ACEOF
56625 if ac_fn_c_try_run "$LINENO"
56626 then :
56627   :
56628 else $as_nop
56629   gl_cv_func_pthread_sigmask_unblock_works=no
56630 fi
56631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56632   conftest.$ac_objext conftest.beam conftest.$ac_ext
56633 fi
56634
56635         LIBS=$gl_save_LIBS
56636
56637 fi
56638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
56639 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
56640     case "$gl_cv_func_pthread_sigmask_unblock_works" in
56641       *no)
56642         REPLACE_PTHREAD_SIGMASK=1
56643
56644 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
56645
56646         ;;
56647     esac
56648   fi
56649
56650   if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
56651
56652
56653
56654
56655
56656
56657
56658
56659   M4tests_LIBOBJS="$M4tests_LIBOBJS pthread_sigmask.$ac_objext"
56660
56661
56662   if test $HAVE_PTHREAD_SIGMASK = 1; then
56663
56664 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
56665
56666   fi
56667
56668   fi
56669
56670
56671
56672
56673
56674
56675
56676
56677
56678     if test "$GL_M4_GNULIB_PTHREAD_SIGMASK" != 1; then
56679         if test "$GL_M4_GNULIB_PTHREAD_SIGMASK" = 0; then
56680       GL_M4_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
56681     else
56682       GL_M4_GNULIB_PTHREAD_SIGMASK="($GL_M4_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
56683     fi
56684   fi
56685
56686
56687
56688
56689
56690 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
56691
56692
56693
56694
56695
56696      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
56697 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
56698 if test ${gl_cv_func_svid_putenv+y}
56699 then :
56700   printf %s "(cached) " >&6
56701 else $as_nop
56702   if test "$cross_compiling" = yes
56703 then :
56704           case "$host_os" in
56705                          # Guess yes on glibc systems.
56706           *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
56707                          # Guess yes on musl systems.
56708           *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
56709                          # Guess no on native Windows.
56710           mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
56711                          # If we don't know, obey --enable-cross-guesses.
56712           *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
56713         esac
56714
56715 else $as_nop
56716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56717 /* end confdefs.h.  */
56718 $ac_includes_default
56719
56720
56721 $gl_mda_defines
56722
56723 int
56724 main (void)
56725 {
56726
56727             /* Put it in env.  */
56728             if (putenv ("CONFTEST_putenv=val"))
56729               return 1;
56730
56731             /* Try to remove it.  */
56732             if (putenv ("CONFTEST_putenv"))
56733               return 2;
56734
56735             /* Make sure it was deleted.  */
56736             if (getenv ("CONFTEST_putenv") != 0)
56737               return 3;
56738
56739             return 0;
56740
56741   ;
56742   return 0;
56743 }
56744 _ACEOF
56745 if ac_fn_c_try_run "$LINENO"
56746 then :
56747   gl_cv_func_svid_putenv=yes
56748 else $as_nop
56749   gl_cv_func_svid_putenv=no
56750 fi
56751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56752   conftest.$ac_objext conftest.beam conftest.$ac_ext
56753 fi
56754
56755
56756 fi
56757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
56758 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
56759   case "$gl_cv_func_svid_putenv" in
56760     *yes) ;;
56761     *)
56762       REPLACE_PUTENV=1
56763       ;;
56764   esac
56765
56766   if test $REPLACE_PUTENV = 1; then
56767
56768
56769
56770
56771
56772
56773
56774
56775   M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
56776
56777
56778   ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
56779 if test "x$ac_cv_have_decl__putenv" = xyes
56780 then :
56781   ac_have_decl=1
56782 else $as_nop
56783   ac_have_decl=0
56784 fi
56785 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
56786
56787
56788   fi
56789
56790
56791
56792
56793
56794
56795
56796
56797
56798     if test "$GL_M4_GNULIB_PUTENV" != 1; then
56799         if test "$GL_M4_GNULIB_PUTENV" = 0; then
56800       GL_M4_GNULIB_PUTENV=$gl_module_indicator_condition
56801     else
56802       GL_M4_GNULIB_PUTENV="($GL_M4_GNULIB_PUTENV || $gl_module_indicator_condition)"
56803     fi
56804   fi
56805
56806
56807
56808
56809
56810 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
56811
56812
56813
56814
56815
56816
56817
56818
56819
56820   :
56821
56822
56823
56824
56825
56826   if { case "$host_os" in mingw*) true;; *) false;; esac; } \
56827      && test $gl_threads_api = windows; then
56828             REPLACE_SCHED_YIELD=1
56829   else
56830     ac_fn_check_decl "$LINENO" "sched_yield" "ac_cv_have_decl_sched_yield" "#include <sched.h>
56831 " "$ac_c_undeclared_builtin_options" "CFLAGS"
56832 if test "x$ac_cv_have_decl_sched_yield" = xyes
56833 then :
56834
56835 else $as_nop
56836   HAVE_SCHED_YIELD=0
56837 fi
56838   fi
56839
56840   if test $HAVE_SCHED_YIELD = 0 || test $REPLACE_SCHED_YIELD = 1; then
56841
56842
56843
56844
56845
56846
56847
56848
56849   M4tests_LIBOBJS="$M4tests_LIBOBJS sched_yield.$ac_objext"
56850
56851   fi
56852
56853
56854
56855
56856
56857
56858
56859
56860
56861     if test "$GL_M4_GNULIB_SCHED_YIELD" != 1; then
56862         if test "$GL_M4_GNULIB_SCHED_YIELD" = 0; then
56863       GL_M4_GNULIB_SCHED_YIELD=$gl_module_indicator_condition
56864     else
56865       GL_M4_GNULIB_SCHED_YIELD="($GL_M4_GNULIB_SCHED_YIELD || $gl_module_indicator_condition)"
56866     fi
56867   fi
56868
56869
56870
56871
56872
56873 printf "%s\n" "#define GNULIB_TEST_SCHED_YIELD 1" >>confdefs.h
56874
56875
56876
56877
56878
56879
56880
56881   if test "$ac_cv_header_winsock2_h" = yes; then
56882     REPLACE_SELECT=1
56883   else
56884
56885     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
56886 printf %s "checking whether select supports a 0 argument... " >&6; }
56887 if test ${gl_cv_func_select_supports0+y}
56888 then :
56889   printf %s "(cached) " >&6
56890 else $as_nop
56891
56892         if test "$cross_compiling" = yes
56893 then :
56894
56895            case "$host_os" in
56896                        # Guess no on Interix.
56897              interix*) gl_cv_func_select_supports0="guessing no";;
56898                        # Guess yes otherwise.
56899              *)        gl_cv_func_select_supports0="guessing yes";;
56900            esac
56901
56902 else $as_nop
56903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56904 /* end confdefs.h.  */
56905
56906 #include <sys/types.h>
56907 #include <sys/time.h>
56908 #if HAVE_SYS_SELECT_H
56909 #include <sys/select.h>
56910 #endif
56911 int main ()
56912 {
56913   struct timeval timeout;
56914   timeout.tv_sec = 0;
56915   timeout.tv_usec = 5;
56916   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
56917 }
56918 _ACEOF
56919 if ac_fn_c_try_run "$LINENO"
56920 then :
56921   gl_cv_func_select_supports0=yes
56922 else $as_nop
56923   gl_cv_func_select_supports0=no
56924 fi
56925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56926   conftest.$ac_objext conftest.beam conftest.$ac_ext
56927 fi
56928
56929
56930 fi
56931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
56932 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
56933     case "$gl_cv_func_select_supports0" in
56934       *yes) ;;
56935       *) REPLACE_SELECT=1 ;;
56936     esac
56937
56938         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
56939 printf %s "checking whether select detects invalid fds... " >&6; }
56940 if test ${gl_cv_func_select_detects_ebadf+y}
56941 then :
56942   printf %s "(cached) " >&6
56943 else $as_nop
56944
56945         if test "$cross_compiling" = yes
56946 then :
56947
56948            case "$host_os" in
56949                              # Guess yes on Linux systems.
56950             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
56951                              # Guess yes on glibc systems.
56952             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
56953                              # If we don't know, obey --enable-cross-guesses.
56954             *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
56955            esac
56956
56957 else $as_nop
56958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56959 /* end confdefs.h.  */
56960
56961 #include <sys/types.h>
56962 #include <sys/time.h>
56963 #if HAVE_SYS_SELECT_H
56964 # include <sys/select.h>
56965 #endif
56966 #include <unistd.h>
56967 #include <errno.h>
56968
56969
56970 $gl_mda_defines
56971
56972 int
56973 main (void)
56974 {
56975
56976   fd_set set;
56977   dup2(0, 16);
56978   FD_ZERO(&set);
56979   FD_SET(16, &set);
56980   close(16);
56981   struct timeval timeout;
56982   timeout.tv_sec = 0;
56983   timeout.tv_usec = 5;
56984   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
56985
56986   ;
56987   return 0;
56988 }
56989 _ACEOF
56990 if ac_fn_c_try_run "$LINENO"
56991 then :
56992   gl_cv_func_select_detects_ebadf=yes
56993 else $as_nop
56994   gl_cv_func_select_detects_ebadf=no
56995 fi
56996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56997   conftest.$ac_objext conftest.beam conftest.$ac_ext
56998 fi
56999
57000
57001 fi
57002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
57003 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
57004     case $gl_cv_func_select_detects_ebadf in
57005       *yes) ;;
57006       *) REPLACE_SELECT=1 ;;
57007     esac
57008   fi
57009
57010     LIB_SELECT="$LIBSOCKET"
57011   if test $REPLACE_SELECT = 1; then
57012     case "$host_os" in
57013       mingw*)
57014                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57015 /* end confdefs.h.  */
57016
57017 #define WIN32_LEAN_AND_MEAN
57018 #include <windows.h>
57019 int
57020 main ()
57021 {
57022   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
57023   return 0;
57024 }
57025 _ACEOF
57026 if ac_fn_c_try_link "$LINENO"
57027 then :
57028
57029 else $as_nop
57030   LIB_SELECT="$LIB_SELECT -luser32"
57031 fi
57032 rm -f core conftest.err conftest.$ac_objext conftest.beam \
57033     conftest$ac_exeext conftest.$ac_ext
57034         ;;
57035     esac
57036   fi
57037
57038
57039   if test $REPLACE_SELECT = 1; then
57040
57041
57042
57043
57044
57045
57046
57047
57048   M4tests_LIBOBJS="$M4tests_LIBOBJS select.$ac_objext"
57049
57050   fi
57051
57052
57053
57054
57055
57056
57057
57058
57059
57060     if test "$GL_M4_GNULIB_SELECT" != 1; then
57061         if test "$GL_M4_GNULIB_SELECT" = 0; then
57062       GL_M4_GNULIB_SELECT=$gl_module_indicator_condition
57063     else
57064       GL_M4_GNULIB_SELECT="($GL_M4_GNULIB_SELECT || $gl_module_indicator_condition)"
57065     fi
57066   fi
57067
57068
57069
57070
57071
57072 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
57073
57074
57075
57076
57077
57078
57079      if test $ac_cv_func_setenv = no; then
57080     HAVE_SETENV=0
57081   else
57082     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
57083 printf %s "checking whether setenv validates arguments... " >&6; }
57084 if test ${gl_cv_func_setenv_works+y}
57085 then :
57086   printf %s "(cached) " >&6
57087 else $as_nop
57088   if test "$cross_compiling" = yes
57089 then :
57090   case "$host_os" in
57091                         # Guess yes on glibc systems.
57092          *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
57093                         # Guess yes on musl systems.
57094          *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
57095                         # If we don't know, obey --enable-cross-guesses.
57096          *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
57097        esac
57098
57099 else $as_nop
57100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57101 /* end confdefs.h.  */
57102
57103        #include <stdlib.h>
57104        #include <errno.h>
57105        #include <string.h>
57106
57107 int
57108 main (void)
57109 {
57110
57111        int result = 0;
57112        {
57113          if (setenv ("", "", 0) != -1)
57114            result |= 1;
57115          else if (errno != EINVAL)
57116            result |= 2;
57117        }
57118        {
57119          if (setenv ("a", "=", 1) != 0)
57120            result |= 4;
57121          else if (strcmp (getenv ("a"), "=") != 0)
57122            result |= 8;
57123        }
57124        return result;
57125
57126   ;
57127   return 0;
57128 }
57129 _ACEOF
57130 if ac_fn_c_try_run "$LINENO"
57131 then :
57132   gl_cv_func_setenv_works=yes
57133 else $as_nop
57134   gl_cv_func_setenv_works=no
57135 fi
57136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57137   conftest.$ac_objext conftest.beam conftest.$ac_ext
57138 fi
57139
57140 fi
57141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
57142 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
57143     case "$gl_cv_func_setenv_works" in
57144       *yes) ;;
57145       *)
57146         REPLACE_SETENV=1
57147         ;;
57148     esac
57149   fi
57150
57151   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
57152
57153
57154
57155
57156
57157
57158
57159
57160   M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
57161
57162   fi
57163
57164
57165
57166
57167
57168
57169
57170
57171
57172     if test "$GL_M4_GNULIB_SETENV" != 1; then
57173         if test "$GL_M4_GNULIB_SETENV" = 0; then
57174       GL_M4_GNULIB_SETENV=$gl_module_indicator_condition
57175     else
57176       GL_M4_GNULIB_SETENV="($GL_M4_GNULIB_SETENV || $gl_module_indicator_condition)"
57177     fi
57178   fi
57179
57180
57181
57182
57183
57184 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
57185
57186
57187
57188
57189
57190
57191   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
57192 printf %s "checking for a traditional french locale... " >&6; }
57193 if test ${gt_cv_locale_fr+y}
57194 then :
57195   printf %s "(cached) " >&6
57196 else $as_nop
57197
57198     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57199 /* end confdefs.h.  */
57200
57201 #include <locale.h>
57202 #include <time.h>
57203 #if HAVE_LANGINFO_CODESET
57204 # include <langinfo.h>
57205 #endif
57206 #include <stdlib.h>
57207 #include <string.h>
57208 struct tm t;
57209 char buf[16];
57210 int main () {
57211   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
57212      imitates locale dependent behaviour by looking at the environment
57213      variables, and all locales use the UTF-8 encoding.  */
57214 #if defined __BEOS__ || defined __HAIKU__
57215   return 1;
57216 #else
57217   /* Check whether the given locale name is recognized by the system.  */
57218 # if defined _WIN32 && !defined __CYGWIN__
57219   /* On native Windows, setlocale(category, "") looks at the system settings,
57220      not at the environment variables.  Also, when an encoding suffix such
57221      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57222      category of the locale to "C".  */
57223   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57224       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57225     return 1;
57226 # else
57227   if (setlocale (LC_ALL, "") == NULL) return 1;
57228 # endif
57229   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57230      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57231      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57232      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57233      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57234      some unit tests fail.
57235      On MirBSD 10, when an unsupported locale is specified, setlocale()
57236      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
57237 # if HAVE_LANGINFO_CODESET
57238   {
57239     const char *cs = nl_langinfo (CODESET);
57240     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57241         || strcmp (cs, "UTF-8") == 0)
57242       return 1;
57243   }
57244 # endif
57245 # ifdef __CYGWIN__
57246   /* On Cygwin, avoid locale names without encoding suffix, because the
57247      locale_charset() function relies on the encoding suffix.  Note that
57248      LC_ALL is set on the command line.  */
57249   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57250 # endif
57251   /* Check whether in the abbreviation of the second month, the second
57252      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
57253      one byte long. This excludes the UTF-8 encoding.  */
57254   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57255   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
57256 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
57257   /* Check whether the decimal separator is a comma.
57258      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
57259      are nl_langinfo(RADIXCHAR) are both ".".  */
57260   if (localeconv () ->decimal_point[0] != ',') return 1;
57261 # endif
57262   return 0;
57263 #endif
57264 }
57265
57266 _ACEOF
57267     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57268   (eval $ac_link) 2>&5
57269   ac_status=$?
57270   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57271   test $ac_status = 0; } && test -s conftest$ac_exeext; then
57272       case "$host_os" in
57273         # Handle native Windows specially, because there setlocale() interprets
57274         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57275         # "fr" or "fra" as "French" or "French_France.1252",
57276         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57277         # "ja" as "Japanese" or "Japanese_Japan.932",
57278         # and similar.
57279         mingw*)
57280           # Test for the native Windows locale name.
57281           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57282             gt_cv_locale_fr=French_France.1252
57283           else
57284             # None found.
57285             gt_cv_locale_fr=none
57286           fi
57287           ;;
57288         *)
57289           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57290           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57291           # configure script would override the LC_ALL setting. Likewise for
57292           # LC_CTYPE, which is also set at the beginning of the configure script.
57293           # Test for the usual locale name.
57294           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57295             gt_cv_locale_fr=fr_FR
57296           else
57297             # Test for the locale name with explicit encoding suffix.
57298             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57299               gt_cv_locale_fr=fr_FR.ISO-8859-1
57300             else
57301               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
57302               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57303                 gt_cv_locale_fr=fr_FR.ISO8859-1
57304               else
57305                 # Test for the HP-UX locale name.
57306                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57307                   gt_cv_locale_fr=fr_FR.iso88591
57308                 else
57309                   # Test for the Solaris 7 locale name.
57310                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57311                     gt_cv_locale_fr=fr
57312                   else
57313                     # None found.
57314                     gt_cv_locale_fr=none
57315                   fi
57316                 fi
57317               fi
57318             fi
57319           fi
57320           ;;
57321       esac
57322     fi
57323     rm -fr conftest*
57324
57325 fi
57326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
57327 printf "%s\n" "$gt_cv_locale_fr" >&6; }
57328   LOCALE_FR=$gt_cv_locale_fr
57329
57330
57331
57332
57333   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
57334 printf %s "checking for a french Unicode locale... " >&6; }
57335 if test ${gt_cv_locale_fr_utf8+y}
57336 then :
57337   printf %s "(cached) " >&6
57338 else $as_nop
57339
57340     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57341 /* end confdefs.h.  */
57342
57343 #include <locale.h>
57344 #include <time.h>
57345 #if HAVE_LANGINFO_CODESET
57346 # include <langinfo.h>
57347 #endif
57348 #include <stdlib.h>
57349 #include <string.h>
57350 struct tm t;
57351 char buf[16];
57352 int main () {
57353   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
57354      imitates locale dependent behaviour by looking at the environment
57355      variables, and all locales use the UTF-8 encoding.  */
57356 #if !(defined __BEOS__ || defined __HAIKU__)
57357   /* Check whether the given locale name is recognized by the system.  */
57358 # if defined _WIN32 && !defined __CYGWIN__
57359   /* On native Windows, setlocale(category, "") looks at the system settings,
57360      not at the environment variables.  Also, when an encoding suffix such
57361      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57362      category of the locale to "C".  */
57363   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57364       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57365     return 1;
57366 # else
57367   if (setlocale (LC_ALL, "") == NULL) return 1;
57368 # endif
57369   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57370      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57371      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57372      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57373      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57374      some unit tests fail.  */
57375 # if HAVE_LANGINFO_CODESET
57376   {
57377     const char *cs = nl_langinfo (CODESET);
57378     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
57379       return 1;
57380   }
57381 # endif
57382 # ifdef __CYGWIN__
57383   /* On Cygwin, avoid locale names without encoding suffix, because the
57384      locale_charset() function relies on the encoding suffix.  Note that
57385      LC_ALL is set on the command line.  */
57386   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57387 # endif
57388   /* Check whether in the abbreviation of the second month, the second
57389      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
57390      two bytes long, with UTF-8 encoding.  */
57391   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57392   if (strftime (buf, sizeof (buf), "%b", &t) < 4
57393       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
57394     return 1;
57395 #endif
57396 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
57397   /* Check whether the decimal separator is a comma.
57398      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
57399      are nl_langinfo(RADIXCHAR) are both ".".  */
57400   if (localeconv () ->decimal_point[0] != ',') return 1;
57401 #endif
57402   return 0;
57403 }
57404
57405 _ACEOF
57406     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57407   (eval $ac_link) 2>&5
57408   ac_status=$?
57409   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57410   test $ac_status = 0; } && test -s conftest$ac_exeext; then
57411       case "$host_os" in
57412         # Handle native Windows specially, because there setlocale() interprets
57413         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57414         # "fr" or "fra" as "French" or "French_France.1252",
57415         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57416         # "ja" as "Japanese" or "Japanese_Japan.932",
57417         # and similar.
57418         mingw*)
57419           # Test for the hypothetical native Windows locale name.
57420           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57421             gt_cv_locale_fr_utf8=French_France.65001
57422           else
57423             # None found.
57424             gt_cv_locale_fr_utf8=none
57425           fi
57426           ;;
57427         *)
57428           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57429           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57430           # configure script would override the LC_ALL setting. Likewise for
57431           # LC_CTYPE, which is also set at the beginning of the configure script.
57432           # Test for the usual locale name.
57433           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57434             gt_cv_locale_fr_utf8=fr_FR
57435           else
57436             # Test for the locale name with explicit encoding suffix.
57437             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57438               gt_cv_locale_fr_utf8=fr_FR.UTF-8
57439             else
57440               # Test for the Solaris 7 locale name.
57441               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57442                 gt_cv_locale_fr_utf8=fr.UTF-8
57443               else
57444                 # None found.
57445                 gt_cv_locale_fr_utf8=none
57446               fi
57447             fi
57448           fi
57449           ;;
57450       esac
57451     fi
57452     rm -fr conftest*
57453
57454 fi
57455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
57456 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
57457   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
57458
57459
57460
57461
57462
57463   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
57464 printf %s "checking for a traditional japanese locale... " >&6; }
57465 if test ${gt_cv_locale_ja+y}
57466 then :
57467   printf %s "(cached) " >&6
57468 else $as_nop
57469
57470     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57471 /* end confdefs.h.  */
57472
57473 #include <locale.h>
57474 #include <time.h>
57475 #if HAVE_LANGINFO_CODESET
57476 # include <langinfo.h>
57477 #endif
57478 #include <stdlib.h>
57479 #include <string.h>
57480 struct tm t;
57481 char buf[16];
57482 int main ()
57483 {
57484   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
57485      imitates locale dependent behaviour by looking at the environment
57486      variables, and all locales use the UTF-8 encoding.  */
57487 #if defined __BEOS__ || defined __HAIKU__
57488   return 1;
57489 #else
57490   /* Check whether the given locale name is recognized by the system.  */
57491 # if defined _WIN32 && !defined __CYGWIN__
57492   /* On native Windows, setlocale(category, "") looks at the system settings,
57493      not at the environment variables.  Also, when an encoding suffix such
57494      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57495      category of the locale to "C".  */
57496   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57497       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57498     return 1;
57499 # else
57500   if (setlocale (LC_ALL, "") == NULL) return 1;
57501 # endif
57502   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57503      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57504      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57505      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57506      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57507      some unit tests fail.
57508      On MirBSD 10, when an unsupported locale is specified, setlocale()
57509      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
57510 # if HAVE_LANGINFO_CODESET
57511   {
57512     const char *cs = nl_langinfo (CODESET);
57513     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57514         || strcmp (cs, "UTF-8") == 0)
57515       return 1;
57516   }
57517 # endif
57518 # ifdef __CYGWIN__
57519   /* On Cygwin, avoid locale names without encoding suffix, because the
57520      locale_charset() function relies on the encoding suffix.  Note that
57521      LC_ALL is set on the command line.  */
57522   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57523 # endif
57524   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
57525      on Cygwin 1.5.x.  */
57526   if (MB_CUR_MAX == 1)
57527     return 1;
57528   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
57529      This excludes the UTF-8 encoding (except on MirBSD).  */
57530   {
57531     const char *p;
57532     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57533     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
57534     for (p = buf; *p != '\0'; p++)
57535       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
57536         return 1;
57537   }
57538   return 0;
57539 #endif
57540 }
57541
57542 _ACEOF
57543     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57544   (eval $ac_link) 2>&5
57545   ac_status=$?
57546   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57547   test $ac_status = 0; } && test -s conftest$ac_exeext; then
57548       case "$host_os" in
57549         # Handle native Windows specially, because there setlocale() interprets
57550         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57551         # "fr" or "fra" as "French" or "French_France.1252",
57552         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57553         # "ja" as "Japanese" or "Japanese_Japan.932",
57554         # and similar.
57555         mingw*)
57556           # Note that on native Windows, the Japanese locale is
57557           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
57558           # cannot use it here.
57559           gt_cv_locale_ja=none
57560           ;;
57561         *)
57562           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57563           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57564           # configure script would override the LC_ALL setting. Likewise for
57565           # LC_CTYPE, which is also set at the beginning of the configure script.
57566           # Test for the AIX locale name.
57567           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57568             gt_cv_locale_ja=ja_JP
57569           else
57570             # Test for the locale name with explicit encoding suffix.
57571             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57572               gt_cv_locale_ja=ja_JP.EUC-JP
57573             else
57574               # Test for the HP-UX, OSF/1, NetBSD locale name.
57575               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57576                 gt_cv_locale_ja=ja_JP.eucJP
57577               else
57578                 # Test for the IRIX, FreeBSD locale name.
57579                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57580                   gt_cv_locale_ja=ja_JP.EUC
57581                 else
57582                   # Test for the Solaris 7 locale name.
57583                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57584                     gt_cv_locale_ja=ja
57585                   else
57586                     # Special test for NetBSD 1.6.
57587                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
57588                       gt_cv_locale_ja=ja_JP.eucJP
57589                     else
57590                       # None found.
57591                       gt_cv_locale_ja=none
57592                     fi
57593                   fi
57594                 fi
57595               fi
57596             fi
57597           fi
57598           ;;
57599       esac
57600     fi
57601     rm -fr conftest*
57602
57603 fi
57604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
57605 printf "%s\n" "$gt_cv_locale_ja" >&6; }
57606   LOCALE_JA=$gt_cv_locale_ja
57607
57608
57609
57610
57611
57612   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
57613 printf %s "checking for a transitional chinese locale... " >&6; }
57614 if test ${gt_cv_locale_zh_CN+y}
57615 then :
57616   printf %s "(cached) " >&6
57617 else $as_nop
57618
57619     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57620 /* end confdefs.h.  */
57621
57622 #include <locale.h>
57623 #include <stdlib.h>
57624 #include <time.h>
57625 #if HAVE_LANGINFO_CODESET
57626 # include <langinfo.h>
57627 #endif
57628 #include <stdlib.h>
57629 #include <string.h>
57630 struct tm t;
57631 char buf[16];
57632 int main ()
57633 {
57634   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
57635      imitates locale dependent behaviour by looking at the environment
57636      variables, and all locales use the UTF-8 encoding.  */
57637 #if defined __BEOS__ || defined __HAIKU__
57638   return 1;
57639 #else
57640   /* Check whether the given locale name is recognized by the system.  */
57641 # if defined _WIN32 && !defined __CYGWIN__
57642   /* On native Windows, setlocale(category, "") looks at the system settings,
57643      not at the environment variables.  Also, when an encoding suffix such
57644      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57645      category of the locale to "C".  */
57646   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57647       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57648     return 1;
57649 # else
57650   if (setlocale (LC_ALL, "") == NULL) return 1;
57651 # endif
57652   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57653      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57654      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57655      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57656      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57657      some unit tests fail.
57658      On MirBSD 10, when an unsupported locale is specified, setlocale()
57659      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
57660 # if HAVE_LANGINFO_CODESET
57661   {
57662     const char *cs = nl_langinfo (CODESET);
57663     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57664         || strcmp (cs, "UTF-8") == 0)
57665       return 1;
57666   }
57667 # endif
57668 # ifdef __CYGWIN__
57669   /* On Cygwin, avoid locale names without encoding suffix, because the
57670      locale_charset() function relies on the encoding suffix.  Note that
57671      LC_ALL is set on the command line.  */
57672   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57673 # endif
57674   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
57675      This excludes the UTF-8 encoding (except on MirBSD).  */
57676   {
57677     const char *p;
57678     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57679     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
57680     for (p = buf; *p != '\0'; p++)
57681       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
57682         return 1;
57683   }
57684   /* Check whether a typical GB18030 multibyte sequence is recognized as a
57685      single wide character.  This excludes the GB2312 and GBK encodings.  */
57686   if (mblen ("\203\062\332\066", 5) != 4)
57687     return 1;
57688   return 0;
57689 #endif
57690 }
57691
57692 _ACEOF
57693     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57694   (eval $ac_link) 2>&5
57695   ac_status=$?
57696   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57697   test $ac_status = 0; } && test -s conftest$ac_exeext; then
57698       case "$host_os" in
57699         # Handle native Windows specially, because there setlocale() interprets
57700         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57701         # "fr" or "fra" as "French" or "French_France.1252",
57702         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57703         # "ja" as "Japanese" or "Japanese_Japan.932",
57704         # and similar.
57705         mingw*)
57706           # Test for the hypothetical native Windows locale name.
57707           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57708             gt_cv_locale_zh_CN=Chinese_China.54936
57709           else
57710             # None found.
57711             gt_cv_locale_zh_CN=none
57712           fi
57713           ;;
57714         solaris2.8)
57715           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
57716           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
57717           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
57718           gt_cv_locale_zh_CN=none
57719           ;;
57720         *)
57721           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57722           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57723           # configure script would override the LC_ALL setting. Likewise for
57724           # LC_CTYPE, which is also set at the beginning of the configure script.
57725           # Test for the locale name without encoding suffix.
57726           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57727             gt_cv_locale_zh_CN=zh_CN
57728           else
57729             # Test for the locale name with explicit encoding suffix.
57730             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57731               gt_cv_locale_zh_CN=zh_CN.GB18030
57732             else
57733               # None found.
57734               gt_cv_locale_zh_CN=none
57735             fi
57736           fi
57737           ;;
57738       esac
57739     else
57740       # If there was a link error, due to mblen(), the system is so old that
57741       # it certainly doesn't have a chinese locale.
57742       gt_cv_locale_zh_CN=none
57743     fi
57744     rm -fr conftest*
57745
57746 fi
57747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
57748 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
57749   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
57750
57751
57752
57753   if test "$ac_cv_header_winsock2_h" = yes; then
57754
57755
57756
57757
57758
57759
57760
57761
57762   M4tests_LIBOBJS="$M4tests_LIBOBJS setsockopt.$ac_objext"
57763
57764   fi
57765
57766
57767
57768
57769
57770
57771
57772
57773
57774     if test "$GL_M4_GNULIB_SETSOCKOPT" != 1; then
57775         if test "$GL_M4_GNULIB_SETSOCKOPT" = 0; then
57776       GL_M4_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
57777     else
57778       GL_M4_GNULIB_SETSOCKOPT="($GL_M4_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
57779     fi
57780   fi
57781
57782
57783
57784
57785
57786 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
57787
57788
57789
57790
57791
57792
57793
57794
57795
57796
57797                ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
57798 " "$ac_c_undeclared_builtin_options" "CFLAGS"
57799 if test "x$ac_cv_have_decl_sleep" = xyes
57800 then :
57801   ac_have_decl=1
57802 else $as_nop
57803   ac_have_decl=0
57804 fi
57805 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
57806
57807
57808   if test $ac_cv_have_decl_sleep != yes; then
57809     HAVE_SLEEP=0
57810   else
57811         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
57812 printf %s "checking for working sleep... " >&6; }
57813 if test ${gl_cv_func_sleep_works+y}
57814 then :
57815   printf %s "(cached) " >&6
57816 else $as_nop
57817   if test "$cross_compiling" = yes
57818 then :
57819   case "$host_os" in
57820                         # Guess yes on glibc systems.
57821          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
57822                         # Guess yes on musl systems.
57823          *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
57824                         # Guess no on native Windows.
57825          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
57826                         # If we don't know, obey --enable-cross-guesses.
57827          *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
57828        esac
57829
57830 else $as_nop
57831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57832 /* end confdefs.h.  */
57833
57834 #include <errno.h>
57835 #include <unistd.h>
57836 #include <signal.h>
57837 static void
57838 handle_alarm (int sig)
57839 {
57840   if (sig != SIGALRM)
57841     _exit (2);
57842 }
57843
57844 int
57845 main (void)
57846 {
57847
57848     /* Failure to compile this test due to missing alarm is okay,
57849        since all such platforms (mingw) also lack sleep.  */
57850     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
57851     unsigned int remaining;
57852     signal (SIGALRM, handle_alarm);
57853     alarm (1);
57854     remaining = sleep (pentecost);
57855     if (remaining > pentecost)
57856       return 3;
57857     if (remaining <= pentecost - 10)
57858       return 4;
57859     return 0;
57860
57861   ;
57862   return 0;
57863 }
57864 _ACEOF
57865 if ac_fn_c_try_run "$LINENO"
57866 then :
57867   gl_cv_func_sleep_works=yes
57868 else $as_nop
57869   gl_cv_func_sleep_works=no
57870 fi
57871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57872   conftest.$ac_objext conftest.beam conftest.$ac_ext
57873 fi
57874
57875 fi
57876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
57877 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
57878     case "$gl_cv_func_sleep_works" in
57879       *yes) ;;
57880       *)
57881         REPLACE_SLEEP=1
57882         ;;
57883     esac
57884   fi
57885
57886   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
57887
57888
57889
57890
57891
57892
57893
57894
57895   M4tests_LIBOBJS="$M4tests_LIBOBJS sleep.$ac_objext"
57896
57897   fi
57898
57899
57900
57901
57902
57903
57904
57905
57906
57907     if test "$GL_M4_GNULIB_SLEEP" != 1; then
57908         if test "$GL_M4_GNULIB_SLEEP" = 0; then
57909       GL_M4_GNULIB_SLEEP=$gl_module_indicator_condition
57910     else
57911       GL_M4_GNULIB_SLEEP="($GL_M4_GNULIB_SLEEP || $gl_module_indicator_condition)"
57912     fi
57913   fi
57914
57915
57916
57917
57918
57919 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
57920
57921
57922
57923
57924
57925   if test "$ac_cv_header_winsock2_h" = yes; then
57926
57927
57928
57929
57930
57931
57932
57933
57934   M4tests_LIBOBJS="$M4tests_LIBOBJS socket.$ac_objext"
57935
57936   fi
57937   # When this module is used, sockets may actually occur as file descriptors,
57938   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
57939
57940
57941
57942
57943
57944
57945
57946
57947
57948
57949
57950   if test "$ac_cv_header_winsock2_h" = yes; then
57951     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
57952     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
57953   fi
57954
57955
57956
57957
57958
57959
57960
57961
57962
57963     if test "$GL_M4_GNULIB_SOCKET" != 1; then
57964         if test "$GL_M4_GNULIB_SOCKET" = 0; then
57965       GL_M4_GNULIB_SOCKET=$gl_module_indicator_condition
57966     else
57967       GL_M4_GNULIB_SOCKET="($GL_M4_GNULIB_SOCKET || $gl_module_indicator_condition)"
57968     fi
57969   fi
57970
57971
57972
57973
57974
57975 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
57976
57977
57978
57979
57980
57981      ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
57982 /* <sys/types.h> is not needed according to POSIX, but the
57983    <sys/socket.h> in i386-unknown-freebsd4.10 and
57984    powerpc-apple-darwin5.5 required it. */
57985 #include <sys/types.h>
57986 #if HAVE_SYS_SOCKET_H
57987 # include <sys/socket.h>
57988 #elif HAVE_WS2TCPIP_H
57989 # include <ws2tcpip.h>
57990 #endif
57991
57992 "
57993 if test "x$ac_cv_type_socklen_t" = xyes
57994 then :
57995
57996 else $as_nop
57997   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
57998 printf %s "checking for socklen_t equivalent... " >&6; }
57999 if test ${gl_cv_socklen_t_equiv+y}
58000 then :
58001   printf %s "(cached) " >&6
58002 else $as_nop
58003   # Systems have either "struct sockaddr *" or
58004          # "void *" as the second argument to getpeername
58005          gl_cv_socklen_t_equiv=
58006          for arg2 in "struct sockaddr" void; do
58007            for t in int size_t "unsigned int" "long int" "unsigned long int"; do
58008              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58009 /* end confdefs.h.  */
58010 #include <sys/types.h>
58011                    #include <sys/socket.h>
58012
58013                    int getpeername (int, $arg2 *, $t *);
58014 int
58015 main (void)
58016 {
58017 $t len;
58018                   getpeername (0, 0, &len);
58019   ;
58020   return 0;
58021 }
58022 _ACEOF
58023 if ac_fn_c_try_compile "$LINENO"
58024 then :
58025   gl_cv_socklen_t_equiv="$t"
58026 fi
58027 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58028              test "$gl_cv_socklen_t_equiv" != "" && break
58029            done
58030            test "$gl_cv_socklen_t_equiv" != "" && break
58031          done
58032          if test "$gl_cv_socklen_t_equiv" = ""; then
58033            as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
58034          fi
58035
58036 fi
58037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
58038 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
58039
58040 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
58041
58042 fi
58043
58044
58045
58046
58047
58048
58049
58050
58051
58052
58053   if test $ac_cv_have_decl_strerror_r = no; then
58054     HAVE_DECL_STRERROR_R=0
58055   fi
58056
58057   if test $ac_cv_func_strerror_r = yes; then
58058     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
58059       if test $gl_cv_func_strerror_r_posix_signature = yes; then
58060         case "$gl_cv_func_strerror_r_works" in
58061                     *no) REPLACE_STRERROR_R=1 ;;
58062         esac
58063       else
58064                 REPLACE_STRERROR_R=1
58065       fi
58066     else
58067                   REPLACE_STRERROR_R=1
58068     fi
58069   fi
58070
58071   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
58072
58073
58074
58075
58076
58077
58078
58079
58080   M4tests_LIBOBJS="$M4tests_LIBOBJS strerror_r.$ac_objext"
58081
58082
58083
58084
58085
58086
58087   fi
58088
58089
58090
58091
58092
58093
58094
58095
58096
58097     if test "$GL_M4_GNULIB_STRERROR_R" != 1; then
58098         if test "$GL_M4_GNULIB_STRERROR_R" = 0; then
58099       GL_M4_GNULIB_STRERROR_R=$gl_module_indicator_condition
58100     else
58101       GL_M4_GNULIB_STRERROR_R="($GL_M4_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
58102     fi
58103   fi
58104
58105
58106
58107
58108
58109 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
58110
58111
58112
58113
58114
58115 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
58116
58117
58118
58119
58120
58121
58122
58123
58124
58125
58126
58127
58128   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
58129 printf %s "checking for a traditional french locale... " >&6; }
58130 if test ${gt_cv_locale_fr+y}
58131 then :
58132   printf %s "(cached) " >&6
58133 else $as_nop
58134
58135     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58136 /* end confdefs.h.  */
58137
58138 #include <locale.h>
58139 #include <time.h>
58140 #if HAVE_LANGINFO_CODESET
58141 # include <langinfo.h>
58142 #endif
58143 #include <stdlib.h>
58144 #include <string.h>
58145 struct tm t;
58146 char buf[16];
58147 int main () {
58148   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
58149      imitates locale dependent behaviour by looking at the environment
58150      variables, and all locales use the UTF-8 encoding.  */
58151 #if defined __BEOS__ || defined __HAIKU__
58152   return 1;
58153 #else
58154   /* Check whether the given locale name is recognized by the system.  */
58155 # if defined _WIN32 && !defined __CYGWIN__
58156   /* On native Windows, setlocale(category, "") looks at the system settings,
58157      not at the environment variables.  Also, when an encoding suffix such
58158      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58159      category of the locale to "C".  */
58160   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58161       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58162     return 1;
58163 # else
58164   if (setlocale (LC_ALL, "") == NULL) return 1;
58165 # endif
58166   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58167      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58168      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58169      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58170      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58171      some unit tests fail.
58172      On MirBSD 10, when an unsupported locale is specified, setlocale()
58173      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
58174 # if HAVE_LANGINFO_CODESET
58175   {
58176     const char *cs = nl_langinfo (CODESET);
58177     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
58178         || strcmp (cs, "UTF-8") == 0)
58179       return 1;
58180   }
58181 # endif
58182 # ifdef __CYGWIN__
58183   /* On Cygwin, avoid locale names without encoding suffix, because the
58184      locale_charset() function relies on the encoding suffix.  Note that
58185      LC_ALL is set on the command line.  */
58186   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58187 # endif
58188   /* Check whether in the abbreviation of the second month, the second
58189      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
58190      one byte long. This excludes the UTF-8 encoding.  */
58191   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58192   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
58193 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
58194   /* Check whether the decimal separator is a comma.
58195      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58196      are nl_langinfo(RADIXCHAR) are both ".".  */
58197   if (localeconv () ->decimal_point[0] != ',') return 1;
58198 # endif
58199   return 0;
58200 #endif
58201 }
58202
58203 _ACEOF
58204     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58205   (eval $ac_link) 2>&5
58206   ac_status=$?
58207   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58208   test $ac_status = 0; } && test -s conftest$ac_exeext; then
58209       case "$host_os" in
58210         # Handle native Windows specially, because there setlocale() interprets
58211         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58212         # "fr" or "fra" as "French" or "French_France.1252",
58213         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58214         # "ja" as "Japanese" or "Japanese_Japan.932",
58215         # and similar.
58216         mingw*)
58217           # Test for the native Windows locale name.
58218           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58219             gt_cv_locale_fr=French_France.1252
58220           else
58221             # None found.
58222             gt_cv_locale_fr=none
58223           fi
58224           ;;
58225         *)
58226           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58227           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58228           # configure script would override the LC_ALL setting. Likewise for
58229           # LC_CTYPE, which is also set at the beginning of the configure script.
58230           # Test for the usual locale name.
58231           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58232             gt_cv_locale_fr=fr_FR
58233           else
58234             # Test for the locale name with explicit encoding suffix.
58235             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58236               gt_cv_locale_fr=fr_FR.ISO-8859-1
58237             else
58238               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
58239               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58240                 gt_cv_locale_fr=fr_FR.ISO8859-1
58241               else
58242                 # Test for the HP-UX locale name.
58243                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58244                   gt_cv_locale_fr=fr_FR.iso88591
58245                 else
58246                   # Test for the Solaris 7 locale name.
58247                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58248                     gt_cv_locale_fr=fr
58249                   else
58250                     # None found.
58251                     gt_cv_locale_fr=none
58252                   fi
58253                 fi
58254               fi
58255             fi
58256           fi
58257           ;;
58258       esac
58259     fi
58260     rm -fr conftest*
58261
58262 fi
58263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
58264 printf "%s\n" "$gt_cv_locale_fr" >&6; }
58265   LOCALE_FR=$gt_cv_locale_fr
58266
58267
58268
58269
58270   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
58271 printf %s "checking for a french Unicode locale... " >&6; }
58272 if test ${gt_cv_locale_fr_utf8+y}
58273 then :
58274   printf %s "(cached) " >&6
58275 else $as_nop
58276
58277     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58278 /* end confdefs.h.  */
58279
58280 #include <locale.h>
58281 #include <time.h>
58282 #if HAVE_LANGINFO_CODESET
58283 # include <langinfo.h>
58284 #endif
58285 #include <stdlib.h>
58286 #include <string.h>
58287 struct tm t;
58288 char buf[16];
58289 int main () {
58290   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
58291      imitates locale dependent behaviour by looking at the environment
58292      variables, and all locales use the UTF-8 encoding.  */
58293 #if !(defined __BEOS__ || defined __HAIKU__)
58294   /* Check whether the given locale name is recognized by the system.  */
58295 # if defined _WIN32 && !defined __CYGWIN__
58296   /* On native Windows, setlocale(category, "") looks at the system settings,
58297      not at the environment variables.  Also, when an encoding suffix such
58298      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58299      category of the locale to "C".  */
58300   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58301       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58302     return 1;
58303 # else
58304   if (setlocale (LC_ALL, "") == NULL) return 1;
58305 # endif
58306   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58307      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58308      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58309      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58310      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58311      some unit tests fail.  */
58312 # if HAVE_LANGINFO_CODESET
58313   {
58314     const char *cs = nl_langinfo (CODESET);
58315     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
58316       return 1;
58317   }
58318 # endif
58319 # ifdef __CYGWIN__
58320   /* On Cygwin, avoid locale names without encoding suffix, because the
58321      locale_charset() function relies on the encoding suffix.  Note that
58322      LC_ALL is set on the command line.  */
58323   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58324 # endif
58325   /* Check whether in the abbreviation of the second month, the second
58326      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
58327      two bytes long, with UTF-8 encoding.  */
58328   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58329   if (strftime (buf, sizeof (buf), "%b", &t) < 4
58330       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
58331     return 1;
58332 #endif
58333 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
58334   /* Check whether the decimal separator is a comma.
58335      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58336      are nl_langinfo(RADIXCHAR) are both ".".  */
58337   if (localeconv () ->decimal_point[0] != ',') return 1;
58338 #endif
58339   return 0;
58340 }
58341
58342 _ACEOF
58343     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58344   (eval $ac_link) 2>&5
58345   ac_status=$?
58346   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58347   test $ac_status = 0; } && test -s conftest$ac_exeext; then
58348       case "$host_os" in
58349         # Handle native Windows specially, because there setlocale() interprets
58350         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58351         # "fr" or "fra" as "French" or "French_France.1252",
58352         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58353         # "ja" as "Japanese" or "Japanese_Japan.932",
58354         # and similar.
58355         mingw*)
58356           # Test for the hypothetical native Windows locale name.
58357           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58358             gt_cv_locale_fr_utf8=French_France.65001
58359           else
58360             # None found.
58361             gt_cv_locale_fr_utf8=none
58362           fi
58363           ;;
58364         *)
58365           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58366           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58367           # configure script would override the LC_ALL setting. Likewise for
58368           # LC_CTYPE, which is also set at the beginning of the configure script.
58369           # Test for the usual locale name.
58370           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58371             gt_cv_locale_fr_utf8=fr_FR
58372           else
58373             # Test for the locale name with explicit encoding suffix.
58374             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58375               gt_cv_locale_fr_utf8=fr_FR.UTF-8
58376             else
58377               # Test for the Solaris 7 locale name.
58378               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58379                 gt_cv_locale_fr_utf8=fr.UTF-8
58380               else
58381                 # None found.
58382                 gt_cv_locale_fr_utf8=none
58383               fi
58384             fi
58385           fi
58386           ;;
58387       esac
58388     fi
58389     rm -fr conftest*
58390
58391 fi
58392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
58393 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
58394   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
58395
58396
58397
58398
58399
58400         if test $ac_cv_func_symlink = no; then
58401     HAVE_SYMLINK=0
58402   else
58403     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
58404 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
58405 if test ${gl_cv_func_symlink_works+y}
58406 then :
58407   printf %s "(cached) " >&6
58408 else $as_nop
58409   if test "$cross_compiling" = yes
58410 then :
58411   case "$host_os" in
58412                              # Guess yes on Linux systems.
58413             linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
58414                              # Guess yes on glibc systems.
58415             *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
58416                              # If we don't know, obey --enable-cross-guesses.
58417             *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
58418           esac
58419
58420 else $as_nop
58421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58422 /* end confdefs.h.  */
58423 #include <unistd.h>
58424
58425 int
58426 main (void)
58427 {
58428 int result = 0;
58429              if (!symlink ("a", "conftest.link/"))
58430                result |= 1;
58431              if (symlink ("conftest.f", "conftest.lnk2"))
58432                result |= 2;
58433              else if (!symlink ("a", "conftest.lnk2/"))
58434                result |= 4;
58435              return result;
58436
58437   ;
58438   return 0;
58439 }
58440 _ACEOF
58441 if ac_fn_c_try_run "$LINENO"
58442 then :
58443   gl_cv_func_symlink_works=yes
58444 else $as_nop
58445   gl_cv_func_symlink_works=no
58446 fi
58447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58448   conftest.$ac_objext conftest.beam conftest.$ac_ext
58449 fi
58450
58451       rm -f conftest.f conftest.link conftest.lnk2
58452 fi
58453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
58454 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
58455     case "$gl_cv_func_symlink_works" in
58456       *yes) ;;
58457       *)
58458         REPLACE_SYMLINK=1
58459         ;;
58460     esac
58461   fi
58462
58463   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
58464
58465
58466
58467
58468
58469
58470
58471
58472   M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
58473
58474   fi
58475
58476
58477
58478
58479
58480
58481
58482
58483
58484     if test "$GL_M4_GNULIB_SYMLINK" != 1; then
58485         if test "$GL_M4_GNULIB_SYMLINK" = 0; then
58486       GL_M4_GNULIB_SYMLINK=$gl_module_indicator_condition
58487     else
58488       GL_M4_GNULIB_SYMLINK="($GL_M4_GNULIB_SYMLINK || $gl_module_indicator_condition)"
58489     fi
58490   fi
58491
58492
58493
58494
58495
58496 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
58497
58498
58499
58500
58501
58502
58503
58504
58505
58506
58507
58508
58509
58510
58511
58512
58513
58514
58515
58516
58517
58518
58519
58520
58521
58522
58523
58524
58525
58526
58527
58528
58529
58530
58531
58532
58533
58534
58535
58536
58537
58538
58539   if test $gl_threads_api = posix; then
58540     gl_save_LIBS="$LIBS"
58541     LIBS="$LIBS $LIBMULTITHREAD"
58542     ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
58543 if test "x$ac_cv_func_pthread_atfork" = xyes
58544 then :
58545   printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
58546
58547 fi
58548
58549     LIBS="$gl_save_LIBS"
58550   fi
58551
58552
58553
58554
58555   if test $ac_cv_have_decl_unsetenv = no; then
58556     HAVE_DECL_UNSETENV=0
58557   fi
58558   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
58559 if test "x$ac_cv_func_unsetenv" = xyes
58560 then :
58561   printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
58562
58563 fi
58564
58565   if test $ac_cv_func_unsetenv = no; then
58566     HAVE_UNSETENV=0
58567   else
58568     HAVE_UNSETENV=1
58569         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
58570 printf %s "checking for unsetenv() return type... " >&6; }
58571 if test ${gt_cv_func_unsetenv_ret+y}
58572 then :
58573   printf %s "(cached) " >&6
58574 else $as_nop
58575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58576 /* end confdefs.h.  */
58577
58578 #undef _BSD
58579 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
58580 #include <stdlib.h>
58581 extern
58582 #ifdef __cplusplus
58583 "C"
58584 #endif
58585 int unsetenv (const char *name);
58586
58587 int
58588 main (void)
58589 {
58590
58591   ;
58592   return 0;
58593 }
58594 _ACEOF
58595 if ac_fn_c_try_compile "$LINENO"
58596 then :
58597   gt_cv_func_unsetenv_ret='int'
58598 else $as_nop
58599   gt_cv_func_unsetenv_ret='void'
58600 fi
58601 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58602 fi
58603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
58604 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
58605     if test $gt_cv_func_unsetenv_ret = 'void'; then
58606
58607 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
58608
58609       REPLACE_UNSETENV=1
58610     fi
58611
58612                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
58613 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
58614 if test ${gl_cv_func_unsetenv_works+y}
58615 then :
58616   printf %s "(cached) " >&6
58617 else $as_nop
58618   if test "$cross_compiling" = yes
58619 then :
58620   case "$host_os" in
58621                     # Guess yes on glibc systems.
58622             *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
58623                     # If we don't know, obey --enable-cross-guesses.
58624             *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
58625           esac
58626
58627 else $as_nop
58628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58629 /* end confdefs.h.  */
58630
58631             #include <stdlib.h>
58632             #include <errno.h>
58633             extern char **environ;
58634
58635
58636 $gl_mda_defines
58637
58638 int
58639 main (void)
58640 {
58641
58642             char entry1[] = "a=1";
58643             char entry2[] = "b=2";
58644             char *env[] = { entry1, entry2, NULL };
58645             if (putenv ((char *) "a=1")) return 1;
58646             if (putenv (entry2)) return 2;
58647             entry2[0] = 'a';
58648             unsetenv ("a");
58649             if (getenv ("a")) return 3;
58650             if (!unsetenv ("") || errno != EINVAL) return 4;
58651             entry2[0] = 'b';
58652             environ = env;
58653             if (!getenv ("a")) return 5;
58654             entry2[0] = 'a';
58655             unsetenv ("a");
58656             if (getenv ("a")) return 6;
58657
58658   ;
58659   return 0;
58660 }
58661 _ACEOF
58662 if ac_fn_c_try_run "$LINENO"
58663 then :
58664   gl_cv_func_unsetenv_works=yes
58665 else $as_nop
58666   gl_cv_func_unsetenv_works=no
58667 fi
58668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58669   conftest.$ac_objext conftest.beam conftest.$ac_ext
58670 fi
58671
58672
58673 fi
58674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
58675 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
58676     case "$gl_cv_func_unsetenv_works" in
58677       *yes) ;;
58678       *)
58679         REPLACE_UNSETENV=1
58680         ;;
58681     esac
58682   fi
58683
58684   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
58685
58686
58687
58688
58689
58690
58691
58692
58693   M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
58694
58695
58696
58697
58698
58699   fi
58700
58701
58702
58703
58704
58705
58706
58707
58708
58709     if test "$GL_M4_GNULIB_UNSETENV" != 1; then
58710         if test "$GL_M4_GNULIB_UNSETENV" = 0; then
58711       GL_M4_GNULIB_UNSETENV=$gl_module_indicator_condition
58712     else
58713       GL_M4_GNULIB_UNSETENV="($GL_M4_GNULIB_UNSETENV || $gl_module_indicator_condition)"
58714     fi
58715   fi
58716
58717
58718
58719
58720
58721 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
58722
58723
58724
58725   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
58726
58727
58728   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
58729
58730
58731
58732
58733
58734
58735
58736   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
58737 printf %s "checking for a traditional french locale... " >&6; }
58738 if test ${gt_cv_locale_fr+y}
58739 then :
58740   printf %s "(cached) " >&6
58741 else $as_nop
58742
58743     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58744 /* end confdefs.h.  */
58745
58746 #include <locale.h>
58747 #include <time.h>
58748 #if HAVE_LANGINFO_CODESET
58749 # include <langinfo.h>
58750 #endif
58751 #include <stdlib.h>
58752 #include <string.h>
58753 struct tm t;
58754 char buf[16];
58755 int main () {
58756   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
58757      imitates locale dependent behaviour by looking at the environment
58758      variables, and all locales use the UTF-8 encoding.  */
58759 #if defined __BEOS__ || defined __HAIKU__
58760   return 1;
58761 #else
58762   /* Check whether the given locale name is recognized by the system.  */
58763 # if defined _WIN32 && !defined __CYGWIN__
58764   /* On native Windows, setlocale(category, "") looks at the system settings,
58765      not at the environment variables.  Also, when an encoding suffix such
58766      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58767      category of the locale to "C".  */
58768   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58769       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58770     return 1;
58771 # else
58772   if (setlocale (LC_ALL, "") == NULL) return 1;
58773 # endif
58774   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58775      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58776      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58777      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58778      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58779      some unit tests fail.
58780      On MirBSD 10, when an unsupported locale is specified, setlocale()
58781      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
58782 # if HAVE_LANGINFO_CODESET
58783   {
58784     const char *cs = nl_langinfo (CODESET);
58785     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
58786         || strcmp (cs, "UTF-8") == 0)
58787       return 1;
58788   }
58789 # endif
58790 # ifdef __CYGWIN__
58791   /* On Cygwin, avoid locale names without encoding suffix, because the
58792      locale_charset() function relies on the encoding suffix.  Note that
58793      LC_ALL is set on the command line.  */
58794   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58795 # endif
58796   /* Check whether in the abbreviation of the second month, the second
58797      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
58798      one byte long. This excludes the UTF-8 encoding.  */
58799   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58800   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
58801 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
58802   /* Check whether the decimal separator is a comma.
58803      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58804      are nl_langinfo(RADIXCHAR) are both ".".  */
58805   if (localeconv () ->decimal_point[0] != ',') return 1;
58806 # endif
58807   return 0;
58808 #endif
58809 }
58810
58811 _ACEOF
58812     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58813   (eval $ac_link) 2>&5
58814   ac_status=$?
58815   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58816   test $ac_status = 0; } && test -s conftest$ac_exeext; then
58817       case "$host_os" in
58818         # Handle native Windows specially, because there setlocale() interprets
58819         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58820         # "fr" or "fra" as "French" or "French_France.1252",
58821         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58822         # "ja" as "Japanese" or "Japanese_Japan.932",
58823         # and similar.
58824         mingw*)
58825           # Test for the native Windows locale name.
58826           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58827             gt_cv_locale_fr=French_France.1252
58828           else
58829             # None found.
58830             gt_cv_locale_fr=none
58831           fi
58832           ;;
58833         *)
58834           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58835           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58836           # configure script would override the LC_ALL setting. Likewise for
58837           # LC_CTYPE, which is also set at the beginning of the configure script.
58838           # Test for the usual locale name.
58839           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58840             gt_cv_locale_fr=fr_FR
58841           else
58842             # Test for the locale name with explicit encoding suffix.
58843             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58844               gt_cv_locale_fr=fr_FR.ISO-8859-1
58845             else
58846               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
58847               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58848                 gt_cv_locale_fr=fr_FR.ISO8859-1
58849               else
58850                 # Test for the HP-UX locale name.
58851                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58852                   gt_cv_locale_fr=fr_FR.iso88591
58853                 else
58854                   # Test for the Solaris 7 locale name.
58855                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58856                     gt_cv_locale_fr=fr
58857                   else
58858                     # None found.
58859                     gt_cv_locale_fr=none
58860                   fi
58861                 fi
58862               fi
58863             fi
58864           fi
58865           ;;
58866       esac
58867     fi
58868     rm -fr conftest*
58869
58870 fi
58871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
58872 printf "%s\n" "$gt_cv_locale_fr" >&6; }
58873   LOCALE_FR=$gt_cv_locale_fr
58874
58875
58876
58877
58878   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
58879 printf %s "checking for a french Unicode locale... " >&6; }
58880 if test ${gt_cv_locale_fr_utf8+y}
58881 then :
58882   printf %s "(cached) " >&6
58883 else $as_nop
58884
58885     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58886 /* end confdefs.h.  */
58887
58888 #include <locale.h>
58889 #include <time.h>
58890 #if HAVE_LANGINFO_CODESET
58891 # include <langinfo.h>
58892 #endif
58893 #include <stdlib.h>
58894 #include <string.h>
58895 struct tm t;
58896 char buf[16];
58897 int main () {
58898   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
58899      imitates locale dependent behaviour by looking at the environment
58900      variables, and all locales use the UTF-8 encoding.  */
58901 #if !(defined __BEOS__ || defined __HAIKU__)
58902   /* Check whether the given locale name is recognized by the system.  */
58903 # if defined _WIN32 && !defined __CYGWIN__
58904   /* On native Windows, setlocale(category, "") looks at the system settings,
58905      not at the environment variables.  Also, when an encoding suffix such
58906      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58907      category of the locale to "C".  */
58908   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58909       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58910     return 1;
58911 # else
58912   if (setlocale (LC_ALL, "") == NULL) return 1;
58913 # endif
58914   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58915      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58916      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58917      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58918      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58919      some unit tests fail.  */
58920 # if HAVE_LANGINFO_CODESET
58921   {
58922     const char *cs = nl_langinfo (CODESET);
58923     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
58924       return 1;
58925   }
58926 # endif
58927 # ifdef __CYGWIN__
58928   /* On Cygwin, avoid locale names without encoding suffix, because the
58929      locale_charset() function relies on the encoding suffix.  Note that
58930      LC_ALL is set on the command line.  */
58931   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58932 # endif
58933   /* Check whether in the abbreviation of the second month, the second
58934      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
58935      two bytes long, with UTF-8 encoding.  */
58936   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58937   if (strftime (buf, sizeof (buf), "%b", &t) < 4
58938       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
58939     return 1;
58940 #endif
58941 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
58942   /* Check whether the decimal separator is a comma.
58943      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58944      are nl_langinfo(RADIXCHAR) are both ".".  */
58945   if (localeconv () ->decimal_point[0] != ',') return 1;
58946 #endif
58947   return 0;
58948 }
58949
58950 _ACEOF
58951     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58952   (eval $ac_link) 2>&5
58953   ac_status=$?
58954   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58955   test $ac_status = 0; } && test -s conftest$ac_exeext; then
58956       case "$host_os" in
58957         # Handle native Windows specially, because there setlocale() interprets
58958         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58959         # "fr" or "fra" as "French" or "French_France.1252",
58960         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58961         # "ja" as "Japanese" or "Japanese_Japan.932",
58962         # and similar.
58963         mingw*)
58964           # Test for the hypothetical native Windows locale name.
58965           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58966             gt_cv_locale_fr_utf8=French_France.65001
58967           else
58968             # None found.
58969             gt_cv_locale_fr_utf8=none
58970           fi
58971           ;;
58972         *)
58973           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58974           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58975           # configure script would override the LC_ALL setting. Likewise for
58976           # LC_CTYPE, which is also set at the beginning of the configure script.
58977           # Test for the usual locale name.
58978           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58979             gt_cv_locale_fr_utf8=fr_FR
58980           else
58981             # Test for the locale name with explicit encoding suffix.
58982             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58983               gt_cv_locale_fr_utf8=fr_FR.UTF-8
58984             else
58985               # Test for the Solaris 7 locale name.
58986               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58987                 gt_cv_locale_fr_utf8=fr.UTF-8
58988               else
58989                 # None found.
58990                 gt_cv_locale_fr_utf8=none
58991               fi
58992             fi
58993           fi
58994           ;;
58995       esac
58996     fi
58997     rm -fr conftest*
58998
58999 fi
59000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
59001 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
59002   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
59003
59004
59005
59006
59007
59008   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
59009 printf %s "checking for a traditional japanese locale... " >&6; }
59010 if test ${gt_cv_locale_ja+y}
59011 then :
59012   printf %s "(cached) " >&6
59013 else $as_nop
59014
59015     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59016 /* end confdefs.h.  */
59017
59018 #include <locale.h>
59019 #include <time.h>
59020 #if HAVE_LANGINFO_CODESET
59021 # include <langinfo.h>
59022 #endif
59023 #include <stdlib.h>
59024 #include <string.h>
59025 struct tm t;
59026 char buf[16];
59027 int main ()
59028 {
59029   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
59030      imitates locale dependent behaviour by looking at the environment
59031      variables, and all locales use the UTF-8 encoding.  */
59032 #if defined __BEOS__ || defined __HAIKU__
59033   return 1;
59034 #else
59035   /* Check whether the given locale name is recognized by the system.  */
59036 # if defined _WIN32 && !defined __CYGWIN__
59037   /* On native Windows, setlocale(category, "") looks at the system settings,
59038      not at the environment variables.  Also, when an encoding suffix such
59039      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59040      category of the locale to "C".  */
59041   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59042       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59043     return 1;
59044 # else
59045   if (setlocale (LC_ALL, "") == NULL) return 1;
59046 # endif
59047   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59048      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59049      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59050      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59051      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59052      some unit tests fail.
59053      On MirBSD 10, when an unsupported locale is specified, setlocale()
59054      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
59055 # if HAVE_LANGINFO_CODESET
59056   {
59057     const char *cs = nl_langinfo (CODESET);
59058     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59059         || strcmp (cs, "UTF-8") == 0)
59060       return 1;
59061   }
59062 # endif
59063 # ifdef __CYGWIN__
59064   /* On Cygwin, avoid locale names without encoding suffix, because the
59065      locale_charset() function relies on the encoding suffix.  Note that
59066      LC_ALL is set on the command line.  */
59067   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59068 # endif
59069   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
59070      on Cygwin 1.5.x.  */
59071   if (MB_CUR_MAX == 1)
59072     return 1;
59073   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
59074      This excludes the UTF-8 encoding (except on MirBSD).  */
59075   {
59076     const char *p;
59077     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59078     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
59079     for (p = buf; *p != '\0'; p++)
59080       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
59081         return 1;
59082   }
59083   return 0;
59084 #endif
59085 }
59086
59087 _ACEOF
59088     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59089   (eval $ac_link) 2>&5
59090   ac_status=$?
59091   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59092   test $ac_status = 0; } && test -s conftest$ac_exeext; then
59093       case "$host_os" in
59094         # Handle native Windows specially, because there setlocale() interprets
59095         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59096         # "fr" or "fra" as "French" or "French_France.1252",
59097         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59098         # "ja" as "Japanese" or "Japanese_Japan.932",
59099         # and similar.
59100         mingw*)
59101           # Note that on native Windows, the Japanese locale is
59102           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
59103           # cannot use it here.
59104           gt_cv_locale_ja=none
59105           ;;
59106         *)
59107           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59108           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59109           # configure script would override the LC_ALL setting. Likewise for
59110           # LC_CTYPE, which is also set at the beginning of the configure script.
59111           # Test for the AIX locale name.
59112           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59113             gt_cv_locale_ja=ja_JP
59114           else
59115             # Test for the locale name with explicit encoding suffix.
59116             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59117               gt_cv_locale_ja=ja_JP.EUC-JP
59118             else
59119               # Test for the HP-UX, OSF/1, NetBSD locale name.
59120               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59121                 gt_cv_locale_ja=ja_JP.eucJP
59122               else
59123                 # Test for the IRIX, FreeBSD locale name.
59124                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59125                   gt_cv_locale_ja=ja_JP.EUC
59126                 else
59127                   # Test for the Solaris 7 locale name.
59128                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59129                     gt_cv_locale_ja=ja
59130                   else
59131                     # Special test for NetBSD 1.6.
59132                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
59133                       gt_cv_locale_ja=ja_JP.eucJP
59134                     else
59135                       # None found.
59136                       gt_cv_locale_ja=none
59137                     fi
59138                   fi
59139                 fi
59140               fi
59141             fi
59142           fi
59143           ;;
59144       esac
59145     fi
59146     rm -fr conftest*
59147
59148 fi
59149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
59150 printf "%s\n" "$gt_cv_locale_ja" >&6; }
59151   LOCALE_JA=$gt_cv_locale_ja
59152
59153
59154
59155
59156
59157   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
59158 printf %s "checking for a transitional chinese locale... " >&6; }
59159 if test ${gt_cv_locale_zh_CN+y}
59160 then :
59161   printf %s "(cached) " >&6
59162 else $as_nop
59163
59164     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59165 /* end confdefs.h.  */
59166
59167 #include <locale.h>
59168 #include <stdlib.h>
59169 #include <time.h>
59170 #if HAVE_LANGINFO_CODESET
59171 # include <langinfo.h>
59172 #endif
59173 #include <stdlib.h>
59174 #include <string.h>
59175 struct tm t;
59176 char buf[16];
59177 int main ()
59178 {
59179   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
59180      imitates locale dependent behaviour by looking at the environment
59181      variables, and all locales use the UTF-8 encoding.  */
59182 #if defined __BEOS__ || defined __HAIKU__
59183   return 1;
59184 #else
59185   /* Check whether the given locale name is recognized by the system.  */
59186 # if defined _WIN32 && !defined __CYGWIN__
59187   /* On native Windows, setlocale(category, "") looks at the system settings,
59188      not at the environment variables.  Also, when an encoding suffix such
59189      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59190      category of the locale to "C".  */
59191   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59192       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59193     return 1;
59194 # else
59195   if (setlocale (LC_ALL, "") == NULL) return 1;
59196 # endif
59197   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59198      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59199      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59200      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59201      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59202      some unit tests fail.
59203      On MirBSD 10, when an unsupported locale is specified, setlocale()
59204      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
59205 # if HAVE_LANGINFO_CODESET
59206   {
59207     const char *cs = nl_langinfo (CODESET);
59208     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59209         || strcmp (cs, "UTF-8") == 0)
59210       return 1;
59211   }
59212 # endif
59213 # ifdef __CYGWIN__
59214   /* On Cygwin, avoid locale names without encoding suffix, because the
59215      locale_charset() function relies on the encoding suffix.  Note that
59216      LC_ALL is set on the command line.  */
59217   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59218 # endif
59219   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
59220      This excludes the UTF-8 encoding (except on MirBSD).  */
59221   {
59222     const char *p;
59223     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59224     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
59225     for (p = buf; *p != '\0'; p++)
59226       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
59227         return 1;
59228   }
59229   /* Check whether a typical GB18030 multibyte sequence is recognized as a
59230      single wide character.  This excludes the GB2312 and GBK encodings.  */
59231   if (mblen ("\203\062\332\066", 5) != 4)
59232     return 1;
59233   return 0;
59234 #endif
59235 }
59236
59237 _ACEOF
59238     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59239   (eval $ac_link) 2>&5
59240   ac_status=$?
59241   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59242   test $ac_status = 0; } && test -s conftest$ac_exeext; then
59243       case "$host_os" in
59244         # Handle native Windows specially, because there setlocale() interprets
59245         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59246         # "fr" or "fra" as "French" or "French_France.1252",
59247         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59248         # "ja" as "Japanese" or "Japanese_Japan.932",
59249         # and similar.
59250         mingw*)
59251           # Test for the hypothetical native Windows locale name.
59252           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59253             gt_cv_locale_zh_CN=Chinese_China.54936
59254           else
59255             # None found.
59256             gt_cv_locale_zh_CN=none
59257           fi
59258           ;;
59259         solaris2.8)
59260           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
59261           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
59262           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
59263           gt_cv_locale_zh_CN=none
59264           ;;
59265         *)
59266           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59267           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59268           # configure script would override the LC_ALL setting. Likewise for
59269           # LC_CTYPE, which is also set at the beginning of the configure script.
59270           # Test for the locale name without encoding suffix.
59271           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59272             gt_cv_locale_zh_CN=zh_CN
59273           else
59274             # Test for the locale name with explicit encoding suffix.
59275             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59276               gt_cv_locale_zh_CN=zh_CN.GB18030
59277             else
59278               # None found.
59279               gt_cv_locale_zh_CN=none
59280             fi
59281           fi
59282           ;;
59283       esac
59284     else
59285       # If there was a link error, due to mblen(), the system is so old that
59286       # it certainly doesn't have a chinese locale.
59287       gt_cv_locale_zh_CN=none
59288     fi
59289     rm -fr conftest*
59290
59291 fi
59292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
59293 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
59294   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
59295
59296
59297
59298
59299
59300
59301   if test $ac_cv_func_wctob = no; then
59302     HAVE_WCTOB=0
59303     HAVE_DECL_WCTOB=0
59304   else
59305     HAVE_WCTOB=1
59306
59307
59308
59309          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
59310 printf %s "checking whether wctob works... " >&6; }
59311 if test ${gl_cv_func_wctob_works+y}
59312 then :
59313   printf %s "(cached) " >&6
59314 else $as_nop
59315
59316                         case "$host_os" in
59317             # Guess no on Solaris <= 9 and Cygwin.
59318           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
59319             gl_cv_func_wctob_works="guessing no" ;;
59320             # Guess no on native Windows.
59321           mingw*)
59322             gl_cv_func_wctob_works="guessing no" ;;
59323             # Guess yes otherwise.
59324           *) gl_cv_func_wctob_works="guessing yes" ;;
59325         esac
59326         case "$host_os" in
59327           cygwin*)
59328             if test "$cross_compiling" = yes
59329 then :
59330   :
59331 else $as_nop
59332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59333 /* end confdefs.h.  */
59334
59335 #include <locale.h>
59336 #include <wchar.h>
59337
59338 register long global __asm__ ("%ebx");
59339
59340 int main ()
59341 {
59342   setlocale (LC_ALL, "en_US.UTF-8");
59343
59344   global = 0x12345678;
59345   if (wctob (0x00FC) != -1)
59346     return 1;
59347   if (global != 0x12345678)
59348     return 2;
59349   return 0;
59350 }
59351 _ACEOF
59352 if ac_fn_c_try_run "$LINENO"
59353 then :
59354   :
59355 else $as_nop
59356   gl_cv_func_wctob_works=no
59357 fi
59358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59359   conftest.$ac_objext conftest.beam conftest.$ac_ext
59360 fi
59361
59362             ;;
59363         esac
59364         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
59365           if test "$cross_compiling" = yes
59366 then :
59367   :
59368 else $as_nop
59369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59370 /* end confdefs.h.  */
59371
59372 #include <locale.h>
59373 #include <stdlib.h>
59374 #include <wchar.h>
59375 int main ()
59376 {
59377   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
59378     {
59379       wchar_t wc;
59380
59381       if (mbtowc (&wc, "\374", 1) == 1)
59382         if (wctob (wc) != (unsigned char) '\374')
59383           return 1;
59384     }
59385   return 0;
59386 }
59387 _ACEOF
59388 if ac_fn_c_try_run "$LINENO"
59389 then :
59390   gl_cv_func_wctob_works=yes
59391 else $as_nop
59392   gl_cv_func_wctob_works=no
59393 fi
59394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59395   conftest.$ac_objext conftest.beam conftest.$ac_ext
59396 fi
59397
59398         fi
59399
59400 fi
59401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
59402 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
59403     case "$gl_cv_func_wctob_works" in
59404       *yes) ;;
59405       *) REPLACE_WCTOB=1 ;;
59406     esac
59407     if test $REPLACE_WCTOB = 0; then
59408
59409             ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
59410         #include <wchar.h>
59411
59412 " "$ac_c_undeclared_builtin_options" "CFLAGS"
59413 if test "x$ac_cv_have_decl_wctob" = xyes
59414 then :
59415   ac_have_decl=1
59416 else $as_nop
59417   ac_have_decl=0
59418 fi
59419 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
59420
59421       if test $ac_cv_have_decl_wctob != yes; then
59422         HAVE_DECL_WCTOB=0
59423       fi
59424     fi
59425   fi
59426
59427   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
59428
59429
59430
59431
59432
59433
59434
59435
59436   M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
59437
59438
59439   :
59440
59441   fi
59442
59443
59444
59445
59446
59447
59448
59449
59450
59451     if test "$GL_M4_GNULIB_WCTOB" != 1; then
59452         if test "$GL_M4_GNULIB_WCTOB" = 0; then
59453       GL_M4_GNULIB_WCTOB=$gl_module_indicator_condition
59454     else
59455       GL_M4_GNULIB_WCTOB="($GL_M4_GNULIB_WCTOB || $gl_module_indicator_condition)"
59456     fi
59457   fi
59458
59459
59460
59461
59462
59463 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
59464
59465
59466
59467
59468
59469
59470   if false; then
59471     REPLACE_WCTOMB=1
59472   fi
59473
59474   if test $REPLACE_WCTOMB = 1; then
59475
59476
59477
59478
59479
59480
59481
59482
59483   M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
59484
59485
59486   :
59487
59488   fi
59489
59490
59491
59492
59493
59494
59495
59496
59497
59498     if test "$GL_M4_GNULIB_WCTOMB" != 1; then
59499         if test "$GL_M4_GNULIB_WCTOMB" = 0; then
59500       GL_M4_GNULIB_WCTOMB=$gl_module_indicator_condition
59501     else
59502       GL_M4_GNULIB_WCTOMB="($GL_M4_GNULIB_WCTOMB || $gl_module_indicator_condition)"
59503     fi
59504   fi
59505
59506
59507
59508
59509
59510 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
59511
59512
59513
59514
59515   case "$host_os" in
59516     mingw*)
59517
59518
59519
59520
59521
59522
59523
59524
59525   M4tests_LIBOBJS="$M4tests_LIBOBJS windows-thread.$ac_objext"
59526
59527       ;;
59528   esac
59529
59530
59531
59532
59533     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
59534       REPLACE_WRITE=1
59535     fi
59536
59537
59538
59539
59540
59541     if test $gl_cv_header_signal_h_SIGPIPE != yes; then
59542       REPLACE_WRITE=1
59543     fi
59544
59545
59546
59547   if test $REPLACE_WRITE = 1; then
59548
59549
59550
59551
59552
59553
59554
59555
59556   M4tests_LIBOBJS="$M4tests_LIBOBJS write.$ac_objext"
59557
59558     :
59559   fi
59560
59561
59562
59563
59564
59565
59566
59567
59568
59569     if test "$GL_M4_GNULIB_WRITE" != 1; then
59570         if test "$GL_M4_GNULIB_WRITE" = 0; then
59571       GL_M4_GNULIB_WRITE=$gl_module_indicator_condition
59572     else
59573       GL_M4_GNULIB_WRITE="($GL_M4_GNULIB_WRITE || $gl_module_indicator_condition)"
59574     fi
59575   fi
59576
59577
59578
59579
59580
59581 printf "%s\n" "#define GNULIB_TEST_WRITE 1" >>confdefs.h
59582
59583
59584
59585
59586
59587
59588
59589
59590
59591
59592
59593
59594
59595
59596
59597
59598   LIBM4_LIBDEPS="$gl_libdeps"
59599
59600   LIBM4_LTLIBDEPS="$gl_ltlibdeps"
59601
59602   LIBTESTS_LIBDEPS="$gltests_libdeps"
59603
59604
59605
59606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
59607 printf %s "checking whether an open file can be renamed... " >&6; }
59608 if test ${M4_cv_func_rename_open_file_works+y}
59609 then :
59610   printf %s "(cached) " >&6
59611 else $as_nop
59612   if test "$cross_compiling" = yes
59613 then :
59614   M4_cv_func_rename_open_file_works='guessing no'
59615 else $as_nop
59616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59617 /* end confdefs.h.  */
59618 $ac_includes_default
59619 int
59620 main (void)
59621 {
59622 FILE *f = fopen ("conftest.1", "w+");
59623        int result = rename ("conftest.1", "conftest.2");
59624        fclose (f); remove ("conftest.1"); remove ("conftest.2");
59625        return result;
59626   ;
59627   return 0;
59628 }
59629 _ACEOF
59630 if ac_fn_c_try_run "$LINENO"
59631 then :
59632   M4_cv_func_rename_open_file_works=yes
59633 else $as_nop
59634   M4_cv_func_rename_open_file_works=no
59635 fi
59636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59637   conftest.$ac_objext conftest.beam conftest.$ac_ext
59638 fi
59639
59640 fi
59641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
59642 printf "%s\n" "$M4_cv_func_rename_open_file_works" >&6; }
59643 if test "$M4_cv_func_rename_open_file_works" = yes ; then
59644   M4_rename_open_works=1
59645 else
59646   M4_rename_open_works=0
59647 fi
59648
59649 printf "%s\n" "#define RENAME_OPEN_FILE_WORKS $M4_rename_open_works" >>confdefs.h
59650
59651
59652
59653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
59654 printf %s "checking if changeword is wanted... " >&6; }
59655 # Check whether --enable-changeword was given.
59656 if test ${enable_changeword+y}
59657 then :
59658   enableval=$enable_changeword; if test "$enableval" = yes; then
59659     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59660 printf "%s\n" "yes" >&6; }
59661
59662 printf "%s\n" "#define ENABLE_CHANGEWORD 1" >>confdefs.h
59663
59664   else
59665     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59666 printf "%s\n" "no" >&6; }
59667   fi
59668 else $as_nop
59669   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59670 printf "%s\n" "no" >&6; }
59671 fi
59672
59673
59674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
59675 printf %s "checking which shell to use for syscmd... " >&6; }
59676
59677 # Check whether --with-syscmd-shell was given.
59678 if test ${with_syscmd_shell+y}
59679 then :
59680   withval=$with_syscmd_shell; case $withval in
59681     yes) with_syscmd_shell=no;;
59682    esac
59683 else $as_nop
59684   with_syscmd_shell=no
59685 fi
59686
59687 if test "$with_syscmd_shell" = no ; then
59688   with_syscmd_shell=/bin/sh
59689   if test "$cross_compiling" != yes ; then
59690     if as_fn_executable_p /bin/sh$EXEEXT
59691 then :
59692
59693 else $as_nop
59694   if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
59695 fi
59696     M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59697     for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
59698         command -p getconf PATH
59699       else
59700         echo "/bin$PATH_SEPARATOR$PATH"
59701       fi`
59702     do
59703       IFS=$M4_save_IFS
59704       test -z "$M4_dir" && continue
59705       as_fn_executable_p "$M4_dir/sh" \
59706         && { with_syscmd_shell=$M4_dir/sh; break; }
59707     done
59708     IFS=$M4_save_IFS
59709   fi
59710 fi
59711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
59712 printf "%s\n" "$with_syscmd_shell" >&6; }
59713
59714 printf "%s\n" "#define SYSCMD_SHELL \"$with_syscmd_shell\"" >>confdefs.h
59715
59716
59717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
59718 printf %s "checking if malloc debugging is wanted... " >&6; }
59719
59720 # Check whether --with-dmalloc was given.
59721 if test ${with_dmalloc+y}
59722 then :
59723   withval=$with_dmalloc; if test "$withval" = yes; then
59724   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59725 printf "%s\n" "yes" >&6; }
59726
59727 printf "%s\n" "#define WITH_DMALLOC 1" >>confdefs.h
59728
59729   LIBS="$LIBS -ldmalloc"
59730   LDFLAGS="$LDFLAGS -g"
59731 else
59732   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59733 printf "%s\n" "no" >&6; }
59734 fi
59735 else $as_nop
59736   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59737 printf "%s\n" "no" >&6; }
59738 fi
59739
59740
59741 ac_config_commands="$ac_config_commands stamp-h"
59742
59743
59744 case $host in #(
59745   *-*-os2*) :
59746     OS2_LDFLAGS="-Zargs-resp" ;; #(
59747   *) :
59748      ;;
59749 esac
59750
59751
59752
59753   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
59754 printf %s "checking whether NLS is requested... " >&6; }
59755     # Check whether --enable-nls was given.
59756 if test ${enable_nls+y}
59757 then :
59758   enableval=$enable_nls; USE_NLS=$enableval
59759 else $as_nop
59760   USE_NLS=yes
59761 fi
59762
59763   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
59764 printf "%s\n" "$USE_NLS" >&6; }
59765
59766
59767
59768
59769       GETTEXT_MACRO_VERSION=0.19
59770
59771
59772
59773
59774 # Prepare PATH_SEPARATOR.
59775 # The user is always right.
59776 if test "${PATH_SEPARATOR+set}" != set; then
59777   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59778   # contains only /bin. Note that ksh looks also at the FPATH variable,
59779   # so we have to set that as well for the test.
59780   PATH_SEPARATOR=:
59781   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59782     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59783            || PATH_SEPARATOR=';'
59784        }
59785 fi
59786
59787 # Find out how to test for executable files. Don't use a zero-byte file,
59788 # as systems may use methods other than mode bits to determine executability.
59789 cat >conf$$.file <<_ASEOF
59790 #! /bin/sh
59791 exit 0
59792 _ASEOF
59793 chmod +x conf$$.file
59794 if test -x conf$$.file >/dev/null 2>&1; then
59795   ac_executable_p="test -x"
59796 else
59797   ac_executable_p="test -f"
59798 fi
59799 rm -f conf$$.file
59800
59801 # Extract the first word of "msgfmt", so it can be a program name with args.
59802 set dummy msgfmt; ac_word=$2
59803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59804 printf %s "checking for $ac_word... " >&6; }
59805 if test ${ac_cv_path_MSGFMT+y}
59806 then :
59807   printf %s "(cached) " >&6
59808 else $as_nop
59809   case "$MSGFMT" in
59810   [\\/]* | ?:[\\/]*)
59811     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
59812     ;;
59813   *)
59814     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
59815     for ac_dir in $PATH; do
59816       IFS="$ac_save_IFS"
59817       test -z "$ac_dir" && ac_dir=.
59818       for ac_exec_ext in '' $ac_executable_extensions; do
59819         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
59820           echo "$as_me: trying $ac_dir/$ac_word..." >&5
59821           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
59822      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
59823             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
59824             break 2
59825           fi
59826         fi
59827       done
59828     done
59829     IFS="$ac_save_IFS"
59830   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
59831     ;;
59832 esac
59833 fi
59834 MSGFMT="$ac_cv_path_MSGFMT"
59835 if test "$MSGFMT" != ":"; then
59836   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
59837 printf "%s\n" "$MSGFMT" >&6; }
59838 else
59839   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59840 printf "%s\n" "no" >&6; }
59841 fi
59842
59843   # Extract the first word of "gmsgfmt", so it can be a program name with args.
59844 set dummy gmsgfmt; ac_word=$2
59845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59846 printf %s "checking for $ac_word... " >&6; }
59847 if test ${ac_cv_path_GMSGFMT+y}
59848 then :
59849   printf %s "(cached) " >&6
59850 else $as_nop
59851   case $GMSGFMT in
59852   [\\/]* | ?:[\\/]*)
59853   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
59854   ;;
59855   *)
59856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59857 for as_dir in $PATH
59858 do
59859   IFS=$as_save_IFS
59860   case $as_dir in #(((
59861     '') as_dir=./ ;;
59862     */) ;;
59863     *) as_dir=$as_dir/ ;;
59864   esac
59865     for ac_exec_ext in '' $ac_executable_extensions; do
59866   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
59867     ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
59868     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
59869     break 2
59870   fi
59871 done
59872   done
59873 IFS=$as_save_IFS
59874
59875   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
59876   ;;
59877 esac
59878 fi
59879 GMSGFMT=$ac_cv_path_GMSGFMT
59880 if test -n "$GMSGFMT"; then
59881   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
59882 printf "%s\n" "$GMSGFMT" >&6; }
59883 else
59884   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59885 printf "%s\n" "no" >&6; }
59886 fi
59887
59888
59889
59890     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59891     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
59892     *) MSGFMT_015=$MSGFMT ;;
59893   esac
59894
59895   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59896     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
59897     *) GMSGFMT_015=$GMSGFMT ;;
59898   esac
59899
59900
59901
59902 # Prepare PATH_SEPARATOR.
59903 # The user is always right.
59904 if test "${PATH_SEPARATOR+set}" != set; then
59905   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59906   # contains only /bin. Note that ksh looks also at the FPATH variable,
59907   # so we have to set that as well for the test.
59908   PATH_SEPARATOR=:
59909   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59910     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59911            || PATH_SEPARATOR=';'
59912        }
59913 fi
59914
59915 # Find out how to test for executable files. Don't use a zero-byte file,
59916 # as systems may use methods other than mode bits to determine executability.
59917 cat >conf$$.file <<_ASEOF
59918 #! /bin/sh
59919 exit 0
59920 _ASEOF
59921 chmod +x conf$$.file
59922 if test -x conf$$.file >/dev/null 2>&1; then
59923   ac_executable_p="test -x"
59924 else
59925   ac_executable_p="test -f"
59926 fi
59927 rm -f conf$$.file
59928
59929 # Extract the first word of "xgettext", so it can be a program name with args.
59930 set dummy xgettext; ac_word=$2
59931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59932 printf %s "checking for $ac_word... " >&6; }
59933 if test ${ac_cv_path_XGETTEXT+y}
59934 then :
59935   printf %s "(cached) " >&6
59936 else $as_nop
59937   case "$XGETTEXT" in
59938   [\\/]* | ?:[\\/]*)
59939     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
59940     ;;
59941   *)
59942     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
59943     for ac_dir in $PATH; do
59944       IFS="$ac_save_IFS"
59945       test -z "$ac_dir" && ac_dir=.
59946       for ac_exec_ext in '' $ac_executable_extensions; do
59947         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
59948           echo "$as_me: trying $ac_dir/$ac_word..." >&5
59949           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
59950      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
59951             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
59952             break 2
59953           fi
59954         fi
59955       done
59956     done
59957     IFS="$ac_save_IFS"
59958   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
59959     ;;
59960 esac
59961 fi
59962 XGETTEXT="$ac_cv_path_XGETTEXT"
59963 if test "$XGETTEXT" != ":"; then
59964   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
59965 printf "%s\n" "$XGETTEXT" >&6; }
59966 else
59967   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59968 printf "%s\n" "no" >&6; }
59969 fi
59970
59971     rm -f messages.po
59972
59973     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59974     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
59975     *) XGETTEXT_015=$XGETTEXT ;;
59976   esac
59977
59978
59979
59980 # Prepare PATH_SEPARATOR.
59981 # The user is always right.
59982 if test "${PATH_SEPARATOR+set}" != set; then
59983   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59984   # contains only /bin. Note that ksh looks also at the FPATH variable,
59985   # so we have to set that as well for the test.
59986   PATH_SEPARATOR=:
59987   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59988     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59989            || PATH_SEPARATOR=';'
59990        }
59991 fi
59992
59993 # Find out how to test for executable files. Don't use a zero-byte file,
59994 # as systems may use methods other than mode bits to determine executability.
59995 cat >conf$$.file <<_ASEOF
59996 #! /bin/sh
59997 exit 0
59998 _ASEOF
59999 chmod +x conf$$.file
60000 if test -x conf$$.file >/dev/null 2>&1; then
60001   ac_executable_p="test -x"
60002 else
60003   ac_executable_p="test -f"
60004 fi
60005 rm -f conf$$.file
60006
60007 # Extract the first word of "msgmerge", so it can be a program name with args.
60008 set dummy msgmerge; ac_word=$2
60009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60010 printf %s "checking for $ac_word... " >&6; }
60011 if test ${ac_cv_path_MSGMERGE+y}
60012 then :
60013   printf %s "(cached) " >&6
60014 else $as_nop
60015   case "$MSGMERGE" in
60016   [\\/]* | ?:[\\/]*)
60017     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
60018     ;;
60019   *)
60020     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
60021     for ac_dir in $PATH; do
60022       IFS="$ac_save_IFS"
60023       test -z "$ac_dir" && ac_dir=.
60024       for ac_exec_ext in '' $ac_executable_extensions; do
60025         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
60026           echo "$as_me: trying $ac_dir/$ac_word..." >&5
60027           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
60028             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
60029             break 2
60030           fi
60031         fi
60032       done
60033     done
60034     IFS="$ac_save_IFS"
60035   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
60036     ;;
60037 esac
60038 fi
60039 MSGMERGE="$ac_cv_path_MSGMERGE"
60040 if test "$MSGMERGE" != ":"; then
60041   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
60042 printf "%s\n" "$MSGMERGE" >&6; }
60043 else
60044   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60045 printf "%s\n" "no" >&6; }
60046 fi
60047
60048
60049         test -n "$localedir" || localedir='${datadir}/locale'
60050
60051
60052     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
60053
60054
60055   ac_config_commands="$ac_config_commands po-directories"
60056
60057
60058
60059
60060
60061
60062
60063
60064
60065
60066
60067
60068
60069
60070
60071
60072
60073
60074
60075
60076
60077
60078
60079
60080
60081
60082     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
60083 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
60084 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
60085 then :
60086   printf %s "(cached) " >&6
60087 else $as_nop
60088   gt_save_LIBS="$LIBS"
60089      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
60090      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60091 /* end confdefs.h.  */
60092 #include <CoreFoundation/CFPreferences.h>
60093 int
60094 main (void)
60095 {
60096 CFPreferencesCopyAppValue(NULL, NULL)
60097   ;
60098   return 0;
60099 }
60100 _ACEOF
60101 if ac_fn_c_try_link "$LINENO"
60102 then :
60103   gt_cv_func_CFPreferencesCopyAppValue=yes
60104 else $as_nop
60105   gt_cv_func_CFPreferencesCopyAppValue=no
60106 fi
60107 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60108     conftest$ac_exeext conftest.$ac_ext
60109      LIBS="$gt_save_LIBS"
60110 fi
60111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
60112 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
60113   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
60114
60115 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
60116
60117   fi
60118                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
60119 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
60120 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
60121 then :
60122   printf %s "(cached) " >&6
60123 else $as_nop
60124   gt_save_LIBS="$LIBS"
60125      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
60126      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60127 /* end confdefs.h.  */
60128 #include <CoreFoundation/CFLocale.h>
60129 int
60130 main (void)
60131 {
60132 CFLocaleCopyPreferredLanguages();
60133   ;
60134   return 0;
60135 }
60136 _ACEOF
60137 if ac_fn_c_try_link "$LINENO"
60138 then :
60139   gt_cv_func_CFLocaleCopyPreferredLanguages=yes
60140 else $as_nop
60141   gt_cv_func_CFLocaleCopyPreferredLanguages=no
60142 fi
60143 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60144     conftest$ac_exeext conftest.$ac_ext
60145      LIBS="$gt_save_LIBS"
60146 fi
60147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
60148 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
60149   if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
60150
60151 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
60152
60153   fi
60154   INTL_MACOSX_LIBS=
60155   if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
60156      || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
60157     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
60158   fi
60159
60160
60161
60162
60163
60164
60165   LIBINTL=
60166   LTLIBINTL=
60167   POSUB=
60168
60169     case " $gt_needs " in
60170     *" need-formatstring-macros "*) gt_api_version=3 ;;
60171     *" need-ngettext "*) gt_api_version=2 ;;
60172     *) gt_api_version=1 ;;
60173   esac
60174   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
60175   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
60176
60177     if test "$USE_NLS" = "yes"; then
60178     gt_use_preinstalled_gnugettext=no
60179
60180
60181         if test $gt_api_version -ge 3; then
60182           gt_revision_test_code='
60183 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
60184 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
60185 #endif
60186 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
60187 '
60188         else
60189           gt_revision_test_code=
60190         fi
60191         if test $gt_api_version -ge 2; then
60192           gt_expression_test_code=' + * ngettext ("", "", 0)'
60193         else
60194           gt_expression_test_code=
60195         fi
60196
60197         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
60198 printf %s "checking for GNU gettext in libc... " >&6; }
60199 if eval test \${$gt_func_gnugettext_libc+y}
60200 then :
60201   printf %s "(cached) " >&6
60202 else $as_nop
60203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60204 /* end confdefs.h.  */
60205
60206 #include <libintl.h>
60207 $gt_revision_test_code
60208 extern int _nl_msg_cat_cntr;
60209 extern int *_nl_domain_bindings;
60210
60211 int
60212 main (void)
60213 {
60214
60215 bindtextdomain ("", "");
60216 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
60217
60218   ;
60219   return 0;
60220 }
60221 _ACEOF
60222 if ac_fn_c_try_link "$LINENO"
60223 then :
60224   eval "$gt_func_gnugettext_libc=yes"
60225 else $as_nop
60226   eval "$gt_func_gnugettext_libc=no"
60227 fi
60228 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60229     conftest$ac_exeext conftest.$ac_ext
60230 fi
60231 eval ac_res=\$$gt_func_gnugettext_libc
60232                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
60233 printf "%s\n" "$ac_res" >&6; }
60234
60235         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
60236
60237
60238
60239
60240
60241           am_save_CPPFLAGS="$CPPFLAGS"
60242
60243   for element in $INCICONV; do
60244     haveit=
60245     for x in $CPPFLAGS; do
60246
60247   acl_save_prefix="$prefix"
60248   prefix="$acl_final_prefix"
60249   acl_save_exec_prefix="$exec_prefix"
60250   exec_prefix="$acl_final_exec_prefix"
60251   eval x=\"$x\"
60252   exec_prefix="$acl_save_exec_prefix"
60253   prefix="$acl_save_prefix"
60254
60255       if test "X$x" = "X$element"; then
60256         haveit=yes
60257         break
60258       fi
60259     done
60260     if test -z "$haveit"; then
60261       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
60262     fi
60263   done
60264
60265
60266   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
60267 printf %s "checking for iconv... " >&6; }
60268 if test ${am_cv_func_iconv+y}
60269 then :
60270   printf %s "(cached) " >&6
60271 else $as_nop
60272
60273     am_cv_func_iconv="no, consider installing GNU libiconv"
60274     am_cv_lib_iconv=no
60275     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60276 /* end confdefs.h.  */
60277
60278 #include <stdlib.h>
60279 #include <iconv.h>
60280
60281 int
60282 main (void)
60283 {
60284 iconv_t cd = iconv_open("","");
60285            iconv(cd,NULL,NULL,NULL,NULL);
60286            iconv_close(cd);
60287   ;
60288   return 0;
60289 }
60290 _ACEOF
60291 if ac_fn_c_try_link "$LINENO"
60292 then :
60293   am_cv_func_iconv=yes
60294 fi
60295 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60296     conftest$ac_exeext conftest.$ac_ext
60297     if test "$am_cv_func_iconv" != yes; then
60298       am_save_LIBS="$LIBS"
60299       LIBS="$LIBS $LIBICONV"
60300       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60301 /* end confdefs.h.  */
60302
60303 #include <stdlib.h>
60304 #include <iconv.h>
60305
60306 int
60307 main (void)
60308 {
60309 iconv_t cd = iconv_open("","");
60310              iconv(cd,NULL,NULL,NULL,NULL);
60311              iconv_close(cd);
60312   ;
60313   return 0;
60314 }
60315 _ACEOF
60316 if ac_fn_c_try_link "$LINENO"
60317 then :
60318   am_cv_lib_iconv=yes
60319         am_cv_func_iconv=yes
60320 fi
60321 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60322     conftest$ac_exeext conftest.$ac_ext
60323       LIBS="$am_save_LIBS"
60324     fi
60325
60326 fi
60327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
60328 printf "%s\n" "$am_cv_func_iconv" >&6; }
60329   if test "$am_cv_func_iconv" = yes; then
60330     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
60331 printf %s "checking for working iconv... " >&6; }
60332 if test ${am_cv_func_iconv_works+y}
60333 then :
60334   printf %s "(cached) " >&6
60335 else $as_nop
60336
60337                   am_save_LIBS="$LIBS"
60338       if test $am_cv_lib_iconv = yes; then
60339         LIBS="$LIBS $LIBICONV"
60340       fi
60341       am_cv_func_iconv_works=no
60342       for ac_iconv_const in '' 'const'; do
60343         if test "$cross_compiling" = yes
60344 then :
60345   case "$host_os" in
60346              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
60347              *)            am_cv_func_iconv_works="guessing yes" ;;
60348            esac
60349 else $as_nop
60350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60351 /* end confdefs.h.  */
60352
60353 #include <iconv.h>
60354 #include <string.h>
60355
60356 #ifndef ICONV_CONST
60357 # define ICONV_CONST $ac_iconv_const
60358 #endif
60359
60360 int
60361 main (void)
60362 {
60363 int result = 0;
60364   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
60365      successful returns.  This is even documented in
60366      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
60367   {
60368     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
60369     if (cd_utf8_to_88591 != (iconv_t)(-1))
60370       {
60371         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
60372         char buf[10];
60373         ICONV_CONST char *inptr = input;
60374         size_t inbytesleft = strlen (input);
60375         char *outptr = buf;
60376         size_t outbytesleft = sizeof (buf);
60377         size_t res = iconv (cd_utf8_to_88591,
60378                             &inptr, &inbytesleft,
60379                             &outptr, &outbytesleft);
60380         if (res == 0)
60381           result |= 1;
60382         iconv_close (cd_utf8_to_88591);
60383       }
60384   }
60385   /* Test against Solaris 10 bug: Failures are not distinguishable from
60386      successful returns.  */
60387   {
60388     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
60389     if (cd_ascii_to_88591 != (iconv_t)(-1))
60390       {
60391         static ICONV_CONST char input[] = "\263";
60392         char buf[10];
60393         ICONV_CONST char *inptr = input;
60394         size_t inbytesleft = strlen (input);
60395         char *outptr = buf;
60396         size_t outbytesleft = sizeof (buf);
60397         size_t res = iconv (cd_ascii_to_88591,
60398                             &inptr, &inbytesleft,
60399                             &outptr, &outbytesleft);
60400         if (res == 0)
60401           result |= 2;
60402         iconv_close (cd_ascii_to_88591);
60403       }
60404   }
60405   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
60406   {
60407     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
60408     if (cd_88591_to_utf8 != (iconv_t)(-1))
60409       {
60410         static ICONV_CONST char input[] = "\304";
60411         static char buf[2] = { (char)0xDE, (char)0xAD };
60412         ICONV_CONST char *inptr = input;
60413         size_t inbytesleft = 1;
60414         char *outptr = buf;
60415         size_t outbytesleft = 1;
60416         size_t res = iconv (cd_88591_to_utf8,
60417                             &inptr, &inbytesleft,
60418                             &outptr, &outbytesleft);
60419         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
60420           result |= 4;
60421         iconv_close (cd_88591_to_utf8);
60422       }
60423   }
60424 #if 0 /* This bug could be worked around by the caller.  */
60425   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
60426   {
60427     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
60428     if (cd_88591_to_utf8 != (iconv_t)(-1))
60429       {
60430         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
60431         char buf[50];
60432         ICONV_CONST char *inptr = input;
60433         size_t inbytesleft = strlen (input);
60434         char *outptr = buf;
60435         size_t outbytesleft = sizeof (buf);
60436         size_t res = iconv (cd_88591_to_utf8,
60437                             &inptr, &inbytesleft,
60438                             &outptr, &outbytesleft);
60439         if ((int)res > 0)
60440           result |= 8;
60441         iconv_close (cd_88591_to_utf8);
60442       }
60443   }
60444 #endif
60445   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
60446      provided.  */
60447   {
60448     /* Try standardized names.  */
60449     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
60450     /* Try IRIX, OSF/1 names.  */
60451     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
60452     /* Try AIX names.  */
60453     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
60454     /* Try HP-UX names.  */
60455     iconv_t cd4 = iconv_open ("utf8", "eucJP");
60456     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
60457         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
60458       result |= 16;
60459     if (cd1 != (iconv_t)(-1))
60460       iconv_close (cd1);
60461     if (cd2 != (iconv_t)(-1))
60462       iconv_close (cd2);
60463     if (cd3 != (iconv_t)(-1))
60464       iconv_close (cd3);
60465     if (cd4 != (iconv_t)(-1))
60466       iconv_close (cd4);
60467   }
60468   return result;
60469
60470   ;
60471   return 0;
60472 }
60473 _ACEOF
60474 if ac_fn_c_try_run "$LINENO"
60475 then :
60476   am_cv_func_iconv_works=yes
60477 fi
60478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
60479   conftest.$ac_objext conftest.beam conftest.$ac_ext
60480 fi
60481
60482         test "$am_cv_func_iconv_works" = no || break
60483       done
60484       LIBS="$am_save_LIBS"
60485
60486 fi
60487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
60488 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
60489     case "$am_cv_func_iconv_works" in
60490       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
60491       *)   am_func_iconv=yes ;;
60492     esac
60493   else
60494     am_func_iconv=no am_cv_lib_iconv=no
60495   fi
60496   if test "$am_func_iconv" = yes; then
60497
60498 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
60499
60500   fi
60501   if test "$am_cv_lib_iconv" = yes; then
60502     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
60503 printf %s "checking how to link with libiconv... " >&6; }
60504     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
60505 printf "%s\n" "$LIBICONV" >&6; }
60506   else
60507             CPPFLAGS="$am_save_CPPFLAGS"
60508     LIBICONV=
60509     LTLIBICONV=
60510   fi
60511
60512
60513
60514
60515
60516
60517
60518
60519
60520
60521     use_additional=yes
60522
60523   acl_save_prefix="$prefix"
60524   prefix="$acl_final_prefix"
60525   acl_save_exec_prefix="$exec_prefix"
60526   exec_prefix="$acl_final_exec_prefix"
60527
60528     eval additional_includedir=\"$includedir\"
60529     eval additional_libdir=\"$libdir\"
60530     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
60531     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
60532
60533   exec_prefix="$acl_save_exec_prefix"
60534   prefix="$acl_save_prefix"
60535
60536
60537 # Check whether --with-libintl-prefix was given.
60538 if test ${with_libintl_prefix+y}
60539 then :
60540   withval=$with_libintl_prefix;
60541     if test "X$withval" = "Xno"; then
60542       use_additional=no
60543     else
60544       if test "X$withval" = "X"; then
60545
60546   acl_save_prefix="$prefix"
60547   prefix="$acl_final_prefix"
60548   acl_save_exec_prefix="$exec_prefix"
60549   exec_prefix="$acl_final_exec_prefix"
60550
60551           eval additional_includedir=\"$includedir\"
60552           eval additional_libdir=\"$libdir\"
60553           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
60554           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
60555
60556   exec_prefix="$acl_save_exec_prefix"
60557   prefix="$acl_save_prefix"
60558
60559       else
60560         additional_includedir="$withval/include"
60561         additional_libdir="$withval/$acl_libdirstem"
60562         additional_libdir2="$withval/$acl_libdirstem2"
60563         additional_libdir3="$withval/$acl_libdirstem3"
60564       fi
60565     fi
60566
60567 fi
60568
60569   if test "X$additional_libdir2" = "X$additional_libdir"; then
60570     additional_libdir2=
60571   fi
60572   if test "X$additional_libdir3" = "X$additional_libdir"; then
60573     additional_libdir3=
60574   fi
60575       LIBINTL=
60576   LTLIBINTL=
60577   INCINTL=
60578   LIBINTL_PREFIX=
60579       HAVE_LIBINTL=
60580   rpathdirs=
60581   ltrpathdirs=
60582   names_already_handled=
60583   names_next_round='intl '
60584   while test -n "$names_next_round"; do
60585     names_this_round="$names_next_round"
60586     names_next_round=
60587     for name in $names_this_round; do
60588       already_handled=
60589       for n in $names_already_handled; do
60590         if test "$n" = "$name"; then
60591           already_handled=yes
60592           break
60593         fi
60594       done
60595       if test -z "$already_handled"; then
60596         names_already_handled="$names_already_handled $name"
60597                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
60598         eval value=\"\$HAVE_LIB$uppername\"
60599         if test -n "$value"; then
60600           if test "$value" = yes; then
60601             eval value=\"\$LIB$uppername\"
60602             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
60603             eval value=\"\$LTLIB$uppername\"
60604             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
60605           else
60606                                     :
60607           fi
60608         else
60609                               found_dir=
60610           found_la=
60611           found_so=
60612           found_a=
60613           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
60614           if test -n "$acl_shlibext"; then
60615             shrext=".$acl_shlibext"             # typically: shrext=.so
60616           else
60617             shrext=
60618           fi
60619           if test $use_additional = yes; then
60620             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
60621               if test "X$found_dir" = "X"; then
60622                 eval dir=\$$additional_libdir_variable
60623                 if test -n "$dir"; then
60624                                                       if test -n "$acl_shlibext"; then
60625                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
60626                       found_dir="$dir"
60627                       found_so="$dir/$libname$shrext"
60628                     else
60629                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
60630                         ver=`(cd "$dir" && \
60631                               for f in "$libname$shrext".*; do echo "$f"; done \
60632                               | sed -e "s,^$libname$shrext\\\\.,," \
60633                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
60634                               | sed 1q ) 2>/dev/null`
60635                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
60636                           found_dir="$dir"
60637                           found_so="$dir/$libname$shrext.$ver"
60638                         fi
60639                       else
60640                         eval library_names=\"$acl_library_names_spec\"
60641                         for f in $library_names; do
60642                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
60643                             found_dir="$dir"
60644                             found_so="$dir/$f"
60645                             break
60646                           fi
60647                         done
60648                       fi
60649                     fi
60650                   fi
60651                                     if test "X$found_dir" = "X"; then
60652                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
60653                       found_dir="$dir"
60654                       found_a="$dir/$libname.$acl_libext"
60655                     fi
60656                   fi
60657                   if test "X$found_dir" != "X"; then
60658                     if test -f "$dir/$libname.la"; then
60659                       found_la="$dir/$libname.la"
60660                     fi
60661                   fi
60662                 fi
60663               fi
60664             done
60665           fi
60666           if test "X$found_dir" = "X"; then
60667             for x in $LDFLAGS $LTLIBINTL; do
60668
60669   acl_save_prefix="$prefix"
60670   prefix="$acl_final_prefix"
60671   acl_save_exec_prefix="$exec_prefix"
60672   exec_prefix="$acl_final_exec_prefix"
60673   eval x=\"$x\"
60674   exec_prefix="$acl_save_exec_prefix"
60675   prefix="$acl_save_prefix"
60676
60677               case "$x" in
60678                 -L*)
60679                   dir=`echo "X$x" | sed -e 's/^X-L//'`
60680                                     if test -n "$acl_shlibext"; then
60681                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
60682                       found_dir="$dir"
60683                       found_so="$dir/$libname$shrext"
60684                     else
60685                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
60686                         ver=`(cd "$dir" && \
60687                               for f in "$libname$shrext".*; do echo "$f"; done \
60688                               | sed -e "s,^$libname$shrext\\\\.,," \
60689                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
60690                               | sed 1q ) 2>/dev/null`
60691                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
60692                           found_dir="$dir"
60693                           found_so="$dir/$libname$shrext.$ver"
60694                         fi
60695                       else
60696                         eval library_names=\"$acl_library_names_spec\"
60697                         for f in $library_names; do
60698                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
60699                             found_dir="$dir"
60700                             found_so="$dir/$f"
60701                             break
60702                           fi
60703                         done
60704                       fi
60705                     fi
60706                   fi
60707                                     if test "X$found_dir" = "X"; then
60708                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
60709                       found_dir="$dir"
60710                       found_a="$dir/$libname.$acl_libext"
60711                     fi
60712                   fi
60713                   if test "X$found_dir" != "X"; then
60714                     if test -f "$dir/$libname.la"; then
60715                       found_la="$dir/$libname.la"
60716                     fi
60717                   fi
60718                   ;;
60719               esac
60720               if test "X$found_dir" != "X"; then
60721                 break
60722               fi
60723             done
60724           fi
60725           if test "X$found_dir" != "X"; then
60726                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
60727             if test "X$found_so" != "X"; then
60728                                                         if test "$enable_rpath" = no \
60729                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
60730                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
60731                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
60732                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60733               else
60734                                                                                 haveit=
60735                 for x in $ltrpathdirs; do
60736                   if test "X$x" = "X$found_dir"; then
60737                     haveit=yes
60738                     break
60739                   fi
60740                 done
60741                 if test -z "$haveit"; then
60742                   ltrpathdirs="$ltrpathdirs $found_dir"
60743                 fi
60744                                 if test "$acl_hardcode_direct" = yes; then
60745                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60746                 else
60747                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
60748                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60749                                                             haveit=
60750                     for x in $rpathdirs; do
60751                       if test "X$x" = "X$found_dir"; then
60752                         haveit=yes
60753                         break
60754                       fi
60755                     done
60756                     if test -z "$haveit"; then
60757                       rpathdirs="$rpathdirs $found_dir"
60758                     fi
60759                   else
60760                                                                                 haveit=
60761                     for x in $LDFLAGS $LIBINTL; do
60762
60763   acl_save_prefix="$prefix"
60764   prefix="$acl_final_prefix"
60765   acl_save_exec_prefix="$exec_prefix"
60766   exec_prefix="$acl_final_exec_prefix"
60767   eval x=\"$x\"
60768   exec_prefix="$acl_save_exec_prefix"
60769   prefix="$acl_save_prefix"
60770
60771                       if test "X$x" = "X-L$found_dir"; then
60772                         haveit=yes
60773                         break
60774                       fi
60775                     done
60776                     if test -z "$haveit"; then
60777                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
60778                     fi
60779                     if test "$acl_hardcode_minus_L" != no; then
60780                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60781                     else
60782                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
60783                     fi
60784                   fi
60785                 fi
60786               fi
60787             else
60788               if test "X$found_a" != "X"; then
60789                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
60790               else
60791                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
60792               fi
60793             fi
60794                         additional_includedir=
60795             case "$found_dir" in
60796               */$acl_libdirstem | */$acl_libdirstem/)
60797                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
60798                 if test "$name" = 'intl'; then
60799                   LIBINTL_PREFIX="$basedir"
60800                 fi
60801                 additional_includedir="$basedir/include"
60802                 ;;
60803               */$acl_libdirstem2 | */$acl_libdirstem2/)
60804                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
60805                 if test "$name" = 'intl'; then
60806                   LIBINTL_PREFIX="$basedir"
60807                 fi
60808                 additional_includedir="$basedir/include"
60809                 ;;
60810               */$acl_libdirstem3 | */$acl_libdirstem3/)
60811                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
60812                 if test "$name" = 'intl'; then
60813                   LIBINTL_PREFIX="$basedir"
60814                 fi
60815                 additional_includedir="$basedir/include"
60816                 ;;
60817             esac
60818             if test "X$additional_includedir" != "X"; then
60819                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
60820                 haveit=
60821                 if test "X$additional_includedir" = "X/usr/local/include"; then
60822                   if test -n "$GCC"; then
60823                     case $host_os in
60824                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
60825                     esac
60826                   fi
60827                 fi
60828                 if test -z "$haveit"; then
60829                   for x in $CPPFLAGS $INCINTL; do
60830
60831   acl_save_prefix="$prefix"
60832   prefix="$acl_final_prefix"
60833   acl_save_exec_prefix="$exec_prefix"
60834   exec_prefix="$acl_final_exec_prefix"
60835   eval x=\"$x\"
60836   exec_prefix="$acl_save_exec_prefix"
60837   prefix="$acl_save_prefix"
60838
60839                     if test "X$x" = "X-I$additional_includedir"; then
60840                       haveit=yes
60841                       break
60842                     fi
60843                   done
60844                   if test -z "$haveit"; then
60845                     if test -d "$additional_includedir"; then
60846                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
60847                     fi
60848                   fi
60849                 fi
60850               fi
60851             fi
60852                         if test -n "$found_la"; then
60853                                                         save_libdir="$libdir"
60854               case "$found_la" in
60855                 */* | *\\*) . "$found_la" ;;
60856                 *) . "./$found_la" ;;
60857               esac
60858               libdir="$save_libdir"
60859                             for dep in $dependency_libs; do
60860                 case "$dep" in
60861                   -L*)
60862                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
60863                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
60864                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
60865                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
60866                       haveit=
60867                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
60868                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
60869                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
60870                         if test -n "$GCC"; then
60871                           case $host_os in
60872                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
60873                           esac
60874                         fi
60875                       fi
60876                       if test -z "$haveit"; then
60877                         haveit=
60878                         for x in $LDFLAGS $LIBINTL; do
60879
60880   acl_save_prefix="$prefix"
60881   prefix="$acl_final_prefix"
60882   acl_save_exec_prefix="$exec_prefix"
60883   exec_prefix="$acl_final_exec_prefix"
60884   eval x=\"$x\"
60885   exec_prefix="$acl_save_exec_prefix"
60886   prefix="$acl_save_prefix"
60887
60888                           if test "X$x" = "X-L$dependency_libdir"; then
60889                             haveit=yes
60890                             break
60891                           fi
60892                         done
60893                         if test -z "$haveit"; then
60894                           if test -d "$dependency_libdir"; then
60895                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
60896                           fi
60897                         fi
60898                         haveit=
60899                         for x in $LDFLAGS $LTLIBINTL; do
60900
60901   acl_save_prefix="$prefix"
60902   prefix="$acl_final_prefix"
60903   acl_save_exec_prefix="$exec_prefix"
60904   exec_prefix="$acl_final_exec_prefix"
60905   eval x=\"$x\"
60906   exec_prefix="$acl_save_exec_prefix"
60907   prefix="$acl_save_prefix"
60908
60909                           if test "X$x" = "X-L$dependency_libdir"; then
60910                             haveit=yes
60911                             break
60912                           fi
60913                         done
60914                         if test -z "$haveit"; then
60915                           if test -d "$dependency_libdir"; then
60916                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
60917                           fi
60918                         fi
60919                       fi
60920                     fi
60921                     ;;
60922                   -R*)
60923                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
60924                     if test "$enable_rpath" != no; then
60925                                                                   haveit=
60926                       for x in $rpathdirs; do
60927                         if test "X$x" = "X$dir"; then
60928                           haveit=yes
60929                           break
60930                         fi
60931                       done
60932                       if test -z "$haveit"; then
60933                         rpathdirs="$rpathdirs $dir"
60934                       fi
60935                                                                   haveit=
60936                       for x in $ltrpathdirs; do
60937                         if test "X$x" = "X$dir"; then
60938                           haveit=yes
60939                           break
60940                         fi
60941                       done
60942                       if test -z "$haveit"; then
60943                         ltrpathdirs="$ltrpathdirs $dir"
60944                       fi
60945                     fi
60946                     ;;
60947                   -l*)
60948                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
60949                     if test "X$dep" != Xc \
60950                        || case $host_os in
60951                             linux* | gnu* | k*bsd*-gnu) false ;;
60952                             *)                          true ;;
60953                           esac; then
60954                       names_next_round="$names_next_round $dep"
60955                     fi
60956                     ;;
60957                   *.la)
60958                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
60959                     ;;
60960                   *)
60961                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
60962                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
60963                     ;;
60964                 esac
60965               done
60966             fi
60967           else
60968                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
60969             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
60970           fi
60971         fi
60972       fi
60973     done
60974   done
60975   if test "X$rpathdirs" != "X"; then
60976     if test -n "$acl_hardcode_libdir_separator"; then
60977                         alldirs=
60978       for found_dir in $rpathdirs; do
60979         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
60980       done
60981             acl_save_libdir="$libdir"
60982       libdir="$alldirs"
60983       eval flag=\"$acl_hardcode_libdir_flag_spec\"
60984       libdir="$acl_save_libdir"
60985       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
60986     else
60987             for found_dir in $rpathdirs; do
60988         acl_save_libdir="$libdir"
60989         libdir="$found_dir"
60990         eval flag=\"$acl_hardcode_libdir_flag_spec\"
60991         libdir="$acl_save_libdir"
60992         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
60993       done
60994     fi
60995   fi
60996   if test "X$ltrpathdirs" != "X"; then
60997             for found_dir in $ltrpathdirs; do
60998       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
60999     done
61000   fi
61001
61002
61003
61004
61005
61006           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
61007 printf %s "checking for GNU gettext in libintl... " >&6; }
61008 if eval test \${$gt_func_gnugettext_libintl+y}
61009 then :
61010   printf %s "(cached) " >&6
61011 else $as_nop
61012   gt_save_CPPFLAGS="$CPPFLAGS"
61013             CPPFLAGS="$CPPFLAGS $INCINTL"
61014             gt_save_LIBS="$LIBS"
61015             LIBS="$LIBS $LIBINTL"
61016                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61017 /* end confdefs.h.  */
61018
61019 #include <libintl.h>
61020 $gt_revision_test_code
61021 extern int _nl_msg_cat_cntr;
61022 extern
61023 #ifdef __cplusplus
61024 "C"
61025 #endif
61026 const char *_nl_expand_alias (const char *);
61027
61028 int
61029 main (void)
61030 {
61031
61032 bindtextdomain ("", "");
61033 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
61034
61035   ;
61036   return 0;
61037 }
61038 _ACEOF
61039 if ac_fn_c_try_link "$LINENO"
61040 then :
61041   eval "$gt_func_gnugettext_libintl=yes"
61042 else $as_nop
61043   eval "$gt_func_gnugettext_libintl=no"
61044 fi
61045 rm -f core conftest.err conftest.$ac_objext conftest.beam \
61046     conftest$ac_exeext conftest.$ac_ext
61047                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
61048               LIBS="$LIBS $LIBICONV"
61049               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61050 /* end confdefs.h.  */
61051
61052 #include <libintl.h>
61053 $gt_revision_test_code
61054 extern int _nl_msg_cat_cntr;
61055 extern
61056 #ifdef __cplusplus
61057 "C"
61058 #endif
61059 const char *_nl_expand_alias (const char *);
61060
61061 int
61062 main (void)
61063 {
61064
61065 bindtextdomain ("", "");
61066 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
61067
61068   ;
61069   return 0;
61070 }
61071 _ACEOF
61072 if ac_fn_c_try_link "$LINENO"
61073 then :
61074   LIBINTL="$LIBINTL $LIBICONV"
61075                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
61076                  eval "$gt_func_gnugettext_libintl=yes"
61077
61078 fi
61079 rm -f core conftest.err conftest.$ac_objext conftest.beam \
61080     conftest$ac_exeext conftest.$ac_ext
61081             fi
61082             CPPFLAGS="$gt_save_CPPFLAGS"
61083             LIBS="$gt_save_LIBS"
61084 fi
61085 eval ac_res=\$$gt_func_gnugettext_libintl
61086                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
61087 printf "%s\n" "$ac_res" >&6; }
61088         fi
61089
61090                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
61091            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
61092                 && test "$PACKAGE" != gettext-runtime \
61093                 && test "$PACKAGE" != gettext-tools; }; then
61094           gt_use_preinstalled_gnugettext=yes
61095         else
61096                     LIBINTL=
61097           LTLIBINTL=
61098           INCINTL=
61099         fi
61100
61101
61102
61103     if test -n "$INTL_MACOSX_LIBS"; then
61104       if test "$gt_use_preinstalled_gnugettext" = "yes" \
61105          || test "$nls_cv_use_gnu_gettext" = "yes"; then
61106                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
61107         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
61108       fi
61109     fi
61110
61111     if test "$gt_use_preinstalled_gnugettext" = "yes" \
61112        || test "$nls_cv_use_gnu_gettext" = "yes"; then
61113
61114 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
61115
61116     else
61117       USE_NLS=no
61118     fi
61119   fi
61120
61121   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
61122 printf %s "checking whether to use NLS... " >&6; }
61123   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
61124 printf "%s\n" "$USE_NLS" >&6; }
61125   if test "$USE_NLS" = "yes"; then
61126     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
61127 printf %s "checking where the gettext function comes from... " >&6; }
61128     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
61129       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
61130         gt_source="external libintl"
61131       else
61132         gt_source="libc"
61133       fi
61134     else
61135       gt_source="included intl directory"
61136     fi
61137     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
61138 printf "%s\n" "$gt_source" >&6; }
61139   fi
61140
61141   if test "$USE_NLS" = "yes"; then
61142
61143     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
61144       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
61145         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
61146 printf %s "checking how to link with libintl... " >&6; }
61147         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
61148 printf "%s\n" "$LIBINTL" >&6; }
61149
61150   for element in $INCINTL; do
61151     haveit=
61152     for x in $CPPFLAGS; do
61153
61154   acl_save_prefix="$prefix"
61155   prefix="$acl_final_prefix"
61156   acl_save_exec_prefix="$exec_prefix"
61157   exec_prefix="$acl_final_exec_prefix"
61158   eval x=\"$x\"
61159   exec_prefix="$acl_save_exec_prefix"
61160   prefix="$acl_save_prefix"
61161
61162       if test "X$x" = "X$element"; then
61163         haveit=yes
61164         break
61165       fi
61166     done
61167     if test -z "$haveit"; then
61168       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
61169     fi
61170   done
61171
61172       fi
61173
61174
61175 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
61176
61177
61178 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
61179
61180     fi
61181
61182         POSUB=po
61183   fi
61184
61185
61186
61187     INTLLIBS="$LIBINTL"
61188
61189
61190
61191
61192
61193
61194
61195
61196 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile po/Makefile.in src/Makefile tests/Makefile checks/Makefile examples/Makefile"
61197
61198
61199 cat >confcache <<\_ACEOF
61200 # This file is a shell script that caches the results of configure
61201 # tests run on this system so they can be shared between configure
61202 # scripts and configure runs, see configure's option --config-cache.
61203 # It is not useful on other systems.  If it contains results you don't
61204 # want to keep, you may remove or edit it.
61205 #
61206 # config.status only pays attention to the cache file if you give it
61207 # the --recheck option to rerun configure.
61208 #
61209 # `ac_cv_env_foo' variables (set or unset) will be overridden when
61210 # loading this file, other *unset* `ac_cv_foo' will be assigned the
61211 # following values.
61212
61213 _ACEOF
61214
61215 # The following way of writing the cache mishandles newlines in values,
61216 # but we know of no workaround that is simple, portable, and efficient.
61217 # So, we kill variables containing newlines.
61218 # Ultrix sh set writes to stderr and can't be redirected directly,
61219 # and sets the high bit in the cache file unless we assign to the vars.
61220 (
61221   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
61222     eval ac_val=\$$ac_var
61223     case $ac_val in #(
61224     *${as_nl}*)
61225       case $ac_var in #(
61226       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
61227 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
61228       esac
61229       case $ac_var in #(
61230       _ | IFS | as_nl) ;; #(
61231       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
61232       *) { eval $ac_var=; unset $ac_var;} ;;
61233       esac ;;
61234     esac
61235   done
61236
61237   (set) 2>&1 |
61238     case $as_nl`(ac_space=' '; set) 2>&1` in #(
61239     *${as_nl}ac_space=\ *)
61240       # `set' does not quote correctly, so add quotes: double-quote
61241       # substitution turns \\\\ into \\, and sed turns \\ into \.
61242       sed -n \
61243         "s/'/'\\\\''/g;
61244           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
61245       ;; #(
61246     *)
61247       # `set' quotes correctly as required by POSIX, so do not add quotes.
61248       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
61249       ;;
61250     esac |
61251     sort
61252 ) |
61253   sed '
61254      /^ac_cv_env_/b end
61255      t clear
61256      :clear
61257      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
61258      t end
61259      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
61260      :end' >>confcache
61261 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
61262   if test -w "$cache_file"; then
61263     if test "x$cache_file" != "x/dev/null"; then
61264       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
61265 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
61266       if test ! -f "$cache_file" || test -h "$cache_file"; then
61267         cat confcache >"$cache_file"
61268       else
61269         case $cache_file in #(
61270         */* | ?:*)
61271           mv -f confcache "$cache_file"$$ &&
61272           mv -f "$cache_file"$$ "$cache_file" ;; #(
61273         *)
61274           mv -f confcache "$cache_file" ;;
61275         esac
61276       fi
61277     fi
61278   else
61279     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
61280 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
61281   fi
61282 fi
61283 rm -f confcache
61284
61285 test "x$prefix" = xNONE && prefix=$ac_default_prefix
61286 # Let make expand exec_prefix.
61287 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
61288
61289 DEFS=-DHAVE_CONFIG_H
61290
61291 ac_libobjs=
61292 ac_ltlibobjs=
61293 U=
61294 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
61295   # 1. Remove the extension, and $U if already installed.
61296   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
61297   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
61298   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
61299   #    will be set to the directory where LIBOBJS objects are built.
61300   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
61301   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
61302 done
61303 LIBOBJS=$ac_libobjs
61304
61305 LTLIBOBJS=$ac_ltlibobjs
61306
61307
61308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
61309 printf %s "checking that generated files are newer than configure... " >&6; }
61310    if test -n "$am_sleep_pid"; then
61311      # Hide warnings about reused PIDs.
61312      wait $am_sleep_pid 2>/dev/null
61313    fi
61314    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
61315 printf "%s\n" "done" >&6; }
61316  if test -n "$EXEEXT"; then
61317   am__EXEEXT_TRUE=
61318   am__EXEEXT_FALSE='#'
61319 else
61320   am__EXEEXT_TRUE='#'
61321   am__EXEEXT_FALSE=
61322 fi
61323
61324 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
61325   as_fn_error $? "conditional \"AMDEP\" was never defined.
61326 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61327 fi
61328 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
61329   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
61330 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61331 fi
61332 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
61333   as_fn_error $? "conditional \"ANSICXX\" was never defined.
61334 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61335 fi
61336 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
61337   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
61338 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61339 fi
61340 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
61341   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
61342 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61343 fi
61344 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
61345   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
61346 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61347 fi
61348 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
61349   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
61350 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61351 fi
61352 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
61353 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
61354   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
61355 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61356 fi
61357 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
61358   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
61359 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61360 fi
61361 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61362   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61363 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61364 fi
61365 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61366   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61367 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61368 fi
61369 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61370   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61371 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61372 fi
61373 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
61374   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
61375 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61376 fi
61377 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
61378   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
61379 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61380 fi
61381 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
61382   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
61383 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61384 fi
61385
61386
61387 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
61388   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
61389 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61390 fi
61391 CONFIG_INCLUDE=lib/config.h
61392
61393 if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
61394   as_fn_error $? "conditional \"GL_GENERATE_SIGSEGV_H\" was never defined.
61395 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61396 fi
61397 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
61398   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
61399 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61400 fi
61401 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
61402   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
61403 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61404 fi
61405 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
61406   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
61407 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61408 fi
61409 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
61410   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
61411 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61412 fi
61413 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
61414   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
61415 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61416 fi
61417 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
61418   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
61419 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61420 fi
61421
61422     M4_libobjs=
61423     M4_ltlibobjs=
61424     if test -n "$M4_LIBOBJS"; then
61425       # Remove the extension.
61426       sed_drop_objext='s/\.o$//;s/\.obj$//'
61427       for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
61428         M4_libobjs="$M4_libobjs $i.$ac_objext"
61429         M4_ltlibobjs="$M4_ltlibobjs $i.lo"
61430       done
61431     fi
61432     M4_LIBOBJS=$M4_libobjs
61433
61434     M4_LTLIBOBJS=$M4_ltlibobjs
61435
61436
61437
61438
61439 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
61440   as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
61441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61442 fi
61443
61444     M4tests_libobjs=
61445     M4tests_ltlibobjs=
61446     if test -n "$M4tests_LIBOBJS"; then
61447       # Remove the extension.
61448       sed_drop_objext='s/\.o$//;s/\.obj$//'
61449       for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
61450         M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
61451         M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
61452       done
61453     fi
61454     M4tests_LIBOBJS=$M4tests_libobjs
61455
61456     M4tests_LTLIBOBJS=$M4tests_ltlibobjs
61457
61458
61459
61460 : "${CONFIG_STATUS=./config.status}"
61461 ac_write_fail=0
61462 ac_clean_files_save=$ac_clean_files
61463 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
61464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
61465 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
61466 as_write_fail=0
61467 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
61468 #! $SHELL
61469 # Generated by $as_me.
61470 # Run this file to recreate the current configuration.
61471 # Compiler output produced by configure, useful for debugging
61472 # configure, is in config.log if it exists.
61473
61474 debug=false
61475 ac_cs_recheck=false
61476 ac_cs_silent=false
61477
61478 SHELL=\${CONFIG_SHELL-$SHELL}
61479 export SHELL
61480 _ASEOF
61481 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
61482 ## -------------------- ##
61483 ## M4sh Initialization. ##
61484 ## -------------------- ##
61485
61486 # Be more Bourne compatible
61487 DUALCASE=1; export DUALCASE # for MKS sh
61488 as_nop=:
61489 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
61490 then :
61491   emulate sh
61492   NULLCMD=:
61493   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
61494   # is contrary to our usage.  Disable this feature.
61495   alias -g '${1+"$@"}'='"$@"'
61496   setopt NO_GLOB_SUBST
61497 else $as_nop
61498   case `(set -o) 2>/dev/null` in #(
61499   *posix*) :
61500     set -o posix ;; #(
61501   *) :
61502      ;;
61503 esac
61504 fi
61505
61506
61507
61508 # Reset variables that may have inherited troublesome values from
61509 # the environment.
61510
61511 # IFS needs to be set, to space, tab, and newline, in precisely that order.
61512 # (If _AS_PATH_WALK were called with IFS unset, it would have the
61513 # side effect of setting IFS to empty, thus disabling word splitting.)
61514 # Quoting is to prevent editors from complaining about space-tab.
61515 as_nl='
61516 '
61517 export as_nl
61518 IFS=" ""        $as_nl"
61519
61520 PS1='$ '
61521 PS2='> '
61522 PS4='+ '
61523
61524 # Ensure predictable behavior from utilities with locale-dependent output.
61525 LC_ALL=C
61526 export LC_ALL
61527 LANGUAGE=C
61528 export LANGUAGE
61529
61530 # We cannot yet rely on "unset" to work, but we need these variables
61531 # to be unset--not just set to an empty or harmless value--now, to
61532 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
61533 # also avoids known problems related to "unset" and subshell syntax
61534 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
61535 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
61536 do eval test \${$as_var+y} \
61537   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
61538 done
61539
61540 # Ensure that fds 0, 1, and 2 are open.
61541 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
61542 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
61543 if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
61544
61545 # The user is always right.
61546 if ${PATH_SEPARATOR+false} :; then
61547   PATH_SEPARATOR=:
61548   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
61549     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
61550       PATH_SEPARATOR=';'
61551   }
61552 fi
61553
61554
61555 # Find who we are.  Look in the path if we contain no directory separator.
61556 as_myself=
61557 case $0 in #((
61558   *[\\/]* ) as_myself=$0 ;;
61559   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61560 for as_dir in $PATH
61561 do
61562   IFS=$as_save_IFS
61563   case $as_dir in #(((
61564     '') as_dir=./ ;;
61565     */) ;;
61566     *) as_dir=$as_dir/ ;;
61567   esac
61568     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
61569   done
61570 IFS=$as_save_IFS
61571
61572      ;;
61573 esac
61574 # We did not find ourselves, most probably we were run as `sh COMMAND'
61575 # in which case we are not to be found in the path.
61576 if test "x$as_myself" = x; then
61577   as_myself=$0
61578 fi
61579 if test ! -f "$as_myself"; then
61580   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
61581   exit 1
61582 fi
61583
61584
61585
61586 # as_fn_error STATUS ERROR [LINENO LOG_FD]
61587 # ----------------------------------------
61588 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
61589 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
61590 # script with STATUS, using 1 if that was 0.
61591 as_fn_error ()
61592 {
61593   as_status=$1; test $as_status -eq 0 && as_status=1
61594   if test "$4"; then
61595     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
61596     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
61597   fi
61598   printf "%s\n" "$as_me: error: $2" >&2
61599   as_fn_exit $as_status
61600 } # as_fn_error
61601
61602
61603
61604 # as_fn_set_status STATUS
61605 # -----------------------
61606 # Set $? to STATUS, without forking.
61607 as_fn_set_status ()
61608 {
61609   return $1
61610 } # as_fn_set_status
61611
61612 # as_fn_exit STATUS
61613 # -----------------
61614 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
61615 as_fn_exit ()
61616 {
61617   set +e
61618   as_fn_set_status $1
61619   exit $1
61620 } # as_fn_exit
61621
61622 # as_fn_unset VAR
61623 # ---------------
61624 # Portably unset VAR.
61625 as_fn_unset ()
61626 {
61627   { eval $1=; unset $1;}
61628 }
61629 as_unset=as_fn_unset
61630
61631 # as_fn_append VAR VALUE
61632 # ----------------------
61633 # Append the text in VALUE to the end of the definition contained in VAR. Take
61634 # advantage of any shell optimizations that allow amortized linear growth over
61635 # repeated appends, instead of the typical quadratic growth present in naive
61636 # implementations.
61637 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
61638 then :
61639   eval 'as_fn_append ()
61640   {
61641     eval $1+=\$2
61642   }'
61643 else $as_nop
61644   as_fn_append ()
61645   {
61646     eval $1=\$$1\$2
61647   }
61648 fi # as_fn_append
61649
61650 # as_fn_arith ARG...
61651 # ------------------
61652 # Perform arithmetic evaluation on the ARGs, and store the result in the
61653 # global $as_val. Take advantage of shells that can avoid forks. The arguments
61654 # must be portable across $(()) and expr.
61655 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
61656 then :
61657   eval 'as_fn_arith ()
61658   {
61659     as_val=$(( $* ))
61660   }'
61661 else $as_nop
61662   as_fn_arith ()
61663   {
61664     as_val=`expr "$@" || test $? -eq 1`
61665   }
61666 fi # as_fn_arith
61667
61668
61669 if expr a : '\(a\)' >/dev/null 2>&1 &&
61670    test "X`expr 00001 : '.*\(...\)'`" = X001; then
61671   as_expr=expr
61672 else
61673   as_expr=false
61674 fi
61675
61676 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
61677   as_basename=basename
61678 else
61679   as_basename=false
61680 fi
61681
61682 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
61683   as_dirname=dirname
61684 else
61685   as_dirname=false
61686 fi
61687
61688 as_me=`$as_basename -- "$0" ||
61689 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
61690          X"$0" : 'X\(//\)$' \| \
61691          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
61692 printf "%s\n" X/"$0" |
61693     sed '/^.*\/\([^/][^/]*\)\/*$/{
61694             s//\1/
61695             q
61696           }
61697           /^X\/\(\/\/\)$/{
61698             s//\1/
61699             q
61700           }
61701           /^X\/\(\/\).*/{
61702             s//\1/
61703             q
61704           }
61705           s/.*/./; q'`
61706
61707 # Avoid depending upon Character Ranges.
61708 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
61709 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
61710 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
61711 as_cr_digits='0123456789'
61712 as_cr_alnum=$as_cr_Letters$as_cr_digits
61713
61714
61715 # Determine whether it's possible to make 'echo' print without a newline.
61716 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
61717 # for compatibility with existing Makefiles.
61718 ECHO_C= ECHO_N= ECHO_T=
61719 case `echo -n x` in #(((((
61720 -n*)
61721   case `echo 'xy\c'` in
61722   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
61723   xy)  ECHO_C='\c';;
61724   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
61725        ECHO_T=' ';;
61726   esac;;
61727 *)
61728   ECHO_N='-n';;
61729 esac
61730
61731 # For backward compatibility with old third-party macros, we provide
61732 # the shell variables $as_echo and $as_echo_n.  New code should use
61733 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
61734 as_echo='printf %s\n'
61735 as_echo_n='printf %s'
61736
61737 rm -f conf$$ conf$$.exe conf$$.file
61738 if test -d conf$$.dir; then
61739   rm -f conf$$.dir/conf$$.file
61740 else
61741   rm -f conf$$.dir
61742   mkdir conf$$.dir 2>/dev/null
61743 fi
61744 if (echo >conf$$.file) 2>/dev/null; then
61745   if ln -s conf$$.file conf$$ 2>/dev/null; then
61746     as_ln_s='ln -s'
61747     # ... but there are two gotchas:
61748     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
61749     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
61750     # In both cases, we have to default to `cp -pR'.
61751     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
61752       as_ln_s='cp -pR'
61753   elif ln conf$$.file conf$$ 2>/dev/null; then
61754     as_ln_s=ln
61755   else
61756     as_ln_s='cp -pR'
61757   fi
61758 else
61759   as_ln_s='cp -pR'
61760 fi
61761 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
61762 rmdir conf$$.dir 2>/dev/null
61763
61764
61765 # as_fn_mkdir_p
61766 # -------------
61767 # Create "$as_dir" as a directory, including parents if necessary.
61768 as_fn_mkdir_p ()
61769 {
61770
61771   case $as_dir in #(
61772   -*) as_dir=./$as_dir;;
61773   esac
61774   test -d "$as_dir" || eval $as_mkdir_p || {
61775     as_dirs=
61776     while :; do
61777       case $as_dir in #(
61778       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
61779       *) as_qdir=$as_dir;;
61780       esac
61781       as_dirs="'$as_qdir' $as_dirs"
61782       as_dir=`$as_dirname -- "$as_dir" ||
61783 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61784          X"$as_dir" : 'X\(//\)[^/]' \| \
61785          X"$as_dir" : 'X\(//\)$' \| \
61786          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
61787 printf "%s\n" X"$as_dir" |
61788     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61789             s//\1/
61790             q
61791           }
61792           /^X\(\/\/\)[^/].*/{
61793             s//\1/
61794             q
61795           }
61796           /^X\(\/\/\)$/{
61797             s//\1/
61798             q
61799           }
61800           /^X\(\/\).*/{
61801             s//\1/
61802             q
61803           }
61804           s/.*/./; q'`
61805       test -d "$as_dir" && break
61806     done
61807     test -z "$as_dirs" || eval "mkdir $as_dirs"
61808   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61809
61810
61811 } # as_fn_mkdir_p
61812 if mkdir -p . 2>/dev/null; then
61813   as_mkdir_p='mkdir -p "$as_dir"'
61814 else
61815   test -d ./-p && rmdir ./-p
61816   as_mkdir_p=false
61817 fi
61818
61819
61820 # as_fn_executable_p FILE
61821 # -----------------------
61822 # Test if FILE is an executable regular file.
61823 as_fn_executable_p ()
61824 {
61825   test -f "$1" && test -x "$1"
61826 } # as_fn_executable_p
61827 as_test_x='test -x'
61828 as_executable_p=as_fn_executable_p
61829
61830 # Sed expression to map a string onto a valid CPP name.
61831 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61832
61833 # Sed expression to map a string onto a valid variable name.
61834 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61835
61836
61837 exec 6>&1
61838 ## ----------------------------------- ##
61839 ## Main body of $CONFIG_STATUS script. ##
61840 ## ----------------------------------- ##
61841 _ASEOF
61842 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61843
61844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61845 # Save the log message, to keep $0 and so on meaningful, and to
61846 # report actual input values of CONFIG_FILES etc. instead of their
61847 # values after options handling.
61848 ac_log="
61849 This file was extended by GNU M4 $as_me 1.4.19, which was
61850 generated by GNU Autoconf 2.71.  Invocation command line was
61851
61852   CONFIG_FILES    = $CONFIG_FILES
61853   CONFIG_HEADERS  = $CONFIG_HEADERS
61854   CONFIG_LINKS    = $CONFIG_LINKS
61855   CONFIG_COMMANDS = $CONFIG_COMMANDS
61856   $ $0 $@
61857
61858 on `(hostname || uname -n) 2>/dev/null | sed 1q`
61859 "
61860
61861 _ACEOF
61862
61863 case $ac_config_files in *"
61864 "*) set x $ac_config_files; shift; ac_config_files=$*;;
61865 esac
61866
61867 case $ac_config_headers in *"
61868 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
61869 esac
61870
61871
61872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61873 # Files that config.status was made for.
61874 config_files="$ac_config_files"
61875 config_headers="$ac_config_headers"
61876 config_links="$ac_config_links"
61877 config_commands="$ac_config_commands"
61878
61879 _ACEOF
61880
61881 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61882 ac_cs_usage="\
61883 \`$as_me' instantiates files and other configuration actions
61884 from templates according to the current configuration.  Unless the files
61885 and actions are specified as TAGs, all are instantiated by default.
61886
61887 Usage: $0 [OPTION]... [TAG]...
61888
61889   -h, --help       print this help, then exit
61890   -V, --version    print version number and configuration settings, then exit
61891       --config     print configuration, then exit
61892   -q, --quiet, --silent
61893                    do not print progress messages
61894   -d, --debug      don't remove temporary files
61895       --recheck    update $as_me by reconfiguring in the same conditions
61896       --file=FILE[:TEMPLATE]
61897                    instantiate the configuration file FILE
61898       --header=FILE[:TEMPLATE]
61899                    instantiate the configuration header FILE
61900
61901 Configuration files:
61902 $config_files
61903
61904 Configuration headers:
61905 $config_headers
61906
61907 Configuration links:
61908 $config_links
61909
61910 Configuration commands:
61911 $config_commands
61912
61913 Report bugs to <bug-m4@gnu.org>.
61914 GNU M4 home page: <https://www.gnu.org/software/m4/>.
61915 General help using GNU software: <https://www.gnu.org/gethelp/>."
61916
61917 _ACEOF
61918 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
61919 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
61920 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61921 ac_cs_config='$ac_cs_config_escaped'
61922 ac_cs_version="\\
61923 GNU M4 config.status 1.4.19
61924 configured by $0, generated by GNU Autoconf 2.71,
61925   with options \\"\$ac_cs_config\\"
61926
61927 Copyright (C) 2021 Free Software Foundation, Inc.
61928 This config.status script is free software; the Free Software Foundation
61929 gives unlimited permission to copy, distribute and modify it."
61930
61931 ac_pwd='$ac_pwd'
61932 srcdir='$srcdir'
61933 INSTALL='$INSTALL'
61934 MKDIR_P='$MKDIR_P'
61935 AWK='$AWK'
61936 test -n "\$AWK" || AWK=awk
61937 _ACEOF
61938
61939 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61940 # The default lists apply if the user does not specify any file.
61941 ac_need_defaults=:
61942 while test $# != 0
61943 do
61944   case $1 in
61945   --*=?*)
61946     ac_option=`expr "X$1" : 'X\([^=]*\)='`
61947     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61948     ac_shift=:
61949     ;;
61950   --*=)
61951     ac_option=`expr "X$1" : 'X\([^=]*\)='`
61952     ac_optarg=
61953     ac_shift=:
61954     ;;
61955   *)
61956     ac_option=$1
61957     ac_optarg=$2
61958     ac_shift=shift
61959     ;;
61960   esac
61961
61962   case $ac_option in
61963   # Handling of the options.
61964   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61965     ac_cs_recheck=: ;;
61966   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61967     printf "%s\n" "$ac_cs_version"; exit ;;
61968   --config | --confi | --conf | --con | --co | --c )
61969     printf "%s\n" "$ac_cs_config"; exit ;;
61970   --debug | --debu | --deb | --de | --d | -d )
61971     debug=: ;;
61972   --file | --fil | --fi | --f )
61973     $ac_shift
61974     case $ac_optarg in
61975     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61976     '') as_fn_error $? "missing file argument" ;;
61977     esac
61978     as_fn_append CONFIG_FILES " '$ac_optarg'"
61979     ac_need_defaults=false;;
61980   --header | --heade | --head | --hea )
61981     $ac_shift
61982     case $ac_optarg in
61983     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61984     esac
61985     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
61986     ac_need_defaults=false;;
61987   --he | --h)
61988     # Conflict between --help and --header
61989     as_fn_error $? "ambiguous option: \`$1'
61990 Try \`$0 --help' for more information.";;
61991   --help | --hel | -h )
61992     printf "%s\n" "$ac_cs_usage"; exit ;;
61993   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61994   | -silent | --silent | --silen | --sile | --sil | --si | --s)
61995     ac_cs_silent=: ;;
61996
61997   # This is an error.
61998   -*) as_fn_error $? "unrecognized option: \`$1'
61999 Try \`$0 --help' for more information." ;;
62000
62001   *) as_fn_append ac_config_targets " $1"
62002      ac_need_defaults=false ;;
62003
62004   esac
62005   shift
62006 done
62007
62008 ac_configure_extra_args=
62009
62010 if $ac_cs_silent; then
62011   exec 6>/dev/null
62012   ac_configure_extra_args="$ac_configure_extra_args --silent"
62013 fi
62014
62015 _ACEOF
62016 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62017 if \$ac_cs_recheck; then
62018   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
62019   shift
62020   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
62021   CONFIG_SHELL='$SHELL'
62022   export CONFIG_SHELL
62023   exec "\$@"
62024 fi
62025
62026 _ACEOF
62027 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62028 exec 5>>config.log
62029 {
62030   echo
62031   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
62032 ## Running $as_me. ##
62033 _ASBOX
62034   printf "%s\n" "$ac_log"
62035 } >&5
62036
62037 _ACEOF
62038 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62039 #
62040 # INIT-COMMANDS
62041 #
62042 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
62043 GNUmakefile=$GNUmakefile
62044 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
62045     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
62046     # from automake < 1.5.
62047     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
62048     # Capture the value of LINGUAS because we need it to compute CATALOGS.
62049     LINGUAS="${LINGUAS-%UNSET%}"
62050
62051
62052 _ACEOF
62053
62054 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62055
62056 # Handling of arguments.
62057 for ac_config_target in $ac_config_targets
62058 do
62059   case $ac_config_target in
62060     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
62061     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
62062     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
62063     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
62064     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
62065     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
62066     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
62067     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
62068     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
62069     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
62070     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
62071     "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
62072     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
62073
62074   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
62075   esac
62076 done
62077
62078
62079 # If the user did not use the arguments to specify the items to instantiate,
62080 # then the envvar interface is used.  Set only those that are not.
62081 # We use the long form for the default assignment because of an extremely
62082 # bizarre bug on SunOS 4.1.3.
62083 if $ac_need_defaults; then
62084   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
62085   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
62086   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
62087   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
62088 fi
62089
62090 # Have a temporary directory for convenience.  Make it in the build tree
62091 # simply because there is no reason against having it here, and in addition,
62092 # creating and moving files from /tmp can sometimes cause problems.
62093 # Hook for its removal unless debugging.
62094 # Note that there is a small window in which the directory will not be cleaned:
62095 # after its creation but before its name has been assigned to `$tmp'.
62096 $debug ||
62097 {
62098   tmp= ac_tmp=
62099   trap 'exit_status=$?
62100   : "${ac_tmp:=$tmp}"
62101   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
62102 ' 0
62103   trap 'as_fn_exit 1' 1 2 13 15
62104 }
62105 # Create a (secure) tmp directory for tmp files.
62106
62107 {
62108   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
62109   test -d "$tmp"
62110 }  ||
62111 {
62112   tmp=./conf$$-$RANDOM
62113   (umask 077 && mkdir "$tmp")
62114 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
62115 ac_tmp=$tmp
62116
62117 # Set up the scripts for CONFIG_FILES section.
62118 # No need to generate them if there are no CONFIG_FILES.
62119 # This happens for instance with `./config.status config.h'.
62120 if test -n "$CONFIG_FILES"; then
62121
62122
62123 ac_cr=`echo X | tr X '\015'`
62124 # On cygwin, bash can eat \r inside `` if the user requested igncr.
62125 # But we know of no other shell where ac_cr would be empty at this
62126 # point, so we can use a bashism as a fallback.
62127 if test "x$ac_cr" = x; then
62128   eval ac_cr=\$\'\\r\'
62129 fi
62130 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
62131 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
62132   ac_cs_awk_cr='\\r'
62133 else
62134   ac_cs_awk_cr=$ac_cr
62135 fi
62136
62137 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
62138 _ACEOF
62139
62140
62141 {
62142   echo "cat >conf$$subs.awk <<_ACEOF" &&
62143   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
62144   echo "_ACEOF"
62145 } >conf$$subs.sh ||
62146   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62147 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
62148 ac_delim='%!_!# '
62149 for ac_last_try in false false false false false :; do
62150   . ./conf$$subs.sh ||
62151     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62152
62153   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
62154   if test $ac_delim_n = $ac_delim_num; then
62155     break
62156   elif $ac_last_try; then
62157     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62158   else
62159     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62160   fi
62161 done
62162 rm -f conf$$subs.sh
62163
62164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62165 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
62166 _ACEOF
62167 sed -n '
62168 h
62169 s/^/S["/; s/!.*/"]=/
62170 p
62171 g
62172 s/^[^!]*!//
62173 :repl
62174 t repl
62175 s/'"$ac_delim"'$//
62176 t delim
62177 :nl
62178 h
62179 s/\(.\{148\}\)..*/\1/
62180 t more1
62181 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
62182 p
62183 n
62184 b repl
62185 :more1
62186 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62187 p
62188 g
62189 s/.\{148\}//
62190 t nl
62191 :delim
62192 h
62193 s/\(.\{148\}\)..*/\1/
62194 t more2
62195 s/["\\]/\\&/g; s/^/"/; s/$/"/
62196 p
62197 b
62198 :more2
62199 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62200 p
62201 g
62202 s/.\{148\}//
62203 t delim
62204 ' <conf$$subs.awk | sed '
62205 /^[^""]/{
62206   N
62207   s/\n//
62208 }
62209 ' >>$CONFIG_STATUS || ac_write_fail=1
62210 rm -f conf$$subs.awk
62211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62212 _ACAWK
62213 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
62214   for (key in S) S_is_set[key] = 1
62215   FS = "\a"
62216
62217 }
62218 {
62219   line = $ 0
62220   nfields = split(line, field, "@")
62221   substed = 0
62222   len = length(field[1])
62223   for (i = 2; i < nfields; i++) {
62224     key = field[i]
62225     keylen = length(key)
62226     if (S_is_set[key]) {
62227       value = S[key]
62228       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
62229       len += length(value) + length(field[++i])
62230       substed = 1
62231     } else
62232       len += 1 + keylen
62233   }
62234
62235   print line
62236 }
62237
62238 _ACAWK
62239 _ACEOF
62240 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62241 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
62242   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
62243 else
62244   cat
62245 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
62246   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
62247 _ACEOF
62248
62249 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
62250 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
62251 # trailing colons and then remove the whole line if VPATH becomes empty
62252 # (actually we leave an empty line to preserve line numbers).
62253 if test "x$srcdir" = x.; then
62254   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
62255 h
62256 s///
62257 s/^/:/
62258 s/[      ]*$/:/
62259 s/:\$(srcdir):/:/g
62260 s/:\${srcdir}:/:/g
62261 s/:@srcdir@:/:/g
62262 s/^:*//
62263 s/:*$//
62264 x
62265 s/\(=[   ]*\).*/\1/
62266 G
62267 s/\n//
62268 s/^[^=]*=[       ]*$//
62269 }'
62270 fi
62271
62272 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62273 fi # test -n "$CONFIG_FILES"
62274
62275 # Set up the scripts for CONFIG_HEADERS section.
62276 # No need to generate them if there are no CONFIG_HEADERS.
62277 # This happens for instance with `./config.status Makefile'.
62278 if test -n "$CONFIG_HEADERS"; then
62279 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
62280 BEGIN {
62281 _ACEOF
62282
62283 # Transform confdefs.h into an awk script `defines.awk', embedded as
62284 # here-document in config.status, that substitutes the proper values into
62285 # config.h.in to produce config.h.
62286
62287 # Create a delimiter string that does not exist in confdefs.h, to ease
62288 # handling of long lines.
62289 ac_delim='%!_!# '
62290 for ac_last_try in false false :; do
62291   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
62292   if test -z "$ac_tt"; then
62293     break
62294   elif $ac_last_try; then
62295     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
62296   else
62297     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62298   fi
62299 done
62300
62301 # For the awk script, D is an array of macro values keyed by name,
62302 # likewise P contains macro parameters if any.  Preserve backslash
62303 # newline sequences.
62304
62305 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
62306 sed -n '
62307 s/.\{148\}/&'"$ac_delim"'/g
62308 t rset
62309 :rset
62310 s/^[     ]*#[    ]*define[       ][      ]*/ /
62311 t def
62312 d
62313 :def
62314 s/\\$//
62315 t bsnl
62316 s/["\\]/\\&/g
62317 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
62318 D["\1"]=" \3"/p
62319 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
62320 d
62321 :bsnl
62322 s/["\\]/\\&/g
62323 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
62324 D["\1"]=" \3\\\\\\n"\\/p
62325 t cont
62326 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
62327 t cont
62328 d
62329 :cont
62330 n
62331 s/.\{148\}/&'"$ac_delim"'/g
62332 t clear
62333 :clear
62334 s/\\$//
62335 t bsnlc
62336 s/["\\]/\\&/g; s/^/"/; s/$/"/p
62337 d
62338 :bsnlc
62339 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
62340 b cont
62341 ' <confdefs.h | sed '
62342 s/'"$ac_delim"'/"\\\
62343 "/g' >>$CONFIG_STATUS || ac_write_fail=1
62344
62345 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62346   for (key in D) D_is_set[key] = 1
62347   FS = "\a"
62348 }
62349 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
62350   line = \$ 0
62351   split(line, arg, " ")
62352   if (arg[1] == "#") {
62353     defundef = arg[2]
62354     mac1 = arg[3]
62355   } else {
62356     defundef = substr(arg[1], 2)
62357     mac1 = arg[2]
62358   }
62359   split(mac1, mac2, "(") #)
62360   macro = mac2[1]
62361   prefix = substr(line, 1, index(line, defundef) - 1)
62362   if (D_is_set[macro]) {
62363     # Preserve the white space surrounding the "#".
62364     print prefix "define", macro P[macro] D[macro]
62365     next
62366   } else {
62367     # Replace #undef with comments.  This is necessary, for example,
62368     # in the case of _POSIX_SOURCE, which is predefined and required
62369     # on some systems where configure will not decide to define it.
62370     if (defundef == "undef") {
62371       print "/*", prefix defundef, macro, "*/"
62372       next
62373     }
62374   }
62375 }
62376 { print }
62377 _ACAWK
62378 _ACEOF
62379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62380   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
62381 fi # test -n "$CONFIG_HEADERS"
62382
62383
62384 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
62385 shift
62386 for ac_tag
62387 do
62388   case $ac_tag in
62389   :[FHLC]) ac_mode=$ac_tag; continue;;
62390   esac
62391   case $ac_mode$ac_tag in
62392   :[FHL]*:*);;
62393   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
62394   :[FH]-) ac_tag=-:-;;
62395   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
62396   esac
62397   ac_save_IFS=$IFS
62398   IFS=:
62399   set x $ac_tag
62400   IFS=$ac_save_IFS
62401   shift
62402   ac_file=$1
62403   shift
62404
62405   case $ac_mode in
62406   :L) ac_source=$1;;
62407   :[FH])
62408     ac_file_inputs=
62409     for ac_f
62410     do
62411       case $ac_f in
62412       -) ac_f="$ac_tmp/stdin";;
62413       *) # Look for the file first in the build tree, then in the source tree
62414          # (if the path is not absolute).  The absolute path cannot be DOS-style,
62415          # because $ac_f cannot contain `:'.
62416          test -f "$ac_f" ||
62417            case $ac_f in
62418            [\\/$]*) false;;
62419            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
62420            esac ||
62421            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
62422       esac
62423       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
62424       as_fn_append ac_file_inputs " '$ac_f'"
62425     done
62426
62427     # Let's still pretend it is `configure' which instantiates (i.e., don't
62428     # use $as_me), people would be surprised to read:
62429     #    /* config.h.  Generated by config.status.  */
62430     configure_input='Generated from '`
62431           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
62432         `' by configure.'
62433     if test x"$ac_file" != x-; then
62434       configure_input="$ac_file.  $configure_input"
62435       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
62436 printf "%s\n" "$as_me: creating $ac_file" >&6;}
62437     fi
62438     # Neutralize special characters interpreted by sed in replacement strings.
62439     case $configure_input in #(
62440     *\&* | *\|* | *\\* )
62441        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
62442        sed 's/[\\\\&|]/\\\\&/g'`;; #(
62443     *) ac_sed_conf_input=$configure_input;;
62444     esac
62445
62446     case $ac_tag in
62447     *:-:* | *:-) cat >"$ac_tmp/stdin" \
62448       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
62449     esac
62450     ;;
62451   esac
62452
62453   ac_dir=`$as_dirname -- "$ac_file" ||
62454 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62455          X"$ac_file" : 'X\(//\)[^/]' \| \
62456          X"$ac_file" : 'X\(//\)$' \| \
62457          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
62458 printf "%s\n" X"$ac_file" |
62459     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62460             s//\1/
62461             q
62462           }
62463           /^X\(\/\/\)[^/].*/{
62464             s//\1/
62465             q
62466           }
62467           /^X\(\/\/\)$/{
62468             s//\1/
62469             q
62470           }
62471           /^X\(\/\).*/{
62472             s//\1/
62473             q
62474           }
62475           s/.*/./; q'`
62476   as_dir="$ac_dir"; as_fn_mkdir_p
62477   ac_builddir=.
62478
62479 case "$ac_dir" in
62480 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
62481 *)
62482   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
62483   # A ".." for each directory in $ac_dir_suffix.
62484   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
62485   case $ac_top_builddir_sub in
62486   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
62487   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
62488   esac ;;
62489 esac
62490 ac_abs_top_builddir=$ac_pwd
62491 ac_abs_builddir=$ac_pwd$ac_dir_suffix
62492 # for backward compatibility:
62493 ac_top_builddir=$ac_top_build_prefix
62494
62495 case $srcdir in
62496   .)  # We are building in place.
62497     ac_srcdir=.
62498     ac_top_srcdir=$ac_top_builddir_sub
62499     ac_abs_top_srcdir=$ac_pwd ;;
62500   [\\/]* | ?:[\\/]* )  # Absolute name.
62501     ac_srcdir=$srcdir$ac_dir_suffix;
62502     ac_top_srcdir=$srcdir
62503     ac_abs_top_srcdir=$srcdir ;;
62504   *) # Relative name.
62505     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
62506     ac_top_srcdir=$ac_top_build_prefix$srcdir
62507     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
62508 esac
62509 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
62510
62511
62512   case $ac_mode in
62513   :F)
62514   #
62515   # CONFIG_FILE
62516   #
62517
62518   case $INSTALL in
62519   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
62520   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
62521   esac
62522   ac_MKDIR_P=$MKDIR_P
62523   case $MKDIR_P in
62524   [\\/$]* | ?:[\\/]* ) ;;
62525   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
62526   esac
62527 _ACEOF
62528
62529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62530 # If the template does not know about datarootdir, expand it.
62531 # FIXME: This hack should be removed a few years after 2.60.
62532 ac_datarootdir_hack=; ac_datarootdir_seen=
62533 ac_sed_dataroot='
62534 /datarootdir/ {
62535   p
62536   q
62537 }
62538 /@datadir@/p
62539 /@docdir@/p
62540 /@infodir@/p
62541 /@localedir@/p
62542 /@mandir@/p'
62543 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
62544 *datarootdir*) ac_datarootdir_seen=yes;;
62545 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
62546   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
62547 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
62548 _ACEOF
62549 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62550   ac_datarootdir_hack='
62551   s&@datadir@&$datadir&g
62552   s&@docdir@&$docdir&g
62553   s&@infodir@&$infodir&g
62554   s&@localedir@&$localedir&g
62555   s&@mandir@&$mandir&g
62556   s&\\\${datarootdir}&$datarootdir&g' ;;
62557 esac
62558 _ACEOF
62559
62560 # Neutralize VPATH when `$srcdir' = `.'.
62561 # Shell code in configure.ac might set extrasub.
62562 # FIXME: do we really want to maintain this feature?
62563 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62564 ac_sed_extra="$ac_vpsub
62565 $extrasub
62566 _ACEOF
62567 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62568 :t
62569 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
62570 s|@configure_input@|$ac_sed_conf_input|;t t
62571 s&@top_builddir@&$ac_top_builddir_sub&;t t
62572 s&@top_build_prefix@&$ac_top_build_prefix&;t t
62573 s&@srcdir@&$ac_srcdir&;t t
62574 s&@abs_srcdir@&$ac_abs_srcdir&;t t
62575 s&@top_srcdir@&$ac_top_srcdir&;t t
62576 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
62577 s&@builddir@&$ac_builddir&;t t
62578 s&@abs_builddir@&$ac_abs_builddir&;t t
62579 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
62580 s&@INSTALL@&$ac_INSTALL&;t t
62581 s&@MKDIR_P@&$ac_MKDIR_P&;t t
62582 $ac_datarootdir_hack
62583 "
62584 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
62585   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62586
62587 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
62588   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
62589   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
62590       "$ac_tmp/out"`; test -z "$ac_out"; } &&
62591   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
62592 which seems to be undefined.  Please make sure it is defined" >&5
62593 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
62594 which seems to be undefined.  Please make sure it is defined" >&2;}
62595
62596   rm -f "$ac_tmp/stdin"
62597   case $ac_file in
62598   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
62599   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
62600   esac \
62601   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62602  ;;
62603   :H)
62604   #
62605   # CONFIG_HEADER
62606   #
62607   if test x"$ac_file" != x-; then
62608     {
62609       printf "%s\n" "/* $configure_input  */" >&1 \
62610       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
62611     } >"$ac_tmp/config.h" \
62612       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62613     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
62614       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
62615 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
62616     else
62617       rm -f "$ac_file"
62618       mv "$ac_tmp/config.h" "$ac_file" \
62619         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62620     fi
62621   else
62622     printf "%s\n" "/* $configure_input  */" >&1 \
62623       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
62624       || as_fn_error $? "could not create -" "$LINENO" 5
62625   fi
62626 # Compute "$ac_file"'s index in $config_headers.
62627 _am_arg="$ac_file"
62628 _am_stamp_count=1
62629 for _am_header in $config_headers :; do
62630   case $_am_header in
62631     $_am_arg | $_am_arg:* )
62632       break ;;
62633     * )
62634       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
62635   esac
62636 done
62637 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
62638 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62639          X"$_am_arg" : 'X\(//\)[^/]' \| \
62640          X"$_am_arg" : 'X\(//\)$' \| \
62641          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
62642 printf "%s\n" X"$_am_arg" |
62643     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62644             s//\1/
62645             q
62646           }
62647           /^X\(\/\/\)[^/].*/{
62648             s//\1/
62649             q
62650           }
62651           /^X\(\/\/\)$/{
62652             s//\1/
62653             q
62654           }
62655           /^X\(\/\).*/{
62656             s//\1/
62657             q
62658           }
62659           s/.*/./; q'`/stamp-h$_am_stamp_count
62660  ;;
62661   :L)
62662   #
62663   # CONFIG_LINK
62664   #
62665
62666   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
62667     :
62668   else
62669     # Prefer the file from the source tree if names are identical.
62670     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
62671       ac_source=$srcdir/$ac_source
62672     fi
62673
62674     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
62675 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
62676
62677     if test ! -r "$ac_source"; then
62678       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
62679     fi
62680     rm -f "$ac_file"
62681
62682     # Try a relative symlink, then a hard link, then a copy.
62683     case $ac_source in
62684     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
62685         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
62686     esac
62687     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
62688       ln "$ac_source" "$ac_file" 2>/dev/null ||
62689       cp -p "$ac_source" "$ac_file" ||
62690       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
62691   fi
62692  ;;
62693   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
62694 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
62695  ;;
62696   esac
62697
62698
62699   case $ac_file$ac_mode in
62700     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
62701   # Older Autoconf quotes --file arguments for eval, but not when files
62702   # are listed without --file.  Let's play safe and only enable the eval
62703   # if we detect the quoting.
62704   # TODO: see whether this extra hack can be removed once we start
62705   # requiring Autoconf 2.70 or later.
62706   case $CONFIG_FILES in #(
62707   *\'*) :
62708     eval set x "$CONFIG_FILES" ;; #(
62709   *) :
62710     set x $CONFIG_FILES ;; #(
62711   *) :
62712      ;;
62713 esac
62714   shift
62715   # Used to flag and report bootstrapping failures.
62716   am_rc=0
62717   for am_mf
62718   do
62719     # Strip MF so we end up with the name of the file.
62720     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
62721     # Check whether this is an Automake generated Makefile which includes
62722     # dependency-tracking related rules and includes.
62723     # Grep'ing the whole file directly is not great: AIX grep has a line
62724     # limit of 2048, but all sed's we know have understand at least 4000.
62725     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
62726       || continue
62727     am_dirpart=`$as_dirname -- "$am_mf" ||
62728 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62729          X"$am_mf" : 'X\(//\)[^/]' \| \
62730          X"$am_mf" : 'X\(//\)$' \| \
62731          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
62732 printf "%s\n" X"$am_mf" |
62733     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62734             s//\1/
62735             q
62736           }
62737           /^X\(\/\/\)[^/].*/{
62738             s//\1/
62739             q
62740           }
62741           /^X\(\/\/\)$/{
62742             s//\1/
62743             q
62744           }
62745           /^X\(\/\).*/{
62746             s//\1/
62747             q
62748           }
62749           s/.*/./; q'`
62750     am_filepart=`$as_basename -- "$am_mf" ||
62751 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
62752          X"$am_mf" : 'X\(//\)$' \| \
62753          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
62754 printf "%s\n" X/"$am_mf" |
62755     sed '/^.*\/\([^/][^/]*\)\/*$/{
62756             s//\1/
62757             q
62758           }
62759           /^X\/\(\/\/\)$/{
62760             s//\1/
62761             q
62762           }
62763           /^X\/\(\/\).*/{
62764             s//\1/
62765             q
62766           }
62767           s/.*/./; q'`
62768     { echo "$as_me:$LINENO: cd "$am_dirpart" \
62769       && sed -e '/# am--include-marker/d' "$am_filepart" \
62770         | $MAKE -f - am--depfiles" >&5
62771    (cd "$am_dirpart" \
62772       && sed -e '/# am--include-marker/d' "$am_filepart" \
62773         | $MAKE -f - am--depfiles) >&5 2>&5
62774    ac_status=$?
62775    echo "$as_me:$LINENO: \$? = $ac_status" >&5
62776    (exit $ac_status); } || am_rc=$?
62777   done
62778   if test $am_rc -ne 0; then
62779     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
62780 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
62781 as_fn_error $? "Something went wrong bootstrapping makefile fragments
62782     for automatic dependency tracking.  If GNU make was not used, consider
62783     re-running the configure script with MAKE=\"gmake\" (or whatever is
62784     necessary).  You can also try re-running configure with the
62785     '--disable-dependency-tracking' option to at least be able to build
62786     the package (albeit without support for automatic dependency tracking).
62787 See \`config.log' for more details" "$LINENO" 5; }
62788   fi
62789   { am_dirpart=; unset am_dirpart;}
62790   { am_filepart=; unset am_filepart;}
62791   { am_mf=; unset am_mf;}
62792   { am_rc=; unset am_rc;}
62793   rm -f conftest-deps.mk
62794 }
62795  ;;
62796     "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
62797     "po-directories":C)
62798     for ac_file in $CONFIG_FILES; do
62799       # Support "outfile[:infile[:infile...]]"
62800       case "$ac_file" in
62801         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
62802       esac
62803       # PO directories have a Makefile.in generated from Makefile.in.in.
62804       case "$ac_file" in */Makefile.in)
62805         # Adjust a relative srcdir.
62806         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
62807         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
62808         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
62809         # In autoconf-2.13 it is called $ac_given_srcdir.
62810         # In autoconf-2.50 it is called $srcdir.
62811         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
62812         case "$ac_given_srcdir" in
62813           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
62814           /*) top_srcdir="$ac_given_srcdir" ;;
62815           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
62816         esac
62817         # Treat a directory as a PO directory if and only if it has a
62818         # POTFILES.in file. This allows packages to have multiple PO
62819         # directories under different names or in different locations.
62820         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
62821           rm -f "$ac_dir/POTFILES"
62822           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
62823           gt_tab=`printf '\t'`
62824           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
62825           POMAKEFILEDEPS="POTFILES.in"
62826           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
62827           # on $ac_dir but don't depend on user-specified configuration
62828           # parameters.
62829           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
62830             # The LINGUAS file contains the set of available languages.
62831             if test -n "$OBSOLETE_ALL_LINGUAS"; then
62832               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
62833             fi
62834             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
62835             # Hide the ALL_LINGUAS assignment from automake < 1.5.
62836             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
62837             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
62838           else
62839             # The set of available languages was given in configure.in.
62840             # Hide the ALL_LINGUAS assignment from automake < 1.5.
62841             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
62842           fi
62843           # Compute POFILES
62844           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
62845           # Compute UPDATEPOFILES
62846           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
62847           # Compute DUMMYPOFILES
62848           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
62849           # Compute GMOFILES
62850           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
62851           case "$ac_given_srcdir" in
62852             .) srcdirpre= ;;
62853             *) srcdirpre='$(srcdir)/' ;;
62854           esac
62855           POFILES=
62856           UPDATEPOFILES=
62857           DUMMYPOFILES=
62858           GMOFILES=
62859           for lang in $ALL_LINGUAS; do
62860             POFILES="$POFILES $srcdirpre$lang.po"
62861             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
62862             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
62863             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
62864           done
62865           # CATALOGS depends on both $ac_dir and the user's LINGUAS
62866           # environment variable.
62867           INST_LINGUAS=
62868           if test -n "$ALL_LINGUAS"; then
62869             for presentlang in $ALL_LINGUAS; do
62870               useit=no
62871               if test "%UNSET%" != "$LINGUAS"; then
62872                 desiredlanguages="$LINGUAS"
62873               else
62874                 desiredlanguages="$ALL_LINGUAS"
62875               fi
62876               for desiredlang in $desiredlanguages; do
62877                 # Use the presentlang catalog if desiredlang is
62878                 #   a. equal to presentlang, or
62879                 #   b. a variant of presentlang (because in this case,
62880                 #      presentlang can be used as a fallback for messages
62881                 #      which are not translated in the desiredlang catalog).
62882                 case "$desiredlang" in
62883                   "$presentlang"*) useit=yes;;
62884                 esac
62885               done
62886               if test $useit = yes; then
62887                 INST_LINGUAS="$INST_LINGUAS $presentlang"
62888               fi
62889             done
62890           fi
62891           CATALOGS=
62892           if test -n "$INST_LINGUAS"; then
62893             for lang in $INST_LINGUAS; do
62894               CATALOGS="$CATALOGS $lang.gmo"
62895             done
62896           fi
62897           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
62898           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
62899           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
62900             if test -f "$f"; then
62901               case "$f" in
62902                 *.orig | *.bak | *~) ;;
62903                 *) cat "$f" >> "$ac_dir/Makefile" ;;
62904               esac
62905             fi
62906           done
62907         fi
62908         ;;
62909       esac
62910     done ;;
62911
62912   esac
62913 done # for ac_tag
62914
62915
62916 as_fn_exit 0
62917 _ACEOF
62918 ac_clean_files=$ac_clean_files_save
62919
62920 test $ac_write_fail = 0 ||
62921   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
62922
62923
62924 # configure is writing to config.log, and then calls config.status.
62925 # config.status does its own redirection, appending to config.log.
62926 # Unfortunately, on DOS this fails, as config.log is still kept open
62927 # by configure, so config.status won't be able to write to it; its
62928 # output is simply discarded.  So we exec the FD to /dev/null,
62929 # effectively closing config.log, so it can be properly (re)opened and
62930 # appended to by config.status.  When coming back to configure, we
62931 # need to make the FD available again.
62932 if test "$no_create" != yes; then
62933   ac_cs_success=:
62934   ac_config_status_args=
62935   test "$silent" = yes &&
62936     ac_config_status_args="$ac_config_status_args --quiet"
62937   exec 5>/dev/null
62938   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
62939   exec 5>>config.log
62940   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
62941   # would make configure fail if this is the last instruction.
62942   $ac_cs_success || as_fn_exit 1
62943 fi
62944 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
62945   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
62946 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
62947 fi
62948
62949