Bump to 3.10
[platform/upstream/diffutils.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.72c.20-9c018 for GNU diffutils 3.10.
4 #
5 # Report bugs to <bug-diffutils@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2023 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 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
21 then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else case e in #(
29   e) case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac ;;
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="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
144 then :
145   emulate sh
146   NULLCMD=:
147   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
148   # is contrary to our usage.  Disable this feature.
149   alias -g '\${1+\"\$@\"}'='\"\$@\"'
150   setopt NO_GLOB_SUBST
151 else case e in #(
152   e) case \`(set -o) 2>/dev/null\` in #(
153   *posix*) :
154     set -o posix ;; #(
155   *) :
156      ;;
157 esac ;;
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 case e in #(
176   e) exitcode=1; echo positional parameters were not saved. ;;
177 esac
178 fi
179 test x\$exitcode = x0 || exit 1
180 blah=\$(echo \$(echo blah))
181 test x\"\$blah\" = xblah || exit 1
182 test -x / || exit 1"
183   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
184   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
185   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
186   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
187 test \$(( 1 + 1 )) = 2 || exit 1"
188   if (eval "$as_required") 2>/dev/null
189 then :
190   as_have_required=yes
191 else case e in #(
192   e) as_have_required=no ;;
193 esac
194 fi
195   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
196 then :
197
198 else case e in #(
199   e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
200 as_found=false
201 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
202 do
203   IFS=$as_save_IFS
204   case $as_dir in #(((
205     '') as_dir=./ ;;
206     */) ;;
207     *) as_dir=$as_dir/ ;;
208   esac
209   as_found=:
210   case $as_dir in #(
211          /*)
212            for as_base in sh bash ksh sh5; do
213              # Try only shells that exist, to save several forks.
214              as_shell=$as_dir$as_base
215              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
216                     as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
217 then :
218   CONFIG_SHELL=$as_shell as_have_required=yes
219                    if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
220 then :
221   break 2
222 fi
223 fi
224            done;;
225        esac
226   as_found=false
227 done
228 IFS=$as_save_IFS
229 if $as_found
230 then :
231
232 else case e in #(
233   e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234               as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
235 then :
236   CONFIG_SHELL=$SHELL as_have_required=yes
237 fi ;;
238 esac
239 fi
240
241
242       if test "x$CONFIG_SHELL" != x
243 then :
244   export CONFIG_SHELL
245              # We cannot yet assume a decent shell, so we have to provide a
246 # neutralization value for shells without unset; and this also
247 # works around shells that cannot unset nonexistent variables.
248 # Preserve -v and -x to the replacement shell.
249 BASH_ENV=/dev/null
250 ENV=/dev/null
251 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
252 case $- in # ((((
253   *v*x* | *x*v* ) as_opts=-vx ;;
254   *v* ) as_opts=-v ;;
255   *x* ) as_opts=-x ;;
256   * ) as_opts= ;;
257 esac
258 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
259 # Admittedly, this is quite paranoid, since all the known shells bail
260 # out after a failed 'exec'.
261 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
262 exit 255
263 fi
264
265     if test x$as_have_required = xno
266 then :
267   printf "%s\n" "$0: This script requires a shell more modern than all"
268   printf "%s\n" "$0: the shells that I found on your system."
269   if test ${ZSH_VERSION+y} ; then
270     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
271     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
272   else
273     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
274 $0: bug-diffutils@gnu.org about your system, including any
275 $0: error possibly output before this message. Then install
276 $0: a modern shell, or manually run the script under such a
277 $0: shell if you do have one."
278   fi
279   exit 1
280 fi ;;
281 esac
282 fi
283 fi
284 SHELL=${CONFIG_SHELL-/bin/sh}
285 export SHELL
286 # Unset more variables known to interfere with behavior of common tools.
287 CLICOLOR_FORCE= GREP_OPTIONS=
288 unset CLICOLOR_FORCE GREP_OPTIONS
289
290 ## --------------------- ##
291 ## M4sh Shell Functions. ##
292 ## --------------------- ##
293 # as_fn_unset VAR
294 # ---------------
295 # Portably unset VAR.
296 as_fn_unset ()
297 {
298   { eval $1=; unset $1;}
299 }
300 as_unset=as_fn_unset
301
302
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
306 as_fn_set_status ()
307 {
308   return $1
309 } # as_fn_set_status
310
311 # as_fn_exit STATUS
312 # -----------------
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 as_fn_exit ()
315 {
316   set +e
317   as_fn_set_status $1
318   exit $1
319 } # as_fn_exit
320
321 # as_fn_mkdir_p
322 # -------------
323 # Create "$as_dir" as a directory, including parents if necessary.
324 as_fn_mkdir_p ()
325 {
326
327   case $as_dir in #(
328   -*) as_dir=./$as_dir;;
329   esac
330   test -d "$as_dir" || eval $as_mkdir_p || {
331     as_dirs=
332     while :; do
333       case $as_dir in #(
334       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335       *) as_qdir=$as_dir;;
336       esac
337       as_dirs="'$as_qdir' $as_dirs"
338       as_dir=`$as_dirname -- "$as_dir" ||
339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340          X"$as_dir" : 'X\(//\)[^/]' \| \
341          X"$as_dir" : 'X\(//\)$' \| \
342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343 printf "%s\n" X"$as_dir" |
344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)[^/].*/{
349             s//\1/
350             q
351           }
352           /^X\(\/\/\)$/{
353             s//\1/
354             q
355           }
356           /^X\(\/\).*/{
357             s//\1/
358             q
359           }
360           s/.*/./; q'`
361       test -d "$as_dir" && break
362     done
363     test -z "$as_dirs" || eval "mkdir $as_dirs"
364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367 } # as_fn_mkdir_p
368
369 # as_fn_executable_p FILE
370 # -----------------------
371 # Test if FILE is an executable regular file.
372 as_fn_executable_p ()
373 {
374   test -f "$1" && test -x "$1"
375 } # as_fn_executable_p
376 # as_fn_append VAR VALUE
377 # ----------------------
378 # Append the text in VALUE to the end of the definition contained in VAR. Take
379 # advantage of any shell optimizations that allow amortized linear growth over
380 # repeated appends, instead of the typical quadratic growth present in naive
381 # implementations.
382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
383 then :
384   eval 'as_fn_append ()
385   {
386     eval $1+=\$2
387   }'
388 else case e in #(
389   e) as_fn_append ()
390   {
391     eval $1=\$$1\$2
392   } ;;
393 esac
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402 then :
403   eval 'as_fn_arith ()
404   {
405     as_val=$(( $* ))
406   }'
407 else case e in #(
408   e) as_fn_arith ()
409   {
410     as_val=`expr "$@" || test $? -eq 1`
411   } ;;
412 esac
413 fi # as_fn_arith
414
415
416 # as_fn_error STATUS ERROR [LINENO LOG_FD]
417 # ----------------------------------------
418 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
419 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
420 # script with STATUS, using 1 if that was 0.
421 as_fn_error ()
422 {
423   as_status=$1; test $as_status -eq 0 && as_status=1
424   if test "$4"; then
425     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
426     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
427   fi
428   printf "%s\n" "$as_me: error: $2" >&2
429   as_fn_exit $as_status
430 } # as_fn_error
431
432 if expr a : '\(a\)' >/dev/null 2>&1 &&
433    test "X`expr 00001 : '.*\(...\)'`" = X001; then
434   as_expr=expr
435 else
436   as_expr=false
437 fi
438
439 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
440   as_basename=basename
441 else
442   as_basename=false
443 fi
444
445 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
446   as_dirname=dirname
447 else
448   as_dirname=false
449 fi
450
451 as_me=`$as_basename -- "$0" ||
452 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
453          X"$0" : 'X\(//\)$' \| \
454          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
455 printf "%s\n" X/"$0" |
456     sed '/^.*\/\([^/][^/]*\)\/*$/{
457             s//\1/
458             q
459           }
460           /^X\/\(\/\/\)$/{
461             s//\1/
462             q
463           }
464           /^X\/\(\/\).*/{
465             s//\1/
466             q
467           }
468           s/.*/./; q'`
469
470 # Avoid depending upon Character Ranges.
471 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
472 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
473 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
474 as_cr_digits='0123456789'
475 as_cr_alnum=$as_cr_Letters$as_cr_digits
476
477
478   as_lineno_1=$LINENO as_lineno_1a=$LINENO
479   as_lineno_2=$LINENO as_lineno_2a=$LINENO
480   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
481   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
482   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
483   sed -n '
484     p
485     /[$]LINENO/=
486   ' <$as_myself |
487     sed '
488       t clear
489       :clear
490       s/[$]LINENO.*/&-/
491       t lineno
492       b
493       :lineno
494       N
495       :loop
496       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
497       t loop
498       s/-\n.*//
499     ' >$as_me.lineno &&
500   chmod +x "$as_me.lineno" ||
501     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
502
503   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
504   # already done that, so ensure we don't try to do so again and fall
505   # in an infinite loop.  This has already happened in practice.
506   _as_can_reexec=no; export _as_can_reexec
507   # Don't try to exec as it changes $[0], causing all sort of problems
508   # (the dirname of $[0] is not the place where we might find the
509   # original and so on.  Autoconf is especially sensitive to this).
510   . "./$as_me.lineno"
511   # Exit status is that of the last command.
512   exit
513 }
514
515
516 # Determine whether it's possible to make 'echo' print without a newline.
517 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
518 # for compatibility with existing Makefiles.
519 ECHO_C= ECHO_N= ECHO_T=
520 case `echo -n x` in #(((((
521 -n*)
522   case `echo 'xy\c'` in
523   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
524   xy)  ECHO_C='\c';;
525   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
526        ECHO_T=' ';;
527   esac;;
528 *)
529   ECHO_N='-n';;
530 esac
531
532 # For backward compatibility with old third-party macros, we provide
533 # the shell variables $as_echo and $as_echo_n.  New code should use
534 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
535 as_echo='printf %s\n'
536 as_echo_n='printf %s'
537
538 rm -f conf$$ conf$$.exe conf$$.file
539 if test -d conf$$.dir; then
540   rm -f conf$$.dir/conf$$.file
541 else
542   rm -f conf$$.dir
543   mkdir conf$$.dir 2>/dev/null
544 fi
545 if (echo >conf$$.file) 2>/dev/null; then
546   if ln -s conf$$.file conf$$ 2>/dev/null; then
547     as_ln_s='ln -s'
548     # ... but there are two gotchas:
549     # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
550     # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
551     # In both cases, we have to default to 'cp -pR'.
552     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
553       as_ln_s='cp -pR'
554   elif ln conf$$.file conf$$ 2>/dev/null; then
555     as_ln_s=ln
556   else
557     as_ln_s='cp -pR'
558   fi
559 else
560   as_ln_s='cp -pR'
561 fi
562 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
563 rmdir conf$$.dir 2>/dev/null
564
565 if mkdir -p . 2>/dev/null; then
566   as_mkdir_p='mkdir -p "$as_dir"'
567 else
568   test -d ./-p && rmdir ./-p
569   as_mkdir_p=false
570 fi
571
572 as_test_x='test -x'
573 as_executable_p=as_fn_executable_p
574
575 # Sed expression to map a string onto a valid CPP name.
576 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
577 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
578
579 # Sed expression to map a string onto a valid variable name.
580 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
581 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
582
583
584 test -n "$DJDIR" || exec 7<&0 </dev/null
585 exec 6>&1
586
587 # Name of the host.
588 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
589 # so uname gets run too.
590 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
591
592 #
593 # Initializations.
594 #
595 ac_default_prefix=/usr/local
596 ac_clean_files=
597 ac_config_libobj_dir=.
598 LIBOBJS=
599 cross_compiling=no
600 subdirs=
601 MFLAGS=
602 MAKEFLAGS=
603
604 # Identity of this package.
605 PACKAGE_NAME='GNU diffutils'
606 PACKAGE_TARNAME='diffutils'
607 PACKAGE_VERSION='3.10'
608 PACKAGE_STRING='GNU diffutils 3.10'
609 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
610 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
611
612 ac_unique_file="src/diff.c"
613 # Factoring default headers for most tests.
614 ac_includes_default="\
615 #include <stddef.h>
616 #ifdef HAVE_STDIO_H
617 # include <stdio.h>
618 #endif
619 #ifdef HAVE_STDLIB_H
620 # include <stdlib.h>
621 #endif
622 #ifdef HAVE_STRING_H
623 # include <string.h>
624 #endif
625 #ifdef HAVE_INTTYPES_H
626 # include <inttypes.h>
627 #endif
628 #ifdef HAVE_STDINT_H
629 # include <stdint.h>
630 #endif
631 #ifdef HAVE_STRINGS_H
632 # include <strings.h>
633 #endif
634 #ifdef HAVE_SYS_TYPES_H
635 # include <sys/types.h>
636 #endif
637 #ifdef HAVE_SYS_STAT_H
638 # include <sys/stat.h>
639 #endif
640 #ifdef HAVE_UNISTD_H
641 # include <unistd.h>
642 #endif"
643
644 ac_header_c_list=
645 gl_use_threads_default=
646 gl_use_winpthreads_default=no
647 ac_config_libobj_dir=gnulib-tests
648 ac_func_c_list=
649 gl_fnmatch_required=POSIX
650 gl_getopt_required=POSIX
651 gt_needs=
652 enable_year2038=yes
653 ac_subst_vars='gltests_LIBOBJDEPS
654 gltests_LTLIBOBJS
655 gltests_LIBOBJS
656 gl_LIBOBJDEPS
657 gl_LTLIBOBJS
658 gl_LIBOBJS
659 CONFIG_INCLUDE
660 am__EXEEXT_FALSE
661 am__EXEEXT_TRUE
662 LTLIBOBJS
663 LIBOBJS
664 POSUB
665 INTLLIBS
666 INTL_MACOSX_LIBS
667 XGETTEXT_EXTRA_OPTIONS
668 MSGMERGE
669 XGETTEXT_015
670 XGETTEXT
671 GMSGFMT_015
672 MSGFMT_015
673 GMSGFMT
674 MSGFMT
675 GETTEXT_MACRO_VERSION
676 USE_NLS
677 SRC_VERSION_C
678 PR_PROGRAM
679 GNULIB_WARN_CFLAGS
680 WARN_CFLAGS
681 WERROR_CFLAGS
682 LIBTESTS_LIBDEPS
683 LIBDIFFUTILS_LTLIBDEPS
684 LIBDIFFUTILS_LIBDEPS
685 GL_CFLAG_GNULIB_WARNINGS
686 GL_COND_OBJ_WINDOWS_TLS_FALSE
687 GL_COND_OBJ_WINDOWS_TLS_TRUE
688 GL_COND_OBJ_WINDOWS_THREAD_FALSE
689 GL_COND_OBJ_WINDOWS_THREAD_TRUE
690 GL_COND_OBJ_WCTOMB_FALSE
691 GL_COND_OBJ_WCTOMB_TRUE
692 GL_COND_OBJ_WCTOB_FALSE
693 GL_COND_OBJ_WCTOB_TRUE
694 abs_aux_dir
695 GL_COND_OBJ_TIME_FALSE
696 GL_COND_OBJ_TIME_TRUE
697 HAVE_SYS_UIO_H
698 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
699 NEXT_SYS_UIO_H
700 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
701 NEXT_SYS_IOCTL_H
702 HAVE_SYS_IOCTL_H
703 GL_COND_OBJ_SYMLINK_FALSE
704 GL_COND_OBJ_SYMLINK_TRUE
705 GL_COND_OBJ_SOCKET_FALSE
706 GL_COND_OBJ_SOCKET_TRUE
707 GL_COND_OBJ_SLEEP_FALSE
708 GL_COND_OBJ_SLEEP_TRUE
709 GL_COND_OBJ_SETSOCKOPT_FALSE
710 GL_COND_OBJ_SETSOCKOPT_TRUE
711 GL_COND_OBJ_SELECT_FALSE
712 GL_COND_OBJ_SELECT_TRUE
713 LIB_SELECT
714 SELECT_LIB
715 LIBSOCKET
716 GL_GNULIB_SCHED_YIELD
717 HAVE_STRUCT_SCHED_PARAM
718 HAVE_SCHED_H
719 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
720 NEXT_SCHED_H
721 REPLACE_SCHED_YIELD
722 HAVE_SCHED_YIELD
723 GL_COND_OBJ_PUTENV_FALSE
724 GL_COND_OBJ_PUTENV_TRUE
725 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE
726 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE
727 LIB_PTHREAD_SIGMASK
728 PTHREAD_SIGMASK_LIB
729 GL_COND_OBJ_PTHREAD_THREAD_FALSE
730 GL_COND_OBJ_PTHREAD_THREAD_TRUE
731 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
732 GL_GNULIB_PTHREAD_SPIN
733 GL_GNULIB_PTHREAD_TSS
734 GL_GNULIB_PTHREAD_COND
735 GL_GNULIB_PTHREAD_RWLOCK
736 GL_GNULIB_PTHREAD_MUTEX
737 GL_GNULIB_PTHREAD_ONCE
738 GL_GNULIB_PTHREAD_THREAD
739 LIB_PTHREAD
740 HAVE_PTHREAD_H
741 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
742 NEXT_PTHREAD_H
743 REPLACE_PTHREAD_SPIN_DESTROY
744 REPLACE_PTHREAD_SPIN_UNLOCK
745 REPLACE_PTHREAD_SPIN_TRYLOCK
746 REPLACE_PTHREAD_SPIN_LOCK
747 REPLACE_PTHREAD_SPIN_INIT
748 REPLACE_PTHREAD_KEY_DELETE
749 REPLACE_PTHREAD_GETSPECIFIC
750 REPLACE_PTHREAD_SETSPECIFIC
751 REPLACE_PTHREAD_KEY_CREATE
752 REPLACE_PTHREAD_COND_DESTROY
753 REPLACE_PTHREAD_COND_BROADCAST
754 REPLACE_PTHREAD_COND_SIGNAL
755 REPLACE_PTHREAD_COND_TIMEDWAIT
756 REPLACE_PTHREAD_COND_WAIT
757 REPLACE_PTHREAD_CONDATTR_DESTROY
758 REPLACE_PTHREAD_CONDATTR_INIT
759 REPLACE_PTHREAD_COND_INIT
760 REPLACE_PTHREAD_RWLOCK_DESTROY
761 REPLACE_PTHREAD_RWLOCK_UNLOCK
762 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
763 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
764 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
765 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
766 REPLACE_PTHREAD_RWLOCK_WRLOCK
767 REPLACE_PTHREAD_RWLOCK_RDLOCK
768 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
769 REPLACE_PTHREAD_RWLOCKATTR_INIT
770 REPLACE_PTHREAD_RWLOCK_INIT
771 REPLACE_PTHREAD_MUTEX_DESTROY
772 REPLACE_PTHREAD_MUTEX_UNLOCK
773 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
774 REPLACE_PTHREAD_MUTEX_TRYLOCK
775 REPLACE_PTHREAD_MUTEX_LOCK
776 REPLACE_PTHREAD_MUTEXATTR_DESTROY
777 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
778 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
779 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
780 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
781 REPLACE_PTHREAD_MUTEXATTR_INIT
782 REPLACE_PTHREAD_MUTEX_INIT
783 REPLACE_PTHREAD_ONCE
784 REPLACE_PTHREAD_EXIT
785 REPLACE_PTHREAD_JOIN
786 REPLACE_PTHREAD_DETACH
787 REPLACE_PTHREAD_EQUAL
788 REPLACE_PTHREAD_SELF
789 REPLACE_PTHREAD_ATTR_DESTROY
790 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
791 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
792 REPLACE_PTHREAD_ATTR_INIT
793 REPLACE_PTHREAD_CREATE
794 HAVE_PTHREAD_SPIN_DESTROY
795 HAVE_PTHREAD_SPIN_UNLOCK
796 HAVE_PTHREAD_SPIN_TRYLOCK
797 HAVE_PTHREAD_SPIN_LOCK
798 HAVE_PTHREAD_SPIN_INIT
799 HAVE_PTHREAD_KEY_DELETE
800 HAVE_PTHREAD_GETSPECIFIC
801 HAVE_PTHREAD_SETSPECIFIC
802 HAVE_PTHREAD_KEY_CREATE
803 HAVE_PTHREAD_COND_DESTROY
804 HAVE_PTHREAD_COND_BROADCAST
805 HAVE_PTHREAD_COND_SIGNAL
806 HAVE_PTHREAD_COND_TIMEDWAIT
807 HAVE_PTHREAD_COND_WAIT
808 HAVE_PTHREAD_CONDATTR_DESTROY
809 HAVE_PTHREAD_CONDATTR_INIT
810 HAVE_PTHREAD_COND_INIT
811 HAVE_PTHREAD_RWLOCK_DESTROY
812 HAVE_PTHREAD_RWLOCK_UNLOCK
813 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
814 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
815 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
816 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
817 HAVE_PTHREAD_RWLOCK_WRLOCK
818 HAVE_PTHREAD_RWLOCK_RDLOCK
819 HAVE_PTHREAD_RWLOCKATTR_DESTROY
820 HAVE_PTHREAD_RWLOCKATTR_INIT
821 HAVE_PTHREAD_RWLOCK_INIT
822 HAVE_PTHREAD_MUTEX_DESTROY
823 HAVE_PTHREAD_MUTEX_UNLOCK
824 HAVE_PTHREAD_MUTEX_TIMEDLOCK
825 HAVE_PTHREAD_MUTEX_TRYLOCK
826 HAVE_PTHREAD_MUTEX_LOCK
827 HAVE_PTHREAD_MUTEXATTR_DESTROY
828 HAVE_PTHREAD_MUTEXATTR_SETROBUST
829 HAVE_PTHREAD_MUTEXATTR_GETROBUST
830 HAVE_PTHREAD_MUTEXATTR_SETTYPE
831 HAVE_PTHREAD_MUTEXATTR_GETTYPE
832 HAVE_PTHREAD_MUTEXATTR_INIT
833 HAVE_PTHREAD_MUTEX_INIT
834 HAVE_PTHREAD_ONCE
835 HAVE_PTHREAD_EXIT
836 HAVE_PTHREAD_JOIN
837 HAVE_PTHREAD_DETACH
838 HAVE_PTHREAD_EQUAL
839 HAVE_PTHREAD_SELF
840 HAVE_PTHREAD_ATTR_DESTROY
841 HAVE_PTHREAD_ATTR_SETDETACHSTATE
842 HAVE_PTHREAD_ATTR_GETDETACHSTATE
843 HAVE_PTHREAD_ATTR_INIT
844 HAVE_PTHREAD_CREATE
845 HAVE_PTHREAD_PROCESS_SHARED
846 HAVE_PTHREAD_MUTEX_ROBUST
847 HAVE_PTHREAD_MUTEX_RECURSIVE
848 HAVE_PTHREAD_CREATE_DETACHED
849 HAVE_PTHREAD_SPINLOCK_T
850 HAVE_PTHREAD_T
851 GL_GNULIB_SELECT
852 GL_GNULIB_PSELECT
853 GL_COND_OBJ_PSELECT_FALSE
854 GL_COND_OBJ_PSELECT_TRUE
855 HAVE_SYS_SELECT_H
856 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
857 NEXT_SYS_SELECT_H
858 REPLACE_SELECT
859 REPLACE_PSELECT
860 HAVE_PSELECT
861 GL_COND_OBJ_PIPE_FALSE
862 GL_COND_OBJ_PIPE_TRUE
863 GL_COND_OBJ_PERROR_FALSE
864 GL_COND_OBJ_PERROR_TRUE
865 GL_GENERATE_NETINET_IN_H_FALSE
866 GL_GENERATE_NETINET_IN_H_TRUE
867 NETINET_IN_H
868 HAVE_NETINET_IN_H
869 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
870 NEXT_NETINET_IN_H
871 GL_COND_OBJ_NANOSLEEP_FALSE
872 GL_COND_OBJ_NANOSLEEP_TRUE
873 LIB_NANOSLEEP
874 NANOSLEEP_LIB
875 GL_COND_OBJ_LISTEN_FALSE
876 GL_COND_OBJ_LISTEN_TRUE
877 GL_GNULIB_IOCTL
878 GL_COND_OBJ_IOCTL_FALSE
879 GL_COND_OBJ_IOCTL_TRUE
880 GL_COND_OBJ_INET_PTON_FALSE
881 GL_COND_OBJ_INET_PTON_TRUE
882 INET_PTON_LIB
883 GL_COND_OBJ_GETCWD_LGPL_FALSE
884 GL_COND_OBJ_GETCWD_LGPL_TRUE
885 GL_COND_OBJ_FTRUNCATE_FALSE
886 GL_COND_OBJ_FTRUNCATE_TRUE
887 GL_COND_OBJ_ITOLD_FALSE
888 GL_COND_OBJ_ITOLD_TRUE
889 GL_COND_OBJ_FLOAT_FALSE
890 GL_COND_OBJ_FLOAT_TRUE
891 GL_GENERATE_FLOAT_H_FALSE
892 GL_GENERATE_FLOAT_H_TRUE
893 FLOAT_H
894 REPLACE_ITOLD
895 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
896 NEXT_FLOAT_H
897 GL_COND_OBJ_FDOPEN_FALSE
898 GL_COND_OBJ_FDOPEN_TRUE
899 GL_COND_OBJ_CONNECT_FALSE
900 GL_COND_OBJ_CONNECT_TRUE
901 LOCALE_TR_UTF8
902 GL_COND_OBJ_BIND_FALSE
903 GL_COND_OBJ_BIND_TRUE
904 GL_COND_OBJ_ATOLL_FALSE
905 GL_COND_OBJ_ATOLL_TRUE
906 GL_GNULIB_INET_PTON
907 GL_GNULIB_INET_NTOP
908 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
909 NEXT_ARPA_INET_H
910 HAVE_ARPA_INET_H
911 REPLACE_INET_PTON
912 REPLACE_INET_NTOP
913 HAVE_DECL_INET_PTON
914 HAVE_DECL_INET_NTOP
915 GL_GNULIB_ACCEPT4
916 GL_GNULIB_SHUTDOWN
917 GL_GNULIB_SETSOCKOPT
918 GL_GNULIB_SENDTO
919 GL_GNULIB_RECVFROM
920 GL_GNULIB_SEND
921 GL_GNULIB_RECV
922 GL_GNULIB_LISTEN
923 GL_GNULIB_GETSOCKOPT
924 GL_GNULIB_GETSOCKNAME
925 GL_GNULIB_GETPEERNAME
926 GL_GNULIB_BIND
927 GL_GNULIB_ACCEPT
928 GL_GNULIB_CONNECT
929 GL_GNULIB_SOCKET
930 GL_COND_OBJ_ACCEPT_FALSE
931 GL_COND_OBJ_ACCEPT_TRUE
932 HAVE_WS2TCPIP_H
933 HAVE_SYS_SOCKET_H
934 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
935 NEXT_SYS_SOCKET_H
936 HAVE_ACCEPT4
937 HAVE_SA_FAMILY_T
938 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
939 HAVE_STRUCT_SOCKADDR_STORAGE
940 gltests_WITNESS
941 GL_CXXFLAG_ALLOW_WARNINGS
942 GL_CFLAG_ALLOW_WARNINGS
943 GL_COND_OBJ_WMEMPCPY_FALSE
944 GL_COND_OBJ_WMEMPCPY_TRUE
945 GL_COND_OBJ_WMEMCHR_FALSE
946 GL_COND_OBJ_WMEMCHR_TRUE
947 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
948 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
949 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
950 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
951 GL_COND_OBJ_WINDOWS_ONCE_FALSE
952 GL_COND_OBJ_WINDOWS_ONCE_TRUE
953 GL_COND_OBJ_WINDOWS_MUTEX_FALSE
954 GL_COND_OBJ_WINDOWS_MUTEX_TRUE
955 GL_COND_OBJ_WCWIDTH_FALSE
956 GL_COND_OBJ_WCWIDTH_TRUE
957 GL_COND_OBJ_WCRTOMB_FALSE
958 GL_COND_OBJ_WCRTOMB_TRUE
959 HAVE_FEATURES_H
960 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
961 NEXT_WCHAR_H
962 GL_COND_OBJ_UNSETENV_FALSE
963 GL_COND_OBJ_UNSETENV_TRUE
964 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
965 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
966 LIBUNISTRING_UNIWIDTH_H
967 LIBUNISTRING_UNITYPES_H
968 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
969 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
970 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
971 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
972 LIBUNISTRING_UNISTR_H
973 HAVE_UNISTRING_WOE32DLL_H
974 HAVE_UNISTD_H
975 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
976 NEXT_UNISTD_H
977 GL_COND_OBJ_TZSET_FALSE
978 GL_COND_OBJ_TZSET_TRUE
979 GL_COND_OBJ_TIMEGM_FALSE
980 GL_COND_OBJ_TIMEGM_TRUE
981 GL_COND_OBJ_TIME_RZ_FALSE
982 GL_COND_OBJ_TIME_RZ_TRUE
983 GL_COND_OBJ_TIME_R_FALSE
984 GL_COND_OBJ_TIME_R_TRUE
985 TIME_H_DEFINES_TIME_UTC
986 UNISTD_H_DEFINES_STRUCT_TIMESPEC
987 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
988 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
989 TIME_H_DEFINES_STRUCT_TIMESPEC
990 NEXT_AS_FIRST_DIRECTIVE_TIME_H
991 NEXT_TIME_H
992 GL_GNULIB_WAITPID
993 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
994 NEXT_SYS_WAIT_H
995 WINDOWS_STAT_INODES
996 WINDOWS_64_BIT_OFF_T
997 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
998 NEXT_SYS_TYPES_H
999 HAVE_SYS_RANDOM_H
1000 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
1001 NEXT_SYS_RANDOM_H
1002 GL_COND_OBJ_STRTOLL_FALSE
1003 GL_COND_OBJ_STRTOLL_TRUE
1004 GL_COND_OBJ_STRTOIMAX_FALSE
1005 GL_COND_OBJ_STRTOIMAX_TRUE
1006 GL_COND_OBJ_STRPTIME_FALSE
1007 GL_COND_OBJ_STRPTIME_TRUE
1008 GL_COND_OBJ_STRNLEN_FALSE
1009 GL_COND_OBJ_STRNLEN_TRUE
1010 GL_GNULIB_FFS
1011 HAVE_STRINGS_H
1012 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
1013 NEXT_STRINGS_H
1014 NEXT_AS_FIRST_DIRECTIVE_STRING_H
1015 NEXT_STRING_H
1016 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
1017 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
1018 GL_COND_OBJ_STRERROR_FALSE
1019 GL_COND_OBJ_STRERROR_TRUE
1020 GL_COND_OBJ_STRNCASECMP_FALSE
1021 GL_COND_OBJ_STRNCASECMP_TRUE
1022 GL_COND_OBJ_STRCASECMP_FALSE
1023 GL_COND_OBJ_STRCASECMP_TRUE
1024 HAVE_DECL_STRNCASECMP
1025 HAVE_STRCASECMP
1026 HAVE_FFS
1027 GL_COND_OBJ_STPCPY_FALSE
1028 GL_COND_OBJ_STPCPY_TRUE
1029 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
1030 NEXT_STDLIB_H
1031 GL_COND_OBJ_STDIO_WRITE_FALSE
1032 GL_COND_OBJ_STDIO_WRITE_TRUE
1033 GL_COND_OBJ_STDIO_READ_FALSE
1034 GL_COND_OBJ_STDIO_READ_TRUE
1035 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
1036 NEXT_STDIO_H
1037 GL_GENERATE_STDINT_H_FALSE
1038 GL_GENERATE_STDINT_H_TRUE
1039 STDINT_H
1040 GL_GENERATE_STDDEF_H_FALSE
1041 GL_GENERATE_STDDEF_H_TRUE
1042 STDDEF_H
1043 GL_GENERATE_STDCKDINT_H_FALSE
1044 GL_GENERATE_STDCKDINT_H_TRUE
1045 STDCKDINT_H
1046 GL_GENERATE_STDARG_H_FALSE
1047 GL_GENERATE_STDARG_H_TRUE
1048 STDARG_H
1049 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
1050 NEXT_STDARG_H
1051 GL_COND_OBJ_STAT_FALSE
1052 GL_COND_OBJ_STAT_TRUE
1053 GL_GENERATE_SIGSEGV_H_FALSE
1054 GL_GENERATE_SIGSEGV_H_TRUE
1055 SIGSEGV_H
1056 GL_COND_OBJ_SIGPROCMASK_FALSE
1057 GL_COND_OBJ_SIGPROCMASK_TRUE
1058 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
1059 NEXT_SIGNAL_H
1060 GL_COND_OBJ_SETLOCALE_LOCK_FALSE
1061 GL_COND_OBJ_SETLOCALE_LOCK_TRUE
1062 GL_COND_OBJ_SETENV_FALSE
1063 GL_COND_OBJ_SETENV_TRUE
1064 GL_COND_OBJ_REGEX_FALSE
1065 GL_COND_OBJ_REGEX_TRUE
1066 GL_COND_OBJ_REALLOCARRAY_FALSE
1067 GL_COND_OBJ_REALLOCARRAY_TRUE
1068 GL_COND_OBJ_READLINK_FALSE
1069 GL_COND_OBJ_READLINK_TRUE
1070 GL_COND_OBJ_RAWMEMCHR_FALSE
1071 GL_COND_OBJ_RAWMEMCHR_TRUE
1072 GL_GNULIB_SIGACTION
1073 GL_GNULIB_SIGPROCMASK
1074 GL_GNULIB_SIGNAL_H_SIGPIPE
1075 GL_GNULIB_RAISE
1076 GL_GNULIB_PTHREAD_SIGMASK
1077 GL_COND_OBJ_RAISE_FALSE
1078 GL_COND_OBJ_RAISE_TRUE
1079 REPLACE_RAISE
1080 REPLACE_PTHREAD_SIGMASK
1081 HAVE_SIGHANDLER_T
1082 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
1083 HAVE_STRUCT_SIGACTION_SA_SIGACTION
1084 HAVE_SIGACTION
1085 HAVE_SIGINFO_T
1086 HAVE_SIGSET_T
1087 HAVE_RAISE
1088 HAVE_PTHREAD_SIGMASK
1089 HAVE_POSIX_SIGNALBLOCKING
1090 PERL
1091 GL_COND_OBJ_OPEN_FALSE
1092 GL_COND_OBJ_OPEN_TRUE
1093 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE
1094 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE
1095 GL_COND_OBJ_NL_LANGINFO_FALSE
1096 GL_COND_OBJ_NL_LANGINFO_TRUE
1097 LIB_NL_LANGINFO
1098 GL_COND_OBJ_MSVC_NOTHROW_FALSE
1099 GL_COND_OBJ_MSVC_NOTHROW_TRUE
1100 GL_COND_OBJ_MSVC_INVAL_FALSE
1101 GL_COND_OBJ_MSVC_INVAL_TRUE
1102 GL_GNULIB_MDA_TZSET
1103 GL_GNULIB_TZSET
1104 GL_GNULIB_TIME_RZ
1105 GL_GNULIB_TIME_R
1106 GL_GNULIB_TIMESPEC_GETRES
1107 GL_GNULIB_TIMESPEC_GET
1108 GL_GNULIB_TIMEGM
1109 GL_GNULIB_TIME
1110 GL_GNULIB_STRPTIME
1111 GL_GNULIB_STRFTIME
1112 GL_GNULIB_NANOSLEEP
1113 GL_GNULIB_LOCALTIME
1114 GL_GNULIB_MKTIME
1115 GL_GNULIB_CTIME
1116 REPLACE_LOCALTIME
1117 REPLACE_GMTIME
1118 GNULIB_GETTIMEOFDAY
1119 REPLACE_TZSET
1120 REPLACE_TIMESPEC_GET
1121 REPLACE_TIMEGM
1122 REPLACE_TIME
1123 REPLACE_STRFTIME
1124 REPLACE_NANOSLEEP
1125 REPLACE_MKTIME
1126 REPLACE_LOCALTIME_R
1127 REPLACE_CTIME
1128 HAVE_TIMEZONE_T
1129 HAVE_TIMESPEC_GETRES
1130 HAVE_TIMESPEC_GET
1131 HAVE_TIMEGM
1132 HAVE_STRPTIME
1133 HAVE_NANOSLEEP
1134 HAVE_DECL_LOCALTIME_R
1135 GL_COND_OBJ_MKSTEMP_FALSE
1136 GL_COND_OBJ_MKSTEMP_TRUE
1137 GL_COND_OBJ_MKDIR_FALSE
1138 GL_COND_OBJ_MKDIR_TRUE
1139 GL_COND_OBJ_MEMPCPY_FALSE
1140 GL_COND_OBJ_MEMPCPY_TRUE
1141 GL_COND_OBJ_MEMCHR_FALSE
1142 GL_COND_OBJ_MEMCHR_TRUE
1143 GL_COND_OBJ_MBTOWC_FALSE
1144 GL_COND_OBJ_MBTOWC_TRUE
1145 GL_COND_OBJ_MBSRTOWCS_FALSE
1146 GL_COND_OBJ_MBSRTOWCS_TRUE
1147 GL_COND_OBJ_MBSINIT_FALSE
1148 GL_COND_OBJ_MBSINIT_TRUE
1149 UNDEFINE_STRTOK_R
1150 REPLACE_STRSIGNAL
1151 REPLACE_STRERRORNAME_NP
1152 REPLACE_STRERROR_R
1153 REPLACE_STRERROR
1154 REPLACE_STRTOK_R
1155 REPLACE_STRCASESTR
1156 REPLACE_STRSTR
1157 REPLACE_STRNLEN
1158 REPLACE_STRNDUP
1159 REPLACE_STRNCAT
1160 REPLACE_STRDUP
1161 REPLACE_STRCHRNUL
1162 REPLACE_STPNCPY
1163 REPLACE_STPCPY
1164 REPLACE_MEMPCPY
1165 REPLACE_MEMMEM
1166 REPLACE_MEMCHR
1167 REPLACE_FFSLL
1168 HAVE_STRVERSCMP
1169 HAVE_DECL_STRSIGNAL
1170 HAVE_SIGDESCR_NP
1171 HAVE_SIGABBREV_NP
1172 HAVE_STRERRORNAME_NP
1173 HAVE_DECL_STRERROR_R
1174 HAVE_DECL_STRTOK_R
1175 HAVE_STRCASESTR
1176 HAVE_STRSEP
1177 HAVE_STRPBRK
1178 HAVE_DECL_STRNLEN
1179 HAVE_DECL_STRNDUP
1180 HAVE_DECL_STRDUP
1181 HAVE_STRCHRNUL
1182 HAVE_STPNCPY
1183 HAVE_STPCPY
1184 HAVE_RAWMEMCHR
1185 HAVE_DECL_MEMRCHR
1186 HAVE_MEMSET_EXPLICIT
1187 HAVE_MEMPCPY
1188 HAVE_DECL_MEMMEM
1189 HAVE_FFSLL
1190 HAVE_FFSL
1191 HAVE_EXPLICIT_BZERO
1192 HAVE_MBSLEN
1193 GL_GNULIB_MDA_STRDUP
1194 GL_GNULIB_MDA_MEMCCPY
1195 GL_GNULIB_STRVERSCMP
1196 GL_GNULIB_STRSIGNAL
1197 GL_GNULIB_SIGDESCR_NP
1198 GL_GNULIB_SIGABBREV_NP
1199 GL_GNULIB_STRERRORNAME_NP
1200 GL_GNULIB_STRERROR_R
1201 GL_GNULIB_STRERROR
1202 GL_GNULIB_MBSTOK_R
1203 GL_GNULIB_MBSSEP
1204 GL_GNULIB_MBSSPN
1205 GL_GNULIB_MBSPBRK
1206 GL_GNULIB_MBSCSPN
1207 GL_GNULIB_MBSCASESTR
1208 GL_GNULIB_MBSPCASECMP
1209 GL_GNULIB_MBSNCASECMP
1210 GL_GNULIB_MBSCASECMP
1211 GL_GNULIB_MBSSTR
1212 GL_GNULIB_MBSRCHR
1213 GL_GNULIB_MBSCHR
1214 GL_GNULIB_MBSNLEN
1215 GL_GNULIB_MBSLEN
1216 GL_GNULIB_STRTOK_R
1217 GL_GNULIB_STRCASESTR
1218 GL_GNULIB_STRSTR
1219 GL_GNULIB_STRSEP
1220 GL_GNULIB_STRPBRK
1221 GL_GNULIB_STRNLEN
1222 GL_GNULIB_STRNDUP
1223 GL_GNULIB_STRNCAT
1224 GL_GNULIB_STRDUP
1225 GL_GNULIB_STRCHRNUL
1226 GL_GNULIB_STPNCPY
1227 GL_GNULIB_STPCPY
1228 GL_GNULIB_RAWMEMCHR
1229 GL_GNULIB_MEMSET_EXPLICIT
1230 GL_GNULIB_MEMRCHR
1231 GL_GNULIB_MEMPCPY
1232 GL_GNULIB_MEMMEM
1233 GL_GNULIB_MEMCHR
1234 GL_GNULIB_FFSLL
1235 GL_GNULIB_FFSL
1236 GL_GNULIB_EXPLICIT_BZERO
1237 HAVE_VISIBILITY
1238 CFLAG_VISIBILITY
1239 GL_COND_OBJ_MBRTOWC_FALSE
1240 GL_COND_OBJ_MBRTOWC_TRUE
1241 LIB_MBRTOWC
1242 MBRTOWC_LIB
1243 GREP
1244 SED
1245 GL_COND_OBJ_LSTAT_FALSE
1246 GL_COND_OBJ_LSTAT_TRUE
1247 LTLIBMULTITHREAD
1248 LIBMULTITHREAD
1249 LTLIBTHREAD
1250 LIBTHREAD
1251 LIBSTDTHREAD
1252 GL_COND_OBJ_LOCALECONV_FALSE
1253 GL_COND_OBJ_LOCALECONV_TRUE
1254 GL_GNULIB_LOCALENAME
1255 GL_GNULIB_DUPLOCALE
1256 GL_GNULIB_SETLOCALE_NULL
1257 GL_GNULIB_SETLOCALE
1258 GL_GNULIB_LOCALECONV
1259 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1260 NEXT_LOCALE_H
1261 HAVE_XLOCALE_H
1262 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1263 NEXT_STDDEF_H
1264 HAVE_WCHAR_T
1265 HAVE_MAX_ALIGN_T
1266 REPLACE_NULL
1267 LOCALENAME_ENHANCE_LOCALE_FUNCS
1268 REPLACE_STRUCT_LCONV
1269 REPLACE_FREELOCALE
1270 REPLACE_DUPLOCALE
1271 REPLACE_NEWLOCALE
1272 REPLACE_SETLOCALE
1273 REPLACE_LOCALECONV
1274 HAVE_FREELOCALE
1275 HAVE_DUPLOCALE
1276 HAVE_NEWLOCALE
1277 LOCALCHARSET_TESTS_ENVIRONMENT
1278 GL_GENERATE_LIMITS_H_FALSE
1279 GL_GENERATE_LIMITS_H_TRUE
1280 LIMITS_H
1281 GL_GNULIB_NL_LANGINFO
1282 HAVE_LANGINFO_YESEXPR
1283 HAVE_LANGINFO_ERA
1284 HAVE_LANGINFO_ALTMON
1285 HAVE_LANGINFO_T_FMT_AMPM
1286 HAVE_LANGINFO_CODESET
1287 HAVE_LANGINFO_H
1288 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1289 NEXT_LANGINFO_H
1290 REPLACE_NL_LANGINFO
1291 HAVE_NL_LANGINFO
1292 GL_COND_OBJ_ISWXDIGIT_FALSE
1293 GL_COND_OBJ_ISWXDIGIT_TRUE
1294 GL_COND_OBJ_ISWDIGIT_FALSE
1295 GL_COND_OBJ_ISWDIGIT_TRUE
1296 LOCALE_ZH_CN
1297 LOCALE_FR_UTF8
1298 LOCALE_JA
1299 GL_GNULIB_TOWCTRANS
1300 GL_GNULIB_WCTRANS
1301 GL_GNULIB_ISWCTYPE
1302 GL_GNULIB_WCTYPE
1303 GL_GNULIB_ISWXDIGIT
1304 GL_GNULIB_ISWDIGIT
1305 GL_GNULIB_ISWBLANK
1306 GL_COND_OBJ_ISWBLANK_FALSE
1307 GL_COND_OBJ_ISWBLANK_TRUE
1308 REPLACE_TOWLOWER
1309 REPLACE_ISWCNTRL
1310 HAVE_WCTYPE_H
1311 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1312 NEXT_WCTYPE_H
1313 HAVE_CRTDEFS_H
1314 HAVE_WINT_T
1315 HAVE_ISWCNTRL
1316 REPLACE_ISWXDIGIT
1317 REPLACE_ISWDIGIT
1318 REPLACE_ISWBLANK
1319 HAVE_WCTRANS_T
1320 HAVE_WCTYPE_T
1321 HAVE_ISWBLANK
1322 GL_COND_OBJ_ISBLANK_FALSE
1323 GL_COND_OBJ_ISBLANK_TRUE
1324 GL_GNULIB_STRTOUMAX
1325 GL_GNULIB_STRTOIMAX
1326 GL_GNULIB_IMAXDIV
1327 GL_GNULIB_IMAXABS
1328 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1329 NEXT_INTTYPES_H
1330 UINT64_MAX_EQ_ULONG_MAX
1331 UINT32_MAX_LT_UINTMAX_MAX
1332 PRIPTR_PREFIX
1333 INT64_MAX_EQ_LONG_MAX
1334 INT32_MAX_LT_INTMAX_MAX
1335 REPLACE_STRTOUMAX
1336 REPLACE_STRTOIMAX
1337 REPLACE_IMAXDIV
1338 REPLACE_IMAXABS
1339 HAVE_IMAXDIV
1340 HAVE_IMAXABS
1341 HAVE_IMAXDIV_T
1342 HAVE_DECL_STRTOUMAX
1343 HAVE_DECL_STRTOIMAX
1344 HAVE_DECL_IMAXDIV
1345 HAVE_DECL_IMAXABS
1346 HAVE_SYS_INTTYPES_H
1347 HAVE_SYS_BITYPES_H
1348 HAVE_C99_STDINT_H
1349 WINT_T_SUFFIX
1350 WCHAR_T_SUFFIX
1351 SIG_ATOMIC_T_SUFFIX
1352 SIZE_T_SUFFIX
1353 PTRDIFF_T_SUFFIX
1354 HAVE_SIGNED_WINT_T
1355 HAVE_SIGNED_WCHAR_T
1356 HAVE_SIGNED_SIG_ATOMIC_T
1357 BITSIZEOF_WINT_T
1358 BITSIZEOF_WCHAR_T
1359 BITSIZEOF_SIG_ATOMIC_T
1360 BITSIZEOF_SIZE_T
1361 BITSIZEOF_PTRDIFF_T
1362 APPLE_UNIVERSAL_BUILD
1363 HAVE_STDINT_H
1364 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1365 NEXT_STDINT_H
1366 HAVE_SYS_TYPES_H
1367 HAVE_INTTYPES_H
1368 HAVE_WCHAR_H
1369 GNULIBHEADERS_OVERRIDE_WINT_T
1370 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1371 NEXT_LIMITS_H
1372 GL_COND_OBJ_ICONV_FALSE
1373 GL_COND_OBJ_ICONV_TRUE
1374 GL_COND_OBJ_ICONV_OPEN_FALSE
1375 GL_COND_OBJ_ICONV_OPEN_TRUE
1376 GL_GENERATE_ICONV_H_FALSE
1377 GL_GENERATE_ICONV_H_TRUE
1378 ICONV_H
1379 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1380 NEXT_ICONV_H
1381 GL_GNULIB_ICONV
1382 REPLACE_ICONV_UTF
1383 REPLACE_ICONV_OPEN
1384 REPLACE_ICONV
1385 ICONV_CONST
1386 LTLIBICONV
1387 LIBICONV
1388 HOST_CPU_C_ABI
1389 HOST_CPU
1390 LIB_HARD_LOCALE
1391 HARD_LOCALE_LIB
1392 LIB_SETLOCALE_NULL
1393 SETLOCALE_NULL_LIB
1394 LIB_SCHED_YIELD
1395 SCHED_YIELD_LIB
1396 LIBPMULTITHREAD
1397 LIBPTHREAD
1398 GNU_MAKE_FALSE
1399 GNU_MAKE_TRUE
1400 GL_GNULIB_GETTIMEOFDAY
1401 GL_COND_OBJ_GETTIMEOFDAY_FALSE
1402 GL_COND_OBJ_GETTIMEOFDAY_TRUE
1403 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1404 NEXT_SYS_TIME_H
1405 REPLACE_STRUCT_TIMEVAL
1406 REPLACE_GETTIMEOFDAY
1407 HAVE_SYS_TIME_H
1408 HAVE_STRUCT_TIMEVAL
1409 HAVE_GETTIMEOFDAY
1410 LTLIBINTL
1411 LIBINTL
1412 GL_GNULIB_GETRANDOM
1413 GL_COND_OBJ_GETRANDOM_FALSE
1414 GL_COND_OBJ_GETRANDOM_TRUE
1415 LIB_GETRANDOM
1416 GETRANDOM_LIB
1417 REPLACE_GETRANDOM
1418 HAVE_GETRANDOM
1419 GL_COND_OBJ_GETPROGNAME_FALSE
1420 GL_COND_OBJ_GETPROGNAME_TRUE
1421 GL_COND_OBJ_GETPAGESIZE_FALSE
1422 GL_COND_OBJ_GETPAGESIZE_TRUE
1423 GL_COND_OBJ_GETOPT_FALSE
1424 GL_COND_OBJ_GETOPT_TRUE
1425 GL_GENERATE_GETOPT_CDEFS_H_FALSE
1426 GL_GENERATE_GETOPT_CDEFS_H_TRUE
1427 GETOPT_CDEFS_H
1428 GL_GENERATE_GETOPT_H_FALSE
1429 GL_GENERATE_GETOPT_H_TRUE
1430 GETOPT_H
1431 HAVE_SYS_CDEFS_H
1432 HAVE_GETOPT_H
1433 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1434 NEXT_GETOPT_H
1435 GL_COND_OBJ_GETDTABLESIZE_FALSE
1436 GL_COND_OBJ_GETDTABLESIZE_TRUE
1437 GL_GNULIB_MDA_UMASK
1438 GL_GNULIB_MDA_MKDIR
1439 GL_GNULIB_MDA_CHMOD
1440 GL_GNULIB_OVERRIDES_STRUCT_STAT
1441 GL_GNULIB_UTIMENSAT
1442 GL_GNULIB_STAT
1443 GL_GNULIB_MKNODAT
1444 GL_GNULIB_MKNOD
1445 GL_GNULIB_MKFIFOAT
1446 GL_GNULIB_MKFIFO
1447 GL_GNULIB_MKDIRAT
1448 GL_GNULIB_MKDIR
1449 GL_GNULIB_LSTAT
1450 GL_GNULIB_LCHMOD
1451 GL_GNULIB_GETUMASK
1452 GL_GNULIB_FUTIMENS
1453 GL_GNULIB_FSTATAT
1454 GL_GNULIB_FSTAT
1455 GL_GNULIB_FCHMODAT
1456 GL_GNULIB_CHMOD
1457 WINDOWS_64_BIT_ST_SIZE
1458 WINDOWS_STAT_TIMESPEC
1459 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1460 NEXT_SYS_STAT_H
1461 GL_COND_OBJ_FSTAT_FALSE
1462 GL_COND_OBJ_FSTAT_TRUE
1463 REPLACE_UTIMENSAT
1464 REPLACE_STAT
1465 REPLACE_MKNODAT
1466 REPLACE_MKNOD
1467 REPLACE_MKFIFOAT
1468 REPLACE_MKFIFO
1469 REPLACE_MKDIR
1470 REPLACE_LSTAT
1471 REPLACE_FUTIMENS
1472 REPLACE_FSTATAT
1473 REPLACE_FSTAT
1474 REPLACE_FCHMODAT
1475 REPLACE_CHMOD
1476 HAVE_UTIMENSAT
1477 HAVE_MKNODAT
1478 HAVE_MKNOD
1479 HAVE_MKFIFOAT
1480 HAVE_MKFIFO
1481 HAVE_MKDIRAT
1482 HAVE_LSTAT
1483 HAVE_LCHMOD
1484 HAVE_GETUMASK
1485 HAVE_FUTIMENS
1486 HAVE_FSTATAT
1487 HAVE_FCHMODAT
1488 GL_COND_OBJ_FREOPEN_FALSE
1489 GL_COND_OBJ_FREOPEN_TRUE
1490 GL_COND_OBJ_FREE_FALSE
1491 GL_COND_OBJ_FREE_TRUE
1492 GL_GNULIB_MDA_TEMPNAM
1493 GL_GNULIB_MDA_PUTW
1494 GL_GNULIB_MDA_GETW
1495 GL_GNULIB_MDA_FILENO
1496 GL_GNULIB_MDA_FDOPEN
1497 GL_GNULIB_MDA_FCLOSEALL
1498 GL_GNULIB_VSPRINTF_POSIX
1499 GL_GNULIB_VSNPRINTF
1500 GL_GNULIB_VPRINTF_POSIX
1501 GL_GNULIB_VPRINTF
1502 GL_GNULIB_VFPRINTF_POSIX
1503 GL_GNULIB_VFPRINTF
1504 GL_GNULIB_VDPRINTF
1505 GL_GNULIB_VSCANF
1506 GL_GNULIB_VFSCANF
1507 GL_GNULIB_VASPRINTF
1508 GL_GNULIB_TMPFILE
1509 GL_GNULIB_STDIO_H_SIGPIPE
1510 GL_GNULIB_STDIO_H_NONBLOCKING
1511 GL_GNULIB_SPRINTF_POSIX
1512 GL_GNULIB_SNPRINTF
1513 GL_GNULIB_SCANF
1514 GL_GNULIB_RENAMEAT
1515 GL_GNULIB_RENAME
1516 GL_GNULIB_REMOVE
1517 GL_GNULIB_PUTS
1518 GL_GNULIB_PUTCHAR
1519 GL_GNULIB_PUTC
1520 GL_GNULIB_PRINTF_POSIX
1521 GL_GNULIB_PRINTF
1522 GL_GNULIB_POPEN
1523 GL_GNULIB_PERROR
1524 GL_GNULIB_PCLOSE
1525 GL_GNULIB_OBSTACK_PRINTF_POSIX
1526 GL_GNULIB_OBSTACK_PRINTF
1527 GL_GNULIB_GETLINE
1528 GL_GNULIB_GETDELIM
1529 GL_GNULIB_GETCHAR
1530 GL_GNULIB_GETC
1531 GL_GNULIB_FWRITE
1532 GL_GNULIB_FTELLO
1533 GL_GNULIB_FTELL
1534 GL_GNULIB_FSEEKO
1535 GL_GNULIB_FSEEK
1536 GL_GNULIB_FSCANF
1537 GL_GNULIB_FREOPEN
1538 GL_GNULIB_FREAD
1539 GL_GNULIB_FPUTS
1540 GL_GNULIB_FPUTC
1541 GL_GNULIB_FPURGE
1542 GL_GNULIB_FPRINTF_POSIX
1543 GL_GNULIB_FPRINTF
1544 GL_GNULIB_FOPEN_GNU
1545 GL_GNULIB_FOPEN
1546 GL_GNULIB_FGETS
1547 GL_GNULIB_FGETC
1548 GL_GNULIB_FFLUSH
1549 GL_GNULIB_FDOPEN
1550 GL_GNULIB_FCLOSE
1551 GL_GNULIB_DPRINTF
1552 REPLACE_VSPRINTF
1553 REPLACE_VSNPRINTF
1554 REPLACE_VPRINTF
1555 REPLACE_VFPRINTF
1556 REPLACE_VDPRINTF
1557 REPLACE_VASPRINTF
1558 REPLACE_TMPFILE
1559 REPLACE_STDIO_WRITE_FUNCS
1560 REPLACE_STDIO_READ_FUNCS
1561 REPLACE_SPRINTF
1562 REPLACE_SNPRINTF
1563 REPLACE_RENAMEAT
1564 REPLACE_RENAME
1565 REPLACE_REMOVE
1566 REPLACE_PRINTF
1567 REPLACE_POPEN
1568 REPLACE_PERROR
1569 REPLACE_OBSTACK_PRINTF
1570 REPLACE_GETLINE
1571 REPLACE_GETDELIM
1572 REPLACE_FTELLO
1573 REPLACE_FTELL
1574 REPLACE_FSEEKO
1575 REPLACE_FSEEK
1576 REPLACE_FREOPEN
1577 REPLACE_FPURGE
1578 REPLACE_FPRINTF
1579 REPLACE_FOPEN_FOR_FOPEN_GNU
1580 REPLACE_FOPEN
1581 REPLACE_FFLUSH
1582 REPLACE_FDOPEN
1583 REPLACE_FCLOSE
1584 REPLACE_DPRINTF
1585 HAVE_VDPRINTF
1586 HAVE_VASPRINTF
1587 HAVE_RENAMEAT
1588 HAVE_POPEN
1589 HAVE_PCLOSE
1590 HAVE_FTELLO
1591 HAVE_FSEEKO
1592 HAVE_DPRINTF
1593 HAVE_DECL_VSNPRINTF
1594 HAVE_DECL_SNPRINTF
1595 HAVE_DECL_PUTW
1596 HAVE_DECL_OBSTACK_PRINTF
1597 HAVE_DECL_GETW
1598 HAVE_DECL_GETLINE
1599 HAVE_DECL_GETDELIM
1600 HAVE_DECL_FTELLO
1601 HAVE_DECL_FSEEKO
1602 HAVE_DECL_FPURGE
1603 HAVE_DECL_FCLOSEALL
1604 GL_GENERATE_FNMATCH_H_FALSE
1605 GL_GENERATE_FNMATCH_H_TRUE
1606 FNMATCH_H
1607 GL_GNULIB_FNMATCH
1608 HAVE_FNMATCH_H
1609 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1610 NEXT_FNMATCH_H
1611 REPLACE_FNMATCH
1612 HAVE_FNMATCH
1613 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1614 NEXT_FCNTL_H
1615 GL_GNULIB_MDA_OPEN
1616 GL_GNULIB_MDA_CREAT
1617 GL_GNULIB_OPENAT
1618 GL_GNULIB_OPEN
1619 GL_GNULIB_NONBLOCKING
1620 GL_GNULIB_FCNTL
1621 GL_GNULIB_CREAT
1622 GL_COND_OBJ_FCNTL_FALSE
1623 GL_COND_OBJ_FCNTL_TRUE
1624 REPLACE_OPENAT
1625 REPLACE_OPEN
1626 REPLACE_FCNTL
1627 REPLACE_CREAT
1628 HAVE_OPENAT
1629 HAVE_FCNTL
1630 GL_GENERATE_ERROR_H_FALSE
1631 GL_GENERATE_ERROR_H_TRUE
1632 ERROR_H
1633 GL_COND_OBJ_ERROR_FALSE
1634 GL_COND_OBJ_ERROR_TRUE
1635 REPLACE_ERROR_AT_LINE
1636 REPLACE_ERROR
1637 HAVE_ERROR_AT_LINE
1638 HAVE_ERROR
1639 HAVE_ERROR_H
1640 NEXT_AS_FIRST_DIRECTIVE_ERROR_H
1641 NEXT_ERROR_H
1642 GL_GENERATE_ERRNO_H_FALSE
1643 GL_GENERATE_ERRNO_H_TRUE
1644 ERRNO_H
1645 EOVERFLOW_VALUE
1646 EOVERFLOW_HIDDEN
1647 ENOLINK_VALUE
1648 ENOLINK_HIDDEN
1649 EMULTIHOP_VALUE
1650 EMULTIHOP_HIDDEN
1651 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1652 NEXT_ERRNO_H
1653 GL_COND_OBJ_DUP2_FALSE
1654 GL_COND_OBJ_DUP2_TRUE
1655 GL_GNULIB_ISBLANK
1656 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1657 NEXT_CTYPE_H
1658 HAVE_ISBLANK
1659 GL_GNULIB_MDA_WRITE
1660 GL_GNULIB_MDA_UNLINK
1661 GL_GNULIB_MDA_SWAB
1662 GL_GNULIB_MDA_RMDIR
1663 GL_GNULIB_MDA_READ
1664 GL_GNULIB_MDA_LSEEK
1665 GL_GNULIB_MDA_ISATTY
1666 GL_GNULIB_MDA_GETPID
1667 GL_GNULIB_MDA_GETCWD
1668 GL_GNULIB_MDA_EXECVPE
1669 GL_GNULIB_MDA_EXECVP
1670 GL_GNULIB_MDA_EXECVE
1671 GL_GNULIB_MDA_EXECV
1672 GL_GNULIB_MDA_EXECLP
1673 GL_GNULIB_MDA_EXECLE
1674 GL_GNULIB_MDA_EXECL
1675 GL_GNULIB_MDA_DUP2
1676 GL_GNULIB_MDA_DUP
1677 GL_GNULIB_MDA_CLOSE
1678 GL_GNULIB_MDA_CHDIR
1679 GL_GNULIB_MDA_ACCESS
1680 GL_GNULIB_WRITE
1681 GL_GNULIB_USLEEP
1682 GL_GNULIB_UNLINKAT
1683 GL_GNULIB_UNLINK
1684 GL_GNULIB_UNISTD_H_SIGPIPE
1685 GL_GNULIB_UNISTD_H_NONBLOCKING
1686 GL_GNULIB_UNISTD_H_GETOPT
1687 GL_GNULIB_TTYNAME_R
1688 GL_GNULIB_TRUNCATE
1689 GL_GNULIB_SYMLINKAT
1690 GL_GNULIB_SYMLINK
1691 GL_GNULIB_SLEEP
1692 GL_GNULIB_SETHOSTNAME
1693 GL_GNULIB_RMDIR
1694 GL_GNULIB_READLINKAT
1695 GL_GNULIB_READLINK
1696 GL_GNULIB_READ
1697 GL_GNULIB_PWRITE
1698 GL_GNULIB_PREAD
1699 GL_GNULIB_PIPE2
1700 GL_GNULIB_PIPE
1701 GL_GNULIB_LSEEK
1702 GL_GNULIB_LINKAT
1703 GL_GNULIB_LINK
1704 GL_GNULIB_LCHOWN
1705 GL_GNULIB_ISATTY
1706 GL_GNULIB_GROUP_MEMBER
1707 GL_GNULIB_GETUSERSHELL
1708 GL_GNULIB_GETPASS_GNU
1709 GL_GNULIB_GETPASS
1710 GL_GNULIB_GETPAGESIZE
1711 GL_GNULIB_GETOPT_POSIX
1712 GL_GNULIB_GETLOGIN_R
1713 GL_GNULIB_GETLOGIN
1714 GL_GNULIB_GETHOSTNAME
1715 GL_GNULIB_GETGROUPS
1716 GL_GNULIB_GETENTROPY
1717 GL_GNULIB_GETDTABLESIZE
1718 GL_GNULIB_GETDOMAINNAME
1719 GL_GNULIB_GETCWD
1720 GL_GNULIB_FTRUNCATE
1721 GL_GNULIB_FSYNC
1722 GL_GNULIB_FDATASYNC
1723 GL_GNULIB_FCHOWNAT
1724 GL_GNULIB_FCHDIR
1725 GL_GNULIB_FACCESSAT
1726 GL_GNULIB_EXECVPE
1727 GL_GNULIB_EXECVP
1728 GL_GNULIB_EXECVE
1729 GL_GNULIB_EXECV
1730 GL_GNULIB_EXECLP
1731 GL_GNULIB_EXECLE
1732 GL_GNULIB_EXECL
1733 GL_GNULIB_EUIDACCESS
1734 GL_GNULIB_ENVIRON
1735 GL_GNULIB_DUP3
1736 GL_GNULIB_DUP2
1737 GL_GNULIB_DUP
1738 GL_GNULIB_COPY_FILE_RANGE
1739 GL_GNULIB_CLOSE
1740 GL_GNULIB_CHOWN
1741 GL_GNULIB_CHDIR
1742 GL_GNULIB_ACCESS
1743 GL_COND_OBJ_CLOSE_FALSE
1744 GL_COND_OBJ_CLOSE_TRUE
1745 HAVE_WINSOCK2_H
1746 REPLACE_IOCTL
1747 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1748 SYS_IOCTL_H_HAVE_WINSOCK2_H
1749 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1750 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1751 UNISTD_H_HAVE_WINSOCK2_H
1752 UNISTD_H_HAVE_SYS_RANDOM_H
1753 REPLACE_WRITE
1754 REPLACE_USLEEP
1755 REPLACE_UNLINKAT
1756 REPLACE_UNLINK
1757 REPLACE_TTYNAME_R
1758 REPLACE_TRUNCATE
1759 REPLACE_SYMLINKAT
1760 REPLACE_SYMLINK
1761 REPLACE_SLEEP
1762 REPLACE_SETHOSTNAME
1763 REPLACE_RMDIR
1764 REPLACE_READLINKAT
1765 REPLACE_READLINK
1766 REPLACE_READ
1767 REPLACE_PWRITE
1768 REPLACE_PREAD
1769 REPLACE_PIPE2
1770 REPLACE_LSEEK
1771 REPLACE_LINKAT
1772 REPLACE_LINK
1773 REPLACE_LCHOWN
1774 REPLACE_ISATTY
1775 REPLACE_GETPASS_FOR_GETPASS_GNU
1776 REPLACE_GETPASS
1777 REPLACE_GETPAGESIZE
1778 REPLACE_GETGROUPS
1779 REPLACE_GETLOGIN_R
1780 REPLACE_GETENTROPY
1781 REPLACE_GETDTABLESIZE
1782 REPLACE_GETDOMAINNAME
1783 REPLACE_GETCWD
1784 REPLACE_FTRUNCATE
1785 REPLACE_FDATASYNC
1786 REPLACE_FCHOWNAT
1787 REPLACE_FACCESSAT
1788 REPLACE_EXECVPE
1789 REPLACE_EXECVP
1790 REPLACE_EXECVE
1791 REPLACE_EXECV
1792 REPLACE_EXECLP
1793 REPLACE_EXECLE
1794 REPLACE_EXECL
1795 REPLACE_DUP3
1796 REPLACE_DUP2
1797 REPLACE_DUP
1798 REPLACE_COPY_FILE_RANGE
1799 REPLACE_CLOSE
1800 REPLACE_CHOWN
1801 REPLACE_ACCESS
1802 HAVE_SYS_PARAM_H
1803 HAVE_OS_H
1804 HAVE_DECL_TTYNAME_R
1805 HAVE_DECL_TRUNCATE
1806 HAVE_DECL_SETHOSTNAME
1807 HAVE_DECL_GETUSERSHELL
1808 HAVE_DECL_GETPAGESIZE
1809 HAVE_DECL_GETLOGIN_R
1810 HAVE_DECL_GETLOGIN
1811 HAVE_DECL_GETDOMAINNAME
1812 HAVE_DECL_FDATASYNC
1813 HAVE_DECL_FCHDIR
1814 HAVE_DECL_EXECVPE
1815 HAVE_DECL_ENVIRON
1816 HAVE_USLEEP
1817 HAVE_UNLINKAT
1818 HAVE_SYMLINKAT
1819 HAVE_SYMLINK
1820 HAVE_SLEEP
1821 HAVE_SETHOSTNAME
1822 HAVE_READLINKAT
1823 HAVE_READLINK
1824 HAVE_PWRITE
1825 HAVE_PREAD
1826 HAVE_PIPE2
1827 HAVE_PIPE
1828 HAVE_LINKAT
1829 HAVE_LINK
1830 HAVE_LCHOWN
1831 HAVE_GROUP_MEMBER
1832 HAVE_GETPASS
1833 HAVE_GETPAGESIZE
1834 HAVE_GETLOGIN
1835 HAVE_GETHOSTNAME
1836 HAVE_GETGROUPS
1837 HAVE_GETENTROPY
1838 HAVE_GETDTABLESIZE
1839 HAVE_FTRUNCATE
1840 HAVE_FSYNC
1841 HAVE_FDATASYNC
1842 HAVE_FCHOWNAT
1843 HAVE_FCHDIR
1844 HAVE_FACCESSAT
1845 HAVE_EXECVPE
1846 HAVE_EUIDACCESS
1847 HAVE_DUP3
1848 HAVE_COPY_FILE_RANGE
1849 HAVE_CHOWN
1850 LIB_CLOCK_GETTIME
1851 CLOCK_TIME_LIB
1852 LTLIBCSTACK
1853 LIBCSTACK
1854 LIBSIGSEGV_PREFIX
1855 LTLIBSIGSEGV
1856 LIBSIGSEGV
1857 HAVE_LIBSIGSEGV
1858 REPLACE_WCTOMB
1859 REPLACE_UNSETENV
1860 REPLACE_STRTOULL
1861 REPLACE_STRTOUL
1862 REPLACE_STRTOLL
1863 REPLACE_STRTOLD
1864 REPLACE_STRTOL
1865 REPLACE_STRTOD
1866 REPLACE_SETSTATE
1867 REPLACE_SETENV
1868 REPLACE_REALPATH
1869 REPLACE_REALLOCARRAY
1870 REPLACE_REALLOC_FOR_REALLOC_POSIX
1871 REPLACE_REALLOC_FOR_REALLOC_GNU
1872 REPLACE_RANDOM_R
1873 REPLACE_RANDOM
1874 REPLACE_QSORT_R
1875 REPLACE_PUTENV
1876 REPLACE_PTSNAME_R
1877 REPLACE_PTSNAME
1878 REPLACE_POSIX_OPENPT
1879 REPLACE_POSIX_MEMALIGN
1880 REPLACE_MKSTEMP
1881 REPLACE_MKOSTEMPS
1882 REPLACE_MKOSTEMP
1883 REPLACE_MBTOWC
1884 REPLACE_MBSTOWCS
1885 REPLACE_MB_CUR_MAX
1886 REPLACE_MALLOC_FOR_MALLOC_POSIX
1887 REPLACE_MALLOC_FOR_MALLOC_GNU
1888 REPLACE_INITSTATE
1889 REPLACE_GETSUBOPT
1890 REPLACE_GETPROGNAME
1891 REPLACE_GETLOADAVG
1892 REPLACE_FREE
1893 REPLACE_CANONICALIZE_FILE_NAME
1894 REPLACE_CALLOC_FOR_CALLOC_POSIX
1895 REPLACE_CALLOC_FOR_CALLOC_GNU
1896 REPLACE_ALIGNED_ALLOC
1897 REPLACE__EXIT
1898 HAVE_DECL_UNSETENV
1899 HAVE_UNLOCKPT
1900 HAVE_SYS_LOADAVG_H
1901 HAVE_STRUCT_RANDOM_DATA
1902 HAVE_STRTOULL
1903 HAVE_STRTOUL
1904 HAVE_STRTOLL
1905 HAVE_STRTOLD
1906 HAVE_STRTOL
1907 HAVE_STRTOD
1908 HAVE_DECL_SETSTATE
1909 HAVE_SETSTATE
1910 HAVE_DECL_SETENV
1911 HAVE_SETENV
1912 HAVE_SECURE_GETENV
1913 HAVE_RPMATCH
1914 HAVE_REALPATH
1915 HAVE_REALLOCARRAY
1916 HAVE_RANDOM_R
1917 HAVE_RANDOM_H
1918 HAVE_RANDOM
1919 HAVE_QSORT_R
1920 HAVE_PTSNAME_R
1921 HAVE_PTSNAME
1922 HAVE_POSIX_OPENPT
1923 HAVE_POSIX_MEMALIGN
1924 HAVE_MKSTEMPS
1925 HAVE_MKSTEMP
1926 HAVE_MKOSTEMPS
1927 HAVE_MKOSTEMP
1928 HAVE_MKDTEMP
1929 HAVE_MBTOWC
1930 HAVE_DECL_INITSTATE
1931 HAVE_INITSTATE
1932 HAVE_GRANTPT
1933 HAVE_GETSUBOPT
1934 HAVE_GETPROGNAME
1935 HAVE_DECL_PROGRAM_INVOCATION_NAME
1936 HAVE_DECL_GETLOADAVG
1937 HAVE_DECL_GCVT
1938 HAVE_DECL_FCVT
1939 HAVE_DECL_ECVT
1940 HAVE_CANONICALIZE_FILE_NAME
1941 HAVE_ATOLL
1942 HAVE_ALIGNED_ALLOC
1943 HAVE__EXIT
1944 GL_GNULIB_MDA_PUTENV
1945 GL_GNULIB_MDA_MKTEMP
1946 GL_GNULIB_MDA_GCVT
1947 GL_GNULIB_MDA_FCVT
1948 GL_GNULIB_MDA_ECVT
1949 GL_GNULIB_WCTOMB
1950 GL_GNULIB_UNSETENV
1951 GL_GNULIB_UNLOCKPT
1952 GL_GNULIB_SYSTEM_POSIX
1953 GL_GNULIB_STRTOULL
1954 GL_GNULIB_STRTOUL
1955 GL_GNULIB_STRTOLL
1956 GL_GNULIB_STRTOLD
1957 GL_GNULIB_STRTOL
1958 GL_GNULIB_STRTOD
1959 GL_GNULIB_SETENV
1960 GL_GNULIB_SECURE_GETENV
1961 GL_GNULIB_RPMATCH
1962 GL_GNULIB_REALPATH
1963 GL_GNULIB_REALLOC_POSIX
1964 GL_GNULIB_REALLOC_GNU
1965 GL_GNULIB_REALLOCARRAY
1966 GL_GNULIB_RANDOM_R
1967 GL_GNULIB_RANDOM
1968 GL_GNULIB_QSORT_R
1969 GL_GNULIB_PUTENV
1970 GL_GNULIB_PTSNAME_R
1971 GL_GNULIB_PTSNAME
1972 GL_GNULIB_POSIX_OPENPT
1973 GL_GNULIB_POSIX_MEMALIGN
1974 GL_GNULIB_MKSTEMPS
1975 GL_GNULIB_MKSTEMP
1976 GL_GNULIB_MKOSTEMPS
1977 GL_GNULIB_MKOSTEMP
1978 GL_GNULIB_MKDTEMP
1979 GL_GNULIB_MBTOWC
1980 GL_GNULIB_MBSTOWCS
1981 GL_GNULIB_MALLOC_POSIX
1982 GL_GNULIB_MALLOC_GNU
1983 GL_GNULIB_GRANTPT
1984 GL_GNULIB_GETSUBOPT
1985 GL_GNULIB_GETPROGNAME
1986 GL_GNULIB_GETLOADAVG
1987 GL_GNULIB_FREE_POSIX
1988 GL_GNULIB_CANONICALIZE_FILE_NAME
1989 GL_GNULIB_CALLOC_POSIX
1990 GL_GNULIB_CALLOC_GNU
1991 GL_GNULIB_ATOLL
1992 GL_GNULIB_ALIGNED_ALLOC
1993 GL_GNULIB__EXIT
1994 GL_GNULIB_MDA_WCSDUP
1995 GL_GNULIB_WCSFTIME
1996 GL_GNULIB_WCSWIDTH
1997 GL_GNULIB_WCSTOK
1998 GL_GNULIB_WCSSTR
1999 GL_GNULIB_WCSPBRK
2000 GL_GNULIB_WCSSPN
2001 GL_GNULIB_WCSCSPN
2002 GL_GNULIB_WCSRCHR
2003 GL_GNULIB_WCSCHR
2004 GL_GNULIB_WCSDUP
2005 GL_GNULIB_WCSXFRM
2006 GL_GNULIB_WCSCOLL
2007 GL_GNULIB_WCSNCASECMP
2008 GL_GNULIB_WCSCASECMP
2009 GL_GNULIB_WCSNCMP
2010 GL_GNULIB_WCSCMP
2011 GL_GNULIB_WCSNCAT
2012 GL_GNULIB_WCSCAT
2013 GL_GNULIB_WCPNCPY
2014 GL_GNULIB_WCSNCPY
2015 GL_GNULIB_WCPCPY
2016 GL_GNULIB_WCSCPY
2017 GL_GNULIB_WCSNLEN
2018 GL_GNULIB_WCSLEN
2019 GL_GNULIB_WMEMSET
2020 GL_GNULIB_WMEMPCPY
2021 GL_GNULIB_WMEMMOVE
2022 GL_GNULIB_WMEMCPY
2023 GL_GNULIB_WMEMCMP
2024 GL_GNULIB_WMEMCHR
2025 GL_GNULIB_WCWIDTH
2026 GL_GNULIB_WCSNRTOMBS
2027 GL_GNULIB_WCSRTOMBS
2028 GL_GNULIB_WCRTOMB
2029 GL_GNULIB_MBSNRTOWCS
2030 GL_GNULIB_MBSRTOWCS
2031 GL_GNULIB_MBRLEN
2032 GL_GNULIB_MBRTOWC
2033 GL_GNULIB_MBSINIT
2034 GL_GNULIB_WCTOB
2035 GL_GNULIB_BTOWC
2036 GL_COND_OBJ_BTOWC_FALSE
2037 GL_COND_OBJ_BTOWC_TRUE
2038 LOCALE_FR
2039 REPLACE_WMEMPCPY
2040 REPLACE_WMEMCMP
2041 REPLACE_WCSTOK
2042 REPLACE_WCSSTR
2043 REPLACE_WCSNCMP
2044 REPLACE_WCSCMP
2045 REPLACE_WCSFTIME
2046 REPLACE_WCSWIDTH
2047 REPLACE_WCWIDTH
2048 REPLACE_WCSNRTOMBS
2049 REPLACE_WCSRTOMBS
2050 REPLACE_WCRTOMB
2051 REPLACE_MBSNRTOWCS
2052 REPLACE_MBSRTOWCS
2053 REPLACE_MBRLEN
2054 REPLACE_MBRTOWC
2055 REPLACE_MBSINIT
2056 REPLACE_WCTOB
2057 REPLACE_BTOWC
2058 REPLACE_MBSTATE_T
2059 HAVE_DECL_WCWIDTH
2060 HAVE_DECL_WCSDUP
2061 HAVE_DECL_WCTOB
2062 HAVE_WCSFTIME
2063 HAVE_WCSWIDTH
2064 HAVE_WCSTOK
2065 HAVE_WCSSTR
2066 HAVE_WCSPBRK
2067 HAVE_WCSSPN
2068 HAVE_WCSCSPN
2069 HAVE_WCSRCHR
2070 HAVE_WCSCHR
2071 HAVE_WCSDUP
2072 HAVE_WCSXFRM
2073 HAVE_WCSCOLL
2074 HAVE_WCSNCASECMP
2075 HAVE_WCSCASECMP
2076 HAVE_WCSNCMP
2077 HAVE_WCSCMP
2078 HAVE_WCSNCAT
2079 HAVE_WCSCAT
2080 HAVE_WCPNCPY
2081 HAVE_WCSNCPY
2082 HAVE_WCPCPY
2083 HAVE_WCSCPY
2084 HAVE_WCSNLEN
2085 HAVE_WCSLEN
2086 HAVE_WMEMSET
2087 HAVE_WMEMPCPY
2088 HAVE_WMEMMOVE
2089 HAVE_WMEMCPY
2090 HAVE_WMEMCMP
2091 HAVE_WMEMCHR
2092 HAVE_WCSNRTOMBS
2093 HAVE_WCSRTOMBS
2094 HAVE_WCRTOMB
2095 HAVE_MBSNRTOWCS
2096 HAVE_MBSRTOWCS
2097 HAVE_MBRLEN
2098 HAVE_MBRTOWC
2099 HAVE_MBSINIT
2100 HAVE_BTOWC
2101 GL_GENERATE_ASSERT_H_FALSE
2102 GL_GENERATE_ASSERT_H_TRUE
2103 ASSERT_H
2104 NEXT_AS_FIRST_DIRECTIVE_ASSERT_H
2105 NEXT_ASSERT_H
2106 PRAGMA_COLUMNS
2107 PRAGMA_SYSTEM_HEADER
2108 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
2109 INCLUDE_NEXT
2110 GL_GENERATE_ALLOCA_H_FALSE
2111 GL_GENERATE_ALLOCA_H_TRUE
2112 ALLOCA_H
2113 HAVE_ALLOCA_H
2114 ALLOCA
2115 GL_COND_LIBTOOL_FALSE
2116 GL_COND_LIBTOOL_TRUE
2117 ARFLAGS
2118 AR
2119 CPP
2120 host_os
2121 host_vendor
2122 host_cpu
2123 host
2124 build_os
2125 build_vendor
2126 build_cpu
2127 build
2128 RANLIB
2129 HELP2MAN
2130 am__fastdepCC_FALSE
2131 am__fastdepCC_TRUE
2132 CCDEPMODE
2133 am__nodep
2134 AMDEPBACKSLASH
2135 AMDEP_FALSE
2136 AMDEP_TRUE
2137 am__include
2138 DEPDIR
2139 OBJEXT
2140 EXEEXT
2141 ac_ct_CC
2142 CPPFLAGS
2143 LDFLAGS
2144 CFLAGS
2145 CC
2146 am__xargs_n
2147 am__rm_f_notfound
2148 AM_BACKSLASH
2149 AM_DEFAULT_VERBOSITY
2150 AM_DEFAULT_V
2151 AM_V
2152 CSCOPE
2153 ETAGS
2154 CTAGS
2155 am__untar
2156 am__tar
2157 AMTAR
2158 am__leading_dot
2159 SET_MAKE
2160 AWK
2161 mkdir_p
2162 MKDIR_P
2163 INSTALL_STRIP_PROGRAM
2164 STRIP
2165 install_sh
2166 MAKEINFO
2167 AUTOHEADER
2168 AUTOMAKE
2169 AUTOCONF
2170 ACLOCAL
2171 VERSION
2172 PACKAGE
2173 CYGPATH_W
2174 am__isrc
2175 INSTALL_DATA
2176 INSTALL_SCRIPT
2177 INSTALL_PROGRAM
2178 target_alias
2179 host_alias
2180 build_alias
2181 LIBS
2182 ECHO_T
2183 ECHO_N
2184 ECHO_C
2185 DEFS
2186 mandir
2187 localedir
2188 libdir
2189 psdir
2190 pdfdir
2191 dvidir
2192 htmldir
2193 infodir
2194 docdir
2195 oldincludedir
2196 includedir
2197 runstatedir
2198 localstatedir
2199 sharedstatedir
2200 sysconfdir
2201 datadir
2202 datarootdir
2203 libexecdir
2204 sbindir
2205 bindir
2206 program_transform_name
2207 prefix
2208 exec_prefix
2209 PACKAGE_URL
2210 PACKAGE_BUGREPORT
2211 PACKAGE_STRING
2212 PACKAGE_VERSION
2213 PACKAGE_TARNAME
2214 PACKAGE_NAME
2215 PATH_SEPARATOR
2216 SHELL
2217 am__quote'
2218 ac_subst_files=''
2219 ac_user_opts='
2220 enable_option_checking
2221 enable_silent_rules
2222 enable_dependency_tracking
2223 enable_largefile
2224 enable_threads
2225 enable_cross_guesses
2226 with_libsigsegv
2227 with_gnu_ld
2228 enable_rpath
2229 with_libsigsegv_prefix
2230 with_libiconv_prefix
2231 with_included_regex
2232 with_packager
2233 with_packager_version
2234 with_packager_bug_reports
2235 enable_gcc_warnings
2236 enable_nls
2237 with_libintl_prefix
2238 enable_year2038
2239 '
2240       ac_precious_vars='build_alias
2241 host_alias
2242 target_alias
2243 CC
2244 CFLAGS
2245 LDFLAGS
2246 LIBS
2247 CPPFLAGS
2248 CPP'
2249
2250
2251 # Initialize some variables set by options.
2252 ac_init_help=
2253 ac_init_version=false
2254 ac_unrecognized_opts=
2255 ac_unrecognized_sep=
2256 # The variables have the same names as the options, with
2257 # dashes changed to underlines.
2258 cache_file=/dev/null
2259 exec_prefix=NONE
2260 no_create=
2261 no_recursion=
2262 prefix=NONE
2263 program_prefix=NONE
2264 program_suffix=NONE
2265 program_transform_name=s,x,x,
2266 silent=
2267 site=
2268 srcdir=
2269 verbose=
2270 x_includes=NONE
2271 x_libraries=NONE
2272
2273 # Installation directory options.
2274 # These are left unexpanded so users can "make install exec_prefix=/foo"
2275 # and all the variables that are supposed to be based on exec_prefix
2276 # by default will actually change.
2277 # Use braces instead of parens because sh, perl, etc. also accept them.
2278 # (The list follows the same order as the GNU Coding Standards.)
2279 bindir='${exec_prefix}/bin'
2280 sbindir='${exec_prefix}/sbin'
2281 libexecdir='${exec_prefix}/libexec'
2282 datarootdir='${prefix}/share'
2283 datadir='${datarootdir}'
2284 sysconfdir='${prefix}/etc'
2285 sharedstatedir='${prefix}/com'
2286 localstatedir='${prefix}/var'
2287 runstatedir='${localstatedir}/run'
2288 includedir='${prefix}/include'
2289 oldincludedir='/usr/include'
2290 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2291 infodir='${datarootdir}/info'
2292 htmldir='${docdir}'
2293 dvidir='${docdir}'
2294 pdfdir='${docdir}'
2295 psdir='${docdir}'
2296 libdir='${exec_prefix}/lib'
2297 localedir='${datarootdir}/locale'
2298 mandir='${datarootdir}/man'
2299
2300 ac_prev=
2301 ac_dashdash=
2302 for ac_option
2303 do
2304   # If the previous option needs an argument, assign it.
2305   if test -n "$ac_prev"; then
2306     eval $ac_prev=\$ac_option
2307     ac_prev=
2308     continue
2309   fi
2310
2311   case $ac_option in
2312   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2313   *=)   ac_optarg= ;;
2314   *)    ac_optarg=yes ;;
2315   esac
2316
2317   case $ac_dashdash$ac_option in
2318   --)
2319     ac_dashdash=yes ;;
2320
2321   -bindir | --bindir | --bindi | --bind | --bin | --bi)
2322     ac_prev=bindir ;;
2323   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2324     bindir=$ac_optarg ;;
2325
2326   -build | --build | --buil | --bui | --bu)
2327     ac_prev=build_alias ;;
2328   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2329     build_alias=$ac_optarg ;;
2330
2331   -cache-file | --cache-file | --cache-fil | --cache-fi \
2332   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2333     ac_prev=cache_file ;;
2334   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2335   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2336     cache_file=$ac_optarg ;;
2337
2338   --config-cache | -C)
2339     cache_file=config.cache ;;
2340
2341   -datadir | --datadir | --datadi | --datad)
2342     ac_prev=datadir ;;
2343   -datadir=* | --datadir=* | --datadi=* | --datad=*)
2344     datadir=$ac_optarg ;;
2345
2346   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2347   | --dataroo | --dataro | --datar)
2348     ac_prev=datarootdir ;;
2349   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2350   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2351     datarootdir=$ac_optarg ;;
2352
2353   -disable-* | --disable-*)
2354     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2355     # Reject names that are not valid shell variable names.
2356     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2357       as_fn_error $? "invalid feature name: '$ac_useropt'"
2358     ac_useropt_orig=$ac_useropt
2359     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2360     case $ac_user_opts in
2361       *"
2362 "enable_$ac_useropt"
2363 "*) ;;
2364       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2365          ac_unrecognized_sep=', ';;
2366     esac
2367     eval enable_$ac_useropt=no ;;
2368
2369   -docdir | --docdir | --docdi | --doc | --do)
2370     ac_prev=docdir ;;
2371   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2372     docdir=$ac_optarg ;;
2373
2374   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2375     ac_prev=dvidir ;;
2376   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2377     dvidir=$ac_optarg ;;
2378
2379   -enable-* | --enable-*)
2380     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2381     # Reject names that are not valid shell variable names.
2382     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2383       as_fn_error $? "invalid feature name: '$ac_useropt'"
2384     ac_useropt_orig=$ac_useropt
2385     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2386     case $ac_user_opts in
2387       *"
2388 "enable_$ac_useropt"
2389 "*) ;;
2390       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2391          ac_unrecognized_sep=', ';;
2392     esac
2393     eval enable_$ac_useropt=\$ac_optarg ;;
2394
2395   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2396   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2397   | --exec | --exe | --ex)
2398     ac_prev=exec_prefix ;;
2399   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2400   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2401   | --exec=* | --exe=* | --ex=*)
2402     exec_prefix=$ac_optarg ;;
2403
2404   -gas | --gas | --ga | --g)
2405     # Obsolete; use --with-gas.
2406     with_gas=yes ;;
2407
2408   -help | --help | --hel | --he | -h)
2409     ac_init_help=long ;;
2410   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2411     ac_init_help=recursive ;;
2412   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2413     ac_init_help=short ;;
2414
2415   -host | --host | --hos | --ho)
2416     ac_prev=host_alias ;;
2417   -host=* | --host=* | --hos=* | --ho=*)
2418     host_alias=$ac_optarg ;;
2419
2420   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2421     ac_prev=htmldir ;;
2422   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2423   | --ht=*)
2424     htmldir=$ac_optarg ;;
2425
2426   -includedir | --includedir | --includedi | --included | --include \
2427   | --includ | --inclu | --incl | --inc)
2428     ac_prev=includedir ;;
2429   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2430   | --includ=* | --inclu=* | --incl=* | --inc=*)
2431     includedir=$ac_optarg ;;
2432
2433   -infodir | --infodir | --infodi | --infod | --info | --inf)
2434     ac_prev=infodir ;;
2435   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2436     infodir=$ac_optarg ;;
2437
2438   -libdir | --libdir | --libdi | --libd)
2439     ac_prev=libdir ;;
2440   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2441     libdir=$ac_optarg ;;
2442
2443   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2444   | --libexe | --libex | --libe)
2445     ac_prev=libexecdir ;;
2446   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2447   | --libexe=* | --libex=* | --libe=*)
2448     libexecdir=$ac_optarg ;;
2449
2450   -localedir | --localedir | --localedi | --localed | --locale)
2451     ac_prev=localedir ;;
2452   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2453     localedir=$ac_optarg ;;
2454
2455   -localstatedir | --localstatedir | --localstatedi | --localstated \
2456   | --localstate | --localstat | --localsta | --localst | --locals)
2457     ac_prev=localstatedir ;;
2458   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2459   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2460     localstatedir=$ac_optarg ;;
2461
2462   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2463     ac_prev=mandir ;;
2464   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2465     mandir=$ac_optarg ;;
2466
2467   -nfp | --nfp | --nf)
2468     # Obsolete; use --without-fp.
2469     with_fp=no ;;
2470
2471   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2472   | --no-cr | --no-c | -n)
2473     no_create=yes ;;
2474
2475   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2476   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2477     no_recursion=yes ;;
2478
2479   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2480   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2481   | --oldin | --oldi | --old | --ol | --o)
2482     ac_prev=oldincludedir ;;
2483   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2484   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2485   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2486     oldincludedir=$ac_optarg ;;
2487
2488   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2489     ac_prev=prefix ;;
2490   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2491     prefix=$ac_optarg ;;
2492
2493   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2494   | --program-pre | --program-pr | --program-p)
2495     ac_prev=program_prefix ;;
2496   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2497   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2498     program_prefix=$ac_optarg ;;
2499
2500   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2501   | --program-suf | --program-su | --program-s)
2502     ac_prev=program_suffix ;;
2503   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2504   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2505     program_suffix=$ac_optarg ;;
2506
2507   -program-transform-name | --program-transform-name \
2508   | --program-transform-nam | --program-transform-na \
2509   | --program-transform-n | --program-transform- \
2510   | --program-transform | --program-transfor \
2511   | --program-transfo | --program-transf \
2512   | --program-trans | --program-tran \
2513   | --progr-tra | --program-tr | --program-t)
2514     ac_prev=program_transform_name ;;
2515   -program-transform-name=* | --program-transform-name=* \
2516   | --program-transform-nam=* | --program-transform-na=* \
2517   | --program-transform-n=* | --program-transform-=* \
2518   | --program-transform=* | --program-transfor=* \
2519   | --program-transfo=* | --program-transf=* \
2520   | --program-trans=* | --program-tran=* \
2521   | --progr-tra=* | --program-tr=* | --program-t=*)
2522     program_transform_name=$ac_optarg ;;
2523
2524   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2525     ac_prev=pdfdir ;;
2526   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2527     pdfdir=$ac_optarg ;;
2528
2529   -psdir | --psdir | --psdi | --psd | --ps)
2530     ac_prev=psdir ;;
2531   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2532     psdir=$ac_optarg ;;
2533
2534   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2535   | -silent | --silent | --silen | --sile | --sil)
2536     silent=yes ;;
2537
2538   -runstatedir | --runstatedir | --runstatedi | --runstated \
2539   | --runstate | --runstat | --runsta | --runst | --runs \
2540   | --run | --ru | --r)
2541     ac_prev=runstatedir ;;
2542   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2543   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2544   | --run=* | --ru=* | --r=*)
2545     runstatedir=$ac_optarg ;;
2546
2547   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2548     ac_prev=sbindir ;;
2549   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2550   | --sbi=* | --sb=*)
2551     sbindir=$ac_optarg ;;
2552
2553   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2554   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2555   | --sharedst | --shareds | --shared | --share | --shar \
2556   | --sha | --sh)
2557     ac_prev=sharedstatedir ;;
2558   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2559   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2560   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2561   | --sha=* | --sh=*)
2562     sharedstatedir=$ac_optarg ;;
2563
2564   -site | --site | --sit)
2565     ac_prev=site ;;
2566   -site=* | --site=* | --sit=*)
2567     site=$ac_optarg ;;
2568
2569   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2570     ac_prev=srcdir ;;
2571   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2572     srcdir=$ac_optarg ;;
2573
2574   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2575   | --syscon | --sysco | --sysc | --sys | --sy)
2576     ac_prev=sysconfdir ;;
2577   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2578   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2579     sysconfdir=$ac_optarg ;;
2580
2581   -target | --target | --targe | --targ | --tar | --ta | --t)
2582     ac_prev=target_alias ;;
2583   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2584     target_alias=$ac_optarg ;;
2585
2586   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2587     verbose=yes ;;
2588
2589   -version | --version | --versio | --versi | --vers | -V)
2590     ac_init_version=: ;;
2591
2592   -with-* | --with-*)
2593     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2594     # Reject names that are not valid shell variable names.
2595     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2596       as_fn_error $? "invalid package name: '$ac_useropt'"
2597     ac_useropt_orig=$ac_useropt
2598     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2599     case $ac_user_opts in
2600       *"
2601 "with_$ac_useropt"
2602 "*) ;;
2603       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2604          ac_unrecognized_sep=', ';;
2605     esac
2606     eval with_$ac_useropt=\$ac_optarg ;;
2607
2608   -without-* | --without-*)
2609     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2610     # Reject names that are not valid shell variable names.
2611     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2612       as_fn_error $? "invalid package name: '$ac_useropt'"
2613     ac_useropt_orig=$ac_useropt
2614     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2615     case $ac_user_opts in
2616       *"
2617 "with_$ac_useropt"
2618 "*) ;;
2619       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2620          ac_unrecognized_sep=', ';;
2621     esac
2622     eval with_$ac_useropt=no ;;
2623
2624   --x)
2625     # Obsolete; use --with-x.
2626     with_x=yes ;;
2627
2628   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2629   | --x-incl | --x-inc | --x-in | --x-i)
2630     ac_prev=x_includes ;;
2631   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2632   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2633     x_includes=$ac_optarg ;;
2634
2635   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2636   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2637     ac_prev=x_libraries ;;
2638   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2639   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2640     x_libraries=$ac_optarg ;;
2641
2642   -*) as_fn_error $? "unrecognized option: '$ac_option'
2643 Try '$0 --help' for more information"
2644     ;;
2645
2646   *=*)
2647     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2648     # Reject names that are not valid shell variable names.
2649     case $ac_envvar in #(
2650       '' | [0-9]* | *[!_$as_cr_alnum]* )
2651       as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
2652     esac
2653     eval $ac_envvar=\$ac_optarg
2654     export $ac_envvar ;;
2655
2656   *)
2657     # FIXME: should be removed in autoconf 3.0.
2658     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2659     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2660       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2661     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2662     ;;
2663
2664   esac
2665 done
2666
2667 if test -n "$ac_prev"; then
2668   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2669   as_fn_error $? "missing argument to $ac_option"
2670 fi
2671
2672 if test -n "$ac_unrecognized_opts"; then
2673   case $enable_option_checking in
2674     no) ;;
2675     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2676     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2677   esac
2678 fi
2679
2680 # Check all directory arguments for consistency.
2681 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2682                 datadir sysconfdir sharedstatedir localstatedir includedir \
2683                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2684                 libdir localedir mandir runstatedir
2685 do
2686   eval ac_val=\$$ac_var
2687   # Remove trailing slashes.
2688   case $ac_val in
2689     */ )
2690       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2691       eval $ac_var=\$ac_val;;
2692   esac
2693   # Be sure to have absolute directory names.
2694   case $ac_val in
2695     [\\/$]* | ?:[\\/]* )  continue;;
2696     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2697   esac
2698   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2699 done
2700
2701 # There might be people who depend on the old broken behavior: '$host'
2702 # used to hold the argument of --host etc.
2703 # FIXME: To remove some day.
2704 build=$build_alias
2705 host=$host_alias
2706 target=$target_alias
2707
2708 # FIXME: To remove some day.
2709 if test "x$host_alias" != x; then
2710   if test "x$build_alias" = x; then
2711     cross_compiling=maybe
2712   elif test "x$build_alias" != "x$host_alias"; then
2713     cross_compiling=yes
2714   fi
2715 fi
2716
2717 ac_tool_prefix=
2718 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2719
2720 test "$silent" = yes && exec 6>/dev/null
2721
2722
2723 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2724 ac_ls_di=`ls -di .` &&
2725 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2726   as_fn_error $? "working directory cannot be determined"
2727 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2728   as_fn_error $? "pwd does not report name of working directory"
2729
2730
2731 # Find the source files, if location was not specified.
2732 if test -z "$srcdir"; then
2733   ac_srcdir_defaulted=yes
2734   # Try the directory containing this script, then the parent directory.
2735   ac_confdir=`$as_dirname -- "$as_myself" ||
2736 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2737          X"$as_myself" : 'X\(//\)[^/]' \| \
2738          X"$as_myself" : 'X\(//\)$' \| \
2739          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2740 printf "%s\n" X"$as_myself" |
2741     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2742             s//\1/
2743             q
2744           }
2745           /^X\(\/\/\)[^/].*/{
2746             s//\1/
2747             q
2748           }
2749           /^X\(\/\/\)$/{
2750             s//\1/
2751             q
2752           }
2753           /^X\(\/\).*/{
2754             s//\1/
2755             q
2756           }
2757           s/.*/./; q'`
2758   srcdir=$ac_confdir
2759   if test ! -r "$srcdir/$ac_unique_file"; then
2760     srcdir=..
2761   fi
2762 else
2763   ac_srcdir_defaulted=no
2764 fi
2765 if test ! -r "$srcdir/$ac_unique_file"; then
2766   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2767   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2768 fi
2769 ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
2770 ac_abs_confdir=`(
2771         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2772         pwd)`
2773 # When building in place, set srcdir=.
2774 if test "$ac_abs_confdir" = "$ac_pwd"; then
2775   srcdir=.
2776 fi
2777 # Remove unnecessary trailing slashes from srcdir.
2778 # Double slashes in file names in object file debugging info
2779 # mess up M-x gdb in Emacs.
2780 case $srcdir in
2781 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2782 esac
2783 for ac_var in $ac_precious_vars; do
2784   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2785   eval ac_env_${ac_var}_value=\$${ac_var}
2786   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2787   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2788 done
2789
2790 #
2791 # Report the --help message.
2792 #
2793 if test "$ac_init_help" = "long"; then
2794   # Omit some internal or obsolete options to make the list less imposing.
2795   # This message is too long to be a string in the A/UX 3.1 sh.
2796   cat <<_ACEOF
2797 'configure' configures GNU diffutils 3.10 to adapt to many kinds of systems.
2798
2799 Usage: $0 [OPTION]... [VAR=VALUE]...
2800
2801 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2802 VAR=VALUE.  See below for descriptions of some of the useful variables.
2803
2804 Defaults for the options are specified in brackets.
2805
2806 Configuration:
2807   -h, --help              display this help and exit
2808       --help=short        display options specific to this package
2809       --help=recursive    display the short help of all the included packages
2810   -V, --version           display version information and exit
2811   -q, --quiet, --silent   do not print 'checking ...' messages
2812       --cache-file=FILE   cache test results in FILE [disabled]
2813   -C, --config-cache      alias for '--cache-file=config.cache'
2814   -n, --no-create         do not create output files
2815       --srcdir=DIR        find the sources in DIR [configure dir or '..']
2816
2817 Installation directories:
2818   --prefix=PREFIX         install architecture-independent files in PREFIX
2819                           [$ac_default_prefix]
2820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2821                           [PREFIX]
2822
2823 By default, 'make install' will install all the files in
2824 '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
2825 an installation prefix other than '$ac_default_prefix' using '--prefix',
2826 for instance '--prefix=\$HOME'.
2827
2828 For better control, use the options below.
2829
2830 Fine tuning of the installation directories:
2831   --bindir=DIR            user executables [EPREFIX/bin]
2832   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2833   --libexecdir=DIR        program executables [EPREFIX/libexec]
2834   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2835   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2836   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2837   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2838   --libdir=DIR            object code libraries [EPREFIX/lib]
2839   --includedir=DIR        C header files [PREFIX/include]
2840   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2841   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2842   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2843   --infodir=DIR           info documentation [DATAROOTDIR/info]
2844   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2845   --mandir=DIR            man documentation [DATAROOTDIR/man]
2846   --docdir=DIR            documentation root [DATAROOTDIR/doc/diffutils]
2847   --htmldir=DIR           html documentation [DOCDIR]
2848   --dvidir=DIR            dvi documentation [DOCDIR]
2849   --pdfdir=DIR            pdf documentation [DOCDIR]
2850   --psdir=DIR             ps documentation [DOCDIR]
2851 _ACEOF
2852
2853   cat <<\_ACEOF
2854
2855 Program names:
2856   --program-prefix=PREFIX            prepend PREFIX to installed program names
2857   --program-suffix=SUFFIX            append SUFFIX to installed program names
2858   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2859
2860 System types:
2861   --build=BUILD     configure for building on BUILD [guessed]
2862   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2863 _ACEOF
2864 fi
2865
2866 if test -n "$ac_init_help"; then
2867   case $ac_init_help in
2868      short | recursive ) echo "Configuration of GNU diffutils 3.10:";;
2869    esac
2870   cat <<\_ACEOF
2871
2872 Optional Features:
2873   --disable-option-checking  ignore unrecognized --enable/--with options
2874   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2875   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2876   --enable-silent-rules   less verbose build output (undo: "make V=1")
2877   --disable-silent-rules  verbose build output (undo: "make V=0")
2878   --enable-dependency-tracking
2879                           do not reject slow dependency extractors
2880   --disable-dependency-tracking
2881                           speeds up one-time build
2882   --disable-largefile     omit support for large files
2883   --enable-threads={isoc|posix|isoc+posix|windows}
2884                           specify multithreading API
2885   --disable-threads       build without multithread safety
2886   --enable-cross-guesses={conservative|risky}
2887                           specify policy for cross-compilation guesses
2888   --disable-rpath         do not hardcode runtime library paths
2889   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2890   --disable-nls           do not use Native Language Support
2891   --disable-year2038      don't support timestamps after 2038
2892
2893 Optional Packages:
2894   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2895   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2896   --with-libsigsegv       use the GNU libsigsegv library, when present,
2897                           instead of the gnulib module 'sigsegv'
2898   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2899   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2900   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2901   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2902   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2903   --without-included-regex
2904                           don't compile regex; this is the default on systems
2905                           with recent-enough versions of the GNU C Library
2906                           (use with caution on other systems).
2907   --with-packager         String identifying the packager of this software
2908   --with-packager-version Packager-specific version information
2909   --with-packager-bug-reports
2910                           Packager info for bug reports (URL/e-mail/...)
2911   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2912   --without-libintl-prefix     don't search for libintl in includedir and libdir
2913
2914 Some influential environment variables:
2915   CC          C compiler command
2916   CFLAGS      C compiler flags
2917   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2918               nonstandard directory <lib dir>
2919   LIBS        libraries to pass to the linker, e.g. -l<library>
2920   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2921               you have headers in a nonstandard directory <include dir>
2922   CPP         C preprocessor
2923
2924 Use these variables to override the choices made by 'configure' or to help
2925 it to find libraries and programs with nonstandard names/locations.
2926
2927 Report bugs to <bug-diffutils@gnu.org>.
2928 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2929 General help using GNU software: <https://www.gnu.org/gethelp/>.
2930 _ACEOF
2931 ac_status=$?
2932 fi
2933
2934 if test "$ac_init_help" = "recursive"; then
2935   # If there are subdirs, report their specific --help.
2936   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2937     test -d "$ac_dir" ||
2938       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2939       continue
2940     ac_builddir=.
2941
2942 case "$ac_dir" in
2943 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2944 *)
2945   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2946   # A ".." for each directory in $ac_dir_suffix.
2947   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2948   case $ac_top_builddir_sub in
2949   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2950   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2951   esac ;;
2952 esac
2953 ac_abs_top_builddir=$ac_pwd
2954 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2955 # for backward compatibility:
2956 ac_top_builddir=$ac_top_build_prefix
2957
2958 case $srcdir in
2959   .)  # We are building in place.
2960     ac_srcdir=.
2961     ac_top_srcdir=$ac_top_builddir_sub
2962     ac_abs_top_srcdir=$ac_pwd ;;
2963   [\\/]* | ?:[\\/]* )  # Absolute name.
2964     ac_srcdir=$srcdir$ac_dir_suffix;
2965     ac_top_srcdir=$srcdir
2966     ac_abs_top_srcdir=$srcdir ;;
2967   *) # Relative name.
2968     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2969     ac_top_srcdir=$ac_top_build_prefix$srcdir
2970     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2971 esac
2972 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2973
2974     cd "$ac_dir" || { ac_status=$?; continue; }
2975     # Check for configure.gnu first; this name is used for a wrapper for
2976     # Metaconfig's "Configure" on case-insensitive file systems.
2977     if test -f "$ac_srcdir/configure.gnu"; then
2978       echo &&
2979       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2980     elif test -f "$ac_srcdir/configure"; then
2981       echo &&
2982       $SHELL "$ac_srcdir/configure" --help=recursive
2983     else
2984       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2985     fi || ac_status=$?
2986     cd "$ac_pwd" || { ac_status=$?; break; }
2987   done
2988 fi
2989
2990 test -n "$ac_init_help" && exit $ac_status
2991 if $ac_init_version; then
2992   cat <<\_ACEOF
2993 GNU diffutils configure 3.10
2994 generated by GNU Autoconf 2.72c.20-9c018
2995
2996 Copyright (C) 2023 Free Software Foundation, Inc.
2997 This configure script is free software; the Free Software Foundation
2998 gives unlimited permission to copy, distribute and modify it.
2999 _ACEOF
3000   exit
3001 fi
3002
3003 ## ------------------------ ##
3004 ## Autoconf initialization. ##
3005 ## ------------------------ ##
3006
3007 # ac_fn_c_try_compile LINENO
3008 # --------------------------
3009 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3010 ac_fn_c_try_compile ()
3011 {
3012   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3013   rm -f conftest.$ac_objext conftest.beam
3014   if { { ac_try="$ac_compile"
3015 case "(($ac_try" in
3016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017   *) ac_try_echo=$ac_try;;
3018 esac
3019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3020 printf "%s\n" "$ac_try_echo"; } >&5
3021   (eval "$ac_compile") 2>conftest.err
3022   ac_status=$?
3023   if test -s conftest.err; then
3024     grep -v '^ *+' conftest.err >conftest.er1
3025     cat conftest.er1 >&5
3026     mv -f conftest.er1 conftest.err
3027   fi
3028   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3029   test $ac_status = 0; } && {
3030          test -z "$ac_c_werror_flag" ||
3031          test ! -s conftest.err
3032        } && test -s conftest.$ac_objext
3033 then :
3034   ac_retval=0
3035 else case e in #(
3036   e) printf "%s\n" "$as_me: failed program was:" >&5
3037 sed 's/^/| /' conftest.$ac_ext >&5
3038
3039         ac_retval=1 ;;
3040 esac
3041 fi
3042   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3043   as_fn_set_status $ac_retval
3044
3045 } # ac_fn_c_try_compile
3046
3047 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048 # -------------------------------------------------------
3049 # Tests whether HEADER exists and can be compiled using the include files in
3050 # INCLUDES, setting the cache variable VAR accordingly.
3051 ac_fn_c_check_header_compile ()
3052 {
3053   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055 printf %s "checking for $2... " >&6; }
3056 if eval test \${$3+y}
3057 then :
3058   printf %s "(cached) " >&6
3059 else case e in #(
3060   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3061 /* end confdefs.h.  */
3062 $4
3063 #include <$2>
3064 _ACEOF
3065 if ac_fn_c_try_compile "$LINENO"
3066 then :
3067   eval "$3=yes"
3068 else case e in #(
3069   e) eval "$3=no" ;;
3070 esac
3071 fi
3072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3073 esac
3074 fi
3075 eval ac_res=\$$3
3076                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3077 printf "%s\n" "$ac_res" >&6; }
3078   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3079
3080 } # ac_fn_c_check_header_compile
3081
3082 # ac_fn_c_try_cpp LINENO
3083 # ----------------------
3084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3085 ac_fn_c_try_cpp ()
3086 {
3087   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3088   if { { ac_try="$ac_cpp conftest.$ac_ext"
3089 case "(($ac_try" in
3090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3091   *) ac_try_echo=$ac_try;;
3092 esac
3093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3094 printf "%s\n" "$ac_try_echo"; } >&5
3095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3096   ac_status=$?
3097   if test -s conftest.err; then
3098     grep -v '^ *+' conftest.err >conftest.er1
3099     cat conftest.er1 >&5
3100     mv -f conftest.er1 conftest.err
3101   fi
3102   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3103   test $ac_status = 0; } > conftest.i && {
3104          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3105          test ! -s conftest.err
3106        }
3107 then :
3108   ac_retval=0
3109 else case e in #(
3110   e) printf "%s\n" "$as_me: failed program was:" >&5
3111 sed 's/^/| /' conftest.$ac_ext >&5
3112
3113     ac_retval=1 ;;
3114 esac
3115 fi
3116   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3117   as_fn_set_status $ac_retval
3118
3119 } # ac_fn_c_try_cpp
3120
3121 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3122 # -------------------------------------------
3123 # Tests whether TYPE exists after having included INCLUDES, setting cache
3124 # variable VAR accordingly.
3125 ac_fn_c_check_type ()
3126 {
3127   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3128   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3129 printf %s "checking for $2... " >&6; }
3130 if eval test \${$3+y}
3131 then :
3132   printf %s "(cached) " >&6
3133 else case e in #(
3134   e) eval "$3=no"
3135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3136 /* end confdefs.h.  */
3137 $4
3138 int
3139 main (void)
3140 {
3141 if (sizeof ($2))
3142          return 0;
3143   ;
3144   return 0;
3145 }
3146 _ACEOF
3147 if ac_fn_c_try_compile "$LINENO"
3148 then :
3149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3150 /* end confdefs.h.  */
3151 $4
3152 int
3153 main (void)
3154 {
3155 if (sizeof (($2)))
3156             return 0;
3157   ;
3158   return 0;
3159 }
3160 _ACEOF
3161 if ac_fn_c_try_compile "$LINENO"
3162 then :
3163
3164 else case e in #(
3165   e) eval "$3=yes" ;;
3166 esac
3167 fi
3168 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3169 fi
3170 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3171 esac
3172 fi
3173 eval ac_res=\$$3
3174                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3175 printf "%s\n" "$ac_res" >&6; }
3176   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3177
3178 } # ac_fn_c_check_type
3179
3180 # ac_fn_c_try_link LINENO
3181 # -----------------------
3182 # Try to link conftest.$ac_ext, and return whether this succeeded.
3183 ac_fn_c_try_link ()
3184 {
3185   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3186   rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3187   if { { ac_try="$ac_link"
3188 case "(($ac_try" in
3189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3190   *) ac_try_echo=$ac_try;;
3191 esac
3192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3193 printf "%s\n" "$ac_try_echo"; } >&5
3194   (eval "$ac_link") 2>conftest.err
3195   ac_status=$?
3196   if test -s conftest.err; then
3197     grep -v '^ *+' conftest.err >conftest.er1
3198     cat conftest.er1 >&5
3199     mv -f conftest.er1 conftest.err
3200   fi
3201   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202   test $ac_status = 0; } && {
3203          test -z "$ac_c_werror_flag" ||
3204          test ! -s conftest.err
3205        } && test -s conftest$ac_exeext && {
3206          test "$cross_compiling" = yes ||
3207          test -x conftest$ac_exeext
3208        }
3209 then :
3210   ac_retval=0
3211 else case e in #(
3212   e) printf "%s\n" "$as_me: failed program was:" >&5
3213 sed 's/^/| /' conftest.$ac_ext >&5
3214
3215         ac_retval=1 ;;
3216 esac
3217 fi
3218   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3219   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3220   # interfere with the next link command; also delete a directory that is
3221   # left behind by Apple's compiler.  We do this before executing the actions.
3222   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3223   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3224   as_fn_set_status $ac_retval
3225
3226 } # ac_fn_c_try_link
3227
3228 # ac_fn_c_try_run LINENO
3229 # ----------------------
3230 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3231 # executables *can* be run.
3232 ac_fn_c_try_run ()
3233 {
3234   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
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>&5
3243   ac_status=$?
3244   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3245   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3246   { { case "(($ac_try" in
3247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3248   *) ac_try_echo=$ac_try;;
3249 esac
3250 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3251 printf "%s\n" "$ac_try_echo"; } >&5
3252   (eval "$ac_try") 2>&5
3253   ac_status=$?
3254   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3255   test $ac_status = 0; }; }
3256 then :
3257   ac_retval=0
3258 else case e in #(
3259   e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3260        printf "%s\n" "$as_me: failed program was:" >&5
3261 sed 's/^/| /' conftest.$ac_ext >&5
3262
3263        ac_retval=$ac_status ;;
3264 esac
3265 fi
3266   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3267   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3268   as_fn_set_status $ac_retval
3269
3270 } # ac_fn_c_try_run
3271
3272 # ac_fn_c_check_func LINENO FUNC VAR
3273 # ----------------------------------
3274 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3275 ac_fn_c_check_func ()
3276 {
3277   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3278   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3279 printf %s "checking for $2... " >&6; }
3280 if eval test \${$3+y}
3281 then :
3282   printf %s "(cached) " >&6
3283 else case e in #(
3284   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285 /* end confdefs.h.  */
3286 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3287    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3288 #define $2 innocuous_$2
3289
3290 /* System header to define __stub macros and hopefully few prototypes,
3291    which can conflict with char $2 (void); below.  */
3292
3293 #include <limits.h>
3294 #undef $2
3295
3296 /* Override any GCC internal prototype to avoid an error.
3297    Use char because int might match the return type of a GCC
3298    builtin and then its argument prototype would still apply.  */
3299 #ifdef __cplusplus
3300 extern "C"
3301 #endif
3302 char $2 (void);
3303 /* The GNU C library defines this for functions which it implements
3304     to always fail with ENOSYS.  Some functions are actually named
3305     something starting with __ and the normal name is an alias.  */
3306 #if defined __stub_$2 || defined __stub___$2
3307 choke me
3308 #endif
3309
3310 int
3311 main (void)
3312 {
3313 return $2 ();
3314   ;
3315   return 0;
3316 }
3317 _ACEOF
3318 if ac_fn_c_try_link "$LINENO"
3319 then :
3320   eval "$3=yes"
3321 else case e in #(
3322   e) eval "$3=no" ;;
3323 esac
3324 fi
3325 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3326     conftest$ac_exeext conftest.$ac_ext ;;
3327 esac
3328 fi
3329 eval ac_res=\$$3
3330                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3331 printf "%s\n" "$ac_res" >&6; }
3332   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3333
3334 } # ac_fn_c_check_func
3335
3336 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3337 # ------------------------------------------------------------------
3338 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3339 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3340 ac_fn_check_decl ()
3341 {
3342   ac_save_ac_compile="$ac_compile"
3343   if test -n "$ac_compile_for_check_decl"; then
3344     ac_compile="$ac_compile_for_check_decl"
3345   fi
3346   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3347   as_decl_name=`echo $2|sed 's/ *(.*//'`
3348   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3349 printf %s "checking whether $as_decl_name is declared... " >&6; }
3350 if eval test \${$3+y}
3351 then :
3352   printf %s "(cached) " >&6
3353 else case e in #(
3354   e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3355   eval ac_save_FLAGS=\$$6
3356   as_fn_append $6 " $5"
3357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3358 /* end confdefs.h.  */
3359 $4
3360 int
3361 main (void)
3362 {
3363 #ifndef $as_decl_name
3364 #ifdef __cplusplus
3365   (void) $as_decl_use;
3366 #else
3367   (void) $as_decl_name;
3368 #endif
3369 #endif
3370
3371   ;
3372   return 0;
3373 }
3374 _ACEOF
3375 if ac_fn_c_try_compile "$LINENO"
3376 then :
3377   eval "$3=yes"
3378 else case e in #(
3379   e) eval "$3=no" ;;
3380 esac
3381 fi
3382 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3383   eval $6=\$ac_save_FLAGS
3384  ;;
3385 esac
3386 fi
3387 eval ac_res=\$$3
3388                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3389 printf "%s\n" "$ac_res" >&6; }
3390   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3391   ac_compile="$ac_save_ac_compile"
3392
3393 } # ac_fn_check_decl
3394
3395 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3396 # --------------------------------------------
3397 # Tries to find the compile-time value of EXPR in a program that includes
3398 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3399 # computed
3400 ac_fn_c_compute_int ()
3401 {
3402   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3403   if test "$cross_compiling" = yes; then
3404     # Depending upon the size, compute the lo and hi bounds.
3405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3406 /* end confdefs.h.  */
3407 $4
3408 int
3409 main (void)
3410 {
3411 static int test_array [1 - 2 * !(($2) >= 0)];
3412 test_array [0] = 0;
3413 return test_array [0];
3414
3415   ;
3416   return 0;
3417 }
3418 _ACEOF
3419 if ac_fn_c_try_compile "$LINENO"
3420 then :
3421   ac_lo=0 ac_mid=0
3422   while :; do
3423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3424 /* end confdefs.h.  */
3425 $4
3426 int
3427 main (void)
3428 {
3429 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3430 test_array [0] = 0;
3431 return test_array [0];
3432
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 if ac_fn_c_try_compile "$LINENO"
3438 then :
3439   ac_hi=$ac_mid; break
3440 else case e in #(
3441   e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3442                         if test $ac_lo -le $ac_mid; then
3443                           ac_lo= ac_hi=
3444                           break
3445                         fi
3446                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
3447 esac
3448 fi
3449 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3450   done
3451 else case e in #(
3452   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3453 /* end confdefs.h.  */
3454 $4
3455 int
3456 main (void)
3457 {
3458 static int test_array [1 - 2 * !(($2) < 0)];
3459 test_array [0] = 0;
3460 return test_array [0];
3461
3462   ;
3463   return 0;
3464 }
3465 _ACEOF
3466 if ac_fn_c_try_compile "$LINENO"
3467 then :
3468   ac_hi=-1 ac_mid=-1
3469   while :; do
3470     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3471 /* end confdefs.h.  */
3472 $4
3473 int
3474 main (void)
3475 {
3476 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3477 test_array [0] = 0;
3478 return test_array [0];
3479
3480   ;
3481   return 0;
3482 }
3483 _ACEOF
3484 if ac_fn_c_try_compile "$LINENO"
3485 then :
3486   ac_lo=$ac_mid; break
3487 else case e in #(
3488   e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3489                         if test $ac_mid -le $ac_hi; then
3490                           ac_lo= ac_hi=
3491                           break
3492                         fi
3493                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
3494 esac
3495 fi
3496 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3497   done
3498 else case e in #(
3499   e) ac_lo= ac_hi= ;;
3500 esac
3501 fi
3502 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3503 esac
3504 fi
3505 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3506 # Binary search between lo and hi bounds.
3507 while test "x$ac_lo" != "x$ac_hi"; do
3508   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3510 /* end confdefs.h.  */
3511 $4
3512 int
3513 main (void)
3514 {
3515 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3516 test_array [0] = 0;
3517 return test_array [0];
3518
3519   ;
3520   return 0;
3521 }
3522 _ACEOF
3523 if ac_fn_c_try_compile "$LINENO"
3524 then :
3525   ac_hi=$ac_mid
3526 else case e in #(
3527   e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
3528 esac
3529 fi
3530 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3531 done
3532 case $ac_lo in #((
3533 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3534 '') ac_retval=1 ;;
3535 esac
3536   else
3537     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3538 /* end confdefs.h.  */
3539 $4
3540 static long int longval (void) { return $2; }
3541 static unsigned long int ulongval (void) { return $2; }
3542 #include <stdio.h>
3543 #include <stdlib.h>
3544 int
3545 main (void)
3546 {
3547
3548   FILE *f = fopen ("conftest.val", "w");
3549   if (! f)
3550     return 1;
3551   if (($2) < 0)
3552     {
3553       long int i = longval ();
3554       if (i != ($2))
3555         return 1;
3556       fprintf (f, "%ld", i);
3557     }
3558   else
3559     {
3560       unsigned long int i = ulongval ();
3561       if (i != ($2))
3562         return 1;
3563       fprintf (f, "%lu", i);
3564     }
3565   /* Do not output a trailing newline, as this causes \r\n confusion
3566      on some platforms.  */
3567   return ferror (f) || fclose (f) != 0;
3568
3569   ;
3570   return 0;
3571 }
3572 _ACEOF
3573 if ac_fn_c_try_run "$LINENO"
3574 then :
3575   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3576 else case e in #(
3577   e) ac_retval=1 ;;
3578 esac
3579 fi
3580 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3581   conftest.$ac_objext conftest.beam conftest.$ac_ext
3582 rm -f conftest.val
3583
3584   fi
3585   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3586   as_fn_set_status $ac_retval
3587
3588 } # ac_fn_c_compute_int
3589
3590 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3591 # ----------------------------------------------------
3592 # Tries to find if the field MEMBER exists in type AGGR, after including
3593 # INCLUDES, setting cache variable VAR accordingly.
3594 ac_fn_c_check_member ()
3595 {
3596   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3597   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3598 printf %s "checking for $2.$3... " >&6; }
3599 if eval test \${$4+y}
3600 then :
3601   printf %s "(cached) " >&6
3602 else case e in #(
3603   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3604 /* end confdefs.h.  */
3605 $5
3606 int
3607 main (void)
3608 {
3609 static $2 ac_aggr;
3610 if (ac_aggr.$3)
3611 return 0;
3612   ;
3613   return 0;
3614 }
3615 _ACEOF
3616 if ac_fn_c_try_compile "$LINENO"
3617 then :
3618   eval "$4=yes"
3619 else case e in #(
3620   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621 /* end confdefs.h.  */
3622 $5
3623 int
3624 main (void)
3625 {
3626 static $2 ac_aggr;
3627 if (sizeof ac_aggr.$3)
3628 return 0;
3629   ;
3630   return 0;
3631 }
3632 _ACEOF
3633 if ac_fn_c_try_compile "$LINENO"
3634 then :
3635   eval "$4=yes"
3636 else case e in #(
3637   e) eval "$4=no" ;;
3638 esac
3639 fi
3640 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3641 esac
3642 fi
3643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3644 esac
3645 fi
3646 eval ac_res=\$$4
3647                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3648 printf "%s\n" "$ac_res" >&6; }
3649   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3650
3651 } # ac_fn_c_check_member
3652 ac_configure_args_raw=
3653 for ac_arg
3654 do
3655   case $ac_arg in
3656   *\'*)
3657     ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3658   esac
3659   as_fn_append ac_configure_args_raw " '$ac_arg'"
3660 done
3661
3662 case $ac_configure_args_raw in
3663   *$as_nl*)
3664     ac_safe_unquote= ;;
3665   *)
3666     ac_unsafe_z='|&;<>()$`\\"*?[ ''     ' # This string ends in space, tab.
3667     ac_unsafe_a="$ac_unsafe_z#~"
3668     ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3669     ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3670 esac
3671
3672 cat >config.log <<_ACEOF
3673 This file contains any messages produced by compilers while
3674 running configure, to aid debugging if configure makes a mistake.
3675
3676 It was created by GNU diffutils $as_me 3.10, which was
3677 generated by GNU Autoconf 2.72c.20-9c018.  Invocation command line was
3678
3679   $ $0$ac_configure_args_raw
3680
3681 _ACEOF
3682 exec 5>>config.log
3683 {
3684 cat <<_ASUNAME
3685 ## --------- ##
3686 ## Platform. ##
3687 ## --------- ##
3688
3689 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3690 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3691 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3692 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3693 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3694
3695 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3696 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3697
3698 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3699 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3700 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3701 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3702 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3703 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3704 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3705
3706 _ASUNAME
3707
3708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3709 for as_dir in $PATH
3710 do
3711   IFS=$as_save_IFS
3712   case $as_dir in #(((
3713     '') as_dir=./ ;;
3714     */) ;;
3715     *) as_dir=$as_dir/ ;;
3716   esac
3717     printf "%s\n" "PATH: $as_dir"
3718   done
3719 IFS=$as_save_IFS
3720
3721 } >&5
3722
3723 cat >&5 <<_ACEOF
3724
3725
3726 ## ----------- ##
3727 ## Core tests. ##
3728 ## ----------- ##
3729
3730 _ACEOF
3731
3732
3733 # Keep a trace of the command line.
3734 # Strip out --no-create and --no-recursion so they do not pile up.
3735 # Strip out --silent because we don't want to record it for future runs.
3736 # Also quote any args containing shell meta-characters.
3737 # Make two passes to allow for proper duplicate-argument suppression.
3738 ac_configure_args=
3739 ac_configure_args0=
3740 ac_configure_args1=
3741 ac_must_keep_next=false
3742 for ac_pass in 1 2
3743 do
3744   for ac_arg
3745   do
3746     case $ac_arg in
3747     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3748     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3749     | -silent | --silent | --silen | --sile | --sil)
3750       continue ;;
3751     *\'*)
3752       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3753     esac
3754     case $ac_pass in
3755     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3756     2)
3757       as_fn_append ac_configure_args1 " '$ac_arg'"
3758       if test $ac_must_keep_next = true; then
3759         ac_must_keep_next=false # Got value, back to normal.
3760       else
3761         case $ac_arg in
3762           *=* | --config-cache | -C | -disable-* | --disable-* \
3763           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3764           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3765           | -with-* | --with-* | -without-* | --without-* | --x)
3766             case "$ac_configure_args0 " in
3767               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3768             esac
3769             ;;
3770           -* ) ac_must_keep_next=true ;;
3771         esac
3772       fi
3773       as_fn_append ac_configure_args " '$ac_arg'"
3774       ;;
3775     esac
3776   done
3777 done
3778 { ac_configure_args0=; unset ac_configure_args0;}
3779 { ac_configure_args1=; unset ac_configure_args1;}
3780
3781 # When interrupted or exit'd, cleanup temporary files, and complete
3782 # config.log.  We remove comments because anyway the quotes in there
3783 # would cause problems or look ugly.
3784 # WARNING: Use '\'' to represent an apostrophe within the trap.
3785 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3786 trap 'exit_status=$?
3787   # Sanitize IFS.
3788   IFS=" ""      $as_nl"
3789   # Save into config.log some information that might help in debugging.
3790   {
3791     echo
3792
3793     printf "%s\n" "## ---------------- ##
3794 ## Cache variables. ##
3795 ## ---------------- ##"
3796     echo
3797     # The following way of writing the cache mishandles newlines in values,
3798 (
3799   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3800     eval ac_val=\$$ac_var
3801     case $ac_val in #(
3802     *${as_nl}*)
3803       case $ac_var in #(
3804       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3805 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3806       esac
3807       case $ac_var in #(
3808       _ | IFS | as_nl) ;; #(
3809       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3810       *) { eval $ac_var=; unset $ac_var;} ;;
3811       esac ;;
3812     esac
3813   done
3814   (set) 2>&1 |
3815     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3816     *${as_nl}ac_space=\ *)
3817       sed -n \
3818         "s/'\''/'\''\\\\'\'''\''/g;
3819           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3820       ;; #(
3821     *)
3822       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3823       ;;
3824     esac |
3825     sort
3826 )
3827     echo
3828
3829     printf "%s\n" "## ----------------- ##
3830 ## Output variables. ##
3831 ## ----------------- ##"
3832     echo
3833     for ac_var in $ac_subst_vars
3834     do
3835       eval ac_val=\$$ac_var
3836       case $ac_val in
3837       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3838       esac
3839       printf "%s\n" "$ac_var='\''$ac_val'\''"
3840     done | sort
3841     echo
3842
3843     if test -n "$ac_subst_files"; then
3844       printf "%s\n" "## ------------------- ##
3845 ## File substitutions. ##
3846 ## ------------------- ##"
3847       echo
3848       for ac_var in $ac_subst_files
3849       do
3850         eval ac_val=\$$ac_var
3851         case $ac_val in
3852         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3853         esac
3854         printf "%s\n" "$ac_var='\''$ac_val'\''"
3855       done | sort
3856       echo
3857     fi
3858
3859     if test -s confdefs.h; then
3860       printf "%s\n" "## ----------- ##
3861 ## confdefs.h. ##
3862 ## ----------- ##"
3863       echo
3864       cat confdefs.h
3865       echo
3866     fi
3867     test "$ac_signal" != 0 &&
3868       printf "%s\n" "$as_me: caught signal $ac_signal"
3869     printf "%s\n" "$as_me: exit $exit_status"
3870   } >&5
3871   rm -f core *.core core.conftest.* &&
3872     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3873     exit $exit_status
3874 ' 0
3875 for ac_signal in 1 2 13 15; do
3876   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3877 done
3878 ac_signal=0
3879
3880 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3881 rm -f -r conftest* confdefs.h
3882
3883 printf "%s\n" "/* confdefs.h */" > confdefs.h
3884
3885 # Predefined preprocessor variables.
3886
3887 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3888
3889 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3890
3891 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3892
3893 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3894
3895 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3896
3897 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3898
3899
3900 # Let the site file select an alternate cache file if it wants to.
3901 # Prefer an explicitly selected file to automatically selected ones.
3902 if test -n "$CONFIG_SITE"; then
3903   ac_site_files="$CONFIG_SITE"
3904 elif test "x$prefix" != xNONE; then
3905   ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3906 else
3907   ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3908 fi
3909
3910 for ac_site_file in $ac_site_files
3911 do
3912   case $ac_site_file in #(
3913   */*) :
3914      ;; #(
3915   *) :
3916     ac_site_file=./$ac_site_file ;;
3917 esac
3918   if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3919     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3920 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3921     sed 's/^/| /' "$ac_site_file" >&5
3922     . "$ac_site_file" \
3923       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3924 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3925 as_fn_error $? "failed to load site script $ac_site_file
3926 See 'config.log' for more details" "$LINENO" 5; }
3927   fi
3928 done
3929
3930 if test -r "$cache_file"; then
3931   # Some versions of bash will fail to source /dev/null (special files
3932   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3933   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3934     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3935 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3936     case $cache_file in
3937       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3938       *)                      . "./$cache_file";;
3939     esac
3940   fi
3941 else
3942   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3943 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3944   >$cache_file
3945 fi
3946
3947 # Test code for whether the C compiler supports C89 (global declarations)
3948 ac_c_conftest_c89_globals='
3949 /* Does the compiler advertise C89 conformance?
3950    Do not test the value of __STDC__, because some compilers set it to 0
3951    while being otherwise adequately conformant. */
3952 #if !defined __STDC__
3953 # error "Compiler does not advertise C89 conformance"
3954 #endif
3955
3956 #include <stddef.h>
3957 #include <stdarg.h>
3958 struct stat;
3959 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
3960 struct buf { int x; };
3961 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3962 static char *e (char **p, int i)
3963 {
3964   return p[i];
3965 }
3966 static char *f (char * (*g) (char **, int), char **p, ...)
3967 {
3968   char *s;
3969   va_list v;
3970   va_start (v,p);
3971   s = g (p, va_arg (v,int));
3972   va_end (v);
3973   return s;
3974 }
3975
3976 /* C89 style stringification. */
3977 #define noexpand_stringify(a) #a
3978 const char *stringified = noexpand_stringify(arbitrary+token=sequence);
3979
3980 /* C89 style token pasting.  Exercises some of the corner cases that
3981    e.g. old MSVC gets wrong, but not very hard. */
3982 #define noexpand_concat(a,b) a##b
3983 #define expand_concat(a,b) noexpand_concat(a,b)
3984 extern int vA;
3985 extern int vbee;
3986 #define aye A
3987 #define bee B
3988 int *pvA = &expand_concat(v,aye);
3989 int *pvbee = &noexpand_concat(v,bee);
3990
3991 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3992    function prototypes and stuff, but not \xHH hex character constants.
3993    These do not provoke an error unfortunately, instead are silently treated
3994    as an "x".  The following induces an error, until -std is added to get
3995    proper ANSI mode.  Curiously \x00 != x always comes out true, for an
3996    array size at least.  It is necessary to write \x00 == 0 to get something
3997    that is true only with -std.  */
3998 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3999
4000 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4001    inside strings and character constants.  */
4002 #define FOO(x) '\''x'\''
4003 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
4004
4005 int test (int i, double x);
4006 struct s1 {int (*f) (int a);};
4007 struct s2 {int (*f) (double a);};
4008 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
4009                int, int);'
4010
4011 # Test code for whether the C compiler supports C89 (body of main).
4012 ac_c_conftest_c89_main='
4013 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
4014 '
4015
4016 # Test code for whether the C compiler supports C99 (global declarations)
4017 ac_c_conftest_c99_globals='
4018 // Does the compiler advertise C99 conformance?
4019 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4020 # error "Compiler does not advertise C99 conformance"
4021 #endif
4022
4023 #include <stdbool.h>
4024 extern int puts (const char *);
4025 extern int printf (const char *, ...);
4026 extern int dprintf (int, const char *, ...);
4027 extern void *malloc (size_t);
4028 extern void free (void *);
4029
4030 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4031 // dprintf is used instead of fprintf to avoid needing to declare
4032 // FILE and stderr.
4033 #define debug(...) dprintf (2, __VA_ARGS__)
4034 #define showlist(...) puts (#__VA_ARGS__)
4035 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4036 static void
4037 test_varargs_macros (void)
4038 {
4039   int x = 1234;
4040   int y = 5678;
4041   debug ("Flag");
4042   debug ("X = %d\n", x);
4043   showlist (The first, second, and third items.);
4044   report (x>y, "x is %d but y is %d", x, y);
4045 }
4046
4047 // Check long long types.
4048 #define BIG64 18446744073709551615ull
4049 #define BIG32 4294967295ul
4050 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4051 #if !BIG_OK
4052   #error "your preprocessor is broken"
4053 #endif
4054 #if BIG_OK
4055 #else
4056   #error "your preprocessor is broken"
4057 #endif
4058 static long long int bignum = -9223372036854775807LL;
4059 static unsigned long long int ubignum = BIG64;
4060
4061 struct incomplete_array
4062 {
4063   int datasize;
4064   double data[];
4065 };
4066
4067 struct named_init {
4068   int number;
4069   const wchar_t *name;
4070   double average;
4071 };
4072
4073 typedef const char *ccp;
4074
4075 static inline int
4076 test_restrict (ccp restrict text)
4077 {
4078   // See if C++-style comments work.
4079   // Iterate through items via the restricted pointer.
4080   // Also check for declarations in for loops.
4081   for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4082     continue;
4083   return 0;
4084 }
4085
4086 // Check varargs and va_copy.
4087 static bool
4088 test_varargs (const char *format, ...)
4089 {
4090   va_list args;
4091   va_start (args, format);
4092   va_list args_copy;
4093   va_copy (args_copy, args);
4094
4095   const char *str = "";
4096   int number = 0;
4097   float fnumber = 0;
4098
4099   while (*format)
4100     {
4101       switch (*format++)
4102         {
4103         case '\''s'\'': // string
4104           str = va_arg (args_copy, const char *);
4105           break;
4106         case '\''d'\'': // int
4107           number = va_arg (args_copy, int);
4108           break;
4109         case '\''f'\'': // float
4110           fnumber = va_arg (args_copy, double);
4111           break;
4112         default:
4113           break;
4114         }
4115     }
4116   va_end (args_copy);
4117   va_end (args);
4118
4119   return *str && number && fnumber;
4120 }
4121 '
4122
4123 # Test code for whether the C compiler supports C99 (body of main).
4124 ac_c_conftest_c99_main='
4125   // Check bool.
4126   _Bool success = false;
4127   success |= (argc != 0);
4128
4129   // Check restrict.
4130   if (test_restrict ("String literal") == 0)
4131     success = true;
4132   char *restrict newvar = "Another string";
4133
4134   // Check varargs.
4135   success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4136   test_varargs_macros ();
4137
4138   // Check flexible array members.
4139   struct incomplete_array *ia =
4140     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4141   ia->datasize = 10;
4142   for (int i = 0; i < ia->datasize; ++i)
4143     ia->data[i] = i * 1.234;
4144   // Work around memory leak warnings.
4145   free (ia);
4146
4147   // Check named initializers.
4148   struct named_init ni = {
4149     .number = 34,
4150     .name = L"Test wide string",
4151     .average = 543.34343,
4152   };
4153
4154   ni.number = 58;
4155
4156   int dynamic_array[ni.number];
4157   dynamic_array[0] = argv[0][0];
4158   dynamic_array[ni.number - 1] = 543;
4159
4160   // work around unused variable warnings
4161   ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4162          || dynamic_array[ni.number - 1] != 543);
4163 '
4164
4165 # Test code for whether the C compiler supports C11 (global declarations)
4166 ac_c_conftest_c11_globals='
4167 // Does the compiler advertise C11 conformance?
4168 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4169 # error "Compiler does not advertise C11 conformance"
4170 #endif
4171
4172 // Check _Alignas.
4173 char _Alignas (double) aligned_as_double;
4174 char _Alignas (0) no_special_alignment;
4175 extern char aligned_as_int;
4176 char _Alignas (0) _Alignas (int) aligned_as_int;
4177
4178 // Check _Alignof.
4179 enum
4180 {
4181   int_alignment = _Alignof (int),
4182   int_array_alignment = _Alignof (int[100]),
4183   char_alignment = _Alignof (char)
4184 };
4185 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4186
4187 // Check _Noreturn.
4188 int _Noreturn does_not_return (void) { for (;;) continue; }
4189
4190 // Check _Static_assert.
4191 struct test_static_assert
4192 {
4193   int x;
4194   _Static_assert (sizeof (int) <= sizeof (long int),
4195                   "_Static_assert does not work in struct");
4196   long int y;
4197 };
4198
4199 // Check UTF-8 literals.
4200 #define u8 syntax error!
4201 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4202
4203 // Check duplicate typedefs.
4204 typedef long *long_ptr;
4205 typedef long int *long_ptr;
4206 typedef long_ptr long_ptr;
4207
4208 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4209 struct anonymous
4210 {
4211   union {
4212     struct { int i; int j; };
4213     struct { int k; long int l; } w;
4214   };
4215   int m;
4216 } v1;
4217 '
4218
4219 # Test code for whether the C compiler supports C11 (body of main).
4220 ac_c_conftest_c11_main='
4221   _Static_assert ((offsetof (struct anonymous, i)
4222                    == offsetof (struct anonymous, w.k)),
4223                   "Anonymous union alignment botch");
4224   v1.i = 2;
4225   v1.w.k = 5;
4226   ok |= v1.i != 5;
4227 '
4228
4229 # Test code for whether the C compiler supports C11 (complete).
4230 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4231 ${ac_c_conftest_c99_globals}
4232 ${ac_c_conftest_c11_globals}
4233
4234 int
4235 main (int argc, char **argv)
4236 {
4237   int ok = 0;
4238   ${ac_c_conftest_c89_main}
4239   ${ac_c_conftest_c99_main}
4240   ${ac_c_conftest_c11_main}
4241   return ok;
4242 }
4243 "
4244
4245 # Test code for whether the C compiler supports C99 (complete).
4246 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4247 ${ac_c_conftest_c99_globals}
4248
4249 int
4250 main (int argc, char **argv)
4251 {
4252   int ok = 0;
4253   ${ac_c_conftest_c89_main}
4254   ${ac_c_conftest_c99_main}
4255   return ok;
4256 }
4257 "
4258
4259 # Test code for whether the C compiler supports C89 (complete).
4260 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4261
4262 int
4263 main (int argc, char **argv)
4264 {
4265   int ok = 0;
4266   ${ac_c_conftest_c89_main}
4267   return ok;
4268 }
4269 "
4270
4271 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
4272 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4273 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4274 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4275 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4276 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4277 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4278 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4279 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4280 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4281 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4282 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4283 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4284 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4285 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4286 as_fn_append ac_header_c_list " error.h error_h HAVE_ERROR_H"
4287 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4288 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4289 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
4290 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
4291 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
4292 gl_fnmatch_required=GNU
4293 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4294 gl_getopt_required=GNU
4295 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4296 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4297 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4298 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4299 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4300 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4301 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
4302 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4303 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4304 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4305 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4306 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4307 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4308 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4309 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4310 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4311 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4312 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4313 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4314 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4315 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4316 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4317 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4318 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4319 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4320 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4321 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4322 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4323 as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H"
4324 as_fn_append ac_header_c_list " stdckdint.h stdckdint_h HAVE_STDCKDINT_H"
4325 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4326 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
4327 as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
4328 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4329 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4330 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4331 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4332 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4333 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4334 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4335 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4336 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4337 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4338 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4339 as_fn_append ac_func_c_list " pselect HAVE_PSELECT"
4340 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4341 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4342 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4343 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4344 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4345 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4346 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4347 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4348 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4349 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4350 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
4351 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
4352 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
4353 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
4354 as_fn_append ac_func_c_list " fork HAVE_FORK"
4355 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
4356 gt_needs="$gt_needs need-ngettext"
4357
4358 # Auxiliary files required by this configure script.
4359 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4360
4361 # Locations in which to look for auxiliary files.
4362 ac_aux_dir_candidates="${srcdir}/build-aux"
4363
4364 # Search for a directory containing all of the required auxiliary files,
4365 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4366 # If we don't find one directory that contains all the files we need,
4367 # we report the set of missing files from the *first* directory in
4368 # $ac_aux_dir_candidates and give up.
4369 ac_missing_aux_files=""
4370 ac_first_candidate=:
4371 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373 as_found=false
4374 for as_dir in $ac_aux_dir_candidates
4375 do
4376   IFS=$as_save_IFS
4377   case $as_dir in #(((
4378     '') as_dir=./ ;;
4379     */) ;;
4380     *) as_dir=$as_dir/ ;;
4381   esac
4382   as_found=:
4383
4384   printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
4385   ac_aux_dir_found=yes
4386   ac_install_sh=
4387   for ac_aux in $ac_aux_files
4388   do
4389     # As a special case, if "install-sh" is required, that requirement
4390     # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4391     # and $ac_install_sh is set appropriately for whichever one is found.
4392     if test x"$ac_aux" = x"install-sh"
4393     then
4394       if test -f "${as_dir}install-sh"; then
4395         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
4396         ac_install_sh="${as_dir}install-sh -c"
4397       elif test -f "${as_dir}install.sh"; then
4398         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
4399         ac_install_sh="${as_dir}install.sh -c"
4400       elif test -f "${as_dir}shtool"; then
4401         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
4402         ac_install_sh="${as_dir}shtool install -c"
4403       else
4404         ac_aux_dir_found=no
4405         if $ac_first_candidate; then
4406           ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4407         else
4408           break
4409         fi
4410       fi
4411     else
4412       if test -f "${as_dir}${ac_aux}"; then
4413         printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
4414       else
4415         ac_aux_dir_found=no
4416         if $ac_first_candidate; then
4417           ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4418         else
4419           break
4420         fi
4421       fi
4422     fi
4423   done
4424   if test "$ac_aux_dir_found" = yes; then
4425     ac_aux_dir="$as_dir"
4426     break
4427   fi
4428   ac_first_candidate=false
4429
4430   as_found=false
4431 done
4432 IFS=$as_save_IFS
4433 if $as_found
4434 then :
4435
4436 else case e in #(
4437   e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
4438 esac
4439 fi
4440
4441
4442 # These three variables are undocumented and unsupported,
4443 # and are intended to be withdrawn in a future Autoconf release.
4444 # They can cause serious problems if a builder's source tree is in a directory
4445 # whose full name contains unusual characters.
4446 if test -f "${ac_aux_dir}config.guess"; then
4447   ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4448 fi
4449 if test -f "${ac_aux_dir}config.sub"; then
4450   ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4451 fi
4452 if test -f "$ac_aux_dir/configure"; then
4453   ac_configure="$SHELL ${ac_aux_dir}configure"
4454 fi
4455
4456 # Check that the precious variables saved in the cache have kept the same
4457 # value.
4458 ac_cache_corrupted=false
4459 for ac_var in $ac_precious_vars; do
4460   eval ac_old_set=\$ac_cv_env_${ac_var}_set
4461   eval ac_new_set=\$ac_env_${ac_var}_set
4462   eval ac_old_val=\$ac_cv_env_${ac_var}_value
4463   eval ac_new_val=\$ac_env_${ac_var}_value
4464   case $ac_old_set,$ac_new_set in
4465     set,)
4466       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
4467 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
4468       ac_cache_corrupted=: ;;
4469     ,set)
4470       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
4471 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
4472       ac_cache_corrupted=: ;;
4473     ,);;
4474     *)
4475       if test "x$ac_old_val" != "x$ac_new_val"; then
4476         # differences in whitespace do not lead to failure.
4477         ac_old_val_w=`echo x $ac_old_val`
4478         ac_new_val_w=`echo x $ac_new_val`
4479         if test "$ac_old_val_w" != "$ac_new_val_w"; then
4480           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
4481 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
4482           ac_cache_corrupted=:
4483         else
4484           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
4485 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
4486           eval $ac_var=\$ac_old_val
4487         fi
4488         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
4489 printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
4490         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
4491 printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
4492       fi;;
4493   esac
4494   # Pass precious variables to config.status.
4495   if test "$ac_new_set" = set; then
4496     case $ac_new_val in
4497     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4498     *) ac_arg=$ac_var=$ac_new_val ;;
4499     esac
4500     case " $ac_configure_args " in
4501       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4502       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4503     esac
4504   fi
4505 done
4506 if $ac_cache_corrupted; then
4507   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4508 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4509   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4510 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4511   as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
4512             and start over" "$LINENO" 5
4513 fi
4514 ## -------------------- ##
4515 ## Main body of script. ##
4516 ## -------------------- ##
4517
4518 ac_ext=c
4519 ac_cpp='$CPP $CPPFLAGS'
4520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4523
4524
4525
4526
4527
4528
4529
4530 am__api_version='1.16'
4531
4532
4533
4534   # Find a good install program.  We prefer a C program (faster),
4535 # so one script is as good as another.  But avoid the broken or
4536 # incompatible versions:
4537 # SysV /etc/install, /usr/sbin/install
4538 # SunOS /usr/etc/install
4539 # IRIX /sbin/install
4540 # AIX /bin/install
4541 # AmigaOS /C/install, which installs bootblocks on floppy discs
4542 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4543 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4544 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4545 # OS/2's system install, which has a completely different semantic
4546 # ./install, which can be erroneously created by make from ./install.sh.
4547 # Reject install programs that cannot install multiple files.
4548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4549 printf %s "checking for a BSD-compatible install... " >&6; }
4550 if test -z "$INSTALL"; then
4551 if test ${ac_cv_path_install+y}
4552 then :
4553   printf %s "(cached) " >&6
4554 else case e in #(
4555   e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556 for as_dir in $PATH
4557 do
4558   IFS=$as_save_IFS
4559   case $as_dir in #(((
4560     '') as_dir=./ ;;
4561     */) ;;
4562     *) as_dir=$as_dir/ ;;
4563   esac
4564     # Account for fact that we put trailing slashes in our PATH walk.
4565 case $as_dir in #((
4566   ./ | /[cC]/* | \
4567   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4568   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4569   /usr/ucb/* ) ;;
4570   *)
4571     # OSF1 and SCO ODT 3.0 have their own names for install.
4572     # Don't use installbsd from OSF since it installs stuff as root
4573     # by default.
4574     for ac_prog in ginstall scoinst install; do
4575       for ac_exec_ext in '' $ac_executable_extensions; do
4576         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4577           if test $ac_prog = install &&
4578             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4579             # AIX install.  It has an incompatible calling convention.
4580             :
4581           elif test $ac_prog = install &&
4582             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4583             # program-specific install script used by HP pwplus--don't use.
4584             :
4585           else
4586             rm -rf conftest.one conftest.two conftest.dir
4587             echo one > conftest.one
4588             echo two > conftest.two
4589             mkdir conftest.dir
4590             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4591               test -s conftest.one && test -s conftest.two &&
4592               test -s conftest.dir/conftest.one &&
4593               test -s conftest.dir/conftest.two
4594             then
4595               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4596               break 3
4597             fi
4598           fi
4599         fi
4600       done
4601     done
4602     ;;
4603 esac
4604
4605   done
4606 IFS=$as_save_IFS
4607
4608 rm -rf conftest.one conftest.two conftest.dir
4609  ;;
4610 esac
4611 fi
4612   if test ${ac_cv_path_install+y}; then
4613     INSTALL=$ac_cv_path_install
4614   else
4615     # As a last resort, use the slow shell script.  Don't cache a
4616     # value for INSTALL within a source directory, because that will
4617     # break other packages using the cache if that directory is
4618     # removed, or if the value is a relative name.
4619     INSTALL=$ac_install_sh
4620   fi
4621 fi
4622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4623 printf "%s\n" "$INSTALL" >&6; }
4624
4625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4626 # It thinks the first close brace ends the variable substitution.
4627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4628
4629 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4630
4631 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4632
4633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
4634 printf %s "checking whether sleep supports fractional seconds... " >&6; }
4635 if test ${am_cv_sleep_fractional_seconds+y}
4636 then :
4637   printf %s "(cached) " >&6
4638 else case e in #(
4639   e) if sleep 0.001 2>/dev/null
4640 then :
4641   am_cv_sleep_fractional_seconds=true
4642 else case e in #(
4643   e) am_cv_sleep_fractional_seconds=false ;;
4644 esac
4645 fi
4646  ;;
4647 esac
4648 fi
4649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
4650 printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
4651
4652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the filesystem timestamp resolution" >&5
4653 printf %s "checking the filesystem timestamp resolution... " >&6; }
4654 if test ${am_cv_filesystem_timestamp_resolution+y}
4655 then :
4656   printf %s "(cached) " >&6
4657 else case e in #(
4658   e) # Use names that lexically sort older-first when the timestamps are equal.
4659 rm -f conftest.file.a conftest.file.b
4660 : > conftest.file.a
4661 if $am_cv_sleep_fractional_seconds
4662 then :
4663     am_try_sleep=0.1 am_try_loops=20
4664
4665 else case e in #(
4666   e)   am_try_sleep=1   am_try_loops=2
4667  ;;
4668 esac
4669 fi
4670 am_try=0
4671 while :; do
4672   as_fn_arith $am_try + 1 && am_try=$as_val
4673   echo "timestamp $am_try" > conftest.file.b
4674   set X `ls -t conftest.file.a conftest.file.b`
4675   if test "$2" = conftest.file.b || test $am_try -eq $am_try_loops; then
4676     break
4677   fi
4678   sleep $am_try_sleep
4679 done
4680 rm -f conftest.file.a conftest.file.b
4681 am_cv_filesystem_timestamp_resolution=$am_try
4682 if $am_cv_sleep_fractional_seconds
4683 then :
4684     as_fn_arith $am_try / 10 && am_cv_filesystem_timestamp_resolution=$as_val
4685   as_fn_arith $am_try % 10 && am_fraction=$as_val
4686   as_fn_append am_cv_filesystem_timestamp_resolution .$am_fraction
4687
4688 fi
4689  ;;
4690 esac
4691 fi
4692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
4693 printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
4694
4695 rm -f conftest.file
4696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4697 printf %s "checking whether build environment is sane... " >&6; }
4698 if test ${am_cv_build_env_is_sane+y}
4699 then :
4700   printf %s "(cached) " >&6
4701 else case e in #(
4702   e) # Reject unsafe characters in $srcdir or the absolute working directory
4703 # name.  Accept space and tab only in the latter.
4704 am_lf='
4705 '
4706 case `pwd` in
4707   *[\\\"\#\$\&\'\`$am_lf]*)
4708     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4709 esac
4710 case $srcdir in
4711   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
4712     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4713 esac
4714
4715 # Do 'set' in a subshell so we don't clobber the current shell's
4716 # arguments.  Must try -L first in case configure is actually a
4717 # symlink; some systems play weird games with the mod time of symlinks
4718 # (eg FreeBSD returns the mod time of the symlink's containing
4719 # directory).
4720 if (
4721    am_has_slept=no
4722    for am_try in 1 2; do
4723      echo "timestamp, slept: $am_has_slept" > conftest.file
4724      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4725      if test "$*" = "X"; then
4726         # -L didn't work.
4727         set X `ls -t "$srcdir/configure" conftest.file`
4728      fi
4729      if test "$*" != "X $srcdir/configure conftest.file" \
4730         && test "$*" != "X conftest.file $srcdir/configure"; then
4731
4732         # If neither matched, then we have a broken ls.  This can happen
4733         # if, for instance, CONFIG_SHELL is bash and it inherits a
4734         # broken ls alias from the environment.  This has actually
4735         # happened.  Such a system could not be considered "sane".
4736         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4737   alias in your environment" "$LINENO" 5
4738      fi
4739      if test "$2" = conftest.file || test $am_try -eq 2; then
4740        break
4741      fi
4742      # Just in case.
4743      sleep $am_cv_filesystem_timestamp_resolution
4744      am_has_slept=yes
4745    done
4746    test "$2" = conftest.file
4747    )
4748 then
4749   am_cv_build_env_is_sane=yes
4750 else
4751    as_fn_error $? "newly created file is older than distributed files!
4752 Check your system clock" "$LINENO" 5
4753 fi
4754  ;;
4755 esac
4756 fi
4757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_env_is_sane" >&5
4758 printf "%s\n" "$am_cv_build_env_is_sane" >&6; }
4759 # If we didn't sleep, we still need to ensure time stamps of config.status and
4760 # generated files are strictly newer.
4761 am_sleep_pid=
4762 if ! test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1; then
4763   ( sleep $am_cv_filesystem_timestamp_resolution ) &
4764   am_sleep_pid=$!
4765 fi
4766
4767 rm -f conftest.file
4768
4769 test "$program_prefix" != NONE &&
4770   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4771 # Use a double $ so make ignores it.
4772 test "$program_suffix" != NONE &&
4773   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4774 # Double any \ or $.
4775 # By default was 's,x,x', remove it if useless.
4776 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4777 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4778
4779
4780 # Expand $ac_aux_dir to an absolute path.
4781 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4782
4783
4784   if test x"${MISSING+set}" != xset; then
4785   MISSING="\${SHELL} '$am_aux_dir/missing'"
4786 fi
4787 # Use eval to expand $SHELL
4788 if eval "$MISSING --is-lightweight"; then
4789   am_missing_run="$MISSING "
4790 else
4791   am_missing_run=
4792   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4793 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4794 fi
4795
4796 if test x"${install_sh+set}" != xset; then
4797   case $am_aux_dir in
4798   *\ * | *\     *)
4799     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4800   *)
4801     install_sh="\${SHELL} $am_aux_dir/install-sh"
4802   esac
4803 fi
4804
4805 # Installed binaries are usually stripped using 'strip' when the user
4806 # run "make install-strip".  However 'strip' might not be the right
4807 # tool to use in cross-compilation environments, therefore Automake
4808 # will honor the 'STRIP' environment variable to overrule this program.
4809 if test "$cross_compiling" != no; then
4810   if test -n "$ac_tool_prefix"; then
4811   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4812 set dummy ${ac_tool_prefix}strip; ac_word=$2
4813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814 printf %s "checking for $ac_word... " >&6; }
4815 if test ${ac_cv_prog_STRIP+y}
4816 then :
4817   printf %s "(cached) " >&6
4818 else case e in #(
4819   e) if test -n "$STRIP"; then
4820   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4821 else
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823 for as_dir in $PATH
4824 do
4825   IFS=$as_save_IFS
4826   case $as_dir in #(((
4827     '') as_dir=./ ;;
4828     */) ;;
4829     *) as_dir=$as_dir/ ;;
4830   esac
4831     for ac_exec_ext in '' $ac_executable_extensions; do
4832   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4833     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4834     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4835     break 2
4836   fi
4837 done
4838   done
4839 IFS=$as_save_IFS
4840
4841 fi ;;
4842 esac
4843 fi
4844 STRIP=$ac_cv_prog_STRIP
4845 if test -n "$STRIP"; then
4846   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4847 printf "%s\n" "$STRIP" >&6; }
4848 else
4849   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850 printf "%s\n" "no" >&6; }
4851 fi
4852
4853
4854 fi
4855 if test -z "$ac_cv_prog_STRIP"; then
4856   ac_ct_STRIP=$STRIP
4857   # Extract the first word of "strip", so it can be a program name with args.
4858 set dummy strip; ac_word=$2
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4860 printf %s "checking for $ac_word... " >&6; }
4861 if test ${ac_cv_prog_ac_ct_STRIP+y}
4862 then :
4863   printf %s "(cached) " >&6
4864 else case e in #(
4865   e) if test -n "$ac_ct_STRIP"; then
4866   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4867 else
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869 for as_dir in $PATH
4870 do
4871   IFS=$as_save_IFS
4872   case $as_dir in #(((
4873     '') as_dir=./ ;;
4874     */) ;;
4875     *) as_dir=$as_dir/ ;;
4876   esac
4877     for ac_exec_ext in '' $ac_executable_extensions; do
4878   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4879     ac_cv_prog_ac_ct_STRIP="strip"
4880     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4881     break 2
4882   fi
4883 done
4884   done
4885 IFS=$as_save_IFS
4886
4887 fi ;;
4888 esac
4889 fi
4890 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4891 if test -n "$ac_ct_STRIP"; then
4892   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4893 printf "%s\n" "$ac_ct_STRIP" >&6; }
4894 else
4895   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896 printf "%s\n" "no" >&6; }
4897 fi
4898
4899   if test "x$ac_ct_STRIP" = x; then
4900     STRIP=":"
4901   else
4902     case $cross_compiling:$ac_tool_warned in
4903 yes:)
4904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906 ac_tool_warned=yes ;;
4907 esac
4908     STRIP=$ac_ct_STRIP
4909   fi
4910 else
4911   STRIP="$ac_cv_prog_STRIP"
4912 fi
4913
4914 fi
4915 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4916
4917
4918   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4919 printf %s "checking for a race-free mkdir -p... " >&6; }
4920 if test -z "$MKDIR_P"; then
4921   if test ${ac_cv_path_mkdir+y}
4922 then :
4923   printf %s "(cached) " >&6
4924 else case e in #(
4925   e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4926 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4927 do
4928   IFS=$as_save_IFS
4929   case $as_dir in #(((
4930     '') as_dir=./ ;;
4931     */) ;;
4932     *) as_dir=$as_dir/ ;;
4933   esac
4934     for ac_prog in mkdir gmkdir; do
4935          for ac_exec_ext in '' $ac_executable_extensions; do
4936            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4937            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4938              'mkdir ('*'coreutils) '* | \
4939              'BusyBox '* | \
4940              'mkdir (fileutils) '4.1*)
4941                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4942                break 3;;
4943            esac
4944          done
4945        done
4946   done
4947 IFS=$as_save_IFS
4948  ;;
4949 esac
4950 fi
4951
4952   test -d ./--version && rmdir ./--version
4953   if test ${ac_cv_path_mkdir+y}; then
4954     MKDIR_P="$ac_cv_path_mkdir -p"
4955   else
4956     # As a last resort, use plain mkdir -p,
4957     # in the hope it doesn't have the bugs of ancient mkdir.
4958     MKDIR_P='mkdir -p'
4959   fi
4960 fi
4961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4962 printf "%s\n" "$MKDIR_P" >&6; }
4963
4964 for ac_prog in gawk mawk nawk awk
4965 do
4966   # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 printf %s "checking for $ac_word... " >&6; }
4970 if test ${ac_cv_prog_AWK+y}
4971 then :
4972   printf %s "(cached) " >&6
4973 else case e in #(
4974   e) if test -n "$AWK"; then
4975   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4976 else
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978 for as_dir in $PATH
4979 do
4980   IFS=$as_save_IFS
4981   case $as_dir in #(((
4982     '') as_dir=./ ;;
4983     */) ;;
4984     *) as_dir=$as_dir/ ;;
4985   esac
4986     for ac_exec_ext in '' $ac_executable_extensions; do
4987   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4988     ac_cv_prog_AWK="$ac_prog"
4989     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4990     break 2
4991   fi
4992 done
4993   done
4994 IFS=$as_save_IFS
4995
4996 fi ;;
4997 esac
4998 fi
4999 AWK=$ac_cv_prog_AWK
5000 if test -n "$AWK"; then
5001   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5002 printf "%s\n" "$AWK" >&6; }
5003 else
5004   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005 printf "%s\n" "no" >&6; }
5006 fi
5007
5008
5009   test -n "$AWK" && break
5010 done
5011
5012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5013 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5014 set x ${MAKE-make}
5015 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5016 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
5017 then :
5018   printf %s "(cached) " >&6
5019 else case e in #(
5020   e) cat >conftest.make <<\_ACEOF
5021 SHELL = /bin/sh
5022 all:
5023         @echo '@@@%%%=$(MAKE)=@@@%%%'
5024 _ACEOF
5025 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5026 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5027   *@@@%%%=?*=@@@%%%*)
5028     eval ac_cv_prog_make_${ac_make}_set=yes;;
5029   *)
5030     eval ac_cv_prog_make_${ac_make}_set=no;;
5031 esac
5032 rm -f conftest.make ;;
5033 esac
5034 fi
5035 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5036   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5037 printf "%s\n" "yes" >&6; }
5038   SET_MAKE=
5039 else
5040   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041 printf "%s\n" "no" >&6; }
5042   SET_MAKE="MAKE=${MAKE-make}"
5043 fi
5044
5045 rm -rf .tst 2>/dev/null
5046 mkdir .tst 2>/dev/null
5047 if test -d .tst; then
5048   am__leading_dot=.
5049 else
5050   am__leading_dot=_
5051 fi
5052 rmdir .tst 2>/dev/null
5053
5054 AM_DEFAULT_VERBOSITY=1
5055 # Check whether --enable-silent-rules was given.
5056 if test ${enable_silent_rules+y}
5057 then :
5058   enableval=$enable_silent_rules;
5059 fi
5060
5061 am_make=${MAKE-make}
5062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5063 printf %s "checking whether $am_make supports nested variables... " >&6; }
5064 if test ${am_cv_make_support_nested_variables+y}
5065 then :
5066   printf %s "(cached) " >&6
5067 else case e in #(
5068   e) if printf "%s\n" 'TRUE=$(BAR$(V))
5069 BAR0=false
5070 BAR1=true
5071 V=1
5072 am__doit:
5073         @$(TRUE)
5074 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5075   am_cv_make_support_nested_variables=yes
5076 else
5077   am_cv_make_support_nested_variables=no
5078 fi ;;
5079 esac
5080 fi
5081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5082 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5083 AM_BACKSLASH='\'
5084
5085 am__rm_f_notfound=
5086 if (rm -f && rm -fr && rm -rf) 2>/dev/null
5087 then :
5088
5089 else case e in #(
5090   e) am__rm_f_notfound='""' ;;
5091 esac
5092 fi
5093
5094
5095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
5096 printf %s "checking xargs -n works... " >&6; }
5097 if test ${am_cv_xargs_n_works+y}
5098 then :
5099   printf %s "(cached) " >&6
5100 else case e in #(
5101   e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
5102 3"
5103 then :
5104   am_cv_xargs_n_works=yes
5105 else case e in #(
5106   e) am_cv_xargs_n_works=no ;;
5107 esac
5108 fi ;;
5109 esac
5110 fi
5111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
5112 printf "%s\n" "$am_cv_xargs_n_works" >&6; }
5113 if test "$am_cv_xargs_n_works" = yes
5114 then :
5115   am__xargs_n='xargs -n'
5116 else case e in #(
5117   e)   am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
5118  ;;
5119 esac
5120 fi
5121
5122 if test "`cd $srcdir && pwd`" != "`pwd`"; then
5123   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5124   # is not polluted with repeated "-I."
5125   am__isrc=' -I$(srcdir)'
5126   # test to see if srcdir already configured
5127   if test -f $srcdir/config.status; then
5128     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5129   fi
5130 fi
5131
5132 # test whether we have cygpath
5133 if test -z "$CYGPATH_W"; then
5134   if (cygpath --version) >/dev/null 2>/dev/null; then
5135     CYGPATH_W='cygpath -w'
5136   else
5137     CYGPATH_W=echo
5138   fi
5139 fi
5140
5141
5142 # Define the identity of the package.
5143  PACKAGE='diffutils'
5144  VERSION='3.10'
5145
5146
5147 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5148
5149
5150 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5151
5152 # Some tools Automake needs.
5153
5154 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5155
5156
5157 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5158
5159
5160 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5161
5162
5163 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5164
5165
5166 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5167
5168 # For better backward compatibility.  To be removed once Automake 1.9.x
5169 # dies out for good.  For more background, see:
5170 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5171 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5172 mkdir_p='$(MKDIR_P)'
5173
5174 # We need awk for the "check" target (and possibly the TAP driver).  The
5175 # system "awk" is bad on some platforms.
5176 # Always define AMTAR for backward compatibility.  Yes, it's still used
5177 # in the wild :-(  We should find a proper way to deprecate it ...
5178 AMTAR='$${TAR-tar}'
5179
5180
5181 # We'll loop over all known methods to create a tar archive until one works.
5182 _am_tools='gnutar  pax cpio none'
5183
5184 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5185
5186
5187
5188
5189
5190 # Variables for tags utilities; see am/tags.am
5191 if test -z "$CTAGS"; then
5192   CTAGS=ctags
5193 fi
5194
5195 if test -z "$ETAGS"; then
5196   ETAGS=etags
5197 fi
5198
5199 if test -z "$CSCOPE"; then
5200   CSCOPE=cscope
5201 fi
5202
5203
5204
5205
5206
5207
5208
5209
5210 AM_DEFAULT_VERBOSITY=0 # make --enable-silent-rules the default.
5211
5212 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
5213
5214
5215 for ac_prog in gawk mawk nawk awk
5216 do
5217   # Extract the first word of "$ac_prog", so it can be a program name with args.
5218 set dummy $ac_prog; ac_word=$2
5219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5220 printf %s "checking for $ac_word... " >&6; }
5221 if test ${ac_cv_prog_AWK+y}
5222 then :
5223   printf %s "(cached) " >&6
5224 else case e in #(
5225   e) if test -n "$AWK"; then
5226   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5227 else
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229 for as_dir in $PATH
5230 do
5231   IFS=$as_save_IFS
5232   case $as_dir in #(((
5233     '') as_dir=./ ;;
5234     */) ;;
5235     *) as_dir=$as_dir/ ;;
5236   esac
5237     for ac_exec_ext in '' $ac_executable_extensions; do
5238   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5239     ac_cv_prog_AWK="$ac_prog"
5240     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5241     break 2
5242   fi
5243 done
5244   done
5245 IFS=$as_save_IFS
5246
5247 fi ;;
5248 esac
5249 fi
5250 AWK=$ac_cv_prog_AWK
5251 if test -n "$AWK"; then
5252   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5253 printf "%s\n" "$AWK" >&6; }
5254 else
5255   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256 printf "%s\n" "no" >&6; }
5257 fi
5258
5259
5260   test -n "$AWK" && break
5261 done
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272 ac_ext=c
5273 ac_cpp='$CPP $CPPFLAGS'
5274 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5275 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5276 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5277 if test -n "$ac_tool_prefix"; then
5278   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5279 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 printf %s "checking for $ac_word... " >&6; }
5282 if test ${ac_cv_prog_CC+y}
5283 then :
5284   printf %s "(cached) " >&6
5285 else case e in #(
5286   e) if test -n "$CC"; then
5287   ac_cv_prog_CC="$CC" # Let the user override the test.
5288 else
5289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290 for as_dir in $PATH
5291 do
5292   IFS=$as_save_IFS
5293   case $as_dir in #(((
5294     '') as_dir=./ ;;
5295     */) ;;
5296     *) as_dir=$as_dir/ ;;
5297   esac
5298     for ac_exec_ext in '' $ac_executable_extensions; do
5299   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5300     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5301     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5302     break 2
5303   fi
5304 done
5305   done
5306 IFS=$as_save_IFS
5307
5308 fi ;;
5309 esac
5310 fi
5311 CC=$ac_cv_prog_CC
5312 if test -n "$CC"; then
5313   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5314 printf "%s\n" "$CC" >&6; }
5315 else
5316   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317 printf "%s\n" "no" >&6; }
5318 fi
5319
5320
5321 fi
5322 if test -z "$ac_cv_prog_CC"; then
5323   ac_ct_CC=$CC
5324   # Extract the first word of "gcc", so it can be a program name with args.
5325 set dummy gcc; ac_word=$2
5326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327 printf %s "checking for $ac_word... " >&6; }
5328 if test ${ac_cv_prog_ac_ct_CC+y}
5329 then :
5330   printf %s "(cached) " >&6
5331 else case e in #(
5332   e) if test -n "$ac_ct_CC"; then
5333   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5334 else
5335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336 for as_dir in $PATH
5337 do
5338   IFS=$as_save_IFS
5339   case $as_dir in #(((
5340     '') as_dir=./ ;;
5341     */) ;;
5342     *) as_dir=$as_dir/ ;;
5343   esac
5344     for ac_exec_ext in '' $ac_executable_extensions; do
5345   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5346     ac_cv_prog_ac_ct_CC="gcc"
5347     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5348     break 2
5349   fi
5350 done
5351   done
5352 IFS=$as_save_IFS
5353
5354 fi ;;
5355 esac
5356 fi
5357 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5358 if test -n "$ac_ct_CC"; then
5359   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5360 printf "%s\n" "$ac_ct_CC" >&6; }
5361 else
5362   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363 printf "%s\n" "no" >&6; }
5364 fi
5365
5366   if test "x$ac_ct_CC" = x; then
5367     CC=""
5368   else
5369     case $cross_compiling:$ac_tool_warned in
5370 yes:)
5371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5372 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5373 ac_tool_warned=yes ;;
5374 esac
5375     CC=$ac_ct_CC
5376   fi
5377 else
5378   CC="$ac_cv_prog_CC"
5379 fi
5380
5381 if test -z "$CC"; then
5382           if test -n "$ac_tool_prefix"; then
5383     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5384 set dummy ${ac_tool_prefix}cc; ac_word=$2
5385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 printf %s "checking for $ac_word... " >&6; }
5387 if test ${ac_cv_prog_CC+y}
5388 then :
5389   printf %s "(cached) " >&6
5390 else case e in #(
5391   e) if test -n "$CC"; then
5392   ac_cv_prog_CC="$CC" # Let the user override the test.
5393 else
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395 for as_dir in $PATH
5396 do
5397   IFS=$as_save_IFS
5398   case $as_dir in #(((
5399     '') as_dir=./ ;;
5400     */) ;;
5401     *) as_dir=$as_dir/ ;;
5402   esac
5403     for ac_exec_ext in '' $ac_executable_extensions; do
5404   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5405     ac_cv_prog_CC="${ac_tool_prefix}cc"
5406     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5407     break 2
5408   fi
5409 done
5410   done
5411 IFS=$as_save_IFS
5412
5413 fi ;;
5414 esac
5415 fi
5416 CC=$ac_cv_prog_CC
5417 if test -n "$CC"; then
5418   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5419 printf "%s\n" "$CC" >&6; }
5420 else
5421   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422 printf "%s\n" "no" >&6; }
5423 fi
5424
5425
5426   fi
5427 fi
5428 if test -z "$CC"; then
5429   # Extract the first word of "cc", so it can be a program name with args.
5430 set dummy cc; ac_word=$2
5431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432 printf %s "checking for $ac_word... " >&6; }
5433 if test ${ac_cv_prog_CC+y}
5434 then :
5435   printf %s "(cached) " >&6
5436 else case e in #(
5437   e) if test -n "$CC"; then
5438   ac_cv_prog_CC="$CC" # Let the user override the test.
5439 else
5440   ac_prog_rejected=no
5441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5442 for as_dir in $PATH
5443 do
5444   IFS=$as_save_IFS
5445   case $as_dir in #(((
5446     '') as_dir=./ ;;
5447     */) ;;
5448     *) as_dir=$as_dir/ ;;
5449   esac
5450     for ac_exec_ext in '' $ac_executable_extensions; do
5451   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5452     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5453        ac_prog_rejected=yes
5454        continue
5455      fi
5456     ac_cv_prog_CC="cc"
5457     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5458     break 2
5459   fi
5460 done
5461   done
5462 IFS=$as_save_IFS
5463
5464 if test $ac_prog_rejected = yes; then
5465   # We found a bogon in the path, so make sure we never use it.
5466   set dummy $ac_cv_prog_CC
5467   shift
5468   if test $# != 0; then
5469     # We chose a different compiler from the bogus one.
5470     # However, it has the same basename, so the bogon will be chosen
5471     # first if we set CC to just the basename; use the full file name.
5472     shift
5473     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5474   fi
5475 fi
5476 fi ;;
5477 esac
5478 fi
5479 CC=$ac_cv_prog_CC
5480 if test -n "$CC"; then
5481   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5482 printf "%s\n" "$CC" >&6; }
5483 else
5484   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485 printf "%s\n" "no" >&6; }
5486 fi
5487
5488
5489 fi
5490 if test -z "$CC"; then
5491   if test -n "$ac_tool_prefix"; then
5492   for ac_prog in cl.exe
5493   do
5494     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5495 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497 printf %s "checking for $ac_word... " >&6; }
5498 if test ${ac_cv_prog_CC+y}
5499 then :
5500   printf %s "(cached) " >&6
5501 else case e in #(
5502   e) if test -n "$CC"; then
5503   ac_cv_prog_CC="$CC" # Let the user override the test.
5504 else
5505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506 for as_dir in $PATH
5507 do
5508   IFS=$as_save_IFS
5509   case $as_dir in #(((
5510     '') as_dir=./ ;;
5511     */) ;;
5512     *) as_dir=$as_dir/ ;;
5513   esac
5514     for ac_exec_ext in '' $ac_executable_extensions; do
5515   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5516     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5517     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5518     break 2
5519   fi
5520 done
5521   done
5522 IFS=$as_save_IFS
5523
5524 fi ;;
5525 esac
5526 fi
5527 CC=$ac_cv_prog_CC
5528 if test -n "$CC"; then
5529   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5530 printf "%s\n" "$CC" >&6; }
5531 else
5532   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5533 printf "%s\n" "no" >&6; }
5534 fi
5535
5536
5537     test -n "$CC" && break
5538   done
5539 fi
5540 if test -z "$CC"; then
5541   ac_ct_CC=$CC
5542   for ac_prog in cl.exe
5543 do
5544   # Extract the first word of "$ac_prog", so it can be a program name with args.
5545 set dummy $ac_prog; ac_word=$2
5546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547 printf %s "checking for $ac_word... " >&6; }
5548 if test ${ac_cv_prog_ac_ct_CC+y}
5549 then :
5550   printf %s "(cached) " >&6
5551 else case e in #(
5552   e) if test -n "$ac_ct_CC"; then
5553   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5554 else
5555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556 for as_dir in $PATH
5557 do
5558   IFS=$as_save_IFS
5559   case $as_dir in #(((
5560     '') as_dir=./ ;;
5561     */) ;;
5562     *) as_dir=$as_dir/ ;;
5563   esac
5564     for ac_exec_ext in '' $ac_executable_extensions; do
5565   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5566     ac_cv_prog_ac_ct_CC="$ac_prog"
5567     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5568     break 2
5569   fi
5570 done
5571   done
5572 IFS=$as_save_IFS
5573
5574 fi ;;
5575 esac
5576 fi
5577 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5578 if test -n "$ac_ct_CC"; then
5579   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5580 printf "%s\n" "$ac_ct_CC" >&6; }
5581 else
5582   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5583 printf "%s\n" "no" >&6; }
5584 fi
5585
5586
5587   test -n "$ac_ct_CC" && break
5588 done
5589
5590   if test "x$ac_ct_CC" = x; then
5591     CC=""
5592   else
5593     case $cross_compiling:$ac_tool_warned in
5594 yes:)
5595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5596 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5597 ac_tool_warned=yes ;;
5598 esac
5599     CC=$ac_ct_CC
5600   fi
5601 fi
5602
5603 fi
5604 if test -z "$CC"; then
5605   if test -n "$ac_tool_prefix"; then
5606   # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5607 set dummy ${ac_tool_prefix}clang; ac_word=$2
5608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609 printf %s "checking for $ac_word... " >&6; }
5610 if test ${ac_cv_prog_CC+y}
5611 then :
5612   printf %s "(cached) " >&6
5613 else case e in #(
5614   e) if test -n "$CC"; then
5615   ac_cv_prog_CC="$CC" # Let the user override the test.
5616 else
5617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618 for as_dir in $PATH
5619 do
5620   IFS=$as_save_IFS
5621   case $as_dir in #(((
5622     '') as_dir=./ ;;
5623     */) ;;
5624     *) as_dir=$as_dir/ ;;
5625   esac
5626     for ac_exec_ext in '' $ac_executable_extensions; do
5627   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5628     ac_cv_prog_CC="${ac_tool_prefix}clang"
5629     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5630     break 2
5631   fi
5632 done
5633   done
5634 IFS=$as_save_IFS
5635
5636 fi ;;
5637 esac
5638 fi
5639 CC=$ac_cv_prog_CC
5640 if test -n "$CC"; then
5641   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5642 printf "%s\n" "$CC" >&6; }
5643 else
5644   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645 printf "%s\n" "no" >&6; }
5646 fi
5647
5648
5649 fi
5650 if test -z "$ac_cv_prog_CC"; then
5651   ac_ct_CC=$CC
5652   # Extract the first word of "clang", so it can be a program name with args.
5653 set dummy clang; ac_word=$2
5654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655 printf %s "checking for $ac_word... " >&6; }
5656 if test ${ac_cv_prog_ac_ct_CC+y}
5657 then :
5658   printf %s "(cached) " >&6
5659 else case e in #(
5660   e) if test -n "$ac_ct_CC"; then
5661   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5662 else
5663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664 for as_dir in $PATH
5665 do
5666   IFS=$as_save_IFS
5667   case $as_dir in #(((
5668     '') as_dir=./ ;;
5669     */) ;;
5670     *) as_dir=$as_dir/ ;;
5671   esac
5672     for ac_exec_ext in '' $ac_executable_extensions; do
5673   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5674     ac_cv_prog_ac_ct_CC="clang"
5675     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5676     break 2
5677   fi
5678 done
5679   done
5680 IFS=$as_save_IFS
5681
5682 fi ;;
5683 esac
5684 fi
5685 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5686 if test -n "$ac_ct_CC"; then
5687   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5688 printf "%s\n" "$ac_ct_CC" >&6; }
5689 else
5690   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 printf "%s\n" "no" >&6; }
5692 fi
5693
5694   if test "x$ac_ct_CC" = x; then
5695     CC=""
5696   else
5697     case $cross_compiling:$ac_tool_warned in
5698 yes:)
5699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5700 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5701 ac_tool_warned=yes ;;
5702 esac
5703     CC=$ac_ct_CC
5704   fi
5705 else
5706   CC="$ac_cv_prog_CC"
5707 fi
5708
5709 fi
5710
5711
5712 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5713 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5714 as_fn_error $? "no acceptable C compiler found in \$PATH
5715 See 'config.log' for more details" "$LINENO" 5; }
5716
5717 # Provide some information about the compiler.
5718 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5719 set X $ac_compile
5720 ac_compiler=$2
5721 for ac_option in --version -v -V -qversion -version; do
5722   { { ac_try="$ac_compiler $ac_option >&5"
5723 case "(($ac_try" in
5724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725   *) ac_try_echo=$ac_try;;
5726 esac
5727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5728 printf "%s\n" "$ac_try_echo"; } >&5
5729   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5730   ac_status=$?
5731   if test -s conftest.err; then
5732     sed '10a\
5733 ... rest of stderr output deleted ...
5734          10q' conftest.err >conftest.er1
5735     cat conftest.er1 >&5
5736   fi
5737   rm -f conftest.er1 conftest.err
5738   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5739   test $ac_status = 0; }
5740 done
5741
5742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5743 /* end confdefs.h.  */
5744
5745 int
5746 main (void)
5747 {
5748
5749   ;
5750   return 0;
5751 }
5752 _ACEOF
5753 ac_clean_files_save=$ac_clean_files
5754 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5755 # Try to create an executable without -o first, disregard a.out.
5756 # It will help us diagnose broken compilers, and finding out an intuition
5757 # of exeext.
5758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5759 printf %s "checking whether the C compiler works... " >&6; }
5760 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5761
5762 # The possible output files:
5763 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5764
5765 ac_rmfiles=
5766 for ac_file in $ac_files
5767 do
5768   case $ac_file in
5769     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5770     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5771   esac
5772 done
5773 rm -f $ac_rmfiles
5774
5775 if { { ac_try="$ac_link_default"
5776 case "(($ac_try" in
5777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5778   *) ac_try_echo=$ac_try;;
5779 esac
5780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5781 printf "%s\n" "$ac_try_echo"; } >&5
5782   (eval "$ac_link_default") 2>&5
5783   ac_status=$?
5784   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5785   test $ac_status = 0; }
5786 then :
5787   # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
5788 # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
5789 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5790 # so that the user can short-circuit this test for compilers unknown to
5791 # Autoconf.
5792 for ac_file in $ac_files ''
5793 do
5794   test -f "$ac_file" || continue
5795   case $ac_file in
5796     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5797         ;;
5798     [ab].out )
5799         # We found the default executable, but exeext='' is most
5800         # certainly right.
5801         break;;
5802     *.* )
5803         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5804         then :; else
5805            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5806         fi
5807         # We set ac_cv_exeext here because the later test for it is not
5808         # safe: cross compilers may not add the suffix if given an '-o'
5809         # argument, so we may need to know it at that point already.
5810         # Even if this section looks crufty: it has the advantage of
5811         # actually working.
5812         break;;
5813     * )
5814         break;;
5815   esac
5816 done
5817 test "$ac_cv_exeext" = no && ac_cv_exeext=
5818
5819 else case e in #(
5820   e) ac_file='' ;;
5821 esac
5822 fi
5823 if test -z "$ac_file"
5824 then :
5825   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826 printf "%s\n" "no" >&6; }
5827 printf "%s\n" "$as_me: failed program was:" >&5
5828 sed 's/^/| /' conftest.$ac_ext >&5
5829
5830 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5831 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5832 as_fn_error 77 "C compiler cannot create executables
5833 See 'config.log' for more details" "$LINENO" 5; }
5834 else case e in #(
5835   e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5836 printf "%s\n" "yes" >&6; } ;;
5837 esac
5838 fi
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5840 printf %s "checking for C compiler default output file name... " >&6; }
5841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5842 printf "%s\n" "$ac_file" >&6; }
5843 ac_exeext=$ac_cv_exeext
5844
5845 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5846 ac_clean_files=$ac_clean_files_save
5847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5848 printf %s "checking for suffix of executables... " >&6; }
5849 if { { ac_try="$ac_link"
5850 case "(($ac_try" in
5851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5852   *) ac_try_echo=$ac_try;;
5853 esac
5854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5855 printf "%s\n" "$ac_try_echo"; } >&5
5856   (eval "$ac_link") 2>&5
5857   ac_status=$?
5858   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5859   test $ac_status = 0; }
5860 then :
5861   # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
5862 # catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
5863 # work properly (i.e., refer to 'conftest.exe'), while it won't with
5864 # 'rm'.
5865 for ac_file in conftest.exe conftest conftest.*; do
5866   test -f "$ac_file" || continue
5867   case $ac_file in
5868     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5869     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5870           break;;
5871     * ) break;;
5872   esac
5873 done
5874 else case e in #(
5875   e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5876 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5877 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5878 See 'config.log' for more details" "$LINENO" 5; } ;;
5879 esac
5880 fi
5881 rm -f conftest conftest$ac_cv_exeext
5882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5883 printf "%s\n" "$ac_cv_exeext" >&6; }
5884
5885 rm -f conftest.$ac_ext
5886 EXEEXT=$ac_cv_exeext
5887 ac_exeext=$EXEEXT
5888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5889 /* end confdefs.h.  */
5890 #include <stdio.h>
5891 int
5892 main (void)
5893 {
5894 FILE *f = fopen ("conftest.out", "w");
5895  return ferror (f) || fclose (f) != 0;
5896
5897   ;
5898   return 0;
5899 }
5900 _ACEOF
5901 ac_clean_files="$ac_clean_files conftest.out"
5902 # Check that the compiler produces executables we can run.  If not, either
5903 # the compiler is broken, or we cross compile.
5904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5905 printf %s "checking whether we are cross compiling... " >&6; }
5906 if test "$cross_compiling" != yes; then
5907   { { ac_try="$ac_link"
5908 case "(($ac_try" in
5909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5910   *) ac_try_echo=$ac_try;;
5911 esac
5912 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5913 printf "%s\n" "$ac_try_echo"; } >&5
5914   (eval "$ac_link") 2>&5
5915   ac_status=$?
5916   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5917   test $ac_status = 0; }
5918   if { ac_try='./conftest$ac_cv_exeext'
5919   { { case "(($ac_try" in
5920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921   *) ac_try_echo=$ac_try;;
5922 esac
5923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5924 printf "%s\n" "$ac_try_echo"; } >&5
5925   (eval "$ac_try") 2>&5
5926   ac_status=$?
5927   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5928   test $ac_status = 0; }; }; then
5929     cross_compiling=no
5930   else
5931     if test "$cross_compiling" = maybe; then
5932         cross_compiling=yes
5933     else
5934         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5935 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5936 as_fn_error 77 "cannot run C compiled programs.
5937 If you meant to cross compile, use '--host'.
5938 See 'config.log' for more details" "$LINENO" 5; }
5939     fi
5940   fi
5941 fi
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5943 printf "%s\n" "$cross_compiling" >&6; }
5944
5945 rm -f conftest.$ac_ext conftest$ac_cv_exeext \
5946   conftest.o conftest.obj conftest.out
5947 ac_clean_files=$ac_clean_files_save
5948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5949 printf %s "checking for suffix of object files... " >&6; }
5950 if test ${ac_cv_objext+y}
5951 then :
5952   printf %s "(cached) " >&6
5953 else case e in #(
5954   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955 /* end confdefs.h.  */
5956
5957 int
5958 main (void)
5959 {
5960
5961   ;
5962   return 0;
5963 }
5964 _ACEOF
5965 rm -f conftest.o conftest.obj
5966 if { { ac_try="$ac_compile"
5967 case "(($ac_try" in
5968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5969   *) ac_try_echo=$ac_try;;
5970 esac
5971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5972 printf "%s\n" "$ac_try_echo"; } >&5
5973   (eval "$ac_compile") 2>&5
5974   ac_status=$?
5975   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5976   test $ac_status = 0; }
5977 then :
5978   for ac_file in conftest.o conftest.obj conftest.*; do
5979   test -f "$ac_file" || continue;
5980   case $ac_file in
5981     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5982     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5983        break;;
5984   esac
5985 done
5986 else case e in #(
5987   e) printf "%s\n" "$as_me: failed program was:" >&5
5988 sed 's/^/| /' conftest.$ac_ext >&5
5989
5990 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5991 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5992 as_fn_error $? "cannot compute suffix of object files: cannot compile
5993 See 'config.log' for more details" "$LINENO" 5; } ;;
5994 esac
5995 fi
5996 rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
5997 esac
5998 fi
5999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6000 printf "%s\n" "$ac_cv_objext" >&6; }
6001 OBJEXT=$ac_cv_objext
6002 ac_objext=$OBJEXT
6003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
6004 printf %s "checking whether the compiler supports GNU C... " >&6; }
6005 if test ${ac_cv_c_compiler_gnu+y}
6006 then :
6007   printf %s "(cached) " >&6
6008 else case e in #(
6009   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6010 /* end confdefs.h.  */
6011
6012 int
6013 main (void)
6014 {
6015 #ifndef __GNUC__
6016        choke me
6017 #endif
6018
6019   ;
6020   return 0;
6021 }
6022 _ACEOF
6023 if ac_fn_c_try_compile "$LINENO"
6024 then :
6025   ac_compiler_gnu=yes
6026 else case e in #(
6027   e) ac_compiler_gnu=no ;;
6028 esac
6029 fi
6030 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6031 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6032  ;;
6033 esac
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 case e in #(
6052   e) 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 case e in #(
6071   e) 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 case e in #(
6087   e) 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 esac
6106 fi
6107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6108 esac
6109 fi
6110 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6111    ac_c_werror_flag=$ac_save_c_werror_flag ;;
6112 esac
6113 fi
6114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6115 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
6116 if test $ac_test_CFLAGS; then
6117   CFLAGS=$ac_save_CFLAGS
6118 elif test $ac_cv_prog_cc_g = yes; then
6119   if test "$GCC" = yes; then
6120     CFLAGS="-g -O2"
6121   else
6122     CFLAGS="-g"
6123   fi
6124 else
6125   if test "$GCC" = yes; then
6126     CFLAGS="-O2"
6127   else
6128     CFLAGS=
6129   fi
6130 fi
6131 ac_prog_cc_stdc=no
6132 if test x$ac_prog_cc_stdc = xno
6133 then :
6134   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6135 printf %s "checking for $CC option to enable C11 features... " >&6; }
6136 if test ${ac_cv_prog_cc_c11+y}
6137 then :
6138   printf %s "(cached) " >&6
6139 else case e in #(
6140   e) ac_cv_prog_cc_c11=no
6141 ac_save_CC=$CC
6142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h.  */
6144 $ac_c_conftest_c11_program
6145 _ACEOF
6146 for ac_arg in '' -std=gnu11
6147 do
6148   CC="$ac_save_CC $ac_arg"
6149   if ac_fn_c_try_compile "$LINENO"
6150 then :
6151   ac_cv_prog_cc_c11=$ac_arg
6152 fi
6153 rm -f core conftest.err conftest.$ac_objext conftest.beam
6154   test "x$ac_cv_prog_cc_c11" != "xno" && break
6155 done
6156 rm -f conftest.$ac_ext
6157 CC=$ac_save_CC ;;
6158 esac
6159 fi
6160
6161 if test "x$ac_cv_prog_cc_c11" = xno
6162 then :
6163   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6164 printf "%s\n" "unsupported" >&6; }
6165 else case e in #(
6166   e) if test "x$ac_cv_prog_cc_c11" = x
6167 then :
6168   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6169 printf "%s\n" "none needed" >&6; }
6170 else case e in #(
6171   e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6172 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6173      CC="$CC $ac_cv_prog_cc_c11" ;;
6174 esac
6175 fi
6176   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6177   ac_prog_cc_stdc=c11 ;;
6178 esac
6179 fi
6180 fi
6181 if test x$ac_prog_cc_stdc = xno
6182 then :
6183   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6184 printf %s "checking for $CC option to enable C99 features... " >&6; }
6185 if test ${ac_cv_prog_cc_c99+y}
6186 then :
6187   printf %s "(cached) " >&6
6188 else case e in #(
6189   e) ac_cv_prog_cc_c99=no
6190 ac_save_CC=$CC
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h.  */
6193 $ac_c_conftest_c99_program
6194 _ACEOF
6195 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6196 do
6197   CC="$ac_save_CC $ac_arg"
6198   if ac_fn_c_try_compile "$LINENO"
6199 then :
6200   ac_cv_prog_cc_c99=$ac_arg
6201 fi
6202 rm -f core conftest.err conftest.$ac_objext conftest.beam
6203   test "x$ac_cv_prog_cc_c99" != "xno" && break
6204 done
6205 rm -f conftest.$ac_ext
6206 CC=$ac_save_CC ;;
6207 esac
6208 fi
6209
6210 if test "x$ac_cv_prog_cc_c99" = xno
6211 then :
6212   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6213 printf "%s\n" "unsupported" >&6; }
6214 else case e in #(
6215   e) if test "x$ac_cv_prog_cc_c99" = x
6216 then :
6217   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6218 printf "%s\n" "none needed" >&6; }
6219 else case e in #(
6220   e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6221 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6222      CC="$CC $ac_cv_prog_cc_c99" ;;
6223 esac
6224 fi
6225   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6226   ac_prog_cc_stdc=c99 ;;
6227 esac
6228 fi
6229 fi
6230 if test x$ac_prog_cc_stdc = xno
6231 then :
6232   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6233 printf %s "checking for $CC option to enable C89 features... " >&6; }
6234 if test ${ac_cv_prog_cc_c89+y}
6235 then :
6236   printf %s "(cached) " >&6
6237 else case e in #(
6238   e) ac_cv_prog_cc_c89=no
6239 ac_save_CC=$CC
6240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6241 /* end confdefs.h.  */
6242 $ac_c_conftest_c89_program
6243 _ACEOF
6244 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6245 do
6246   CC="$ac_save_CC $ac_arg"
6247   if ac_fn_c_try_compile "$LINENO"
6248 then :
6249   ac_cv_prog_cc_c89=$ac_arg
6250 fi
6251 rm -f core conftest.err conftest.$ac_objext conftest.beam
6252   test "x$ac_cv_prog_cc_c89" != "xno" && break
6253 done
6254 rm -f conftest.$ac_ext
6255 CC=$ac_save_CC ;;
6256 esac
6257 fi
6258
6259 if test "x$ac_cv_prog_cc_c89" = xno
6260 then :
6261   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6262 printf "%s\n" "unsupported" >&6; }
6263 else case e in #(
6264   e) if test "x$ac_cv_prog_cc_c89" = x
6265 then :
6266   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6267 printf "%s\n" "none needed" >&6; }
6268 else case e in #(
6269   e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6270 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6271      CC="$CC $ac_cv_prog_cc_c89" ;;
6272 esac
6273 fi
6274   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6275   ac_prog_cc_stdc=c89 ;;
6276 esac
6277 fi
6278 fi
6279
6280 ac_ext=c
6281 ac_cpp='$CPP $CPPFLAGS'
6282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6285
6286
6287   ac_ext=c
6288 ac_cpp='$CPP $CPPFLAGS'
6289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6293 printf %s "checking whether $CC understands -c and -o together... " >&6; }
6294 if test ${am_cv_prog_cc_c_o+y}
6295 then :
6296   printf %s "(cached) " >&6
6297 else case e in #(
6298   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6299 /* end confdefs.h.  */
6300
6301 int
6302 main (void)
6303 {
6304
6305   ;
6306   return 0;
6307 }
6308 _ACEOF
6309   # Make sure it works both with $CC and with simple cc.
6310   # Following AC_PROG_CC_C_O, we do the test twice because some
6311   # compilers refuse to overwrite an existing .o file with -o,
6312   # though they will create one.
6313   am_cv_prog_cc_c_o=yes
6314   for am_i in 1 2; do
6315     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6316    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6317    ac_status=$?
6318    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319    (exit $ac_status); } \
6320          && test -f conftest2.$ac_objext; then
6321       : OK
6322     else
6323       am_cv_prog_cc_c_o=no
6324       break
6325     fi
6326   done
6327   rm -f core conftest*
6328   unset am_i ;;
6329 esac
6330 fi
6331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6332 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6333 if test "$am_cv_prog_cc_c_o" != yes; then
6334    # Losing compiler, so override with the script.
6335    # FIXME: It is wrong to rewrite CC.
6336    # But if we don't then we get into trouble of one sort or another.
6337    # A longer-term fix would be to have automake use am__CC in this case,
6338    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6339    CC="$am_aux_dir/compile $CC"
6340 fi
6341 ac_ext=c
6342 ac_cpp='$CPP $CPPFLAGS'
6343 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6344 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6345 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6346
6347
6348
6349   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6350 printf %s "checking whether the compiler is clang... " >&6; }
6351 if test ${gl_cv_compiler_clang+y}
6352 then :
6353   printf %s "(cached) " >&6
6354 else case e in #(
6355   e)                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h.  */
6357
6358            #ifdef __clang__
6359            barfbarf
6360            #endif
6361
6362 int
6363 main (void)
6364 {
6365
6366   ;
6367   return 0;
6368 }
6369
6370 _ACEOF
6371 if ac_fn_c_try_compile "$LINENO"
6372 then :
6373   gl_cv_compiler_clang=no
6374 else case e in #(
6375   e) gl_cv_compiler_clang=yes ;;
6376 esac
6377 fi
6378 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6379      ;;
6380 esac
6381 fi
6382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6383 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6384
6385
6386   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6387 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6388 if test ${gl_cv_compiler_check_decl_option+y}
6389 then :
6390   printf %s "(cached) " >&6
6391 else case e in #(
6392   e) if test $gl_cv_compiler_clang = yes; then
6393                      save_ac_compile="$ac_compile"
6394        ac_compile="$ac_compile -Werror=implicit-function-declaration"
6395                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396 /* end confdefs.h.  */
6397
6398 int
6399 main (void)
6400 {
6401
6402   ;
6403   return 0;
6404 }
6405 _ACEOF
6406 if ac_fn_c_try_compile "$LINENO"
6407 then :
6408   gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6409 else case e in #(
6410   e) gl_cv_compiler_check_decl_option=none ;;
6411 esac
6412 fi
6413 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6414        ac_compile="$save_ac_compile"
6415      else
6416        gl_cv_compiler_check_decl_option=none
6417      fi
6418      ;;
6419 esac
6420 fi
6421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6422 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6423   if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6424     ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6425   else
6426     ac_compile_for_check_decl="$ac_compile"
6427   fi
6428
6429 DEPDIR="${am__leading_dot}deps"
6430
6431 ac_config_commands="$ac_config_commands depfiles"
6432
6433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6434 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6435 cat > confinc.mk << 'END'
6436 am__doit:
6437         @echo this is the am__doit target >confinc.out
6438 .PHONY: am__doit
6439 END
6440 am__include="#"
6441 am__quote=
6442 # BSD make does it like this.
6443 echo '.include "confinc.mk" # ignored' > confmf.BSD
6444 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6445 echo 'include confinc.mk # ignored' > confmf.GNU
6446 _am_result=no
6447 for s in GNU BSD; do
6448   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6449    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6450    ac_status=$?
6451    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452    (exit $ac_status); }
6453   case $?:`cat confinc.out 2>/dev/null` in #(
6454   '0:this is the am__doit target') :
6455     case $s in #(
6456   BSD) :
6457     am__include='.include' am__quote='"' ;; #(
6458   *) :
6459     am__include='include' am__quote='' ;;
6460 esac ;; #(
6461   *) :
6462      ;;
6463 esac
6464   if test "$am__include" != "#"; then
6465     _am_result="yes ($s style)"
6466     break
6467   fi
6468 done
6469 rm -f confinc.* confmf.*
6470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6471 printf "%s\n" "${_am_result}" >&6; }
6472
6473 # Check whether --enable-dependency-tracking was given.
6474 if test ${enable_dependency_tracking+y}
6475 then :
6476   enableval=$enable_dependency_tracking;
6477 fi
6478
6479 if test "x$enable_dependency_tracking" != xno; then
6480   am_depcomp="$ac_aux_dir/depcomp"
6481   AMDEPBACKSLASH='\'
6482   am__nodep='_no'
6483 fi
6484  if test "x$enable_dependency_tracking" != xno; then
6485   AMDEP_TRUE=
6486   AMDEP_FALSE='#'
6487 else
6488   AMDEP_TRUE='#'
6489   AMDEP_FALSE=
6490 fi
6491
6492
6493
6494 depcc="$CC"   am_compiler_list=
6495
6496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6497 printf %s "checking dependency style of $depcc... " >&6; }
6498 if test ${am_cv_CC_dependencies_compiler_type+y}
6499 then :
6500   printf %s "(cached) " >&6
6501 else case e in #(
6502   e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6503   # We make a subdir and do the tests there.  Otherwise we can end up
6504   # making bogus files that we don't know about and never remove.  For
6505   # instance it was reported that on HP-UX the gcc test will end up
6506   # making a dummy file named 'D' -- because '-MD' means "put the output
6507   # in D".
6508   rm -rf conftest.dir
6509   mkdir conftest.dir
6510   # Copy depcomp to subdir because otherwise we won't find it if we're
6511   # using a relative directory.
6512   cp "$am_depcomp" conftest.dir
6513   cd conftest.dir
6514   # We will build objects and dependencies in a subdirectory because
6515   # it helps to detect inapplicable dependency modes.  For instance
6516   # both Tru64's cc and ICC support -MD to output dependencies as a
6517   # side effect of compilation, but ICC will put the dependencies in
6518   # the current directory while Tru64 will put them in the object
6519   # directory.
6520   mkdir sub
6521
6522   am_cv_CC_dependencies_compiler_type=none
6523   if test "$am_compiler_list" = ""; then
6524      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6525   fi
6526   am__universal=false
6527   case " $depcc " in #(
6528      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6529      esac
6530
6531   for depmode in $am_compiler_list; do
6532     # Setup a source with many dependencies, because some compilers
6533     # like to wrap large dependency lists on column 80 (with \), and
6534     # we should not choose a depcomp mode which is confused by this.
6535     #
6536     # We need to recreate these files for each test, as the compiler may
6537     # overwrite some of them when testing with obscure command lines.
6538     # This happens at least with the AIX C compiler.
6539     : > sub/conftest.c
6540     for i in 1 2 3 4 5 6; do
6541       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6542       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6543       # Solaris 10 /bin/sh.
6544       echo '/* dummy */' > sub/conftst$i.h
6545     done
6546     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6547
6548     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6549     # mode.  It turns out that the SunPro C++ compiler does not properly
6550     # handle '-M -o', and we need to detect this.  Also, some Intel
6551     # versions had trouble with output in subdirs.
6552     am__obj=sub/conftest.${OBJEXT-o}
6553     am__minus_obj="-o $am__obj"
6554     case $depmode in
6555     gcc)
6556       # This depmode causes a compiler race in universal mode.
6557       test "$am__universal" = false || continue
6558       ;;
6559     nosideeffect)
6560       # After this tag, mechanisms are not by side-effect, so they'll
6561       # only be used when explicitly requested.
6562       if test "x$enable_dependency_tracking" = xyes; then
6563         continue
6564       else
6565         break
6566       fi
6567       ;;
6568     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6569       # This compiler won't grok '-c -o', but also, the minuso test has
6570       # not run yet.  These depmodes are late enough in the game, and
6571       # so weak that their functioning should not be impacted.
6572       am__obj=conftest.${OBJEXT-o}
6573       am__minus_obj=
6574       ;;
6575     none) break ;;
6576     esac
6577     if depmode=$depmode \
6578        source=sub/conftest.c object=$am__obj \
6579        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6580        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6581          >/dev/null 2>conftest.err &&
6582        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6583        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6584        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6585        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6586       # icc doesn't choke on unknown options, it will just issue warnings
6587       # or remarks (even with -Werror).  So we grep stderr for any message
6588       # that says an option was ignored or not supported.
6589       # When given -MP, icc 7.0 and 7.1 complain thusly:
6590       #   icc: Command line warning: ignoring option '-M'; no argument required
6591       # The diagnosis changed in icc 8.0:
6592       #   icc: Command line remark: option '-MP' not supported
6593       if (grep 'ignoring option' conftest.err ||
6594           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6595         am_cv_CC_dependencies_compiler_type=$depmode
6596         break
6597       fi
6598     fi
6599   done
6600
6601   cd ..
6602   rm -rf conftest.dir
6603 else
6604   am_cv_CC_dependencies_compiler_type=none
6605 fi
6606  ;;
6607 esac
6608 fi
6609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6610 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6611 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6612
6613  if
6614   test "x$enable_dependency_tracking" != xno \
6615   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6616   am__fastdepCC_TRUE=
6617   am__fastdepCC_FALSE='#'
6618 else
6619   am__fastdepCC_TRUE='#'
6620   am__fastdepCC_FALSE=
6621 fi
6622
6623
6624
6625
6626 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
6627
6628 if test -n "$ac_tool_prefix"; then
6629   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6630 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632 printf %s "checking for $ac_word... " >&6; }
6633 if test ${ac_cv_prog_RANLIB+y}
6634 then :
6635   printf %s "(cached) " >&6
6636 else case e in #(
6637   e) if test -n "$RANLIB"; then
6638   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6639 else
6640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641 for as_dir in $PATH
6642 do
6643   IFS=$as_save_IFS
6644   case $as_dir in #(((
6645     '') as_dir=./ ;;
6646     */) ;;
6647     *) as_dir=$as_dir/ ;;
6648   esac
6649     for ac_exec_ext in '' $ac_executable_extensions; do
6650   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6651     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6652     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6653     break 2
6654   fi
6655 done
6656   done
6657 IFS=$as_save_IFS
6658
6659 fi ;;
6660 esac
6661 fi
6662 RANLIB=$ac_cv_prog_RANLIB
6663 if test -n "$RANLIB"; then
6664   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6665 printf "%s\n" "$RANLIB" >&6; }
6666 else
6667   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668 printf "%s\n" "no" >&6; }
6669 fi
6670
6671
6672 fi
6673 if test -z "$ac_cv_prog_RANLIB"; then
6674   ac_ct_RANLIB=$RANLIB
6675   # Extract the first word of "ranlib", so it can be a program name with args.
6676 set dummy ranlib; ac_word=$2
6677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678 printf %s "checking for $ac_word... " >&6; }
6679 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6680 then :
6681   printf %s "(cached) " >&6
6682 else case e in #(
6683   e) if test -n "$ac_ct_RANLIB"; then
6684   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6685 else
6686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   case $as_dir in #(((
6691     '') as_dir=./ ;;
6692     */) ;;
6693     *) as_dir=$as_dir/ ;;
6694   esac
6695     for ac_exec_ext in '' $ac_executable_extensions; do
6696   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6697     ac_cv_prog_ac_ct_RANLIB="ranlib"
6698     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6699     break 2
6700   fi
6701 done
6702   done
6703 IFS=$as_save_IFS
6704
6705 fi ;;
6706 esac
6707 fi
6708 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6709 if test -n "$ac_ct_RANLIB"; then
6710   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6711 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6712 else
6713   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 printf "%s\n" "no" >&6; }
6715 fi
6716
6717   if test "x$ac_ct_RANLIB" = x; then
6718     RANLIB=":"
6719   else
6720     case $cross_compiling:$ac_tool_warned in
6721 yes:)
6722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6723 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6724 ac_tool_warned=yes ;;
6725 esac
6726     RANLIB=$ac_ct_RANLIB
6727   fi
6728 else
6729   RANLIB="$ac_cv_prog_RANLIB"
6730 fi
6731
6732
6733 ac_header= ac_cache=
6734 for ac_item in $ac_header_c_list
6735 do
6736   if test $ac_cache; then
6737     ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6738     if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6739       printf "%s\n" "#define $ac_item 1" >> confdefs.h
6740     fi
6741     ac_header= ac_cache=
6742   elif test $ac_header; then
6743     ac_cache=$ac_item
6744   else
6745     ac_header=$ac_item
6746   fi
6747 done
6748
6749
6750
6751
6752
6753
6754
6755
6756 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6757 then :
6758
6759 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6760
6761 fi
6762
6763
6764
6765
6766
6767
6768   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6769 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6770 if test ${ac_cv_safe_to_define___extensions__+y}
6771 then :
6772   printf %s "(cached) " >&6
6773 else case e in #(
6774   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6775 /* end confdefs.h.  */
6776
6777 #         define __EXTENSIONS__ 1
6778           $ac_includes_default
6779 int
6780 main (void)
6781 {
6782
6783   ;
6784   return 0;
6785 }
6786 _ACEOF
6787 if ac_fn_c_try_compile "$LINENO"
6788 then :
6789   ac_cv_safe_to_define___extensions__=yes
6790 else case e in #(
6791   e) ac_cv_safe_to_define___extensions__=no ;;
6792 esac
6793 fi
6794 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6795 esac
6796 fi
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6798 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6799
6800   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6801 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6802 if test ${ac_cv_should_define__xopen_source+y}
6803 then :
6804   printf %s "(cached) " >&6
6805 else case e in #(
6806   e) ac_cv_should_define__xopen_source=no
6807     if test $ac_cv_header_wchar_h = yes
6808 then :
6809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h.  */
6811
6812           #include <wchar.h>
6813           mbstate_t x;
6814 int
6815 main (void)
6816 {
6817
6818   ;
6819   return 0;
6820 }
6821 _ACEOF
6822 if ac_fn_c_try_compile "$LINENO"
6823 then :
6824
6825 else case e in #(
6826   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6827 /* end confdefs.h.  */
6828
6829             #define _XOPEN_SOURCE 500
6830             #include <wchar.h>
6831             mbstate_t x;
6832 int
6833 main (void)
6834 {
6835
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 if ac_fn_c_try_compile "$LINENO"
6841 then :
6842   ac_cv_should_define__xopen_source=yes
6843 fi
6844 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6845 esac
6846 fi
6847 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6848 fi ;;
6849 esac
6850 fi
6851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6852 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6853
6854   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6855
6856   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6857
6858   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6859
6860   printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6861
6862   printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6863
6864   printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6865
6866   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6867
6868   printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6869
6870   printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6871
6872   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6873
6874   printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
6875
6876   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6877
6878   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6879
6880   printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6881
6882   printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6883
6884   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6885
6886   if test $ac_cv_header_minix_config_h = yes
6887 then :
6888   MINIX=yes
6889     printf "%s\n" "#define _MINIX 1" >>confdefs.h
6890
6891     printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6892
6893     printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6894
6895 else case e in #(
6896   e) MINIX= ;;
6897 esac
6898 fi
6899   if test $ac_cv_safe_to_define___extensions__ = yes
6900 then :
6901   printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6902
6903 fi
6904   if test $ac_cv_should_define__xopen_source = yes
6905 then :
6906   printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6907
6908 fi
6909
6910
6911
6912   # Make sure we can run config.sub.
6913 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6914   as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6915
6916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6917 printf %s "checking build system type... " >&6; }
6918 if test ${ac_cv_build+y}
6919 then :
6920   printf %s "(cached) " >&6
6921 else case e in #(
6922   e) ac_build_alias=$build_alias
6923 test "x$ac_build_alias" = x &&
6924   ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6925 test "x$ac_build_alias" = x &&
6926   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6927 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6928   as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6929  ;;
6930 esac
6931 fi
6932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6933 printf "%s\n" "$ac_cv_build" >&6; }
6934 case $ac_cv_build in
6935 *-*-*) ;;
6936 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6937 esac
6938 build=$ac_cv_build
6939 ac_save_IFS=$IFS; IFS='-'
6940 set x $ac_cv_build
6941 shift
6942 build_cpu=$1
6943 build_vendor=$2
6944 shift; shift
6945 # Remember, the first character of IFS is used to create $*,
6946 # except with old shells:
6947 build_os=$*
6948 IFS=$ac_save_IFS
6949 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6950
6951
6952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6953 printf %s "checking host system type... " >&6; }
6954 if test ${ac_cv_host+y}
6955 then :
6956   printf %s "(cached) " >&6
6957 else case e in #(
6958   e) if test "x$host_alias" = x; then
6959   ac_cv_host=$ac_cv_build
6960 else
6961   ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6962     as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6963 fi
6964  ;;
6965 esac
6966 fi
6967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6968 printf "%s\n" "$ac_cv_host" >&6; }
6969 case $ac_cv_host in
6970 *-*-*) ;;
6971 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6972 esac
6973 host=$ac_cv_host
6974 ac_save_IFS=$IFS; IFS='-'
6975 set x $ac_cv_host
6976 shift
6977 host_cpu=$1
6978 host_vendor=$2
6979 shift; shift
6980 # Remember, the first character of IFS is used to create $*,
6981 # except with old shells:
6982 host_os=$*
6983 IFS=$ac_save_IFS
6984 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6985
6986
6987
6988
6989
6990
6991   case "$host_os" in
6992     openbsd*)
6993
6994 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6995
6996       ;;
6997   esac
6998
6999 ac_ext=c
7000 ac_cpp='$CPP $CPPFLAGS'
7001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7005 printf %s "checking how to run the C preprocessor... " >&6; }
7006 # On Suns, sometimes $CPP names a directory.
7007 if test -n "$CPP" && test -d "$CPP"; then
7008   CPP=
7009 fi
7010 if test -z "$CPP"; then
7011   if test ${ac_cv_prog_CPP+y}
7012 then :
7013   printf %s "(cached) " >&6
7014 else case e in #(
7015   e)     # Double quotes because $CC needs to be expanded
7016     for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
7017     do
7018       ac_preproc_ok=false
7019 for ac_c_preproc_warn_flag in '' yes
7020 do
7021   # Use a header file that comes with gcc, so configuring glibc
7022   # with a fresh cross-compiler works.
7023   # On the NeXT, cc -E runs the code through the compiler's parser,
7024   # not just through cpp. "Syntax error" is here to catch this case.
7025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026 /* end confdefs.h.  */
7027 #include <limits.h>
7028                      Syntax error
7029 _ACEOF
7030 if ac_fn_c_try_cpp "$LINENO"
7031 then :
7032
7033 else case e in #(
7034   e) # Broken: fails on valid input.
7035 continue ;;
7036 esac
7037 fi
7038 rm -f conftest.err conftest.i conftest.$ac_ext
7039
7040   # OK, works on sane cases.  Now check whether nonexistent headers
7041   # can be detected and how.
7042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h.  */
7044 #include <ac_nonexistent.h>
7045 _ACEOF
7046 if ac_fn_c_try_cpp "$LINENO"
7047 then :
7048   # Broken: success on invalid input.
7049 continue
7050 else case e in #(
7051   e) # Passes both tests.
7052 ac_preproc_ok=:
7053 break ;;
7054 esac
7055 fi
7056 rm -f conftest.err conftest.i conftest.$ac_ext
7057
7058 done
7059 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7060 rm -f conftest.i conftest.err conftest.$ac_ext
7061 if $ac_preproc_ok
7062 then :
7063   break
7064 fi
7065
7066     done
7067     ac_cv_prog_CPP=$CPP
7068    ;;
7069 esac
7070 fi
7071   CPP=$ac_cv_prog_CPP
7072 else
7073   ac_cv_prog_CPP=$CPP
7074 fi
7075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7076 printf "%s\n" "$CPP" >&6; }
7077 ac_preproc_ok=false
7078 for ac_c_preproc_warn_flag in '' yes
7079 do
7080   # Use a header file that comes with gcc, so configuring glibc
7081   # with a fresh cross-compiler works.
7082   # On the NeXT, cc -E runs the code through the compiler's parser,
7083   # not just through cpp. "Syntax error" is here to catch this case.
7084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7085 /* end confdefs.h.  */
7086 #include <limits.h>
7087                      Syntax error
7088 _ACEOF
7089 if ac_fn_c_try_cpp "$LINENO"
7090 then :
7091
7092 else case e in #(
7093   e) # Broken: fails on valid input.
7094 continue ;;
7095 esac
7096 fi
7097 rm -f conftest.err conftest.i conftest.$ac_ext
7098
7099   # OK, works on sane cases.  Now check whether nonexistent headers
7100   # can be detected and how.
7101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102 /* end confdefs.h.  */
7103 #include <ac_nonexistent.h>
7104 _ACEOF
7105 if ac_fn_c_try_cpp "$LINENO"
7106 then :
7107   # Broken: success on invalid input.
7108 continue
7109 else case e in #(
7110   e) # Passes both tests.
7111 ac_preproc_ok=:
7112 break ;;
7113 esac
7114 fi
7115 rm -f conftest.err conftest.i conftest.$ac_ext
7116
7117 done
7118 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7119 rm -f conftest.i conftest.err conftest.$ac_ext
7120 if $ac_preproc_ok
7121 then :
7122
7123 else case e in #(
7124   e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7125 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7126 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7127 See 'config.log' for more details" "$LINENO" 5; } ;;
7128 esac
7129 fi
7130
7131 ac_ext=c
7132 ac_cpp='$CPP $CPPFLAGS'
7133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7136
7137
7138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
7139 printf %s "checking for egrep -e... " >&6; }
7140 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
7141 then :
7142   printf %s "(cached) " >&6
7143 else case e in #(
7144   e) if test -z "$EGREP_TRADITIONAL"; then
7145   ac_path_EGREP_TRADITIONAL_found=false
7146   # Loop through the user's path and test for each of PROGNAME-LIST
7147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7149 do
7150   IFS=$as_save_IFS
7151   case $as_dir in #(((
7152     '') as_dir=./ ;;
7153     */) ;;
7154     *) as_dir=$as_dir/ ;;
7155   esac
7156     for ac_prog in grep ggrep
7157    do
7158     for ac_exec_ext in '' $ac_executable_extensions; do
7159       ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
7160       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
7161 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
7162   # Check for GNU $ac_path_EGREP_TRADITIONAL
7163 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
7164 *GNU*)
7165   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
7166 #(
7167 *)
7168   ac_count=0
7169   printf %s 0123456789 >"conftest.in"
7170   while :
7171   do
7172     cat "conftest.in" "conftest.in" >"conftest.tmp"
7173     mv "conftest.tmp" "conftest.in"
7174     cp "conftest.in" "conftest.nl"
7175     printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
7176     "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7177     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7178     as_fn_arith $ac_count + 1 && ac_count=$as_val
7179     if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
7180       # Best one so far, save it but keep looking for a better one
7181       ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
7182       ac_path_EGREP_TRADITIONAL_max=$ac_count
7183     fi
7184     # 10*(2^10) chars as input seems more than enough
7185     test $ac_count -gt 10 && break
7186   done
7187   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7188 esac
7189
7190       $ac_path_EGREP_TRADITIONAL_found && break 3
7191     done
7192   done
7193   done
7194 IFS=$as_save_IFS
7195   if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
7196     :
7197   fi
7198 else
7199   ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
7200 fi
7201
7202     if test "$ac_cv_path_EGREP_TRADITIONAL"
7203 then :
7204   ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
7205 else case e in #(
7206   e) if test -z "$EGREP_TRADITIONAL"; then
7207   ac_path_EGREP_TRADITIONAL_found=false
7208   # Loop through the user's path and test for each of PROGNAME-LIST
7209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7211 do
7212   IFS=$as_save_IFS
7213   case $as_dir in #(((
7214     '') as_dir=./ ;;
7215     */) ;;
7216     *) as_dir=$as_dir/ ;;
7217   esac
7218     for ac_prog in egrep
7219    do
7220     for ac_exec_ext in '' $ac_executable_extensions; do
7221       ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
7222       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
7223 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
7224   # Check for GNU $ac_path_EGREP_TRADITIONAL
7225 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
7226 *GNU*)
7227   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
7228 #(
7229 *)
7230   ac_count=0
7231   printf %s 0123456789 >"conftest.in"
7232   while :
7233   do
7234     cat "conftest.in" "conftest.in" >"conftest.tmp"
7235     mv "conftest.tmp" "conftest.in"
7236     cp "conftest.in" "conftest.nl"
7237     printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
7238     "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7239     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7240     as_fn_arith $ac_count + 1 && ac_count=$as_val
7241     if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
7242       # Best one so far, save it but keep looking for a better one
7243       ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
7244       ac_path_EGREP_TRADITIONAL_max=$ac_count
7245     fi
7246     # 10*(2^10) chars as input seems more than enough
7247     test $ac_count -gt 10 && break
7248   done
7249   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7250 esac
7251
7252       $ac_path_EGREP_TRADITIONAL_found && break 3
7253     done
7254   done
7255   done
7256 IFS=$as_save_IFS
7257   if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
7258     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7259   fi
7260 else
7261   ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
7262 fi
7263  ;;
7264 esac
7265 fi ;;
7266 esac
7267 fi
7268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
7269 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
7270  EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
7271
7272
7273
7274
7275   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7276 printf %s "checking for Minix Amsterdam compiler... " >&6; }
7277 if test ${gl_cv_c_amsterdam_compiler+y}
7278 then :
7279   printf %s "(cached) " >&6
7280 else case e in #(
7281   e)
7282       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283 /* end confdefs.h.  */
7284
7285 #ifdef __ACK__
7286 Amsterdam
7287 #endif
7288
7289 _ACEOF
7290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7291   $EGREP_TRADITIONAL "Amsterdam" >/dev/null 2>&1
7292 then :
7293   gl_cv_c_amsterdam_compiler=yes
7294 else case e in #(
7295   e) gl_cv_c_amsterdam_compiler=no ;;
7296 esac
7297 fi
7298 rm -rf conftest*
7299
7300      ;;
7301 esac
7302 fi
7303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7304 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
7305
7306       if test $gl_cv_c_amsterdam_compiler = yes; then
7307     if test -z "$AR"; then
7308       AR='cc -c.a'
7309     fi
7310     if test -z "$ARFLAGS"; then
7311       ARFLAGS='-o'
7312     fi
7313   else
7314                                                 :
7315   fi
7316
7317         if test -n "$ac_tool_prefix"; then
7318   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7319 set dummy ${ac_tool_prefix}ar; ac_word=$2
7320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321 printf %s "checking for $ac_word... " >&6; }
7322 if test ${ac_cv_prog_AR+y}
7323 then :
7324   printf %s "(cached) " >&6
7325 else case e in #(
7326   e) if test -n "$AR"; then
7327   ac_cv_prog_AR="$AR" # Let the user override the test.
7328 else
7329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330 for as_dir in $PATH
7331 do
7332   IFS=$as_save_IFS
7333   case $as_dir in #(((
7334     '') as_dir=./ ;;
7335     */) ;;
7336     *) as_dir=$as_dir/ ;;
7337   esac
7338     for ac_exec_ext in '' $ac_executable_extensions; do
7339   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7340     ac_cv_prog_AR="${ac_tool_prefix}ar"
7341     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7342     break 2
7343   fi
7344 done
7345   done
7346 IFS=$as_save_IFS
7347
7348 fi ;;
7349 esac
7350 fi
7351 AR=$ac_cv_prog_AR
7352 if test -n "$AR"; then
7353   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7354 printf "%s\n" "$AR" >&6; }
7355 else
7356   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 printf "%s\n" "no" >&6; }
7358 fi
7359
7360
7361 fi
7362 if test -z "$ac_cv_prog_AR"; then
7363   ac_ct_AR=$AR
7364   # Extract the first word of "ar", so it can be a program name with args.
7365 set dummy ar; ac_word=$2
7366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367 printf %s "checking for $ac_word... " >&6; }
7368 if test ${ac_cv_prog_ac_ct_AR+y}
7369 then :
7370   printf %s "(cached) " >&6
7371 else case e in #(
7372   e) if test -n "$ac_ct_AR"; then
7373   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7374 else
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376 for as_dir in $PATH
7377 do
7378   IFS=$as_save_IFS
7379   case $as_dir in #(((
7380     '') as_dir=./ ;;
7381     */) ;;
7382     *) as_dir=$as_dir/ ;;
7383   esac
7384     for ac_exec_ext in '' $ac_executable_extensions; do
7385   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7386     ac_cv_prog_ac_ct_AR="ar"
7387     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7388     break 2
7389   fi
7390 done
7391   done
7392 IFS=$as_save_IFS
7393
7394 fi ;;
7395 esac
7396 fi
7397 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7398 if test -n "$ac_ct_AR"; then
7399   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7400 printf "%s\n" "$ac_ct_AR" >&6; }
7401 else
7402   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403 printf "%s\n" "no" >&6; }
7404 fi
7405
7406   if test "x$ac_ct_AR" = x; then
7407     AR="ar"
7408   else
7409     case $cross_compiling:$ac_tool_warned in
7410 yes:)
7411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7412 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7413 ac_tool_warned=yes ;;
7414 esac
7415     AR=$ac_ct_AR
7416   fi
7417 else
7418   AR="$ac_cv_prog_AR"
7419 fi
7420
7421   if test -z "$ARFLAGS"; then
7422     ARFLAGS='cr'
7423   fi
7424
7425
7426
7427   if test -z "$RANLIB"; then
7428     if test $gl_cv_c_amsterdam_compiler = yes; then
7429       RANLIB=':'
7430     else
7431             if test -n "$ac_tool_prefix"; then
7432   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7433 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 printf %s "checking for $ac_word... " >&6; }
7436 if test ${ac_cv_prog_RANLIB+y}
7437 then :
7438   printf %s "(cached) " >&6
7439 else case e in #(
7440   e) if test -n "$RANLIB"; then
7441   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7442 else
7443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7444 for as_dir in $PATH
7445 do
7446   IFS=$as_save_IFS
7447   case $as_dir in #(((
7448     '') as_dir=./ ;;
7449     */) ;;
7450     *) as_dir=$as_dir/ ;;
7451   esac
7452     for ac_exec_ext in '' $ac_executable_extensions; do
7453   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7454     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7455     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7456     break 2
7457   fi
7458 done
7459   done
7460 IFS=$as_save_IFS
7461
7462 fi ;;
7463 esac
7464 fi
7465 RANLIB=$ac_cv_prog_RANLIB
7466 if test -n "$RANLIB"; then
7467   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7468 printf "%s\n" "$RANLIB" >&6; }
7469 else
7470   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7471 printf "%s\n" "no" >&6; }
7472 fi
7473
7474
7475 fi
7476 if test -z "$ac_cv_prog_RANLIB"; then
7477   ac_ct_RANLIB=$RANLIB
7478   # Extract the first word of "ranlib", so it can be a program name with args.
7479 set dummy ranlib; ac_word=$2
7480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481 printf %s "checking for $ac_word... " >&6; }
7482 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7483 then :
7484   printf %s "(cached) " >&6
7485 else case e in #(
7486   e) if test -n "$ac_ct_RANLIB"; then
7487   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7488 else
7489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7490 for as_dir in $PATH
7491 do
7492   IFS=$as_save_IFS
7493   case $as_dir in #(((
7494     '') as_dir=./ ;;
7495     */) ;;
7496     *) as_dir=$as_dir/ ;;
7497   esac
7498     for ac_exec_ext in '' $ac_executable_extensions; do
7499   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7500     ac_cv_prog_ac_ct_RANLIB="ranlib"
7501     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7502     break 2
7503   fi
7504 done
7505   done
7506 IFS=$as_save_IFS
7507
7508 fi ;;
7509 esac
7510 fi
7511 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7512 if test -n "$ac_ct_RANLIB"; then
7513   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7514 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7515 else
7516   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7517 printf "%s\n" "no" >&6; }
7518 fi
7519
7520   if test "x$ac_ct_RANLIB" = x; then
7521     RANLIB=":"
7522   else
7523     case $cross_compiling:$ac_tool_warned in
7524 yes:)
7525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7526 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7527 ac_tool_warned=yes ;;
7528 esac
7529     RANLIB=$ac_ct_RANLIB
7530   fi
7531 else
7532   RANLIB="$ac_cv_prog_RANLIB"
7533 fi
7534
7535     fi
7536   fi
7537
7538
7539
7540
7541
7542   # IEEE behaviour is the default on all CPUs except Alpha and SH
7543   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7544   # and the GCC 4.1.2 manual).
7545   case "$host_cpu" in
7546     alpha*)
7547       # On Alpha systems, a compiler option provides the behaviour.
7548       # See the ieee(3) manual page, also available at
7549       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7550       if test -n "$GCC"; then
7551         # GCC has the option -mieee.
7552         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7553         CPPFLAGS="$CPPFLAGS -mieee"
7554       else
7555         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7556         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7557         CPPFLAGS="$CPPFLAGS -ieee"
7558       fi
7559       ;;
7560     sh*)
7561       if test -n "$GCC"; then
7562         # GCC has the option -mieee.
7563         CPPFLAGS="$CPPFLAGS -mieee"
7564       fi
7565       ;;
7566   esac
7567
7568 # Check whether --enable-largefile was given.
7569 if test ${enable_largefile+y}
7570 then :
7571   enableval=$enable_largefile;
7572 fi
7573 if test "$enable_largefile,$enable_year2038" != no,no
7574 then :
7575   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
7576 printf %s "checking for $CC option to enable large file support... " >&6; }
7577 if test ${ac_cv_sys_largefile_opts+y}
7578 then :
7579   printf %s "(cached) " >&6
7580 else case e in #(
7581   e) ac_save_CC="$CC"
7582   ac_opt_found=no
7583   for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
7584     if test x"$ac_opt" != x"none needed"
7585 then :
7586   CC="$ac_save_CC $ac_opt"
7587 fi
7588     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h.  */
7590 #include <sys/types.h>
7591  /* Check that off_t can represent 2**63 - 1 correctly.
7592     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7593     since some C++ compilers masquerading as C compilers
7594     incorrectly reject 9223372036854775807.  */
7595 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7596   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7597                        && LARGE_OFF_T % 2147483647 == 1)
7598                       ? 1 : -1];
7599 int
7600 main (void)
7601 {
7602
7603   ;
7604   return 0;
7605 }
7606 _ACEOF
7607 if ac_fn_c_try_compile "$LINENO"
7608 then :
7609   ac_cv_sys_largefile_opts="$ac_opt"
7610       ac_opt_found=yes
7611 fi
7612 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7613     test $ac_opt_found = no || break
7614   done
7615   CC="$ac_save_CC"
7616
7617
7618     if test $ac_opt_found != yes; then
7619       case $host_os in #(
7620   mingw*) :
7621     ac_cv_sys_largefile_opts="supported through gnulib"
7622            ac_opt_found=yes
7623        ;; #(
7624   *) :
7625      ;;
7626 esac
7627     fi
7628
7629   test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
7630 esac
7631 fi
7632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
7633 printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
7634
7635 ac_have_largefile=yes
7636 case $ac_cv_sys_largefile_opts in #(
7637   "none needed") :
7638      ;; #(
7639   "supported through gnulib") :
7640      ;; #(
7641   "support not detected") :
7642     ac_have_largefile=no ;; #(
7643   "-D_FILE_OFFSET_BITS=64") :
7644
7645 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
7646  ;; #(
7647   "-D_LARGE_FILES=1") :
7648
7649 printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
7650  ;; #(
7651   "-n32") :
7652     CC="$CC -n32" ;; #(
7653   *) :
7654     as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
7655 esac
7656
7657 if test "$enable_year2038" != no
7658 then :
7659   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
7660 printf %s "checking for $CC option for timestamps after 2038... " >&6; }
7661 if test ${ac_cv_sys_year2038_opts+y}
7662 then :
7663   printf %s "(cached) " >&6
7664 else case e in #(
7665   e) ac_save_CPPFLAGS="$CPPFLAGS"
7666   ac_opt_found=no
7667   for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
7668     if test x"$ac_opt" != x"none needed"
7669 then :
7670   CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
7671 fi
7672     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7673 /* end confdefs.h.  */
7674
7675   #include <time.h>
7676   /* Check that time_t can represent 2**32 - 1 correctly.  */
7677   #define LARGE_TIME_T \\
7678     ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
7679   int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
7680                            && LARGE_TIME_T % 65537 == 0)
7681                           ? 1 : -1];
7682
7683 int
7684 main (void)
7685 {
7686
7687   ;
7688   return 0;
7689 }
7690 _ACEOF
7691 if ac_fn_c_try_compile "$LINENO"
7692 then :
7693   ac_cv_sys_year2038_opts="$ac_opt"
7694       ac_opt_found=yes
7695 fi
7696 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7697     test $ac_opt_found = no || break
7698   done
7699   CPPFLAGS="$ac_save_CPPFLAGS"
7700   test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
7701 esac
7702 fi
7703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
7704 printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
7705
7706 ac_have_year2038=yes
7707 case $ac_cv_sys_year2038_opts in #(
7708   "none needed") :
7709      ;; #(
7710   "support not detected") :
7711     ac_have_year2038=no ;; #(
7712   "-D_TIME_BITS=64") :
7713
7714 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
7715  ;; #(
7716   "-D__MINGW_USE_VC2005_COMPAT") :
7717
7718 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7719  ;; #(
7720   "-U_USE_32_BIT_TIME_T"*) :
7721     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7722 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7723 as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
7724 will stop working after mid-January 2038. Remove
7725 _USE_32BIT_TIME_T from the compiler flags.
7726 See 'config.log' for more details" "$LINENO" 5; } ;; #(
7727   *) :
7728     as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
7729 esac
7730
7731 fi
7732
7733 fi
7734
7735
7736
7737
7738
7739
7740   # Check whether --enable-threads was given.
7741 if test ${enable_threads+y}
7742 then :
7743   enableval=$enable_threads; gl_use_threads=$enableval
7744 else case e in #(
7745   e) if test -n "$gl_use_threads_default"; then
7746        gl_use_threads="$gl_use_threads_default"
7747      else
7748        case "$host_os" in
7749                                     osf*) gl_use_threads=no ;;
7750                                     cygwin*)
7751                case `uname -r` in
7752                  1.[0-5].*) gl_use_threads=no ;;
7753                  *)         gl_use_threads=yes ;;
7754                esac
7755                ;;
7756                   mingw*)
7757                case "$gl_use_winpthreads_default" in
7758                  yes) gl_use_threads=posix ;;
7759                  no)  gl_use_threads=windows ;;
7760                  *)   gl_use_threads=yes ;;
7761                esac
7762                ;;
7763          *)    gl_use_threads=yes ;;
7764        esac
7765      fi
7766      ;;
7767 esac
7768 fi
7769
7770   if test "$gl_use_threads" = yes \
7771      || test "$gl_use_threads" = isoc \
7772      || test "$gl_use_threads" = posix \
7773      || test "$gl_use_threads" = isoc+posix; then
7774     # For using <threads.h> or <pthread.h>:
7775
7776
7777   if test -z "$gl_anythreadlib_early_done"; then
7778     case "$host_os" in
7779       osf*)
7780         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7781         # groks <pthread.h>. cc also understands the flag -pthread, but
7782         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7783         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7784         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7785         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7786         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7787         ;;
7788     esac
7789     # Some systems optimize for single-threaded programs by default, and
7790     # need special flags to disable these optimizations. For example, the
7791     # definition of 'errno' in <errno.h>.
7792     case "$host_os" in
7793       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7794       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7795     esac
7796     gl_anythreadlib_early_done=done
7797   fi
7798
7799   fi
7800
7801 if test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no
7802 then :
7803   # If we're not cross compiling and 'touch' works with a large
7804   # timestamp, then we can presume the system supports wider time_t
7805   # *somehow* and we just weren't able to detect it.  One common
7806   # case that we deliberately *don't* probe for is a system that
7807   # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
7808   # wide time_t.  (It would be inappropriate for us to override an
7809   # intentional use of -m32.)  Error out, demanding use of
7810   # --disable-year2038 if this is intentional.
7811   if TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null
7812 then :
7813   case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in #(
7814   *'Feb  7  2106'* | *'Feb  7 17:10'*) :
7815     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7816 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7817 as_fn_error $? "this system appears to support timestamps after
7818 mid-January 2038, but no mechanism for enabling wide
7819 'time_t' was detected. Did you mean to build a 64-bit
7820 binary? (E.g., 'CC=\"${CC} -m64\"'.) To proceed with
7821 32-bit time_t, configure with '--disable-year2038'.
7822 See 'config.log' for more details" "$LINENO" 5; } ;; #(
7823   *) :
7824      ;;
7825 esac
7826 fi
7827 fi
7828
7829
7830   # Pre-early section.
7831
7832
7833
7834   # Code from module absolute-header:
7835   # Code from module accept:
7836   # Code from module accept-tests:
7837   # Code from module alignasof:
7838   # Code from module alignasof-tests:
7839   # Code from module alloca:
7840   # Code from module alloca-opt:
7841   # Code from module alloca-opt-tests:
7842   # Code from module allocator:
7843   # Code from module announce-gen:
7844   # Code from module areadlink:
7845   # Code from module areadlink-tests:
7846   # Code from module argmatch:
7847   # Code from module argmatch-tests:
7848   # Code from module arpa_inet:
7849   # Code from module arpa_inet-tests:
7850   # Code from module assert-h:
7851   # Code from module assert-h-tests:
7852   # Code from module assure:
7853   # Code from module atoll:
7854   # Code from module attribute:
7855   # Code from module basename-lgpl:
7856   # Code from module binary-io:
7857   # Code from module binary-io-tests:
7858   # Code from module bind:
7859   # Code from module bind-tests:
7860   # Code from module bitrotate:
7861   # Code from module bitrotate-tests:
7862   # Code from module btowc:
7863   # Code from module btowc-tests:
7864   # Code from module builtin-expect:
7865   # Code from module c-ctype:
7866   # Code from module c-ctype-tests:
7867   # Code from module c-stack:
7868   # Code from module c-stack-tests:
7869   # Code from module c-strcase:
7870   # Code from module c-strcase-tests:
7871   # Code from module c-strcaseeq:
7872   # Code from module c-strcasestr:
7873   # Code from module c-strcasestr-tests:
7874   # Code from module c99:
7875   # Code from module calloc-gnu:
7876   # Code from module calloc-gnu-tests:
7877   # Code from module calloc-posix:
7878   # Code from module careadlinkat:
7879   # Code from module clock-time:
7880   # Code from module cloexec:
7881   # Code from module cloexec-tests:
7882   # Code from module close:
7883   # Code from module close-tests:
7884   # Code from module config-h:
7885   # Code from module connect:
7886   # Code from module connect-tests:
7887   # Code from module ctype:
7888   # Code from module ctype-tests:
7889   # Code from module diffseq:
7890   # Code from module dirname:
7891   # Code from module dirname-lgpl:
7892   # Code from module dirname-tests:
7893   # Code from module do-release-commit-and-tag:
7894   # Code from module double-slash-root:
7895   # Code from module dtotimespec:
7896   # Code from module dup2:
7897   # Code from module dup2-tests:
7898   # Code from module environ:
7899   # Code from module environ-tests:
7900   # Code from module errno:
7901   # Code from module errno-tests:
7902   # Code from module error:
7903   # Code from module error-h:
7904   # Code from module error-tests:
7905   # Code from module exclude:
7906   # Code from module exclude-tests:
7907   # Code from module exitfail:
7908   # Code from module extensions:
7909   # Code from module extern-inline:
7910   # Code from module fcntl:
7911   # Code from module fcntl-h:
7912   # Code from module fcntl-h-tests:
7913   # Code from module fcntl-tests:
7914   # Code from module fd-hook:
7915   # Code from module fdopen:
7916   # Code from module fdopen-tests:
7917   # Code from module fgetc-tests:
7918   # Code from module file-type:
7919   # Code from module filename:
7920   # Code from module filenamecat:
7921   # Code from module filenamecat-lgpl:
7922   # Code from module filenamecat-tests:
7923   # Code from module flexmember:
7924   # Code from module float:
7925   # Code from module float-tests:
7926   # Code from module fnmatch:
7927   # Code from module fnmatch-gnu:
7928   # Code from module fnmatch-h:
7929   # Code from module fnmatch-h-tests:
7930   # Code from module fnmatch-tests:
7931   # Code from module fopen:
7932   # Code from module fopen-gnu:
7933   # Code from module fopen-gnu-tests:
7934   # Code from module fopen-tests:
7935   # Code from module fpieee:
7936
7937   # Code from module fpucw:
7938   # Code from module fputc-tests:
7939   # Code from module fread-tests:
7940   # Code from module free-posix:
7941   # Code from module free-posix-tests:
7942   # Code from module freopen:
7943   # Code from module freopen-tests:
7944   # Code from module fstat:
7945   # Code from module fstat-tests:
7946   # Code from module ftruncate:
7947   # Code from module ftruncate-tests:
7948   # Code from module fwrite-tests:
7949   # Code from module gen-header:
7950   # Code from module gendocs:
7951   # Code from module getcwd-lgpl:
7952   # Code from module getcwd-lgpl-tests:
7953   # Code from module getdtablesize:
7954   # Code from module getdtablesize-tests:
7955   # Code from module getopt-gnu:
7956   # Code from module getopt-gnu-tests:
7957   # Code from module getopt-posix:
7958   # Code from module getopt-posix-tests:
7959   # Code from module getpagesize:
7960   # Code from module getprogname:
7961   # Code from module getprogname-tests:
7962   # Code from module getrandom:
7963   # Code from module getrandom-tests:
7964   # Code from module gettext-h:
7965   # Code from module gettime:
7966   # Code from module gettimeofday:
7967   # Code from module gettimeofday-tests:
7968   # Code from module git-version-gen:
7969   # Code from module gitlog-to-changelog:
7970   # Code from module glibc-internal/dynarray:
7971   # Code from module glibc-internal/dynarray-tests:
7972   # Code from module gnu-make:
7973   # Code from module gnu-web-doc-update:
7974   # Code from module gnumakefile:
7975   # Code from module gnupload:
7976   # Code from module gperf:
7977   # Code from module hard-locale:
7978   # Code from module hard-locale-tests:
7979   # Code from module hash:
7980   # Code from module hash-pjw:
7981   # Code from module hash-tests:
7982   # Code from module havelib:
7983   # Code from module host-cpu-c-abi:
7984   # Code from module ialloc:
7985   # Code from module iconv:
7986   # Code from module iconv-h:
7987   # Code from module iconv-h-tests:
7988   # Code from module iconv-tests:
7989   # Code from module iconv_open:
7990   # Code from module idx:
7991   # Code from module ignore-value:
7992   # Code from module ignore-value-tests:
7993   # Code from module include_next:
7994   # Code from module inet_pton:
7995   # Code from module inet_pton-tests:
7996   # Code from module inline:
7997   # Code from module intprops:
7998   # Code from module intprops-tests:
7999   # Code from module inttostr:
8000   # Code from module inttostr-tests:
8001   # Code from module inttypes:
8002   # Code from module inttypes-incomplete:
8003   # Code from module inttypes-tests:
8004   # Code from module ioctl:
8005   # Code from module ioctl-tests:
8006   # Code from module isblank:
8007   # Code from module isblank-tests:
8008   # Code from module iswblank:
8009   # Code from module iswblank-tests:
8010   # Code from module iswdigit:
8011   # Code from module iswdigit-tests:
8012   # Code from module iswxdigit:
8013   # Code from module iswxdigit-tests:
8014   # Code from module langinfo:
8015   # Code from module langinfo-tests:
8016   # Code from module largefile:
8017
8018   # Code from module largefile-tests:
8019   # Code from module libc-config:
8020   # Code from module limits-h:
8021   # Code from module limits-h-tests:
8022   # Code from module listen:
8023   # Code from module listen-tests:
8024   # Code from module localcharset:
8025   # Code from module localcharset-tests:
8026   # Code from module locale:
8027   # Code from module locale-tests:
8028   # Code from module localeconv:
8029   # Code from module localeconv-tests:
8030   # Code from module lock:
8031   # Code from module lstat:
8032   # Code from module lstat-tests:
8033   # Code from module maintainer-makefile:
8034   # Code from module malloc-gnu:
8035   # Code from module malloc-gnu-tests:
8036   # Code from module malloc-posix:
8037   # Code from module malloca:
8038   # Code from module malloca-tests:
8039   # Code from module manywarnings:
8040   # Code from module mbchar:
8041   # Code from module mbiter:
8042   # Code from module mbrtowc:
8043   # Code from module mbrtowc-tests:
8044   # Code from module mbscasecmp:
8045   # Code from module mbscasecmp-tests:
8046   # Code from module mbsinit:
8047   # Code from module mbsinit-tests:
8048   # Code from module mbslen:
8049   # Code from module mbsrtowcs:
8050   # Code from module mbsrtowcs-tests:
8051   # Code from module mbsstr:
8052   # Code from module mbsstr-tests:
8053   # Code from module mbtowc:
8054   # Code from module mbuiter:
8055   # Code from module memchr:
8056   # Code from module memchr-tests:
8057   # Code from module mempcpy:
8058   # Code from module minmax:
8059   # Code from module mkdir:
8060   # Code from module mkdir-tests:
8061   # Code from module mkstemp:
8062   # Code from module mktime:
8063   # Code from module mktime-internal:
8064   # Code from module msvc-inval:
8065   # Code from module msvc-nothrow:
8066   # Code from module multiarch:
8067   # Code from module nanosleep:
8068   # Code from module nanosleep-tests:
8069   # Code from module netinet_in:
8070   # Code from module netinet_in-tests:
8071   # Code from module nl_langinfo:
8072   # Code from module nl_langinfo-tests:
8073   # Code from module nocrash:
8074   # Code from module nstrftime:
8075   # Code from module nstrftime-tests:
8076   # Code from module nullptr:
8077   # Code from module nullptr-tests:
8078   # Code from module open:
8079   # Code from module open-tests:
8080   # Code from module pathmax:
8081   # Code from module pathmax-tests:
8082   # Code from module perl:
8083   # Code from module perror:
8084   # Code from module perror-tests:
8085   # Code from module pipe-posix:
8086   # Code from module pipe-posix-tests:
8087   # Code from module progname:
8088   # Code from module propername:
8089   # Code from module pselect:
8090   # Code from module pselect-tests:
8091   # Code from module pthread-h:
8092
8093
8094   if test -z "$gl_anythreadlib_early_done"; then
8095     case "$host_os" in
8096       osf*)
8097         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8098         # groks <pthread.h>. cc also understands the flag -pthread, but
8099         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8100         # 2. putting a flag into CPPFLAGS that has an effect on the linker
8101         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8102         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8103         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8104         ;;
8105     esac
8106     # Some systems optimize for single-threaded programs by default, and
8107     # need special flags to disable these optimizations. For example, the
8108     # definition of 'errno' in <errno.h>.
8109     case "$host_os" in
8110       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8111       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8112     esac
8113     gl_anythreadlib_early_done=done
8114   fi
8115
8116   # Code from module pthread-h-tests:
8117   # Code from module pthread-thread:
8118   # Code from module pthread-thread-tests:
8119   # Code from module pthread_sigmask:
8120   # Code from module pthread_sigmask-tests:
8121   # Code from module putenv:
8122   # Code from module quote:
8123   # Code from module quotearg:
8124   # Code from module quotearg-simple:
8125   # Code from module quotearg-simple-tests:
8126   # Code from module raise:
8127   # Code from module raise-tests:
8128   # Code from module rawmemchr:
8129   # Code from module rawmemchr-tests:
8130   # Code from module readlink:
8131   # Code from module readlink-tests:
8132   # Code from module readme-release:
8133   # Code from module realloc-gnu:
8134   # Code from module realloc-gnu-tests:
8135   # Code from module realloc-posix:
8136   # Code from module reallocarray:
8137   # Code from module reallocarray-tests:
8138   # Code from module regex:
8139   # Code from module regex-tests:
8140   # Code from module same-inode:
8141   # Code from module sched:
8142   # Code from module sched-tests:
8143   # Code from module select:
8144   # Code from module select-tests:
8145   # Code from module setenv:
8146   # Code from module setenv-tests:
8147   # Code from module setlocale-null:
8148   # Code from module setlocale-null-tests:
8149   # Code from module setsockopt:
8150   # Code from module setsockopt-tests:
8151   # Code from module sh-quote:
8152   # Code from module sh-quote-tests:
8153   # Code from module signal:
8154   # Code from module signal-h:
8155   # Code from module signal-h-tests:
8156   # Code from module sigprocmask:
8157   # Code from module sigprocmask-tests:
8158   # Code from module sigsegv:
8159   # Code from module sigsegv-tests:
8160   # Code from module size_max:
8161   # Code from module sleep:
8162   # Code from module sleep-tests:
8163   # Code from module snippet/_Noreturn:
8164   # Code from module snippet/arg-nonnull:
8165   # Code from module snippet/c++defs:
8166   # Code from module snippet/warn-on-use:
8167   # Code from module snprintf:
8168   # Code from module snprintf-tests:
8169   # Code from module socket:
8170   # Code from module socketlib:
8171   # Code from module sockets:
8172   # Code from module sockets-tests:
8173   # Code from module socklen:
8174   # Code from module ssize_t:
8175   # Code from module stat:
8176   # Code from module stat-macros:
8177   # Code from module stat-tests:
8178   # Code from module stat-time:
8179   # Code from module stat-time-tests:
8180   # Code from module std-gnu11:
8181   # Code from module stdarg:
8182
8183
8184
8185   # Code from module stdarg-tests:
8186   # Code from module stdbool:
8187   # Code from module stdbool-tests:
8188   # Code from module stdckdint:
8189   # Code from module stdckdint-tests:
8190   # Code from module stddef:
8191   # Code from module stddef-tests:
8192   # Code from module stdint:
8193   # Code from module stdint-tests:
8194   # Code from module stdio:
8195
8196
8197   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
8198
8199
8200   # Code from module stdio-tests:
8201   # Code from module stdlib:
8202   # Code from module stdlib-tests:
8203   # Code from module stdopen:
8204   # Code from module stpcpy:
8205   # Code from module strcase:
8206   # Code from module streq:
8207   # Code from module strerror:
8208   # Code from module strerror-override:
8209   # Code from module strerror-tests:
8210   # Code from module strerror_r-posix:
8211   # Code from module strerror_r-posix-tests:
8212   # Code from module striconv:
8213   # Code from module striconv-tests:
8214   # Code from module string:
8215   # Code from module string-tests:
8216   # Code from module strings:
8217   # Code from module strings-tests:
8218   # Code from module strnlen:
8219   # Code from module strnlen-tests:
8220   # Code from module strnlen1:
8221   # Code from module strptime:
8222   # Code from module strtoimax:
8223   # Code from module strtoimax-tests:
8224   # Code from module strtoll:
8225   # Code from module strtoll-tests:
8226   # Code from module symlink:
8227   # Code from module symlink-tests:
8228   # Code from module sys_ioctl:
8229   # Code from module sys_ioctl-tests:
8230   # Code from module sys_random:
8231   # Code from module sys_random-tests:
8232   # Code from module sys_select:
8233   # Code from module sys_select-tests:
8234   # Code from module sys_socket:
8235   # Code from module sys_socket-tests:
8236   # Code from module sys_stat:
8237   # Code from module sys_stat-tests:
8238   # Code from module sys_time:
8239   # Code from module sys_time-tests:
8240   # Code from module sys_types:
8241   # Code from module sys_types-tests:
8242   # Code from module sys_uio:
8243   # Code from module sys_uio-tests:
8244   # Code from module sys_wait:
8245   # Code from module sys_wait-tests:
8246   # Code from module system-quote:
8247   # Code from module tempname:
8248   # Code from module test-framework-sh:
8249   # Code from module test-framework-sh-tests:
8250   # Code from module thread:
8251   # Code from module thread-tests:
8252   # Code from module threadlib:
8253
8254
8255
8256   # Code from module time:
8257   # Code from module time-h:
8258   # Code from module time-h-tests:
8259   # Code from module time-tests:
8260   # Code from module time_r:
8261   # Code from module time_rz:
8262   # Code from module timegm:
8263   # Code from module timespec:
8264   # Code from module timespec-add:
8265   # Code from module timespec-sub:
8266   # Code from module timespec-tests:
8267   # Code from module trim:
8268   # Code from module trim-tests:
8269   # Code from module tzset:
8270   # Code from module unistd:
8271   # Code from module unistd-tests:
8272   # Code from module unistr/base:
8273   # Code from module unistr/u8-mbtoucr:
8274   # Code from module unistr/u8-mbtoucr-tests:
8275   # Code from module unistr/u8-uctomb:
8276   # Code from module unistr/u8-uctomb-tests:
8277   # Code from module unitypes:
8278   # Code from module uniwidth/base:
8279   # Code from module uniwidth/width:
8280   # Code from module uniwidth/width-tests:
8281   # Code from module unlocked-io:
8282   # Code from module unlocked-io-internal:
8283   # Code from module unsetenv:
8284   # Code from module unsetenv-tests:
8285   # Code from module update-copyright:
8286   # Code from module update-copyright-tests:
8287   # Code from module useless-if-before-free:
8288   # Code from module vararrays:
8289   # Code from module vasnprintf:
8290   # Code from module vasnprintf-tests:
8291   # Code from module vc-list-files:
8292   # Code from module vc-list-files-tests:
8293   # Code from module verify:
8294   # Code from module verify-tests:
8295   # Code from module version-etc:
8296   # Code from module version-etc-fsf:
8297   # Code from module version-etc-tests:
8298   # Code from module warnings:
8299   # Code from module wchar:
8300   # Code from module wchar-tests:
8301   # Code from module wcrtomb:
8302   # Code from module wcrtomb-tests:
8303   # Code from module wctob:
8304   # Code from module wctomb:
8305   # Code from module wctype-h:
8306   # Code from module wctype-h-tests:
8307   # Code from module wcwidth:
8308   # Code from module wcwidth-tests:
8309   # Code from module windows-mutex:
8310   # Code from module windows-once:
8311   # Code from module windows-recmutex:
8312   # Code from module windows-rwlock:
8313   # Code from module windows-thread:
8314   # Code from module windows-tls:
8315   # Code from module wmemchr:
8316   # Code from module wmempcpy:
8317   # Code from module xalloc:
8318   # Code from module xalloc-die:
8319   # Code from module xalloc-die-tests:
8320   # Code from module xalloc-oversized:
8321   # Code from module xfreopen:
8322   # Code from module xmalloca:
8323   # Code from module xreadlink:
8324   # Code from module xsize:
8325   # Code from module xstdopen:
8326   # Code from module xstdopen-tests:
8327   # Code from module xstriconv:
8328   # Code from module xstrtoimax:
8329   # Code from module xstrtoimax-tests:
8330   # Code from module xstrtol:
8331   # Code from module xstrtol-error:
8332   # Code from module xstrtol-tests:
8333   # Code from module year2038:
8334
8335   # Code from module year2038-tests:
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349                         # Check whether --enable-cross-guesses was given.
8350 if test ${enable_cross_guesses+y}
8351 then :
8352   enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8353        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8354 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8355        enableval=conservative
8356      fi
8357      gl_cross_guesses="$enableval"
8358 else case e in #(
8359   e) gl_cross_guesses=conservative ;;
8360 esac
8361 fi
8362
8363   if test $gl_cross_guesses = risky; then
8364     gl_cross_guess_normal="guessing yes"
8365     gl_cross_guess_inverted="guessing no"
8366   else
8367     gl_cross_guess_normal="guessing no"
8368     gl_cross_guess_inverted="guessing yes"
8369   fi
8370           LIBC_FATAL_STDERR_=1
8371   export LIBC_FATAL_STDERR_
8372
8373
8374 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8375 if test "x$ac_cv_type_size_t" = xyes
8376 then :
8377
8378 else case e in #(
8379   e)
8380 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8381  ;;
8382 esac
8383 fi
8384
8385 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8386 # for constant arguments.  Useless!
8387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8388 printf %s "checking for working alloca.h... " >&6; }
8389 if test ${ac_cv_working_alloca_h+y}
8390 then :
8391   printf %s "(cached) " >&6
8392 else case e in #(
8393   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394 /* end confdefs.h.  */
8395 #include <alloca.h>
8396 int
8397 main (void)
8398 {
8399 char *p = (char *) alloca (2 * sizeof (int));
8400                           if (p) return 0;
8401   ;
8402   return 0;
8403 }
8404 _ACEOF
8405 if ac_fn_c_try_link "$LINENO"
8406 then :
8407   ac_cv_working_alloca_h=yes
8408 else case e in #(
8409   e) ac_cv_working_alloca_h=no ;;
8410 esac
8411 fi
8412 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8413     conftest$ac_exeext conftest.$ac_ext ;;
8414 esac
8415 fi
8416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8417 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8418 if test $ac_cv_working_alloca_h = yes; then
8419
8420 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8421
8422 fi
8423
8424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8425 printf %s "checking for alloca... " >&6; }
8426 if test ${ac_cv_func_alloca_works+y}
8427 then :
8428   printf %s "(cached) " >&6
8429 else case e in #(
8430   e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h
8431 if test "$ac_cv_func_alloca_works" != yes
8432 then :
8433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8434 /* end confdefs.h.  */
8435 #include <stdlib.h>
8436 #include <stddef.h>
8437 #ifndef alloca
8438 # ifdef __GNUC__
8439 #  define alloca __builtin_alloca
8440 # elif defined _MSC_VER
8441 #  include <malloc.h>
8442 #  define alloca _alloca
8443 # else
8444 #  ifdef  __cplusplus
8445 extern "C"
8446 #  endif
8447 void *alloca (size_t);
8448 # endif
8449 #endif
8450
8451 int
8452 main (void)
8453 {
8454 char *p = (char *) alloca (1);
8455                                     if (p) return 0;
8456   ;
8457   return 0;
8458 }
8459 _ACEOF
8460 if ac_fn_c_try_link "$LINENO"
8461 then :
8462   ac_cv_func_alloca_works=yes
8463 fi
8464 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8465     conftest$ac_exeext conftest.$ac_ext
8466 fi ;;
8467 esac
8468 fi
8469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8470 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8471
8472 if test $ac_cv_func_alloca_works = yes; then
8473
8474 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8475
8476 else
8477   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8478 # that cause trouble.  Some versions do not even contain alloca or
8479 # contain a buggy version.  If you still want to use their alloca,
8480 # use ar to extract alloca.o from them instead of compiling alloca.c.
8481
8482
8483
8484
8485
8486 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8487
8488 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8489
8490
8491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8492 printf %s "checking stack direction for C alloca... " >&6; }
8493 if test ${ac_cv_c_stack_direction+y}
8494 then :
8495   printf %s "(cached) " >&6
8496 else case e in #(
8497   e) if test "$cross_compiling" = yes
8498 then :
8499   ac_cv_c_stack_direction=0
8500 else case e in #(
8501   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8502 /* end confdefs.h.  */
8503 $ac_includes_default
8504 int
8505 find_stack_direction (int *addr, int depth)
8506 {
8507   int dir, dummy = 0;
8508   if (! addr)
8509     addr = &dummy;
8510   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8511   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8512   return dir + dummy;
8513 }
8514
8515 int
8516 main (int argc, char **argv)
8517 {
8518   return find_stack_direction (0, argc + !argv + 20) < 0;
8519 }
8520 _ACEOF
8521 if ac_fn_c_try_run "$LINENO"
8522 then :
8523   ac_cv_c_stack_direction=1
8524 else case e in #(
8525   e) ac_cv_c_stack_direction=-1 ;;
8526 esac
8527 fi
8528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8529   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8530 esac
8531 fi
8532  ;;
8533 esac
8534 fi
8535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8536 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8537 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8538
8539
8540 fi
8541
8542
8543
8544   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8545 printf %s "checking whether the preprocessor supports include_next... " >&6; }
8546 if test ${gl_cv_have_include_next+y}
8547 then :
8548   printf %s "(cached) " >&6
8549 else case e in #(
8550   e) rm -rf conftestd1a conftestd1b conftestd2
8551      mkdir conftestd1a conftestd1b conftestd2
8552                                                   cat <<EOF > conftestd1a/conftest.h
8553 #define DEFINED_IN_CONFTESTD1
8554 #include_next <conftest.h>
8555 #ifdef DEFINED_IN_CONFTESTD2
8556 int foo;
8557 #else
8558 #error "include_next doesn't work"
8559 #endif
8560 EOF
8561      cat <<EOF > conftestd1b/conftest.h
8562 #define DEFINED_IN_CONFTESTD1
8563 #include <stdio.h>
8564 #include_next <conftest.h>
8565 #ifdef DEFINED_IN_CONFTESTD2
8566 int foo;
8567 #else
8568 #error "include_next doesn't work"
8569 #endif
8570 EOF
8571      cat <<EOF > conftestd2/conftest.h
8572 #ifndef DEFINED_IN_CONFTESTD1
8573 #error "include_next test doesn't work"
8574 #endif
8575 #define DEFINED_IN_CONFTESTD2
8576 EOF
8577      gl_save_CPPFLAGS="$CPPFLAGS"
8578      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
8579      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8580 /* end confdefs.h.  */
8581 #include <conftest.h>
8582 _ACEOF
8583 if ac_fn_c_try_compile "$LINENO"
8584 then :
8585   gl_cv_have_include_next=yes
8586 else case e in #(
8587   e) CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8588         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8589 /* end confdefs.h.  */
8590 #include <conftest.h>
8591 _ACEOF
8592 if ac_fn_c_try_compile "$LINENO"
8593 then :
8594   gl_cv_have_include_next=buggy
8595 else case e in #(
8596   e) gl_cv_have_include_next=no ;;
8597 esac
8598 fi
8599 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8600         ;;
8601 esac
8602 fi
8603 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8604      CPPFLAGS="$gl_save_CPPFLAGS"
8605      rm -rf conftestd1a conftestd1b conftestd2
8606      ;;
8607 esac
8608 fi
8609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8610 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8611   PRAGMA_SYSTEM_HEADER=
8612   if test $gl_cv_have_include_next = yes; then
8613     INCLUDE_NEXT=include_next
8614     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8615     if test -n "$GCC"; then
8616       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8617     fi
8618   else
8619     if test $gl_cv_have_include_next = buggy; then
8620       INCLUDE_NEXT=include
8621       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8622     else
8623       INCLUDE_NEXT=include
8624       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8625     fi
8626   fi
8627
8628
8629
8630
8631       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
8632 printf %s "checking whether source code line length is unlimited... " >&6; }
8633 if test ${gl_cv_source_line_length_unlimited+y}
8634 then :
8635   printf %s "(cached) " >&6
8636 else case e in #(
8637   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8638 /* end confdefs.h.  */
8639
8640 #ifdef __TANDEM
8641 choke me
8642 #endif
8643
8644 _ACEOF
8645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8646   $EGREP_TRADITIONAL "choke me" >/dev/null 2>&1
8647 then :
8648   gl_cv_source_line_length_unlimited=no
8649 else case e in #(
8650   e) gl_cv_source_line_length_unlimited=yes ;;
8651 esac
8652 fi
8653 rm -rf conftest*
8654
8655      ;;
8656 esac
8657 fi
8658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
8659 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
8660   if test $gl_cv_source_line_length_unlimited = no; then
8661     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8662   else
8663     PRAGMA_COLUMNS=
8664   fi
8665
8666
8667
8668     HAVE_BTOWC=1;
8669   HAVE_MBSINIT=1;
8670   HAVE_MBRTOWC=1;
8671   HAVE_MBRLEN=1;
8672   HAVE_MBSRTOWCS=1;
8673   HAVE_MBSNRTOWCS=1;
8674   HAVE_WCRTOMB=1;
8675   HAVE_WCSRTOMBS=1;
8676   HAVE_WCSNRTOMBS=1;
8677   HAVE_WMEMCHR=1;
8678   HAVE_WMEMCMP=1;
8679   HAVE_WMEMCPY=1;
8680   HAVE_WMEMMOVE=1;
8681   HAVE_WMEMPCPY=1;
8682   HAVE_WMEMSET=1;
8683   HAVE_WCSLEN=1;
8684   HAVE_WCSNLEN=1;
8685   HAVE_WCSCPY=1;
8686   HAVE_WCPCPY=1;
8687   HAVE_WCSNCPY=1;
8688   HAVE_WCPNCPY=1;
8689   HAVE_WCSCAT=1;
8690   HAVE_WCSNCAT=1;
8691   HAVE_WCSCMP=1;
8692   HAVE_WCSNCMP=1;
8693   HAVE_WCSCASECMP=1;
8694   HAVE_WCSNCASECMP=1;
8695   HAVE_WCSCOLL=1;
8696   HAVE_WCSXFRM=1;
8697   HAVE_WCSDUP=1;
8698   HAVE_WCSCHR=1;
8699   HAVE_WCSRCHR=1;
8700   HAVE_WCSCSPN=1;
8701   HAVE_WCSSPN=1;
8702   HAVE_WCSPBRK=1;
8703   HAVE_WCSSTR=1;
8704   HAVE_WCSTOK=1;
8705   HAVE_WCSWIDTH=1;
8706   HAVE_WCSFTIME=1;
8707   HAVE_DECL_WCTOB=1;
8708   HAVE_DECL_WCSDUP=1;
8709   HAVE_DECL_WCWIDTH=1;
8710   REPLACE_MBSTATE_T=0;
8711   REPLACE_BTOWC=0;
8712   REPLACE_WCTOB=0;
8713   REPLACE_MBSINIT=0;
8714   REPLACE_MBRTOWC=0;
8715   REPLACE_MBRLEN=0;
8716   REPLACE_MBSRTOWCS=0;
8717   REPLACE_MBSNRTOWCS=0;
8718   REPLACE_WCRTOMB=0;
8719   REPLACE_WCSRTOMBS=0;
8720   REPLACE_WCSNRTOMBS=0;
8721   REPLACE_WCWIDTH=0;
8722   REPLACE_WCSWIDTH=0;
8723   REPLACE_WCSFTIME=0;
8724   REPLACE_WCSCMP=0;
8725   REPLACE_WCSNCMP=0;
8726   REPLACE_WCSSTR=0;
8727   REPLACE_WCSTOK=0;
8728   REPLACE_WMEMCMP=0;
8729   REPLACE_WMEMPCPY=0;
8730
8731
8732
8733   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8734 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8735 if test ${gl_cv_header_wchar_h_correct_inline+y}
8736 then :
8737   printf %s "(cached) " >&6
8738 else case e in #(
8739   e) gl_cv_header_wchar_h_correct_inline=yes
8740      case "$host_os" in
8741        *-gnu* | gnu*)
8742          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8743 /* end confdefs.h.  */
8744
8745
8746              #define wcstod renamed_wcstod
8747              #include <wchar.h>
8748              extern int zero (void);
8749              int main () { return zero(); }
8750
8751 _ACEOF
8752                                                       save_ac_compile="$ac_compile"
8753          ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8754          if echo '#include "conftest.c"' >conftest1.c \
8755             && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8756   (eval $ac_compile) 2>&5
8757   ac_status=$?
8758   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8759   test $ac_status = 0; }; then
8760            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761 /* end confdefs.h.  */
8762
8763
8764                #define wcstod renamed_wcstod
8765                #include <wchar.h>
8766                int zero (void) { return 0; }
8767
8768 _ACEOF
8769                       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8770            if echo '#include "conftest.c"' >conftest2.c \
8771               && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8775   test $ac_status = 0; }; then
8776              if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8777                :
8778              else
8779                gl_cv_header_wchar_h_correct_inline=no
8780              fi
8781            fi
8782          fi
8783          ac_compile="$save_ac_compile"
8784          rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8785          ;;
8786      esac
8787      ;;
8788 esac
8789 fi
8790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8791 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
8792   if test $gl_cv_header_wchar_h_correct_inline = no; then
8793     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8794 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8795 C99 mode. You have four options:
8796   - Add the flag -fgnu89-inline to CC and reconfigure, or
8797   - Fix your include files, using parts of
8798     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8799   - Use a gcc version older than 4.3, or
8800   - Don't use the flags -std=c99 or -std=gnu99.
8801 Configuration aborted." "$LINENO" 5
8802   fi
8803
8804 ac_func=
8805 for ac_item in $ac_func_c_list
8806 do
8807   if test $ac_func; then
8808     ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8809     if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8810       echo "#define $ac_item 1" >> confdefs.h
8811     fi
8812     ac_func=
8813   else
8814     ac_func=$ac_item
8815   fi
8816 done
8817
8818   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8819 printf %s "checking for nl_langinfo and CODESET... " >&6; }
8820 if test ${am_cv_langinfo_codeset+y}
8821 then :
8822   printf %s "(cached) " >&6
8823 else case e in #(
8824   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h.  */
8826 #include <langinfo.h>
8827 int
8828 main (void)
8829 {
8830 char* cs = nl_langinfo(CODESET); return !cs;
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 if ac_fn_c_try_link "$LINENO"
8836 then :
8837   am_cv_langinfo_codeset=yes
8838 else case e in #(
8839   e) am_cv_langinfo_codeset=no ;;
8840 esac
8841 fi
8842 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8843     conftest$ac_exeext conftest.$ac_ext
8844      ;;
8845 esac
8846 fi
8847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8848 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
8849   if test $am_cv_langinfo_codeset = yes; then
8850
8851 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8852
8853   fi
8854
8855
8856
8857
8858   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8859 printf %s "checking for a traditional french locale... " >&6; }
8860 if test ${gt_cv_locale_fr+y}
8861 then :
8862   printf %s "(cached) " >&6
8863 else case e in #(
8864   e)
8865     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8866 /* end confdefs.h.  */
8867
8868 #include <locale.h>
8869 #include <time.h>
8870 #if HAVE_LANGINFO_CODESET
8871 # include <langinfo.h>
8872 #endif
8873 #include <stdlib.h>
8874 #include <string.h>
8875 struct tm t;
8876 char buf[16];
8877 int main () {
8878   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
8879      imitates locale dependent behaviour by looking at the environment
8880      variables, and all locales use the UTF-8 encoding.  */
8881 #if defined __BEOS__ || defined __HAIKU__
8882   return 1;
8883 #else
8884   /* Check whether the given locale name is recognized by the system.  */
8885 # if defined _WIN32 && !defined __CYGWIN__
8886   /* On native Windows, setlocale(category, "") looks at the system settings,
8887      not at the environment variables.  Also, when an encoding suffix such
8888      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8889      category of the locale to "C".  */
8890   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8891       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8892     return 1;
8893 # else
8894   if (setlocale (LC_ALL, "") == NULL) return 1;
8895 # endif
8896   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8897      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8898      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8899      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8900      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8901      some unit tests fail.
8902      On MirBSD 10, when an unsupported locale is specified, setlocale()
8903      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8904 # if HAVE_LANGINFO_CODESET
8905   {
8906     const char *cs = nl_langinfo (CODESET);
8907     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8908         || strcmp (cs, "UTF-8") == 0)
8909       return 1;
8910   }
8911 # endif
8912 # ifdef __CYGWIN__
8913   /* On Cygwin, avoid locale names without encoding suffix, because the
8914      locale_charset() function relies on the encoding suffix.  Note that
8915      LC_ALL is set on the command line.  */
8916   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8917 # endif
8918   /* Check whether in the abbreviation of the second month, the second
8919      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8920      one byte long. This excludes the UTF-8 encoding.  */
8921   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8922   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8923 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8924   /* Check whether the decimal separator is a comma.
8925      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8926      are nl_langinfo(RADIXCHAR) are both ".".  */
8927   if (localeconv () ->decimal_point[0] != ',') return 1;
8928 # endif
8929   return 0;
8930 #endif
8931 }
8932
8933 _ACEOF
8934     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8935   (eval $ac_link) 2>&5
8936   ac_status=$?
8937   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8938   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8939       case "$host_os" in
8940         # Handle native Windows specially, because there setlocale() interprets
8941         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8942         # "fr" or "fra" as "French" or "French_France.1252",
8943         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8944         # "ja" as "Japanese" or "Japanese_Japan.932",
8945         # and similar.
8946         mingw*)
8947           # Test for the native Windows locale name.
8948           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8949             gt_cv_locale_fr=French_France.1252
8950           else
8951             # None found.
8952             gt_cv_locale_fr=none
8953           fi
8954           ;;
8955         *)
8956           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8957           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8958           # configure script would override the LC_ALL setting. Likewise for
8959           # LC_CTYPE, which is also set at the beginning of the configure script.
8960           # Test for the usual locale name.
8961           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8962             gt_cv_locale_fr=fr_FR
8963           else
8964             # Test for the locale name with explicit encoding suffix.
8965             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8966               gt_cv_locale_fr=fr_FR.ISO-8859-1
8967             else
8968               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8969               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8970                 gt_cv_locale_fr=fr_FR.ISO8859-1
8971               else
8972                 # Test for the HP-UX locale name.
8973                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8974                   gt_cv_locale_fr=fr_FR.iso88591
8975                 else
8976                   # Test for the Solaris 7 locale name.
8977                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8978                     gt_cv_locale_fr=fr
8979                   else
8980                     # None found.
8981                     gt_cv_locale_fr=none
8982                   fi
8983                 fi
8984               fi
8985             fi
8986           fi
8987           ;;
8988       esac
8989     fi
8990     rm -fr conftest*
8991    ;;
8992 esac
8993 fi
8994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8995 printf "%s\n" "$gt_cv_locale_fr" >&6; }
8996   LOCALE_FR=$gt_cv_locale_fr
8997
8998
8999
9000
9001
9002   GL_GNULIB_BTOWC=0
9003
9004
9005
9006   GL_GNULIB_WCTOB=0
9007
9008
9009
9010   GL_GNULIB_MBSINIT=0
9011
9012
9013
9014   GL_GNULIB_MBRTOWC=0
9015
9016
9017
9018   GL_GNULIB_MBRLEN=0
9019
9020
9021
9022   GL_GNULIB_MBSRTOWCS=0
9023
9024
9025
9026   GL_GNULIB_MBSNRTOWCS=0
9027
9028
9029
9030   GL_GNULIB_WCRTOMB=0
9031
9032
9033
9034   GL_GNULIB_WCSRTOMBS=0
9035
9036
9037
9038   GL_GNULIB_WCSNRTOMBS=0
9039
9040
9041
9042   GL_GNULIB_WCWIDTH=0
9043
9044
9045
9046   GL_GNULIB_WMEMCHR=0
9047
9048
9049
9050   GL_GNULIB_WMEMCMP=0
9051
9052
9053
9054   GL_GNULIB_WMEMCPY=0
9055
9056
9057
9058   GL_GNULIB_WMEMMOVE=0
9059
9060
9061
9062   GL_GNULIB_WMEMPCPY=0
9063
9064
9065
9066   GL_GNULIB_WMEMSET=0
9067
9068
9069
9070   GL_GNULIB_WCSLEN=0
9071
9072
9073
9074   GL_GNULIB_WCSNLEN=0
9075
9076
9077
9078   GL_GNULIB_WCSCPY=0
9079
9080
9081
9082   GL_GNULIB_WCPCPY=0
9083
9084
9085
9086   GL_GNULIB_WCSNCPY=0
9087
9088
9089
9090   GL_GNULIB_WCPNCPY=0
9091
9092
9093
9094   GL_GNULIB_WCSCAT=0
9095
9096
9097
9098   GL_GNULIB_WCSNCAT=0
9099
9100
9101
9102   GL_GNULIB_WCSCMP=0
9103
9104
9105
9106   GL_GNULIB_WCSNCMP=0
9107
9108
9109
9110   GL_GNULIB_WCSCASECMP=0
9111
9112
9113
9114   GL_GNULIB_WCSNCASECMP=0
9115
9116
9117
9118   GL_GNULIB_WCSCOLL=0
9119
9120
9121
9122   GL_GNULIB_WCSXFRM=0
9123
9124
9125
9126   GL_GNULIB_WCSDUP=0
9127
9128
9129
9130   GL_GNULIB_WCSCHR=0
9131
9132
9133
9134   GL_GNULIB_WCSRCHR=0
9135
9136
9137
9138   GL_GNULIB_WCSCSPN=0
9139
9140
9141
9142   GL_GNULIB_WCSSPN=0
9143
9144
9145
9146   GL_GNULIB_WCSPBRK=0
9147
9148
9149
9150   GL_GNULIB_WCSSTR=0
9151
9152
9153
9154   GL_GNULIB_WCSTOK=0
9155
9156
9157
9158   GL_GNULIB_WCSWIDTH=0
9159
9160
9161
9162   GL_GNULIB_WCSFTIME=0
9163
9164
9165
9166   GL_GNULIB_MDA_WCSDUP=1
9167
9168
9169
9170
9171
9172   GL_GNULIB__EXIT=0
9173
9174
9175
9176   GL_GNULIB_ALIGNED_ALLOC=0
9177
9178
9179
9180   GL_GNULIB_ATOLL=0
9181
9182
9183
9184   GL_GNULIB_CALLOC_GNU=0
9185
9186
9187
9188   GL_GNULIB_CALLOC_POSIX=0
9189
9190
9191
9192   GL_GNULIB_CANONICALIZE_FILE_NAME=0
9193
9194
9195
9196   GL_GNULIB_FREE_POSIX=0
9197
9198
9199
9200   GL_GNULIB_GETLOADAVG=0
9201
9202
9203
9204   GL_GNULIB_GETPROGNAME=0
9205
9206
9207
9208   GL_GNULIB_GETSUBOPT=0
9209
9210
9211
9212   GL_GNULIB_GRANTPT=0
9213
9214
9215
9216   GL_GNULIB_MALLOC_GNU=0
9217
9218
9219
9220   GL_GNULIB_MALLOC_POSIX=0
9221
9222
9223
9224   GL_GNULIB_MBSTOWCS=0
9225
9226
9227
9228   GL_GNULIB_MBTOWC=0
9229
9230
9231
9232   GL_GNULIB_MKDTEMP=0
9233
9234
9235
9236   GL_GNULIB_MKOSTEMP=0
9237
9238
9239
9240   GL_GNULIB_MKOSTEMPS=0
9241
9242
9243
9244   GL_GNULIB_MKSTEMP=0
9245
9246
9247
9248   GL_GNULIB_MKSTEMPS=0
9249
9250
9251
9252   GL_GNULIB_POSIX_MEMALIGN=0
9253
9254
9255
9256   GL_GNULIB_POSIX_OPENPT=0
9257
9258
9259
9260   GL_GNULIB_PTSNAME=0
9261
9262
9263
9264   GL_GNULIB_PTSNAME_R=0
9265
9266
9267
9268   GL_GNULIB_PUTENV=0
9269
9270
9271
9272   GL_GNULIB_QSORT_R=0
9273
9274
9275
9276   GL_GNULIB_RANDOM=0
9277
9278
9279
9280   GL_GNULIB_RANDOM_R=0
9281
9282
9283
9284   GL_GNULIB_REALLOCARRAY=0
9285
9286
9287
9288   GL_GNULIB_REALLOC_GNU=0
9289
9290
9291
9292   GL_GNULIB_REALLOC_POSIX=0
9293
9294
9295
9296   GL_GNULIB_REALPATH=0
9297
9298
9299
9300   GL_GNULIB_RPMATCH=0
9301
9302
9303
9304   GL_GNULIB_SECURE_GETENV=0
9305
9306
9307
9308   GL_GNULIB_SETENV=0
9309
9310
9311
9312   GL_GNULIB_STRTOD=0
9313
9314
9315
9316   GL_GNULIB_STRTOL=0
9317
9318
9319
9320   GL_GNULIB_STRTOLD=0
9321
9322
9323
9324   GL_GNULIB_STRTOLL=0
9325
9326
9327
9328   GL_GNULIB_STRTOUL=0
9329
9330
9331
9332   GL_GNULIB_STRTOULL=0
9333
9334
9335
9336   GL_GNULIB_SYSTEM_POSIX=0
9337
9338
9339
9340   GL_GNULIB_UNLOCKPT=0
9341
9342
9343
9344   GL_GNULIB_UNSETENV=0
9345
9346
9347
9348   GL_GNULIB_WCTOMB=0
9349
9350
9351
9352   GL_GNULIB_MDA_ECVT=1
9353
9354
9355
9356   GL_GNULIB_MDA_FCVT=1
9357
9358
9359
9360   GL_GNULIB_MDA_GCVT=1
9361
9362
9363
9364   GL_GNULIB_MDA_MKTEMP=1
9365
9366
9367
9368   GL_GNULIB_MDA_PUTENV=1
9369
9370
9371
9372
9373     HAVE__EXIT=1;
9374   HAVE_ALIGNED_ALLOC=1;
9375   HAVE_ATOLL=1;
9376   HAVE_CANONICALIZE_FILE_NAME=1;
9377   HAVE_DECL_ECVT=1;
9378   HAVE_DECL_FCVT=1;
9379   HAVE_DECL_GCVT=1;
9380   HAVE_DECL_GETLOADAVG=1;
9381   HAVE_DECL_PROGRAM_INVOCATION_NAME=1;
9382   HAVE_GETPROGNAME=1;
9383   HAVE_GETSUBOPT=1;
9384   HAVE_GRANTPT=1;
9385   HAVE_INITSTATE=1;
9386   HAVE_DECL_INITSTATE=1;
9387   HAVE_MBTOWC=1;
9388   HAVE_MKDTEMP=1;
9389   HAVE_MKOSTEMP=1;
9390   HAVE_MKOSTEMPS=1;
9391   HAVE_MKSTEMP=1;
9392   HAVE_MKSTEMPS=1;
9393   HAVE_POSIX_MEMALIGN=1;
9394   HAVE_POSIX_OPENPT=1;
9395   HAVE_PTSNAME=1;
9396   HAVE_PTSNAME_R=1;
9397   HAVE_QSORT_R=1;
9398   HAVE_RANDOM=1;
9399   HAVE_RANDOM_H=1;
9400   HAVE_RANDOM_R=1;
9401   HAVE_REALLOCARRAY=1;
9402   HAVE_REALPATH=1;
9403   HAVE_RPMATCH=1;
9404   HAVE_SECURE_GETENV=1;
9405   HAVE_SETENV=1;
9406   HAVE_DECL_SETENV=1;
9407   HAVE_SETSTATE=1;
9408   HAVE_DECL_SETSTATE=1;
9409   HAVE_STRTOD=1;
9410   HAVE_STRTOL=1;
9411   HAVE_STRTOLD=1;
9412   HAVE_STRTOLL=1;
9413   HAVE_STRTOUL=1;
9414   HAVE_STRTOULL=1;
9415   HAVE_STRUCT_RANDOM_DATA=1;
9416   HAVE_SYS_LOADAVG_H=0;
9417   HAVE_UNLOCKPT=1;
9418   HAVE_DECL_UNSETENV=1;
9419   REPLACE__EXIT=0;
9420   REPLACE_ALIGNED_ALLOC=0;
9421   REPLACE_CALLOC_FOR_CALLOC_GNU=0;
9422   REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
9423   REPLACE_CANONICALIZE_FILE_NAME=0;
9424   REPLACE_FREE=0;
9425   REPLACE_GETLOADAVG=0;
9426   REPLACE_GETPROGNAME=0;
9427   REPLACE_GETSUBOPT=0;
9428   REPLACE_INITSTATE=0;
9429   REPLACE_MALLOC_FOR_MALLOC_GNU=0;
9430   REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
9431   REPLACE_MB_CUR_MAX=0;
9432   REPLACE_MBSTOWCS=0;
9433   REPLACE_MBTOWC=0;
9434   REPLACE_MKOSTEMP=0;
9435   REPLACE_MKOSTEMPS=0;
9436   REPLACE_MKSTEMP=0;
9437   REPLACE_POSIX_MEMALIGN=0;
9438   REPLACE_POSIX_OPENPT=0;
9439   REPLACE_PTSNAME=0;
9440   REPLACE_PTSNAME_R=0;
9441   REPLACE_PUTENV=0;
9442   REPLACE_QSORT_R=0;
9443   REPLACE_RANDOM=0;
9444   REPLACE_RANDOM_R=0;
9445   REPLACE_REALLOC_FOR_REALLOC_GNU=0;
9446   REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
9447   REPLACE_REALLOCARRAY=0;
9448   REPLACE_REALPATH=0;
9449   REPLACE_SETENV=0;
9450   REPLACE_SETSTATE=0;
9451   REPLACE_STRTOD=0;
9452   REPLACE_STRTOL=0;
9453   REPLACE_STRTOLD=0;
9454   REPLACE_STRTOLL=0;
9455   REPLACE_STRTOUL=0;
9456   REPLACE_STRTOULL=0;
9457   REPLACE_UNSETENV=0;
9458   REPLACE_WCTOMB=0;
9459
9460
9461       if test "X$prefix" = "XNONE"; then
9462     acl_final_prefix="$ac_default_prefix"
9463   else
9464     acl_final_prefix="$prefix"
9465   fi
9466   if test "X$exec_prefix" = "XNONE"; then
9467     acl_final_exec_prefix='${prefix}'
9468   else
9469     acl_final_exec_prefix="$exec_prefix"
9470   fi
9471   acl_save_prefix="$prefix"
9472   prefix="$acl_final_prefix"
9473   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9474   prefix="$acl_save_prefix"
9475
9476
9477
9478 # Check whether --with-gnu-ld was given.
9479 if test ${with_gnu_ld+y}
9480 then :
9481   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9482 else case e in #(
9483   e) with_gnu_ld=no ;;
9484 esac
9485 fi
9486
9487 # Prepare PATH_SEPARATOR.
9488 # The user is always right.
9489 if test "${PATH_SEPARATOR+set}" != set; then
9490   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9491   # contains only /bin. Note that ksh looks also at the FPATH variable,
9492   # so we have to set that as well for the test.
9493   PATH_SEPARATOR=:
9494   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9495     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9496            || PATH_SEPARATOR=';'
9497        }
9498 fi
9499
9500 if test -n "$LD"; then
9501   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
9502 printf %s "checking for ld... " >&6; }
9503 elif test "$GCC" = yes; then
9504   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9505 printf %s "checking for ld used by $CC... " >&6; }
9506 elif test "$with_gnu_ld" = yes; then
9507   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9508 printf %s "checking for GNU ld... " >&6; }
9509 else
9510   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9511 printf %s "checking for non-GNU ld... " >&6; }
9512 fi
9513 if test -n "$LD"; then
9514   # Let the user override the test with a path.
9515   :
9516 else
9517   if test ${acl_cv_path_LD+y}
9518 then :
9519   printf %s "(cached) " >&6
9520 else case e in #(
9521   e)
9522     acl_cv_path_LD= # Final result of this test
9523     ac_prog=ld # Program to search in $PATH
9524     if test "$GCC" = yes; then
9525       # Check if gcc -print-prog-name=ld gives a path.
9526       case $host in
9527         *-*-mingw*)
9528           # gcc leaves a trailing carriage return which upsets mingw
9529           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9530         *)
9531           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
9532       esac
9533       case $acl_output in
9534         # Accept absolute paths.
9535         [\\/]* | ?:[\\/]*)
9536           re_direlt='/[^/][^/]*/\.\./'
9537           # Canonicalize the pathname of ld
9538           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
9539           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
9540             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
9541           done
9542           # Got the pathname. No search in PATH is needed.
9543           acl_cv_path_LD="$acl_output"
9544           ac_prog=
9545           ;;
9546         "")
9547           # If it fails, then pretend we aren't using GCC.
9548           ;;
9549         *)
9550           # If it is relative, then search for the first ld in PATH.
9551           with_gnu_ld=unknown
9552           ;;
9553       esac
9554     fi
9555     if test -n "$ac_prog"; then
9556       # Search for $ac_prog in $PATH.
9557       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9558       for ac_dir in $PATH; do
9559         IFS="$acl_save_ifs"
9560         test -z "$ac_dir" && ac_dir=.
9561         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9562           acl_cv_path_LD="$ac_dir/$ac_prog"
9563           # Check to see if the program is GNU ld.  I'd rather use --version,
9564           # but apparently some variants of GNU ld only accept -v.
9565           # Break only if it was the GNU/non-GNU ld that we prefer.
9566           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
9567             *GNU* | *'with BFD'*)
9568               test "$with_gnu_ld" != no && break
9569               ;;
9570             *)
9571               test "$with_gnu_ld" != yes && break
9572               ;;
9573           esac
9574         fi
9575       done
9576       IFS="$acl_save_ifs"
9577     fi
9578     case $host in
9579       *-*-aix*)
9580         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581 /* end confdefs.h.  */
9582 #if defined __powerpc64__ || defined __LP64__
9583                 int ok;
9584                #else
9585                 error fail
9586                #endif
9587
9588 _ACEOF
9589 if ac_fn_c_try_compile "$LINENO"
9590 then :
9591   # The compiler produces 64-bit code. Add option '-b64' so that the
9592            # linker groks 64-bit object files.
9593            case "$acl_cv_path_LD " in
9594              *" -b64 "*) ;;
9595              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
9596            esac
9597
9598 fi
9599 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9600         ;;
9601       sparc64-*-netbsd*)
9602         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9603 /* end confdefs.h.  */
9604 #if defined __sparcv9 || defined __arch64__
9605                 int ok;
9606                #else
9607                 error fail
9608                #endif
9609
9610 _ACEOF
9611 if ac_fn_c_try_compile "$LINENO"
9612 then :
9613
9614 else case e in #(
9615   e) # The compiler produces 32-bit code. Add option '-m elf32_sparc'
9616            # so that the linker groks 32-bit object files.
9617            case "$acl_cv_path_LD " in
9618              *" -m elf32_sparc "*) ;;
9619              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
9620            esac
9621            ;;
9622 esac
9623 fi
9624 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9625         ;;
9626     esac
9627    ;;
9628 esac
9629 fi
9630
9631   LD="$acl_cv_path_LD"
9632 fi
9633 if test -n "$LD"; then
9634   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9635 printf "%s\n" "$LD" >&6; }
9636 else
9637   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638 printf "%s\n" "no" >&6; }
9639   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9640 fi
9641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9642 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
9643 if test ${acl_cv_prog_gnu_ld+y}
9644 then :
9645   printf %s "(cached) " >&6
9646 else case e in #(
9647   e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
9648 case `$LD -v 2>&1 </dev/null` in
9649 *GNU* | *'with BFD'*)
9650   acl_cv_prog_gnu_ld=yes
9651   ;;
9652 *)
9653   acl_cv_prog_gnu_ld=no
9654   ;;
9655 esac ;;
9656 esac
9657 fi
9658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9659 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
9660 with_gnu_ld=$acl_cv_prog_gnu_ld
9661
9662
9663
9664
9665
9666                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9667 printf %s "checking for shared library run path origin... " >&6; }
9668 if test ${acl_cv_rpath+y}
9669 then :
9670   printf %s "(cached) " >&6
9671 else case e in #(
9672   e)
9673     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9674     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9675     . ./conftest.sh
9676     rm -f ./conftest.sh
9677     acl_cv_rpath=done
9678    ;;
9679 esac
9680 fi
9681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9682 printf "%s\n" "$acl_cv_rpath" >&6; }
9683   wl="$acl_cv_wl"
9684   acl_libext="$acl_cv_libext"
9685   acl_shlibext="$acl_cv_shlibext"
9686   acl_libname_spec="$acl_cv_libname_spec"
9687   acl_library_names_spec="$acl_cv_library_names_spec"
9688   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9689   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9690   acl_hardcode_direct="$acl_cv_hardcode_direct"
9691   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9692     # Check whether --enable-rpath was given.
9693 if test ${enable_rpath+y}
9694 then :
9695   enableval=$enable_rpath; :
9696 else case e in #(
9697   e) enable_rpath=yes ;;
9698 esac
9699 fi
9700
9701
9702
9703
9704   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
9705 printf %s "checking 32-bit host C ABI... " >&6; }
9706 if test ${gl_cv_host_cpu_c_abi_32bit+y}
9707 then :
9708   printf %s "(cached) " >&6
9709 else case e in #(
9710   e) if test -n "$gl_cv_host_cpu_c_abi"; then
9711        case "$gl_cv_host_cpu_c_abi" in
9712          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
9713            gl_cv_host_cpu_c_abi_32bit=yes ;;
9714          x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
9715            gl_cv_host_cpu_c_abi_32bit=no ;;
9716          *)
9717            gl_cv_host_cpu_c_abi_32bit=unknown ;;
9718        esac
9719      else
9720        case "$host_cpu" in
9721
9722          # CPUs that only support a 32-bit ABI.
9723          arc \
9724          | bfin \
9725          | cris* \
9726          | csky \
9727          | epiphany \
9728          | ft32 \
9729          | h8300 \
9730          | m68k \
9731          | microblaze | microblazeel \
9732          | nds32 | nds32le | nds32be \
9733          | nios2 | nios2eb | nios2el \
9734          | or1k* \
9735          | or32 \
9736          | sh | sh1234 | sh1234elb \
9737          | tic6x \
9738          | xtensa* )
9739            gl_cv_host_cpu_c_abi_32bit=yes
9740            ;;
9741
9742          # CPUs that only support a 64-bit ABI.
9743          alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
9744          | mmix )
9745            gl_cv_host_cpu_c_abi_32bit=no
9746            ;;
9747
9748          i[34567]86 )
9749            gl_cv_host_cpu_c_abi_32bit=yes
9750            ;;
9751
9752          x86_64 )
9753            # On x86_64 systems, the C compiler may be generating code in one of
9754            # these ABIs:
9755            # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
9756            # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
9757            #   with native Windows (mingw, MSVC).
9758            # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
9759            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
9760            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761 /* end confdefs.h.  */
9762 #if (defined __x86_64__ || defined __amd64__ \
9763                        || defined _M_X64 || defined _M_AMD64) \
9764                       && !(defined __ILP32__ || defined _ILP32)
9765                    int ok;
9766                   #else
9767                    error fail
9768                   #endif
9769
9770 _ACEOF
9771 if ac_fn_c_try_compile "$LINENO"
9772 then :
9773   gl_cv_host_cpu_c_abi_32bit=no
9774 else case e in #(
9775   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9776 esac
9777 fi
9778 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9779            ;;
9780
9781          arm* | aarch64 )
9782            # Assume arm with EABI.
9783            # On arm64 systems, the C compiler may be generating code in one of
9784            # these ABIs:
9785            # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
9786            # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
9787            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
9788            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9789 /* end confdefs.h.  */
9790 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
9791                    int ok;
9792                   #else
9793                    error fail
9794                   #endif
9795
9796 _ACEOF
9797 if ac_fn_c_try_compile "$LINENO"
9798 then :
9799   gl_cv_host_cpu_c_abi_32bit=no
9800 else case e in #(
9801   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9802 esac
9803 fi
9804 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9805            ;;
9806
9807          hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
9808            # On hppa, the C compiler may be generating 32-bit code or 64-bit
9809            # code. In the latter case, it defines _LP64 and __LP64__.
9810            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811 /* end confdefs.h.  */
9812 #ifdef __LP64__
9813                    int ok;
9814                   #else
9815                    error fail
9816                   #endif
9817
9818 _ACEOF
9819 if ac_fn_c_try_compile "$LINENO"
9820 then :
9821   gl_cv_host_cpu_c_abi_32bit=no
9822 else case e in #(
9823   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9824 esac
9825 fi
9826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9827            ;;
9828
9829          ia64* )
9830            # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
9831            # 32-bit code. In the latter case, it defines _ILP32.
9832            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h.  */
9834 #ifdef _ILP32
9835                    int ok;
9836                   #else
9837                    error fail
9838                   #endif
9839
9840 _ACEOF
9841 if ac_fn_c_try_compile "$LINENO"
9842 then :
9843   gl_cv_host_cpu_c_abi_32bit=yes
9844 else case e in #(
9845   e) gl_cv_host_cpu_c_abi_32bit=no ;;
9846 esac
9847 fi
9848 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9849            ;;
9850
9851          mips* )
9852            # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
9853            # at 32.
9854            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855 /* end confdefs.h.  */
9856 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
9857                    int ok;
9858                   #else
9859                    error fail
9860                   #endif
9861
9862 _ACEOF
9863 if ac_fn_c_try_compile "$LINENO"
9864 then :
9865   gl_cv_host_cpu_c_abi_32bit=no
9866 else case e in #(
9867   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9868 esac
9869 fi
9870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9871            ;;
9872
9873          powerpc* )
9874            # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
9875            # No need to distinguish them here; the caller may distinguish
9876            # them based on the OS.
9877            # On powerpc64 systems, the C compiler may still be generating
9878            # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
9879            # be generating 64-bit code.
9880            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9881 /* end confdefs.h.  */
9882 #if defined __powerpc64__ || defined __LP64__
9883                    int ok;
9884                   #else
9885                    error fail
9886                   #endif
9887
9888 _ACEOF
9889 if ac_fn_c_try_compile "$LINENO"
9890 then :
9891   gl_cv_host_cpu_c_abi_32bit=no
9892 else case e in #(
9893   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9894 esac
9895 fi
9896 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9897            ;;
9898
9899          rs6000 )
9900            gl_cv_host_cpu_c_abi_32bit=yes
9901            ;;
9902
9903          riscv32 | riscv64 )
9904            # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
9905            # Size of 'long' and 'void *':
9906            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9907 /* end confdefs.h.  */
9908 #if defined __LP64__
9909                     int ok;
9910                   #else
9911                     error fail
9912                   #endif
9913
9914 _ACEOF
9915 if ac_fn_c_try_compile "$LINENO"
9916 then :
9917   gl_cv_host_cpu_c_abi_32bit=no
9918 else case e in #(
9919   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9920 esac
9921 fi
9922 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9923            ;;
9924
9925          s390* )
9926            # On s390x, the C compiler may be generating 64-bit (= s390x) code
9927            # or 31-bit (= s390) code.
9928            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9929 /* end confdefs.h.  */
9930 #if defined __LP64__ || defined __s390x__
9931                     int ok;
9932                   #else
9933                     error fail
9934                   #endif
9935
9936 _ACEOF
9937 if ac_fn_c_try_compile "$LINENO"
9938 then :
9939   gl_cv_host_cpu_c_abi_32bit=no
9940 else case e in #(
9941   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9942 esac
9943 fi
9944 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9945            ;;
9946
9947          sparc | sparc64 )
9948            # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
9949            # C compiler still generates 32-bit code.
9950            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9951 /* end confdefs.h.  */
9952 #if defined __sparcv9 || defined __arch64__
9953                    int ok;
9954                   #else
9955                    error fail
9956                   #endif
9957
9958 _ACEOF
9959 if ac_fn_c_try_compile "$LINENO"
9960 then :
9961   gl_cv_host_cpu_c_abi_32bit=no
9962 else case e in #(
9963   e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9964 esac
9965 fi
9966 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9967            ;;
9968
9969          *)
9970            gl_cv_host_cpu_c_abi_32bit=unknown
9971            ;;
9972        esac
9973      fi
9974      ;;
9975 esac
9976 fi
9977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
9978 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
9979
9980   HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
9981
9982
9983
9984
9985
9986   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
9987 printf %s "checking for ELF binary format... " >&6; }
9988 if test ${gl_cv_elf+y}
9989 then :
9990   printf %s "(cached) " >&6
9991 else case e in #(
9992   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h.  */
9994 #if defined __ELF__ || (defined __linux__ && defined __EDG__)
9995         Extensible Linking Format
9996         #endif
9997
9998 _ACEOF
9999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10000   $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
10001 then :
10002   gl_cv_elf=yes
10003 else case e in #(
10004   e) gl_cv_elf=no ;;
10005 esac
10006 fi
10007 rm -rf conftest*
10008
10009      ;;
10010 esac
10011 fi
10012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
10013 printf "%s\n" "$gl_cv_elf" >&6; }
10014   if test $gl_cv_elf = yes; then
10015     # Extract the ELF class of a file (5th byte) in decimal.
10016     # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
10017     if od -A x < /dev/null >/dev/null 2>/dev/null; then
10018       # Use POSIX od.
10019       func_elfclass ()
10020       {
10021         od -A n -t d1 -j 4 -N 1
10022       }
10023     else
10024       # Use BSD hexdump.
10025       func_elfclass ()
10026       {
10027         dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
10028         echo
10029       }
10030     fi
10031     # Use 'expr', not 'test', to compare the values of func_elfclass, because on
10032     # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
10033     # not 1 or 2.
10034     case $HOST_CPU_C_ABI_32BIT in
10035       yes)
10036         # 32-bit ABI.
10037         acl_is_expected_elfclass ()
10038         {
10039           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 1 > /dev/null
10040         }
10041         ;;
10042       no)
10043         # 64-bit ABI.
10044         acl_is_expected_elfclass ()
10045         {
10046           expr "`func_elfclass | sed -e 's/[    ]//g'`" = 2 > /dev/null
10047         }
10048         ;;
10049       *)
10050         # Unknown.
10051         acl_is_expected_elfclass ()
10052         {
10053           :
10054         }
10055         ;;
10056     esac
10057   else
10058     acl_is_expected_elfclass ()
10059     {
10060       :
10061     }
10062   fi
10063
10064     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
10065 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
10066 if test ${acl_cv_libdirstems+y}
10067 then :
10068   printf %s "(cached) " >&6
10069 else case e in #(
10070   e)           acl_libdirstem=lib
10071      acl_libdirstem2=
10072      acl_libdirstem3=
10073      case "$host_os" in
10074        solaris*)
10075                                                       if test $HOST_CPU_C_ABI_32BIT = no; then
10076            acl_libdirstem2=lib/64
10077            case "$host_cpu" in
10078              sparc*)        acl_libdirstem3=lib/sparcv9 ;;
10079              i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
10080            esac
10081          fi
10082          ;;
10083        *)
10084                                                                                  searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
10085                      | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
10086          if test $HOST_CPU_C_ABI_32BIT != no; then
10087            # 32-bit or unknown ABI.
10088            if test -d /usr/lib32; then
10089              acl_libdirstem2=lib32
10090            fi
10091          fi
10092          if test $HOST_CPU_C_ABI_32BIT != yes; then
10093            # 64-bit or unknown ABI.
10094            if test -d /usr/lib64; then
10095              acl_libdirstem3=lib64
10096            fi
10097          fi
10098          if test -n "$searchpath"; then
10099            acl_save_IFS="${IFS=         }"; IFS=":"
10100            for searchdir in $searchpath; do
10101              if test -d "$searchdir"; then
10102                case "$searchdir" in
10103                  */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
10104                  */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
10105                  */../ | */.. )
10106                    # Better ignore directories of this form. They are misleading.
10107                    ;;
10108                  *) searchdir=`cd "$searchdir" && pwd`
10109                     case "$searchdir" in
10110                       */lib32 ) acl_libdirstem2=lib32 ;;
10111                       */lib64 ) acl_libdirstem3=lib64 ;;
10112                     esac ;;
10113                esac
10114              fi
10115            done
10116            IFS="$acl_save_IFS"
10117            if test $HOST_CPU_C_ABI_32BIT = yes; then
10118              # 32-bit ABI.
10119              acl_libdirstem3=
10120            fi
10121            if test $HOST_CPU_C_ABI_32BIT = no; then
10122              # 64-bit ABI.
10123              acl_libdirstem2=
10124            fi
10125          fi
10126          ;;
10127      esac
10128      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
10129      test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
10130      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
10131      ;;
10132 esac
10133 fi
10134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
10135 printf "%s\n" "$acl_cv_libdirstems" >&6; }
10136       acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
10137   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
10138   acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
10139
10140
10141
10142 # Check whether --with-libsigsegv was given.
10143 if test ${with_libsigsegv+y}
10144 then :
10145   withval=$with_libsigsegv;
10146 fi
10147
10148   if test "$with_libsigsegv" = yes; then
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162     use_additional=yes
10163
10164   acl_save_prefix="$prefix"
10165   prefix="$acl_final_prefix"
10166   acl_save_exec_prefix="$exec_prefix"
10167   exec_prefix="$acl_final_exec_prefix"
10168
10169     eval additional_includedir=\"$includedir\"
10170     eval additional_libdir=\"$libdir\"
10171     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
10172     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
10173
10174   exec_prefix="$acl_save_exec_prefix"
10175   prefix="$acl_save_prefix"
10176
10177
10178 # Check whether --with-libsigsegv-prefix was given.
10179 if test ${with_libsigsegv_prefix+y}
10180 then :
10181   withval=$with_libsigsegv_prefix;
10182     if test "X$withval" = "Xno"; then
10183       use_additional=no
10184     else
10185       if test "X$withval" = "X"; then
10186
10187   acl_save_prefix="$prefix"
10188   prefix="$acl_final_prefix"
10189   acl_save_exec_prefix="$exec_prefix"
10190   exec_prefix="$acl_final_exec_prefix"
10191
10192           eval additional_includedir=\"$includedir\"
10193           eval additional_libdir=\"$libdir\"
10194           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
10195           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
10196
10197   exec_prefix="$acl_save_exec_prefix"
10198   prefix="$acl_save_prefix"
10199
10200       else
10201         additional_includedir="$withval/include"
10202         additional_libdir="$withval/$acl_libdirstem"
10203         additional_libdir2="$withval/$acl_libdirstem2"
10204         additional_libdir3="$withval/$acl_libdirstem3"
10205       fi
10206     fi
10207
10208 fi
10209
10210   if test "X$additional_libdir2" = "X$additional_libdir"; then
10211     additional_libdir2=
10212   fi
10213   if test "X$additional_libdir3" = "X$additional_libdir"; then
10214     additional_libdir3=
10215   fi
10216       LIBSIGSEGV=
10217   LTLIBSIGSEGV=
10218   INCSIGSEGV=
10219   LIBSIGSEGV_PREFIX=
10220       HAVE_LIBSIGSEGV=
10221   rpathdirs=
10222   ltrpathdirs=
10223   names_already_handled=
10224   names_next_round='sigsegv '
10225   while test -n "$names_next_round"; do
10226     names_this_round="$names_next_round"
10227     names_next_round=
10228     for name in $names_this_round; do
10229       already_handled=
10230       for n in $names_already_handled; do
10231         if test "$n" = "$name"; then
10232           already_handled=yes
10233           break
10234         fi
10235       done
10236       if test -z "$already_handled"; then
10237         names_already_handled="$names_already_handled $name"
10238                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
10239         eval value=\"\$HAVE_LIB$uppername\"
10240         if test -n "$value"; then
10241           if test "$value" = yes; then
10242             eval value=\"\$LIB$uppername\"
10243             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
10244             eval value=\"\$LTLIB$uppername\"
10245             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
10246           else
10247                                     :
10248           fi
10249         else
10250                               found_dir=
10251           found_la=
10252           found_so=
10253           found_a=
10254           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
10255           if test -n "$acl_shlibext"; then
10256             shrext=".$acl_shlibext"             # typically: shrext=.so
10257           else
10258             shrext=
10259           fi
10260           if test $use_additional = yes; then
10261             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
10262               if test "X$found_dir" = "X"; then
10263                 eval dir=\$$additional_libdir_variable
10264                 if test -n "$dir"; then
10265                                                       if test -n "$acl_shlibext"; then
10266                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
10267                       found_dir="$dir"
10268                       found_so="$dir/$libname$shrext"
10269                     else
10270                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10271                         ver=`(cd "$dir" && \
10272                               for f in "$libname$shrext".*; do echo "$f"; done \
10273                               | sed -e "s,^$libname$shrext\\\\.,," \
10274                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10275                               | sed 1q ) 2>/dev/null`
10276                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
10277                           found_dir="$dir"
10278                           found_so="$dir/$libname$shrext.$ver"
10279                         fi
10280                       else
10281                         eval library_names=\"$acl_library_names_spec\"
10282                         for f in $library_names; do
10283                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
10284                             found_dir="$dir"
10285                             found_so="$dir/$f"
10286                             break
10287                           fi
10288                         done
10289                       fi
10290                     fi
10291                   fi
10292                                     if test "X$found_dir" = "X"; then
10293                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
10294                       found_dir="$dir"
10295                       found_a="$dir/$libname.$acl_libext"
10296                     fi
10297                   fi
10298                   if test "X$found_dir" != "X"; then
10299                     if test -f "$dir/$libname.la"; then
10300                       found_la="$dir/$libname.la"
10301                     fi
10302                   fi
10303                 fi
10304               fi
10305             done
10306           fi
10307           if test "X$found_dir" = "X"; then
10308             for x in $LDFLAGS $LTLIBSIGSEGV; do
10309
10310   acl_save_prefix="$prefix"
10311   prefix="$acl_final_prefix"
10312   acl_save_exec_prefix="$exec_prefix"
10313   exec_prefix="$acl_final_exec_prefix"
10314   eval x=\"$x\"
10315   exec_prefix="$acl_save_exec_prefix"
10316   prefix="$acl_save_prefix"
10317
10318               case "$x" in
10319                 -L*)
10320                   dir=`echo "X$x" | sed -e 's/^X-L//'`
10321                                     if test -n "$acl_shlibext"; then
10322                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
10323                       found_dir="$dir"
10324                       found_so="$dir/$libname$shrext"
10325                     else
10326                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10327                         ver=`(cd "$dir" && \
10328                               for f in "$libname$shrext".*; do echo "$f"; done \
10329                               | sed -e "s,^$libname$shrext\\\\.,," \
10330                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10331                               | sed 1q ) 2>/dev/null`
10332                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
10333                           found_dir="$dir"
10334                           found_so="$dir/$libname$shrext.$ver"
10335                         fi
10336                       else
10337                         eval library_names=\"$acl_library_names_spec\"
10338                         for f in $library_names; do
10339                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
10340                             found_dir="$dir"
10341                             found_so="$dir/$f"
10342                             break
10343                           fi
10344                         done
10345                       fi
10346                     fi
10347                   fi
10348                                     if test "X$found_dir" = "X"; then
10349                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
10350                       found_dir="$dir"
10351                       found_a="$dir/$libname.$acl_libext"
10352                     fi
10353                   fi
10354                   if test "X$found_dir" != "X"; then
10355                     if test -f "$dir/$libname.la"; then
10356                       found_la="$dir/$libname.la"
10357                     fi
10358                   fi
10359                   ;;
10360               esac
10361               if test "X$found_dir" != "X"; then
10362                 break
10363               fi
10364             done
10365           fi
10366           if test "X$found_dir" != "X"; then
10367                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
10368             if test "X$found_so" != "X"; then
10369                                                         if test "$enable_rpath" = no \
10370                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10371                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
10372                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
10373                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10374               else
10375                                                                                 haveit=
10376                 for x in $ltrpathdirs; do
10377                   if test "X$x" = "X$found_dir"; then
10378                     haveit=yes
10379                     break
10380                   fi
10381                 done
10382                 if test -z "$haveit"; then
10383                   ltrpathdirs="$ltrpathdirs $found_dir"
10384                 fi
10385                                 if test "$acl_hardcode_direct" = yes; then
10386                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10387                 else
10388                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
10389                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10390                                                             haveit=
10391                     for x in $rpathdirs; do
10392                       if test "X$x" = "X$found_dir"; then
10393                         haveit=yes
10394                         break
10395                       fi
10396                     done
10397                     if test -z "$haveit"; then
10398                       rpathdirs="$rpathdirs $found_dir"
10399                     fi
10400                   else
10401                                                                                 haveit=
10402                     for x in $LDFLAGS $LIBSIGSEGV; do
10403
10404   acl_save_prefix="$prefix"
10405   prefix="$acl_final_prefix"
10406   acl_save_exec_prefix="$exec_prefix"
10407   exec_prefix="$acl_final_exec_prefix"
10408   eval x=\"$x\"
10409   exec_prefix="$acl_save_exec_prefix"
10410   prefix="$acl_save_prefix"
10411
10412                       if test "X$x" = "X-L$found_dir"; then
10413                         haveit=yes
10414                         break
10415                       fi
10416                     done
10417                     if test -z "$haveit"; then
10418                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
10419                     fi
10420                     if test "$acl_hardcode_minus_L" != no; then
10421                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10422                     else
10423                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
10424                     fi
10425                   fi
10426                 fi
10427               fi
10428             else
10429               if test "X$found_a" != "X"; then
10430                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
10431               else
10432                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
10433               fi
10434             fi
10435                         additional_includedir=
10436             case "$found_dir" in
10437               */$acl_libdirstem | */$acl_libdirstem/)
10438                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10439                 if test "$name" = 'sigsegv'; then
10440                   LIBSIGSEGV_PREFIX="$basedir"
10441                 fi
10442                 additional_includedir="$basedir/include"
10443                 ;;
10444               */$acl_libdirstem2 | */$acl_libdirstem2/)
10445                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10446                 if test "$name" = 'sigsegv'; then
10447                   LIBSIGSEGV_PREFIX="$basedir"
10448                 fi
10449                 additional_includedir="$basedir/include"
10450                 ;;
10451               */$acl_libdirstem3 | */$acl_libdirstem3/)
10452                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
10453                 if test "$name" = 'sigsegv'; then
10454                   LIBSIGSEGV_PREFIX="$basedir"
10455                 fi
10456                 additional_includedir="$basedir/include"
10457                 ;;
10458             esac
10459             if test "X$additional_includedir" != "X"; then
10460                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
10461                 haveit=
10462                 if test "X$additional_includedir" = "X/usr/local/include"; then
10463                   if test -n "$GCC"; then
10464                     case $host_os in
10465                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10466                     esac
10467                   fi
10468                 fi
10469                 if test -z "$haveit"; then
10470                   for x in $CPPFLAGS $INCSIGSEGV; do
10471
10472   acl_save_prefix="$prefix"
10473   prefix="$acl_final_prefix"
10474   acl_save_exec_prefix="$exec_prefix"
10475   exec_prefix="$acl_final_exec_prefix"
10476   eval x=\"$x\"
10477   exec_prefix="$acl_save_exec_prefix"
10478   prefix="$acl_save_prefix"
10479
10480                     if test "X$x" = "X-I$additional_includedir"; then
10481                       haveit=yes
10482                       break
10483                     fi
10484                   done
10485                   if test -z "$haveit"; then
10486                     if test -d "$additional_includedir"; then
10487                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
10488                     fi
10489                   fi
10490                 fi
10491               fi
10492             fi
10493                         if test -n "$found_la"; then
10494                                                         save_libdir="$libdir"
10495               case "$found_la" in
10496                 */* | *\\*) . "$found_la" ;;
10497                 *) . "./$found_la" ;;
10498               esac
10499               libdir="$save_libdir"
10500                             for dep in $dependency_libs; do
10501                 case "$dep" in
10502                   -L*)
10503                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10504                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
10505                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
10506                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
10507                       haveit=
10508                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
10509                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
10510                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
10511                         if test -n "$GCC"; then
10512                           case $host_os in
10513                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10514                           esac
10515                         fi
10516                       fi
10517                       if test -z "$haveit"; then
10518                         haveit=
10519                         for x in $LDFLAGS $LIBSIGSEGV; do
10520
10521   acl_save_prefix="$prefix"
10522   prefix="$acl_final_prefix"
10523   acl_save_exec_prefix="$exec_prefix"
10524   exec_prefix="$acl_final_exec_prefix"
10525   eval x=\"$x\"
10526   exec_prefix="$acl_save_exec_prefix"
10527   prefix="$acl_save_prefix"
10528
10529                           if test "X$x" = "X-L$dependency_libdir"; then
10530                             haveit=yes
10531                             break
10532                           fi
10533                         done
10534                         if test -z "$haveit"; then
10535                           if test -d "$dependency_libdir"; then
10536                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
10537                           fi
10538                         fi
10539                         haveit=
10540                         for x in $LDFLAGS $LTLIBSIGSEGV; do
10541
10542   acl_save_prefix="$prefix"
10543   prefix="$acl_final_prefix"
10544   acl_save_exec_prefix="$exec_prefix"
10545   exec_prefix="$acl_final_exec_prefix"
10546   eval x=\"$x\"
10547   exec_prefix="$acl_save_exec_prefix"
10548   prefix="$acl_save_prefix"
10549
10550                           if test "X$x" = "X-L$dependency_libdir"; then
10551                             haveit=yes
10552                             break
10553                           fi
10554                         done
10555                         if test -z "$haveit"; then
10556                           if test -d "$dependency_libdir"; then
10557                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
10558                           fi
10559                         fi
10560                       fi
10561                     fi
10562                     ;;
10563                   -R*)
10564                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10565                     if test "$enable_rpath" != no; then
10566                                                                   haveit=
10567                       for x in $rpathdirs; do
10568                         if test "X$x" = "X$dir"; then
10569                           haveit=yes
10570                           break
10571                         fi
10572                       done
10573                       if test -z "$haveit"; then
10574                         rpathdirs="$rpathdirs $dir"
10575                       fi
10576                                                                   haveit=
10577                       for x in $ltrpathdirs; do
10578                         if test "X$x" = "X$dir"; then
10579                           haveit=yes
10580                           break
10581                         fi
10582                       done
10583                       if test -z "$haveit"; then
10584                         ltrpathdirs="$ltrpathdirs $dir"
10585                       fi
10586                     fi
10587                     ;;
10588                   -l*)
10589                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
10590                     if test "X$dep" != Xc \
10591                        || case $host_os in
10592                             linux* | gnu* | k*bsd*-gnu) false ;;
10593                             *)                          true ;;
10594                           esac; then
10595                       names_next_round="$names_next_round $dep"
10596                     fi
10597                     ;;
10598                   *.la)
10599                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10600                     ;;
10601                   *)
10602                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
10603                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
10604                     ;;
10605                 esac
10606               done
10607             fi
10608           else
10609                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
10610             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
10611           fi
10612         fi
10613       fi
10614     done
10615   done
10616   if test "X$rpathdirs" != "X"; then
10617     if test -n "$acl_hardcode_libdir_separator"; then
10618                         alldirs=
10619       for found_dir in $rpathdirs; do
10620         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
10621       done
10622             acl_save_libdir="$libdir"
10623       libdir="$alldirs"
10624       eval flag=\"$acl_hardcode_libdir_flag_spec\"
10625       libdir="$acl_save_libdir"
10626       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
10627     else
10628             for found_dir in $rpathdirs; do
10629         acl_save_libdir="$libdir"
10630         libdir="$found_dir"
10631         eval flag=\"$acl_hardcode_libdir_flag_spec\"
10632         libdir="$acl_save_libdir"
10633         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
10634       done
10635     fi
10636   fi
10637   if test "X$ltrpathdirs" != "X"; then
10638             for found_dir in $ltrpathdirs; do
10639       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
10640     done
10641   fi
10642
10643
10644
10645
10646
10647
10648         ac_save_CPPFLAGS="$CPPFLAGS"
10649
10650   for element in $INCSIGSEGV; do
10651     haveit=
10652     for x in $CPPFLAGS; do
10653
10654   acl_save_prefix="$prefix"
10655   prefix="$acl_final_prefix"
10656   acl_save_exec_prefix="$exec_prefix"
10657   exec_prefix="$acl_final_exec_prefix"
10658   eval x=\"$x\"
10659   exec_prefix="$acl_save_exec_prefix"
10660   prefix="$acl_save_prefix"
10661
10662       if test "X$x" = "X$element"; then
10663         haveit=yes
10664         break
10665       fi
10666     done
10667     if test -z "$haveit"; then
10668       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10669     fi
10670   done
10671
10672
10673   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
10674 printf %s "checking for libsigsegv... " >&6; }
10675 if test ${ac_cv_libsigsegv+y}
10676 then :
10677   printf %s "(cached) " >&6
10678 else case e in #(
10679   e)
10680     ac_save_LIBS="$LIBS"
10681                                 case " $LIBSIGSEGV" in
10682       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
10683       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
10684     esac
10685     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686 /* end confdefs.h.  */
10687 #include <sigsegv.h>
10688 int
10689 main (void)
10690 {
10691 sigsegv_deinstall_handler();
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_link "$LINENO"
10697 then :
10698   ac_cv_libsigsegv=yes
10699 else case e in #(
10700   e) ac_cv_libsigsegv='no, consider installing GNU libsigsegv' ;;
10701 esac
10702 fi
10703 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10704     conftest$ac_exeext conftest.$ac_ext
10705     LIBS="$ac_save_LIBS"
10706    ;;
10707 esac
10708 fi
10709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
10710 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
10711   if test "$ac_cv_libsigsegv" = yes; then
10712     HAVE_LIBSIGSEGV=yes
10713
10714 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
10715
10716     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
10717 printf %s "checking how to link with libsigsegv... " >&6; }
10718     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
10719 printf "%s\n" "$LIBSIGSEGV" >&6; }
10720   else
10721     HAVE_LIBSIGSEGV=no
10722             CPPFLAGS="$ac_save_CPPFLAGS"
10723     LIBSIGSEGV=
10724     LTLIBSIGSEGV=
10725     LIBSIGSEGV_PREFIX=
10726   fi
10727
10728
10729
10730
10731
10732
10733
10734     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
10735
10736     gl_sigsegv_uses_libsigsegv="$gl_cv_lib_sigsegv"
10737   else
10738     gl_sigsegv_uses_libsigsegv=no
10739   fi
10740
10741
10742   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
10743 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
10744 if test ${gl_cv_malloc_ptrdiff+y}
10745 then :
10746   printf %s "(cached) " >&6
10747 else case e in #(
10748   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10749 /* end confdefs.h.  */
10750 #include <stdint.h>
10751
10752 int
10753 main (void)
10754 {
10755 /* 64-bit ptrdiff_t is so wide that no practical platform
10756                can exceed it.  */
10757             #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
10758
10759             /* On rare machines where size_t fits in ptrdiff_t there
10760                is no problem.  */
10761             #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
10762
10763             /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
10764                bounds even on 32-bit platforms.  We don't know which
10765                non-glibc systems are safe.  */
10766             #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
10767
10768             #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
10769               return 0;
10770             #else
10771               #error "malloc might not be ptrdiff_t safe"
10772               syntax error
10773             #endif
10774
10775   ;
10776   return 0;
10777 }
10778 _ACEOF
10779 if ac_fn_c_try_compile "$LINENO"
10780 then :
10781   gl_cv_malloc_ptrdiff=yes
10782 else case e in #(
10783   e) gl_cv_malloc_ptrdiff=no ;;
10784 esac
10785 fi
10786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10787      ;;
10788 esac
10789 fi
10790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
10791 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
10792
10793
10794
10795
10796   test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
10797
10798
10799
10800   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
10801 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
10802 if test ${gl_cv_func_malloc_posix+y}
10803 then :
10804   printf %s "(cached) " >&6
10805 else case e in #(
10806   e)
10807                                     case "$host_os" in
10808         mingw*)
10809           gl_cv_func_malloc_posix=no ;;
10810         irix* | solaris*)
10811
10812           gl_cv_func_malloc_posix=no ;;
10813         *)
10814           gl_cv_func_malloc_posix=yes ;;
10815       esac
10816      ;;
10817 esac
10818 fi
10819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10820 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
10821
10822
10823
10824
10825
10826   if test "$gl_cv_func_malloc_posix" = yes; then
10827
10828 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
10829
10830   else
10831     REPLACE_MALLOC_FOR_MALLOC_POSIX=1
10832   fi
10833
10834
10835
10836
10837   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
10838     REPLACE_CALLOC_FOR_CALLOC_POSIX=1
10839   fi
10840
10841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10842 printf %s "checking for C/C++ restrict keyword... " >&6; }
10843 if test ${ac_cv_c_restrict+y}
10844 then :
10845   printf %s "(cached) " >&6
10846 else case e in #(
10847   e) ac_cv_c_restrict=no
10848    # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10849    # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10850    # Put 'restrict' last, because C++ lacks it.
10851    for ac_kw in __restrict__ __restrict _Restrict restrict; do
10852      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h.  */
10854 typedef int *int_ptr;
10855            int foo (int_ptr $ac_kw ip) { return ip[0]; }
10856            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
10857            int bar (int ip[$ac_kw]) { return ip[0]; }
10858
10859 int
10860 main (void)
10861 {
10862 int s[1];
10863            int *$ac_kw t = s;
10864            t[0] = 0;
10865            return foo (t) + bar (t);
10866
10867   ;
10868   return 0;
10869 }
10870 _ACEOF
10871 if ac_fn_c_try_compile "$LINENO"
10872 then :
10873   ac_cv_c_restrict=$ac_kw
10874 fi
10875 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10876      test "$ac_cv_c_restrict" != no && break
10877    done
10878    ;;
10879 esac
10880 fi
10881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10882 printf "%s\n" "$ac_cv_c_restrict" >&6; }
10883
10884  case $ac_cv_c_restrict in
10885    restrict) ;;
10886    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
10887  ;;
10888    *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
10889  ;;
10890  esac
10891
10892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10893 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10894 if test ${ac_cv_c_undeclared_builtin_options+y}
10895 then :
10896   printf %s "(cached) " >&6
10897 else case e in #(
10898   e) ac_save_CFLAGS=$CFLAGS
10899    ac_cv_c_undeclared_builtin_options='cannot detect'
10900    for ac_arg in '' -fno-builtin; do
10901      CFLAGS="$ac_save_CFLAGS $ac_arg"
10902      # This test program should *not* compile successfully.
10903      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h.  */
10905
10906 int
10907 main (void)
10908 {
10909 (void) strchr;
10910   ;
10911   return 0;
10912 }
10913 _ACEOF
10914 if ac_fn_c_try_compile "$LINENO"
10915 then :
10916
10917 else case e in #(
10918   e) # This test program should compile successfully.
10919         # No library function is consistently available on
10920         # freestanding implementations, so test against a dummy
10921         # declaration.  Include always-available headers on the
10922         # off chance that they somehow elicit warnings.
10923         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924 /* end confdefs.h.  */
10925 #include <float.h>
10926 #include <limits.h>
10927 #include <stdarg.h>
10928 #include <stddef.h>
10929 extern void ac_decl (int, char *);
10930
10931 int
10932 main (void)
10933 {
10934 (void) ac_decl (0, (char *) 0);
10935   (void) ac_decl;
10936
10937   ;
10938   return 0;
10939 }
10940 _ACEOF
10941 if ac_fn_c_try_compile "$LINENO"
10942 then :
10943   if test x"$ac_arg" = x
10944 then :
10945   ac_cv_c_undeclared_builtin_options='none needed'
10946 else case e in #(
10947   e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
10948 esac
10949 fi
10950           break
10951 fi
10952 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10953 esac
10954 fi
10955 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10956     done
10957     CFLAGS=$ac_save_CFLAGS
10958    ;;
10959 esac
10960 fi
10961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10962 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10963   case $ac_cv_c_undeclared_builtin_options in #(
10964   'cannot detect') :
10965     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10966 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10967 as_fn_error $? "cannot make $CC report undeclared builtins
10968 See 'config.log' for more details" "$LINENO" 5; } ;; #(
10969   'none needed') :
10970     ac_c_undeclared_builtin_options='' ;; #(
10971   *) :
10972     ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10973 esac
10974
10975
10976     HAVE_CHOWN=1;
10977   HAVE_COPY_FILE_RANGE=1;
10978   HAVE_DUP3=1;
10979   HAVE_EUIDACCESS=1;
10980   HAVE_EXECVPE=1;
10981   HAVE_FACCESSAT=1;
10982   HAVE_FCHDIR=1;
10983   HAVE_FCHOWNAT=1;
10984   HAVE_FDATASYNC=1;
10985   HAVE_FSYNC=1;
10986   HAVE_FTRUNCATE=1;
10987   HAVE_GETDTABLESIZE=1;
10988   HAVE_GETENTROPY=1;
10989   HAVE_GETGROUPS=1;
10990   HAVE_GETHOSTNAME=1;
10991   HAVE_GETLOGIN=1;
10992   HAVE_GETPAGESIZE=1;
10993   HAVE_GETPASS=1;
10994   HAVE_GROUP_MEMBER=1;
10995   HAVE_LCHOWN=1;
10996   HAVE_LINK=1;
10997   HAVE_LINKAT=1;
10998   HAVE_PIPE=1;
10999   HAVE_PIPE2=1;
11000   HAVE_PREAD=1;
11001   HAVE_PWRITE=1;
11002   HAVE_READLINK=1;
11003   HAVE_READLINKAT=1;
11004   HAVE_SETHOSTNAME=1;
11005   HAVE_SLEEP=1;
11006   HAVE_SYMLINK=1;
11007   HAVE_SYMLINKAT=1;
11008   HAVE_UNLINKAT=1;
11009   HAVE_USLEEP=1;
11010   HAVE_DECL_ENVIRON=1;
11011   HAVE_DECL_EXECVPE=1;
11012   HAVE_DECL_FCHDIR=1;
11013   HAVE_DECL_FDATASYNC=1;
11014   HAVE_DECL_GETDOMAINNAME=1;
11015   HAVE_DECL_GETLOGIN=1;
11016   HAVE_DECL_GETLOGIN_R=1;
11017   HAVE_DECL_GETPAGESIZE=1;
11018   HAVE_DECL_GETUSERSHELL=1;
11019   HAVE_DECL_SETHOSTNAME=1;
11020   HAVE_DECL_TRUNCATE=1;
11021   HAVE_DECL_TTYNAME_R=1;
11022   HAVE_OS_H=0;
11023   HAVE_SYS_PARAM_H=0;
11024   REPLACE_ACCESS=0;
11025   REPLACE_CHOWN=0;
11026   REPLACE_CLOSE=0;
11027   REPLACE_COPY_FILE_RANGE=0;
11028   REPLACE_DUP=0;
11029   REPLACE_DUP2=0;
11030   REPLACE_DUP3=0;
11031   REPLACE_EXECL=0;
11032   REPLACE_EXECLE=0;
11033   REPLACE_EXECLP=0;
11034   REPLACE_EXECV=0;
11035   REPLACE_EXECVE=0;
11036   REPLACE_EXECVP=0;
11037   REPLACE_EXECVPE=0;
11038   REPLACE_FACCESSAT=0;
11039   REPLACE_FCHOWNAT=0;
11040   REPLACE_FDATASYNC=0;
11041   REPLACE_FTRUNCATE=0;
11042   REPLACE_GETCWD=0;
11043   REPLACE_GETDOMAINNAME=0;
11044   REPLACE_GETDTABLESIZE=0;
11045   REPLACE_GETENTROPY=0;
11046   REPLACE_GETLOGIN_R=0;
11047   REPLACE_GETGROUPS=0;
11048   REPLACE_GETPAGESIZE=0;
11049   REPLACE_GETPASS=0;
11050   REPLACE_GETPASS_FOR_GETPASS_GNU=0;
11051   REPLACE_ISATTY=0;
11052   REPLACE_LCHOWN=0;
11053   REPLACE_LINK=0;
11054   REPLACE_LINKAT=0;
11055   REPLACE_LSEEK=0;
11056   REPLACE_PIPE2=0;
11057   REPLACE_PREAD=0;
11058   REPLACE_PWRITE=0;
11059   REPLACE_READ=0;
11060   REPLACE_READLINK=0;
11061   REPLACE_READLINKAT=0;
11062   REPLACE_RMDIR=0;
11063   REPLACE_SETHOSTNAME=0;
11064   REPLACE_SLEEP=0;
11065   REPLACE_SYMLINK=0;
11066   REPLACE_SYMLINKAT=0;
11067   REPLACE_TRUNCATE=0;
11068   REPLACE_TTYNAME_R=0;
11069   REPLACE_UNLINK=0;
11070   REPLACE_UNLINKAT=0;
11071   REPLACE_USLEEP=0;
11072   REPLACE_WRITE=0;
11073   UNISTD_H_HAVE_SYS_RANDOM_H=0;
11074   UNISTD_H_HAVE_WINSOCK2_H=0;
11075   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11076
11077
11078
11079
11080
11081   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
11082     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
11083
11084 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
11085
11086   else
11087     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
11088   fi
11089
11090
11091
11092     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
11093   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11094
11095   REPLACE_IOCTL=0;
11096
11097
11098
11099
11100
11101
11102     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
11103       REPLACE_CLOSE=1
11104     fi
11105
11106
11107
11108
11109
11110
11111   if test $ac_cv_header_sys_socket_h != yes; then
11112                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11113 if test "x$ac_cv_header_winsock2_h" = xyes
11114 then :
11115   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
11116
11117 fi
11118
11119   fi
11120   if test "$ac_cv_header_winsock2_h" = yes; then
11121     HAVE_WINSOCK2_H=1
11122     UNISTD_H_HAVE_WINSOCK2_H=1
11123     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11124   else
11125     HAVE_WINSOCK2_H=0
11126   fi
11127
11128
11129     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
11130                         REPLACE_CLOSE=1
11131     fi
11132
11133
11134
11135
11136
11137   GL_GNULIB_ACCESS=0
11138
11139
11140
11141   GL_GNULIB_CHDIR=0
11142
11143
11144
11145   GL_GNULIB_CHOWN=0
11146
11147
11148
11149   GL_GNULIB_CLOSE=0
11150
11151
11152
11153   GL_GNULIB_COPY_FILE_RANGE=0
11154
11155
11156
11157   GL_GNULIB_DUP=0
11158
11159
11160
11161   GL_GNULIB_DUP2=0
11162
11163
11164
11165   GL_GNULIB_DUP3=0
11166
11167
11168
11169   GL_GNULIB_ENVIRON=0
11170
11171
11172
11173   GL_GNULIB_EUIDACCESS=0
11174
11175
11176
11177   GL_GNULIB_EXECL=0
11178
11179
11180
11181   GL_GNULIB_EXECLE=0
11182
11183
11184
11185   GL_GNULIB_EXECLP=0
11186
11187
11188
11189   GL_GNULIB_EXECV=0
11190
11191
11192
11193   GL_GNULIB_EXECVE=0
11194
11195
11196
11197   GL_GNULIB_EXECVP=0
11198
11199
11200
11201   GL_GNULIB_EXECVPE=0
11202
11203
11204
11205   GL_GNULIB_FACCESSAT=0
11206
11207
11208
11209   GL_GNULIB_FCHDIR=0
11210
11211
11212
11213   GL_GNULIB_FCHOWNAT=0
11214
11215
11216
11217   GL_GNULIB_FDATASYNC=0
11218
11219
11220
11221   GL_GNULIB_FSYNC=0
11222
11223
11224
11225   GL_GNULIB_FTRUNCATE=0
11226
11227
11228
11229   GL_GNULIB_GETCWD=0
11230
11231
11232
11233   GL_GNULIB_GETDOMAINNAME=0
11234
11235
11236
11237   GL_GNULIB_GETDTABLESIZE=0
11238
11239
11240
11241   GL_GNULIB_GETENTROPY=0
11242
11243
11244
11245   GL_GNULIB_GETGROUPS=0
11246
11247
11248
11249   GL_GNULIB_GETHOSTNAME=0
11250
11251
11252
11253   GL_GNULIB_GETLOGIN=0
11254
11255
11256
11257   GL_GNULIB_GETLOGIN_R=0
11258
11259
11260
11261   GL_GNULIB_GETOPT_POSIX=0
11262
11263
11264
11265   GL_GNULIB_GETPAGESIZE=0
11266
11267
11268
11269   GL_GNULIB_GETPASS=0
11270
11271
11272
11273   GL_GNULIB_GETPASS_GNU=0
11274
11275
11276
11277   GL_GNULIB_GETUSERSHELL=0
11278
11279
11280
11281   GL_GNULIB_GROUP_MEMBER=0
11282
11283
11284
11285   GL_GNULIB_ISATTY=0
11286
11287
11288
11289   GL_GNULIB_LCHOWN=0
11290
11291
11292
11293   GL_GNULIB_LINK=0
11294
11295
11296
11297   GL_GNULIB_LINKAT=0
11298
11299
11300
11301   GL_GNULIB_LSEEK=0
11302
11303
11304
11305   GL_GNULIB_PIPE=0
11306
11307
11308
11309   GL_GNULIB_PIPE2=0
11310
11311
11312
11313   GL_GNULIB_PREAD=0
11314
11315
11316
11317   GL_GNULIB_PWRITE=0
11318
11319
11320
11321   GL_GNULIB_READ=0
11322
11323
11324
11325   GL_GNULIB_READLINK=0
11326
11327
11328
11329   GL_GNULIB_READLINKAT=0
11330
11331
11332
11333   GL_GNULIB_RMDIR=0
11334
11335
11336
11337   GL_GNULIB_SETHOSTNAME=0
11338
11339
11340
11341   GL_GNULIB_SLEEP=0
11342
11343
11344
11345   GL_GNULIB_SYMLINK=0
11346
11347
11348
11349   GL_GNULIB_SYMLINKAT=0
11350
11351
11352
11353   GL_GNULIB_TRUNCATE=0
11354
11355
11356
11357   GL_GNULIB_TTYNAME_R=0
11358
11359
11360
11361   GL_GNULIB_UNISTD_H_GETOPT=0
11362
11363
11364
11365   GL_GNULIB_UNISTD_H_NONBLOCKING=0
11366
11367
11368
11369   GL_GNULIB_UNISTD_H_SIGPIPE=0
11370
11371
11372
11373   GL_GNULIB_UNLINK=0
11374
11375
11376
11377   GL_GNULIB_UNLINKAT=0
11378
11379
11380
11381   GL_GNULIB_USLEEP=0
11382
11383
11384
11385   GL_GNULIB_WRITE=0
11386
11387
11388
11389   GL_GNULIB_MDA_ACCESS=1
11390
11391
11392
11393   GL_GNULIB_MDA_CHDIR=1
11394
11395
11396
11397   GL_GNULIB_MDA_CLOSE=1
11398
11399
11400
11401   GL_GNULIB_MDA_DUP=1
11402
11403
11404
11405   GL_GNULIB_MDA_DUP2=1
11406
11407
11408
11409   GL_GNULIB_MDA_EXECL=1
11410
11411
11412
11413   GL_GNULIB_MDA_EXECLE=1
11414
11415
11416
11417   GL_GNULIB_MDA_EXECLP=1
11418
11419
11420
11421   GL_GNULIB_MDA_EXECV=1
11422
11423
11424
11425   GL_GNULIB_MDA_EXECVE=1
11426
11427
11428
11429   GL_GNULIB_MDA_EXECVP=1
11430
11431
11432
11433   GL_GNULIB_MDA_EXECVPE=1
11434
11435
11436
11437   GL_GNULIB_MDA_GETCWD=1
11438
11439
11440
11441   GL_GNULIB_MDA_GETPID=1
11442
11443
11444
11445   GL_GNULIB_MDA_ISATTY=1
11446
11447
11448
11449   GL_GNULIB_MDA_LSEEK=1
11450
11451
11452
11453   GL_GNULIB_MDA_READ=1
11454
11455
11456
11457   GL_GNULIB_MDA_RMDIR=1
11458
11459
11460
11461   GL_GNULIB_MDA_SWAB=1
11462
11463
11464
11465   GL_GNULIB_MDA_UNLINK=1
11466
11467
11468
11469   GL_GNULIB_MDA_WRITE=1
11470
11471
11472
11473
11474     HAVE_ISBLANK=1;
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487      if test $gl_cv_have_include_next = yes; then
11488        gl_cv_next_ctype_h='<'ctype.h'>'
11489      else
11490        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
11491 printf %s "checking absolute name of <ctype.h>... " >&6; }
11492 if test ${gl_cv_next_ctype_h+y}
11493 then :
11494   printf %s "(cached) " >&6
11495 else case e in #(
11496   e)
11497
11498
11499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500 /* end confdefs.h.  */
11501 #include <ctype.h>
11502 _ACEOF
11503                 case "$host_os" in
11504     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11505     *)    gl_absname_cpp="$ac_cpp" ;;
11506   esac
11507
11508   case "$host_os" in
11509     mingw*)
11510                                           gl_dirsep_regex='[/\\]'
11511       ;;
11512     *)
11513       gl_dirsep_regex='\/'
11514       ;;
11515   esac
11516       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11517   gl_header_literal_regex=`echo 'ctype.h' \
11518                            | sed -e "$gl_make_literal_regex_sed"`
11519   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11520       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11521       s|^/[^/]|//&|
11522       p
11523       q
11524     }'
11525
11526         gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11527   sed -n "$gl_absolute_header_sed"`
11528
11529           gl_header=$gl_cv_absolute_ctype_h
11530           gl_cv_next_ctype_h='"'$gl_header'"'
11531
11532           ;;
11533 esac
11534 fi
11535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
11536 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
11537      fi
11538      NEXT_CTYPE_H=$gl_cv_next_ctype_h
11539
11540      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11541        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11542        gl_next_as_first_directive='<'ctype.h'>'
11543      else
11544        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11545        gl_next_as_first_directive=$gl_cv_next_ctype_h
11546      fi
11547      NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559   GL_GNULIB_ISBLANK=0
11560
11561
11562
11563 gl_mda_defines='
11564 #if defined _WIN32 && !defined __CYGWIN__
11565 #define access    _access
11566 #define chdir     _chdir
11567 #define chmod     _chmod
11568 #define close     _close
11569 #define creat     _creat
11570 #define dup       _dup
11571 #define dup2      _dup2
11572 #define ecvt      _ecvt
11573 #define execl     _execl
11574 #define execle    _execle
11575 #define execlp    _execlp
11576 #define execv     _execv
11577 #define execve    _execve
11578 #define execvp    _execvp
11579 #define execvpe   _execvpe
11580 #define fcloseall _fcloseall
11581 #define fcvt      _fcvt
11582 #define fdopen    _fdopen
11583 #define fileno    _fileno
11584 #define gcvt      _gcvt
11585 #define getcwd    _getcwd
11586 #define getpid    _getpid
11587 #define getw      _getw
11588 #define isatty    _isatty
11589 #define j0        _j0
11590 #define j1        _j1
11591 #define jn        _jn
11592 #define lfind     _lfind
11593 #define lsearch   _lsearch
11594 #define lseek     _lseek
11595 #define memccpy   _memccpy
11596 #define mkdir     _mkdir
11597 #define mktemp    _mktemp
11598 #define open      _open
11599 #define putenv    _putenv
11600 #define putw      _putw
11601 #define read      _read
11602 #define rmdir     _rmdir
11603 #define strdup    _strdup
11604 #define swab      _swab
11605 #define tempnam   _tempnam
11606 #define tzset     _tzset
11607 #define umask     _umask
11608 #define unlink    _unlink
11609 #define utime     _utime
11610 #define wcsdup    _wcsdup
11611 #define write     _write
11612 #define y0        _y0
11613 #define y1        _y1
11614 #define yn        _yn
11615 #endif
11616 '
11617
11618
11619
11620
11621
11622
11623
11624
11625   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
11626 printf %s "checking if environ is properly declared... " >&6; }
11627 if test ${gt_cv_var_environ_declaration+y}
11628 then :
11629   printf %s "(cached) " >&6
11630 else case e in #(
11631   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h.  */
11633 #if HAVE_UNISTD_H
11634      #include <unistd.h>
11635      #endif
11636      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
11637      #include <stdlib.h>
11638
11639             typedef struct { int foo; } foo_t;
11640             extern foo_t environ;
11641 int
11642 main (void)
11643 {
11644 environ.foo = 1;
11645   ;
11646   return 0;
11647 }
11648 _ACEOF
11649 if ac_fn_c_try_compile "$LINENO"
11650 then :
11651   gt_cv_var_environ_declaration=no
11652 else case e in #(
11653   e) gt_cv_var_environ_declaration=yes ;;
11654 esac
11655 fi
11656 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11657 esac
11658 fi
11659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
11660 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
11661   if test $gt_cv_var_environ_declaration = yes; then
11662
11663 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
11664
11665   fi
11666
11667
11668   if test $gt_cv_var_environ_declaration != yes; then
11669     HAVE_DECL_ENVIRON=0
11670   fi
11671
11672
11673
11674   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
11675 printf %s "checking for complete errno.h... " >&6; }
11676 if test ${gl_cv_header_errno_h_complete+y}
11677 then :
11678   printf %s "(cached) " >&6
11679 else case e in #(
11680   e)
11681     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11682 /* end confdefs.h.  */
11683
11684 #include <errno.h>
11685 #if !defined ETXTBSY
11686 booboo
11687 #endif
11688 #if !defined ENOMSG
11689 booboo
11690 #endif
11691 #if !defined EIDRM
11692 booboo
11693 #endif
11694 #if !defined ENOLINK
11695 booboo
11696 #endif
11697 #if !defined EPROTO
11698 booboo
11699 #endif
11700 #if !defined EMULTIHOP
11701 booboo
11702 #endif
11703 #if !defined EBADMSG
11704 booboo
11705 #endif
11706 #if !defined EOVERFLOW
11707 booboo
11708 #endif
11709 #if !defined ENOTSUP
11710 booboo
11711 #endif
11712 #if !defined ENETRESET
11713 booboo
11714 #endif
11715 #if !defined ECONNABORTED
11716 booboo
11717 #endif
11718 #if !defined ESTALE
11719 booboo
11720 #endif
11721 #if !defined EDQUOT
11722 booboo
11723 #endif
11724 #if !defined ECANCELED
11725 booboo
11726 #endif
11727 #if !defined EOWNERDEAD
11728 booboo
11729 #endif
11730 #if !defined ENOTRECOVERABLE
11731 booboo
11732 #endif
11733 #if !defined EILSEQ
11734 booboo
11735 #endif
11736
11737 _ACEOF
11738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11739   $EGREP_TRADITIONAL "booboo" >/dev/null 2>&1
11740 then :
11741   gl_cv_header_errno_h_complete=no
11742 else case e in #(
11743   e) gl_cv_header_errno_h_complete=yes ;;
11744 esac
11745 fi
11746 rm -rf conftest*
11747
11748    ;;
11749 esac
11750 fi
11751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
11752 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
11753   if test $gl_cv_header_errno_h_complete = yes; then
11754     GL_GENERATE_ERRNO_H=false
11755   else
11756
11757
11758
11759
11760
11761
11762
11763
11764      if test $gl_cv_have_include_next = yes; then
11765        gl_cv_next_errno_h='<'errno.h'>'
11766      else
11767        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
11768 printf %s "checking absolute name of <errno.h>... " >&6; }
11769 if test ${gl_cv_next_errno_h+y}
11770 then :
11771   printf %s "(cached) " >&6
11772 else case e in #(
11773   e)
11774
11775
11776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777 /* end confdefs.h.  */
11778 #include <errno.h>
11779 _ACEOF
11780                 case "$host_os" in
11781     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11782     *)    gl_absname_cpp="$ac_cpp" ;;
11783   esac
11784
11785   case "$host_os" in
11786     mingw*)
11787                                           gl_dirsep_regex='[/\\]'
11788       ;;
11789     *)
11790       gl_dirsep_regex='\/'
11791       ;;
11792   esac
11793       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11794   gl_header_literal_regex=`echo 'errno.h' \
11795                            | sed -e "$gl_make_literal_regex_sed"`
11796   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11797       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11798       s|^/[^/]|//&|
11799       p
11800       q
11801     }'
11802
11803         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11804   sed -n "$gl_absolute_header_sed"`
11805
11806           gl_header=$gl_cv_absolute_errno_h
11807           gl_cv_next_errno_h='"'$gl_header'"'
11808
11809           ;;
11810 esac
11811 fi
11812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
11813 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
11814      fi
11815      NEXT_ERRNO_H=$gl_cv_next_errno_h
11816
11817      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11818        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11819        gl_next_as_first_directive='<'errno.h'>'
11820      else
11821        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11822        gl_next_as_first_directive=$gl_cv_next_errno_h
11823      fi
11824      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
11825
11826
11827
11828
11829     GL_GENERATE_ERRNO_H=true
11830   fi
11831
11832   if $GL_GENERATE_ERRNO_H; then
11833     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
11834 printf %s "checking for EMULTIHOP value... " >&6; }
11835 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
11836 then :
11837   printf %s "(cached) " >&6
11838 else case e in #(
11839   e)
11840       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h.  */
11842
11843 #include <errno.h>
11844 #ifdef EMULTIHOP
11845 yes
11846 #endif
11847
11848 _ACEOF
11849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11850   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11851 then :
11852   gl_cv_header_errno_h_EMULTIHOP=yes
11853 else case e in #(
11854   e) gl_cv_header_errno_h_EMULTIHOP=no ;;
11855 esac
11856 fi
11857 rm -rf conftest*
11858
11859       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
11860         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11861 /* end confdefs.h.  */
11862
11863 #define _XOPEN_SOURCE_EXTENDED 1
11864 #include <errno.h>
11865 #ifdef EMULTIHOP
11866 yes
11867 #endif
11868
11869 _ACEOF
11870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11871   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11872 then :
11873   gl_cv_header_errno_h_EMULTIHOP=hidden
11874 fi
11875 rm -rf conftest*
11876
11877         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
11878                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
11879 #define _XOPEN_SOURCE_EXTENDED 1
11880 #include <errno.h>
11881 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
11882 #include <stdio.h>
11883 #include <stdlib.h>
11884 "
11885 then :
11886
11887 fi
11888
11889         fi
11890       fi
11891      ;;
11892 esac
11893 fi
11894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
11895 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
11896     case $gl_cv_header_errno_h_EMULTIHOP in
11897       yes | no)
11898         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
11899         ;;
11900       *)
11901         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
11902         ;;
11903     esac
11904
11905
11906   fi
11907
11908
11909   if $GL_GENERATE_ERRNO_H; then
11910     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
11911 printf %s "checking for ENOLINK value... " >&6; }
11912 if test ${gl_cv_header_errno_h_ENOLINK+y}
11913 then :
11914   printf %s "(cached) " >&6
11915 else case e in #(
11916   e)
11917       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918 /* end confdefs.h.  */
11919
11920 #include <errno.h>
11921 #ifdef ENOLINK
11922 yes
11923 #endif
11924
11925 _ACEOF
11926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11927   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11928 then :
11929   gl_cv_header_errno_h_ENOLINK=yes
11930 else case e in #(
11931   e) gl_cv_header_errno_h_ENOLINK=no ;;
11932 esac
11933 fi
11934 rm -rf conftest*
11935
11936       if test $gl_cv_header_errno_h_ENOLINK = no; then
11937         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h.  */
11939
11940 #define _XOPEN_SOURCE_EXTENDED 1
11941 #include <errno.h>
11942 #ifdef ENOLINK
11943 yes
11944 #endif
11945
11946 _ACEOF
11947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11948   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11949 then :
11950   gl_cv_header_errno_h_ENOLINK=hidden
11951 fi
11952 rm -rf conftest*
11953
11954         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
11955                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
11956 #define _XOPEN_SOURCE_EXTENDED 1
11957 #include <errno.h>
11958 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
11959 #include <stdio.h>
11960 #include <stdlib.h>
11961 "
11962 then :
11963
11964 fi
11965
11966         fi
11967       fi
11968      ;;
11969 esac
11970 fi
11971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
11972 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
11973     case $gl_cv_header_errno_h_ENOLINK in
11974       yes | no)
11975         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
11976         ;;
11977       *)
11978         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
11979         ;;
11980     esac
11981
11982
11983   fi
11984
11985
11986   if $GL_GENERATE_ERRNO_H; then
11987     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
11988 printf %s "checking for EOVERFLOW value... " >&6; }
11989 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
11990 then :
11991   printf %s "(cached) " >&6
11992 else case e in #(
11993   e)
11994       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h.  */
11996
11997 #include <errno.h>
11998 #ifdef EOVERFLOW
11999 yes
12000 #endif
12001
12002 _ACEOF
12003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12004   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
12005 then :
12006   gl_cv_header_errno_h_EOVERFLOW=yes
12007 else case e in #(
12008   e) gl_cv_header_errno_h_EOVERFLOW=no ;;
12009 esac
12010 fi
12011 rm -rf conftest*
12012
12013       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
12014         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h.  */
12016
12017 #define _XOPEN_SOURCE_EXTENDED 1
12018 #include <errno.h>
12019 #ifdef EOVERFLOW
12020 yes
12021 #endif
12022
12023 _ACEOF
12024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12025   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
12026 then :
12027   gl_cv_header_errno_h_EOVERFLOW=hidden
12028 fi
12029 rm -rf conftest*
12030
12031         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
12032                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
12033 #define _XOPEN_SOURCE_EXTENDED 1
12034 #include <errno.h>
12035 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
12036 #include <stdio.h>
12037 #include <stdlib.h>
12038 "
12039 then :
12040
12041 fi
12042
12043         fi
12044       fi
12045      ;;
12046 esac
12047 fi
12048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
12049 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
12050     case $gl_cv_header_errno_h_EOVERFLOW in
12051       yes | no)
12052         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
12053         ;;
12054       *)
12055         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
12056         ;;
12057     esac
12058
12059
12060   fi
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075      if test $gl_cv_have_include_next = yes; then
12076        gl_cv_next_error_h='<'error.h'>'
12077      else
12078        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <error.h>" >&5
12079 printf %s "checking absolute name of <error.h>... " >&6; }
12080 if test ${gl_cv_next_error_h+y}
12081 then :
12082   printf %s "(cached) " >&6
12083 else case e in #(
12084   e)
12085              if test $ac_cv_header_error_h = yes; then
12086
12087
12088
12089
12090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h.  */
12092 #include <error.h>
12093 _ACEOF
12094                 case "$host_os" in
12095     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12096     *)    gl_absname_cpp="$ac_cpp" ;;
12097   esac
12098
12099   case "$host_os" in
12100     mingw*)
12101                                           gl_dirsep_regex='[/\\]'
12102       ;;
12103     *)
12104       gl_dirsep_regex='\/'
12105       ;;
12106   esac
12107       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12108   gl_header_literal_regex=`echo 'error.h' \
12109                            | sed -e "$gl_make_literal_regex_sed"`
12110   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12111       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12112       s|^/[^/]|//&|
12113       p
12114       q
12115     }'
12116
12117         gl_cv_absolute_error_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12118   sed -n "$gl_absolute_header_sed"`
12119
12120           gl_header=$gl_cv_absolute_error_h
12121           gl_cv_next_error_h='"'$gl_header'"'
12122           else
12123                gl_cv_next_error_h='<'error.h'>'
12124              fi
12125
12126           ;;
12127 esac
12128 fi
12129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_error_h" >&5
12130 printf "%s\n" "$gl_cv_next_error_h" >&6; }
12131      fi
12132      NEXT_ERROR_H=$gl_cv_next_error_h
12133
12134      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12135        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12136        gl_next_as_first_directive='<'error.h'>'
12137      else
12138        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12139        gl_next_as_first_directive=$gl_cv_next_error_h
12140      fi
12141      NEXT_AS_FIRST_DIRECTIVE_ERROR_H=$gl_next_as_first_directive
12142
12143
12144
12145
12146   if test $ac_cv_header_error_h = yes; then
12147     HAVE_ERROR_H=1
12148   else
12149     HAVE_ERROR_H=0
12150   fi
12151
12152
12153   REPLACE_ERROR=0
12154
12155
12156
12157   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error" >&5
12158 printf %s "checking for error... " >&6; }
12159 if test ${gl_cv_onwards_func_error+y}
12160 then :
12161   printf %s "(cached) " >&6
12162 else case e in #(
12163   e)
12164   exec 9>&6 6>/dev/null
12165
12166        case "$host_os" in
12167
12168          linux*-android*)
12169            ac_fn_check_decl "$LINENO" "error" "ac_cv_have_decl_error" "#include <error.h>
12170 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12171 if test "x$ac_cv_have_decl_error" = xyes
12172 then :
12173
12174 fi
12175            if test $ac_cv_have_decl_error = yes; then
12176              ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
12177 if test "x$ac_cv_func_error" = xyes
12178 then :
12179
12180 fi
12181
12182              if test $ac_cv_func_error = yes; then
12183                gl_cv_onwards_func_error=yes
12184              else
12185                                                             gl_cv_onwards_func_error='future OS version'
12186              fi
12187            else
12188              gl_cv_onwards_func_error='future OS version'
12189            fi
12190            ;;
12191
12192
12193          *)
12194            ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
12195 if test "x$ac_cv_func_error" = xyes
12196 then :
12197
12198 fi
12199
12200            gl_cv_onwards_func_error=$ac_cv_func_error
12201            ;;
12202
12203        esac
12204
12205   exec 6>&9 9>&-
12206
12207      ;;
12208 esac
12209 fi
12210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_error" >&5
12211 printf "%s\n" "$gl_cv_onwards_func_error" >&6; }
12212
12213   case "$gl_cv_onwards_func_error" in
12214     future*) ac_cv_func_error=no ;;
12215     *)       ac_cv_func_error=$gl_cv_onwards_func_error ;;
12216   esac
12217   if test $ac_cv_func_error = yes; then
12218
12219 printf "%s\n" "#define HAVE_ERROR 1" >>confdefs.h
12220
12221   fi
12222
12223
12224   if test $ac_cv_func_error = yes; then
12225     HAVE_ERROR=1
12226   else
12227     HAVE_ERROR=0
12228     case "$gl_cv_onwards_func_error" in
12229       future*) REPLACE_ERROR=1 ;;
12230     esac
12231   fi
12232
12233         ac_fn_check_decl "$LINENO" "error_at_line" "ac_cv_have_decl_error_at_line" "#include <error.h>
12234 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12235 if test "x$ac_cv_have_decl_error_at_line" = xyes
12236 then :
12237
12238 fi
12239   if test $ac_cv_have_decl_error_at_line = yes; then
12240     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
12241 printf %s "checking for error_at_line... " >&6; }
12242 if test ${ac_cv_lib_error_at_line+y}
12243 then :
12244   printf %s "(cached) " >&6
12245 else case e in #(
12246   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h.  */
12248 #include <error.h>
12249 int
12250 main (void)
12251 {
12252 error_at_line (0, 0, "", 0, "an error occurred");
12253   ;
12254   return 0;
12255 }
12256 _ACEOF
12257 if ac_fn_c_try_link "$LINENO"
12258 then :
12259   ac_cv_lib_error_at_line=yes
12260 else case e in #(
12261   e) ac_cv_lib_error_at_line=no ;;
12262 esac
12263 fi
12264 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12265     conftest$ac_exeext conftest.$ac_ext ;;
12266 esac
12267 fi
12268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
12269 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
12270   else
12271     ac_cv_lib_error_at_line=no
12272   fi
12273   if test $ac_cv_lib_error_at_line = yes; then
12274     HAVE_ERROR_AT_LINE=1
12275   else
12276     HAVE_ERROR_AT_LINE=0
12277   fi
12278   REPLACE_ERROR_AT_LINE=0
12279
12280   if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
12281             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working error function" >&5
12282 printf %s "checking for working error function... " >&6; }
12283 if test ${gl_cv_func_working_error+y}
12284 then :
12285   printf %s "(cached) " >&6
12286 else case e in #(
12287   e) if test $cross_compiling != yes; then
12288          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289 /* end confdefs.h.  */
12290
12291               #include <error.h>
12292               static void print_no_progname (void) {}
12293
12294 int
12295 main (void)
12296 {
12297
12298               error_print_progname = print_no_progname;
12299               error (0, 0, "foo");
12300
12301   ;
12302   return 0;
12303 }
12304
12305 _ACEOF
12306 if ac_fn_c_try_link "$LINENO"
12307 then :
12308   rm -f conftest.out
12309             if test -s conftest$ac_exeext \
12310                && ./conftest$ac_exeext 2> conftest.out; then
12311               if grep ' ' conftest.out >/dev/null; then
12312                 gl_cv_func_working_error=no
12313               else
12314                 gl_cv_func_working_error=yes
12315               fi
12316             else
12317               gl_cv_func_working_error=no
12318             fi
12319             rm -f conftest.out
12320
12321 else case e in #(
12322   e) gl_cv_func_working_error=no ;;
12323 esac
12324 fi
12325 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12326     conftest$ac_exeext conftest.$ac_ext
12327        else
12328          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h.  */
12330
12331               #include <error.h>
12332
12333 int
12334 main (void)
12335 {
12336
12337               error (0, 0, "foo");
12338
12339   ;
12340   return 0;
12341 }
12342
12343 _ACEOF
12344 if ac_fn_c_try_compile "$LINENO"
12345 then :
12346   case "$host_os" in
12347                                # Guess yes on glibc systems.
12348               *-gnu* | gnu*)   gl_cv_func_working_error="guessing yes" ;;
12349                                # Guess no on Android.
12350               linux*-android*) gl_cv_func_working_error="guessing no" ;;
12351                                # If we don't know, obey --enable-cross-guesses.
12352               *)               gl_cv_func_working_error="$gl_cross_guess_normal" ;;
12353             esac
12354
12355 else case e in #(
12356   e) gl_cv_func_working_error=no ;;
12357 esac
12358 fi
12359 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12360        fi
12361        ;;
12362 esac
12363 fi
12364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_error" >&5
12365 printf "%s\n" "$gl_cv_func_working_error" >&6; }
12366     case "$gl_cv_func_working_error" in
12367       *no)
12368         REPLACE_ERROR=1
12369         REPLACE_ERROR_AT_LINE=1
12370         ;;
12371     esac
12372   fi
12373
12374   if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
12375      || test $HAVE_ERROR_AT_LINE = 0 || test $REPLACE_ERROR_AT_LINE = 1; then
12376         GL_GENERATE_ERROR_H=true
12377   else
12378     GL_GENERATE_ERROR_H=false
12379   fi
12380
12381
12382
12383
12384
12385
12386 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12387 if test "x$ac_cv_have_decl_strerror_r" = xyes
12388 then :
12389   ac_have_decl=1
12390 else case e in #(
12391   e) ac_have_decl=0 ;;
12392 esac
12393 fi
12394 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
12395
12396
12397 if test $ac_cv_have_decl_strerror_r = yes; then
12398   # For backward compatibility's sake, define HAVE_STRERROR_R.
12399   # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
12400   # as AC_CHECK_DECLS_ONCE.)
12401
12402 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
12403
12404 fi
12405
12406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
12407 printf %s "checking whether strerror_r returns char *... " >&6; }
12408 if test ${ac_cv_func_strerror_r_char_p+y}
12409 then :
12410   printf %s "(cached) " >&6
12411 else case e in #(
12412   e)
12413     ac_cv_func_strerror_r_char_p=no
12414     if test $ac_cv_have_decl_strerror_r = yes; then
12415       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416 /* end confdefs.h.  */
12417 #include <string.h>
12418 int
12419 main (void)
12420 {
12421
12422           char buf[100];
12423           char x = *strerror_r (0, buf, sizeof buf);
12424           char *p = strerror_r (0, buf, sizeof buf);
12425           return !p || x;
12426
12427   ;
12428   return 0;
12429 }
12430 _ACEOF
12431 if ac_fn_c_try_compile "$LINENO"
12432 then :
12433   ac_cv_func_strerror_r_char_p=yes
12434 fi
12435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12436
12437     fi
12438    ;;
12439 esac
12440 fi
12441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
12442 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
12443 if test $ac_cv_func_strerror_r_char_p = yes; then
12444
12445 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
12446
12447 fi
12448
12449
12450   XGETTEXT_EXTRA_OPTIONS=
12451
12452
12453   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
12454 printf %s "checking whether ctype.h defines __header_inline... " >&6; }
12455 if test ${gl_cv_have___header_inline+y}
12456 then :
12457   printf %s "(cached) " >&6
12458 else case e in #(
12459   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460 /* end confdefs.h.  */
12461 #include <ctype.h>
12462                          #ifndef __header_inline
12463                           #error "<ctype.h> does not define __header_inline"
12464                          #endif
12465
12466 _ACEOF
12467 if ac_fn_c_try_cpp "$LINENO"
12468 then :
12469   gl_cv_have___header_inline=yes
12470 else case e in #(
12471   e) gl_cv_have___header_inline=no ;;
12472 esac
12473 fi
12474 rm -f conftest.err conftest.i conftest.$ac_ext ;;
12475 esac
12476 fi
12477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
12478 printf "%s\n" "$gl_cv_have___header_inline" >&6; }
12479   if test "$gl_cv_have___header_inline" = yes; then
12480
12481 printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h
12482
12483   fi
12484
12485
12486
12487
12488     HAVE_FCNTL=1;
12489   HAVE_OPENAT=1;
12490   REPLACE_CREAT=0;
12491   REPLACE_FCNTL=0;
12492   REPLACE_OPEN=0;
12493   REPLACE_OPENAT=0;
12494
12495
12496
12497
12498   GL_GNULIB_CREAT=0
12499
12500
12501
12502   GL_GNULIB_FCNTL=0
12503
12504
12505
12506   GL_GNULIB_NONBLOCKING=0
12507
12508
12509
12510   GL_GNULIB_OPEN=0
12511
12512
12513
12514   GL_GNULIB_OPENAT=0
12515
12516
12517
12518   GL_GNULIB_MDA_CREAT=1
12519
12520
12521
12522   GL_GNULIB_MDA_OPEN=1
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12533 printf %s "checking for working fcntl.h... " >&6; }
12534 if test ${gl_cv_header_working_fcntl_h+y}
12535 then :
12536   printf %s "(cached) " >&6
12537 else case e in #(
12538   e) if test "$cross_compiling" = yes
12539 then :
12540   case "$host_os" in
12541                   # Guess 'no' on native Windows.
12542           mingw*) gl_cv_header_working_fcntl_h='no' ;;
12543           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
12544         esac
12545
12546 else case e in #(
12547   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548 /* end confdefs.h.  */
12549 #include <sys/types.h>
12550            #include <sys/stat.h>
12551            #if HAVE_UNISTD_H
12552            # include <unistd.h>
12553            #else /* on Windows with MSVC */
12554            # include <io.h>
12555            # include <stdlib.h>
12556            # defined sleep(n) _sleep ((n) * 1000)
12557            #endif
12558            #include <fcntl.h>
12559
12560
12561 $gl_mda_defines
12562
12563            #ifndef O_NOATIME
12564             #define O_NOATIME 0
12565            #endif
12566            #ifndef O_NOFOLLOW
12567             #define O_NOFOLLOW 0
12568            #endif
12569            static int const constants[] =
12570             {
12571               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
12572               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
12573             };
12574
12575 int
12576 main (void)
12577 {
12578
12579             int result = !constants;
12580             #if HAVE_SYMLINK
12581             {
12582               static char const sym[] = "conftest.sym";
12583               if (symlink ("/dev/null", sym) != 0)
12584                 result |= 2;
12585               else
12586                 {
12587                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
12588                   if (fd >= 0)
12589                     {
12590                       close (fd);
12591                       result |= 4;
12592                     }
12593                 }
12594               if (unlink (sym) != 0 || symlink (".", sym) != 0)
12595                 result |= 2;
12596               else
12597                 {
12598                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
12599                   if (fd >= 0)
12600                     {
12601                       close (fd);
12602                       result |= 4;
12603                     }
12604                 }
12605               unlink (sym);
12606             }
12607             #endif
12608             {
12609               static char const file[] = "confdefs.h";
12610               int fd = open (file, O_RDONLY | O_NOATIME);
12611               if (fd < 0)
12612                 result |= 8;
12613               else
12614                 {
12615                   struct stat st0;
12616                   if (fstat (fd, &st0) != 0)
12617                     result |= 16;
12618                   else
12619                     {
12620                       char c;
12621                       sleep (1);
12622                       if (read (fd, &c, 1) != 1)
12623                         result |= 24;
12624                       else
12625                         {
12626                           if (close (fd) != 0)
12627                             result |= 32;
12628                           else
12629                             {
12630                               struct stat st1;
12631                               if (stat (file, &st1) != 0)
12632                                 result |= 40;
12633                               else
12634                                 if (st0.st_atime != st1.st_atime)
12635                                   result |= 64;
12636                             }
12637                         }
12638                     }
12639                 }
12640             }
12641             return result;
12642   ;
12643   return 0;
12644 }
12645 _ACEOF
12646 if ac_fn_c_try_run "$LINENO"
12647 then :
12648   gl_cv_header_working_fcntl_h=yes
12649 else case e in #(
12650   e) case $? in #(
12651         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
12652         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
12653         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
12654          *) gl_cv_header_working_fcntl_h='no';;
12655         esac ;;
12656 esac
12657 fi
12658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12659   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12660 esac
12661 fi
12662
12663      ;;
12664 esac
12665 fi
12666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
12667 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
12668
12669   case $gl_cv_header_working_fcntl_h in #(
12670   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
12671   *) ac_val=1;;
12672   esac
12673
12674 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
12675
12676
12677   case $gl_cv_header_working_fcntl_h in #(
12678   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
12679   *) ac_val=1;;
12680   esac
12681
12682 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
12683
12684
12685
12686   ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12687 "
12688 if test "x$ac_cv_type_pid_t" = xyes
12689 then :
12690
12691 else case e in #(
12692   e)                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h.  */
12694
12695           #if defined _WIN64 && !defined __CYGWIN__
12696           LLP64
12697           #endif
12698
12699 int
12700 main (void)
12701 {
12702
12703   ;
12704   return 0;
12705 }
12706
12707 _ACEOF
12708 if ac_fn_c_try_compile "$LINENO"
12709 then :
12710   ac_pid_type='int'
12711 else case e in #(
12712   e) ac_pid_type='__int64' ;;
12713 esac
12714 fi
12715 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12716
12717 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12718
12719      ;;
12720 esac
12721 fi
12722
12723
12724 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
12725 if test "x$ac_cv_type_mode_t" = xyes
12726 then :
12727
12728 else case e in #(
12729   e)
12730 printf "%s\n" "#define mode_t int" >>confdefs.h
12731  ;;
12732 esac
12733 fi
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746      if test $gl_cv_have_include_next = yes; then
12747        gl_cv_next_fcntl_h='<'fcntl.h'>'
12748      else
12749        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
12750 printf %s "checking absolute name of <fcntl.h>... " >&6; }
12751 if test ${gl_cv_next_fcntl_h+y}
12752 then :
12753   printf %s "(cached) " >&6
12754 else case e in #(
12755   e)
12756
12757
12758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h.  */
12760 #include <fcntl.h>
12761 _ACEOF
12762                 case "$host_os" in
12763     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12764     *)    gl_absname_cpp="$ac_cpp" ;;
12765   esac
12766
12767   case "$host_os" in
12768     mingw*)
12769                                           gl_dirsep_regex='[/\\]'
12770       ;;
12771     *)
12772       gl_dirsep_regex='\/'
12773       ;;
12774   esac
12775       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12776   gl_header_literal_regex=`echo 'fcntl.h' \
12777                            | sed -e "$gl_make_literal_regex_sed"`
12778   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12779       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12780       s|^/[^/]|//&|
12781       p
12782       q
12783     }'
12784
12785         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12786   sed -n "$gl_absolute_header_sed"`
12787
12788           gl_header=$gl_cv_absolute_fcntl_h
12789           gl_cv_next_fcntl_h='"'$gl_header'"'
12790
12791           ;;
12792 esac
12793 fi
12794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
12795 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
12796      fi
12797      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
12798
12799      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12800        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12801        gl_next_as_first_directive='<'fcntl.h'>'
12802      else
12803        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12804        gl_next_as_first_directive=$gl_cv_next_fcntl_h
12805      fi
12806      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
12824 printf %s "checking for mempcpy... " >&6; }
12825 if test ${gl_cv_onwards_func_mempcpy+y}
12826 then :
12827   printf %s "(cached) " >&6
12828 else case e in #(
12829   e)
12830   exec 9>&6 6>/dev/null
12831
12832        case "$host_os" in
12833
12834          linux*-android*)
12835            ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
12836 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12837 if test "x$ac_cv_have_decl_mempcpy" = xyes
12838 then :
12839
12840 fi
12841            if test $ac_cv_have_decl_mempcpy = yes; then
12842              ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
12843 if test "x$ac_cv_func_mempcpy" = xyes
12844 then :
12845
12846 fi
12847
12848              if test $ac_cv_func_mempcpy = yes; then
12849                gl_cv_onwards_func_mempcpy=yes
12850              else
12851                                                             gl_cv_onwards_func_mempcpy='future OS version'
12852              fi
12853            else
12854              gl_cv_onwards_func_mempcpy='future OS version'
12855            fi
12856            ;;
12857
12858
12859          *)
12860            ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
12861 if test "x$ac_cv_func_mempcpy" = xyes
12862 then :
12863
12864 fi
12865
12866            gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
12867            ;;
12868
12869        esac
12870
12871   exec 6>&9 9>&-
12872
12873      ;;
12874 esac
12875 fi
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
12877 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
12878
12879   case "$gl_cv_onwards_func_mempcpy" in
12880     future*) ac_cv_func_mempcpy=no ;;
12881     *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
12882   esac
12883   if test $ac_cv_func_mempcpy = yes; then
12884
12885 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
12886
12887   fi
12888
12889
12890
12891
12892     HAVE_FNMATCH=1;
12893   REPLACE_FNMATCH=0;
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909      if test $gl_cv_have_include_next = yes; then
12910        gl_cv_next_fnmatch_h='<'fnmatch.h'>'
12911      else
12912        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
12913 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
12914 if test ${gl_cv_next_fnmatch_h+y}
12915 then :
12916   printf %s "(cached) " >&6
12917 else case e in #(
12918   e)
12919              if test $ac_cv_header_fnmatch_h = yes; then
12920
12921
12922
12923
12924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925 /* end confdefs.h.  */
12926 #include <fnmatch.h>
12927 _ACEOF
12928                 case "$host_os" in
12929     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12930     *)    gl_absname_cpp="$ac_cpp" ;;
12931   esac
12932
12933   case "$host_os" in
12934     mingw*)
12935                                           gl_dirsep_regex='[/\\]'
12936       ;;
12937     *)
12938       gl_dirsep_regex='\/'
12939       ;;
12940   esac
12941       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12942   gl_header_literal_regex=`echo 'fnmatch.h' \
12943                            | sed -e "$gl_make_literal_regex_sed"`
12944   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12945       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12946       s|^/[^/]|//&|
12947       p
12948       q
12949     }'
12950
12951         gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12952   sed -n "$gl_absolute_header_sed"`
12953
12954           gl_header=$gl_cv_absolute_fnmatch_h
12955           gl_cv_next_fnmatch_h='"'$gl_header'"'
12956           else
12957                gl_cv_next_fnmatch_h='<'fnmatch.h'>'
12958              fi
12959
12960           ;;
12961 esac
12962 fi
12963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
12964 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
12965      fi
12966      NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
12967
12968      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12969        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12970        gl_next_as_first_directive='<'fnmatch.h'>'
12971      else
12972        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12973        gl_next_as_first_directive=$gl_cv_next_fnmatch_h
12974      fi
12975      NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
12976
12977
12978
12979
12980
12981
12982
12983   if test $ac_cv_header_fnmatch_h = yes; then
12984     HAVE_FNMATCH_H=1
12985   else
12986     HAVE_FNMATCH_H=0
12987   fi
12988
12989
12990   GL_GENERATE_FNMATCH_H=false
12991      if false; then
12992               GL_GENERATE_FNMATCH_H=true
12993      else
12994        if test $ac_cv_header_fnmatch_h != yes; then
12995                   GL_GENERATE_FNMATCH_H=true
12996        fi
12997      fi
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007   GL_GNULIB_FNMATCH=0
13008
13009
13010
13011
13012
13013    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
13014 printf %s "checking for mbstate_t... " >&6; }
13015 if test ${ac_cv_type_mbstate_t+y}
13016 then :
13017   printf %s "(cached) " >&6
13018 else case e in #(
13019   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020 /* end confdefs.h.  */
13021 $ac_includes_default
13022              #include <wchar.h>
13023 int
13024 main (void)
13025 {
13026 mbstate_t x; return sizeof x;
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 if ac_fn_c_try_compile "$LINENO"
13032 then :
13033   ac_cv_type_mbstate_t=yes
13034 else case e in #(
13035   e) ac_cv_type_mbstate_t=no ;;
13036 esac
13037 fi
13038 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13039 esac
13040 fi
13041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
13042 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
13043    if test $ac_cv_type_mbstate_t = yes; then
13044
13045 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
13046
13047    else
13048
13049 printf "%s\n" "#define mbstate_t int" >>confdefs.h
13050
13051    fi
13052
13053
13054
13055     HAVE_DECL_FCLOSEALL=1;
13056   HAVE_DECL_FPURGE=1;
13057   HAVE_DECL_FSEEKO=1;
13058   HAVE_DECL_FTELLO=1;
13059   HAVE_DECL_GETDELIM=1;
13060   HAVE_DECL_GETLINE=1;
13061   HAVE_DECL_GETW=1;
13062   HAVE_DECL_OBSTACK_PRINTF=1;
13063   HAVE_DECL_PUTW=1;
13064   HAVE_DECL_SNPRINTF=1;
13065   HAVE_DECL_VSNPRINTF=1;
13066   HAVE_DPRINTF=1;
13067   HAVE_FSEEKO=1;
13068   HAVE_FTELLO=1;
13069   HAVE_PCLOSE=1;
13070   HAVE_POPEN=1;
13071   HAVE_RENAMEAT=1;
13072   HAVE_VASPRINTF=1;
13073   HAVE_VDPRINTF=1;
13074   REPLACE_DPRINTF=0;
13075   REPLACE_FCLOSE=0;
13076   REPLACE_FDOPEN=0;
13077   REPLACE_FFLUSH=0;
13078   REPLACE_FOPEN=0;
13079   REPLACE_FOPEN_FOR_FOPEN_GNU=0;
13080   REPLACE_FPRINTF=0;
13081   REPLACE_FPURGE=0;
13082   REPLACE_FREOPEN=0;
13083   REPLACE_FSEEK=0;
13084   REPLACE_FSEEKO=0;
13085   REPLACE_FTELL=0;
13086   REPLACE_FTELLO=0;
13087   REPLACE_GETDELIM=0;
13088   REPLACE_GETLINE=0;
13089   REPLACE_OBSTACK_PRINTF=0;
13090   REPLACE_PERROR=0;
13091   REPLACE_POPEN=0;
13092   REPLACE_PRINTF=0;
13093   REPLACE_REMOVE=0;
13094   REPLACE_RENAME=0;
13095   REPLACE_RENAMEAT=0;
13096   REPLACE_SNPRINTF=0;
13097   REPLACE_SPRINTF=0;
13098   REPLACE_STDIO_READ_FUNCS=0;
13099   REPLACE_STDIO_WRITE_FUNCS=0;
13100   REPLACE_TMPFILE=0;
13101   REPLACE_VASPRINTF=0;
13102   REPLACE_VDPRINTF=0;
13103   REPLACE_VFPRINTF=0;
13104   REPLACE_VPRINTF=0;
13105   REPLACE_VSNPRINTF=0;
13106   REPLACE_VSPRINTF=0;
13107
13108
13109
13110
13111   case "$host_os" in
13112     mingw* | pw*)
13113             REPLACE_FOPEN=1
13114             gl_cv_func_fopen_slash="guessing no"
13115       ;;
13116     *)
13117                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
13118 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
13119 if test ${gl_cv_func_fopen_slash+y}
13120 then :
13121   printf %s "(cached) " >&6
13122 else case e in #(
13123   e)
13124           if test "$cross_compiling" = yes
13125 then :
13126
13127              case "$host_os" in
13128                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
13129                  gl_cv_func_fopen_slash="guessing no" ;;
13130                *)
13131                  gl_cv_func_fopen_slash="guessing yes" ;;
13132              esac
13133
13134 else case e in #(
13135   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136 /* end confdefs.h.  */
13137
13138 #include <stddef.h>
13139 #include <stdio.h>
13140 int main ()
13141 {
13142   FILE *fp = fopen ("conftest.sl/", "w");
13143   int result = (fp != NULL);
13144   if (fp != NULL)
13145     fclose (fp);
13146   return result;
13147 }
13148 _ACEOF
13149 if ac_fn_c_try_run "$LINENO"
13150 then :
13151   gl_cv_func_fopen_slash=yes
13152 else case e in #(
13153   e) gl_cv_func_fopen_slash=no ;;
13154 esac
13155 fi
13156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13158 esac
13159 fi
13160
13161           rm -f conftest.sl
13162          ;;
13163 esac
13164 fi
13165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
13166 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
13167       ;;
13168   esac
13169   case "$gl_cv_func_fopen_slash" in
13170     *no)
13171
13172 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
13173
13174       REPLACE_FOPEN=1
13175       ;;
13176   esac
13177
13178
13179
13180
13181
13182
13183
13184   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
13185 printf %s "checking whether fflush works on input streams... " >&6; }
13186 if test ${gl_cv_func_fflush_stdin+y}
13187 then :
13188   printf %s "(cached) " >&6
13189 else case e in #(
13190   e) echo hello world > conftest.txt
13191      if test "$cross_compiling" = yes
13192 then :
13193   case "$host_os" in
13194                   # Guess no on native Windows.
13195           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
13196           *)      gl_cv_func_fflush_stdin=cross ;;
13197         esac
13198
13199 else case e in #(
13200   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201 /* end confdefs.h.  */
13202
13203 #include <stdio.h>
13204 #if HAVE_UNISTD_H
13205 # include <unistd.h>
13206 #else /* on Windows with MSVC */
13207 # include <io.h>
13208 #endif
13209
13210
13211 $gl_mda_defines
13212
13213 int
13214 main (void)
13215 {
13216 FILE *f = fopen ("conftest.txt", "r");
13217          char buffer[10];
13218          int fd;
13219          int c;
13220          if (f == NULL)
13221            return 1;
13222          fd = fileno (f);
13223          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
13224            { fclose (f); return 2; }
13225          /* For deterministic results, ensure f read a bigger buffer.  */
13226          if (lseek (fd, 0, SEEK_CUR) == 5)
13227            { fclose (f); return 3; }
13228          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
13229             on BSD systems and on mingw.  */
13230          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
13231            { fclose (f); return 4; }
13232          if (lseek (fd, 0, SEEK_CUR) != 5)
13233            { fclose (f); return 5; }
13234          /* Verify behaviour of fflush after ungetc. See
13235             <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
13236          /* Verify behaviour of fflush after a backup ungetc.  This fails on
13237             mingw.  */
13238          c = fgetc (f);
13239          ungetc (c, f);
13240          fflush (f);
13241          if (fgetc (f) != c)
13242            { fclose (f); return 6; }
13243          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
13244             on glibc 2.8 and on BSD systems.  */
13245          c = fgetc (f);
13246          ungetc ('@', f);
13247          fflush (f);
13248          if (fgetc (f) != c)
13249            { fclose (f); return 7; }
13250          fclose (f);
13251          return 0;
13252
13253   ;
13254   return 0;
13255 }
13256 _ACEOF
13257 if ac_fn_c_try_run "$LINENO"
13258 then :
13259   gl_cv_func_fflush_stdin=yes
13260 else case e in #(
13261   e) gl_cv_func_fflush_stdin=no ;;
13262 esac
13263 fi
13264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13265   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13266 esac
13267 fi
13268
13269      rm conftest.txt
13270      ;;
13271 esac
13272 fi
13273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
13274 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
13275   case "$gl_cv_func_fflush_stdin" in
13276     *yes) gl_func_fflush_stdin=1 ;;
13277     *no)  gl_func_fflush_stdin=0 ;;
13278     *)    gl_func_fflush_stdin='(-1)' ;;
13279   esac
13280
13281 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
13282
13283
13284   case "$gl_cv_func_fflush_stdin" in
13285     *yes) ;;
13286     *) REPLACE_FCLOSE=1 ;;
13287   esac
13288
13289
13290   if test $REPLACE_CLOSE = 1; then
13291     REPLACE_FCLOSE=1
13292   fi
13293
13294   case "$host_os" in
13295     openedition) REPLACE_FCLOSE=1 ;;
13296   esac
13297
13298   if test $REPLACE_FCLOSE = 0; then
13299
13300
13301   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
13302 printf %s "checking whether fclose works on input streams... " >&6; }
13303 if test ${gl_cv_func_fclose_stdin+y}
13304 then :
13305   printf %s "(cached) " >&6
13306 else case e in #(
13307   e) echo hello world > conftest.txt
13308      if test "$cross_compiling" = yes
13309 then :
13310   case "$host_os" in
13311                               # Guess no on glibc systems.
13312           *-gnu* | gnu*)      gl_cv_func_fclose_stdin="guessing no" ;;
13313                               # Guess yes on musl systems.
13314           *-musl* | midipix*) gl_cv_func_fclose_stdin="guessing yes" ;;
13315                               # Guess no on native Windows.
13316           mingw*)             gl_cv_func_fclose_stdin="guessing no" ;;
13317                               # If we don't know, obey --enable-cross-guesses.
13318           *)                  gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
13319         esac
13320
13321 else case e in #(
13322   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323 /* end confdefs.h.  */
13324 #include <fcntl.h>
13325             #include <stdio.h>
13326             #if HAVE_UNISTD_H
13327             # include <unistd.h>
13328             #else /* on Windows with MSVC */
13329             # include <io.h>
13330             #endif
13331
13332
13333 $gl_mda_defines
13334
13335 int
13336 main (void)
13337 {
13338 int fd;
13339             int fd2;
13340             FILE *fp;
13341             fd = open ("conftest.txt", O_RDONLY);
13342             if (fd < 0)
13343               return 1;
13344             if (lseek (fd, 1, SEEK_SET) != 1)
13345               return 2;
13346             fd2 = dup (fd);
13347             if (fd2 < 0)
13348               return 3;
13349             fp = fdopen (fd2, "r");
13350             if (fp == NULL)
13351               return 4;
13352             if (fgetc (fp) != 'e')
13353               { fclose (fp); return 5; }
13354             /* This fclose() call should reposition the underlying file
13355                descriptor.  */
13356             if (fclose (fp) != 0)
13357               return 6;
13358             if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
13359               return 7;
13360             /* Verify the file position.  */
13361             if (lseek (fd, 0, SEEK_CUR) != 2)
13362               return 8;
13363             return 0;
13364
13365   ;
13366   return 0;
13367 }
13368 _ACEOF
13369 if ac_fn_c_try_run "$LINENO"
13370 then :
13371   gl_cv_func_fclose_stdin=yes
13372 else case e in #(
13373   e) gl_cv_func_fclose_stdin=no ;;
13374 esac
13375 fi
13376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13377   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13378 esac
13379 fi
13380
13381      rm conftest.txt
13382      ;;
13383 esac
13384 fi
13385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
13386 printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
13387
13388     case "$gl_cv_func_fclose_stdin" in
13389       *yes) ;;
13390       *) REPLACE_FCLOSE=1 ;;
13391     esac
13392   fi
13393
13394
13395
13396   GL_GNULIB_DPRINTF=0
13397
13398
13399
13400   GL_GNULIB_FCLOSE=0
13401
13402
13403
13404   GL_GNULIB_FDOPEN=0
13405
13406
13407
13408   GL_GNULIB_FFLUSH=0
13409
13410
13411
13412   GL_GNULIB_FGETC=0
13413
13414
13415
13416   GL_GNULIB_FGETS=0
13417
13418
13419
13420   GL_GNULIB_FOPEN=0
13421
13422
13423
13424   GL_GNULIB_FOPEN_GNU=0
13425
13426
13427
13428   GL_GNULIB_FPRINTF=0
13429
13430
13431
13432   GL_GNULIB_FPRINTF_POSIX=0
13433
13434
13435
13436   GL_GNULIB_FPURGE=0
13437
13438
13439
13440   GL_GNULIB_FPUTC=0
13441
13442
13443
13444   GL_GNULIB_FPUTS=0
13445
13446
13447
13448   GL_GNULIB_FREAD=0
13449
13450
13451
13452   GL_GNULIB_FREOPEN=0
13453
13454
13455
13456   GL_GNULIB_FSCANF=0
13457
13458
13459
13460   GL_GNULIB_FSEEK=0
13461
13462
13463
13464   GL_GNULIB_FSEEKO=0
13465
13466
13467
13468   GL_GNULIB_FTELL=0
13469
13470
13471
13472   GL_GNULIB_FTELLO=0
13473
13474
13475
13476   GL_GNULIB_FWRITE=0
13477
13478
13479
13480   GL_GNULIB_GETC=0
13481
13482
13483
13484   GL_GNULIB_GETCHAR=0
13485
13486
13487
13488   GL_GNULIB_GETDELIM=0
13489
13490
13491
13492   GL_GNULIB_GETLINE=0
13493
13494
13495
13496   GL_GNULIB_OBSTACK_PRINTF=0
13497
13498
13499
13500   GL_GNULIB_OBSTACK_PRINTF_POSIX=0
13501
13502
13503
13504   GL_GNULIB_PCLOSE=0
13505
13506
13507
13508   GL_GNULIB_PERROR=0
13509
13510
13511
13512   GL_GNULIB_POPEN=0
13513
13514
13515
13516   GL_GNULIB_PRINTF=0
13517
13518
13519
13520   GL_GNULIB_PRINTF_POSIX=0
13521
13522
13523
13524   GL_GNULIB_PUTC=0
13525
13526
13527
13528   GL_GNULIB_PUTCHAR=0
13529
13530
13531
13532   GL_GNULIB_PUTS=0
13533
13534
13535
13536   GL_GNULIB_REMOVE=0
13537
13538
13539
13540   GL_GNULIB_RENAME=0
13541
13542
13543
13544   GL_GNULIB_RENAMEAT=0
13545
13546
13547
13548   GL_GNULIB_SCANF=0
13549
13550
13551
13552   GL_GNULIB_SNPRINTF=0
13553
13554
13555
13556   GL_GNULIB_SPRINTF_POSIX=0
13557
13558
13559
13560   GL_GNULIB_STDIO_H_NONBLOCKING=0
13561
13562
13563
13564   GL_GNULIB_STDIO_H_SIGPIPE=0
13565
13566
13567
13568   GL_GNULIB_TMPFILE=0
13569
13570
13571
13572   GL_GNULIB_VASPRINTF=0
13573
13574
13575
13576   GL_GNULIB_VFSCANF=0
13577
13578
13579
13580   GL_GNULIB_VSCANF=0
13581
13582
13583
13584   GL_GNULIB_VDPRINTF=0
13585
13586
13587
13588   GL_GNULIB_VFPRINTF=0
13589
13590
13591
13592   GL_GNULIB_VFPRINTF_POSIX=0
13593
13594
13595
13596   GL_GNULIB_VPRINTF=0
13597
13598
13599
13600   GL_GNULIB_VPRINTF_POSIX=0
13601
13602
13603
13604   GL_GNULIB_VSNPRINTF=0
13605
13606
13607
13608   GL_GNULIB_VSPRINTF_POSIX=0
13609
13610
13611
13612   GL_GNULIB_MDA_FCLOSEALL=1
13613
13614
13615
13616   GL_GNULIB_MDA_FDOPEN=1
13617
13618
13619
13620   GL_GNULIB_MDA_FILENO=1
13621
13622
13623
13624   GL_GNULIB_MDA_GETW=1
13625
13626
13627
13628   GL_GNULIB_MDA_PUTW=1
13629
13630
13631
13632   GL_GNULIB_MDA_TEMPNAM=1
13633
13634
13635
13636
13637     HAVE_FCHMODAT=1;
13638   HAVE_FSTATAT=1;
13639   HAVE_FUTIMENS=1;
13640   HAVE_GETUMASK=1;
13641   HAVE_LCHMOD=1;
13642   HAVE_LSTAT=1;
13643   HAVE_MKDIRAT=1;
13644   HAVE_MKFIFO=1;
13645   HAVE_MKFIFOAT=1;
13646   HAVE_MKNOD=1;
13647   HAVE_MKNODAT=1;
13648   HAVE_UTIMENSAT=1;
13649   REPLACE_CHMOD=0;
13650   REPLACE_FCHMODAT=0;
13651   REPLACE_FSTAT=0;
13652   REPLACE_FSTATAT=0;
13653   REPLACE_FUTIMENS=0;
13654   REPLACE_LSTAT=0;
13655   REPLACE_MKDIR=0;
13656   REPLACE_MKFIFO=0;
13657   REPLACE_MKFIFOAT=0;
13658   REPLACE_MKNOD=0;
13659   REPLACE_MKNODAT=0;
13660   REPLACE_STAT=0;
13661   REPLACE_UTIMENSAT=0;
13662
13663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
13664 printf %s "checking whether stat file-mode macros are broken... " >&6; }
13665 if test ${ac_cv_header_stat_broken+y}
13666 then :
13667   printf %s "(cached) " >&6
13668 else case e in #(
13669   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h.  */
13671 #include <sys/types.h>
13672 #include <sys/stat.h>
13673
13674 #if defined S_ISBLK && defined S_IFDIR
13675 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
13676 #endif
13677
13678 #if defined S_ISBLK && defined S_IFCHR
13679 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
13680 #endif
13681
13682 #if defined S_ISLNK && defined S_IFREG
13683 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
13684 #endif
13685
13686 #if defined S_ISSOCK && defined S_IFREG
13687 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
13688 #endif
13689
13690 _ACEOF
13691 if ac_fn_c_try_compile "$LINENO"
13692 then :
13693   ac_cv_header_stat_broken=no
13694 else case e in #(
13695   e) ac_cv_header_stat_broken=yes ;;
13696 esac
13697 fi
13698 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13699 esac
13700 fi
13701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
13702 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
13703 if test $ac_cv_header_stat_broken = yes; then
13704
13705 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
13706
13707 fi
13708
13709
13710
13711   case "$host_os" in
13712     mingw*)
13713                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
13714 printf %s "checking for 64-bit off_t... " >&6; }
13715 if test ${gl_cv_type_off_t_64+y}
13716 then :
13717   printf %s "(cached) " >&6
13718 else case e in #(
13719   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720 /* end confdefs.h.  */
13721 #include <sys/types.h>
13722                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
13723
13724 int
13725 main (void)
13726 {
13727
13728   ;
13729   return 0;
13730 }
13731 _ACEOF
13732 if ac_fn_c_try_compile "$LINENO"
13733 then :
13734   gl_cv_type_off_t_64=yes
13735 else case e in #(
13736   e) gl_cv_type_off_t_64=no ;;
13737 esac
13738 fi
13739 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13740          ;;
13741 esac
13742 fi
13743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
13744 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
13745       if test $gl_cv_type_off_t_64 = no; then
13746         WINDOWS_64_BIT_OFF_T=1
13747       else
13748         WINDOWS_64_BIT_OFF_T=0
13749       fi
13750                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
13751 printf %s "checking for 64-bit st_size... " >&6; }
13752 if test ${gl_cv_member_st_size_64+y}
13753 then :
13754   printf %s "(cached) " >&6
13755 else case e in #(
13756   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757 /* end confdefs.h.  */
13758 #include <sys/types.h>
13759                 struct stat buf;
13760                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
13761
13762 int
13763 main (void)
13764 {
13765
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 if ac_fn_c_try_compile "$LINENO"
13771 then :
13772   gl_cv_member_st_size_64=yes
13773 else case e in #(
13774   e) gl_cv_member_st_size_64=no ;;
13775 esac
13776 fi
13777 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13778          ;;
13779 esac
13780 fi
13781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
13782 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
13783       if test $gl_cv_member_st_size_64 = no; then
13784         WINDOWS_64_BIT_ST_SIZE=1
13785       else
13786         WINDOWS_64_BIT_ST_SIZE=0
13787       fi
13788       ;;
13789     *)
13790                                                       WINDOWS_64_BIT_OFF_T=0
13791       WINDOWS_64_BIT_ST_SIZE=0
13792       ;;
13793   esac
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809      if test $gl_cv_have_include_next = yes; then
13810        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13811      else
13812        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
13813 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
13814 if test ${gl_cv_next_sys_stat_h+y}
13815 then :
13816   printf %s "(cached) " >&6
13817 else case e in #(
13818   e)
13819              if test $ac_cv_header_sys_stat_h = yes; then
13820
13821
13822
13823
13824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h.  */
13826 #include <sys/stat.h>
13827 _ACEOF
13828                 case "$host_os" in
13829     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13830     *)    gl_absname_cpp="$ac_cpp" ;;
13831   esac
13832
13833   case "$host_os" in
13834     mingw*)
13835                                           gl_dirsep_regex='[/\\]'
13836       ;;
13837     *)
13838       gl_dirsep_regex='\/'
13839       ;;
13840   esac
13841       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13842   gl_header_literal_regex=`echo 'sys/stat.h' \
13843                            | sed -e "$gl_make_literal_regex_sed"`
13844   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13845       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13846       s|^/[^/]|//&|
13847       p
13848       q
13849     }'
13850
13851         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13852   sed -n "$gl_absolute_header_sed"`
13853
13854           gl_header=$gl_cv_absolute_sys_stat_h
13855           gl_cv_next_sys_stat_h='"'$gl_header'"'
13856           else
13857                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13858              fi
13859
13860           ;;
13861 esac
13862 fi
13863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
13864 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
13865      fi
13866      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
13867
13868      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13869        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13870        gl_next_as_first_directive='<'sys/stat.h'>'
13871      else
13872        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13873        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
13874      fi
13875      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
13876
13877
13878
13879
13880
13881
13882
13883
13884     WINDOWS_STAT_TIMESPEC=0
13885
13886
13887
13888
13889
13890
13891
13892
13893       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
13894      #include <sys/stat.h>
13895 "
13896 if test "x$ac_cv_type_nlink_t" = xyes
13897 then :
13898
13899 else case e in #(
13900   e)
13901 printf "%s\n" "#define nlink_t int" >>confdefs.h
13902  ;;
13903 esac
13904 fi
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915   case "$host_os" in
13916     mingw*)
13917       ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
13918 if test "x$ac_cv_header_sdkddkver_h" = xyes
13919 then :
13920   printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
13921
13922 fi
13923
13924       ;;
13925   esac
13926
13927
13928
13929
13930
13931
13932
13933   GL_GNULIB_CHMOD=0
13934
13935
13936
13937   GL_GNULIB_FCHMODAT=0
13938
13939
13940
13941   GL_GNULIB_FSTAT=0
13942
13943
13944
13945   GL_GNULIB_FSTATAT=0
13946
13947
13948
13949   GL_GNULIB_FUTIMENS=0
13950
13951
13952
13953   GL_GNULIB_GETUMASK=0
13954
13955
13956
13957   GL_GNULIB_LCHMOD=0
13958
13959
13960
13961   GL_GNULIB_LSTAT=0
13962
13963
13964
13965   GL_GNULIB_MKDIR=0
13966
13967
13968
13969   GL_GNULIB_MKDIRAT=0
13970
13971
13972
13973   GL_GNULIB_MKFIFO=0
13974
13975
13976
13977   GL_GNULIB_MKFIFOAT=0
13978
13979
13980
13981   GL_GNULIB_MKNOD=0
13982
13983
13984
13985   GL_GNULIB_MKNODAT=0
13986
13987
13988
13989   GL_GNULIB_STAT=0
13990
13991
13992
13993   GL_GNULIB_UTIMENSAT=0
13994
13995
13996
13997   GL_GNULIB_OVERRIDES_STRUCT_STAT=0
13998
13999
14000
14001   GL_GNULIB_MDA_CHMOD=1
14002
14003
14004
14005   GL_GNULIB_MDA_MKDIR=1
14006
14007
14008
14009   GL_GNULIB_MDA_UMASK=1
14010
14011
14012
14013
14014 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14015 if test "x$ac_cv_have_decl_getdtablesize" = xyes
14016 then :
14017   ac_have_decl=1
14018 else case e in #(
14019   e) ac_have_decl=0 ;;
14020 esac
14021 fi
14022 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038      if test $gl_cv_have_include_next = yes; then
14039        gl_cv_next_getopt_h='<'getopt.h'>'
14040      else
14041        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
14042 printf %s "checking absolute name of <getopt.h>... " >&6; }
14043 if test ${gl_cv_next_getopt_h+y}
14044 then :
14045   printf %s "(cached) " >&6
14046 else case e in #(
14047   e)
14048              if test $ac_cv_header_getopt_h = yes; then
14049
14050
14051
14052
14053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14054 /* end confdefs.h.  */
14055 #include <getopt.h>
14056 _ACEOF
14057                 case "$host_os" in
14058     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14059     *)    gl_absname_cpp="$ac_cpp" ;;
14060   esac
14061
14062   case "$host_os" in
14063     mingw*)
14064                                           gl_dirsep_regex='[/\\]'
14065       ;;
14066     *)
14067       gl_dirsep_regex='\/'
14068       ;;
14069   esac
14070       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14071   gl_header_literal_regex=`echo 'getopt.h' \
14072                            | sed -e "$gl_make_literal_regex_sed"`
14073   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14074       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14075       s|^/[^/]|//&|
14076       p
14077       q
14078     }'
14079
14080         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14081   sed -n "$gl_absolute_header_sed"`
14082
14083           gl_header=$gl_cv_absolute_getopt_h
14084           gl_cv_next_getopt_h='"'$gl_header'"'
14085           else
14086                gl_cv_next_getopt_h='<'getopt.h'>'
14087              fi
14088
14089           ;;
14090 esac
14091 fi
14092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
14093 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
14094      fi
14095      NEXT_GETOPT_H=$gl_cv_next_getopt_h
14096
14097      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14098        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14099        gl_next_as_first_directive='<'getopt.h'>'
14100      else
14101        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14102        gl_next_as_first_directive=$gl_cv_next_getopt_h
14103      fi
14104      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
14105
14106
14107
14108
14109   if test $ac_cv_header_getopt_h = yes; then
14110     HAVE_GETOPT_H=1
14111   else
14112     HAVE_GETOPT_H=0
14113   fi
14114
14115
14116   gl_replace_getopt=
14117
14118     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14119            for ac_header in getopt.h
14120 do :
14121   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
14122 if test "x$ac_cv_header_getopt_h" = xyes
14123 then :
14124   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
14125
14126 else case e in #(
14127   e) gl_replace_getopt=yes ;;
14128 esac
14129 fi
14130
14131 done
14132   fi
14133
14134     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14135
14136   for ac_func in getopt_long_only
14137 do :
14138   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
14139 if test "x$ac_cv_func_getopt_long_only" = xyes
14140 then :
14141   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
14142
14143 else case e in #(
14144   e) gl_replace_getopt=yes ;;
14145 esac
14146 fi
14147
14148 done
14149   fi
14150
14151           if test -z "$gl_replace_getopt"; then
14152     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
14153 printf %s "checking whether getopt is POSIX compatible... " >&6; }
14154 if test ${gl_cv_func_getopt_posix+y}
14155 then :
14156   printf %s "(cached) " >&6
14157 else case e in #(
14158   e)
14159                                                 if test $cross_compiling = no; then
14160                               if test "$cross_compiling" = yes
14161 then :
14162   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14163 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14164 as_fn_error $? "cannot run test program while cross compiling
14165 See 'config.log' for more details" "$LINENO" 5; }
14166 else case e in #(
14167   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168 /* end confdefs.h.  */
14169
14170 #include <unistd.h>
14171 #include <stdlib.h>
14172 #include <string.h>
14173
14174 int
14175 main ()
14176 {
14177   static char program[] = "program";
14178   static char a[] = "-a";
14179   static char foo[] = "foo";
14180   static char bar[] = "bar";
14181   char *argv[] = { program, a, foo, bar, NULL };
14182   int c;
14183
14184   c = getopt (4, argv, "ab");
14185   if (!(c == 'a'))
14186     return 1;
14187   c = getopt (4, argv, "ab");
14188   if (!(c == -1))
14189     return 2;
14190   if (!(optind == 2))
14191     return 3;
14192   return 0;
14193 }
14194
14195 _ACEOF
14196 if ac_fn_c_try_run "$LINENO"
14197 then :
14198   gl_cv_func_getopt_posix=maybe
14199 else case e in #(
14200   e) gl_cv_func_getopt_posix=no ;;
14201 esac
14202 fi
14203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14204   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14205 esac
14206 fi
14207
14208           if test $gl_cv_func_getopt_posix = maybe; then
14209                                     if test "$cross_compiling" = yes
14210 then :
14211   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14212 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14213 as_fn_error $? "cannot run test program while cross compiling
14214 See 'config.log' for more details" "$LINENO" 5; }
14215 else case e in #(
14216   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h.  */
14218
14219 #include <unistd.h>
14220 #include <stdlib.h>
14221 #include <string.h>
14222
14223 int
14224 main ()
14225 {
14226   static char program[] = "program";
14227   static char donald[] = "donald";
14228   static char p[] = "-p";
14229   static char billy[] = "billy";
14230   static char duck[] = "duck";
14231   static char a[] = "-a";
14232   static char bar[] = "bar";
14233   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
14234   int c;
14235
14236   c = getopt (7, argv, "+abp:q:");
14237   if (!(c == -1))
14238     return 4;
14239   if (!(strcmp (argv[0], "program") == 0))
14240     return 5;
14241   if (!(strcmp (argv[1], "donald") == 0))
14242     return 6;
14243   if (!(strcmp (argv[2], "-p") == 0))
14244     return 7;
14245   if (!(strcmp (argv[3], "billy") == 0))
14246     return 8;
14247   if (!(strcmp (argv[4], "duck") == 0))
14248     return 9;
14249   if (!(strcmp (argv[5], "-a") == 0))
14250     return 10;
14251   if (!(strcmp (argv[6], "bar") == 0))
14252     return 11;
14253   if (!(optind == 1))
14254     return 12;
14255   return 0;
14256 }
14257
14258 _ACEOF
14259 if ac_fn_c_try_run "$LINENO"
14260 then :
14261   gl_cv_func_getopt_posix=maybe
14262 else case e in #(
14263   e) gl_cv_func_getopt_posix=no ;;
14264 esac
14265 fi
14266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14267   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14268 esac
14269 fi
14270
14271           fi
14272           if test $gl_cv_func_getopt_posix = maybe; then
14273                         if test "$cross_compiling" = yes
14274 then :
14275   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14276 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14277 as_fn_error $? "cannot run test program while cross compiling
14278 See 'config.log' for more details" "$LINENO" 5; }
14279 else case e in #(
14280   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14281 /* end confdefs.h.  */
14282
14283 #include <unistd.h>
14284 #include <stdlib.h>
14285 #include <string.h>
14286
14287 int
14288 main ()
14289 {
14290   static char program[] = "program";
14291   static char ab[] = "-ab";
14292   char *argv[3] = { program, ab, NULL };
14293   if (getopt (2, argv, "ab:") != 'a')
14294     return 13;
14295   if (getopt (2, argv, "ab:") != '?')
14296     return 14;
14297   if (optopt != 'b')
14298     return 15;
14299   if (optind != 2)
14300     return 16;
14301   return 0;
14302 }
14303
14304 _ACEOF
14305 if ac_fn_c_try_run "$LINENO"
14306 then :
14307   gl_cv_func_getopt_posix=yes
14308 else case e in #(
14309   e) gl_cv_func_getopt_posix=no ;;
14310 esac
14311 fi
14312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14313   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14314 esac
14315 fi
14316
14317           fi
14318         else
14319           case "$host_os" in
14320             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
14321             *)                       gl_cv_func_getopt_posix="guessing yes";;
14322           esac
14323         fi
14324        ;;
14325 esac
14326 fi
14327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
14328 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
14329     case "$gl_cv_func_getopt_posix" in
14330       *no) gl_replace_getopt=yes ;;
14331     esac
14332   fi
14333
14334   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14335     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
14336 printf %s "checking for working GNU getopt function... " >&6; }
14337 if test ${gl_cv_func_getopt_gnu+y}
14338 then :
14339   printf %s "(cached) " >&6
14340 else case e in #(
14341   e) # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
14342        # optstring is necessary for programs like m4 that have POSIX-mandated
14343        # semantics for supporting options interspersed with files.
14344        # Also, since getopt_long is a GNU extension, we require optind=0.
14345        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
14346        # so take care to revert to the correct (non-)export state.
14347        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
14348        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
14349          xx) gl_had_POSIXLY_CORRECT=exported ;;
14350          x)  gl_had_POSIXLY_CORRECT=yes      ;;
14351          *)  gl_had_POSIXLY_CORRECT=         ;;
14352        esac
14353        POSIXLY_CORRECT=1
14354        export POSIXLY_CORRECT
14355        if test "$cross_compiling" = yes
14356 then :
14357                              gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
14358
14359 else case e in #(
14360   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h.  */
14362 #include <getopt.h>
14363                            #include <stddef.h>
14364                            #include <string.h>
14365
14366 #include <stdlib.h>
14367 #if defined __MACH__ && defined __APPLE__
14368 /* Avoid a crash on Mac OS X.  */
14369 #include <mach/mach.h>
14370 #include <mach/mach_error.h>
14371 #include <mach/thread_status.h>
14372 #include <mach/exception.h>
14373 #include <mach/task.h>
14374 #include <pthread.h>
14375 /* The exception port on which our thread listens.  */
14376 static mach_port_t our_exception_port;
14377 /* The main function of the thread listening for exceptions of type
14378    EXC_BAD_ACCESS.  */
14379 static void *
14380 mach_exception_thread (void *arg)
14381 {
14382   /* Buffer for a message to be received.  */
14383   struct {
14384     mach_msg_header_t head;
14385     mach_msg_body_t msgh_body;
14386     char data[1024];
14387   } msg;
14388   mach_msg_return_t retval;
14389   /* Wait for a message on the exception port.  */
14390   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
14391                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
14392   if (retval != MACH_MSG_SUCCESS)
14393     abort ();
14394   exit (1);
14395 }
14396 static void
14397 nocrash_init (void)
14398 {
14399   mach_port_t self = mach_task_self ();
14400   /* Allocate a port on which the thread shall listen for exceptions.  */
14401   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
14402       == KERN_SUCCESS) {
14403     /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
14404     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
14405                                 MACH_MSG_TYPE_MAKE_SEND)
14406         == KERN_SUCCESS) {
14407       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
14408          for us.  */
14409       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
14410       /* Create the thread listening on the exception port.  */
14411       pthread_attr_t attr;
14412       pthread_t thread;
14413       if (pthread_attr_init (&attr) == 0
14414           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
14415           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
14416         pthread_attr_destroy (&attr);
14417         /* Replace the exception port info for these exceptions with our own.
14418            Note that we replace the exception port for the entire task, not only
14419            for a particular thread.  This has the effect that when our exception
14420            port gets the message, the thread specific exception port has already
14421            been asked, and we don't need to bother about it.
14422            See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
14423         task_set_exception_ports (self, mask, our_exception_port,
14424                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
14425       }
14426     }
14427   }
14428 }
14429 #elif defined _WIN32 && ! defined __CYGWIN__
14430 /* Avoid a crash on native Windows.  */
14431 #define WIN32_LEAN_AND_MEAN
14432 #include <windows.h>
14433 #include <winerror.h>
14434 static LONG WINAPI
14435 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
14436 {
14437   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
14438     {
14439     case EXCEPTION_ACCESS_VIOLATION:
14440     case EXCEPTION_IN_PAGE_ERROR:
14441     case EXCEPTION_STACK_OVERFLOW:
14442     case EXCEPTION_GUARD_PAGE:
14443     case EXCEPTION_PRIV_INSTRUCTION:
14444     case EXCEPTION_ILLEGAL_INSTRUCTION:
14445     case EXCEPTION_DATATYPE_MISALIGNMENT:
14446     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
14447     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
14448       exit (1);
14449     }
14450   return EXCEPTION_CONTINUE_SEARCH;
14451 }
14452 static void
14453 nocrash_init (void)
14454 {
14455   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
14456 }
14457 #else
14458 /* Avoid a crash on POSIX systems.  */
14459 #include <signal.h>
14460 #include <unistd.h>
14461 /* A POSIX signal handler.  */
14462 static void
14463 exception_handler (int sig)
14464 {
14465   _exit (1);
14466 }
14467 static void
14468 nocrash_init (void)
14469 {
14470 #ifdef SIGSEGV
14471   signal (SIGSEGV, exception_handler);
14472 #endif
14473 #ifdef SIGBUS
14474   signal (SIGBUS, exception_handler);
14475 #endif
14476 }
14477 #endif
14478
14479
14480 int
14481 main (void)
14482 {
14483
14484              int result = 0;
14485
14486              nocrash_init();
14487
14488              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
14489                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
14490                 OSF/1 5.1, Solaris 10.  */
14491              {
14492                static char conftest[] = "conftest";
14493                static char plus[] = "-+";
14494                char *argv[3] = { conftest, plus, NULL };
14495                opterr = 0;
14496                if (getopt (2, argv, "+a") != '?')
14497                  result |= 1;
14498              }
14499              /* This code succeeds on glibc 2.8, mingw,
14500                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
14501                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
14502              {
14503                static char program[] = "program";
14504                static char p[] = "-p";
14505                static char foo[] = "foo";
14506                static char bar[] = "bar";
14507                char *argv[] = { program, p, foo, bar, NULL };
14508
14509                optind = 1;
14510                if (getopt (4, argv, "p::") != 'p')
14511                  result |= 2;
14512                else if (optarg != NULL)
14513                  result |= 4;
14514                else if (getopt (4, argv, "p::") != -1)
14515                  result |= 6;
14516                else if (optind != 2)
14517                  result |= 8;
14518              }
14519              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
14520              {
14521                static char program[] = "program";
14522                static char foo[] = "foo";
14523                static char p[] = "-p";
14524                char *argv[] = { program, foo, p, NULL };
14525                optind = 0;
14526                if (getopt (3, argv, "-p") != 1)
14527                  result |= 16;
14528                else if (getopt (3, argv, "-p") != 'p')
14529                  result |= 16;
14530              }
14531              /* This code fails on glibc 2.11.  */
14532              {
14533                static char program[] = "program";
14534                static char b[] = "-b";
14535                static char a[] = "-a";
14536                char *argv[] = { program, b, a, NULL };
14537                optind = opterr = 0;
14538                if (getopt (3, argv, "+:a:b") != 'b')
14539                  result |= 32;
14540                else if (getopt (3, argv, "+:a:b") != ':')
14541                  result |= 32;
14542              }
14543              /* This code dumps core on glibc 2.14.  */
14544              {
14545                static char program[] = "program";
14546                static char w[] = "-W";
14547                static char dummy[] = "dummy";
14548                char *argv[] = { program, w, dummy, NULL };
14549                optind = opterr = 1;
14550                if (getopt (3, argv, "W;") != 'W')
14551                  result |= 64;
14552              }
14553              return result;
14554
14555   ;
14556   return 0;
14557 }
14558 _ACEOF
14559 if ac_fn_c_try_run "$LINENO"
14560 then :
14561   gl_cv_func_getopt_gnu=yes
14562 else case e in #(
14563   e) gl_cv_func_getopt_gnu=no ;;
14564 esac
14565 fi
14566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14567   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14568 esac
14569 fi
14570
14571        case $gl_had_POSIXLY_CORRECT in
14572          exported) ;;
14573          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
14574          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
14575        esac
14576        ;;
14577 esac
14578 fi
14579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
14580 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
14581     if test "$gl_cv_func_getopt_gnu" != yes; then
14582       gl_replace_getopt=yes
14583     else
14584       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
14585 printf %s "checking for working GNU getopt_long function... " >&6; }
14586 if test ${gl_cv_func_getopt_long_gnu+y}
14587 then :
14588   printf %s "(cached) " >&6
14589 else case e in #(
14590   e) if test "$cross_compiling" = yes
14591 then :
14592               case "$host_os" in
14593               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
14594               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
14595             esac
14596
14597 else case e in #(
14598   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599 /* end confdefs.h.  */
14600 #include <getopt.h>
14601                 #include <stddef.h>
14602                 #include <string.h>
14603
14604 int
14605 main (void)
14606 {
14607 static const struct option long_options[] =
14608                   {
14609                     { "xtremely-",no_argument,       NULL, 1003 },
14610                     { "xtra",     no_argument,       NULL, 1001 },
14611                     { "xtreme",   no_argument,       NULL, 1002 },
14612                     { "xtremely", no_argument,       NULL, 1003 },
14613                     { NULL,       0,                 NULL, 0 }
14614                   };
14615                 /* This code fails on OpenBSD 5.0.  */
14616                 {
14617                   static char program[] = "program";
14618                   static char xtremel[] = "--xtremel";
14619                   char *argv[] = { program, xtremel, NULL };
14620                   int option_index;
14621                   optind = 1; opterr = 0;
14622                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
14623                     return 1;
14624                 }
14625                 return 0;
14626
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 if ac_fn_c_try_run "$LINENO"
14632 then :
14633   gl_cv_func_getopt_long_gnu=yes
14634 else case e in #(
14635   e) gl_cv_func_getopt_long_gnu=no ;;
14636 esac
14637 fi
14638 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14639   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14640 esac
14641 fi
14642
14643          ;;
14644 esac
14645 fi
14646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
14647 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
14648       case "$gl_cv_func_getopt_long_gnu" in
14649         *yes) ;;
14650         *) gl_replace_getopt=yes ;;
14651       esac
14652     fi
14653   fi
14654
14655
14656
14657
14658     HAVE_GETRANDOM=1;
14659   REPLACE_GETRANDOM=0;
14660
14661
14662
14663   GL_GNULIB_GETRANDOM=0
14664
14665
14666
14667 :
14668
14669
14670
14671
14672
14673           ac_fn_check_decl "$LINENO" "timespec_get" "ac_cv_have_decl_timespec_get" "#include <time.h>
14674 " "$ac_c_undeclared_builtin_options" "CFLAGS"
14675 if test "x$ac_cv_have_decl_timespec_get" = xyes
14676 then :
14677
14678 fi
14679   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timespec_get" >&5
14680 printf %s "checking for timespec_get... " >&6; }
14681 if test ${gl_cv_onwards_func_timespec_get+y}
14682 then :
14683   printf %s "(cached) " >&6
14684 else case e in #(
14685   e) if test $ac_cv_have_decl_timespec_get = yes; then
14686        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14687 /* end confdefs.h.  */
14688 #include <time.h>
14689               struct timespec ts;
14690
14691 int
14692 main (void)
14693 {
14694 return timespec_get (&ts, 0);
14695   ;
14696   return 0;
14697 }
14698
14699 _ACEOF
14700 if ac_fn_c_try_link "$LINENO"
14701 then :
14702   gl_cv_onwards_func_timespec_get=yes
14703 else case e in #(
14704   e) gl_cv_onwards_func_timespec_get=no ;;
14705 esac
14706 fi
14707 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14708     conftest$ac_exeext conftest.$ac_ext
14709      else
14710        gl_cv_onwards_func_timespec_get=no
14711      fi
14712      case "$host_os" in
14713        linux*-android*)
14714          if test $gl_cv_onwards_func_timespec_get = no; then
14715            gl_cv_onwards_func_timespec_get='future OS version'
14716          fi
14717          ;;
14718      esac
14719      ;;
14720 esac
14721 fi
14722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timespec_get" >&5
14723 printf "%s\n" "$gl_cv_onwards_func_timespec_get" >&6; }
14724   case "$gl_cv_onwards_func_timespec_get" in
14725     future*) gl_cv_func_timespec_get=no ;;
14726     *)       gl_cv_func_timespec_get=$gl_cv_onwards_func_timespec_get ;;
14727   esac
14728
14729
14730     HAVE_GETTIMEOFDAY=1;
14731   HAVE_STRUCT_TIMEVAL=1;
14732   HAVE_SYS_TIME_H=1;
14733   REPLACE_GETTIMEOFDAY=0;
14734   REPLACE_STRUCT_TIMEVAL=0;
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750      if test $gl_cv_have_include_next = yes; then
14751        gl_cv_next_sys_time_h='<'sys/time.h'>'
14752      else
14753        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
14754 printf %s "checking absolute name of <sys/time.h>... " >&6; }
14755 if test ${gl_cv_next_sys_time_h+y}
14756 then :
14757   printf %s "(cached) " >&6
14758 else case e in #(
14759   e)
14760              if test $ac_cv_header_sys_time_h = yes; then
14761
14762
14763
14764
14765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h.  */
14767 #include <sys/time.h>
14768 _ACEOF
14769                 case "$host_os" in
14770     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14771     *)    gl_absname_cpp="$ac_cpp" ;;
14772   esac
14773
14774   case "$host_os" in
14775     mingw*)
14776                                           gl_dirsep_regex='[/\\]'
14777       ;;
14778     *)
14779       gl_dirsep_regex='\/'
14780       ;;
14781   esac
14782       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14783   gl_header_literal_regex=`echo 'sys/time.h' \
14784                            | sed -e "$gl_make_literal_regex_sed"`
14785   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14786       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14787       s|^/[^/]|//&|
14788       p
14789       q
14790     }'
14791
14792         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14793   sed -n "$gl_absolute_header_sed"`
14794
14795           gl_header=$gl_cv_absolute_sys_time_h
14796           gl_cv_next_sys_time_h='"'$gl_header'"'
14797           else
14798                gl_cv_next_sys_time_h='<'sys/time.h'>'
14799              fi
14800
14801           ;;
14802 esac
14803 fi
14804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
14805 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
14806      fi
14807      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
14808
14809      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14810        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14811        gl_next_as_first_directive='<'sys/time.h'>'
14812      else
14813        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14814        gl_next_as_first_directive=$gl_cv_next_sys_time_h
14815      fi
14816      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
14817
14818
14819
14820
14821
14822   if test $ac_cv_header_sys_time_h != yes; then
14823     HAVE_SYS_TIME_H=0
14824   fi
14825
14826
14827
14828
14829
14830   if test $ac_cv_header_sys_socket_h != yes; then
14831                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
14832 if test "x$ac_cv_header_winsock2_h" = xyes
14833 then :
14834   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
14835
14836 fi
14837
14838   fi
14839   if test "$ac_cv_header_winsock2_h" = yes; then
14840     HAVE_WINSOCK2_H=1
14841     UNISTD_H_HAVE_WINSOCK2_H=1
14842     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14843   else
14844     HAVE_WINSOCK2_H=0
14845   fi
14846
14847
14848   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
14849 printf %s "checking for struct timeval... " >&6; }
14850 if test ${gl_cv_sys_struct_timeval+y}
14851 then :
14852   printf %s "(cached) " >&6
14853 else case e in #(
14854   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h.  */
14856 #if HAVE_SYS_TIME_H
14857              #include <sys/time.h>
14858             #endif
14859             #include <time.h>
14860             #if HAVE_WINSOCK2_H
14861             # include <winsock2.h>
14862             #endif
14863
14864 int
14865 main (void)
14866 {
14867 static struct timeval x; x.tv_sec = x.tv_usec;
14868   ;
14869   return 0;
14870 }
14871 _ACEOF
14872 if ac_fn_c_try_compile "$LINENO"
14873 then :
14874   gl_cv_sys_struct_timeval=yes
14875 else case e in #(
14876   e) gl_cv_sys_struct_timeval=no ;;
14877 esac
14878 fi
14879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14880      ;;
14881 esac
14882 fi
14883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
14884 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
14885   if test $gl_cv_sys_struct_timeval != yes; then
14886     HAVE_STRUCT_TIMEVAL=0
14887   else
14888                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
14889 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
14890 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
14891 then :
14892   printf %s "(cached) " >&6
14893 else case e in #(
14894   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896 #if HAVE_SYS_TIME_H
14897                #include <sys/time.h>
14898               #endif
14899               #include <time.h>
14900               #if HAVE_WINSOCK2_H
14901               # include <winsock2.h>
14902               #endif
14903
14904 int
14905 main (void)
14906 {
14907 static struct timeval x;
14908               typedef int verify_tv_sec_type[
14909                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
14910               ];
14911
14912   ;
14913   return 0;
14914 }
14915 _ACEOF
14916 if ac_fn_c_try_compile "$LINENO"
14917 then :
14918   gl_cv_sys_struct_timeval_tv_sec=yes
14919 else case e in #(
14920   e) gl_cv_sys_struct_timeval_tv_sec=no ;;
14921 esac
14922 fi
14923 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14924        ;;
14925 esac
14926 fi
14927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
14928 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
14929     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
14930       REPLACE_STRUCT_TIMEVAL=1
14931     fi
14932   fi
14933
14934
14935
14936
14937
14938
14939
14940
14941   GL_GNULIB_GETTIMEOFDAY=0
14942
14943
14944
14945
14946
14947
14948
14949   if test -z "$gl_pthreadlib_body_done"; then
14950     gl_pthread_api=no
14951     LIBPTHREAD=
14952     LIBPMULTITHREAD=
14953     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14954     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14955     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14956 if test "x$ac_cv_header_pthread_h" = xyes
14957 then :
14958   gl_have_pthread_h=yes
14959 else case e in #(
14960   e) gl_have_pthread_h=no ;;
14961 esac
14962 fi
14963
14964     if test "$gl_have_pthread_h" = yes; then
14965       # Other possible tests:
14966       #   -lpthreads (FSU threads, PCthreads)
14967       #   -lgthreads
14968       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14969       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14970       # the second one only in libpthread, and lock.c needs it.
14971       #
14972       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14973       # needs -pthread for some reason.  See:
14974       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14975       save_LIBS=$LIBS
14976       for gl_pthread in '' '-pthread'; do
14977         LIBS="$LIBS $gl_pthread"
14978         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14979 /* end confdefs.h.  */
14980 #include <pthread.h>
14981                pthread_mutex_t m;
14982                pthread_mutexattr_t ma;
14983
14984 int
14985 main (void)
14986 {
14987 pthread_mutex_lock (&m);
14988                pthread_mutexattr_init (&ma);
14989   ;
14990   return 0;
14991 }
14992 _ACEOF
14993 if ac_fn_c_try_link "$LINENO"
14994 then :
14995   gl_pthread_api=yes
14996            LIBPTHREAD=$gl_pthread
14997            LIBPMULTITHREAD=$gl_pthread
14998 fi
14999 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15000     conftest$ac_exeext conftest.$ac_ext
15001         LIBS=$save_LIBS
15002         test $gl_pthread_api = yes && break
15003       done
15004       echo "$as_me:15004: gl_pthread_api=$gl_pthread_api" >&5
15005       echo "$as_me:15005: LIBPTHREAD=$LIBPTHREAD" >&5
15006
15007       gl_pthread_in_glibc=no
15008       # On Linux with glibc >= 2.34, libc contains the fully functional
15009       # pthread functions.
15010       case "$host_os" in
15011         linux*)
15012           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013 /* end confdefs.h.  */
15014 #include <features.h>
15015              #ifdef __GNU_LIBRARY__
15016               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
15017                Lucky user
15018               #endif
15019              #endif
15020
15021 _ACEOF
15022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15023   $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
15024 then :
15025   gl_pthread_in_glibc=yes
15026 fi
15027 rm -rf conftest*
15028
15029           ;;
15030       esac
15031       echo "$as_me:15031: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
15032
15033       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15034       # since it is defined as a macro on OSF/1.)
15035       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15036         # The program links fine without libpthread. But it may actually
15037         # need to link with libpthread in order to create multiple threads.
15038         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15039 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15040 if test ${ac_cv_lib_pthread_pthread_kill+y}
15041 then :
15042   printf %s "(cached) " >&6
15043 else case e in #(
15044   e) ac_check_lib_save_LIBS=$LIBS
15045 LIBS="-lpthread  $LIBS"
15046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047 /* end confdefs.h.  */
15048
15049 /* Override any GCC internal prototype to avoid an error.
15050    Use char because int might match the return type of a GCC
15051    builtin and then its argument prototype would still apply.
15052    The 'extern "C"' is for builds by C++ compilers;
15053    although this is not generally supported in C code supporting it here
15054    has little cost and some practical benefit (sr 110532).  */
15055 #ifdef __cplusplus
15056 extern "C"
15057 #endif
15058 char pthread_kill (void);
15059 int
15060 main (void)
15061 {
15062 return pthread_kill ();
15063   ;
15064   return 0;
15065 }
15066 _ACEOF
15067 if ac_fn_c_try_link "$LINENO"
15068 then :
15069   ac_cv_lib_pthread_pthread_kill=yes
15070 else case e in #(
15071   e) ac_cv_lib_pthread_pthread_kill=no ;;
15072 esac
15073 fi
15074 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15075     conftest$ac_exeext conftest.$ac_ext
15076 LIBS=$ac_check_lib_save_LIBS ;;
15077 esac
15078 fi
15079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15080 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15081 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15082 then :
15083   if test $gl_pthread_in_glibc = yes; then
15084              LIBPMULTITHREAD=
15085            else
15086              LIBPMULTITHREAD=-lpthread
15087              # On Solaris and HP-UX, most pthread functions exist also in libc.
15088              # Therefore pthread_in_use() needs to actually try to create a
15089              # thread: pthread_create from libc will fail, whereas
15090              # pthread_create will actually create a thread.
15091              # On Solaris 10 or newer, this test is no longer needed, because
15092              # libc contains the fully functional pthread functions.
15093              case "$host_os" in
15094                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
15095
15096 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15097
15098              esac
15099            fi
15100
15101 fi
15102
15103       elif test $gl_pthread_api != yes; then
15104         # Some library is needed. Try libpthread and libc_r.
15105         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15106 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15107 if test ${ac_cv_lib_pthread_pthread_kill+y}
15108 then :
15109   printf %s "(cached) " >&6
15110 else case e in #(
15111   e) ac_check_lib_save_LIBS=$LIBS
15112 LIBS="-lpthread  $LIBS"
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h.  */
15115
15116 /* Override any GCC internal prototype to avoid an error.
15117    Use char because int might match the return type of a GCC
15118    builtin and then its argument prototype would still apply.
15119    The 'extern "C"' is for builds by C++ compilers;
15120    although this is not generally supported in C code supporting it here
15121    has little cost and some practical benefit (sr 110532).  */
15122 #ifdef __cplusplus
15123 extern "C"
15124 #endif
15125 char pthread_kill (void);
15126 int
15127 main (void)
15128 {
15129 return pthread_kill ();
15130   ;
15131   return 0;
15132 }
15133 _ACEOF
15134 if ac_fn_c_try_link "$LINENO"
15135 then :
15136   ac_cv_lib_pthread_pthread_kill=yes
15137 else case e in #(
15138   e) ac_cv_lib_pthread_pthread_kill=no ;;
15139 esac
15140 fi
15141 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15142     conftest$ac_exeext conftest.$ac_ext
15143 LIBS=$ac_check_lib_save_LIBS ;;
15144 esac
15145 fi
15146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15147 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15148 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15149 then :
15150   gl_pthread_api=yes
15151            LIBPTHREAD=-lpthread
15152            LIBPMULTITHREAD=-lpthread
15153 fi
15154
15155         if test $gl_pthread_api != yes; then
15156           # For FreeBSD 4.
15157           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15158 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15159 if test ${ac_cv_lib_c_r_pthread_kill+y}
15160 then :
15161   printf %s "(cached) " >&6
15162 else case e in #(
15163   e) ac_check_lib_save_LIBS=$LIBS
15164 LIBS="-lc_r  $LIBS"
15165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15166 /* end confdefs.h.  */
15167
15168 /* Override any GCC internal prototype to avoid an error.
15169    Use char because int might match the return type of a GCC
15170    builtin and then its argument prototype would still apply.
15171    The 'extern "C"' is for builds by C++ compilers;
15172    although this is not generally supported in C code supporting it here
15173    has little cost and some practical benefit (sr 110532).  */
15174 #ifdef __cplusplus
15175 extern "C"
15176 #endif
15177 char pthread_kill (void);
15178 int
15179 main (void)
15180 {
15181 return pthread_kill ();
15182   ;
15183   return 0;
15184 }
15185 _ACEOF
15186 if ac_fn_c_try_link "$LINENO"
15187 then :
15188   ac_cv_lib_c_r_pthread_kill=yes
15189 else case e in #(
15190   e) ac_cv_lib_c_r_pthread_kill=no ;;
15191 esac
15192 fi
15193 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15194     conftest$ac_exeext conftest.$ac_ext
15195 LIBS=$ac_check_lib_save_LIBS ;;
15196 esac
15197 fi
15198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15199 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15200 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15201 then :
15202   gl_pthread_api=yes
15203              LIBPTHREAD=-lc_r
15204              LIBPMULTITHREAD=-lc_r
15205 fi
15206
15207         fi
15208       fi
15209       echo "$as_me:15209: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
15210     fi
15211     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15212 printf %s "checking whether POSIX threads API is available... " >&6; }
15213     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15214 printf "%s\n" "$gl_pthread_api" >&6; }
15215
15216
15217     if test $gl_pthread_api = yes; then
15218
15219 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15220
15221     fi
15222
15223         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224 /* end confdefs.h.  */
15225 #include <sched.h>
15226 int
15227 main (void)
15228 {
15229 sched_yield ();
15230   ;
15231   return 0;
15232 }
15233 _ACEOF
15234 if ac_fn_c_try_link "$LINENO"
15235 then :
15236   SCHED_YIELD_LIB=
15237
15238 else case e in #(
15239   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15240 printf %s "checking for sched_yield in -lrt... " >&6; }
15241 if test ${ac_cv_lib_rt_sched_yield+y}
15242 then :
15243   printf %s "(cached) " >&6
15244 else case e in #(
15245   e) ac_check_lib_save_LIBS=$LIBS
15246 LIBS="-lrt  $LIBS"
15247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15248 /* end confdefs.h.  */
15249
15250 /* Override any GCC internal prototype to avoid an error.
15251    Use char because int might match the return type of a GCC
15252    builtin and then its argument prototype would still apply.
15253    The 'extern "C"' is for builds by C++ compilers;
15254    although this is not generally supported in C code supporting it here
15255    has little cost and some practical benefit (sr 110532).  */
15256 #ifdef __cplusplus
15257 extern "C"
15258 #endif
15259 char sched_yield (void);
15260 int
15261 main (void)
15262 {
15263 return sched_yield ();
15264   ;
15265   return 0;
15266 }
15267 _ACEOF
15268 if ac_fn_c_try_link "$LINENO"
15269 then :
15270   ac_cv_lib_rt_sched_yield=yes
15271 else case e in #(
15272   e) ac_cv_lib_rt_sched_yield=no ;;
15273 esac
15274 fi
15275 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15276     conftest$ac_exeext conftest.$ac_ext
15277 LIBS=$ac_check_lib_save_LIBS ;;
15278 esac
15279 fi
15280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15281 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15282 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15283 then :
15284   SCHED_YIELD_LIB=-lrt
15285 else case e in #(
15286   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15287 printf %s "checking for sched_yield in -lposix4... " >&6; }
15288 if test ${ac_cv_lib_posix4_sched_yield+y}
15289 then :
15290   printf %s "(cached) " >&6
15291 else case e in #(
15292   e) ac_check_lib_save_LIBS=$LIBS
15293 LIBS="-lposix4  $LIBS"
15294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h.  */
15296
15297 /* Override any GCC internal prototype to avoid an error.
15298    Use char because int might match the return type of a GCC
15299    builtin and then its argument prototype would still apply.
15300    The 'extern "C"' is for builds by C++ compilers;
15301    although this is not generally supported in C code supporting it here
15302    has little cost and some practical benefit (sr 110532).  */
15303 #ifdef __cplusplus
15304 extern "C"
15305 #endif
15306 char sched_yield (void);
15307 int
15308 main (void)
15309 {
15310 return sched_yield ();
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 if ac_fn_c_try_link "$LINENO"
15316 then :
15317   ac_cv_lib_posix4_sched_yield=yes
15318 else case e in #(
15319   e) ac_cv_lib_posix4_sched_yield=no ;;
15320 esac
15321 fi
15322 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15323     conftest$ac_exeext conftest.$ac_ext
15324 LIBS=$ac_check_lib_save_LIBS ;;
15325 esac
15326 fi
15327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15328 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
15329 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
15330 then :
15331   SCHED_YIELD_LIB=-lposix4
15332 fi
15333  ;;
15334 esac
15335 fi
15336
15337        ;;
15338 esac
15339 fi
15340 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15341     conftest$ac_exeext conftest.$ac_ext
15342
15343         LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
15344
15345
15346     gl_pthreadlib_body_done=done
15347   fi
15348
15349
15350
15351
15352
15353
15354
15355
15356   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
15357 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
15358 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
15359 then :
15360   printf %s "(cached) " >&6
15361 else case e in #(
15362   e) case "$host_os" in
15363        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
15364        *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
15365          gl_cv_func_setlocale_null_all_mtsafe=no ;;
15366        # Guess no on Cygwin < 3.4.6.
15367        cygwin*)
15368          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h.  */
15370
15371 #if defined __CYGWIN__
15372  #include <cygwin/version.h>
15373  #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
15374   Lucky user
15375  #endif
15376 #endif
15377
15378 _ACEOF
15379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15380   $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
15381 then :
15382   gl_cv_func_setlocale_null_all_mtsafe=yes
15383 else case e in #(
15384   e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
15385 esac
15386 fi
15387 rm -rf conftest*
15388
15389         ;;
15390        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
15391        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
15392          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
15393        # If we don't know, obey --enable-cross-guesses.
15394        *)
15395          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
15396      esac
15397      ;;
15398 esac
15399 fi
15400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
15401 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
15402     case "$host_os" in
15403     mingw*) ;;
15404     *)
15405       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15406         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
15407       fi
15408       ;;
15409   esac
15410   case "$gl_cv_func_setlocale_null_all_mtsafe" in
15411     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
15412     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
15413   esac
15414
15415 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
15416
15417
15418     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
15419 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
15420 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
15421 then :
15422   printf %s "(cached) " >&6
15423 else case e in #(
15424   e) case "$host_os" in
15425        # Guess no on OpenBSD, AIX.
15426        openbsd* | aix*)
15427          gl_cv_func_setlocale_null_one_mtsafe=no ;;
15428        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
15429        *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
15430          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
15431        # If we don't know, obey --enable-cross-guesses.
15432        *)
15433          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
15434      esac
15435      ;;
15436 esac
15437 fi
15438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
15439 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
15440     case "$host_os" in
15441     mingw*) ;;
15442     *)
15443       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15444         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
15445       fi
15446       ;;
15447   esac
15448   case "$gl_cv_func_setlocale_null_one_mtsafe" in
15449     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
15450     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
15451   esac
15452
15453 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
15454
15455
15456     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
15457     case "$host_os" in
15458       mingw*) SETLOCALE_NULL_LIB= ;;
15459       *)
15460
15461
15462   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
15463 printf %s "checking whether imported symbols can be declared weak... " >&6; }
15464 if test ${gl_cv_have_weak+y}
15465 then :
15466   printf %s "(cached) " >&6
15467 else case e in #(
15468   e) case "$host_os" in
15469        cygwin* | mingw*)
15470                                              gl_cv_have_weak="guessing no"
15471          ;;
15472        *)
15473          gl_cv_have_weak=no
15474                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15475 /* end confdefs.h.  */
15476 extern void xyzzy ();
15477 #pragma weak xyzzy
15478 int
15479 main (void)
15480 {
15481 xyzzy();
15482   ;
15483   return 0;
15484 }
15485 _ACEOF
15486 if ac_fn_c_try_link "$LINENO"
15487 then :
15488   gl_cv_have_weak=maybe
15489 fi
15490 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15491     conftest$ac_exeext conftest.$ac_ext
15492          if test $gl_cv_have_weak = maybe; then
15493                                  if test "$cross_compiling" = yes
15494 then :
15495                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496 /* end confdefs.h.  */
15497 #ifdef __ELF__
15498                  Extensible Linking Format
15499                  #endif
15500
15501 _ACEOF
15502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15503   $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
15504 then :
15505   gl_cv_have_weak="guessing yes"
15506 else case e in #(
15507   e) gl_cv_have_weak="guessing no" ;;
15508 esac
15509 fi
15510 rm -rf conftest*
15511
15512
15513 else case e in #(
15514   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15515 /* end confdefs.h.  */
15516
15517 #include <stdio.h>
15518 #pragma weak fputs
15519 int main ()
15520 {
15521   return (fputs == NULL);
15522 }
15523 _ACEOF
15524 if ac_fn_c_try_run "$LINENO"
15525 then :
15526   gl_cv_have_weak=yes
15527 else case e in #(
15528   e) gl_cv_have_weak=no ;;
15529 esac
15530 fi
15531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15532   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15533 esac
15534 fi
15535
15536          fi
15537          ;;
15538      esac
15539           case " $LDFLAGS " in
15540        *" -static "*) gl_cv_have_weak=no ;;
15541      esac
15542                     case "$gl_cv_have_weak" in
15543        *yes)
15544          case "$host_os" in
15545            freebsd* | dragonfly* | midnightbsd*)
15546              : > conftest1.c
15547              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
15548              cat <<EOF > conftest2.c
15549 #include <pthread.h>
15550 #pragma weak pthread_mutexattr_gettype
15551 int main ()
15552 {
15553   return (pthread_mutexattr_gettype != NULL);
15554 }
15555 EOF
15556              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
15557                || gl_cv_have_weak=no
15558              rm -f conftest1.c libempty.so conftest2.c conftest
15559              ;;
15560          esac
15561          ;;
15562      esac
15563      ;;
15564 esac
15565 fi
15566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
15567 printf "%s\n" "$gl_cv_have_weak" >&6; }
15568   case "$gl_cv_have_weak" in
15569     *yes)
15570
15571 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
15572
15573       ;;
15574   esac
15575
15576         case "$gl_cv_have_weak" in
15577           *yes) SETLOCALE_NULL_LIB= ;;
15578           *)    SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
15579         esac
15580         ;;
15581     esac
15582   else
15583     SETLOCALE_NULL_LIB=
15584   fi
15585
15586     LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
15587
15588
15589
15590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h.  */
15592
15593 #ifdef _MSC_VER
15594 MicrosoftCompiler
15595 #endif
15596
15597 _ACEOF
15598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15599   $EGREP_TRADITIONAL "MicrosoftCompiler" >/dev/null 2>&1
15600 then :
15601             rm -f conftest*
15602      echo 'int dummy;' > conftest.c
15603      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
15604   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15605   (eval $ac_try) 2>&5
15606   ac_status=$?
15607   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15608   test $ac_status = 0; }; } >/dev/null 2>&1
15609      if test -f conftest.o; then
15610        gl_asmext='s'
15611        gl_c_asm_opt='-S'
15612      else
15613        gl_asmext='asm'
15614        gl_c_asm_opt='-c -Fa'
15615      fi
15616      rm -f conftest*
15617
15618 else case e in #(
15619   e) gl_asmext='s'
15620      gl_c_asm_opt='-S'
15621      ;;
15622 esac
15623 fi
15624 rm -rf conftest*
15625
15626
15627
15628
15629
15630   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
15631 printf %s "checking host CPU and C ABI... " >&6; }
15632 if test ${gl_cv_host_cpu_c_abi+y}
15633 then :
15634   printf %s "(cached) " >&6
15635 else case e in #(
15636   e) case "$host_cpu" in
15637
15638        i[34567]86 )
15639          gl_cv_host_cpu_c_abi=i386
15640          ;;
15641
15642        x86_64 )
15643          # On x86_64 systems, the C compiler may be generating code in one of
15644          # these ABIs:
15645          # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
15646          # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
15647          #   with native Windows (mingw, MSVC).
15648          # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
15649          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
15650          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15651 /* end confdefs.h.  */
15652 #if (defined __x86_64__ || defined __amd64__ \
15653                      || defined _M_X64 || defined _M_AMD64)
15654                  int ok;
15655                 #else
15656                  error fail
15657                 #endif
15658
15659 _ACEOF
15660 if ac_fn_c_try_compile "$LINENO"
15661 then :
15662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663 /* end confdefs.h.  */
15664 #if defined __ILP32__ || defined _ILP32
15665                     int ok;
15666                    #else
15667                     error fail
15668                    #endif
15669
15670 _ACEOF
15671 if ac_fn_c_try_compile "$LINENO"
15672 then :
15673   gl_cv_host_cpu_c_abi=x86_64-x32
15674 else case e in #(
15675   e) gl_cv_host_cpu_c_abi=x86_64 ;;
15676 esac
15677 fi
15678 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15679 else case e in #(
15680   e) gl_cv_host_cpu_c_abi=i386 ;;
15681 esac
15682 fi
15683 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15684          ;;
15685
15686        alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
15687          gl_cv_host_cpu_c_abi=alpha
15688          ;;
15689
15690        arm* | aarch64 )
15691          # Assume arm with EABI.
15692          # On arm64 systems, the C compiler may be generating code in one of
15693          # these ABIs:
15694          # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
15695          # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
15696          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
15697          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698 /* end confdefs.h.  */
15699 #ifdef __aarch64__
15700                  int ok;
15701                 #else
15702                  error fail
15703                 #endif
15704
15705 _ACEOF
15706 if ac_fn_c_try_compile "$LINENO"
15707 then :
15708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709 /* end confdefs.h.  */
15710 #if defined __ILP32__ || defined _ILP32
15711                    int ok;
15712                   #else
15713                    error fail
15714                   #endif
15715
15716 _ACEOF
15717 if ac_fn_c_try_compile "$LINENO"
15718 then :
15719   gl_cv_host_cpu_c_abi=arm64-ilp32
15720 else case e in #(
15721   e) gl_cv_host_cpu_c_abi=arm64 ;;
15722 esac
15723 fi
15724 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15725 else case e in #(
15726   e) # Don't distinguish little-endian and big-endian arm, since they
15727             # don't require different machine code for simple operations and
15728             # since the user can distinguish them through the preprocessor
15729             # defines __ARMEL__ vs. __ARMEB__.
15730             # But distinguish arm which passes floating-point arguments and
15731             # return values in integer registers (r0, r1, ...) - this is
15732             # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
15733             # passes them in float registers (s0, s1, ...) and double registers
15734             # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
15735             # sets the preprocessor defines __ARM_PCS (for the first case) and
15736             # __ARM_PCS_VFP (for the second case), but older GCC does not.
15737             echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
15738             # Look for a reference to the register d0 in the .s file.
15739             { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
15740   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15741   (eval $ac_try) 2>&5
15742   ac_status=$?
15743   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15744   test $ac_status = 0; }; } >/dev/null 2>&1
15745             if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
15746               gl_cv_host_cpu_c_abi=armhf
15747             else
15748               gl_cv_host_cpu_c_abi=arm
15749             fi
15750             rm -f conftest*
15751             ;;
15752 esac
15753 fi
15754 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15755          ;;
15756
15757        hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
15758          # On hppa, the C compiler may be generating 32-bit code or 64-bit
15759          # code. In the latter case, it defines _LP64 and __LP64__.
15760          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761 /* end confdefs.h.  */
15762 #ifdef __LP64__
15763                  int ok;
15764                 #else
15765                  error fail
15766                 #endif
15767
15768 _ACEOF
15769 if ac_fn_c_try_compile "$LINENO"
15770 then :
15771   gl_cv_host_cpu_c_abi=hppa64
15772 else case e in #(
15773   e) gl_cv_host_cpu_c_abi=hppa ;;
15774 esac
15775 fi
15776 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15777          ;;
15778
15779        ia64* )
15780          # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
15781          # 32-bit code. In the latter case, it defines _ILP32.
15782          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15783 /* end confdefs.h.  */
15784 #ifdef _ILP32
15785                  int ok;
15786                 #else
15787                  error fail
15788                 #endif
15789
15790 _ACEOF
15791 if ac_fn_c_try_compile "$LINENO"
15792 then :
15793   gl_cv_host_cpu_c_abi=ia64-ilp32
15794 else case e in #(
15795   e) gl_cv_host_cpu_c_abi=ia64 ;;
15796 esac
15797 fi
15798 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15799          ;;
15800
15801        mips* )
15802          # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
15803          # at 32.
15804          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805 /* end confdefs.h.  */
15806 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
15807                  int ok;
15808                 #else
15809                  error fail
15810                 #endif
15811
15812 _ACEOF
15813 if ac_fn_c_try_compile "$LINENO"
15814 then :
15815   gl_cv_host_cpu_c_abi=mips64
15816 else case e in #(
15817   e) # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
15818             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
15819             # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
15820             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
15821             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822 /* end confdefs.h.  */
15823 #if (_MIPS_SIM == _ABIN32)
15824                     int ok;
15825                    #else
15826                     error fail
15827                    #endif
15828
15829 _ACEOF
15830 if ac_fn_c_try_compile "$LINENO"
15831 then :
15832   gl_cv_host_cpu_c_abi=mipsn32
15833 else case e in #(
15834   e) gl_cv_host_cpu_c_abi=mips ;;
15835 esac
15836 fi
15837 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15838 esac
15839 fi
15840 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15841          ;;
15842
15843        powerpc* )
15844          # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
15845          # No need to distinguish them here; the caller may distinguish
15846          # them based on the OS.
15847          # On powerpc64 systems, the C compiler may still be generating
15848          # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
15849          # be generating 64-bit code.
15850          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851 /* end confdefs.h.  */
15852 #if defined __powerpc64__ || defined __LP64__
15853                  int ok;
15854                 #else
15855                  error fail
15856                 #endif
15857
15858 _ACEOF
15859 if ac_fn_c_try_compile "$LINENO"
15860 then :
15861   # On powerpc64, there are two ABIs on Linux: The AIX compatible
15862             # one and the ELFv2 one. The latter defines _CALL_ELF=2.
15863             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15864 /* end confdefs.h.  */
15865 #if defined _CALL_ELF && _CALL_ELF == 2
15866                     int ok;
15867                    #else
15868                     error fail
15869                    #endif
15870
15871 _ACEOF
15872 if ac_fn_c_try_compile "$LINENO"
15873 then :
15874   gl_cv_host_cpu_c_abi=powerpc64-elfv2
15875 else case e in #(
15876   e) gl_cv_host_cpu_c_abi=powerpc64 ;;
15877 esac
15878 fi
15879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15880
15881 else case e in #(
15882   e) gl_cv_host_cpu_c_abi=powerpc ;;
15883 esac
15884 fi
15885 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15886          ;;
15887
15888        rs6000 )
15889          gl_cv_host_cpu_c_abi=powerpc
15890          ;;
15891
15892        riscv32 | riscv64 )
15893          # There are 2 architectures (with variants): rv32* and rv64*.
15894          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15895 /* end confdefs.h.  */
15896 #if __riscv_xlen == 64
15897                   int ok;
15898                 #else
15899                   error fail
15900                 #endif
15901
15902 _ACEOF
15903 if ac_fn_c_try_compile "$LINENO"
15904 then :
15905   cpu=riscv64
15906 else case e in #(
15907   e) cpu=riscv32 ;;
15908 esac
15909 fi
15910 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15911          # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
15912          # Size of 'long' and 'void *':
15913          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914 /* end confdefs.h.  */
15915 #if defined __LP64__
15916                   int ok;
15917                 #else
15918                   error fail
15919                 #endif
15920
15921 _ACEOF
15922 if ac_fn_c_try_compile "$LINENO"
15923 then :
15924   main_abi=lp64
15925 else case e in #(
15926   e) main_abi=ilp32 ;;
15927 esac
15928 fi
15929 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15930          # Float ABIs:
15931          # __riscv_float_abi_double:
15932          #   'float' and 'double' are passed in floating-point registers.
15933          # __riscv_float_abi_single:
15934          #   'float' are passed in floating-point registers.
15935          # __riscv_float_abi_soft:
15936          #   No values are passed in floating-point registers.
15937          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15938 /* end confdefs.h.  */
15939 #if defined __riscv_float_abi_double
15940                   int ok;
15941                 #else
15942                   error fail
15943                 #endif
15944
15945 _ACEOF
15946 if ac_fn_c_try_compile "$LINENO"
15947 then :
15948   float_abi=d
15949 else case e in #(
15950   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h.  */
15952 #if defined __riscv_float_abi_single
15953                      int ok;
15954                    #else
15955                      error fail
15956                    #endif
15957
15958 _ACEOF
15959 if ac_fn_c_try_compile "$LINENO"
15960 then :
15961   float_abi=f
15962 else case e in #(
15963   e) float_abi='' ;;
15964 esac
15965 fi
15966 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15967             ;;
15968 esac
15969 fi
15970 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15971          gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
15972          ;;
15973
15974        s390* )
15975          # On s390x, the C compiler may be generating 64-bit (= s390x) code
15976          # or 31-bit (= s390) code.
15977          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978 /* end confdefs.h.  */
15979 #if defined __LP64__ || defined __s390x__
15980                   int ok;
15981                 #else
15982                   error fail
15983                 #endif
15984
15985 _ACEOF
15986 if ac_fn_c_try_compile "$LINENO"
15987 then :
15988   gl_cv_host_cpu_c_abi=s390x
15989 else case e in #(
15990   e) gl_cv_host_cpu_c_abi=s390 ;;
15991 esac
15992 fi
15993 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15994          ;;
15995
15996        sparc | sparc64 )
15997          # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
15998          # C compiler still generates 32-bit code.
15999          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h.  */
16001 #if defined __sparcv9 || defined __arch64__
16002                  int ok;
16003                 #else
16004                  error fail
16005                 #endif
16006
16007 _ACEOF
16008 if ac_fn_c_try_compile "$LINENO"
16009 then :
16010   gl_cv_host_cpu_c_abi=sparc64
16011 else case e in #(
16012   e) gl_cv_host_cpu_c_abi=sparc ;;
16013 esac
16014 fi
16015 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16016          ;;
16017
16018        *)
16019          gl_cv_host_cpu_c_abi="$host_cpu"
16020          ;;
16021      esac
16022      ;;
16023 esac
16024 fi
16025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
16026 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
16027
16028     HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
16029   HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
16030
16031
16032
16033   # This was
16034   #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
16035   #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
16036   # earlier, but KAI C++ 3.2d doesn't like this.
16037   sed -e 's/-/_/g' >> confdefs.h <<EOF
16038 #ifndef __${HOST_CPU}__
16039 #define __${HOST_CPU}__ 1
16040 #endif
16041 #ifndef __${HOST_CPU_C_ABI}__
16042 #define __${HOST_CPU_C_ABI}__ 1
16043 #endif
16044 EOF
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058     use_additional=yes
16059
16060   acl_save_prefix="$prefix"
16061   prefix="$acl_final_prefix"
16062   acl_save_exec_prefix="$exec_prefix"
16063   exec_prefix="$acl_final_exec_prefix"
16064
16065     eval additional_includedir=\"$includedir\"
16066     eval additional_libdir=\"$libdir\"
16067     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16068     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16069
16070   exec_prefix="$acl_save_exec_prefix"
16071   prefix="$acl_save_prefix"
16072
16073
16074 # Check whether --with-libiconv-prefix was given.
16075 if test ${with_libiconv_prefix+y}
16076 then :
16077   withval=$with_libiconv_prefix;
16078     if test "X$withval" = "Xno"; then
16079       use_additional=no
16080     else
16081       if test "X$withval" = "X"; then
16082
16083   acl_save_prefix="$prefix"
16084   prefix="$acl_final_prefix"
16085   acl_save_exec_prefix="$exec_prefix"
16086   exec_prefix="$acl_final_exec_prefix"
16087
16088           eval additional_includedir=\"$includedir\"
16089           eval additional_libdir=\"$libdir\"
16090           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16091           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16092
16093   exec_prefix="$acl_save_exec_prefix"
16094   prefix="$acl_save_prefix"
16095
16096       else
16097         additional_includedir="$withval/include"
16098         additional_libdir="$withval/$acl_libdirstem"
16099         additional_libdir2="$withval/$acl_libdirstem2"
16100         additional_libdir3="$withval/$acl_libdirstem3"
16101       fi
16102     fi
16103
16104 fi
16105
16106   if test "X$additional_libdir2" = "X$additional_libdir"; then
16107     additional_libdir2=
16108   fi
16109   if test "X$additional_libdir3" = "X$additional_libdir"; then
16110     additional_libdir3=
16111   fi
16112       LIBICONV=
16113   LTLIBICONV=
16114   INCICONV=
16115   LIBICONV_PREFIX=
16116       HAVE_LIBICONV=
16117   rpathdirs=
16118   ltrpathdirs=
16119   names_already_handled=
16120   names_next_round='iconv '
16121   while test -n "$names_next_round"; do
16122     names_this_round="$names_next_round"
16123     names_next_round=
16124     for name in $names_this_round; do
16125       already_handled=
16126       for n in $names_already_handled; do
16127         if test "$n" = "$name"; then
16128           already_handled=yes
16129           break
16130         fi
16131       done
16132       if test -z "$already_handled"; then
16133         names_already_handled="$names_already_handled $name"
16134                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
16135         eval value=\"\$HAVE_LIB$uppername\"
16136         if test -n "$value"; then
16137           if test "$value" = yes; then
16138             eval value=\"\$LIB$uppername\"
16139             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
16140             eval value=\"\$LTLIB$uppername\"
16141             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
16142           else
16143                                     :
16144           fi
16145         else
16146                               found_dir=
16147           found_la=
16148           found_so=
16149           found_a=
16150           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
16151           if test -n "$acl_shlibext"; then
16152             shrext=".$acl_shlibext"             # typically: shrext=.so
16153           else
16154             shrext=
16155           fi
16156           if test $use_additional = yes; then
16157             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
16158               if test "X$found_dir" = "X"; then
16159                 eval dir=\$$additional_libdir_variable
16160                 if test -n "$dir"; then
16161                                                       if test -n "$acl_shlibext"; then
16162                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16163                       found_dir="$dir"
16164                       found_so="$dir/$libname$shrext"
16165                     else
16166                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16167                         ver=`(cd "$dir" && \
16168                               for f in "$libname$shrext".*; do echo "$f"; done \
16169                               | sed -e "s,^$libname$shrext\\\\.,," \
16170                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16171                               | sed 1q ) 2>/dev/null`
16172                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16173                           found_dir="$dir"
16174                           found_so="$dir/$libname$shrext.$ver"
16175                         fi
16176                       else
16177                         eval library_names=\"$acl_library_names_spec\"
16178                         for f in $library_names; do
16179                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16180                             found_dir="$dir"
16181                             found_so="$dir/$f"
16182                             break
16183                           fi
16184                         done
16185                       fi
16186                     fi
16187                   fi
16188                                     if test "X$found_dir" = "X"; then
16189                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16190                       found_dir="$dir"
16191                       found_a="$dir/$libname.$acl_libext"
16192                     fi
16193                   fi
16194                   if test "X$found_dir" != "X"; then
16195                     if test -f "$dir/$libname.la"; then
16196                       found_la="$dir/$libname.la"
16197                     fi
16198                   fi
16199                 fi
16200               fi
16201             done
16202           fi
16203           if test "X$found_dir" = "X"; then
16204             for x in $LDFLAGS $LTLIBICONV; do
16205
16206   acl_save_prefix="$prefix"
16207   prefix="$acl_final_prefix"
16208   acl_save_exec_prefix="$exec_prefix"
16209   exec_prefix="$acl_final_exec_prefix"
16210   eval x=\"$x\"
16211   exec_prefix="$acl_save_exec_prefix"
16212   prefix="$acl_save_prefix"
16213
16214               case "$x" in
16215                 -L*)
16216                   dir=`echo "X$x" | sed -e 's/^X-L//'`
16217                                     if test -n "$acl_shlibext"; then
16218                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16219                       found_dir="$dir"
16220                       found_so="$dir/$libname$shrext"
16221                     else
16222                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16223                         ver=`(cd "$dir" && \
16224                               for f in "$libname$shrext".*; do echo "$f"; done \
16225                               | sed -e "s,^$libname$shrext\\\\.,," \
16226                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16227                               | sed 1q ) 2>/dev/null`
16228                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16229                           found_dir="$dir"
16230                           found_so="$dir/$libname$shrext.$ver"
16231                         fi
16232                       else
16233                         eval library_names=\"$acl_library_names_spec\"
16234                         for f in $library_names; do
16235                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16236                             found_dir="$dir"
16237                             found_so="$dir/$f"
16238                             break
16239                           fi
16240                         done
16241                       fi
16242                     fi
16243                   fi
16244                                     if test "X$found_dir" = "X"; then
16245                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16246                       found_dir="$dir"
16247                       found_a="$dir/$libname.$acl_libext"
16248                     fi
16249                   fi
16250                   if test "X$found_dir" != "X"; then
16251                     if test -f "$dir/$libname.la"; then
16252                       found_la="$dir/$libname.la"
16253                     fi
16254                   fi
16255                   ;;
16256               esac
16257               if test "X$found_dir" != "X"; then
16258                 break
16259               fi
16260             done
16261           fi
16262           if test "X$found_dir" != "X"; then
16263                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
16264             if test "X$found_so" != "X"; then
16265                                                         if test "$enable_rpath" = no \
16266                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
16267                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
16268                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
16269                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16270               else
16271                                                                                 haveit=
16272                 for x in $ltrpathdirs; do
16273                   if test "X$x" = "X$found_dir"; then
16274                     haveit=yes
16275                     break
16276                   fi
16277                 done
16278                 if test -z "$haveit"; then
16279                   ltrpathdirs="$ltrpathdirs $found_dir"
16280                 fi
16281                                 if test "$acl_hardcode_direct" = yes; then
16282                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16283                 else
16284                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
16285                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16286                                                             haveit=
16287                     for x in $rpathdirs; do
16288                       if test "X$x" = "X$found_dir"; then
16289                         haveit=yes
16290                         break
16291                       fi
16292                     done
16293                     if test -z "$haveit"; then
16294                       rpathdirs="$rpathdirs $found_dir"
16295                     fi
16296                   else
16297                                                                                 haveit=
16298                     for x in $LDFLAGS $LIBICONV; do
16299
16300   acl_save_prefix="$prefix"
16301   prefix="$acl_final_prefix"
16302   acl_save_exec_prefix="$exec_prefix"
16303   exec_prefix="$acl_final_exec_prefix"
16304   eval x=\"$x\"
16305   exec_prefix="$acl_save_exec_prefix"
16306   prefix="$acl_save_prefix"
16307
16308                       if test "X$x" = "X-L$found_dir"; then
16309                         haveit=yes
16310                         break
16311                       fi
16312                     done
16313                     if test -z "$haveit"; then
16314                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
16315                     fi
16316                     if test "$acl_hardcode_minus_L" != no; then
16317                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16318                     else
16319                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16320                     fi
16321                   fi
16322                 fi
16323               fi
16324             else
16325               if test "X$found_a" != "X"; then
16326                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
16327               else
16328                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
16329               fi
16330             fi
16331                         additional_includedir=
16332             case "$found_dir" in
16333               */$acl_libdirstem | */$acl_libdirstem/)
16334                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16335                 if test "$name" = 'iconv'; then
16336                   LIBICONV_PREFIX="$basedir"
16337                 fi
16338                 additional_includedir="$basedir/include"
16339                 ;;
16340               */$acl_libdirstem2 | */$acl_libdirstem2/)
16341                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16342                 if test "$name" = 'iconv'; then
16343                   LIBICONV_PREFIX="$basedir"
16344                 fi
16345                 additional_includedir="$basedir/include"
16346                 ;;
16347               */$acl_libdirstem3 | */$acl_libdirstem3/)
16348                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
16349                 if test "$name" = 'iconv'; then
16350                   LIBICONV_PREFIX="$basedir"
16351                 fi
16352                 additional_includedir="$basedir/include"
16353                 ;;
16354             esac
16355             if test "X$additional_includedir" != "X"; then
16356                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
16357                 haveit=
16358                 if test "X$additional_includedir" = "X/usr/local/include"; then
16359                   if test -n "$GCC"; then
16360                     case $host_os in
16361                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16362                     esac
16363                   fi
16364                 fi
16365                 if test -z "$haveit"; then
16366                   for x in $CPPFLAGS $INCICONV; do
16367
16368   acl_save_prefix="$prefix"
16369   prefix="$acl_final_prefix"
16370   acl_save_exec_prefix="$exec_prefix"
16371   exec_prefix="$acl_final_exec_prefix"
16372   eval x=\"$x\"
16373   exec_prefix="$acl_save_exec_prefix"
16374   prefix="$acl_save_prefix"
16375
16376                     if test "X$x" = "X-I$additional_includedir"; then
16377                       haveit=yes
16378                       break
16379                     fi
16380                   done
16381                   if test -z "$haveit"; then
16382                     if test -d "$additional_includedir"; then
16383                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
16384                     fi
16385                   fi
16386                 fi
16387               fi
16388             fi
16389                         if test -n "$found_la"; then
16390                                                         save_libdir="$libdir"
16391               case "$found_la" in
16392                 */* | *\\*) . "$found_la" ;;
16393                 *) . "./$found_la" ;;
16394               esac
16395               libdir="$save_libdir"
16396                             for dep in $dependency_libs; do
16397                 case "$dep" in
16398                   -L*)
16399                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16400                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
16401                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
16402                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
16403                       haveit=
16404                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
16405                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
16406                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
16407                         if test -n "$GCC"; then
16408                           case $host_os in
16409                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16410                           esac
16411                         fi
16412                       fi
16413                       if test -z "$haveit"; then
16414                         haveit=
16415                         for x in $LDFLAGS $LIBICONV; do
16416
16417   acl_save_prefix="$prefix"
16418   prefix="$acl_final_prefix"
16419   acl_save_exec_prefix="$exec_prefix"
16420   exec_prefix="$acl_final_exec_prefix"
16421   eval x=\"$x\"
16422   exec_prefix="$acl_save_exec_prefix"
16423   prefix="$acl_save_prefix"
16424
16425                           if test "X$x" = "X-L$dependency_libdir"; then
16426                             haveit=yes
16427                             break
16428                           fi
16429                         done
16430                         if test -z "$haveit"; then
16431                           if test -d "$dependency_libdir"; then
16432                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
16433                           fi
16434                         fi
16435                         haveit=
16436                         for x in $LDFLAGS $LTLIBICONV; do
16437
16438   acl_save_prefix="$prefix"
16439   prefix="$acl_final_prefix"
16440   acl_save_exec_prefix="$exec_prefix"
16441   exec_prefix="$acl_final_exec_prefix"
16442   eval x=\"$x\"
16443   exec_prefix="$acl_save_exec_prefix"
16444   prefix="$acl_save_prefix"
16445
16446                           if test "X$x" = "X-L$dependency_libdir"; then
16447                             haveit=yes
16448                             break
16449                           fi
16450                         done
16451                         if test -z "$haveit"; then
16452                           if test -d "$dependency_libdir"; then
16453                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
16454                           fi
16455                         fi
16456                       fi
16457                     fi
16458                     ;;
16459                   -R*)
16460                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16461                     if test "$enable_rpath" != no; then
16462                                                                   haveit=
16463                       for x in $rpathdirs; do
16464                         if test "X$x" = "X$dir"; then
16465                           haveit=yes
16466                           break
16467                         fi
16468                       done
16469                       if test -z "$haveit"; then
16470                         rpathdirs="$rpathdirs $dir"
16471                       fi
16472                                                                   haveit=
16473                       for x in $ltrpathdirs; do
16474                         if test "X$x" = "X$dir"; then
16475                           haveit=yes
16476                           break
16477                         fi
16478                       done
16479                       if test -z "$haveit"; then
16480                         ltrpathdirs="$ltrpathdirs $dir"
16481                       fi
16482                     fi
16483                     ;;
16484                   -l*)
16485                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
16486                     if test "X$dep" != Xc \
16487                        || case $host_os in
16488                             linux* | gnu* | k*bsd*-gnu) false ;;
16489                             *)                          true ;;
16490                           esac; then
16491                       names_next_round="$names_next_round $dep"
16492                     fi
16493                     ;;
16494                   *.la)
16495                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16496                     ;;
16497                   *)
16498                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
16499                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
16500                     ;;
16501                 esac
16502               done
16503             fi
16504           else
16505                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16506             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
16507           fi
16508         fi
16509       fi
16510     done
16511   done
16512   if test "X$rpathdirs" != "X"; then
16513     if test -n "$acl_hardcode_libdir_separator"; then
16514                         alldirs=
16515       for found_dir in $rpathdirs; do
16516         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
16517       done
16518             acl_save_libdir="$libdir"
16519       libdir="$alldirs"
16520       eval flag=\"$acl_hardcode_libdir_flag_spec\"
16521       libdir="$acl_save_libdir"
16522       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16523     else
16524             for found_dir in $rpathdirs; do
16525         acl_save_libdir="$libdir"
16526         libdir="$found_dir"
16527         eval flag=\"$acl_hardcode_libdir_flag_spec\"
16528         libdir="$acl_save_libdir"
16529         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16530       done
16531     fi
16532   fi
16533   if test "X$ltrpathdirs" != "X"; then
16534             for found_dir in $ltrpathdirs; do
16535       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
16536     done
16537   fi
16538
16539
16540
16541
16542
16543
16544
16545
16546     ICONV_CONST=;
16547   REPLACE_ICONV=0;
16548   REPLACE_ICONV_OPEN=0;
16549   REPLACE_ICONV_UTF=0;
16550   GL_GENERATE_ICONV_H=false
16551   if false; then
16552               GL_GENERATE_ICONV_H=true
16553      fi
16554
16555
16556
16557
16558
16559
16560
16561           am_save_CPPFLAGS="$CPPFLAGS"
16562
16563   for element in $INCICONV; do
16564     haveit=
16565     for x in $CPPFLAGS; do
16566
16567   acl_save_prefix="$prefix"
16568   prefix="$acl_final_prefix"
16569   acl_save_exec_prefix="$exec_prefix"
16570   exec_prefix="$acl_final_exec_prefix"
16571   eval x=\"$x\"
16572   exec_prefix="$acl_save_exec_prefix"
16573   prefix="$acl_save_prefix"
16574
16575       if test "X$x" = "X$element"; then
16576         haveit=yes
16577         break
16578       fi
16579     done
16580     if test -z "$haveit"; then
16581       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16582     fi
16583   done
16584
16585
16586   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
16587 printf %s "checking for iconv... " >&6; }
16588 if test ${am_cv_func_iconv+y}
16589 then :
16590   printf %s "(cached) " >&6
16591 else case e in #(
16592   e)
16593     am_cv_func_iconv="no, consider installing GNU libiconv"
16594     am_cv_lib_iconv=no
16595     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16596 /* end confdefs.h.  */
16597
16598 #include <stdlib.h>
16599 #include <iconv.h>
16600
16601 int
16602 main (void)
16603 {
16604 iconv_t cd = iconv_open("","");
16605            iconv(cd,NULL,NULL,NULL,NULL);
16606            iconv_close(cd);
16607   ;
16608   return 0;
16609 }
16610 _ACEOF
16611 if ac_fn_c_try_link "$LINENO"
16612 then :
16613   am_cv_func_iconv=yes
16614 fi
16615 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16616     conftest$ac_exeext conftest.$ac_ext
16617     if test "$am_cv_func_iconv" != yes; then
16618       am_save_LIBS="$LIBS"
16619       LIBS="$LIBS $LIBICONV"
16620       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16621 /* end confdefs.h.  */
16622
16623 #include <stdlib.h>
16624 #include <iconv.h>
16625
16626 int
16627 main (void)
16628 {
16629 iconv_t cd = iconv_open("","");
16630              iconv(cd,NULL,NULL,NULL,NULL);
16631              iconv_close(cd);
16632   ;
16633   return 0;
16634 }
16635 _ACEOF
16636 if ac_fn_c_try_link "$LINENO"
16637 then :
16638   am_cv_lib_iconv=yes
16639         am_cv_func_iconv=yes
16640 fi
16641 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16642     conftest$ac_exeext conftest.$ac_ext
16643       LIBS="$am_save_LIBS"
16644     fi
16645    ;;
16646 esac
16647 fi
16648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
16649 printf "%s\n" "$am_cv_func_iconv" >&6; }
16650   if test "$am_cv_func_iconv" = yes; then
16651     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
16652 printf %s "checking for working iconv... " >&6; }
16653 if test ${am_cv_func_iconv_works+y}
16654 then :
16655   printf %s "(cached) " >&6
16656 else case e in #(
16657   e)
16658                   am_save_LIBS="$LIBS"
16659       if test $am_cv_lib_iconv = yes; then
16660         LIBS="$LIBS $LIBICONV"
16661       fi
16662       am_cv_func_iconv_works=no
16663       for ac_iconv_const in '' 'const'; do
16664         if test "$cross_compiling" = yes
16665 then :
16666   case "$host_os" in
16667              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
16668              *)            am_cv_func_iconv_works="guessing yes" ;;
16669            esac
16670 else case e in #(
16671   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672 /* end confdefs.h.  */
16673
16674 #include <iconv.h>
16675 #include <string.h>
16676
16677 #ifndef ICONV_CONST
16678 # define ICONV_CONST $ac_iconv_const
16679 #endif
16680
16681 int
16682 main (void)
16683 {
16684 int result = 0;
16685   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
16686      successful returns.  This is even documented in
16687      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
16688   {
16689     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
16690     if (cd_utf8_to_88591 != (iconv_t)(-1))
16691       {
16692         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
16693         char buf[10];
16694         ICONV_CONST char *inptr = input;
16695         size_t inbytesleft = strlen (input);
16696         char *outptr = buf;
16697         size_t outbytesleft = sizeof (buf);
16698         size_t res = iconv (cd_utf8_to_88591,
16699                             &inptr, &inbytesleft,
16700                             &outptr, &outbytesleft);
16701         if (res == 0)
16702           result |= 1;
16703         iconv_close (cd_utf8_to_88591);
16704       }
16705   }
16706   /* Test against Solaris 10 bug: Failures are not distinguishable from
16707      successful returns.  */
16708   {
16709     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
16710     if (cd_ascii_to_88591 != (iconv_t)(-1))
16711       {
16712         static ICONV_CONST char input[] = "\263";
16713         char buf[10];
16714         ICONV_CONST char *inptr = input;
16715         size_t inbytesleft = strlen (input);
16716         char *outptr = buf;
16717         size_t outbytesleft = sizeof (buf);
16718         size_t res = iconv (cd_ascii_to_88591,
16719                             &inptr, &inbytesleft,
16720                             &outptr, &outbytesleft);
16721         if (res == 0)
16722           result |= 2;
16723         iconv_close (cd_ascii_to_88591);
16724       }
16725   }
16726   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
16727   {
16728     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
16729     if (cd_88591_to_utf8 != (iconv_t)(-1))
16730       {
16731         static ICONV_CONST char input[] = "\304";
16732         static char buf[2] = { (char)0xDE, (char)0xAD };
16733         ICONV_CONST char *inptr = input;
16734         size_t inbytesleft = 1;
16735         char *outptr = buf;
16736         size_t outbytesleft = 1;
16737         size_t res = iconv (cd_88591_to_utf8,
16738                             &inptr, &inbytesleft,
16739                             &outptr, &outbytesleft);
16740         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
16741           result |= 4;
16742         iconv_close (cd_88591_to_utf8);
16743       }
16744   }
16745 #if 0 /* This bug could be worked around by the caller.  */
16746   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
16747   {
16748     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
16749     if (cd_88591_to_utf8 != (iconv_t)(-1))
16750       {
16751         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
16752         char buf[50];
16753         ICONV_CONST char *inptr = input;
16754         size_t inbytesleft = strlen (input);
16755         char *outptr = buf;
16756         size_t outbytesleft = sizeof (buf);
16757         size_t res = iconv (cd_88591_to_utf8,
16758                             &inptr, &inbytesleft,
16759                             &outptr, &outbytesleft);
16760         if ((int)res > 0)
16761           result |= 8;
16762         iconv_close (cd_88591_to_utf8);
16763       }
16764   }
16765 #endif
16766   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
16767      provided.  */
16768   {
16769     /* Try standardized names.  */
16770     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
16771     /* Try IRIX, OSF/1 names.  */
16772     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
16773     /* Try AIX names.  */
16774     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
16775     /* Try HP-UX names.  */
16776     iconv_t cd4 = iconv_open ("utf8", "eucJP");
16777     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
16778         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
16779       result |= 16;
16780     if (cd1 != (iconv_t)(-1))
16781       iconv_close (cd1);
16782     if (cd2 != (iconv_t)(-1))
16783       iconv_close (cd2);
16784     if (cd3 != (iconv_t)(-1))
16785       iconv_close (cd3);
16786     if (cd4 != (iconv_t)(-1))
16787       iconv_close (cd4);
16788   }
16789   return result;
16790
16791   ;
16792   return 0;
16793 }
16794 _ACEOF
16795 if ac_fn_c_try_run "$LINENO"
16796 then :
16797   am_cv_func_iconv_works=yes
16798 fi
16799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16800   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16801 esac
16802 fi
16803
16804         test "$am_cv_func_iconv_works" = no || break
16805       done
16806       LIBS="$am_save_LIBS"
16807      ;;
16808 esac
16809 fi
16810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
16811 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
16812     case "$am_cv_func_iconv_works" in
16813       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
16814       *)   am_func_iconv=yes ;;
16815     esac
16816   else
16817     am_func_iconv=no am_cv_lib_iconv=no
16818   fi
16819   if test "$am_func_iconv" = yes; then
16820
16821 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
16822
16823   fi
16824   if test "$am_cv_lib_iconv" = yes; then
16825     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
16826 printf %s "checking how to link with libiconv... " >&6; }
16827     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
16828 printf "%s\n" "$LIBICONV" >&6; }
16829   else
16830             CPPFLAGS="$am_save_CPPFLAGS"
16831     LIBICONV=
16832     LTLIBICONV=
16833   fi
16834
16835
16836
16837   if test "$am_cv_func_iconv" = yes; then
16838     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
16839 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
16840 if test ${gl_cv_iconv_nonconst+y}
16841 then :
16842   printf %s "(cached) " >&6
16843 else case e in #(
16844   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845 /* end confdefs.h.  */
16846
16847 #include <stdlib.h>
16848 #include <iconv.h>
16849 extern
16850 #ifdef __cplusplus
16851 "C"
16852 #endif
16853 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
16854
16855 int
16856 main (void)
16857 {
16858
16859   ;
16860   return 0;
16861 }
16862 _ACEOF
16863 if ac_fn_c_try_compile "$LINENO"
16864 then :
16865   gl_cv_iconv_nonconst=yes
16866 else case e in #(
16867   e) gl_cv_iconv_nonconst=no ;;
16868 esac
16869 fi
16870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16871        ;;
16872 esac
16873 fi
16874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
16875 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
16876   else
16877             gl_cv_iconv_nonconst=yes
16878   fi
16879   if test $gl_cv_iconv_nonconst = yes; then
16880     iconv_arg1=""
16881   else
16882     iconv_arg1="const"
16883   fi
16884
16885 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
16886
16887
16888      if test $gl_cv_iconv_nonconst != yes; then
16889        ICONV_CONST="const"
16890      fi
16891
16892
16893       if test "$am_func_iconv" = yes; then
16894     if test -n "$LIBICONV"; then
16895       am_cv_func_iconv_summary='yes, in libiconv'
16896     else
16897       am_cv_func_iconv_summary='yes, in libc'
16898     fi
16899   else
16900     if test "$am_cv_func_iconv" = yes; then
16901       am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
16902     else
16903       am_cv_func_iconv_summary='no, consider installing GNU libiconv'
16904     fi
16905   fi
16906
16907
16908
16909   GL_GNULIB_ICONV=0
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926      if test $gl_cv_have_include_next = yes; then
16927        gl_cv_next_iconv_h='<'iconv.h'>'
16928      else
16929        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
16930 printf %s "checking absolute name of <iconv.h>... " >&6; }
16931 if test ${gl_cv_next_iconv_h+y}
16932 then :
16933   printf %s "(cached) " >&6
16934 else case e in #(
16935   e)
16936              if test $ac_cv_header_iconv_h = yes; then
16937
16938
16939
16940
16941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16942 /* end confdefs.h.  */
16943 #include <iconv.h>
16944 _ACEOF
16945                 case "$host_os" in
16946     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16947     *)    gl_absname_cpp="$ac_cpp" ;;
16948   esac
16949
16950   case "$host_os" in
16951     mingw*)
16952                                           gl_dirsep_regex='[/\\]'
16953       ;;
16954     *)
16955       gl_dirsep_regex='\/'
16956       ;;
16957   esac
16958       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16959   gl_header_literal_regex=`echo 'iconv.h' \
16960                            | sed -e "$gl_make_literal_regex_sed"`
16961   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16962       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16963       s|^/[^/]|//&|
16964       p
16965       q
16966     }'
16967
16968         gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16969   sed -n "$gl_absolute_header_sed"`
16970
16971           gl_header=$gl_cv_absolute_iconv_h
16972           gl_cv_next_iconv_h='"'$gl_header'"'
16973           else
16974                gl_cv_next_iconv_h='<'iconv.h'>'
16975              fi
16976
16977           ;;
16978 esac
16979 fi
16980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
16981 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
16982      fi
16983      NEXT_ICONV_H=$gl_cv_next_iconv_h
16984
16985      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16986        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16987        gl_next_as_first_directive='<'iconv.h'>'
16988      else
16989        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16990        gl_next_as_first_directive=$gl_cv_next_iconv_h
16991      fi
16992      NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
17005 printf %s "checking for inline... " >&6; }
17006 if test ${ac_cv_c_inline+y}
17007 then :
17008   printf %s "(cached) " >&6
17009 else case e in #(
17010   e) ac_cv_c_inline=no
17011 for ac_kw in inline __inline__ __inline; do
17012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17013 /* end confdefs.h.  */
17014 #ifndef __cplusplus
17015 typedef int foo_t;
17016 static $ac_kw foo_t static_foo (void) {return 0; }
17017 $ac_kw foo_t foo (void) {return 0; }
17018 #endif
17019
17020 _ACEOF
17021 if ac_fn_c_try_compile "$LINENO"
17022 then :
17023   ac_cv_c_inline=$ac_kw
17024 fi
17025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17026   test "$ac_cv_c_inline" != no && break
17027 done
17028  ;;
17029 esac
17030 fi
17031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
17032 printf "%s\n" "$ac_cv_c_inline" >&6; }
17033
17034 case $ac_cv_c_inline in
17035   inline | yes) ;;
17036   *)
17037     case $ac_cv_c_inline in
17038       no) ac_val=;;
17039       *) ac_val=$ac_cv_c_inline;;
17040     esac
17041     cat >>confdefs.h <<_ACEOF
17042 #ifndef __cplusplus
17043 #define inline $ac_val
17044 #endif
17045 _ACEOF
17046     ;;
17047 esac
17048
17049 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
17050 if test "x$ac_cv_type_off_t" = xyes
17051 then :
17052
17053 else case e in #(
17054   e)
17055 printf "%s\n" "#define off_t long int" >>confdefs.h
17056  ;;
17057 esac
17058 fi
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071      if test $gl_cv_have_include_next = yes; then
17072        gl_cv_next_limits_h='<'limits.h'>'
17073      else
17074        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
17075 printf %s "checking absolute name of <limits.h>... " >&6; }
17076 if test ${gl_cv_next_limits_h+y}
17077 then :
17078   printf %s "(cached) " >&6
17079 else case e in #(
17080   e)
17081              if test $ac_cv_header_limits_h = yes; then
17082
17083
17084
17085
17086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087 /* end confdefs.h.  */
17088 #include <limits.h>
17089 _ACEOF
17090                 case "$host_os" in
17091     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17092     *)    gl_absname_cpp="$ac_cpp" ;;
17093   esac
17094
17095   case "$host_os" in
17096     mingw*)
17097                                           gl_dirsep_regex='[/\\]'
17098       ;;
17099     *)
17100       gl_dirsep_regex='\/'
17101       ;;
17102   esac
17103       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17104   gl_header_literal_regex=`echo 'limits.h' \
17105                            | sed -e "$gl_make_literal_regex_sed"`
17106   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17107       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17108       s|^/[^/]|//&|
17109       p
17110       q
17111     }'
17112
17113         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17114   sed -n "$gl_absolute_header_sed"`
17115
17116           gl_header=$gl_cv_absolute_limits_h
17117           gl_cv_next_limits_h='"'$gl_header'"'
17118           else
17119                gl_cv_next_limits_h='<'limits.h'>'
17120              fi
17121
17122           ;;
17123 esac
17124 fi
17125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
17126 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
17127      fi
17128      NEXT_LIMITS_H=$gl_cv_next_limits_h
17129
17130      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17131        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17132        gl_next_as_first_directive='<'limits.h'>'
17133      else
17134        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17135        gl_next_as_first_directive=$gl_cv_next_limits_h
17136      fi
17137      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
17138
17139
17140
17141
17142
17143   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
17144 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
17145 if test ${gl_cv_header_limits_width+y}
17146 then :
17147   printf %s "(cached) " >&6
17148 else case e in #(
17149   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h.  */
17151 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17152              #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17153             #endif
17154             #include <limits.h>
17155             long long llm = LLONG_MAX;
17156             int wb = WORD_BIT;
17157             int ullw = ULLONG_WIDTH;
17158             int bw = BOOL_WIDTH;
17159             int bm = BOOL_MAX;
17160             int mblm = MB_LEN_MAX;
17161
17162 int
17163 main (void)
17164 {
17165
17166   ;
17167   return 0;
17168 }
17169 _ACEOF
17170 if ac_fn_c_try_compile "$LINENO"
17171 then :
17172   gl_cv_header_limits_width=yes
17173 else case e in #(
17174   e) gl_cv_header_limits_width=no ;;
17175 esac
17176 fi
17177 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17178 esac
17179 fi
17180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
17181 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
17182   GL_GENERATE_LIMITS_H=true
17183   if test "$gl_cv_header_limits_width" = yes
17184 then :
17185   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has SSIZE_MAX" >&5
17186 printf %s "checking whether limits.h has SSIZE_MAX... " >&6; }
17187 if test ${gl_cv_header_limits_ssize_max+y}
17188 then :
17189   printf %s "(cached) " >&6
17190 else case e in #(
17191   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17192 /* end confdefs.h.  */
17193 #include <limits.h>
17194                #ifndef SSIZE_MAX
17195                  #error "SSIZE_MAX is not defined"
17196                #endif
17197
17198 _ACEOF
17199 if ac_fn_c_try_compile "$LINENO"
17200 then :
17201   gl_cv_header_limits_ssize_max=yes
17202 else case e in #(
17203   e) gl_cv_header_limits_ssize_max=no ;;
17204 esac
17205 fi
17206 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17207 esac
17208 fi
17209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_ssize_max" >&5
17210 printf "%s\n" "$gl_cv_header_limits_ssize_max" >&6; }
17211      if test "$gl_cv_header_limits_ssize_max" = yes; then
17212        GL_GENERATE_LIMITS_H=false
17213      fi
17214 fi
17215
17216
17217   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
17218 printf %s "checking for wint_t... " >&6; }
17219 if test ${gt_cv_c_wint_t+y}
17220 then :
17221   printf %s "(cached) " >&6
17222 else case e in #(
17223   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17224 /* end confdefs.h.  */
17225 #include <wchar.h>
17226             wint_t foo = (wchar_t)'\0';
17227 int
17228 main (void)
17229 {
17230
17231   ;
17232   return 0;
17233 }
17234 _ACEOF
17235 if ac_fn_c_try_compile "$LINENO"
17236 then :
17237   gt_cv_c_wint_t=yes
17238 else case e in #(
17239   e) gt_cv_c_wint_t=no ;;
17240 esac
17241 fi
17242 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17243 esac
17244 fi
17245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
17246 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
17247   if test $gt_cv_c_wint_t = yes; then
17248
17249 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
17250
17251
17252             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
17253 printf %s "checking whether wint_t is large enough... " >&6; }
17254 if test ${gl_cv_type_wint_t_large_enough+y}
17255 then :
17256   printf %s "(cached) " >&6
17257 else case e in #(
17258   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17259 /* end confdefs.h.  */
17260 #include <wchar.h>
17261               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
17262
17263 int
17264 main (void)
17265 {
17266
17267   ;
17268   return 0;
17269 }
17270 _ACEOF
17271 if ac_fn_c_try_compile "$LINENO"
17272 then :
17273   gl_cv_type_wint_t_large_enough=yes
17274 else case e in #(
17275   e) gl_cv_type_wint_t_large_enough=no ;;
17276 esac
17277 fi
17278 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17279 esac
17280 fi
17281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
17282 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
17283     if test $gl_cv_type_wint_t_large_enough = no; then
17284       GNULIBHEADERS_OVERRIDE_WINT_T=1
17285     else
17286       GNULIBHEADERS_OVERRIDE_WINT_T=0
17287     fi
17288   else
17289     GNULIBHEADERS_OVERRIDE_WINT_T=0
17290   fi
17291
17292
17293
17294     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
17295 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
17296 if test ${gl_cv_c_multiarch+y}
17297 then :
17298   printf %s "(cached) " >&6
17299 else case e in #(
17300   e) gl_cv_c_multiarch=no
17301      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h.  */
17303 #ifndef __APPLE_CC__
17304             not a universal capable compiler
17305            #endif
17306            typedef int dummy;
17307
17308 _ACEOF
17309 if ac_fn_c_try_compile "$LINENO"
17310 then :
17311
17312                         arch=
17313         prev=
17314         for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17315           if test -n "$prev"; then
17316             case $word in
17317               i?86 | x86_64 | ppc | ppc64 | arm | arm64)
17318                 if test -z "$arch" || test "$arch" = "$word"; then
17319                   arch="$word"
17320                 else
17321                   gl_cv_c_multiarch=yes
17322                 fi
17323                 ;;
17324             esac
17325             prev=
17326           else
17327             if test "x$word" = "x-arch"; then
17328               prev=arch
17329             fi
17330           fi
17331         done
17332
17333 fi
17334 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17335      ;;
17336 esac
17337 fi
17338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
17339 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
17340   if test $gl_cv_c_multiarch = yes; then
17341     APPLE_UNIVERSAL_BUILD=1
17342   else
17343     APPLE_UNIVERSAL_BUILD=0
17344   fi
17345
17346
17347
17348
17349
17350
17351
17352
17353 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17354
17355
17356 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17357
17358
17359
17360   if test $ac_cv_header_wchar_h = yes; then
17361     HAVE_WCHAR_H=1
17362   else
17363     HAVE_WCHAR_H=0
17364   fi
17365
17366
17367
17368   if test $ac_cv_header_inttypes_h = yes; then
17369     HAVE_INTTYPES_H=1
17370   else
17371     HAVE_INTTYPES_H=0
17372   fi
17373
17374
17375
17376   if test $ac_cv_header_sys_types_h = yes; then
17377     HAVE_SYS_TYPES_H=1
17378   else
17379     HAVE_SYS_TYPES_H=0
17380   fi
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392      if test $gl_cv_have_include_next = yes; then
17393        gl_cv_next_stdint_h='<'stdint.h'>'
17394      else
17395        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17396 printf %s "checking absolute name of <stdint.h>... " >&6; }
17397 if test ${gl_cv_next_stdint_h+y}
17398 then :
17399   printf %s "(cached) " >&6
17400 else case e in #(
17401   e)
17402              if test $ac_cv_header_stdint_h = yes; then
17403
17404
17405
17406
17407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17408 /* end confdefs.h.  */
17409 #include <stdint.h>
17410 _ACEOF
17411                 case "$host_os" in
17412     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17413     *)    gl_absname_cpp="$ac_cpp" ;;
17414   esac
17415
17416   case "$host_os" in
17417     mingw*)
17418                                           gl_dirsep_regex='[/\\]'
17419       ;;
17420     *)
17421       gl_dirsep_regex='\/'
17422       ;;
17423   esac
17424       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17425   gl_header_literal_regex=`echo 'stdint.h' \
17426                            | sed -e "$gl_make_literal_regex_sed"`
17427   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17428       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17429       s|^/[^/]|//&|
17430       p
17431       q
17432     }'
17433
17434         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17435   sed -n "$gl_absolute_header_sed"`
17436
17437           gl_header=$gl_cv_absolute_stdint_h
17438           gl_cv_next_stdint_h='"'$gl_header'"'
17439           else
17440                gl_cv_next_stdint_h='<'stdint.h'>'
17441              fi
17442
17443           ;;
17444 esac
17445 fi
17446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17447 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17448      fi
17449      NEXT_STDINT_H=$gl_cv_next_stdint_h
17450
17451      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17452        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17453        gl_next_as_first_directive='<'stdint.h'>'
17454      else
17455        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17456        gl_next_as_first_directive=$gl_cv_next_stdint_h
17457      fi
17458      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17459
17460
17461
17462
17463   if test $ac_cv_header_stdint_h = yes; then
17464     HAVE_STDINT_H=1
17465   else
17466     HAVE_STDINT_H=0
17467   fi
17468
17469
17470     if test $ac_cv_header_stdint_h = yes; then
17471     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17472 printf %s "checking whether stdint.h conforms to C99... " >&6; }
17473 if test ${gl_cv_header_working_stdint_h+y}
17474 then :
17475   printf %s "(cached) " >&6
17476 else case e in #(
17477   e) gl_cv_header_working_stdint_h=no
17478        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17479 /* end confdefs.h.  */
17480
17481
17482 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17483 #define __STDC_CONSTANT_MACROS 1
17484 #define __STDC_LIMIT_MACROS 1
17485 #include <stdint.h>
17486 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
17487 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17488 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17489 #endif
17490
17491
17492   #include <stddef.h>
17493   #include <signal.h>
17494   #if HAVE_WCHAR_H
17495   # include <wchar.h>
17496   #endif
17497
17498
17499 #ifdef INT8_MAX
17500 int8_t a1 = INT8_MAX;
17501 int8_t a1min = INT8_MIN;
17502 #endif
17503 #ifdef INT16_MAX
17504 int16_t a2 = INT16_MAX;
17505 int16_t a2min = INT16_MIN;
17506 #endif
17507 #ifdef INT32_MAX
17508 int32_t a3 = INT32_MAX;
17509 int32_t a3min = INT32_MIN;
17510 #endif
17511 #ifdef INT64_MAX
17512 int64_t a4 = INT64_MAX;
17513 int64_t a4min = INT64_MIN;
17514 #endif
17515 #ifdef UINT8_MAX
17516 uint8_t b1 = UINT8_MAX;
17517 #else
17518 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17519 #endif
17520 #ifdef UINT16_MAX
17521 uint16_t b2 = UINT16_MAX;
17522 #endif
17523 #ifdef UINT32_MAX
17524 uint32_t b3 = UINT32_MAX;
17525 #endif
17526 #ifdef UINT64_MAX
17527 uint64_t b4 = UINT64_MAX;
17528 #endif
17529 int_least8_t c1 = INT8_C (0x7f);
17530 int_least8_t c1max = INT_LEAST8_MAX;
17531 int_least8_t c1min = INT_LEAST8_MIN;
17532 int_least16_t c2 = INT16_C (0x7fff);
17533 int_least16_t c2max = INT_LEAST16_MAX;
17534 int_least16_t c2min = INT_LEAST16_MIN;
17535 int_least32_t c3 = INT32_C (0x7fffffff);
17536 int_least32_t c3max = INT_LEAST32_MAX;
17537 int_least32_t c3min = INT_LEAST32_MIN;
17538 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17539 int_least64_t c4max = INT_LEAST64_MAX;
17540 int_least64_t c4min = INT_LEAST64_MIN;
17541 uint_least8_t d1 = UINT8_C (0xff);
17542 uint_least8_t d1max = UINT_LEAST8_MAX;
17543 uint_least16_t d2 = UINT16_C (0xffff);
17544 uint_least16_t d2max = UINT_LEAST16_MAX;
17545 uint_least32_t d3 = UINT32_C (0xffffffff);
17546 uint_least32_t d3max = UINT_LEAST32_MAX;
17547 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17548 uint_least64_t d4max = UINT_LEAST64_MAX;
17549 int_fast8_t e1 = INT_FAST8_MAX;
17550 int_fast8_t e1min = INT_FAST8_MIN;
17551 int_fast16_t e2 = INT_FAST16_MAX;
17552 int_fast16_t e2min = INT_FAST16_MIN;
17553 int_fast32_t e3 = INT_FAST32_MAX;
17554 int_fast32_t e3min = INT_FAST32_MIN;
17555 int_fast64_t e4 = INT_FAST64_MAX;
17556 int_fast64_t e4min = INT_FAST64_MIN;
17557 uint_fast8_t f1 = UINT_FAST8_MAX;
17558 uint_fast16_t f2 = UINT_FAST16_MAX;
17559 uint_fast32_t f3 = UINT_FAST32_MAX;
17560 uint_fast64_t f4 = UINT_FAST64_MAX;
17561 #ifdef INTPTR_MAX
17562 intptr_t g = INTPTR_MAX;
17563 intptr_t gmin = INTPTR_MIN;
17564 #endif
17565 #ifdef UINTPTR_MAX
17566 uintptr_t h = UINTPTR_MAX;
17567 #endif
17568 intmax_t i = INTMAX_MAX;
17569 uintmax_t j = UINTMAX_MAX;
17570
17571 /* Check that SIZE_MAX has the correct type, if possible.  */
17572 #if 201112 <= __STDC_VERSION__
17573 int k = _Generic (SIZE_MAX, size_t: 0);
17574 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
17575        || (0x5110 <= __SUNPRO_C && !__STDC__))
17576 extern size_t k;
17577 extern __typeof__ (SIZE_MAX) k;
17578 #endif
17579
17580 #include <limits.h> /* for CHAR_BIT */
17581 #define TYPE_MINIMUM(t) \
17582   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17583 #define TYPE_MAXIMUM(t) \
17584   ((t) ((t) 0 < (t) -1 \
17585         ? (t) -1 \
17586         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17587 struct s {
17588   int check_PTRDIFF:
17589       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17590       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17591       ? 1 : -1;
17592   /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
17593   int check_SIG_ATOMIC:
17594       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17595       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17596       ? 1 : -1;
17597   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17598   int check_WCHAR:
17599       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17600       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17601       ? 1 : -1;
17602   /* Detect bug in mingw.  */
17603   int check_WINT:
17604       WINT_MIN == TYPE_MINIMUM (wint_t)
17605       && WINT_MAX == TYPE_MAXIMUM (wint_t)
17606       ? 1 : -1;
17607
17608   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
17609   int check_UINT8_C:
17610         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17611   int check_UINT16_C:
17612         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17613
17614   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
17615 #ifdef UINT8_MAX
17616   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17617 #endif
17618 #ifdef UINT16_MAX
17619   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17620 #endif
17621 #ifdef UINT32_MAX
17622   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17623 #endif
17624 #ifdef UINT64_MAX
17625   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17626 #endif
17627   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17628   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17629   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17630   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17631   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17632   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17633   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17634   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17635   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17636   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17637   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17638 };
17639
17640 int
17641 main (void)
17642 {
17643
17644   ;
17645   return 0;
17646 }
17647 _ACEOF
17648 if ac_fn_c_try_compile "$LINENO"
17649 then :
17650                                                     if test "$cross_compiling" = yes
17651 then :
17652   case "$host_os" in
17653                          # Guess yes on native Windows.
17654                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17655                          # In general, assume it works.
17656                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
17657                esac
17658
17659 else case e in #(
17660   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17661 /* end confdefs.h.  */
17662
17663
17664 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17665 #define __STDC_CONSTANT_MACROS 1
17666 #define __STDC_LIMIT_MACROS 1
17667 #include <stdint.h>
17668
17669
17670   #include <stddef.h>
17671   #include <signal.h>
17672   #if HAVE_WCHAR_H
17673   # include <wchar.h>
17674   #endif
17675
17676
17677 #include <stdio.h>
17678 #include <string.h>
17679 #define MVAL(macro) MVAL1(macro)
17680 #define MVAL1(expression) #expression
17681 static const char *macro_values[] =
17682   {
17683 #ifdef INT8_MAX
17684     MVAL (INT8_MAX),
17685 #endif
17686 #ifdef INT16_MAX
17687     MVAL (INT16_MAX),
17688 #endif
17689 #ifdef INT32_MAX
17690     MVAL (INT32_MAX),
17691 #endif
17692 #ifdef INT64_MAX
17693     MVAL (INT64_MAX),
17694 #endif
17695 #ifdef UINT8_MAX
17696     MVAL (UINT8_MAX),
17697 #endif
17698 #ifdef UINT16_MAX
17699     MVAL (UINT16_MAX),
17700 #endif
17701 #ifdef UINT32_MAX
17702     MVAL (UINT32_MAX),
17703 #endif
17704 #ifdef UINT64_MAX
17705     MVAL (UINT64_MAX),
17706 #endif
17707     NULL
17708   };
17709
17710 int
17711 main (void)
17712 {
17713
17714   const char **mv;
17715   for (mv = macro_values; *mv != NULL; mv++)
17716     {
17717       const char *value = *mv;
17718       /* Test whether it looks like a cast expression.  */
17719       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17720           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17721           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17722           || strncmp (value, "((int)"/*)*/, 6) == 0
17723           || strncmp (value, "((signed short)"/*)*/, 15) == 0
17724           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17725         return mv - macro_values + 1;
17726     }
17727   return 0;
17728
17729   ;
17730   return 0;
17731 }
17732 _ACEOF
17733 if ac_fn_c_try_run "$LINENO"
17734 then :
17735   gl_cv_header_working_stdint_h=yes
17736 fi
17737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17738   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17739 esac
17740 fi
17741
17742
17743 fi
17744 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17745        ;;
17746 esac
17747 fi
17748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17749 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17750   fi
17751
17752   HAVE_C99_STDINT_H=0
17753   HAVE_SYS_BITYPES_H=0
17754   HAVE_SYS_INTTYPES_H=0
17755   GL_GENERATE_STDINT_H=true
17756   case "$gl_cv_header_working_stdint_h" in
17757     *yes)
17758       HAVE_C99_STDINT_H=1
17759                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
17760 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
17761 if test ${gl_cv_header_stdint_without_STDC_macros+y}
17762 then :
17763   printf %s "(cached) " >&6
17764 else case e in #(
17765   e) gl_cv_header_stdint_without_STDC_macros=no
17766          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17767 /* end confdefs.h.  */
17768
17769
17770 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17771 #include <stdint.h>
17772
17773
17774   #include <stddef.h>
17775   #include <signal.h>
17776   #if HAVE_WCHAR_H
17777   # include <wchar.h>
17778   #endif
17779
17780
17781 intmax_t im = INTMAX_MAX;
17782 int32_t i32 = INT32_C (0x7fffffff);
17783
17784 int
17785 main (void)
17786 {
17787
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 if ac_fn_c_try_compile "$LINENO"
17793 then :
17794   gl_cv_header_stdint_without_STDC_macros=yes
17795 fi
17796 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17797          ;;
17798 esac
17799 fi
17800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
17801 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
17802
17803       if test $gl_cv_header_stdint_without_STDC_macros = no; then
17804
17805 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17806
17807
17808 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17809
17810       fi
17811       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17812 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17813 if test ${gl_cv_header_stdint_width+y}
17814 then :
17815   printf %s "(cached) " >&6
17816 else case e in #(
17817   e) gl_cv_header_stdint_width=no
17818          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17819 /* end confdefs.h.  */
17820
17821               /* Work if build is not clean.  */
17822               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17823               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17824                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17825               #endif
17826               #include <stdint.h>
17827
17828   #include <stddef.h>
17829   #include <signal.h>
17830   #if HAVE_WCHAR_H
17831   # include <wchar.h>
17832   #endif
17833
17834               int iw = UINTMAX_WIDTH;
17835
17836 int
17837 main (void)
17838 {
17839
17840   ;
17841   return 0;
17842 }
17843 _ACEOF
17844 if ac_fn_c_try_compile "$LINENO"
17845 then :
17846   gl_cv_header_stdint_width=yes
17847 fi
17848 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17849 esac
17850 fi
17851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
17852 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
17853       if test "$gl_cv_header_stdint_width" = yes; then
17854         GL_GENERATE_STDINT_H=false
17855       fi
17856       ;;
17857     *)
17858                   ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
17859 if test "x$ac_cv_header_sys_inttypes_h" = xyes
17860 then :
17861   printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
17862
17863 fi
17864 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
17865 if test "x$ac_cv_header_sys_bitypes_h" = xyes
17866 then :
17867   printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
17868
17869 fi
17870
17871       if test $ac_cv_header_sys_inttypes_h = yes; then
17872         HAVE_SYS_INTTYPES_H=1
17873       fi
17874       if test $ac_cv_header_sys_bitypes_h = yes; then
17875         HAVE_SYS_BITYPES_H=1
17876       fi
17877
17878
17879   if test $APPLE_UNIVERSAL_BUILD = 0; then
17880
17881
17882   for gltype in ptrdiff_t size_t ; do
17883     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17884 printf %s "checking for bit size of $gltype... " >&6; }
17885 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17886 then :
17887   printf %s "(cached) " >&6
17888 else case e in #(
17889   e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17890   #include <stddef.h>
17891   #include <signal.h>
17892   #if HAVE_WCHAR_H
17893   # include <wchar.h>
17894   #endif
17895
17896 #include <limits.h>"
17897 then :
17898
17899 else case e in #(
17900   e) result=unknown ;;
17901 esac
17902 fi
17903
17904        eval gl_cv_bitsizeof_${gltype}=\$result
17905        ;;
17906 esac
17907 fi
17908 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17909                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17910 printf "%s\n" "$ac_res" >&6; }
17911     eval result=\$gl_cv_bitsizeof_${gltype}
17912     if test $result = unknown; then
17913                                                 result=0
17914     fi
17915     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17916     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17917
17918     eval BITSIZEOF_${GLTYPE}=\$result
17919   done
17920
17921
17922   fi
17923
17924
17925   for gltype in sig_atomic_t wchar_t wint_t ; do
17926     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17927 printf %s "checking for bit size of $gltype... " >&6; }
17928 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17929 then :
17930   printf %s "(cached) " >&6
17931 else case e in #(
17932   e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17933   #include <stddef.h>
17934   #include <signal.h>
17935   #if HAVE_WCHAR_H
17936   # include <wchar.h>
17937   #endif
17938
17939 #include <limits.h>"
17940 then :
17941
17942 else case e in #(
17943   e) result=unknown ;;
17944 esac
17945 fi
17946
17947        eval gl_cv_bitsizeof_${gltype}=\$result
17948        ;;
17949 esac
17950 fi
17951 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17952                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17953 printf "%s\n" "$ac_res" >&6; }
17954     eval result=\$gl_cv_bitsizeof_${gltype}
17955     if test $result = unknown; then
17956                                                 result=0
17957     fi
17958     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17959     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17960
17961     eval BITSIZEOF_${GLTYPE}=\$result
17962   done
17963
17964
17965
17966
17967   for gltype in sig_atomic_t wchar_t wint_t ; do
17968     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17969 printf %s "checking whether $gltype is signed... " >&6; }
17970 if eval test \${gl_cv_type_${gltype}_signed+y}
17971 then :
17972   printf %s "(cached) " >&6
17973 else case e in #(
17974   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975 /* end confdefs.h.  */
17976
17977   #include <stddef.h>
17978   #include <signal.h>
17979   #if HAVE_WCHAR_H
17980   # include <wchar.h>
17981   #endif
17982
17983             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17984 int
17985 main (void)
17986 {
17987
17988   ;
17989   return 0;
17990 }
17991 _ACEOF
17992 if ac_fn_c_try_compile "$LINENO"
17993 then :
17994   result=yes
17995 else case e in #(
17996   e) result=no ;;
17997 esac
17998 fi
17999 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18000        eval gl_cv_type_${gltype}_signed=\$result
18001        ;;
18002 esac
18003 fi
18004 eval ac_res=\$gl_cv_type_${gltype}_signed
18005                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18006 printf "%s\n" "$ac_res" >&6; }
18007     eval result=\$gl_cv_type_${gltype}_signed
18008     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18009     if test "$result" = yes; then
18010       printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
18011
18012       eval HAVE_SIGNED_${GLTYPE}=1
18013     else
18014       eval HAVE_SIGNED_${GLTYPE}=0
18015     fi
18016   done
18017
18018
18019   gl_cv_type_ptrdiff_t_signed=yes
18020   gl_cv_type_size_t_signed=no
18021   if test $APPLE_UNIVERSAL_BUILD = 0; then
18022
18023
18024   for gltype in ptrdiff_t size_t ; do
18025     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18026 printf %s "checking for $gltype integer literal suffix... " >&6; }
18027 if eval test \${gl_cv_type_${gltype}_suffix+y}
18028 then :
18029   printf %s "(cached) " >&6
18030 else case e in #(
18031   e) eval gl_cv_type_${gltype}_suffix=no
18032        eval result=\$gl_cv_type_${gltype}_signed
18033        if test "$result" = yes; then
18034          glsufu=
18035        else
18036          glsufu=u
18037        fi
18038        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18039          case $glsuf in
18040            '')  gltype1='int';;
18041            l)   gltype1='long int';;
18042            ll)  gltype1='long long int';;
18043            i64) gltype1='__int64';;
18044            u)   gltype1='unsigned int';;
18045            ul)  gltype1='unsigned long int';;
18046            ull) gltype1='unsigned long long int';;
18047            ui64)gltype1='unsigned __int64';;
18048          esac
18049          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h.  */
18051
18052   #include <stddef.h>
18053   #include <signal.h>
18054   #if HAVE_WCHAR_H
18055   # include <wchar.h>
18056   #endif
18057
18058               extern $gltype foo;
18059               extern $gltype1 foo;
18060 int
18061 main (void)
18062 {
18063
18064   ;
18065   return 0;
18066 }
18067 _ACEOF
18068 if ac_fn_c_try_compile "$LINENO"
18069 then :
18070   eval gl_cv_type_${gltype}_suffix=\$glsuf
18071 fi
18072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18073          eval result=\$gl_cv_type_${gltype}_suffix
18074          test "$result" != no && break
18075        done ;;
18076 esac
18077 fi
18078 eval ac_res=\$gl_cv_type_${gltype}_suffix
18079                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18080 printf "%s\n" "$ac_res" >&6; }
18081     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18082     eval result=\$gl_cv_type_${gltype}_suffix
18083     test "$result" = no && result=
18084     eval ${GLTYPE}_SUFFIX=\$result
18085     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18086
18087   done
18088
18089
18090   fi
18091
18092
18093   for gltype in sig_atomic_t wchar_t wint_t ; do
18094     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18095 printf %s "checking for $gltype integer literal suffix... " >&6; }
18096 if eval test \${gl_cv_type_${gltype}_suffix+y}
18097 then :
18098   printf %s "(cached) " >&6
18099 else case e in #(
18100   e) eval gl_cv_type_${gltype}_suffix=no
18101        eval result=\$gl_cv_type_${gltype}_signed
18102        if test "$result" = yes; then
18103          glsufu=
18104        else
18105          glsufu=u
18106        fi
18107        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18108          case $glsuf in
18109            '')  gltype1='int';;
18110            l)   gltype1='long int';;
18111            ll)  gltype1='long long int';;
18112            i64) gltype1='__int64';;
18113            u)   gltype1='unsigned int';;
18114            ul)  gltype1='unsigned long int';;
18115            ull) gltype1='unsigned long long int';;
18116            ui64)gltype1='unsigned __int64';;
18117          esac
18118          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18119 /* end confdefs.h.  */
18120
18121   #include <stddef.h>
18122   #include <signal.h>
18123   #if HAVE_WCHAR_H
18124   # include <wchar.h>
18125   #endif
18126
18127               extern $gltype foo;
18128               extern $gltype1 foo;
18129 int
18130 main (void)
18131 {
18132
18133   ;
18134   return 0;
18135 }
18136 _ACEOF
18137 if ac_fn_c_try_compile "$LINENO"
18138 then :
18139   eval gl_cv_type_${gltype}_suffix=\$glsuf
18140 fi
18141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18142          eval result=\$gl_cv_type_${gltype}_suffix
18143          test "$result" != no && break
18144        done ;;
18145 esac
18146 fi
18147 eval ac_res=\$gl_cv_type_${gltype}_suffix
18148                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18149 printf "%s\n" "$ac_res" >&6; }
18150     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18151     eval result=\$gl_cv_type_${gltype}_suffix
18152     test "$result" = no && result=
18153     eval ${GLTYPE}_SUFFIX=\$result
18154     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18155
18156   done
18157
18158
18159
18160           if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
18161     BITSIZEOF_WINT_T=32
18162   fi
18163
18164       ;;
18165   esac
18166
18167
18168
18169   GL_GENERATE_LIMITS_H=true
18170
18171
18172
18173
18174
18175
18176
18177     HAVE_DECL_IMAXABS=1;
18178   HAVE_DECL_IMAXDIV=1;
18179   HAVE_DECL_STRTOIMAX=1;
18180   HAVE_DECL_STRTOUMAX=1;
18181   HAVE_IMAXDIV_T=1;
18182   HAVE_IMAXABS=1;
18183   HAVE_IMAXDIV=1;
18184   REPLACE_IMAXABS=0;
18185   REPLACE_IMAXDIV=0;
18186   REPLACE_STRTOIMAX=0;
18187   REPLACE_STRTOUMAX=0;
18188   INT32_MAX_LT_INTMAX_MAX=1;
18189   INT64_MAX_EQ_LONG_MAX='defined _LP64';
18190   PRIPTR_PREFIX=__PRIPTR_PREFIX;
18191   UINT32_MAX_LT_UINTMAX_MAX=1;
18192   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208      if test $gl_cv_have_include_next = yes; then
18209        gl_cv_next_inttypes_h='<'inttypes.h'>'
18210      else
18211        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18212 printf %s "checking absolute name of <inttypes.h>... " >&6; }
18213 if test ${gl_cv_next_inttypes_h+y}
18214 then :
18215   printf %s "(cached) " >&6
18216 else case e in #(
18217   e)
18218              if test $ac_cv_header_inttypes_h = yes; then
18219
18220
18221
18222
18223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18224 /* end confdefs.h.  */
18225 #include <inttypes.h>
18226 _ACEOF
18227                 case "$host_os" in
18228     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18229     *)    gl_absname_cpp="$ac_cpp" ;;
18230   esac
18231
18232   case "$host_os" in
18233     mingw*)
18234                                           gl_dirsep_regex='[/\\]'
18235       ;;
18236     *)
18237       gl_dirsep_regex='\/'
18238       ;;
18239   esac
18240       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18241   gl_header_literal_regex=`echo 'inttypes.h' \
18242                            | sed -e "$gl_make_literal_regex_sed"`
18243   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18244       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18245       s|^/[^/]|//&|
18246       p
18247       q
18248     }'
18249
18250         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18251   sed -n "$gl_absolute_header_sed"`
18252
18253           gl_header=$gl_cv_absolute_inttypes_h
18254           gl_cv_next_inttypes_h='"'$gl_header'"'
18255           else
18256                gl_cv_next_inttypes_h='<'inttypes.h'>'
18257              fi
18258
18259           ;;
18260 esac
18261 fi
18262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18263 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
18264      fi
18265      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
18266
18267      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18268        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18269        gl_next_as_first_directive='<'inttypes.h'>'
18270      else
18271        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18272        gl_next_as_first_directive=$gl_cv_next_inttypes_h
18273      fi
18274      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291   PRIPTR_PREFIX=
18292   if $GL_GENERATE_STDINT_H; then
18293             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18294 /* end confdefs.h.  */
18295
18296          #ifdef _WIN64
18297          LLP64
18298          #endif
18299
18300 int
18301 main (void)
18302 {
18303
18304   ;
18305   return 0;
18306 }
18307
18308 _ACEOF
18309 if ac_fn_c_try_compile "$LINENO"
18310 then :
18311   PRIPTR_PREFIX='"l"'
18312 else case e in #(
18313   e) PRIPTR_PREFIX='"ll"' ;;
18314 esac
18315 fi
18316 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18317   else
18318         for glpfx in '' l ll I64; do
18319       case $glpfx in
18320         '')  gltype1='int';;
18321         l)   gltype1='long int';;
18322         ll)  gltype1='long long int';;
18323         I64) gltype1='__int64';;
18324       esac
18325       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326 /* end confdefs.h.  */
18327 #include <stdint.h>
18328            extern intptr_t foo;
18329            extern $gltype1 foo;
18330 int
18331 main (void)
18332 {
18333
18334   ;
18335   return 0;
18336 }
18337 _ACEOF
18338 if ac_fn_c_try_compile "$LINENO"
18339 then :
18340   PRIPTR_PREFIX='"'$glpfx'"'
18341 fi
18342 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18343       test -n "$PRIPTR_PREFIX" && break
18344     done
18345   fi
18346
18347
18348
18349   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18350 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
18351 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
18352 then :
18353   printf %s "(cached) " >&6
18354 else case e in #(
18355   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18356 /* end confdefs.h.  */
18357 /* Work also in C++ mode.  */
18358             #define __STDC_LIMIT_MACROS 1
18359
18360             /* Work if build is not clean.  */
18361             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18362
18363             #include <limits.h>
18364             #if HAVE_STDINT_H
18365              #include <stdint.h>
18366             #endif
18367
18368             #if defined INT32_MAX && defined INTMAX_MAX
18369              #define CONDITION (INT32_MAX < INTMAX_MAX)
18370             #else
18371              #define CONDITION (sizeof (int) < sizeof (long long int))
18372             #endif
18373             int test[CONDITION ? 1 : -1];
18374 int
18375 main (void)
18376 {
18377
18378   ;
18379   return 0;
18380 }
18381 _ACEOF
18382 if ac_fn_c_try_compile "$LINENO"
18383 then :
18384   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18385 else case e in #(
18386   e) gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no ;;
18387 esac
18388 fi
18389 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18390 esac
18391 fi
18392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18393 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18394   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18395     INT32_MAX_LT_INTMAX_MAX=1;
18396   else
18397     INT32_MAX_LT_INTMAX_MAX=0;
18398   fi
18399
18400
18401   if test $APPLE_UNIVERSAL_BUILD = 0; then
18402
18403   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18404 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
18405 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
18406 then :
18407   printf %s "(cached) " >&6
18408 else case e in #(
18409   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18410 /* end confdefs.h.  */
18411 /* Work also in C++ mode.  */
18412             #define __STDC_LIMIT_MACROS 1
18413
18414             /* Work if build is not clean.  */
18415             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18416
18417             #include <limits.h>
18418             #if HAVE_STDINT_H
18419              #include <stdint.h>
18420             #endif
18421
18422             #if defined INT64_MAX
18423              #define CONDITION (INT64_MAX == LONG_MAX)
18424             #else
18425              #define CONDITION (sizeof (long long int) == sizeof (long int))
18426             #endif
18427             int test[CONDITION ? 1 : -1];
18428 int
18429 main (void)
18430 {
18431
18432   ;
18433   return 0;
18434 }
18435 _ACEOF
18436 if ac_fn_c_try_compile "$LINENO"
18437 then :
18438   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18439 else case e in #(
18440   e) gl_cv_test_INT64_MAX_EQ_LONG_MAX=no ;;
18441 esac
18442 fi
18443 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18444 esac
18445 fi
18446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18447 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18448   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18449     INT64_MAX_EQ_LONG_MAX=1;
18450   else
18451     INT64_MAX_EQ_LONG_MAX=0;
18452   fi
18453
18454
18455   else
18456     INT64_MAX_EQ_LONG_MAX=-1
18457   fi
18458
18459   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18460 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
18461 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
18462 then :
18463   printf %s "(cached) " >&6
18464 else case e in #(
18465   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18466 /* end confdefs.h.  */
18467 /* Work also in C++ mode.  */
18468             #define __STDC_LIMIT_MACROS 1
18469
18470             /* Work if build is not clean.  */
18471             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18472
18473             #include <limits.h>
18474             #if HAVE_STDINT_H
18475              #include <stdint.h>
18476             #endif
18477
18478             #if defined UINT32_MAX && defined UINTMAX_MAX
18479              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18480             #else
18481              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18482             #endif
18483             int test[CONDITION ? 1 : -1];
18484 int
18485 main (void)
18486 {
18487
18488   ;
18489   return 0;
18490 }
18491 _ACEOF
18492 if ac_fn_c_try_compile "$LINENO"
18493 then :
18494   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18495 else case e in #(
18496   e) gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no ;;
18497 esac
18498 fi
18499 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18500 esac
18501 fi
18502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18503 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18504   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18505     UINT32_MAX_LT_UINTMAX_MAX=1;
18506   else
18507     UINT32_MAX_LT_UINTMAX_MAX=0;
18508   fi
18509
18510
18511   if test $APPLE_UNIVERSAL_BUILD = 0; then
18512
18513   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18514 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
18515 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
18516 then :
18517   printf %s "(cached) " >&6
18518 else case e in #(
18519   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18520 /* end confdefs.h.  */
18521 /* Work also in C++ mode.  */
18522             #define __STDC_LIMIT_MACROS 1
18523
18524             /* Work if build is not clean.  */
18525             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18526
18527             #include <limits.h>
18528             #if HAVE_STDINT_H
18529              #include <stdint.h>
18530             #endif
18531
18532             #if defined UINT64_MAX
18533              #define CONDITION (UINT64_MAX == ULONG_MAX)
18534             #else
18535              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18536             #endif
18537             int test[CONDITION ? 1 : -1];
18538 int
18539 main (void)
18540 {
18541
18542   ;
18543   return 0;
18544 }
18545 _ACEOF
18546 if ac_fn_c_try_compile "$LINENO"
18547 then :
18548   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18549 else case e in #(
18550   e) gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no ;;
18551 esac
18552 fi
18553 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18554 esac
18555 fi
18556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18557 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18558   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18559     UINT64_MAX_EQ_ULONG_MAX=1;
18560   else
18561     UINT64_MAX_EQ_ULONG_MAX=0;
18562   fi
18563
18564
18565   else
18566     UINT64_MAX_EQ_ULONG_MAX=-1
18567   fi
18568
18569
18570
18571
18572   GL_GNULIB_IMAXABS=0
18573
18574
18575
18576   GL_GNULIB_IMAXDIV=0
18577
18578
18579
18580   GL_GNULIB_STRTOIMAX=0
18581
18582
18583
18584   GL_GNULIB_STRTOUMAX=0
18585
18586
18587
18588
18589
18590     HAVE_ISWBLANK=1;
18591   HAVE_WCTYPE_T=1;
18592   HAVE_WCTRANS_T=1;
18593   REPLACE_ISWBLANK=0;
18594   REPLACE_ISWDIGIT=0;
18595   REPLACE_ISWXDIGIT=0;
18596
18597
18598
18599
18600
18601   if test $ac_cv_header_crtdefs_h = yes; then
18602     HAVE_CRTDEFS_H=1
18603   else
18604     HAVE_CRTDEFS_H=0
18605   fi
18606
18607
18608
18609
18610
18611
18612
18613
18614   if test $ac_cv_func_iswcntrl = yes; then
18615     HAVE_ISWCNTRL=1
18616   else
18617     HAVE_ISWCNTRL=0
18618   fi
18619
18620
18621
18622   if test $gt_cv_c_wint_t = yes; then
18623     HAVE_WINT_T=1
18624   else
18625     HAVE_WINT_T=0
18626   fi
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640      if test $gl_cv_have_include_next = yes; then
18641        gl_cv_next_wctype_h='<'wctype.h'>'
18642      else
18643        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
18644 printf %s "checking absolute name of <wctype.h>... " >&6; }
18645 if test ${gl_cv_next_wctype_h+y}
18646 then :
18647   printf %s "(cached) " >&6
18648 else case e in #(
18649   e)
18650              if test $ac_cv_header_wctype_h = yes; then
18651
18652
18653
18654
18655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h.  */
18657 #include <wctype.h>
18658 _ACEOF
18659                 case "$host_os" in
18660     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18661     *)    gl_absname_cpp="$ac_cpp" ;;
18662   esac
18663
18664   case "$host_os" in
18665     mingw*)
18666                                           gl_dirsep_regex='[/\\]'
18667       ;;
18668     *)
18669       gl_dirsep_regex='\/'
18670       ;;
18671   esac
18672       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18673   gl_header_literal_regex=`echo 'wctype.h' \
18674                            | sed -e "$gl_make_literal_regex_sed"`
18675   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18676       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18677       s|^/[^/]|//&|
18678       p
18679       q
18680     }'
18681
18682         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18683   sed -n "$gl_absolute_header_sed"`
18684
18685           gl_header=$gl_cv_absolute_wctype_h
18686           gl_cv_next_wctype_h='"'$gl_header'"'
18687           else
18688                gl_cv_next_wctype_h='<'wctype.h'>'
18689              fi
18690
18691           ;;
18692 esac
18693 fi
18694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
18695 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
18696      fi
18697      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
18698
18699      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18700        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18701        gl_next_as_first_directive='<'wctype.h'>'
18702      else
18703        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18704        gl_next_as_first_directive=$gl_cv_next_wctype_h
18705      fi
18706      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
18707
18708
18709
18710
18711   if test $ac_cv_header_wctype_h = yes; then
18712     if test $ac_cv_func_iswcntrl = yes; then
18713                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
18714 printf %s "checking whether iswcntrl works... " >&6; }
18715 if test ${gl_cv_func_iswcntrl_works+y}
18716 then :
18717   printf %s "(cached) " >&6
18718 else case e in #(
18719   e)
18720           if test "$cross_compiling" = yes
18721 then :
18722                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18723 /* end confdefs.h.  */
18724 #include <stdlib.h>
18725                           #if __GNU_LIBRARY__ == 1
18726                           Linux libc5 i18n is broken.
18727                           #endif
18728 int
18729 main (void)
18730 {
18731
18732   ;
18733   return 0;
18734 }
18735 _ACEOF
18736 if ac_fn_c_try_compile "$LINENO"
18737 then :
18738   gl_cv_func_iswcntrl_works="guessing yes"
18739 else case e in #(
18740   e) gl_cv_func_iswcntrl_works="guessing no" ;;
18741 esac
18742 fi
18743 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18744
18745 else case e in #(
18746   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18747 /* end confdefs.h.  */
18748
18749                #include <wchar.h>
18750                #include <wctype.h>
18751                int main () { return iswprint ('x') == 0; }
18752
18753 _ACEOF
18754 if ac_fn_c_try_run "$LINENO"
18755 then :
18756   gl_cv_func_iswcntrl_works=yes
18757 else case e in #(
18758   e) gl_cv_func_iswcntrl_works=no ;;
18759 esac
18760 fi
18761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18762   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18763 esac
18764 fi
18765
18766          ;;
18767 esac
18768 fi
18769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
18770 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
18771     fi
18772     HAVE_WCTYPE_H=1
18773   else
18774     HAVE_WCTYPE_H=0
18775   fi
18776
18777
18778   if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
18779     REPLACE_ISWCNTRL=1
18780   else
18781     case "$gl_cv_func_iswcntrl_works" in
18782       *yes) REPLACE_ISWCNTRL=0 ;;
18783       *)    REPLACE_ISWCNTRL=1 ;;
18784     esac
18785   fi
18786
18787
18788   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
18789         :
18790   fi
18791
18792   if test $REPLACE_ISWCNTRL = 1; then
18793     REPLACE_TOWLOWER=1
18794   else
18795     ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
18796 if test "x$ac_cv_func_towlower" = xyes
18797 then :
18798   printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
18799
18800 fi
18801
18802     if test $ac_cv_func_towlower = yes; then
18803       REPLACE_TOWLOWER=0
18804     else
18805       ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
18806           #if HAVE_WCTYPE_H
18807           # include <wctype.h>
18808           #endif
18809
18810 " "$ac_c_undeclared_builtin_options" "CFLAGS"
18811 if test "x$ac_cv_have_decl_towlower" = xyes
18812 then :
18813   ac_have_decl=1
18814 else case e in #(
18815   e) ac_have_decl=0 ;;
18816 esac
18817 fi
18818 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
18819
18820       if test $ac_cv_have_decl_towlower = yes; then
18821                                 REPLACE_TOWLOWER=1
18822       else
18823         REPLACE_TOWLOWER=0
18824       fi
18825     fi
18826   fi
18827
18828
18829   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
18830         :
18831   fi
18832
18833           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
18834 printf %s "checking for wctype_t... " >&6; }
18835 if test ${gl_cv_type_wctype_t+y}
18836 then :
18837   printf %s "(cached) " >&6
18838 else case e in #(
18839   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18840 /* end confdefs.h.  */
18841 #include <wchar.h>
18842             #if HAVE_WCTYPE_H
18843             # include <wctype.h>
18844             #endif
18845             wctype_t a;
18846
18847 int
18848 main (void)
18849 {
18850
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 if ac_fn_c_try_compile "$LINENO"
18856 then :
18857   gl_cv_type_wctype_t=yes
18858 else case e in #(
18859   e) gl_cv_type_wctype_t=no ;;
18860 esac
18861 fi
18862 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18863      ;;
18864 esac
18865 fi
18866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
18867 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
18868   if test $gl_cv_type_wctype_t = no; then
18869     HAVE_WCTYPE_T=0
18870   fi
18871
18872       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
18873 printf %s "checking for wctrans_t... " >&6; }
18874 if test ${gl_cv_type_wctrans_t+y}
18875 then :
18876   printf %s "(cached) " >&6
18877 else case e in #(
18878   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18879 /* end confdefs.h.  */
18880 #include <wchar.h>
18881             #include <wctype.h>
18882             wctrans_t a;
18883
18884 int
18885 main (void)
18886 {
18887
18888   ;
18889   return 0;
18890 }
18891 _ACEOF
18892 if ac_fn_c_try_compile "$LINENO"
18893 then :
18894   gl_cv_type_wctrans_t=yes
18895 else case e in #(
18896   e) gl_cv_type_wctrans_t=no ;;
18897 esac
18898 fi
18899 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18900      ;;
18901 esac
18902 fi
18903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
18904 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
18905   if test $gl_cv_type_wctrans_t = no; then
18906     HAVE_WCTRANS_T=0
18907   fi
18908
18909
18910
18911
18912
18913
18914
18915   GL_GNULIB_ISWBLANK=0
18916
18917
18918
18919   GL_GNULIB_ISWDIGIT=0
18920
18921
18922
18923   GL_GNULIB_ISWXDIGIT=0
18924
18925
18926
18927   GL_GNULIB_WCTYPE=0
18928
18929
18930
18931   GL_GNULIB_ISWCTYPE=0
18932
18933
18934
18935   GL_GNULIB_WCTRANS=0
18936
18937
18938
18939   GL_GNULIB_TOWCTRANS=0
18940
18941
18942
18943
18944
18945
18946   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
18947 printf %s "checking for a traditional japanese locale... " >&6; }
18948 if test ${gt_cv_locale_ja+y}
18949 then :
18950   printf %s "(cached) " >&6
18951 else case e in #(
18952   e)
18953     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18954 /* end confdefs.h.  */
18955
18956 #include <locale.h>
18957 #include <time.h>
18958 #if HAVE_LANGINFO_CODESET
18959 # include <langinfo.h>
18960 #endif
18961 #include <stdlib.h>
18962 #include <string.h>
18963 struct tm t;
18964 char buf[16];
18965 int main ()
18966 {
18967   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
18968      imitates locale dependent behaviour by looking at the environment
18969      variables, and all locales use the UTF-8 encoding.  */
18970 #if defined __BEOS__ || defined __HAIKU__
18971   return 1;
18972 #else
18973   /* Check whether the given locale name is recognized by the system.  */
18974 # if defined _WIN32 && !defined __CYGWIN__
18975   /* On native Windows, setlocale(category, "") looks at the system settings,
18976      not at the environment variables.  Also, when an encoding suffix such
18977      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18978      category of the locale to "C".  */
18979   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18980       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18981     return 1;
18982 # else
18983   if (setlocale (LC_ALL, "") == NULL) return 1;
18984 # endif
18985   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18986      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18987      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18988      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18989      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18990      some unit tests fail.
18991      On MirBSD 10, when an unsupported locale is specified, setlocale()
18992      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
18993 # if HAVE_LANGINFO_CODESET
18994   {
18995     const char *cs = nl_langinfo (CODESET);
18996     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18997         || strcmp (cs, "UTF-8") == 0)
18998       return 1;
18999   }
19000 # endif
19001 # ifdef __CYGWIN__
19002   /* On Cygwin, avoid locale names without encoding suffix, because the
19003      locale_charset() function relies on the encoding suffix.  Note that
19004      LC_ALL is set on the command line.  */
19005   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19006 # endif
19007   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
19008      on Cygwin 1.5.x.  */
19009   if (MB_CUR_MAX == 1)
19010     return 1;
19011   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19012      This excludes the UTF-8 encoding (except on MirBSD).  */
19013   {
19014     const char *p;
19015     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19016     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19017     for (p = buf; *p != '\0'; p++)
19018       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19019         return 1;
19020   }
19021   return 0;
19022 #endif
19023 }
19024
19025 _ACEOF
19026     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19027   (eval $ac_link) 2>&5
19028   ac_status=$?
19029   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19030   test $ac_status = 0; } && test -s conftest$ac_exeext; then
19031       case "$host_os" in
19032         # Handle native Windows specially, because there setlocale() interprets
19033         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19034         # "fr" or "fra" as "French" or "French_France.1252",
19035         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19036         # "ja" as "Japanese" or "Japanese_Japan.932",
19037         # and similar.
19038         mingw*)
19039           # Note that on native Windows, the Japanese locale is
19040           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
19041           # cannot use it here.
19042           gt_cv_locale_ja=none
19043           ;;
19044         *)
19045           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19046           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19047           # configure script would override the LC_ALL setting. Likewise for
19048           # LC_CTYPE, which is also set at the beginning of the configure script.
19049           # Test for the AIX locale name.
19050           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19051             gt_cv_locale_ja=ja_JP
19052           else
19053             # Test for the locale name with explicit encoding suffix.
19054             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19055               gt_cv_locale_ja=ja_JP.EUC-JP
19056             else
19057               # Test for the HP-UX, OSF/1, NetBSD locale name.
19058               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19059                 gt_cv_locale_ja=ja_JP.eucJP
19060               else
19061                 # Test for the IRIX, FreeBSD locale name.
19062                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19063                   gt_cv_locale_ja=ja_JP.EUC
19064                 else
19065                   # Test for the Solaris 7 locale name.
19066                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19067                     gt_cv_locale_ja=ja
19068                   else
19069                     # Special test for NetBSD 1.6.
19070                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
19071                       gt_cv_locale_ja=ja_JP.eucJP
19072                     else
19073                       # None found.
19074                       gt_cv_locale_ja=none
19075                     fi
19076                   fi
19077                 fi
19078               fi
19079             fi
19080           fi
19081           ;;
19082       esac
19083     fi
19084     rm -fr conftest*
19085    ;;
19086 esac
19087 fi
19088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
19089 printf "%s\n" "$gt_cv_locale_ja" >&6; }
19090   LOCALE_JA=$gt_cv_locale_ja
19091
19092
19093
19094
19095   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
19096 printf %s "checking for a french Unicode locale... " >&6; }
19097 if test ${gt_cv_locale_fr_utf8+y}
19098 then :
19099   printf %s "(cached) " >&6
19100 else case e in #(
19101   e)
19102     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19103 /* end confdefs.h.  */
19104
19105 #include <locale.h>
19106 #include <time.h>
19107 #if HAVE_LANGINFO_CODESET
19108 # include <langinfo.h>
19109 #endif
19110 #include <stdlib.h>
19111 #include <string.h>
19112 struct tm t;
19113 char buf[16];
19114 int main () {
19115   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
19116      imitates locale dependent behaviour by looking at the environment
19117      variables, and all locales use the UTF-8 encoding.  */
19118 #if !(defined __BEOS__ || defined __HAIKU__)
19119   /* Check whether the given locale name is recognized by the system.  */
19120 # if defined _WIN32 && !defined __CYGWIN__
19121   /* On native Windows, setlocale(category, "") looks at the system settings,
19122      not at the environment variables.  Also, when an encoding suffix such
19123      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19124      category of the locale to "C".  */
19125   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19126       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19127     return 1;
19128 # else
19129   if (setlocale (LC_ALL, "") == NULL) return 1;
19130 # endif
19131   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19132      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19133      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19134      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19135      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19136      some unit tests fail.  */
19137 # if HAVE_LANGINFO_CODESET
19138   {
19139     const char *cs = nl_langinfo (CODESET);
19140     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
19141       return 1;
19142   }
19143 # endif
19144 # ifdef __CYGWIN__
19145   /* On Cygwin, avoid locale names without encoding suffix, because the
19146      locale_charset() function relies on the encoding suffix.  Note that
19147      LC_ALL is set on the command line.  */
19148   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19149 # endif
19150   /* Check whether in the abbreviation of the second month, the second
19151      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
19152      two bytes long, with UTF-8 encoding.  */
19153   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19154   if (strftime (buf, sizeof (buf), "%b", &t) < 4
19155       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
19156     return 1;
19157 #endif
19158 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
19159   /* Check whether the decimal separator is a comma.
19160      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
19161      are nl_langinfo(RADIXCHAR) are both ".".  */
19162   if (localeconv () ->decimal_point[0] != ',') return 1;
19163 #endif
19164   return 0;
19165 }
19166
19167 _ACEOF
19168     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19169   (eval $ac_link) 2>&5
19170   ac_status=$?
19171   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19172   test $ac_status = 0; } && test -s conftest$ac_exeext; then
19173       case "$host_os" in
19174         # Handle native Windows specially, because there setlocale() interprets
19175         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19176         # "fr" or "fra" as "French" or "French_France.1252",
19177         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19178         # "ja" as "Japanese" or "Japanese_Japan.932",
19179         # and similar.
19180         mingw*)
19181           # Test for the hypothetical native Windows locale name.
19182           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19183             gt_cv_locale_fr_utf8=French_France.65001
19184           else
19185             # None found.
19186             gt_cv_locale_fr_utf8=none
19187           fi
19188           ;;
19189         *)
19190           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19191           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19192           # configure script would override the LC_ALL setting. Likewise for
19193           # LC_CTYPE, which is also set at the beginning of the configure script.
19194           # Test for the usual locale name.
19195           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19196             gt_cv_locale_fr_utf8=fr_FR
19197           else
19198             # Test for the locale name with explicit encoding suffix.
19199             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19200               gt_cv_locale_fr_utf8=fr_FR.UTF-8
19201             else
19202               # Test for the Solaris 7 locale name.
19203               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19204                 gt_cv_locale_fr_utf8=fr.UTF-8
19205               else
19206                 # None found.
19207                 gt_cv_locale_fr_utf8=none
19208               fi
19209             fi
19210           fi
19211           ;;
19212       esac
19213     fi
19214     rm -fr conftest*
19215    ;;
19216 esac
19217 fi
19218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
19219 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
19220   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
19221
19222
19223
19224
19225
19226   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
19227 printf %s "checking for a transitional chinese locale... " >&6; }
19228 if test ${gt_cv_locale_zh_CN+y}
19229 then :
19230   printf %s "(cached) " >&6
19231 else case e in #(
19232   e)
19233     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19234 /* end confdefs.h.  */
19235
19236 #include <locale.h>
19237 #include <stdlib.h>
19238 #include <time.h>
19239 #if HAVE_LANGINFO_CODESET
19240 # include <langinfo.h>
19241 #endif
19242 #include <stdlib.h>
19243 #include <string.h>
19244 struct tm t;
19245 char buf[16];
19246 int main ()
19247 {
19248   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
19249      imitates locale dependent behaviour by looking at the environment
19250      variables, and all locales use the UTF-8 encoding.  */
19251 #if defined __BEOS__ || defined __HAIKU__
19252   return 1;
19253 #else
19254   /* Check whether the given locale name is recognized by the system.  */
19255 # if defined _WIN32 && !defined __CYGWIN__
19256   /* On native Windows, setlocale(category, "") looks at the system settings,
19257      not at the environment variables.  Also, when an encoding suffix such
19258      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19259      category of the locale to "C".  */
19260   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19261       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19262     return 1;
19263 # else
19264   if (setlocale (LC_ALL, "") == NULL) return 1;
19265 # endif
19266   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19267      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19268      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19269      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19270      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19271      some unit tests fail.
19272      On MirBSD 10, when an unsupported locale is specified, setlocale()
19273      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
19274 # if HAVE_LANGINFO_CODESET
19275   {
19276     const char *cs = nl_langinfo (CODESET);
19277     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
19278         || strcmp (cs, "UTF-8") == 0)
19279       return 1;
19280   }
19281 # endif
19282 # ifdef __CYGWIN__
19283   /* On Cygwin, avoid locale names without encoding suffix, because the
19284      locale_charset() function relies on the encoding suffix.  Note that
19285      LC_ALL is set on the command line.  */
19286   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19287 # endif
19288   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19289      This excludes the UTF-8 encoding (except on MirBSD).  */
19290   {
19291     const char *p;
19292     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19293     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19294     for (p = buf; *p != '\0'; p++)
19295       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19296         return 1;
19297   }
19298   /* Check whether a typical GB18030 multibyte sequence is recognized as a
19299      single wide character.  This excludes the GB2312 and GBK encodings.  */
19300   if (mblen ("\203\062\332\066", 5) != 4)
19301     return 1;
19302   return 0;
19303 #endif
19304 }
19305
19306 _ACEOF
19307     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19308   (eval $ac_link) 2>&5
19309   ac_status=$?
19310   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19311   test $ac_status = 0; } && test -s conftest$ac_exeext; then
19312       case "$host_os" in
19313         # Handle native Windows specially, because there setlocale() interprets
19314         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19315         # "fr" or "fra" as "French" or "French_France.1252",
19316         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19317         # "ja" as "Japanese" or "Japanese_Japan.932",
19318         # and similar.
19319         mingw*)
19320           # Test for the hypothetical native Windows locale name.
19321           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19322             gt_cv_locale_zh_CN=Chinese_China.54936
19323           else
19324             # None found.
19325             gt_cv_locale_zh_CN=none
19326           fi
19327           ;;
19328         solaris2.8)
19329           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
19330           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
19331           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
19332           gt_cv_locale_zh_CN=none
19333           ;;
19334         *)
19335           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19336           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19337           # configure script would override the LC_ALL setting. Likewise for
19338           # LC_CTYPE, which is also set at the beginning of the configure script.
19339           # Test for the locale name without encoding suffix.
19340           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19341             gt_cv_locale_zh_CN=zh_CN
19342           else
19343             # Test for the locale name with explicit encoding suffix.
19344             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19345               gt_cv_locale_zh_CN=zh_CN.GB18030
19346             else
19347               # None found.
19348               gt_cv_locale_zh_CN=none
19349             fi
19350           fi
19351           ;;
19352       esac
19353     else
19354       # If there was a link error, due to mblen(), the system is so old that
19355       # it certainly doesn't have a chinese locale.
19356       gt_cv_locale_zh_CN=none
19357     fi
19358     rm -fr conftest*
19359    ;;
19360 esac
19361 fi
19362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
19363 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
19364   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
19365
19366
19367
19368     HAVE_NL_LANGINFO=1;
19369   REPLACE_NL_LANGINFO=0;
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386      if test $gl_cv_have_include_next = yes; then
19387        gl_cv_next_langinfo_h='<'langinfo.h'>'
19388      else
19389        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
19390 printf %s "checking absolute name of <langinfo.h>... " >&6; }
19391 if test ${gl_cv_next_langinfo_h+y}
19392 then :
19393   printf %s "(cached) " >&6
19394 else case e in #(
19395   e)
19396              if test $ac_cv_header_langinfo_h = yes; then
19397
19398
19399
19400
19401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h.  */
19403 #include <langinfo.h>
19404 _ACEOF
19405                 case "$host_os" in
19406     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19407     *)    gl_absname_cpp="$ac_cpp" ;;
19408   esac
19409
19410   case "$host_os" in
19411     mingw*)
19412                                           gl_dirsep_regex='[/\\]'
19413       ;;
19414     *)
19415       gl_dirsep_regex='\/'
19416       ;;
19417   esac
19418       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19419   gl_header_literal_regex=`echo 'langinfo.h' \
19420                            | sed -e "$gl_make_literal_regex_sed"`
19421   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19422       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19423       s|^/[^/]|//&|
19424       p
19425       q
19426     }'
19427
19428         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19429   sed -n "$gl_absolute_header_sed"`
19430
19431           gl_header=$gl_cv_absolute_langinfo_h
19432           gl_cv_next_langinfo_h='"'$gl_header'"'
19433           else
19434                gl_cv_next_langinfo_h='<'langinfo.h'>'
19435              fi
19436
19437           ;;
19438 esac
19439 fi
19440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
19441 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
19442      fi
19443      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
19444
19445      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19446        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19447        gl_next_as_first_directive='<'langinfo.h'>'
19448      else
19449        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19450        gl_next_as_first_directive=$gl_cv_next_langinfo_h
19451      fi
19452      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
19453
19454
19455
19456
19457
19458     HAVE_LANGINFO_CODESET=0
19459   HAVE_LANGINFO_T_FMT_AMPM=0
19460   HAVE_LANGINFO_ALTMON=0
19461   HAVE_LANGINFO_ERA=0
19462   HAVE_LANGINFO_YESEXPR=0
19463
19464   if test $ac_cv_header_langinfo_h = yes; then
19465     HAVE_LANGINFO_H=1
19466                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
19467 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
19468 if test ${gl_cv_header_langinfo_codeset+y}
19469 then :
19470   printf %s "(cached) " >&6
19471 else case e in #(
19472   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19473 /* end confdefs.h.  */
19474 #include <langinfo.h>
19475 int a = CODESET;
19476
19477 int
19478 main (void)
19479 {
19480
19481   ;
19482   return 0;
19483 }
19484 _ACEOF
19485 if ac_fn_c_try_compile "$LINENO"
19486 then :
19487   gl_cv_header_langinfo_codeset=yes
19488 else case e in #(
19489   e) gl_cv_header_langinfo_codeset=no ;;
19490 esac
19491 fi
19492 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19493        ;;
19494 esac
19495 fi
19496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
19497 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
19498     if test $gl_cv_header_langinfo_codeset = yes; then
19499       HAVE_LANGINFO_CODESET=1
19500     fi
19501     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
19502 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
19503 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
19504 then :
19505   printf %s "(cached) " >&6
19506 else case e in #(
19507   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19508 /* end confdefs.h.  */
19509 #include <langinfo.h>
19510 int a = T_FMT_AMPM;
19511
19512 int
19513 main (void)
19514 {
19515
19516   ;
19517   return 0;
19518 }
19519 _ACEOF
19520 if ac_fn_c_try_compile "$LINENO"
19521 then :
19522   gl_cv_header_langinfo_t_fmt_ampm=yes
19523 else case e in #(
19524   e) gl_cv_header_langinfo_t_fmt_ampm=no ;;
19525 esac
19526 fi
19527 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19528        ;;
19529 esac
19530 fi
19531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
19532 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
19533     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
19534       HAVE_LANGINFO_T_FMT_AMPM=1
19535     fi
19536     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
19537 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
19538 if test ${gl_cv_header_langinfo_altmon+y}
19539 then :
19540   printf %s "(cached) " >&6
19541 else case e in #(
19542   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19543 /* end confdefs.h.  */
19544 #include <langinfo.h>
19545 int a = ALTMON_1;
19546
19547 int
19548 main (void)
19549 {
19550
19551   ;
19552   return 0;
19553 }
19554 _ACEOF
19555 if ac_fn_c_try_compile "$LINENO"
19556 then :
19557   gl_cv_header_langinfo_altmon=yes
19558 else case e in #(
19559   e) gl_cv_header_langinfo_altmon=no ;;
19560 esac
19561 fi
19562 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19563        ;;
19564 esac
19565 fi
19566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
19567 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
19568     if test $gl_cv_header_langinfo_altmon = yes; then
19569       HAVE_LANGINFO_ALTMON=1
19570     fi
19571     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
19572 printf %s "checking whether langinfo.h defines ERA... " >&6; }
19573 if test ${gl_cv_header_langinfo_era+y}
19574 then :
19575   printf %s "(cached) " >&6
19576 else case e in #(
19577   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19578 /* end confdefs.h.  */
19579 #include <langinfo.h>
19580 int a = ERA;
19581
19582 int
19583 main (void)
19584 {
19585
19586   ;
19587   return 0;
19588 }
19589 _ACEOF
19590 if ac_fn_c_try_compile "$LINENO"
19591 then :
19592   gl_cv_header_langinfo_era=yes
19593 else case e in #(
19594   e) gl_cv_header_langinfo_era=no ;;
19595 esac
19596 fi
19597 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19598        ;;
19599 esac
19600 fi
19601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
19602 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
19603     if test $gl_cv_header_langinfo_era = yes; then
19604       HAVE_LANGINFO_ERA=1
19605     fi
19606     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
19607 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
19608 if test ${gl_cv_header_langinfo_yesexpr+y}
19609 then :
19610   printf %s "(cached) " >&6
19611 else case e in #(
19612   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19613 /* end confdefs.h.  */
19614 #include <langinfo.h>
19615 int a = YESEXPR;
19616
19617 int
19618 main (void)
19619 {
19620
19621   ;
19622   return 0;
19623 }
19624 _ACEOF
19625 if ac_fn_c_try_compile "$LINENO"
19626 then :
19627   gl_cv_header_langinfo_yesexpr=yes
19628 else case e in #(
19629   e) gl_cv_header_langinfo_yesexpr=no ;;
19630 esac
19631 fi
19632 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19633        ;;
19634 esac
19635 fi
19636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
19637 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
19638     if test $gl_cv_header_langinfo_yesexpr = yes; then
19639       HAVE_LANGINFO_YESEXPR=1
19640     fi
19641   else
19642     HAVE_LANGINFO_H=0
19643   fi
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657   GL_GNULIB_NL_LANGINFO=0
19658
19659
19660
19661
19662     HAVE_NEWLOCALE=1;
19663   HAVE_DUPLOCALE=1;
19664   HAVE_FREELOCALE=1;
19665   REPLACE_LOCALECONV=0;
19666   REPLACE_SETLOCALE=0;
19667   REPLACE_NEWLOCALE=0;
19668   REPLACE_DUPLOCALE=0;
19669   REPLACE_FREELOCALE=0;
19670   REPLACE_STRUCT_LCONV=0;
19671   LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
19672
19673
19674     REPLACE_NULL=0;
19675   HAVE_MAX_ALIGN_T=1;
19676   HAVE_WCHAR_T=1;
19677
19678
19679   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19680 printf %s "checking for wchar_t... " >&6; }
19681 if test ${gt_cv_c_wchar_t+y}
19682 then :
19683   printf %s "(cached) " >&6
19684 else case e in #(
19685   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19686 /* end confdefs.h.  */
19687 #include <stddef.h>
19688             wchar_t foo = (wchar_t)'\0';
19689 int
19690 main (void)
19691 {
19692
19693   ;
19694   return 0;
19695 }
19696 _ACEOF
19697 if ac_fn_c_try_compile "$LINENO"
19698 then :
19699   gt_cv_c_wchar_t=yes
19700 else case e in #(
19701   e) gt_cv_c_wchar_t=no ;;
19702 esac
19703 fi
19704 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19705 esac
19706 fi
19707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19708 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
19709   if test $gt_cv_c_wchar_t = yes; then
19710
19711 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
19712
19713   fi
19714
19715
19716
19717
19718
19719
19720
19721   GL_GENERATE_STDDEF_H=false
19722
19723       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
19724 printf %s "checking for good max_align_t... " >&6; }
19725 if test ${gl_cv_type_max_align_t+y}
19726 then :
19727   printf %s "(cached) " >&6
19728 else case e in #(
19729   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19730 /* end confdefs.h.  */
19731 /* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
19732                the correct alignment with the default (wrong) definition of
19733                _Alignof, but a wrong alignment as soon as we activate an
19734                ISO C compliant _Alignof definition.  */
19735             #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
19736              #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
19737             #endif
19738             #include <stddef.h>
19739             unsigned int s = sizeof (max_align_t);
19740             #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
19741             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
19742             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
19743             #endif
19744             typedef struct { char a; max_align_t b; } max_helper;
19745             typedef struct { char a; long b; } long_helper;
19746             typedef struct { char a; double b; } double_helper;
19747             typedef struct { char a; long double b; } long_double_helper;
19748             int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
19749             int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
19750             int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
19751
19752 int
19753 main (void)
19754 {
19755
19756   ;
19757   return 0;
19758 }
19759 _ACEOF
19760 if ac_fn_c_try_compile "$LINENO"
19761 then :
19762   gl_cv_type_max_align_t=yes
19763 else case e in #(
19764   e) gl_cv_type_max_align_t=no ;;
19765 esac
19766 fi
19767 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19768      ;;
19769 esac
19770 fi
19771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
19772 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
19773   if test $gl_cv_type_max_align_t = no; then
19774     HAVE_MAX_ALIGN_T=0
19775     GL_GENERATE_STDDEF_H=true
19776   fi
19777
19778   if test $gt_cv_c_wchar_t = no; then
19779     HAVE_WCHAR_T=0
19780     GL_GENERATE_STDDEF_H=true
19781   fi
19782
19783   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
19784 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
19785 if test ${gl_cv_decl_null_works+y}
19786 then :
19787   printf %s "(cached) " >&6
19788 else case e in #(
19789   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19790 /* end confdefs.h.  */
19791 #include <stddef.h>
19792       int test[2 * (sizeof NULL == sizeof (void *)) -1];
19793
19794 int
19795 main (void)
19796 {
19797
19798   ;
19799   return 0;
19800 }
19801 _ACEOF
19802 if ac_fn_c_try_compile "$LINENO"
19803 then :
19804   gl_cv_decl_null_works=yes
19805 else case e in #(
19806   e) gl_cv_decl_null_works=no ;;
19807 esac
19808 fi
19809 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19810 esac
19811 fi
19812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
19813 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
19814   if test $gl_cv_decl_null_works = no; then
19815     REPLACE_NULL=1
19816     GL_GENERATE_STDDEF_H=true
19817   fi
19818
19819   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unreachable" >&5
19820 printf %s "checking for unreachable... " >&6; }
19821 if test ${gl_cv_func_unreachable+y}
19822 then :
19823   printf %s "(cached) " >&6
19824 else case e in #(
19825   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19826 /* end confdefs.h.  */
19827 #include <stddef.h>
19828
19829 int
19830 main (void)
19831 {
19832 unreachable ();
19833
19834   ;
19835   return 0;
19836 }
19837 _ACEOF
19838 if ac_fn_c_try_link "$LINENO"
19839 then :
19840   gl_cv_func_unreachable=yes
19841 else case e in #(
19842   e) gl_cv_func_unreachable=no ;;
19843 esac
19844 fi
19845 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19846     conftest$ac_exeext conftest.$ac_ext
19847      ;;
19848 esac
19849 fi
19850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unreachable" >&5
19851 printf "%s\n" "$gl_cv_func_unreachable" >&6; }
19852   if test $gl_cv_func_unreachable = no; then
19853     GL_GENERATE_STDDEF_H=true
19854   fi
19855
19856   if $GL_GENERATE_STDDEF_H; then
19857
19858
19859
19860
19861
19862
19863
19864
19865      if test $gl_cv_have_include_next = yes; then
19866        gl_cv_next_stddef_h='<'stddef.h'>'
19867      else
19868        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
19869 printf %s "checking absolute name of <stddef.h>... " >&6; }
19870 if test ${gl_cv_next_stddef_h+y}
19871 then :
19872   printf %s "(cached) " >&6
19873 else case e in #(
19874   e)
19875
19876
19877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19878 /* end confdefs.h.  */
19879 #include <stddef.h>
19880 _ACEOF
19881                 case "$host_os" in
19882     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19883     *)    gl_absname_cpp="$ac_cpp" ;;
19884   esac
19885
19886   case "$host_os" in
19887     mingw*)
19888                                           gl_dirsep_regex='[/\\]'
19889       ;;
19890     *)
19891       gl_dirsep_regex='\/'
19892       ;;
19893   esac
19894       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19895   gl_header_literal_regex=`echo 'stddef.h' \
19896                            | sed -e "$gl_make_literal_regex_sed"`
19897   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19898       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19899       s|^/[^/]|//&|
19900       p
19901       q
19902     }'
19903
19904         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19905   sed -n "$gl_absolute_header_sed"`
19906
19907           gl_header=$gl_cv_absolute_stddef_h
19908           gl_cv_next_stddef_h='"'$gl_header'"'
19909
19910           ;;
19911 esac
19912 fi
19913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
19914 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
19915      fi
19916      NEXT_STDDEF_H=$gl_cv_next_stddef_h
19917
19918      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19919        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19920        gl_next_as_first_directive='<'stddef.h'>'
19921      else
19922        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19923        gl_next_as_first_directive=$gl_cv_next_stddef_h
19924      fi
19925      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
19926
19927
19928
19929
19930   fi
19931
19932
19933
19934
19935
19936         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
19937 printf %s "checking whether locale.h defines locale_t... " >&6; }
19938 if test ${gl_cv_header_locale_has_locale_t+y}
19939 then :
19940   printf %s "(cached) " >&6
19941 else case e in #(
19942   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19943 /* end confdefs.h.  */
19944 #include <locale.h>
19945             locale_t x;
19946 int
19947 main (void)
19948 {
19949
19950   ;
19951   return 0;
19952 }
19953 _ACEOF
19954 if ac_fn_c_try_compile "$LINENO"
19955 then :
19956   gl_cv_header_locale_has_locale_t=yes
19957 else case e in #(
19958   e) gl_cv_header_locale_has_locale_t=no ;;
19959 esac
19960 fi
19961 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19962      ;;
19963 esac
19964 fi
19965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
19966 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
19967
19968
19969   if test $ac_cv_header_xlocale_h = yes; then
19970     HAVE_XLOCALE_H=1
19971     if test $gl_cv_header_locale_has_locale_t = yes; then
19972       gl_cv_header_locale_h_needs_xlocale_h=no
19973     else
19974       gl_cv_header_locale_h_needs_xlocale_h=yes
19975     fi
19976     HAVE_LOCALE_T=1
19977   else
19978     HAVE_XLOCALE_H=0
19979     gl_cv_header_locale_h_needs_xlocale_h=no
19980     if test $gl_cv_header_locale_has_locale_t = yes; then
19981       HAVE_LOCALE_T=1
19982     else
19983       HAVE_LOCALE_T=0
19984     fi
19985   fi
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998   case "$host_os" in
19999     solaris*)
20000
20001 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
20002
20003       ;;
20004   esac
20005
20006   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
20007 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
20008 if test ${gl_cv_header_locale_h_posix2001+y}
20009 then :
20010   printf %s "(cached) " >&6
20011 else case e in #(
20012   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20013 /* end confdefs.h.  */
20014 #include <locale.h>
20015             int x = LC_MESSAGES;
20016             int y = sizeof (((struct lconv *) 0)->decimal_point);
20017 int
20018 main (void)
20019 {
20020
20021   ;
20022   return 0;
20023 }
20024 _ACEOF
20025 if ac_fn_c_try_compile "$LINENO"
20026 then :
20027   gl_cv_header_locale_h_posix2001=yes
20028 else case e in #(
20029   e) gl_cv_header_locale_h_posix2001=no ;;
20030 esac
20031 fi
20032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
20033 esac
20034 fi
20035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
20036 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
20037
20038           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
20039 printf %s "checking whether struct lconv is properly defined... " >&6; }
20040 if test ${gl_cv_sys_struct_lconv_ok+y}
20041 then :
20042   printf %s "(cached) " >&6
20043 else case e in #(
20044   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20045 /* end confdefs.h.  */
20046 #include <locale.h>
20047             struct lconv l;
20048             int x = sizeof (l.decimal_point);
20049             int y = sizeof (l.int_p_cs_precedes);
20050 int
20051 main (void)
20052 {
20053
20054   ;
20055   return 0;
20056 }
20057 _ACEOF
20058 if ac_fn_c_try_compile "$LINENO"
20059 then :
20060   gl_cv_sys_struct_lconv_ok=yes
20061 else case e in #(
20062   e) gl_cv_sys_struct_lconv_ok=no ;;
20063 esac
20064 fi
20065 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20066      ;;
20067 esac
20068 fi
20069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
20070 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
20071   if test $gl_cv_sys_struct_lconv_ok = no; then
20072             case "$host_os" in
20073       mingw*)
20074         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20075 /* end confdefs.h.  */
20076
20077 #ifdef _MSC_VER
20078  Special
20079 #endif
20080
20081 _ACEOF
20082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20083   $EGREP_TRADITIONAL "Special" >/dev/null 2>&1
20084 then :
20085
20086 else case e in #(
20087   e) REPLACE_STRUCT_LCONV=1 ;;
20088 esac
20089 fi
20090 rm -rf conftest*
20091
20092         ;;
20093       *) REPLACE_STRUCT_LCONV=1 ;;
20094     esac
20095   fi
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105      if test $gl_cv_have_include_next = yes; then
20106        gl_cv_next_locale_h='<'locale.h'>'
20107      else
20108        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
20109 printf %s "checking absolute name of <locale.h>... " >&6; }
20110 if test ${gl_cv_next_locale_h+y}
20111 then :
20112   printf %s "(cached) " >&6
20113 else case e in #(
20114   e)
20115
20116
20117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20118 /* end confdefs.h.  */
20119 #include <locale.h>
20120 _ACEOF
20121                 case "$host_os" in
20122     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20123     *)    gl_absname_cpp="$ac_cpp" ;;
20124   esac
20125
20126   case "$host_os" in
20127     mingw*)
20128                                           gl_dirsep_regex='[/\\]'
20129       ;;
20130     *)
20131       gl_dirsep_regex='\/'
20132       ;;
20133   esac
20134       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20135   gl_header_literal_regex=`echo 'locale.h' \
20136                            | sed -e "$gl_make_literal_regex_sed"`
20137   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20138       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20139       s|^/[^/]|//&|
20140       p
20141       q
20142     }'
20143
20144         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20145   sed -n "$gl_absolute_header_sed"`
20146
20147           gl_header=$gl_cv_absolute_locale_h
20148           gl_cv_next_locale_h='"'$gl_header'"'
20149
20150           ;;
20151 esac
20152 fi
20153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
20154 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
20155      fi
20156      NEXT_LOCALE_H=$gl_cv_next_locale_h
20157
20158      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20159        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20160        gl_next_as_first_directive='<'locale.h'>'
20161      else
20162        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20163        gl_next_as_first_directive=$gl_cv_next_locale_h
20164      fi
20165      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177   GL_GNULIB_LOCALECONV=0
20178
20179
20180
20181   GL_GNULIB_SETLOCALE=0
20182
20183
20184
20185   GL_GNULIB_SETLOCALE_NULL=0
20186
20187
20188
20189   GL_GNULIB_DUPLOCALE=0
20190
20191
20192
20193   GL_GNULIB_LOCALENAME=0
20194
20195
20196
20197
20198
20199   gl_threads_api=none
20200   LIBTHREAD=
20201   LTLIBTHREAD=
20202   LIBMULTITHREAD=
20203   LTLIBMULTITHREAD=
20204   if test "$gl_use_threads" != no; then
20205
20206
20207   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
20208 printf %s "checking whether imported symbols can be declared weak... " >&6; }
20209 if test ${gl_cv_have_weak+y}
20210 then :
20211   printf %s "(cached) " >&6
20212 else case e in #(
20213   e) case "$host_os" in
20214        cygwin* | mingw*)
20215                                              gl_cv_have_weak="guessing no"
20216          ;;
20217        *)
20218          gl_cv_have_weak=no
20219                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20220 /* end confdefs.h.  */
20221 extern void xyzzy ();
20222 #pragma weak xyzzy
20223 int
20224 main (void)
20225 {
20226 xyzzy();
20227   ;
20228   return 0;
20229 }
20230 _ACEOF
20231 if ac_fn_c_try_link "$LINENO"
20232 then :
20233   gl_cv_have_weak=maybe
20234 fi
20235 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20236     conftest$ac_exeext conftest.$ac_ext
20237          if test $gl_cv_have_weak = maybe; then
20238                                  if test "$cross_compiling" = yes
20239 then :
20240                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20241 /* end confdefs.h.  */
20242 #ifdef __ELF__
20243                  Extensible Linking Format
20244                  #endif
20245
20246 _ACEOF
20247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20248   $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
20249 then :
20250   gl_cv_have_weak="guessing yes"
20251 else case e in #(
20252   e) gl_cv_have_weak="guessing no" ;;
20253 esac
20254 fi
20255 rm -rf conftest*
20256
20257
20258 else case e in #(
20259   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20260 /* end confdefs.h.  */
20261
20262 #include <stdio.h>
20263 #pragma weak fputs
20264 int main ()
20265 {
20266   return (fputs == NULL);
20267 }
20268 _ACEOF
20269 if ac_fn_c_try_run "$LINENO"
20270 then :
20271   gl_cv_have_weak=yes
20272 else case e in #(
20273   e) gl_cv_have_weak=no ;;
20274 esac
20275 fi
20276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20277   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
20278 esac
20279 fi
20280
20281          fi
20282          ;;
20283      esac
20284           case " $LDFLAGS " in
20285        *" -static "*) gl_cv_have_weak=no ;;
20286      esac
20287                     case "$gl_cv_have_weak" in
20288        *yes)
20289          case "$host_os" in
20290            freebsd* | dragonfly* | midnightbsd*)
20291              : > conftest1.c
20292              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
20293              cat <<EOF > conftest2.c
20294 #include <pthread.h>
20295 #pragma weak pthread_mutexattr_gettype
20296 int main ()
20297 {
20298   return (pthread_mutexattr_gettype != NULL);
20299 }
20300 EOF
20301              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
20302                || gl_cv_have_weak=no
20303              rm -f conftest1.c libempty.so conftest2.c conftest
20304              ;;
20305          esac
20306          ;;
20307      esac
20308      ;;
20309 esac
20310 fi
20311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
20312 printf "%s\n" "$gl_cv_have_weak" >&6; }
20313   case "$gl_cv_have_weak" in
20314     *yes)
20315
20316 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
20317
20318       ;;
20319   esac
20320
20321     if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
20322
20323       :
20324     fi
20325     if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
20326
20327       gl_have_isoc_threads="$ac_cv_header_threads_h"
20328     fi
20329     if test "$gl_use_threads" = yes \
20330        || test "$gl_use_threads" = posix \
20331        || test "$gl_use_threads" = isoc+posix; then
20332
20333
20334   if test -z "$gl_pthreadlib_body_done"; then
20335     gl_pthread_api=no
20336     LIBPTHREAD=
20337     LIBPMULTITHREAD=
20338     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
20339     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
20340     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
20341 if test "x$ac_cv_header_pthread_h" = xyes
20342 then :
20343   gl_have_pthread_h=yes
20344 else case e in #(
20345   e) gl_have_pthread_h=no ;;
20346 esac
20347 fi
20348
20349     if test "$gl_have_pthread_h" = yes; then
20350       # Other possible tests:
20351       #   -lpthreads (FSU threads, PCthreads)
20352       #   -lgthreads
20353       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
20354       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
20355       # the second one only in libpthread, and lock.c needs it.
20356       #
20357       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
20358       # needs -pthread for some reason.  See:
20359       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
20360       save_LIBS=$LIBS
20361       for gl_pthread in '' '-pthread'; do
20362         LIBS="$LIBS $gl_pthread"
20363         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20364 /* end confdefs.h.  */
20365 #include <pthread.h>
20366                pthread_mutex_t m;
20367                pthread_mutexattr_t ma;
20368
20369 int
20370 main (void)
20371 {
20372 pthread_mutex_lock (&m);
20373                pthread_mutexattr_init (&ma);
20374   ;
20375   return 0;
20376 }
20377 _ACEOF
20378 if ac_fn_c_try_link "$LINENO"
20379 then :
20380   gl_pthread_api=yes
20381            LIBPTHREAD=$gl_pthread
20382            LIBPMULTITHREAD=$gl_pthread
20383 fi
20384 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20385     conftest$ac_exeext conftest.$ac_ext
20386         LIBS=$save_LIBS
20387         test $gl_pthread_api = yes && break
20388       done
20389       echo "$as_me:20389: gl_pthread_api=$gl_pthread_api" >&5
20390       echo "$as_me:20390: LIBPTHREAD=$LIBPTHREAD" >&5
20391
20392       gl_pthread_in_glibc=no
20393       # On Linux with glibc >= 2.34, libc contains the fully functional
20394       # pthread functions.
20395       case "$host_os" in
20396         linux*)
20397           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20398 /* end confdefs.h.  */
20399 #include <features.h>
20400              #ifdef __GNU_LIBRARY__
20401               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
20402                Lucky user
20403               #endif
20404              #endif
20405
20406 _ACEOF
20407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20408   $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
20409 then :
20410   gl_pthread_in_glibc=yes
20411 fi
20412 rm -rf conftest*
20413
20414           ;;
20415       esac
20416       echo "$as_me:20416: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
20417
20418       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
20419       # since it is defined as a macro on OSF/1.)
20420       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
20421         # The program links fine without libpthread. But it may actually
20422         # need to link with libpthread in order to create multiple threads.
20423         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20424 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20425 if test ${ac_cv_lib_pthread_pthread_kill+y}
20426 then :
20427   printf %s "(cached) " >&6
20428 else case e in #(
20429   e) ac_check_lib_save_LIBS=$LIBS
20430 LIBS="-lpthread  $LIBS"
20431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20432 /* end confdefs.h.  */
20433
20434 /* Override any GCC internal prototype to avoid an error.
20435    Use char because int might match the return type of a GCC
20436    builtin and then its argument prototype would still apply.
20437    The 'extern "C"' is for builds by C++ compilers;
20438    although this is not generally supported in C code supporting it here
20439    has little cost and some practical benefit (sr 110532).  */
20440 #ifdef __cplusplus
20441 extern "C"
20442 #endif
20443 char pthread_kill (void);
20444 int
20445 main (void)
20446 {
20447 return pthread_kill ();
20448   ;
20449   return 0;
20450 }
20451 _ACEOF
20452 if ac_fn_c_try_link "$LINENO"
20453 then :
20454   ac_cv_lib_pthread_pthread_kill=yes
20455 else case e in #(
20456   e) ac_cv_lib_pthread_pthread_kill=no ;;
20457 esac
20458 fi
20459 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20460     conftest$ac_exeext conftest.$ac_ext
20461 LIBS=$ac_check_lib_save_LIBS ;;
20462 esac
20463 fi
20464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20465 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20466 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20467 then :
20468   if test $gl_pthread_in_glibc = yes; then
20469              LIBPMULTITHREAD=
20470            else
20471              LIBPMULTITHREAD=-lpthread
20472              # On Solaris and HP-UX, most pthread functions exist also in libc.
20473              # Therefore pthread_in_use() needs to actually try to create a
20474              # thread: pthread_create from libc will fail, whereas
20475              # pthread_create will actually create a thread.
20476              # On Solaris 10 or newer, this test is no longer needed, because
20477              # libc contains the fully functional pthread functions.
20478              case "$host_os" in
20479                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
20480
20481 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20482
20483              esac
20484            fi
20485
20486 fi
20487
20488       elif test $gl_pthread_api != yes; then
20489         # Some library is needed. Try libpthread and libc_r.
20490         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20491 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20492 if test ${ac_cv_lib_pthread_pthread_kill+y}
20493 then :
20494   printf %s "(cached) " >&6
20495 else case e in #(
20496   e) ac_check_lib_save_LIBS=$LIBS
20497 LIBS="-lpthread  $LIBS"
20498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20499 /* end confdefs.h.  */
20500
20501 /* Override any GCC internal prototype to avoid an error.
20502    Use char because int might match the return type of a GCC
20503    builtin and then its argument prototype would still apply.
20504    The 'extern "C"' is for builds by C++ compilers;
20505    although this is not generally supported in C code supporting it here
20506    has little cost and some practical benefit (sr 110532).  */
20507 #ifdef __cplusplus
20508 extern "C"
20509 #endif
20510 char pthread_kill (void);
20511 int
20512 main (void)
20513 {
20514 return pthread_kill ();
20515   ;
20516   return 0;
20517 }
20518 _ACEOF
20519 if ac_fn_c_try_link "$LINENO"
20520 then :
20521   ac_cv_lib_pthread_pthread_kill=yes
20522 else case e in #(
20523   e) ac_cv_lib_pthread_pthread_kill=no ;;
20524 esac
20525 fi
20526 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20527     conftest$ac_exeext conftest.$ac_ext
20528 LIBS=$ac_check_lib_save_LIBS ;;
20529 esac
20530 fi
20531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20532 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20533 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20534 then :
20535   gl_pthread_api=yes
20536            LIBPTHREAD=-lpthread
20537            LIBPMULTITHREAD=-lpthread
20538 fi
20539
20540         if test $gl_pthread_api != yes; then
20541           # For FreeBSD 4.
20542           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
20543 printf %s "checking for pthread_kill in -lc_r... " >&6; }
20544 if test ${ac_cv_lib_c_r_pthread_kill+y}
20545 then :
20546   printf %s "(cached) " >&6
20547 else case e in #(
20548   e) ac_check_lib_save_LIBS=$LIBS
20549 LIBS="-lc_r  $LIBS"
20550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20551 /* end confdefs.h.  */
20552
20553 /* Override any GCC internal prototype to avoid an error.
20554    Use char because int might match the return type of a GCC
20555    builtin and then its argument prototype would still apply.
20556    The 'extern "C"' is for builds by C++ compilers;
20557    although this is not generally supported in C code supporting it here
20558    has little cost and some practical benefit (sr 110532).  */
20559 #ifdef __cplusplus
20560 extern "C"
20561 #endif
20562 char pthread_kill (void);
20563 int
20564 main (void)
20565 {
20566 return pthread_kill ();
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 if ac_fn_c_try_link "$LINENO"
20572 then :
20573   ac_cv_lib_c_r_pthread_kill=yes
20574 else case e in #(
20575   e) ac_cv_lib_c_r_pthread_kill=no ;;
20576 esac
20577 fi
20578 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20579     conftest$ac_exeext conftest.$ac_ext
20580 LIBS=$ac_check_lib_save_LIBS ;;
20581 esac
20582 fi
20583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
20584 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
20585 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
20586 then :
20587   gl_pthread_api=yes
20588              LIBPTHREAD=-lc_r
20589              LIBPMULTITHREAD=-lc_r
20590 fi
20591
20592         fi
20593       fi
20594       echo "$as_me:20594: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
20595     fi
20596     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
20597 printf %s "checking whether POSIX threads API is available... " >&6; }
20598     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
20599 printf "%s\n" "$gl_pthread_api" >&6; }
20600
20601
20602     if test $gl_pthread_api = yes; then
20603
20604 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
20605
20606     fi
20607
20608         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609 /* end confdefs.h.  */
20610 #include <sched.h>
20611 int
20612 main (void)
20613 {
20614 sched_yield ();
20615   ;
20616   return 0;
20617 }
20618 _ACEOF
20619 if ac_fn_c_try_link "$LINENO"
20620 then :
20621   SCHED_YIELD_LIB=
20622
20623 else case e in #(
20624   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
20625 printf %s "checking for sched_yield in -lrt... " >&6; }
20626 if test ${ac_cv_lib_rt_sched_yield+y}
20627 then :
20628   printf %s "(cached) " >&6
20629 else case e in #(
20630   e) ac_check_lib_save_LIBS=$LIBS
20631 LIBS="-lrt  $LIBS"
20632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20633 /* end confdefs.h.  */
20634
20635 /* Override any GCC internal prototype to avoid an error.
20636    Use char because int might match the return type of a GCC
20637    builtin and then its argument prototype would still apply.
20638    The 'extern "C"' is for builds by C++ compilers;
20639    although this is not generally supported in C code supporting it here
20640    has little cost and some practical benefit (sr 110532).  */
20641 #ifdef __cplusplus
20642 extern "C"
20643 #endif
20644 char sched_yield (void);
20645 int
20646 main (void)
20647 {
20648 return sched_yield ();
20649   ;
20650   return 0;
20651 }
20652 _ACEOF
20653 if ac_fn_c_try_link "$LINENO"
20654 then :
20655   ac_cv_lib_rt_sched_yield=yes
20656 else case e in #(
20657   e) ac_cv_lib_rt_sched_yield=no ;;
20658 esac
20659 fi
20660 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20661     conftest$ac_exeext conftest.$ac_ext
20662 LIBS=$ac_check_lib_save_LIBS ;;
20663 esac
20664 fi
20665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
20666 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
20667 if test "x$ac_cv_lib_rt_sched_yield" = xyes
20668 then :
20669   SCHED_YIELD_LIB=-lrt
20670 else case e in #(
20671   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
20672 printf %s "checking for sched_yield in -lposix4... " >&6; }
20673 if test ${ac_cv_lib_posix4_sched_yield+y}
20674 then :
20675   printf %s "(cached) " >&6
20676 else case e in #(
20677   e) ac_check_lib_save_LIBS=$LIBS
20678 LIBS="-lposix4  $LIBS"
20679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20680 /* end confdefs.h.  */
20681
20682 /* Override any GCC internal prototype to avoid an error.
20683    Use char because int might match the return type of a GCC
20684    builtin and then its argument prototype would still apply.
20685    The 'extern "C"' is for builds by C++ compilers;
20686    although this is not generally supported in C code supporting it here
20687    has little cost and some practical benefit (sr 110532).  */
20688 #ifdef __cplusplus
20689 extern "C"
20690 #endif
20691 char sched_yield (void);
20692 int
20693 main (void)
20694 {
20695 return sched_yield ();
20696   ;
20697   return 0;
20698 }
20699 _ACEOF
20700 if ac_fn_c_try_link "$LINENO"
20701 then :
20702   ac_cv_lib_posix4_sched_yield=yes
20703 else case e in #(
20704   e) ac_cv_lib_posix4_sched_yield=no ;;
20705 esac
20706 fi
20707 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20708     conftest$ac_exeext conftest.$ac_ext
20709 LIBS=$ac_check_lib_save_LIBS ;;
20710 esac
20711 fi
20712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
20713 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
20714 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
20715 then :
20716   SCHED_YIELD_LIB=-lposix4
20717 fi
20718  ;;
20719 esac
20720 fi
20721
20722        ;;
20723 esac
20724 fi
20725 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20726     conftest$ac_exeext conftest.$ac_ext
20727
20728         LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
20729
20730
20731     gl_pthreadlib_body_done=done
20732   fi
20733
20734       LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
20735       LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
20736       if test $gl_pthread_api = yes; then
20737         if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
20738           gl_threads_api='isoc+posix'
20739
20740 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
20741
20742           LIBTHREAD= LTLIBTHREAD=
20743         else
20744           gl_threads_api=posix
20745
20746 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
20747
20748           if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
20749
20750 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
20751
20752           else
20753             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
20754
20755 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
20756
20757               LIBTHREAD= LTLIBTHREAD=
20758             else
20759               case "$host_os" in
20760                 freebsd* | dragonfly* | midnightbsd*)
20761                   if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
20762
20763 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20764
20765                   fi
20766                   ;;
20767               esac
20768             fi
20769           fi
20770         fi
20771       fi
20772     fi
20773     if test $gl_threads_api = none; then
20774       if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
20775
20776
20777
20778   if test -z "$gl_stdthreadlib_body_done"; then
20779
20780
20781     case "$host_os" in
20782       mingw*)
20783         LIBSTDTHREAD=
20784         ;;
20785       *)
20786
20787
20788   if test -z "$gl_pthreadlib_body_done"; then
20789     gl_pthread_api=no
20790     LIBPTHREAD=
20791     LIBPMULTITHREAD=
20792     # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
20793     # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
20794     ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
20795 if test "x$ac_cv_header_pthread_h" = xyes
20796 then :
20797   gl_have_pthread_h=yes
20798 else case e in #(
20799   e) gl_have_pthread_h=no ;;
20800 esac
20801 fi
20802
20803     if test "$gl_have_pthread_h" = yes; then
20804       # Other possible tests:
20805       #   -lpthreads (FSU threads, PCthreads)
20806       #   -lgthreads
20807       # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
20808       # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
20809       # the second one only in libpthread, and lock.c needs it.
20810       #
20811       # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
20812       # needs -pthread for some reason.  See:
20813       # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
20814       save_LIBS=$LIBS
20815       for gl_pthread in '' '-pthread'; do
20816         LIBS="$LIBS $gl_pthread"
20817         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20818 /* end confdefs.h.  */
20819 #include <pthread.h>
20820                pthread_mutex_t m;
20821                pthread_mutexattr_t ma;
20822
20823 int
20824 main (void)
20825 {
20826 pthread_mutex_lock (&m);
20827                pthread_mutexattr_init (&ma);
20828   ;
20829   return 0;
20830 }
20831 _ACEOF
20832 if ac_fn_c_try_link "$LINENO"
20833 then :
20834   gl_pthread_api=yes
20835            LIBPTHREAD=$gl_pthread
20836            LIBPMULTITHREAD=$gl_pthread
20837 fi
20838 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20839     conftest$ac_exeext conftest.$ac_ext
20840         LIBS=$save_LIBS
20841         test $gl_pthread_api = yes && break
20842       done
20843       echo "$as_me:20843: gl_pthread_api=$gl_pthread_api" >&5
20844       echo "$as_me:20844: LIBPTHREAD=$LIBPTHREAD" >&5
20845
20846       gl_pthread_in_glibc=no
20847       # On Linux with glibc >= 2.34, libc contains the fully functional
20848       # pthread functions.
20849       case "$host_os" in
20850         linux*)
20851           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20852 /* end confdefs.h.  */
20853 #include <features.h>
20854              #ifdef __GNU_LIBRARY__
20855               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
20856                Lucky user
20857               #endif
20858              #endif
20859
20860 _ACEOF
20861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20862   $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
20863 then :
20864   gl_pthread_in_glibc=yes
20865 fi
20866 rm -rf conftest*
20867
20868           ;;
20869       esac
20870       echo "$as_me:20870: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
20871
20872       # Test for libpthread by looking for pthread_kill. (Not pthread_self,
20873       # since it is defined as a macro on OSF/1.)
20874       if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
20875         # The program links fine without libpthread. But it may actually
20876         # need to link with libpthread in order to create multiple threads.
20877         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20878 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20879 if test ${ac_cv_lib_pthread_pthread_kill+y}
20880 then :
20881   printf %s "(cached) " >&6
20882 else case e in #(
20883   e) ac_check_lib_save_LIBS=$LIBS
20884 LIBS="-lpthread  $LIBS"
20885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20886 /* end confdefs.h.  */
20887
20888 /* Override any GCC internal prototype to avoid an error.
20889    Use char because int might match the return type of a GCC
20890    builtin and then its argument prototype would still apply.
20891    The 'extern "C"' is for builds by C++ compilers;
20892    although this is not generally supported in C code supporting it here
20893    has little cost and some practical benefit (sr 110532).  */
20894 #ifdef __cplusplus
20895 extern "C"
20896 #endif
20897 char pthread_kill (void);
20898 int
20899 main (void)
20900 {
20901 return pthread_kill ();
20902   ;
20903   return 0;
20904 }
20905 _ACEOF
20906 if ac_fn_c_try_link "$LINENO"
20907 then :
20908   ac_cv_lib_pthread_pthread_kill=yes
20909 else case e in #(
20910   e) ac_cv_lib_pthread_pthread_kill=no ;;
20911 esac
20912 fi
20913 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20914     conftest$ac_exeext conftest.$ac_ext
20915 LIBS=$ac_check_lib_save_LIBS ;;
20916 esac
20917 fi
20918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20919 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20920 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20921 then :
20922   if test $gl_pthread_in_glibc = yes; then
20923              LIBPMULTITHREAD=
20924            else
20925              LIBPMULTITHREAD=-lpthread
20926              # On Solaris and HP-UX, most pthread functions exist also in libc.
20927              # Therefore pthread_in_use() needs to actually try to create a
20928              # thread: pthread_create from libc will fail, whereas
20929              # pthread_create will actually create a thread.
20930              # On Solaris 10 or newer, this test is no longer needed, because
20931              # libc contains the fully functional pthread functions.
20932              case "$host_os" in
20933                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
20934
20935 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20936
20937              esac
20938            fi
20939
20940 fi
20941
20942       elif test $gl_pthread_api != yes; then
20943         # Some library is needed. Try libpthread and libc_r.
20944         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20945 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20946 if test ${ac_cv_lib_pthread_pthread_kill+y}
20947 then :
20948   printf %s "(cached) " >&6
20949 else case e in #(
20950   e) ac_check_lib_save_LIBS=$LIBS
20951 LIBS="-lpthread  $LIBS"
20952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20953 /* end confdefs.h.  */
20954
20955 /* Override any GCC internal prototype to avoid an error.
20956    Use char because int might match the return type of a GCC
20957    builtin and then its argument prototype would still apply.
20958    The 'extern "C"' is for builds by C++ compilers;
20959    although this is not generally supported in C code supporting it here
20960    has little cost and some practical benefit (sr 110532).  */
20961 #ifdef __cplusplus
20962 extern "C"
20963 #endif
20964 char pthread_kill (void);
20965 int
20966 main (void)
20967 {
20968 return pthread_kill ();
20969   ;
20970   return 0;
20971 }
20972 _ACEOF
20973 if ac_fn_c_try_link "$LINENO"
20974 then :
20975   ac_cv_lib_pthread_pthread_kill=yes
20976 else case e in #(
20977   e) ac_cv_lib_pthread_pthread_kill=no ;;
20978 esac
20979 fi
20980 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20981     conftest$ac_exeext conftest.$ac_ext
20982 LIBS=$ac_check_lib_save_LIBS ;;
20983 esac
20984 fi
20985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20986 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20987 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20988 then :
20989   gl_pthread_api=yes
20990            LIBPTHREAD=-lpthread
20991            LIBPMULTITHREAD=-lpthread
20992 fi
20993
20994         if test $gl_pthread_api != yes; then
20995           # For FreeBSD 4.
20996           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
20997 printf %s "checking for pthread_kill in -lc_r... " >&6; }
20998 if test ${ac_cv_lib_c_r_pthread_kill+y}
20999 then :
21000   printf %s "(cached) " >&6
21001 else case e in #(
21002   e) ac_check_lib_save_LIBS=$LIBS
21003 LIBS="-lc_r  $LIBS"
21004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21005 /* end confdefs.h.  */
21006
21007 /* Override any GCC internal prototype to avoid an error.
21008    Use char because int might match the return type of a GCC
21009    builtin and then its argument prototype would still apply.
21010    The 'extern "C"' is for builds by C++ compilers;
21011    although this is not generally supported in C code supporting it here
21012    has little cost and some practical benefit (sr 110532).  */
21013 #ifdef __cplusplus
21014 extern "C"
21015 #endif
21016 char pthread_kill (void);
21017 int
21018 main (void)
21019 {
21020 return pthread_kill ();
21021   ;
21022   return 0;
21023 }
21024 _ACEOF
21025 if ac_fn_c_try_link "$LINENO"
21026 then :
21027   ac_cv_lib_c_r_pthread_kill=yes
21028 else case e in #(
21029   e) ac_cv_lib_c_r_pthread_kill=no ;;
21030 esac
21031 fi
21032 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21033     conftest$ac_exeext conftest.$ac_ext
21034 LIBS=$ac_check_lib_save_LIBS ;;
21035 esac
21036 fi
21037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
21038 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
21039 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
21040 then :
21041   gl_pthread_api=yes
21042              LIBPTHREAD=-lc_r
21043              LIBPMULTITHREAD=-lc_r
21044 fi
21045
21046         fi
21047       fi
21048       echo "$as_me:21048: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
21049     fi
21050     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
21051 printf %s "checking whether POSIX threads API is available... " >&6; }
21052     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
21053 printf "%s\n" "$gl_pthread_api" >&6; }
21054
21055
21056     if test $gl_pthread_api = yes; then
21057
21058 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
21059
21060     fi
21061
21062         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21063 /* end confdefs.h.  */
21064 #include <sched.h>
21065 int
21066 main (void)
21067 {
21068 sched_yield ();
21069   ;
21070   return 0;
21071 }
21072 _ACEOF
21073 if ac_fn_c_try_link "$LINENO"
21074 then :
21075   SCHED_YIELD_LIB=
21076
21077 else case e in #(
21078   e)        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
21079 printf %s "checking for sched_yield in -lrt... " >&6; }
21080 if test ${ac_cv_lib_rt_sched_yield+y}
21081 then :
21082   printf %s "(cached) " >&6
21083 else case e in #(
21084   e) ac_check_lib_save_LIBS=$LIBS
21085 LIBS="-lrt  $LIBS"
21086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087 /* end confdefs.h.  */
21088
21089 /* Override any GCC internal prototype to avoid an error.
21090    Use char because int might match the return type of a GCC
21091    builtin and then its argument prototype would still apply.
21092    The 'extern "C"' is for builds by C++ compilers;
21093    although this is not generally supported in C code supporting it here
21094    has little cost and some practical benefit (sr 110532).  */
21095 #ifdef __cplusplus
21096 extern "C"
21097 #endif
21098 char sched_yield (void);
21099 int
21100 main (void)
21101 {
21102 return sched_yield ();
21103   ;
21104   return 0;
21105 }
21106 _ACEOF
21107 if ac_fn_c_try_link "$LINENO"
21108 then :
21109   ac_cv_lib_rt_sched_yield=yes
21110 else case e in #(
21111   e) ac_cv_lib_rt_sched_yield=no ;;
21112 esac
21113 fi
21114 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21115     conftest$ac_exeext conftest.$ac_ext
21116 LIBS=$ac_check_lib_save_LIBS ;;
21117 esac
21118 fi
21119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
21120 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
21121 if test "x$ac_cv_lib_rt_sched_yield" = xyes
21122 then :
21123   SCHED_YIELD_LIB=-lrt
21124 else case e in #(
21125   e)           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
21126 printf %s "checking for sched_yield in -lposix4... " >&6; }
21127 if test ${ac_cv_lib_posix4_sched_yield+y}
21128 then :
21129   printf %s "(cached) " >&6
21130 else case e in #(
21131   e) ac_check_lib_save_LIBS=$LIBS
21132 LIBS="-lposix4  $LIBS"
21133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21134 /* end confdefs.h.  */
21135
21136 /* Override any GCC internal prototype to avoid an error.
21137    Use char because int might match the return type of a GCC
21138    builtin and then its argument prototype would still apply.
21139    The 'extern "C"' is for builds by C++ compilers;
21140    although this is not generally supported in C code supporting it here
21141    has little cost and some practical benefit (sr 110532).  */
21142 #ifdef __cplusplus
21143 extern "C"
21144 #endif
21145 char sched_yield (void);
21146 int
21147 main (void)
21148 {
21149 return sched_yield ();
21150   ;
21151   return 0;
21152 }
21153 _ACEOF
21154 if ac_fn_c_try_link "$LINENO"
21155 then :
21156   ac_cv_lib_posix4_sched_yield=yes
21157 else case e in #(
21158   e) ac_cv_lib_posix4_sched_yield=no ;;
21159 esac
21160 fi
21161 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21162     conftest$ac_exeext conftest.$ac_ext
21163 LIBS=$ac_check_lib_save_LIBS ;;
21164 esac
21165 fi
21166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
21167 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
21168 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
21169 then :
21170   SCHED_YIELD_LIB=-lposix4
21171 fi
21172  ;;
21173 esac
21174 fi
21175
21176        ;;
21177 esac
21178 fi
21179 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21180     conftest$ac_exeext conftest.$ac_ext
21181
21182         LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
21183
21184
21185     gl_pthreadlib_body_done=done
21186   fi
21187
21188         if test $ac_cv_header_threads_h = yes; then
21189
21190
21191   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create" >&5
21192 printf %s "checking for thrd_create... " >&6; }
21193 if test ${gl_cv_onwards_func_thrd_create+y}
21194 then :
21195   printf %s "(cached) " >&6
21196 else case e in #(
21197   e)
21198   exec 9>&6 6>/dev/null
21199
21200        case "$host_os" in
21201
21202          linux*-android*)
21203            ac_fn_check_decl "$LINENO" "thrd_create" "ac_cv_have_decl_thrd_create" "#include <threads.h>
21204 " "$ac_c_undeclared_builtin_options" "CFLAGS"
21205 if test "x$ac_cv_have_decl_thrd_create" = xyes
21206 then :
21207
21208 fi
21209            if test $ac_cv_have_decl_thrd_create = yes; then
21210              ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
21211 if test "x$ac_cv_func_thrd_create" = xyes
21212 then :
21213
21214 fi
21215
21216              if test $ac_cv_func_thrd_create = yes; then
21217                gl_cv_onwards_func_thrd_create=yes
21218              else
21219                                                             gl_cv_onwards_func_thrd_create='future OS version'
21220              fi
21221            else
21222              gl_cv_onwards_func_thrd_create='future OS version'
21223            fi
21224            ;;
21225
21226
21227          *)
21228            ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
21229 if test "x$ac_cv_func_thrd_create" = xyes
21230 then :
21231
21232 fi
21233
21234            gl_cv_onwards_func_thrd_create=$ac_cv_func_thrd_create
21235            ;;
21236
21237        esac
21238
21239   exec 6>&9 9>&-
21240
21241      ;;
21242 esac
21243 fi
21244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_thrd_create" >&5
21245 printf "%s\n" "$gl_cv_onwards_func_thrd_create" >&6; }
21246
21247   case "$gl_cv_onwards_func_thrd_create" in
21248     future*) ac_cv_func_thrd_create=no ;;
21249     *)       ac_cv_func_thrd_create=$gl_cv_onwards_func_thrd_create ;;
21250   esac
21251   if test $ac_cv_func_thrd_create = yes; then
21252
21253 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
21254
21255   fi
21256
21257
21258           if test $ac_cv_func_thrd_create = yes; then
21259             LIBSTDTHREAD=
21260           else
21261             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
21262 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
21263 if test ${ac_cv_lib_stdthreads_thrd_create+y}
21264 then :
21265   printf %s "(cached) " >&6
21266 else case e in #(
21267   e) ac_check_lib_save_LIBS=$LIBS
21268 LIBS="-lstdthreads  $LIBS"
21269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21270 /* end confdefs.h.  */
21271
21272 /* Override any GCC internal prototype to avoid an error.
21273    Use char because int might match the return type of a GCC
21274    builtin and then its argument prototype would still apply.
21275    The 'extern "C"' is for builds by C++ compilers;
21276    although this is not generally supported in C code supporting it here
21277    has little cost and some practical benefit (sr 110532).  */
21278 #ifdef __cplusplus
21279 extern "C"
21280 #endif
21281 char thrd_create (void);
21282 int
21283 main (void)
21284 {
21285 return thrd_create ();
21286   ;
21287   return 0;
21288 }
21289 _ACEOF
21290 if ac_fn_c_try_link "$LINENO"
21291 then :
21292   ac_cv_lib_stdthreads_thrd_create=yes
21293 else case e in #(
21294   e) ac_cv_lib_stdthreads_thrd_create=no ;;
21295 esac
21296 fi
21297 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21298     conftest$ac_exeext conftest.$ac_ext
21299 LIBS=$ac_check_lib_save_LIBS ;;
21300 esac
21301 fi
21302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
21303 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
21304 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
21305 then :
21306
21307               LIBSTDTHREAD='-lstdthreads -lpthread'
21308
21309 else case e in #(
21310   e)
21311                             LIBSTDTHREAD="$LIBPMULTITHREAD"
21312              ;;
21313 esac
21314 fi
21315
21316           fi
21317         else
21318                     LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
21319         fi
21320         ;;
21321     esac
21322
21323
21324     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
21325 printf %s "checking whether ISO C threads API is available... " >&6; }
21326     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
21327 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
21328     gl_stdthreadlib_body_done=done
21329   fi
21330
21331         LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
21332         LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
21333         gl_threads_api=isoc
21334
21335 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
21336
21337       fi
21338     fi
21339     if test $gl_threads_api = none; then
21340       case "$gl_use_threads" in
21341         yes | windows | win32) # The 'win32' is for backward compatibility.
21342           if { case "$host_os" in
21343                  mingw*) true;;
21344                  *) false;;
21345                esac
21346              }; then
21347             gl_threads_api=windows
21348
21349 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
21350
21351           fi
21352           ;;
21353       esac
21354     fi
21355   fi
21356   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
21357 printf %s "checking for multithread API to use... " >&6; }
21358   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
21359 printf "%s\n" "$gl_threads_api" >&6; }
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
21372 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
21373 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
21374 then :
21375   printf %s "(cached) " >&6
21376 else case e in #(
21377   e) rm -f conftest.sym conftest.file
21378      echo >conftest.file
21379      if test "$cross_compiling" = yes
21380 then :
21381   case "$host_os" in
21382           linux-* | linux)
21383             # Guess yes on Linux systems.
21384             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21385           midipix*)
21386             # Guess yes on systems that emulate the Linux system calls.
21387             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21388           *-gnu* | gnu*)
21389             # Guess yes on glibc systems.
21390             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21391           mingw*)
21392             # Guess no on native Windows.
21393             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
21394           *)
21395             # If we don't know, obey --enable-cross-guesses.
21396             gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
21397         esac
21398
21399 else case e in #(
21400   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21401 /* end confdefs.h.  */
21402 $ac_includes_default
21403 int
21404 main (void)
21405 {
21406 struct stat sbuf;
21407             if (symlink ("conftest.file", "conftest.sym") != 0)
21408               return 1;
21409             /* Linux will dereference the symlink and fail, as required by
21410                POSIX.  That is better in the sense that it means we will not
21411                have to compile and use the lstat wrapper.  */
21412             return lstat ("conftest.sym/", &sbuf) == 0;
21413
21414   ;
21415   return 0;
21416 }
21417 _ACEOF
21418 if ac_fn_c_try_run "$LINENO"
21419 then :
21420   gl_cv_func_lstat_dereferences_slashed_symlink=yes
21421 else case e in #(
21422   e) gl_cv_func_lstat_dereferences_slashed_symlink=no ;;
21423 esac
21424 fi
21425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21426   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21427 esac
21428 fi
21429
21430      rm -f conftest.sym conftest.file
21431      ;;
21432 esac
21433 fi
21434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
21435 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
21436   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21437     *yes)
21438
21439 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
21440
21441       ;;
21442   esac
21443
21444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
21445 printf %s "checking for a sed that does not truncate output... " >&6; }
21446 if test ${ac_cv_path_SED+y}
21447 then :
21448   printf %s "(cached) " >&6
21449 else case e in #(
21450   e)           ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
21451      for ac_i in 1 2 3 4 5 6 7; do
21452        ac_script="$ac_script$as_nl$ac_script"
21453      done
21454      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
21455      { ac_script=; unset ac_script;}
21456      if test -z "$SED"; then
21457   ac_path_SED_found=false
21458   # Loop through the user's path and test for each of PROGNAME-LIST
21459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460 for as_dir in $PATH
21461 do
21462   IFS=$as_save_IFS
21463   case $as_dir in #(((
21464     '') as_dir=./ ;;
21465     */) ;;
21466     *) as_dir=$as_dir/ ;;
21467   esac
21468     for ac_prog in sed gsed
21469    do
21470     for ac_exec_ext in '' $ac_executable_extensions; do
21471       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
21472       as_fn_executable_p "$ac_path_SED" || continue
21473 # Check for GNU ac_path_SED and select it if it is found.
21474   # Check for GNU $ac_path_SED
21475 case `"$ac_path_SED" --version 2>&1` in #(
21476 *GNU*)
21477   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
21478 #(
21479 *)
21480   ac_count=0
21481   printf %s 0123456789 >"conftest.in"
21482   while :
21483   do
21484     cat "conftest.in" "conftest.in" >"conftest.tmp"
21485     mv "conftest.tmp" "conftest.in"
21486     cp "conftest.in" "conftest.nl"
21487     printf "%s\n" '' >> "conftest.nl"
21488     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
21489     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
21490     as_fn_arith $ac_count + 1 && ac_count=$as_val
21491     if test $ac_count -gt ${ac_path_SED_max-0}; then
21492       # Best one so far, save it but keep looking for a better one
21493       ac_cv_path_SED="$ac_path_SED"
21494       ac_path_SED_max=$ac_count
21495     fi
21496     # 10*(2^10) chars as input seems more than enough
21497     test $ac_count -gt 10 && break
21498   done
21499   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
21500 esac
21501
21502       $ac_path_SED_found && break 3
21503     done
21504   done
21505   done
21506 IFS=$as_save_IFS
21507   if test -z "$ac_cv_path_SED"; then
21508     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
21509   fi
21510 else
21511   ac_cv_path_SED=$SED
21512 fi
21513  ;;
21514 esac
21515 fi
21516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
21517 printf "%s\n" "$ac_cv_path_SED" >&6; }
21518  SED="$ac_cv_path_SED"
21519   rm -f conftest.sed
21520
21521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
21522 printf %s "checking for grep that handles long lines and -e... " >&6; }
21523 if test ${ac_cv_path_GREP+y}
21524 then :
21525   printf %s "(cached) " >&6
21526 else case e in #(
21527   e) if test -z "$GREP"; then
21528   ac_path_GREP_found=false
21529   # Loop through the user's path and test for each of PROGNAME-LIST
21530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
21532 do
21533   IFS=$as_save_IFS
21534   case $as_dir in #(((
21535     '') as_dir=./ ;;
21536     */) ;;
21537     *) as_dir=$as_dir/ ;;
21538   esac
21539     for ac_prog in grep ggrep
21540    do
21541     for ac_exec_ext in '' $ac_executable_extensions; do
21542       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
21543       as_fn_executable_p "$ac_path_GREP" || continue
21544 # Check for GNU ac_path_GREP and select it if it is found.
21545   # Check for GNU $ac_path_GREP
21546 case `"$ac_path_GREP" --version 2>&1` in #(
21547 *GNU*)
21548   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
21549 #(
21550 *)
21551   ac_count=0
21552   printf %s 0123456789 >"conftest.in"
21553   while :
21554   do
21555     cat "conftest.in" "conftest.in" >"conftest.tmp"
21556     mv "conftest.tmp" "conftest.in"
21557     cp "conftest.in" "conftest.nl"
21558     printf "%s\n" 'GREP' >> "conftest.nl"
21559     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
21560     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
21561     as_fn_arith $ac_count + 1 && ac_count=$as_val
21562     if test $ac_count -gt ${ac_path_GREP_max-0}; then
21563       # Best one so far, save it but keep looking for a better one
21564       ac_cv_path_GREP="$ac_path_GREP"
21565       ac_path_GREP_max=$ac_count
21566     fi
21567     # 10*(2^10) chars as input seems more than enough
21568     test $ac_count -gt 10 && break
21569   done
21570   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
21571 esac
21572
21573       $ac_path_GREP_found && break 3
21574     done
21575   done
21576   done
21577 IFS=$as_save_IFS
21578   if test -z "$ac_cv_path_GREP"; then
21579     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
21580   fi
21581 else
21582   ac_cv_path_GREP=$GREP
21583 fi
21584  ;;
21585 esac
21586 fi
21587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
21588 printf "%s\n" "$ac_cv_path_GREP" >&6; }
21589  GREP="$ac_cv_path_GREP"
21590
21591
21592
21593
21594     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
21595 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
21596 if test ${ac_cv_func_malloc_0_nonnull+y}
21597 then :
21598   printf %s "(cached) " >&6
21599 else case e in #(
21600   e) if test "$cross_compiling" = yes
21601 then :
21602   case "$host_os" in
21603           # Guess yes on platforms where we know the result.
21604           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
21605           | gnu* | *-musl* | midipix* | midnightbsd* \
21606           | hpux* | solaris* | cygwin* | mingw* | msys* )
21607             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
21608           # If we don't know, obey --enable-cross-guesses.
21609           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
21610         esac
21611
21612 else case e in #(
21613   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21614 /* end confdefs.h.  */
21615 #include <stdlib.h>
21616
21617 int
21618 main (void)
21619 {
21620 void *p = malloc (0);
21621             int result = !p;
21622             free (p);
21623             return result;
21624   ;
21625   return 0;
21626 }
21627
21628 _ACEOF
21629 if ac_fn_c_try_run "$LINENO"
21630 then :
21631   ac_cv_func_malloc_0_nonnull=yes
21632 else case e in #(
21633   e) ac_cv_func_malloc_0_nonnull=no ;;
21634 esac
21635 fi
21636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21637   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21638 esac
21639 fi
21640
21641      ;;
21642 esac
21643 fi
21644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
21645 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
21646   case $ac_cv_func_malloc_0_nonnull in #(
21647   *yes) :
21648     gl_cv_func_malloc_0_nonnull=1 ;; #(
21649   *) :
21650     gl_cv_func_malloc_0_nonnull=0 ;;
21651 esac
21652
21653
21654 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665         if case "$host_os" in
21666        mingw*) true ;;
21667        *) test $ac_cv_func_mbsinit = yes ;;
21668      esac \
21669     && test $ac_cv_func_mbrtowc = yes; then
21670
21671
21672
21673
21674      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21675 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
21676 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
21677 then :
21678   printf %s "(cached) " >&6
21679 else case e in #(
21680   e)
21681                   case "$host_os" in
21682                      # Guess no on AIX and OSF/1.
21683         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21684                      # Guess yes otherwise.
21685         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21686       esac
21687       if test $LOCALE_JA != none; then
21688         if test "$cross_compiling" = yes
21689 then :
21690   :
21691 else case e in #(
21692   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21693 /* end confdefs.h.  */
21694
21695 #include <locale.h>
21696 #include <string.h>
21697 #include <wchar.h>
21698 int main ()
21699 {
21700   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21701     {
21702       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21703       mbstate_t state;
21704       wchar_t wc;
21705
21706       memset (&state, '\0', sizeof (mbstate_t));
21707       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21708         if (mbsinit (&state))
21709           return 2;
21710     }
21711   return 0;
21712 }
21713 _ACEOF
21714 if ac_fn_c_try_run "$LINENO"
21715 then :
21716   gl_cv_func_mbrtowc_incomplete_state=yes
21717 else case e in #(
21718   e) gl_cv_func_mbrtowc_incomplete_state=no ;;
21719 esac
21720 fi
21721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21722   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21723 esac
21724 fi
21725
21726       else
21727         if test $LOCALE_FR_UTF8 != none; then
21728           if test "$cross_compiling" = yes
21729 then :
21730   :
21731 else case e in #(
21732   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21733 /* end confdefs.h.  */
21734
21735 #include <locale.h>
21736 #include <string.h>
21737 #include <wchar.h>
21738 int main ()
21739 {
21740   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21741     {
21742       const char input[] = "B\303\274\303\237er"; /* "Büßer" */
21743       mbstate_t state;
21744       wchar_t wc;
21745
21746       memset (&state, '\0', sizeof (mbstate_t));
21747       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21748         if (mbsinit (&state))
21749           return 2;
21750     }
21751   return 0;
21752 }
21753 _ACEOF
21754 if ac_fn_c_try_run "$LINENO"
21755 then :
21756   gl_cv_func_mbrtowc_incomplete_state=yes
21757 else case e in #(
21758   e) gl_cv_func_mbrtowc_incomplete_state=no ;;
21759 esac
21760 fi
21761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21762   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21763 esac
21764 fi
21765
21766         fi
21767       fi
21768      ;;
21769 esac
21770 fi
21771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21772 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21773
21774
21775
21776
21777      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21778 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
21779 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
21780 then :
21781   printf %s "(cached) " >&6
21782 else case e in #(
21783   e)
21784                   case "$host_os" in
21785                     # Guess no on Solaris 8.
21786         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21787                     # Guess yes otherwise.
21788         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21789       esac
21790       if test $LOCALE_ZH_CN != none; then
21791         if test "$cross_compiling" = yes
21792 then :
21793   :
21794 else case e in #(
21795   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21796 /* end confdefs.h.  */
21797
21798 #include <locale.h>
21799 #include <stdlib.h>
21800 #include <string.h>
21801 #include <wchar.h>
21802 int main ()
21803 {
21804   /* This fails on Solaris 8:
21805      mbrtowc returns 2, and sets wc to 0x00F0.
21806      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21807   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21808     {
21809       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21810       mbstate_t state;
21811       wchar_t wc;
21812
21813       memset (&state, '\0', sizeof (mbstate_t));
21814       if (mbrtowc (&wc, input + 3, 6, &state) != 4
21815           && mbtowc (&wc, input + 3, 6) == 4)
21816         return 2;
21817     }
21818   return 0;
21819 }
21820 _ACEOF
21821 if ac_fn_c_try_run "$LINENO"
21822 then :
21823   gl_cv_func_mbrtowc_sanitycheck=yes
21824 else case e in #(
21825   e) gl_cv_func_mbrtowc_sanitycheck=no ;;
21826 esac
21827 fi
21828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21829   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21830 esac
21831 fi
21832
21833       fi
21834      ;;
21835 esac
21836 fi
21837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21838 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21839
21840     REPLACE_MBSTATE_T=0
21841     case "$gl_cv_func_mbrtowc_incomplete_state" in
21842       *yes) ;;
21843       *) REPLACE_MBSTATE_T=1 ;;
21844     esac
21845     case "$gl_cv_func_mbrtowc_sanitycheck" in
21846       *yes) ;;
21847       *) REPLACE_MBSTATE_T=1 ;;
21848     esac
21849   else
21850     REPLACE_MBSTATE_T=1
21851   fi
21852
21853
21854
21855   GL_GNULIB_EXPLICIT_BZERO=0
21856
21857
21858
21859   GL_GNULIB_FFSL=0
21860
21861
21862
21863   GL_GNULIB_FFSLL=0
21864
21865
21866
21867   GL_GNULIB_MEMCHR=0
21868
21869
21870
21871   GL_GNULIB_MEMMEM=0
21872
21873
21874
21875   GL_GNULIB_MEMPCPY=0
21876
21877
21878
21879   GL_GNULIB_MEMRCHR=0
21880
21881
21882
21883   GL_GNULIB_MEMSET_EXPLICIT=0
21884
21885
21886
21887   GL_GNULIB_RAWMEMCHR=0
21888
21889
21890
21891   GL_GNULIB_STPCPY=0
21892
21893
21894
21895   GL_GNULIB_STPNCPY=0
21896
21897
21898
21899   GL_GNULIB_STRCHRNUL=0
21900
21901
21902
21903   GL_GNULIB_STRDUP=0
21904
21905
21906
21907   GL_GNULIB_STRNCAT=0
21908
21909
21910
21911   GL_GNULIB_STRNDUP=0
21912
21913
21914
21915   GL_GNULIB_STRNLEN=0
21916
21917
21918
21919   GL_GNULIB_STRPBRK=0
21920
21921
21922
21923   GL_GNULIB_STRSEP=0
21924
21925
21926
21927   GL_GNULIB_STRSTR=0
21928
21929
21930
21931   GL_GNULIB_STRCASESTR=0
21932
21933
21934
21935   GL_GNULIB_STRTOK_R=0
21936
21937
21938
21939   GL_GNULIB_MBSLEN=0
21940
21941
21942
21943   GL_GNULIB_MBSNLEN=0
21944
21945
21946
21947   GL_GNULIB_MBSCHR=0
21948
21949
21950
21951   GL_GNULIB_MBSRCHR=0
21952
21953
21954
21955   GL_GNULIB_MBSSTR=0
21956
21957
21958
21959   GL_GNULIB_MBSCASECMP=0
21960
21961
21962
21963   GL_GNULIB_MBSNCASECMP=0
21964
21965
21966
21967   GL_GNULIB_MBSPCASECMP=0
21968
21969
21970
21971   GL_GNULIB_MBSCASESTR=0
21972
21973
21974
21975   GL_GNULIB_MBSCSPN=0
21976
21977
21978
21979   GL_GNULIB_MBSPBRK=0
21980
21981
21982
21983   GL_GNULIB_MBSSPN=0
21984
21985
21986
21987   GL_GNULIB_MBSSEP=0
21988
21989
21990
21991   GL_GNULIB_MBSTOK_R=0
21992
21993
21994
21995   GL_GNULIB_STRERROR=0
21996
21997
21998
21999   GL_GNULIB_STRERROR_R=0
22000
22001
22002
22003   GL_GNULIB_STRERRORNAME_NP=0
22004
22005
22006
22007   GL_GNULIB_SIGABBREV_NP=0
22008
22009
22010
22011   GL_GNULIB_SIGDESCR_NP=0
22012
22013
22014
22015   GL_GNULIB_STRSIGNAL=0
22016
22017
22018
22019   GL_GNULIB_STRVERSCMP=0
22020
22021
22022
22023   GL_GNULIB_MDA_MEMCCPY=1
22024
22025
22026
22027   GL_GNULIB_MDA_STRDUP=1
22028
22029
22030
22031
22032   HAVE_MBSLEN=0;
22033     HAVE_EXPLICIT_BZERO=1;
22034   HAVE_FFSL=1;
22035   HAVE_FFSLL=1;
22036   HAVE_DECL_MEMMEM=1;
22037   HAVE_MEMPCPY=1;
22038   HAVE_MEMSET_EXPLICIT=1;
22039   HAVE_DECL_MEMRCHR=1;
22040   HAVE_RAWMEMCHR=1;
22041   HAVE_STPCPY=1;
22042   HAVE_STPNCPY=1;
22043   HAVE_STRCHRNUL=1;
22044   HAVE_DECL_STRDUP=1;
22045   HAVE_DECL_STRNDUP=1;
22046   HAVE_DECL_STRNLEN=1;
22047   HAVE_STRPBRK=1;
22048   HAVE_STRSEP=1;
22049   HAVE_STRCASESTR=1;
22050   HAVE_DECL_STRTOK_R=1;
22051   HAVE_DECL_STRERROR_R=1;
22052   HAVE_STRERRORNAME_NP=1;
22053   HAVE_SIGABBREV_NP=1;
22054   HAVE_SIGDESCR_NP=1;
22055   HAVE_DECL_STRSIGNAL=1;
22056   HAVE_STRVERSCMP=1;
22057   REPLACE_FFSLL=0;
22058   REPLACE_MEMCHR=0;
22059   REPLACE_MEMMEM=0;
22060   REPLACE_MEMPCPY=0;
22061   REPLACE_STPCPY=0;
22062   REPLACE_STPNCPY=0;
22063   REPLACE_STRCHRNUL=0;
22064   REPLACE_STRDUP=0;
22065   REPLACE_STRNCAT=0;
22066   REPLACE_STRNDUP=0;
22067   REPLACE_STRNLEN=0;
22068   REPLACE_STRSTR=0;
22069   REPLACE_STRCASESTR=0;
22070   REPLACE_STRTOK_R=0;
22071   REPLACE_STRERROR=0;
22072   REPLACE_STRERROR_R=0;
22073   REPLACE_STRERRORNAME_NP=0;
22074   REPLACE_STRSIGNAL=0;
22075   UNDEFINE_STRTOK_R=0;
22076
22077
22078
22079
22080
22081   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
22082   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
22083   # irrelevant for anonymous mappings.
22084   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
22085 if test "x$ac_cv_func_mmap" = xyes
22086 then :
22087   gl_have_mmap=yes
22088 else case e in #(
22089   e) gl_have_mmap=no ;;
22090 esac
22091 fi
22092
22093
22094   # Try to allow MAP_ANONYMOUS.
22095   gl_have_mmap_anonymous=no
22096   if test $gl_have_mmap = yes; then
22097     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
22098 printf %s "checking for MAP_ANONYMOUS... " >&6; }
22099     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22100 /* end confdefs.h.  */
22101
22102 #include <sys/mman.h>
22103 #ifdef MAP_ANONYMOUS
22104     I cannot identify this map
22105 #endif
22106
22107 _ACEOF
22108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22109   $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
22110 then :
22111   gl_have_mmap_anonymous=yes
22112 fi
22113 rm -rf conftest*
22114
22115     if test $gl_have_mmap_anonymous != yes; then
22116       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22117 /* end confdefs.h.  */
22118
22119 #include <sys/mman.h>
22120 #ifdef MAP_ANON
22121     I cannot identify this map
22122 #endif
22123
22124 _ACEOF
22125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22126   $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
22127 then :
22128
22129 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
22130
22131          gl_have_mmap_anonymous=yes
22132 fi
22133 rm -rf conftest*
22134
22135     fi
22136     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
22137 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
22138     if test $gl_have_mmap_anonymous = yes; then
22139
22140 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
22141
22142     fi
22143   fi
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154   # Detect platform-specific bugs in some versions of glibc:
22155   # memchr should not dereference anything with length 0
22156   #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
22157   # memchr should not dereference overestimated length after a match
22158   #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
22159   #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
22160   # memchr should cast the second argument to 'unsigned char'.
22161   #   This bug exists in Android 4.3.
22162   # Assume that memchr works on platforms that lack mprotect.
22163   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
22164 printf %s "checking whether memchr works... " >&6; }
22165 if test ${gl_cv_func_memchr_works+y}
22166 then :
22167   printf %s "(cached) " >&6
22168 else case e in #(
22169   e) if test "$cross_compiling" = yes
22170 then :
22171   case "$host_os" in
22172                            # Guess no on Android.
22173           linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
22174                            # Guess yes on native Windows.
22175           mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
22176                            # If we don't know, obey --enable-cross-guesses.
22177           *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
22178         esac
22179
22180 else case e in #(
22181   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22182 /* end confdefs.h.  */
22183
22184 #include <string.h>
22185 #if HAVE_SYS_MMAN_H
22186 # include <fcntl.h>
22187 # include <unistd.h>
22188 # include <sys/types.h>
22189 # include <sys/mman.h>
22190 # ifndef MAP_FILE
22191 #  define MAP_FILE 0
22192 # endif
22193 #endif
22194
22195 int
22196 main (void)
22197 {
22198
22199   int result = 0;
22200   char *fence = NULL;
22201 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
22202 # if HAVE_MAP_ANONYMOUS
22203   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
22204   const int fd = -1;
22205 # else /* !HAVE_MAP_ANONYMOUS */
22206   const int flags = MAP_FILE | MAP_PRIVATE;
22207   int fd = open ("/dev/zero", O_RDONLY, 0666);
22208   if (fd >= 0)
22209 # endif
22210     {
22211       int pagesize = getpagesize ();
22212       char *two_pages =
22213         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
22214                        flags, fd, 0);
22215       if (two_pages != (char *)(-1)
22216           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
22217         fence = two_pages + pagesize;
22218     }
22219 #endif
22220   if (fence)
22221     {
22222       /* Test against bugs on glibc systems.  */
22223       if (memchr (fence, 0, 0))
22224         result |= 1;
22225       strcpy (fence - 9, "12345678");
22226       if (memchr (fence - 9, 0, 79) != fence - 1)
22227         result |= 2;
22228       if (memchr (fence - 1, 0, 3) != fence - 1)
22229         result |= 4;
22230       /* Test against bug on AIX 7.2.  */
22231       if (memchr (fence - 4, '6', 16) != fence - 4)
22232         result |= 8;
22233     }
22234   /* Test against bug on Android 4.3.  */
22235   {
22236     char input[3];
22237     input[0] = 'a';
22238     input[1] = 'b';
22239     input[2] = 'c';
22240     if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
22241       result |= 16;
22242   }
22243   return result;
22244
22245   ;
22246   return 0;
22247 }
22248 _ACEOF
22249 if ac_fn_c_try_run "$LINENO"
22250 then :
22251   gl_cv_func_memchr_works=yes
22252 else case e in #(
22253   e) gl_cv_func_memchr_works=no ;;
22254 esac
22255 fi
22256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22257   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22258 esac
22259 fi
22260
22261      ;;
22262 esac
22263 fi
22264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
22265 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
22266   case "$gl_cv_func_memchr_works" in
22267     *yes) ;;
22268     *) REPLACE_MEMCHR=1 ;;
22269   esac
22270
22271
22272
22273
22274
22275   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
22276 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
22277 if test ${gl_cv_minmax_in_limits_h+y}
22278 then :
22279   printf %s "(cached) " >&6
22280 else case e in #(
22281   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22282 /* end confdefs.h.  */
22283 #include <limits.h>
22284             int x = MIN (42, 17);
22285 int
22286 main (void)
22287 {
22288
22289   ;
22290   return 0;
22291 }
22292 _ACEOF
22293 if ac_fn_c_try_compile "$LINENO"
22294 then :
22295   gl_cv_minmax_in_limits_h=yes
22296 else case e in #(
22297   e) gl_cv_minmax_in_limits_h=no ;;
22298 esac
22299 fi
22300 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22301 esac
22302 fi
22303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
22304 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
22305   if test $gl_cv_minmax_in_limits_h = yes; then
22306
22307 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
22308
22309   fi
22310
22311
22312
22313
22314
22315
22316   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
22317 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
22318 if test ${gl_cv_minmax_in_sys_param_h+y}
22319 then :
22320   printf %s "(cached) " >&6
22321 else case e in #(
22322   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22323 /* end confdefs.h.  */
22324 #include <sys/param.h>
22325             int x = MIN (42, 17);
22326 int
22327 main (void)
22328 {
22329
22330   ;
22331   return 0;
22332 }
22333 _ACEOF
22334 if ac_fn_c_try_compile "$LINENO"
22335 then :
22336   gl_cv_minmax_in_sys_param_h=yes
22337 else case e in #(
22338   e) gl_cv_minmax_in_sys_param_h=no ;;
22339 esac
22340 fi
22341 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22342 esac
22343 fi
22344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
22345 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
22346   if test $gl_cv_minmax_in_sys_param_h = yes; then
22347
22348 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
22349
22350   fi
22351
22352
22353
22354
22355
22356
22357     HAVE_DECL_LOCALTIME_R=1;
22358   HAVE_NANOSLEEP=1;
22359   HAVE_STRPTIME=1;
22360   HAVE_TIMEGM=1;
22361   HAVE_TIMESPEC_GET=1;
22362   HAVE_TIMESPEC_GETRES=1;
22363     HAVE_TIMEZONE_T=0;
22364         REPLACE_CTIME=GNULIB_PORTCHECK;
22365   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
22366   REPLACE_MKTIME=GNULIB_PORTCHECK;
22367   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
22368   REPLACE_STRFTIME=GNULIB_PORTCHECK;
22369   REPLACE_TIME=0;
22370   REPLACE_TIMEGM=GNULIB_PORTCHECK;
22371   REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK;
22372   REPLACE_TZSET=GNULIB_PORTCHECK;
22373
22374       : ${GNULIB_GETTIMEOFDAY=0};
22375         REPLACE_GMTIME=0;
22376   REPLACE_LOCALTIME=0;
22377
22378
22379   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
22380 printf %s "checking whether time_t is signed... " >&6; }
22381 if test ${gl_cv_time_t_is_signed+y}
22382 then :
22383   printf %s "(cached) " >&6
22384 else case e in #(
22385   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h.  */
22387 #include <time.h>
22388                           char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
22389 int
22390 main (void)
22391 {
22392
22393   ;
22394   return 0;
22395 }
22396 _ACEOF
22397 if ac_fn_c_try_compile "$LINENO"
22398 then :
22399   gl_cv_time_t_is_signed=yes
22400 else case e in #(
22401   e) gl_cv_time_t_is_signed=no ;;
22402 esac
22403 fi
22404 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22405 esac
22406 fi
22407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
22408 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
22409   if test $gl_cv_time_t_is_signed = yes; then
22410
22411 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
22412
22413   fi
22414
22415 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22416 if test "x$ac_cv_have_decl_alarm" = xyes
22417 then :
22418   ac_have_decl=1
22419 else case e in #(
22420   e) ac_have_decl=0 ;;
22421 esac
22422 fi
22423 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
22424
22425
22426
22427
22428
22429
22430
22431   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22432 printf %s "checking for working mktime... " >&6; }
22433 if test ${gl_cv_func_working_mktime+y}
22434 then :
22435   printf %s "(cached) " >&6
22436 else case e in #(
22437   e) if test $APPLE_UNIVERSAL_BUILD = 1; then
22438        # A universal build on Apple Mac OS X platforms.
22439        # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22440        # But we need a configuration result that is valid in both modes.
22441        gl_cv_func_working_mktime="guessing no"
22442      else
22443        if test "$cross_compiling" = yes
22444 then :
22445   case "$host_os" in
22446                     # Guess no on native Windows.
22447             mingw*) gl_cv_func_working_mktime="guessing no" ;;
22448             *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
22449           esac
22450
22451 else case e in #(
22452   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22453 /* end confdefs.h.  */
22454 /* Test program from Paul Eggert and Tony Leneis.  */
22455 #include <limits.h>
22456 #include <stdlib.h>
22457 #include <time.h>
22458
22459 #ifdef HAVE_UNISTD_H
22460 # include <unistd.h>
22461 #endif
22462
22463 #if HAVE_DECL_ALARM
22464 # include <signal.h>
22465 #endif
22466
22467
22468
22469 $gl_mda_defines
22470
22471
22472 #ifndef TIME_T_IS_SIGNED
22473 # define TIME_T_IS_SIGNED 0
22474 #endif
22475
22476 static time_t time_t_max;
22477 static time_t time_t_min;
22478
22479 /* Values we'll use to set the TZ environment variable.  */
22480 static char *tz_strings[] = {
22481   (char *) 0, "TZ=GMT0", "TZ=JST-9",
22482   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22483 };
22484 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22485
22486 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
22487    Based on a problem report from Andreas Jaeger.  */
22488 static int
22489 spring_forward_gap ()
22490 {
22491   /* glibc (up to about 1998-10-07) failed this test. */
22492   struct tm tm;
22493
22494   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22495      instead of "TZ=America/Vancouver" in order to detect the bug even
22496      on systems that don't support the Olson extension, or don't have the
22497      full zoneinfo tables installed.  */
22498   if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
22499     return -1;
22500
22501   tm.tm_year = 98;
22502   tm.tm_mon = 3;
22503   tm.tm_mday = 5;
22504   tm.tm_hour = 2;
22505   tm.tm_min = 0;
22506   tm.tm_sec = 0;
22507   tm.tm_isdst = -1;
22508   return mktime (&tm) != (time_t) -1;
22509 }
22510
22511 static int
22512 mktime_test1 (time_t now)
22513 {
22514   struct tm *lt;
22515   return ! (lt = localtime (&now)) || mktime (lt) == now;
22516 }
22517
22518 static int
22519 mktime_test (time_t now)
22520 {
22521   return (mktime_test1 (now)
22522           && mktime_test1 ((time_t) (time_t_max - now))
22523           && mktime_test1 ((time_t) (time_t_min + now)));
22524 }
22525
22526 static int
22527 irix_6_4_bug ()
22528 {
22529   /* Based on code from Ariel Faigon.  */
22530   struct tm tm;
22531   tm.tm_year = 96;
22532   tm.tm_mon = 3;
22533   tm.tm_mday = 0;
22534   tm.tm_hour = 0;
22535   tm.tm_min = 0;
22536   tm.tm_sec = 0;
22537   tm.tm_isdst = -1;
22538   mktime (&tm);
22539   return tm.tm_mon == 2 && tm.tm_mday == 31;
22540 }
22541
22542 static int
22543 bigtime_test (int j)
22544 {
22545   struct tm tm;
22546   time_t now;
22547   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22548   now = mktime (&tm);
22549   if (now != (time_t) -1)
22550     {
22551       struct tm *lt = localtime (&now);
22552       if (! (lt
22553              && lt->tm_year == tm.tm_year
22554              && lt->tm_mon == tm.tm_mon
22555              && lt->tm_mday == tm.tm_mday
22556              && lt->tm_hour == tm.tm_hour
22557              && lt->tm_min == tm.tm_min
22558              && lt->tm_sec == tm.tm_sec
22559              && lt->tm_yday == tm.tm_yday
22560              && lt->tm_wday == tm.tm_wday
22561              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22562                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22563         return 0;
22564     }
22565   return 1;
22566 }
22567
22568 static int
22569 year_2050_test ()
22570 {
22571   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22572      ignoring leap seconds.  */
22573   unsigned long int answer = 2527315200UL;
22574
22575   struct tm tm;
22576   time_t t;
22577   tm.tm_year = 2050 - 1900;
22578   tm.tm_mon = 2 - 1;
22579   tm.tm_mday = 1;
22580   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22581   tm.tm_isdst = -1;
22582
22583   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22584      instead of "TZ=America/Vancouver" in order to detect the bug even
22585      on systems that don't support the Olson extension, or don't have the
22586      full zoneinfo tables installed.  */
22587   if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
22588     return -1;
22589
22590   t = mktime (&tm);
22591
22592   /* Check that the result is either a failure, or close enough
22593      to the correct answer that we can assume the discrepancy is
22594      due to leap seconds.  */
22595   return (t == (time_t) -1
22596           || (0 < t && answer - 120 <= t && t <= answer + 120));
22597 }
22598
22599 static int
22600 indiana_test ()
22601 {
22602   if (putenv ("TZ=America/Indiana/Indianapolis") != 0)
22603     return -1;
22604   struct tm tm;
22605   tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28;
22606   tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0;
22607   time_t std = mktime (&tm);
22608   if (! (std == 515107490 || std == 515107503))
22609     return 1;
22610
22611   /* This platform supports TZDB, either without or with leap seconds.
22612      Return true if GNU Bug#48085 is absent.  */
22613   tm.tm_isdst = 1;
22614   time_t dst = mktime (&tm);
22615   return std - dst == 60 * 60;
22616 }
22617
22618 int
22619 main ()
22620 {
22621   int result = 0;
22622   time_t t, delta;
22623   int i, j;
22624   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22625
22626 #if HAVE_DECL_ALARM
22627   /* This test makes some buggy mktime implementations loop.
22628      Give up after 60 seconds; a mktime slower than that
22629      isn't worth using anyway.  */
22630   signal (SIGALRM, SIG_DFL);
22631   alarm (60);
22632 #endif
22633
22634   time_t_max = (! TIME_T_IS_SIGNED
22635                 ? (time_t) -1
22636                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22637                    * 2 + 1));
22638   time_t_min = (! TIME_T_IS_SIGNED
22639                 ? (time_t) 0
22640                 : time_t_signed_magnitude
22641                 ? ~ (time_t) 0
22642                 : ~ time_t_max);
22643
22644   delta = time_t_max / 997; /* a suitable prime number */
22645   for (i = 0; i < N_STRINGS; i++)
22646     {
22647       if (tz_strings[i])
22648         putenv (tz_strings[i]);
22649
22650       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22651         if (! mktime_test (t))
22652           result |= 1;
22653       if ((result & 2) == 0
22654           && ! (mktime_test ((time_t) 1)
22655                 && mktime_test ((time_t) (60 * 60))
22656                 && mktime_test ((time_t) (60 * 60 * 24))))
22657         result |= 2;
22658
22659       for (j = 1; (result & 4) == 0; j <<= 1)
22660         {
22661           if (! bigtime_test (j))
22662             result |= 4;
22663           if (INT_MAX / 2 < j)
22664             break;
22665         }
22666       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22667         result |= 8;
22668     }
22669   if (! irix_6_4_bug ())
22670     result |= 16;
22671   if (! spring_forward_gap ())
22672     result |= 32;
22673   if (! year_2050_test () || ! indiana_test ())
22674     result |= 64;
22675   return result;
22676 }
22677 _ACEOF
22678 if ac_fn_c_try_run "$LINENO"
22679 then :
22680   gl_cv_func_working_mktime=yes
22681 else case e in #(
22682   e) gl_cv_func_working_mktime=no ;;
22683 esac
22684 fi
22685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22686   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22687 esac
22688 fi
22689
22690      fi
22691      ;;
22692 esac
22693 fi
22694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22695 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
22696
22697
22698
22699   GL_GNULIB_CTIME=0
22700
22701
22702
22703   GL_GNULIB_MKTIME=0
22704
22705
22706
22707   GL_GNULIB_LOCALTIME=0
22708
22709
22710
22711   GL_GNULIB_NANOSLEEP=0
22712
22713
22714
22715   GL_GNULIB_STRFTIME=0
22716
22717
22718
22719   GL_GNULIB_STRPTIME=0
22720
22721
22722
22723   GL_GNULIB_TIME=0
22724
22725
22726
22727   GL_GNULIB_TIMEGM=0
22728
22729
22730
22731   GL_GNULIB_TIMESPEC_GET=0
22732
22733
22734
22735   GL_GNULIB_TIMESPEC_GETRES=0
22736
22737
22738
22739   GL_GNULIB_TIME_R=0
22740
22741
22742
22743   GL_GNULIB_TIME_RZ=0
22744
22745
22746
22747   GL_GNULIB_TZSET=0
22748
22749
22750
22751   GL_GNULIB_MDA_TZSET=1
22752
22753
22754
22755
22756
22757
22758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22759 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22760 if test ${ac_cv_struct_tm+y}
22761 then :
22762   printf %s "(cached) " >&6
22763 else case e in #(
22764   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22765 /* end confdefs.h.  */
22766 #include <sys/types.h>
22767 #include <time.h>
22768
22769 int
22770 main (void)
22771 {
22772 struct tm tm;
22773                                      int *p = &tm.tm_sec;
22774                                      return !p;
22775   ;
22776   return 0;
22777 }
22778 _ACEOF
22779 if ac_fn_c_try_compile "$LINENO"
22780 then :
22781   ac_cv_struct_tm=time.h
22782 else case e in #(
22783   e) ac_cv_struct_tm=sys/time.h ;;
22784 esac
22785 fi
22786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22787 esac
22788 fi
22789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22790 printf "%s\n" "$ac_cv_struct_tm" >&6; }
22791 if test $ac_cv_struct_tm = sys/time.h; then
22792
22793 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
22794
22795 fi
22796
22797 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
22798 #include <$ac_cv_struct_tm>
22799
22800 "
22801 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
22802 then :
22803
22804 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
22805
22806
22807 fi
22808
22809 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22810
22811 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
22812
22813 else
22814   ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
22815 " "$ac_c_undeclared_builtin_options" "CFLAGS"
22816 if test "x$ac_cv_have_decl_tzname" = xyes
22817 then :
22818   ac_have_decl=1
22819 else case e in #(
22820   e) ac_have_decl=0 ;;
22821 esac
22822 fi
22823 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
22824
22825   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
22826 printf %s "checking for tzname... " >&6; }
22827 if test ${ac_cv_var_tzname+y}
22828 then :
22829   printf %s "(cached) " >&6
22830 else case e in #(
22831   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22832 /* end confdefs.h.  */
22833 #include <time.h>
22834 #if !HAVE_DECL_TZNAME
22835 extern char *tzname[];
22836 #endif
22837
22838 int
22839 main (void)
22840 {
22841 return tzname[0][0];
22842   ;
22843   return 0;
22844 }
22845 _ACEOF
22846 if ac_fn_c_try_link "$LINENO"
22847 then :
22848   ac_cv_var_tzname=yes
22849 else case e in #(
22850   e) ac_cv_var_tzname=no ;;
22851 esac
22852 fi
22853 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22854     conftest$ac_exeext conftest.$ac_ext ;;
22855 esac
22856 fi
22857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
22858 printf "%s\n" "$ac_cv_var_tzname" >&6; }
22859   if test $ac_cv_var_tzname = yes; then
22860
22861 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
22862
22863   fi
22864 fi
22865
22866
22867  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
22868 "
22869 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
22870 then :
22871
22872 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
22873
22874 fi
22875
22876
22877
22878   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
22879 printf %s "checking for O_CLOEXEC... " >&6; }
22880 if test ${gl_cv_macro_O_CLOEXEC+y}
22881 then :
22882   printf %s "(cached) " >&6
22883 else case e in #(
22884   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22885 /* end confdefs.h.  */
22886 #include <fcntl.h>
22887                           #ifndef O_CLOEXEC
22888                             choke me;
22889                           #endif
22890
22891 int
22892 main (void)
22893 {
22894 return O_CLOEXEC;
22895   ;
22896   return 0;
22897 }
22898 _ACEOF
22899 if ac_fn_c_try_compile "$LINENO"
22900 then :
22901   gl_cv_macro_O_CLOEXEC=yes
22902 else case e in #(
22903   e) gl_cv_macro_O_CLOEXEC=no ;;
22904 esac
22905 fi
22906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22907 esac
22908 fi
22909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
22910 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
22911
22912
22913
22914   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
22915 printf %s "checking for promoted mode_t type... " >&6; }
22916 if test ${gl_cv_promoted_mode_t+y}
22917 then :
22918   printf %s "(cached) " >&6
22919 else case e in #(
22920   e)
22921                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22922 /* end confdefs.h.  */
22923 #include <sys/types.h>
22924 int
22925 main (void)
22926 {
22927 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
22928   ;
22929   return 0;
22930 }
22931 _ACEOF
22932 if ac_fn_c_try_compile "$LINENO"
22933 then :
22934   gl_cv_promoted_mode_t='int'
22935 else case e in #(
22936   e) gl_cv_promoted_mode_t='mode_t' ;;
22937 esac
22938 fi
22939 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22940    ;;
22941 esac
22942 fi
22943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
22944 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
22945
22946 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
22947
22948
22949
22950
22951     HAVE_POSIX_SIGNALBLOCKING=1;
22952   HAVE_PTHREAD_SIGMASK=1;
22953   HAVE_RAISE=1;
22954   HAVE_SIGSET_T=1;
22955   HAVE_SIGINFO_T=1;
22956   HAVE_SIGACTION=1;
22957   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
22958
22959   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
22960
22961   HAVE_SIGHANDLER_T=1;
22962   REPLACE_PTHREAD_SIGMASK=0;
22963   REPLACE_RAISE=0;
22964
22965
22966   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
22967       #include <signal.h>
22968       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
22969       #include <sys/types.h>
22970
22971 "
22972 if test "x$ac_cv_type_sigset_t" = xyes
22973 then :
22974
22975 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
22976
22977 gl_cv_type_sigset_t=yes
22978 else case e in #(
22979   e) gl_cv_type_sigset_t=no ;;
22980 esac
22981 fi
22982
22983   if test $gl_cv_type_sigset_t != yes; then
22984     HAVE_SIGSET_T=0
22985   fi
22986
22987
22988
22989   GL_GNULIB_PTHREAD_SIGMASK=0
22990
22991
22992
22993   GL_GNULIB_RAISE=0
22994
22995
22996
22997   GL_GNULIB_SIGNAL_H_SIGPIPE=0
22998
22999
23000
23001   GL_GNULIB_SIGPROCMASK=0
23002
23003
23004
23005   GL_GNULIB_SIGACTION=0
23006
23007
23008
23009
23010
23011
23012
23013   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
23014     REPLACE_REALLOC_FOR_REALLOC_POSIX=1
23015   fi
23016
23017
23018
23019 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23020 if test "x$ac_cv_have_decl_setenv" = xyes
23021 then :
23022   ac_have_decl=1
23023 else case e in #(
23024   e) ac_have_decl=0 ;;
23025 esac
23026 fi
23027 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
23028
23029
23030
23031
23032
23033   if test $ac_cv_have_decl_setenv = no; then
23034     HAVE_DECL_SETENV=0
23035   fi
23036
23037
23038
23039
23040
23041   ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
23042 if test "x$ac_cv_header_search_h" = xyes
23043 then :
23044   printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
23045
23046 fi
23047
23048
23049
23050   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tsearch" >&5
23051 printf %s "checking for tsearch... " >&6; }
23052 if test ${gl_cv_onwards_func_tsearch+y}
23053 then :
23054   printf %s "(cached) " >&6
23055 else case e in #(
23056   e)
23057   exec 9>&6 6>/dev/null
23058
23059        case "$host_os" in
23060
23061          linux*-android*)
23062            ac_fn_check_decl "$LINENO" "tsearch" "ac_cv_have_decl_tsearch" "#include <search.h>
23063 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23064 if test "x$ac_cv_have_decl_tsearch" = xyes
23065 then :
23066
23067 fi
23068            if test $ac_cv_have_decl_tsearch = yes; then
23069              ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
23070 if test "x$ac_cv_func_tsearch" = xyes
23071 then :
23072
23073 fi
23074
23075              if test $ac_cv_func_tsearch = yes; then
23076                gl_cv_onwards_func_tsearch=yes
23077              else
23078                                                             gl_cv_onwards_func_tsearch='future OS version'
23079              fi
23080            else
23081              gl_cv_onwards_func_tsearch='future OS version'
23082            fi
23083            ;;
23084
23085
23086          *)
23087            ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
23088 if test "x$ac_cv_func_tsearch" = xyes
23089 then :
23090
23091 fi
23092
23093            gl_cv_onwards_func_tsearch=$ac_cv_func_tsearch
23094            ;;
23095
23096        esac
23097
23098   exec 6>&9 9>&-
23099
23100      ;;
23101 esac
23102 fi
23103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_tsearch" >&5
23104 printf "%s\n" "$gl_cv_onwards_func_tsearch" >&6; }
23105
23106   case "$gl_cv_onwards_func_tsearch" in
23107     future*) ac_cv_func_tsearch=no ;;
23108     *)       ac_cv_func_tsearch=$gl_cv_onwards_func_tsearch ;;
23109   esac
23110   if test $ac_cv_func_tsearch = yes; then
23111
23112 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
23113
23114   fi
23115
23116
23117
23118
23119 ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
23120 if test "x$ac_cv_type_uid_t" = xyes
23121 then :
23122
23123 else case e in #(
23124   e)
23125 printf "%s\n" "#define uid_t int" >>confdefs.h
23126  ;;
23127 esac
23128 fi
23129
23130 ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
23131 if test "x$ac_cv_type_gid_t" = xyes
23132 then :
23133
23134 else case e in #(
23135   e)
23136 printf "%s\n" "#define gid_t int" >>confdefs.h
23137  ;;
23138 esac
23139 fi
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152      if test $gl_cv_have_include_next = yes; then
23153        gl_cv_next_signal_h='<'signal.h'>'
23154      else
23155        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23156 printf %s "checking absolute name of <signal.h>... " >&6; }
23157 if test ${gl_cv_next_signal_h+y}
23158 then :
23159   printf %s "(cached) " >&6
23160 else case e in #(
23161   e)
23162
23163
23164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23165 /* end confdefs.h.  */
23166 #include <signal.h>
23167 _ACEOF
23168                 case "$host_os" in
23169     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23170     *)    gl_absname_cpp="$ac_cpp" ;;
23171   esac
23172
23173   case "$host_os" in
23174     mingw*)
23175                                           gl_dirsep_regex='[/\\]'
23176       ;;
23177     *)
23178       gl_dirsep_regex='\/'
23179       ;;
23180   esac
23181       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23182   gl_header_literal_regex=`echo 'signal.h' \
23183                            | sed -e "$gl_make_literal_regex_sed"`
23184   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23185       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23186       s|^/[^/]|//&|
23187       p
23188       q
23189     }'
23190
23191         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23192   sed -n "$gl_absolute_header_sed"`
23193
23194           gl_header=$gl_cv_absolute_signal_h
23195           gl_cv_next_signal_h='"'$gl_header'"'
23196
23197           ;;
23198 esac
23199 fi
23200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23201 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
23202      fi
23203      NEXT_SIGNAL_H=$gl_cv_next_signal_h
23204
23205      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23206        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23207        gl_next_as_first_directive='<'signal.h'>'
23208      else
23209        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23210        gl_next_as_first_directive=$gl_cv_next_signal_h
23211      fi
23212      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23213
23214
23215
23216
23217
23218 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
23219 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
23220   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23221 #include <signal.h>
23222
23223 "
23224 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
23225 then :
23226
23227 else case e in #(
23228   e) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 ;;
23229 esac
23230 fi
23231
23232
23233
23234
23235
23236
23237
23238   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23239 #include <signal.h>
23240
23241 "
23242 if test "x$ac_cv_type_sighandler_t" = xyes
23243 then :
23244
23245 else case e in #(
23246   e) HAVE_SIGHANDLER_T=0 ;;
23247 esac
23248 fi
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259   case "$host_os" in
23260     *-musl* | midipix*)
23261
23262 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
23263
23264       ;;
23265   esac
23266
23267
23268
23269
23270
23271
23272
23273
23274 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23275 if test "x$ac_cv_have_decl_fcloseall" = xyes
23276 then :
23277   ac_have_decl=1
23278 else case e in #(
23279   e) ac_have_decl=0 ;;
23280 esac
23281 fi
23282 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
23283
23284 ac_fn_check_decl "$LINENO" "getw" "ac_cv_have_decl_getw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23285 if test "x$ac_cv_have_decl_getw" = xyes
23286 then :
23287   ac_have_decl=1
23288 else case e in #(
23289   e) ac_have_decl=0 ;;
23290 esac
23291 fi
23292 printf "%s\n" "#define HAVE_DECL_GETW $ac_have_decl" >>confdefs.h
23293
23294 ac_fn_check_decl "$LINENO" "putw" "ac_cv_have_decl_putw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23295 if test "x$ac_cv_have_decl_putw" = xyes
23296 then :
23297   ac_have_decl=1
23298 else case e in #(
23299   e) ac_have_decl=0 ;;
23300 esac
23301 fi
23302 printf "%s\n" "#define HAVE_DECL_PUTW $ac_have_decl" >>confdefs.h
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314      if test $gl_cv_have_include_next = yes; then
23315        gl_cv_next_stdio_h='<'stdio.h'>'
23316      else
23317        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23318 printf %s "checking absolute name of <stdio.h>... " >&6; }
23319 if test ${gl_cv_next_stdio_h+y}
23320 then :
23321   printf %s "(cached) " >&6
23322 else case e in #(
23323   e)
23324
23325
23326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23327 /* end confdefs.h.  */
23328 #include <stdio.h>
23329 _ACEOF
23330                 case "$host_os" in
23331     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23332     *)    gl_absname_cpp="$ac_cpp" ;;
23333   esac
23334
23335   case "$host_os" in
23336     mingw*)
23337                                           gl_dirsep_regex='[/\\]'
23338       ;;
23339     *)
23340       gl_dirsep_regex='\/'
23341       ;;
23342   esac
23343       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23344   gl_header_literal_regex=`echo 'stdio.h' \
23345                            | sed -e "$gl_make_literal_regex_sed"`
23346   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23347       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23348       s|^/[^/]|//&|
23349       p
23350       q
23351     }'
23352
23353         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23354   sed -n "$gl_absolute_header_sed"`
23355
23356           gl_header=$gl_cv_absolute_stdio_h
23357           gl_cv_next_stdio_h='"'$gl_header'"'
23358
23359           ;;
23360 esac
23361 fi
23362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23363 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
23364      fi
23365      NEXT_STDIO_H=$gl_cv_next_stdio_h
23366
23367      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23368        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23369        gl_next_as_first_directive='<'stdio.h'>'
23370      else
23371        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23372        gl_next_as_first_directive=$gl_cv_next_stdio_h
23373      fi
23374      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23375
23376
23377
23378
23379
23380         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
23381 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
23382 if test ${gl_cv_func_printf_attribute_flavor+y}
23383 then :
23384   printf %s "(cached) " >&6
23385 else case e in #(
23386   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23387 /* end confdefs.h.  */
23388
23389        #define __STDC_FORMAT_MACROS 1
23390        #include <stdio.h>
23391        #include <inttypes.h>
23392        /* For non-mingw systems, compilation will trivially succeed.
23393           For mingw, compilation will succeed for older mingw (system
23394           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
23395        #if (defined _WIN32 && ! defined __CYGWIN__) && \
23396          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
23397        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
23398        #endif
23399
23400 int
23401 main (void)
23402 {
23403
23404   ;
23405   return 0;
23406 }
23407 _ACEOF
23408 if ac_fn_c_try_compile "$LINENO"
23409 then :
23410   gl_cv_func_printf_attribute_flavor=system
23411 else case e in #(
23412   e) gl_cv_func_printf_attribute_flavor=gnu ;;
23413 esac
23414 fi
23415 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23416 esac
23417 fi
23418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
23419 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
23420   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
23421
23422 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
23423
23424   fi
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440   if test $ac_cv_have_decl_fcloseall = no; then
23441     HAVE_DECL_FCLOSEALL=0
23442   fi
23443
23444
23445   if test $ac_cv_have_decl_getw = no; then
23446     HAVE_DECL_GETW=0
23447   fi
23448
23449
23450   if test $ac_cv_have_decl_putw = no; then
23451     HAVE_DECL_PUTW=0
23452   fi
23453
23454 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23455 if test "x$ac_cv_have_decl_ecvt" = xyes
23456 then :
23457   ac_have_decl=1
23458 else case e in #(
23459   e) ac_have_decl=0 ;;
23460 esac
23461 fi
23462 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
23463
23464 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23465 if test "x$ac_cv_have_decl_fcvt" = xyes
23466 then :
23467   ac_have_decl=1
23468 else case e in #(
23469   e) ac_have_decl=0 ;;
23470 esac
23471 fi
23472 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
23473
23474 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23475 if test "x$ac_cv_have_decl_gcvt" = xyes
23476 then :
23477   ac_have_decl=1
23478 else case e in #(
23479   e) ac_have_decl=0 ;;
23480 esac
23481 fi
23482 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494      if test $gl_cv_have_include_next = yes; then
23495        gl_cv_next_stdlib_h='<'stdlib.h'>'
23496      else
23497        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23498 printf %s "checking absolute name of <stdlib.h>... " >&6; }
23499 if test ${gl_cv_next_stdlib_h+y}
23500 then :
23501   printf %s "(cached) " >&6
23502 else case e in #(
23503   e)
23504
23505
23506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23507 /* end confdefs.h.  */
23508 #include <stdlib.h>
23509 _ACEOF
23510                 case "$host_os" in
23511     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23512     *)    gl_absname_cpp="$ac_cpp" ;;
23513   esac
23514
23515   case "$host_os" in
23516     mingw*)
23517                                           gl_dirsep_regex='[/\\]'
23518       ;;
23519     *)
23520       gl_dirsep_regex='\/'
23521       ;;
23522   esac
23523       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23524   gl_header_literal_regex=`echo 'stdlib.h' \
23525                            | sed -e "$gl_make_literal_regex_sed"`
23526   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23527       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23528       s|^/[^/]|//&|
23529       p
23530       q
23531     }'
23532
23533         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23534   sed -n "$gl_absolute_header_sed"`
23535
23536           gl_header=$gl_cv_absolute_stdlib_h
23537           gl_cv_next_stdlib_h='"'$gl_header'"'
23538
23539           ;;
23540 esac
23541 fi
23542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23543 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
23544      fi
23545      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23546
23547      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23548        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23549        gl_next_as_first_directive='<'stdlib.h'>'
23550      else
23551        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23552        gl_next_as_first_directive=$gl_cv_next_stdlib_h
23553      fi
23554      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MB_CUR_MAX is correct" >&5
23569 printf %s "checking whether MB_CUR_MAX is correct... " >&6; }
23570 if test ${gl_cv_macro_MB_CUR_MAX_good+y}
23571 then :
23572   printf %s "(cached) " >&6
23573 else case e in #(
23574   e)
23575                   case "$host_os" in
23576                   # Guess no on Solaris.
23577         solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
23578                   # Guess yes otherwise.
23579         *)        gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
23580       esac
23581       if test $LOCALE_FR_UTF8 != none; then
23582         if test "$cross_compiling" = yes
23583 then :
23584   :
23585 else case e in #(
23586   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23587 /* end confdefs.h.  */
23588
23589 #include <locale.h>
23590 #include <stdlib.h>
23591 int main ()
23592 {
23593   int result = 0;
23594   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23595     {
23596       if (MB_CUR_MAX < 4)
23597         result |= 1;
23598     }
23599   return result;
23600 }
23601 _ACEOF
23602 if ac_fn_c_try_run "$LINENO"
23603 then :
23604   gl_cv_macro_MB_CUR_MAX_good=yes
23605 else case e in #(
23606   e) gl_cv_macro_MB_CUR_MAX_good=no ;;
23607 esac
23608 fi
23609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23610   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23611 esac
23612 fi
23613
23614       fi
23615      ;;
23616 esac
23617 fi
23618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_MB_CUR_MAX_good" >&5
23619 printf "%s\n" "$gl_cv_macro_MB_CUR_MAX_good" >&6; }
23620   case "$gl_cv_macro_MB_CUR_MAX_good" in
23621     *yes) ;;
23622     *) REPLACE_MB_CUR_MAX=1 ;;
23623   esac
23624
23625
23626   if test $ac_cv_have_decl_ecvt = no; then
23627     HAVE_DECL_ECVT=0
23628   fi
23629
23630   if test $ac_cv_have_decl_fcvt = no; then
23631     HAVE_DECL_FCVT=0
23632   fi
23633
23634   if test $ac_cv_have_decl_gcvt = no; then
23635     HAVE_DECL_GCVT=0
23636   fi
23637
23638
23639     HAVE_FFS=1;
23640   HAVE_STRCASECMP=1;
23641   HAVE_DECL_STRNCASECMP=1;
23642
23643
23644      REPLACE_STRERROR_0=0
23645   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
23646 printf %s "checking whether strerror(0) succeeds... " >&6; }
23647 if test ${gl_cv_func_strerror_0_works+y}
23648 then :
23649   printf %s "(cached) " >&6
23650 else case e in #(
23651   e) if test "$cross_compiling" = yes
23652 then :
23653   case "$host_os" in
23654                              # Guess yes on glibc systems.
23655          *-gnu* | gnu*)      gl_cv_func_strerror_0_works="guessing yes" ;;
23656                              # Guess yes on musl systems.
23657          *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
23658                              # Guess yes on native Windows.
23659          mingw*)             gl_cv_func_strerror_0_works="guessing yes" ;;
23660                              # If we don't know, obey --enable-cross-guesses.
23661          *)                  gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
23662        esac
23663
23664 else case e in #(
23665   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23666 /* end confdefs.h.  */
23667 #include <string.h>
23668            #include <errno.h>
23669
23670 int
23671 main (void)
23672 {
23673 int result = 0;
23674            char *str;
23675            errno = 0;
23676            str = strerror (0);
23677            if (!*str) result |= 1;
23678            if (errno) result |= 2;
23679            if (strstr (str, "nknown") || strstr (str, "ndefined"))
23680              result |= 4;
23681            return result;
23682   ;
23683   return 0;
23684 }
23685 _ACEOF
23686 if ac_fn_c_try_run "$LINENO"
23687 then :
23688   gl_cv_func_strerror_0_works=yes
23689 else case e in #(
23690   e) gl_cv_func_strerror_0_works=no ;;
23691 esac
23692 fi
23693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23694   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23695 esac
23696 fi
23697
23698    ;;
23699 esac
23700 fi
23701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
23702 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
23703   case "$gl_cv_func_strerror_0_works" in
23704     *yes) ;;
23705     *)
23706       REPLACE_STRERROR_0=1
23707
23708 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
23709
23710       ;;
23711   esac
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r" >&5
23724 printf %s "checking for strerror_r... " >&6; }
23725 if test ${gl_cv_onwards_func_strerror_r+y}
23726 then :
23727   printf %s "(cached) " >&6
23728 else case e in #(
23729   e)
23730   exec 9>&6 6>/dev/null
23731
23732        case "$host_os" in
23733
23734          linux*-android*)
23735            ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "#include <string.h>
23736 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23737 if test "x$ac_cv_have_decl_strerror_r" = xyes
23738 then :
23739
23740 fi
23741            if test $ac_cv_have_decl_strerror_r = yes; then
23742              ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
23743 if test "x$ac_cv_func_strerror_r" = xyes
23744 then :
23745
23746 fi
23747
23748              if test $ac_cv_func_strerror_r = yes; then
23749                gl_cv_onwards_func_strerror_r=yes
23750              else
23751                                                             gl_cv_onwards_func_strerror_r='future OS version'
23752              fi
23753            else
23754              gl_cv_onwards_func_strerror_r='future OS version'
23755            fi
23756            ;;
23757
23758
23759          *)
23760            ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
23761 if test "x$ac_cv_func_strerror_r" = xyes
23762 then :
23763
23764 fi
23765
23766            gl_cv_onwards_func_strerror_r=$ac_cv_func_strerror_r
23767            ;;
23768
23769        esac
23770
23771   exec 6>&9 9>&-
23772
23773      ;;
23774 esac
23775 fi
23776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_strerror_r" >&5
23777 printf "%s\n" "$gl_cv_onwards_func_strerror_r" >&6; }
23778
23779   case "$gl_cv_onwards_func_strerror_r" in
23780     future*) ac_cv_func_strerror_r=no ;;
23781     *)       ac_cv_func_strerror_r=$gl_cv_onwards_func_strerror_r ;;
23782   esac
23783   if test $ac_cv_func_strerror_r = yes; then
23784
23785 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
23786
23787   fi
23788
23789
23790   if test $ac_cv_func_strerror_r = yes; then
23791     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
23792                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
23793 printf %s "checking for strerror_r with POSIX signature... " >&6; }
23794 if test ${gl_cv_func_strerror_r_posix_signature+y}
23795 then :
23796   printf %s "(cached) " >&6
23797 else case e in #(
23798   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23799 /* end confdefs.h.  */
23800 #include <string.h>
23801                 int strerror_r (int, char *, size_t);
23802
23803 int
23804 main (void)
23805 {
23806
23807   ;
23808   return 0;
23809 }
23810 _ACEOF
23811 if ac_fn_c_try_compile "$LINENO"
23812 then :
23813   gl_cv_func_strerror_r_posix_signature=yes
23814 else case e in #(
23815   e) gl_cv_func_strerror_r_posix_signature=no ;;
23816 esac
23817 fi
23818 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23819          ;;
23820 esac
23821 fi
23822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
23823 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
23824       if test $gl_cv_func_strerror_r_posix_signature = yes; then
23825                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
23826 printf %s "checking whether strerror_r works... " >&6; }
23827 if test ${gl_cv_func_strerror_r_works+y}
23828 then :
23829   printf %s "(cached) " >&6
23830 else case e in #(
23831   e) if test "$cross_compiling" = yes
23832 then :
23833
23834               case "$host_os" in
23835                        # Guess no on AIX.
23836                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
23837                        # Guess no on HP-UX.
23838                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
23839                        # Guess no on BSD variants.
23840                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
23841                        # Guess yes otherwise.
23842                 *)     gl_cv_func_strerror_r_works="guessing yes";;
23843               esac
23844
23845 else case e in #(
23846   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23847 /* end confdefs.h.  */
23848 #include <errno.h>
23849                   #include <string.h>
23850
23851 int
23852 main (void)
23853 {
23854 int result = 0;
23855                   char buf[79];
23856                   if (strerror_r (EACCES, buf, 0) < 0)
23857                     result |= 1;
23858                   errno = 0;
23859                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
23860                     result |= 2;
23861                   strcpy (buf, "Unknown");
23862                   if (strerror_r (0, buf, sizeof buf) != 0)
23863                     result |= 4;
23864                   if (errno)
23865                     result |= 8;
23866                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
23867                     result |= 0x10;
23868                   errno = 0;
23869                   *buf = 0;
23870                   if (strerror_r (-3, buf, sizeof buf) < 0)
23871                     result |= 0x20;
23872                   if (errno)
23873                     result |= 0x40;
23874                   if (!*buf)
23875                     result |= 0x80;
23876                   return result;
23877
23878   ;
23879   return 0;
23880 }
23881 _ACEOF
23882 if ac_fn_c_try_run "$LINENO"
23883 then :
23884   gl_cv_func_strerror_r_works=yes
23885 else case e in #(
23886   e) gl_cv_func_strerror_r_works=no ;;
23887 esac
23888 fi
23889 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23890   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23891 esac
23892 fi
23893
23894            ;;
23895 esac
23896 fi
23897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
23898 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
23899       else
23900
23901                         if test $ac_cv_func___xpg_strerror_r = yes; then
23902           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
23903 printf %s "checking whether __xpg_strerror_r works... " >&6; }
23904 if test ${gl_cv_func_strerror_r_works+y}
23905 then :
23906   printf %s "(cached) " >&6
23907 else case e in #(
23908   e) if test "$cross_compiling" = yes
23909 then :
23910                                   gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
23911
23912 else case e in #(
23913   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23914 /* end confdefs.h.  */
23915 #include <errno.h>
23916                     #include <string.h>
23917                     extern
23918                     #ifdef __cplusplus
23919                     "C"
23920                     #endif
23921                     int __xpg_strerror_r(int, char *, size_t);
23922
23923 int
23924 main (void)
23925 {
23926 int result = 0;
23927                     char buf[256] = "^";
23928                     char copy[256];
23929                     char *str = strerror (-1);
23930                     strcpy (copy, str);
23931                     if (__xpg_strerror_r (-2, buf, 1) == 0)
23932                       result |= 1;
23933                     if (*buf)
23934                       result |= 2;
23935                     __xpg_strerror_r (-2, buf, 256);
23936                     if (strcmp (str, copy))
23937                       result |= 4;
23938                     return result;
23939
23940   ;
23941   return 0;
23942 }
23943 _ACEOF
23944 if ac_fn_c_try_run "$LINENO"
23945 then :
23946   gl_cv_func_strerror_r_works=yes
23947 else case e in #(
23948   e) gl_cv_func_strerror_r_works=no ;;
23949 esac
23950 fi
23951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23952   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23953 esac
23954 fi
23955
23956              ;;
23957 esac
23958 fi
23959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
23960 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
23961         fi
23962       fi
23963     fi
23964   else
23965     case "$gl_cv_onwards_func_strerror_r" in
23966       future*) REPLACE_STRERROR_R=1 ;;
23967     esac
23968   fi
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980      if test $gl_cv_have_include_next = yes; then
23981        gl_cv_next_string_h='<'string.h'>'
23982      else
23983        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
23984 printf %s "checking absolute name of <string.h>... " >&6; }
23985 if test ${gl_cv_next_string_h+y}
23986 then :
23987   printf %s "(cached) " >&6
23988 else case e in #(
23989   e)
23990
23991
23992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23993 /* end confdefs.h.  */
23994 #include <string.h>
23995 _ACEOF
23996                 case "$host_os" in
23997     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23998     *)    gl_absname_cpp="$ac_cpp" ;;
23999   esac
24000
24001   case "$host_os" in
24002     mingw*)
24003                                           gl_dirsep_regex='[/\\]'
24004       ;;
24005     *)
24006       gl_dirsep_regex='\/'
24007       ;;
24008   esac
24009       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24010   gl_header_literal_regex=`echo 'string.h' \
24011                            | sed -e "$gl_make_literal_regex_sed"`
24012   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24013       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24014       s|^/[^/]|//&|
24015       p
24016       q
24017     }'
24018
24019         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24020   sed -n "$gl_absolute_header_sed"`
24021
24022           gl_header=$gl_cv_absolute_string_h
24023           gl_cv_next_string_h='"'$gl_header'"'
24024
24025           ;;
24026 esac
24027 fi
24028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
24029 printf "%s\n" "$gl_cv_next_string_h" >&6; }
24030      fi
24031      NEXT_STRING_H=$gl_cv_next_string_h
24032
24033      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24034        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24035        gl_next_as_first_directive='<'string.h'>'
24036      else
24037        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24038        gl_next_as_first_directive=$gl_cv_next_string_h
24039      fi
24040      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064      if test $gl_cv_have_include_next = yes; then
24065        gl_cv_next_strings_h='<'strings.h'>'
24066      else
24067        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
24068 printf %s "checking absolute name of <strings.h>... " >&6; }
24069 if test ${gl_cv_next_strings_h+y}
24070 then :
24071   printf %s "(cached) " >&6
24072 else case e in #(
24073   e)
24074              if test $ac_cv_header_strings_h = yes; then
24075
24076
24077
24078
24079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24080 /* end confdefs.h.  */
24081 #include <strings.h>
24082 _ACEOF
24083                 case "$host_os" in
24084     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24085     *)    gl_absname_cpp="$ac_cpp" ;;
24086   esac
24087
24088   case "$host_os" in
24089     mingw*)
24090                                           gl_dirsep_regex='[/\\]'
24091       ;;
24092     *)
24093       gl_dirsep_regex='\/'
24094       ;;
24095   esac
24096       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24097   gl_header_literal_regex=`echo 'strings.h' \
24098                            | sed -e "$gl_make_literal_regex_sed"`
24099   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24100       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24101       s|^/[^/]|//&|
24102       p
24103       q
24104     }'
24105
24106         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24107   sed -n "$gl_absolute_header_sed"`
24108
24109           gl_header=$gl_cv_absolute_strings_h
24110           gl_cv_next_strings_h='"'$gl_header'"'
24111           else
24112                gl_cv_next_strings_h='<'strings.h'>'
24113              fi
24114
24115           ;;
24116 esac
24117 fi
24118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
24119 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
24120      fi
24121      NEXT_STRINGS_H=$gl_cv_next_strings_h
24122
24123      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24124        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24125        gl_next_as_first_directive='<'strings.h'>'
24126      else
24127        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24128        gl_next_as_first_directive=$gl_cv_next_strings_h
24129      fi
24130      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
24131
24132
24133
24134
24135   if test $ac_cv_header_strings_h = yes; then
24136     HAVE_STRINGS_H=1
24137   else
24138     HAVE_STRINGS_H=0
24139   fi
24140
24141
24142
24143
24144
24145
24146
24147
24148   GL_GNULIB_FFS=0
24149
24150
24151
24152 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24153 if test "x$ac_cv_have_decl_strnlen" = xyes
24154 then :
24155   ac_have_decl=1
24156 else case e in #(
24157   e) ac_have_decl=0 ;;
24158 esac
24159 fi
24160 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
24161
24162
24163
24164 ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24165 if test "x$ac_cv_have_decl_strtoimax" = xyes
24166 then :
24167   ac_have_decl=1
24168 else case e in #(
24169   e) ac_have_decl=0 ;;
24170 esac
24171 fi
24172 printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186      if test $gl_cv_have_include_next = yes; then
24187        gl_cv_next_sys_random_h='<'sys/random.h'>'
24188      else
24189        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
24190 printf %s "checking absolute name of <sys/random.h>... " >&6; }
24191 if test ${gl_cv_next_sys_random_h+y}
24192 then :
24193   printf %s "(cached) " >&6
24194 else case e in #(
24195   e)
24196              if test $ac_cv_header_sys_random_h = yes; then
24197
24198
24199
24200
24201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24202 /* end confdefs.h.  */
24203 #include <sys/random.h>
24204 _ACEOF
24205                 case "$host_os" in
24206     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24207     *)    gl_absname_cpp="$ac_cpp" ;;
24208   esac
24209
24210   case "$host_os" in
24211     mingw*)
24212                                           gl_dirsep_regex='[/\\]'
24213       ;;
24214     *)
24215       gl_dirsep_regex='\/'
24216       ;;
24217   esac
24218       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24219   gl_header_literal_regex=`echo 'sys/random.h' \
24220                            | sed -e "$gl_make_literal_regex_sed"`
24221   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24222       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24223       s|^/[^/]|//&|
24224       p
24225       q
24226     }'
24227
24228         gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24229   sed -n "$gl_absolute_header_sed"`
24230
24231           gl_header=$gl_cv_absolute_sys_random_h
24232           gl_cv_next_sys_random_h='"'$gl_header'"'
24233           else
24234                gl_cv_next_sys_random_h='<'sys/random.h'>'
24235              fi
24236
24237           ;;
24238 esac
24239 fi
24240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
24241 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
24242      fi
24243      NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
24244
24245      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24246        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24247        gl_next_as_first_directive='<'sys/random.h'>'
24248      else
24249        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24250        gl_next_as_first_directive=$gl_cv_next_sys_random_h
24251      fi
24252      NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
24253
24254
24255
24256
24257   if test $ac_cv_header_sys_random_h = yes; then
24258     HAVE_SYS_RANDOM_H=1
24259   else
24260     HAVE_SYS_RANDOM_H=0
24261   fi
24262
24263
24264
24265   if test $ac_cv_header_sys_random_h = yes; then
24266     UNISTD_H_HAVE_SYS_RANDOM_H=1
24267   fi
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296      if test $gl_cv_have_include_next = yes; then
24297        gl_cv_next_sys_types_h='<'sys/types.h'>'
24298      else
24299        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
24300 printf %s "checking absolute name of <sys/types.h>... " >&6; }
24301 if test ${gl_cv_next_sys_types_h+y}
24302 then :
24303   printf %s "(cached) " >&6
24304 else case e in #(
24305   e)
24306
24307
24308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24309 /* end confdefs.h.  */
24310 #include <sys/types.h>
24311 _ACEOF
24312                 case "$host_os" in
24313     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24314     *)    gl_absname_cpp="$ac_cpp" ;;
24315   esac
24316
24317   case "$host_os" in
24318     mingw*)
24319                                           gl_dirsep_regex='[/\\]'
24320       ;;
24321     *)
24322       gl_dirsep_regex='\/'
24323       ;;
24324   esac
24325       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24326   gl_header_literal_regex=`echo 'sys/types.h' \
24327                            | sed -e "$gl_make_literal_regex_sed"`
24328   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24329       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24330       s|^/[^/]|//&|
24331       p
24332       q
24333     }'
24334
24335         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24336   sed -n "$gl_absolute_header_sed"`
24337
24338           gl_header=$gl_cv_absolute_sys_types_h
24339           gl_cv_next_sys_types_h='"'$gl_header'"'
24340
24341           ;;
24342 esac
24343 fi
24344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
24345 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
24346      fi
24347      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
24348
24349      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24350        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24351        gl_next_as_first_directive='<'sys/types.h'>'
24352      else
24353        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24354        gl_next_as_first_directive=$gl_cv_next_sys_types_h
24355      fi
24356      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369     WINDOWS_STAT_INODES=0
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390      if test $gl_cv_have_include_next = yes; then
24391        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24392      else
24393        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
24394 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
24395 if test ${gl_cv_next_sys_wait_h+y}
24396 then :
24397   printf %s "(cached) " >&6
24398 else case e in #(
24399   e)
24400              if test $ac_cv_header_sys_wait_h = yes; then
24401
24402
24403
24404
24405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24406 /* end confdefs.h.  */
24407 #include <sys/wait.h>
24408 _ACEOF
24409                 case "$host_os" in
24410     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24411     *)    gl_absname_cpp="$ac_cpp" ;;
24412   esac
24413
24414   case "$host_os" in
24415     mingw*)
24416                                           gl_dirsep_regex='[/\\]'
24417       ;;
24418     *)
24419       gl_dirsep_regex='\/'
24420       ;;
24421   esac
24422       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24423   gl_header_literal_regex=`echo 'sys/wait.h' \
24424                            | sed -e "$gl_make_literal_regex_sed"`
24425   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24426       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24427       s|^/[^/]|//&|
24428       p
24429       q
24430     }'
24431
24432         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24433   sed -n "$gl_absolute_header_sed"`
24434
24435           gl_header=$gl_cv_absolute_sys_wait_h
24436           gl_cv_next_sys_wait_h='"'$gl_header'"'
24437           else
24438                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24439              fi
24440
24441           ;;
24442 esac
24443 fi
24444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
24445 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
24446      fi
24447      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
24448
24449      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24450        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24451        gl_next_as_first_directive='<'sys/wait.h'>'
24452      else
24453        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24454        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
24455      fi
24456      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470   GL_GNULIB_WAITPID=0
24471
24472
24473
24474
24475
24476   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
24477 printf %s "checking for struct timespec in <time.h>... " >&6; }
24478 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
24479 then :
24480   printf %s "(cached) " >&6
24481 else case e in #(
24482   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24483 /* end confdefs.h.  */
24484 #include <time.h>
24485
24486 int
24487 main (void)
24488 {
24489 static struct timespec x; x.tv_sec = x.tv_nsec;
24490   ;
24491   return 0;
24492 }
24493 _ACEOF
24494 if ac_fn_c_try_compile "$LINENO"
24495 then :
24496   gl_cv_sys_struct_timespec_in_time_h=yes
24497 else case e in #(
24498   e) gl_cv_sys_struct_timespec_in_time_h=no ;;
24499 esac
24500 fi
24501 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24502 esac
24503 fi
24504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
24505 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
24506
24507   TIME_H_DEFINES_STRUCT_TIMESPEC=0
24508   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
24509   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
24510   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
24511   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
24512     TIME_H_DEFINES_STRUCT_TIMESPEC=1
24513   else
24514     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
24515 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
24516 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
24517 then :
24518   printf %s "(cached) " >&6
24519 else case e in #(
24520   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24521 /* end confdefs.h.  */
24522 #include <sys/time.h>
24523
24524 int
24525 main (void)
24526 {
24527 static struct timespec x; x.tv_sec = x.tv_nsec;
24528   ;
24529   return 0;
24530 }
24531 _ACEOF
24532 if ac_fn_c_try_compile "$LINENO"
24533 then :
24534   gl_cv_sys_struct_timespec_in_sys_time_h=yes
24535 else case e in #(
24536   e) gl_cv_sys_struct_timespec_in_sys_time_h=no ;;
24537 esac
24538 fi
24539 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24540 esac
24541 fi
24542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
24543 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
24544     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
24545       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
24546     else
24547       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
24548 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
24549 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
24550 then :
24551   printf %s "(cached) " >&6
24552 else case e in #(
24553   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554 /* end confdefs.h.  */
24555 #include <pthread.h>
24556
24557 int
24558 main (void)
24559 {
24560 static struct timespec x; x.tv_sec = x.tv_nsec;
24561   ;
24562   return 0;
24563 }
24564 _ACEOF
24565 if ac_fn_c_try_compile "$LINENO"
24566 then :
24567   gl_cv_sys_struct_timespec_in_pthread_h=yes
24568 else case e in #(
24569   e) gl_cv_sys_struct_timespec_in_pthread_h=no ;;
24570 esac
24571 fi
24572 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24573 esac
24574 fi
24575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
24576 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
24577       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
24578         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
24579       else
24580         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
24581 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
24582 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
24583 then :
24584   printf %s "(cached) " >&6
24585 else case e in #(
24586   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24587 /* end confdefs.h.  */
24588 #include <unistd.h>
24589
24590 int
24591 main (void)
24592 {
24593 static struct timespec x; x.tv_sec = x.tv_nsec;
24594   ;
24595   return 0;
24596 }
24597 _ACEOF
24598 if ac_fn_c_try_compile "$LINENO"
24599 then :
24600   gl_cv_sys_struct_timespec_in_unistd_h=yes
24601 else case e in #(
24602   e) gl_cv_sys_struct_timespec_in_unistd_h=no ;;
24603 esac
24604 fi
24605 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24606 esac
24607 fi
24608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
24609 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
24610         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
24611           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
24612         fi
24613       fi
24614     fi
24615   fi
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632      if test $gl_cv_have_include_next = yes; then
24633        gl_cv_next_time_h='<'time.h'>'
24634      else
24635        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
24636 printf %s "checking absolute name of <time.h>... " >&6; }
24637 if test ${gl_cv_next_time_h+y}
24638 then :
24639   printf %s "(cached) " >&6
24640 else case e in #(
24641   e)
24642
24643
24644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24645 /* end confdefs.h.  */
24646 #include <time.h>
24647 _ACEOF
24648                 case "$host_os" in
24649     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24650     *)    gl_absname_cpp="$ac_cpp" ;;
24651   esac
24652
24653   case "$host_os" in
24654     mingw*)
24655                                           gl_dirsep_regex='[/\\]'
24656       ;;
24657     *)
24658       gl_dirsep_regex='\/'
24659       ;;
24660   esac
24661       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24662   gl_header_literal_regex=`echo 'time.h' \
24663                            | sed -e "$gl_make_literal_regex_sed"`
24664   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24665       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24666       s|^/[^/]|//&|
24667       p
24668       q
24669     }'
24670
24671         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24672   sed -n "$gl_absolute_header_sed"`
24673
24674           gl_header=$gl_cv_absolute_time_h
24675           gl_cv_next_time_h='"'$gl_header'"'
24676
24677           ;;
24678 esac
24679 fi
24680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
24681 printf "%s\n" "$gl_cv_next_time_h" >&6; }
24682      fi
24683      NEXT_TIME_H=$gl_cv_next_time_h
24684
24685      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24686        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24687        gl_next_as_first_directive='<'time.h'>'
24688      else
24689        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24690        gl_next_as_first_directive=$gl_cv_next_time_h
24691      fi
24692      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
24706 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
24707 if test ${gl_cv_time_h_has_TIME_UTC+y}
24708 then :
24709   printf %s "(cached) " >&6
24710 else case e in #(
24711   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24712 /* end confdefs.h.  */
24713 #include <time.h>
24714
24715 int
24716 main (void)
24717 {
24718 static int x = TIME_UTC; x++;
24719   ;
24720   return 0;
24721 }
24722 _ACEOF
24723 if ac_fn_c_try_compile "$LINENO"
24724 then :
24725   gl_cv_time_h_has_TIME_UTC=yes
24726 else case e in #(
24727   e) gl_cv_time_h_has_TIME_UTC=no ;;
24728 esac
24729 fi
24730 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24731 esac
24732 fi
24733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
24734 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
24735   if test $gl_cv_time_h_has_TIME_UTC = yes; then
24736     TIME_H_DEFINES_TIME_UTC=1
24737   else
24738     TIME_H_DEFINES_TIME_UTC=0
24739   fi
24740
24741
24742
24743 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24744 if test "x$ac_cv_have_decl_execvpe" = xyes
24745 then :
24746   ac_have_decl=1
24747 else case e in #(
24748   e) ac_have_decl=0 ;;
24749 esac
24750 fi
24751 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765      if test $gl_cv_have_include_next = yes; then
24766        gl_cv_next_unistd_h='<'unistd.h'>'
24767      else
24768        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24769 printf %s "checking absolute name of <unistd.h>... " >&6; }
24770 if test ${gl_cv_next_unistd_h+y}
24771 then :
24772   printf %s "(cached) " >&6
24773 else case e in #(
24774   e)
24775              if test $ac_cv_header_unistd_h = yes; then
24776
24777
24778
24779
24780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h.  */
24782 #include <unistd.h>
24783 _ACEOF
24784                 case "$host_os" in
24785     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24786     *)    gl_absname_cpp="$ac_cpp" ;;
24787   esac
24788
24789   case "$host_os" in
24790     mingw*)
24791                                           gl_dirsep_regex='[/\\]'
24792       ;;
24793     *)
24794       gl_dirsep_regex='\/'
24795       ;;
24796   esac
24797       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24798   gl_header_literal_regex=`echo 'unistd.h' \
24799                            | sed -e "$gl_make_literal_regex_sed"`
24800   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24801       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24802       s|^/[^/]|//&|
24803       p
24804       q
24805     }'
24806
24807         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24808   sed -n "$gl_absolute_header_sed"`
24809
24810           gl_header=$gl_cv_absolute_unistd_h
24811           gl_cv_next_unistd_h='"'$gl_header'"'
24812           else
24813                gl_cv_next_unistd_h='<'unistd.h'>'
24814              fi
24815
24816           ;;
24817 esac
24818 fi
24819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24820 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
24821      fi
24822      NEXT_UNISTD_H=$gl_cv_next_unistd_h
24823
24824      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24825        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24826        gl_next_as_first_directive='<'unistd.h'>'
24827      else
24828        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24829        gl_next_as_first_directive=$gl_cv_next_unistd_h
24830      fi
24831      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24832
24833
24834
24835
24836   if test $ac_cv_header_unistd_h = yes; then
24837     HAVE_UNISTD_H=1
24838   else
24839     HAVE_UNISTD_H=0
24840   fi
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854   if test $ac_cv_have_decl_execvpe = no; then
24855     HAVE_DECL_EXECVPE=0
24856   fi
24857
24858
24859
24860
24861
24862
24863
24864 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
24865 i\
24866 0
24867 q
24868 '
24869 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
24870 i\
24871 0
24872 q
24873 '
24874 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
24875 i\
24876 0
24877 q
24878 '
24879
24880
24881   if test "$HAVE_LIBUNISTRING" = yes; then
24882     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
24883     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
24884     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
24885   fi
24886
24887                 if test "$HAVE_LIBUNISTRING" = yes; then
24888               for ac_header in unistring/woe32dll.h
24889 do :
24890   ac_fn_c_check_header_compile "$LINENO" "unistring/woe32dll.h" "ac_cv_header_unistring_woe32dll_h" "$ac_includes_default"
24891 if test "x$ac_cv_header_unistring_woe32dll_h" = xyes
24892 then :
24893   printf "%s\n" "#define HAVE_UNISTRING_WOE32DLL_H 1" >>confdefs.h
24894  HAVE_UNISTRING_WOE32DLL_H=1
24895 else case e in #(
24896   e) HAVE_UNISTRING_WOE32DLL_H=0 ;;
24897 esac
24898 fi
24899
24900 done
24901      else
24902        HAVE_UNISTRING_WOE32DLL_H=0
24903      fi
24904
24905
24906
24907 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24908 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
24909 then :
24910   ac_have_decl=1
24911 else case e in #(
24912   e) ac_have_decl=0 ;;
24913 esac
24914 fi
24915 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
24916
24917 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24918 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
24919 then :
24920   ac_have_decl=1
24921 else case e in #(
24922   e) ac_have_decl=0 ;;
24923 esac
24924 fi
24925 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
24926
24927 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24928 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
24929 then :
24930   ac_have_decl=1
24931 else case e in #(
24932   e) ac_have_decl=0 ;;
24933 esac
24934 fi
24935 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
24936
24937 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24938 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
24939 then :
24940   ac_have_decl=1
24941 else case e in #(
24942   e) ac_have_decl=0 ;;
24943 esac
24944 fi
24945 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
24946
24947 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24948 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
24949 then :
24950   ac_have_decl=1
24951 else case e in #(
24952   e) ac_have_decl=0 ;;
24953 esac
24954 fi
24955 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
24956
24957 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24958 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
24959 then :
24960   ac_have_decl=1
24961 else case e in #(
24962   e) ac_have_decl=0 ;;
24963 esac
24964 fi
24965 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
24966
24967 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24968 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
24969 then :
24970   ac_have_decl=1
24971 else case e in #(
24972   e) ac_have_decl=0 ;;
24973 esac
24974 fi
24975 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
24976
24977 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24978 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
24979 then :
24980   ac_have_decl=1
24981 else case e in #(
24982   e) ac_have_decl=0 ;;
24983 esac
24984 fi
24985 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
24986
24987 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24988 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
24989 then :
24990   ac_have_decl=1
24991 else case e in #(
24992   e) ac_have_decl=0 ;;
24993 esac
24994 fi
24995 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
24996
24997 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24998 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
24999 then :
25000   ac_have_decl=1
25001 else case e in #(
25002   e) ac_have_decl=0 ;;
25003 esac
25004 fi
25005 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
25006
25007 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25008 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
25009 then :
25010   ac_have_decl=1
25011 else case e in #(
25012   e) ac_have_decl=0 ;;
25013 esac
25014 fi
25015 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
25016
25017 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25018 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
25019 then :
25020   ac_have_decl=1
25021 else case e in #(
25022   e) ac_have_decl=0 ;;
25023 esac
25024 fi
25025 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
25026
25027 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25028 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
25029 then :
25030   ac_have_decl=1
25031 else case e in #(
25032   e) ac_have_decl=0 ;;
25033 esac
25034 fi
25035 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
25036
25037 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25038 if test "x$ac_cv_have_decl_unsetenv" = xyes
25039 then :
25040   ac_have_decl=1
25041 else case e in #(
25042   e) ac_have_decl=0 ;;
25043 esac
25044 fi
25045 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
25046
25047
25048
25049
25050   if test $ac_cv_header_features_h = yes; then
25051     HAVE_FEATURES_H=1
25052   else
25053     HAVE_FEATURES_H=0
25054   fi
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069      if test $gl_cv_have_include_next = yes; then
25070        gl_cv_next_wchar_h='<'wchar.h'>'
25071      else
25072        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25073 printf %s "checking absolute name of <wchar.h>... " >&6; }
25074 if test ${gl_cv_next_wchar_h+y}
25075 then :
25076   printf %s "(cached) " >&6
25077 else case e in #(
25078   e)
25079              if test $ac_cv_header_wchar_h = yes; then
25080
25081
25082
25083
25084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25085 /* end confdefs.h.  */
25086 #include <wchar.h>
25087 _ACEOF
25088                 case "$host_os" in
25089     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25090     *)    gl_absname_cpp="$ac_cpp" ;;
25091   esac
25092
25093   case "$host_os" in
25094     mingw*)
25095                                           gl_dirsep_regex='[/\\]'
25096       ;;
25097     *)
25098       gl_dirsep_regex='\/'
25099       ;;
25100   esac
25101       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25102   gl_header_literal_regex=`echo 'wchar.h' \
25103                            | sed -e "$gl_make_literal_regex_sed"`
25104   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25105       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25106       s|^/[^/]|//&|
25107       p
25108       q
25109     }'
25110
25111         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25112   sed -n "$gl_absolute_header_sed"`
25113
25114           gl_header=$gl_cv_absolute_wchar_h
25115           gl_cv_next_wchar_h='"'$gl_header'"'
25116           else
25117                gl_cv_next_wchar_h='<'wchar.h'>'
25118              fi
25119
25120           ;;
25121 esac
25122 fi
25123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25124 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
25125      fi
25126      NEXT_WCHAR_H=$gl_cv_next_wchar_h
25127
25128      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25129        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25130        gl_next_as_first_directive='<'wchar.h'>'
25131      else
25132        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25133        gl_next_as_first_directive=$gl_cv_next_wchar_h
25134      fi
25135      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25136
25137
25138
25139
25140   if test $ac_cv_header_wchar_h = yes; then
25141     HAVE_WCHAR_H=1
25142   else
25143     HAVE_WCHAR_H=0
25144   fi
25145
25146
25147
25148
25149
25150   if test $gt_cv_c_wint_t = yes; then
25151     HAVE_WINT_T=1
25152   else
25153     HAVE_WINT_T=0
25154   fi
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165   ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
25166       #include <wchar.h>
25167
25168 " "$ac_c_undeclared_builtin_options" "CFLAGS"
25169 if test "x$ac_cv_have_decl_wcsdup" = xyes
25170 then :
25171   ac_have_decl=1
25172 else case e in #(
25173   e) ac_have_decl=0 ;;
25174 esac
25175 fi
25176 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
25177
25178   if test $ac_cv_have_decl_wcsdup = no; then
25179     HAVE_DECL_WCSDUP=0
25180   fi
25181
25182
25183
25184
25185
25186   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
25187 printf %s "checking for C compiler option to allow warnings... " >&6; }
25188 if test ${gl_cv_cc_wallow+y}
25189 then :
25190   printf %s "(cached) " >&6
25191 else case e in #(
25192   e) rm -f conftest*
25193      echo 'int dummy;' > conftest.c
25194      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
25195   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25196   (eval $ac_try) 2>&5
25197   ac_status=$?
25198   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25199   test $ac_status = 0; }; } >/dev/null
25200      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
25201   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25202   (eval $ac_try) 2>&5
25203   ac_status=$?
25204   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25205   test $ac_status = 0; }; } >/dev/null
25206                          if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
25207        gl_cv_cc_wallow='-Wno-error'
25208      else
25209        gl_cv_cc_wallow=none
25210      fi
25211      rm -f conftest*
25212      ;;
25213 esac
25214 fi
25215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
25216 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
25217   case "$gl_cv_cc_wallow" in
25218     none) GL_CFLAG_ALLOW_WARNINGS='' ;;
25219     *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
25220   esac
25221
25222
25223
25224     if test -n "$CXX" && test "$CXX" != no; then
25225     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler option to allow warnings" >&5
25226 printf %s "checking for C++ compiler option to allow warnings... " >&6; }
25227 if test ${gl_cv_cxx_wallow+y}
25228 then :
25229   printf %s "(cached) " >&6
25230 else case e in #(
25231   e) rm -f conftest*
25232        echo 'int dummy;' > conftest.cc
25233        { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
25234   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25235   (eval $ac_try) 2>&5
25236   ac_status=$?
25237   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25238   test $ac_status = 0; }; } >/dev/null
25239        { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
25240   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25241   (eval $ac_try) 2>&5
25242   ac_status=$?
25243   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25244   test $ac_status = 0; }; } >/dev/null
25245                                    if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
25246          gl_cv_cxx_wallow='-Wno-error'
25247        else
25248          gl_cv_cxx_wallow=none
25249        fi
25250        rm -f conftest*
25251        ;;
25252 esac
25253 fi
25254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
25255 printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
25256     case "$gl_cv_cxx_wallow" in
25257       none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
25258       *)    GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
25259     esac
25260   else
25261     GL_CXXFLAG_ALLOW_WARNINGS=''
25262   fi
25263
25264
25265
25266   HAVE_STRUCT_SOCKADDR_STORAGE=1;
25267   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
25268
25269   HAVE_SA_FAMILY_T=1;
25270   HAVE_ACCEPT4=1;
25271
25272
25273    if test $ac_cv_header_sys_socket_h = no; then
25274                          ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
25275 if test "x$ac_cv_header_ws2tcpip_h" = xyes
25276 then :
25277   printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
25278
25279 fi
25280
25281    fi
25282
25283
25284
25285
25286
25287         case "$host_os" in
25288     osf*)
25289
25290 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
25291
25292       ;;
25293   esac
25294
25295   GL_GENERATE_SYS_SOCKET_H=false
25296   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
25297 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
25298 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
25299 then :
25300   printf %s "(cached) " >&6
25301 else case e in #(
25302   e)
25303       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25304 /* end confdefs.h.  */
25305 #include <sys/socket.h>
25306 int
25307 main (void)
25308 {
25309
25310   ;
25311   return 0;
25312 }
25313 _ACEOF
25314 if ac_fn_c_try_compile "$LINENO"
25315 then :
25316   gl_cv_header_sys_socket_h_selfcontained=yes
25317 else case e in #(
25318   e) gl_cv_header_sys_socket_h_selfcontained=no ;;
25319 esac
25320 fi
25321 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25322      ;;
25323 esac
25324 fi
25325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
25326 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
25327   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
25328             ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
25329 if test "x$ac_cv_func_shutdown" = xyes
25330 then :
25331   printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
25332
25333 fi
25334
25335     if test $ac_cv_func_shutdown = yes; then
25336       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
25337 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
25338 if test ${gl_cv_header_sys_socket_h_shut+y}
25339 then :
25340   printf %s "(cached) " >&6
25341 else case e in #(
25342   e)
25343           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25344 /* end confdefs.h.  */
25345 #include <sys/socket.h>
25346 int
25347 main (void)
25348 {
25349 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
25350   ;
25351   return 0;
25352 }
25353 _ACEOF
25354 if ac_fn_c_try_compile "$LINENO"
25355 then :
25356   gl_cv_header_sys_socket_h_shut=yes
25357 else case e in #(
25358   e) gl_cv_header_sys_socket_h_shut=no ;;
25359 esac
25360 fi
25361 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25362          ;;
25363 esac
25364 fi
25365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
25366 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
25367       if test $gl_cv_header_sys_socket_h_shut = no; then
25368         GL_GENERATE_SYS_SOCKET_H=true
25369       fi
25370     fi
25371   fi
25372   # We need to check for ws2tcpip.h now.
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384      if test $gl_cv_have_include_next = yes; then
25385        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
25386      else
25387        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
25388 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
25389 if test ${gl_cv_next_sys_socket_h+y}
25390 then :
25391   printf %s "(cached) " >&6
25392 else case e in #(
25393   e)
25394              if test $ac_cv_header_sys_socket_h = yes; then
25395
25396
25397
25398
25399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25400 /* end confdefs.h.  */
25401 #include <sys/socket.h>
25402 _ACEOF
25403                 case "$host_os" in
25404     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25405     *)    gl_absname_cpp="$ac_cpp" ;;
25406   esac
25407
25408   case "$host_os" in
25409     mingw*)
25410                                           gl_dirsep_regex='[/\\]'
25411       ;;
25412     *)
25413       gl_dirsep_regex='\/'
25414       ;;
25415   esac
25416       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25417   gl_header_literal_regex=`echo 'sys/socket.h' \
25418                            | sed -e "$gl_make_literal_regex_sed"`
25419   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25420       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25421       s|^/[^/]|//&|
25422       p
25423       q
25424     }'
25425
25426         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25427   sed -n "$gl_absolute_header_sed"`
25428
25429           gl_header=$gl_cv_absolute_sys_socket_h
25430           gl_cv_next_sys_socket_h='"'$gl_header'"'
25431           else
25432                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
25433              fi
25434
25435           ;;
25436 esac
25437 fi
25438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
25439 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
25440      fi
25441      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
25442
25443      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25444        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25445        gl_next_as_first_directive='<'sys/socket.h'>'
25446      else
25447        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25448        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
25449      fi
25450      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
25451
25452
25453
25454
25455   if test $ac_cv_header_sys_socket_h = yes; then
25456     HAVE_SYS_SOCKET_H=1
25457   else
25458     HAVE_SYS_SOCKET_H=0
25459   fi
25460
25461
25462
25463   if test $ac_cv_header_sys_socket_h = yes; then
25464     HAVE_WS2TCPIP_H=0
25465   else
25466     if test $ac_cv_header_ws2tcpip_h = yes; then
25467       HAVE_WS2TCPIP_H=1
25468     else
25469       HAVE_WS2TCPIP_H=0
25470     fi
25471   fi
25472
25473
25474
25475   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
25476   /* sys/types.h is not needed according to POSIX, but the
25477      sys/socket.h in i386-unknown-freebsd4.10 and
25478      powerpc-apple-darwin5.5 required it. */
25479 #include <sys/types.h>
25480 #ifdef HAVE_SYS_SOCKET_H
25481 #include <sys/socket.h>
25482 #endif
25483 #ifdef HAVE_WS2TCPIP_H
25484 #include <ws2tcpip.h>
25485 #endif
25486
25487 "
25488 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
25489 then :
25490
25491 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25492
25493
25494 fi
25495 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
25496   /* sys/types.h is not needed according to POSIX, but the
25497      sys/socket.h in i386-unknown-freebsd4.10 and
25498      powerpc-apple-darwin5.5 required it. */
25499 #include <sys/types.h>
25500 #ifdef HAVE_SYS_SOCKET_H
25501 #include <sys/socket.h>
25502 #endif
25503 #ifdef HAVE_WS2TCPIP_H
25504 #include <ws2tcpip.h>
25505 #endif
25506
25507 "
25508 if test "x$ac_cv_type_sa_family_t" = xyes
25509 then :
25510
25511 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
25512
25513
25514 fi
25515
25516   if test $ac_cv_type_struct_sockaddr_storage = no; then
25517     HAVE_STRUCT_SOCKADDR_STORAGE=0
25518   fi
25519   if test $ac_cv_type_sa_family_t = no; then
25520     HAVE_SA_FAMILY_T=0
25521   fi
25522   if test $ac_cv_type_struct_sockaddr_storage != no; then
25523     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
25524        #ifdef HAVE_SYS_SOCKET_H
25525        #include <sys/socket.h>
25526        #endif
25527        #ifdef HAVE_WS2TCPIP_H
25528        #include <ws2tcpip.h>
25529        #endif
25530
25531 "
25532 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
25533 then :
25534
25535 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
25536
25537
25538 else case e in #(
25539   e) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 ;;
25540 esac
25541 fi
25542
25543   fi
25544   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
25545      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
25546     GL_GENERATE_SYS_SOCKET_H=true
25547   fi
25548
25549
25550
25551
25552   if test $ac_cv_header_sys_socket_h != yes; then
25553                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25554 if test "x$ac_cv_header_winsock2_h" = xyes
25555 then :
25556   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
25557
25558 fi
25559
25560   fi
25561   if test "$ac_cv_header_winsock2_h" = yes; then
25562     HAVE_WINSOCK2_H=1
25563     UNISTD_H_HAVE_WINSOCK2_H=1
25564     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25565   else
25566     HAVE_WINSOCK2_H=0
25567   fi
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579   GL_GNULIB_SOCKET=0
25580
25581
25582
25583   GL_GNULIB_CONNECT=0
25584
25585
25586
25587   GL_GNULIB_ACCEPT=0
25588
25589
25590
25591   GL_GNULIB_BIND=0
25592
25593
25594
25595   GL_GNULIB_GETPEERNAME=0
25596
25597
25598
25599   GL_GNULIB_GETSOCKNAME=0
25600
25601
25602
25603   GL_GNULIB_GETSOCKOPT=0
25604
25605
25606
25607   GL_GNULIB_LISTEN=0
25608
25609
25610
25611   GL_GNULIB_RECV=0
25612
25613
25614
25615   GL_GNULIB_SEND=0
25616
25617
25618
25619   GL_GNULIB_RECVFROM=0
25620
25621
25622
25623   GL_GNULIB_SENDTO=0
25624
25625
25626
25627   GL_GNULIB_SETSOCKOPT=0
25628
25629
25630
25631   GL_GNULIB_SHUTDOWN=0
25632
25633
25634
25635   GL_GNULIB_ACCEPT4=0
25636
25637
25638
25639
25640     HAVE_DECL_INET_NTOP=1;
25641   HAVE_DECL_INET_PTON=1;
25642   REPLACE_INET_NTOP=0;
25643   REPLACE_INET_PTON=0;
25644
25645
25646
25647
25648
25649
25650   if test $ac_cv_header_arpa_inet_h = yes; then
25651     HAVE_ARPA_INET_H=1
25652   else
25653     HAVE_ARPA_INET_H=0
25654   fi
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665      if test $gl_cv_have_include_next = yes; then
25666        gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
25667      else
25668        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
25669 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
25670 if test ${gl_cv_next_arpa_inet_h+y}
25671 then :
25672   printf %s "(cached) " >&6
25673 else case e in #(
25674   e)
25675              if test $ac_cv_header_arpa_inet_h = yes; then
25676
25677
25678
25679
25680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25681 /* end confdefs.h.  */
25682 #include <arpa/inet.h>
25683 _ACEOF
25684                 case "$host_os" in
25685     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25686     *)    gl_absname_cpp="$ac_cpp" ;;
25687   esac
25688
25689   case "$host_os" in
25690     mingw*)
25691                                           gl_dirsep_regex='[/\\]'
25692       ;;
25693     *)
25694       gl_dirsep_regex='\/'
25695       ;;
25696   esac
25697       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25698   gl_header_literal_regex=`echo 'arpa/inet.h' \
25699                            | sed -e "$gl_make_literal_regex_sed"`
25700   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25701       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25702       s|^/[^/]|//&|
25703       p
25704       q
25705     }'
25706
25707         gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25708   sed -n "$gl_absolute_header_sed"`
25709
25710           gl_header=$gl_cv_absolute_arpa_inet_h
25711           gl_cv_next_arpa_inet_h='"'$gl_header'"'
25712           else
25713                gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
25714              fi
25715
25716           ;;
25717 esac
25718 fi
25719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
25720 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
25721      fi
25722      NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
25723
25724      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25725        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25726        gl_next_as_first_directive='<'arpa/inet.h'>'
25727      else
25728        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25729        gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
25730      fi
25731      NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741   if test $ac_cv_header_sys_socket_h = yes; then
25742     HAVE_WS2TCPIP_H=0
25743   else
25744     if test $ac_cv_header_ws2tcpip_h = yes; then
25745       HAVE_WS2TCPIP_H=1
25746     else
25747       HAVE_WS2TCPIP_H=0
25748     fi
25749   fi
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759   GL_GNULIB_INET_NTOP=0
25760
25761
25762
25763   GL_GNULIB_INET_PTON=0
25764
25765
25766
25767
25768
25769
25770   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
25771 printf %s "checking for a turkish Unicode locale... " >&6; }
25772 if test ${gt_cv_locale_tr_utf8+y}
25773 then :
25774   printf %s "(cached) " >&6
25775 else case e in #(
25776   e)
25777     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25778 /* end confdefs.h.  */
25779
25780 #include <locale.h>
25781 #include <time.h>
25782 #if HAVE_LANGINFO_CODESET
25783 # include <langinfo.h>
25784 #endif
25785 #include <stdlib.h>
25786 #include <string.h>
25787 #include <wctype.h>
25788 struct tm t;
25789 char buf[16];
25790 int main () {
25791   /* On BeOS, locales are not implemented in libc.  Rather, libintl
25792      imitates locale dependent behaviour by looking at the environment
25793      variables, and all locales use the UTF-8 encoding.  But BeOS does not
25794      implement the Turkish upper-/lowercase mappings.  Therefore, let this
25795      program return 1 on BeOS.  */
25796   /* Check whether the given locale name is recognized by the system.  */
25797 #if defined _WIN32 && !defined __CYGWIN__
25798   /* On native Windows, setlocale(category, "") looks at the system settings,
25799      not at the environment variables.  Also, when an encoding suffix such
25800      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
25801      category of the locale to "C".  */
25802   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
25803       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
25804     return 1;
25805 #else
25806   if (setlocale (LC_ALL, "") == NULL) return 1;
25807 #endif
25808   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
25809      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
25810      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
25811      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
25812      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
25813      some unit tests fail.  */
25814 #if HAVE_LANGINFO_CODESET
25815   {
25816     const char *cs = nl_langinfo (CODESET);
25817     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
25818       return 1;
25819   }
25820 #endif
25821 #ifdef __CYGWIN__
25822   /* On Cygwin, avoid locale names without encoding suffix, because the
25823      locale_charset() function relies on the encoding suffix.  Note that
25824      LC_ALL is set on the command line.  */
25825   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
25826 #endif
25827   /* Check whether in the abbreviation of the eighth month, the second
25828      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
25829      two bytes long, with UTF-8 encoding.  */
25830   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
25831   if (strftime (buf, sizeof (buf), "%b", &t) < 4
25832       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
25833     return 1;
25834   /* Check whether the upper-/lowercase mappings are as expected for
25835      Turkish.  */
25836   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
25837       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
25838     return 1;
25839   return 0;
25840 }
25841
25842 _ACEOF
25843     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
25844   (eval $ac_link) 2>&5
25845   ac_status=$?
25846   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25847   test $ac_status = 0; } && test -s conftest$ac_exeext; then
25848       case "$host_os" in
25849         # Handle native Windows specially, because there setlocale() interprets
25850         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
25851         # "fr" or "fra" as "French" or "French_France.1252",
25852         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
25853         # "ja" as "Japanese" or "Japanese_Japan.932",
25854         # and similar.
25855         mingw*)
25856           # Test for the hypothetical native Windows locale name.
25857           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25858             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
25859           else
25860             # None found.
25861             gt_cv_locale_tr_utf8=none
25862           fi
25863           ;;
25864         *)
25865           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
25866           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
25867           # configure script would override the LC_ALL setting. Likewise for
25868           # LC_CTYPE, which is also set at the beginning of the configure script.
25869           # Test for the usual locale name.
25870           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25871             gt_cv_locale_tr_utf8=tr_TR
25872           else
25873             # Test for the locale name with explicit encoding suffix.
25874             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25875               gt_cv_locale_tr_utf8=tr_TR.UTF-8
25876             else
25877               # Test for the Solaris 7 locale name.
25878               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25879                 gt_cv_locale_tr_utf8=tr.UTF-8
25880               else
25881                 # None found.
25882                 gt_cv_locale_tr_utf8=none
25883               fi
25884             fi
25885           fi
25886           ;;
25887       esac
25888     else
25889       gt_cv_locale_tr_utf8=none
25890     fi
25891     rm -fr conftest*
25892    ;;
25893 esac
25894 fi
25895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
25896 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
25897   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
25898
25899
25900
25901
25902    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
25903 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
25904 if test ${gl_cv_func_getcwd_null+y}
25905 then :
25906   printf %s "(cached) " >&6
25907 else case e in #(
25908   e) if test "$cross_compiling" = yes
25909 then :
25910   case "$host_os" in
25911                            # Guess yes on glibc systems.
25912             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
25913                            # Guess yes on musl systems.
25914             *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
25915                            # Guess yes on systems that emulate the Linux system calls.
25916             midipix*)      gl_cv_func_getcwd_null="guessing yes";;
25917                            # Guess yes on Cygwin.
25918             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
25919                            # If we don't know, obey --enable-cross-guesses.
25920             *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
25921           esac
25922
25923 else case e in #(
25924   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25925 /* end confdefs.h.  */
25926
25927 #        include <stdlib.h>
25928 #        if HAVE_UNISTD_H
25929 #         include <unistd.h>
25930 #        else /* on Windows with MSVC */
25931 #         include <direct.h>
25932 #        endif
25933
25934
25935 $gl_mda_defines
25936
25937 #        ifndef getcwd
25938          char *getcwd ();
25939 #        endif
25940
25941 int
25942 main (void)
25943 {
25944
25945 #if defined _WIN32 && ! defined __CYGWIN__
25946 /* mingw cwd does not start with '/', but _getcwd does allocate.
25947    However, mingw fails to honor non-zero size.  */
25948 #else
25949            if (chdir ("/") != 0)
25950              return 1;
25951            else
25952              {
25953                char *f = getcwd (NULL, 0);
25954                if (! f)
25955                  return 2;
25956                if (f[0] != '/')
25957                  { free (f); return 3; }
25958                if (f[1] != '\0')
25959                  { free (f); return 4; }
25960                free (f);
25961                return 0;
25962              }
25963 #endif
25964
25965   ;
25966   return 0;
25967 }
25968 _ACEOF
25969 if ac_fn_c_try_run "$LINENO"
25970 then :
25971   gl_cv_func_getcwd_null=yes
25972 else case e in #(
25973   e) gl_cv_func_getcwd_null=no ;;
25974 esac
25975 fi
25976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25977   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25978 esac
25979 fi
25980  ;;
25981 esac
25982 fi
25983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
25984 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
25985
25986
25987   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
25988 printf %s "checking for getcwd with POSIX signature... " >&6; }
25989 if test ${gl_cv_func_getcwd_posix_signature+y}
25990 then :
25991   printf %s "(cached) " >&6
25992 else case e in #(
25993   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25994 /* end confdefs.h.  */
25995 #include <unistd.h>
25996
25997
25998 $gl_mda_defines
25999
26000 int
26001 main (void)
26002 {
26003 extern
26004            #ifdef __cplusplus
26005            "C"
26006            #endif
26007            char *getcwd (char *, size_t);
26008
26009   ;
26010   return 0;
26011 }
26012
26013 _ACEOF
26014 if ac_fn_c_try_compile "$LINENO"
26015 then :
26016   gl_cv_func_getcwd_posix_signature=yes
26017 else case e in #(
26018   e) gl_cv_func_getcwd_posix_signature=no ;;
26019 esac
26020 fi
26021 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26022     ;;
26023 esac
26024 fi
26025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
26026 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
26027
26028
26029
26030
26031
26032
26033
26034   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
26035 printf %s "checking for IPv4 sockets... " >&6; }
26036 if test ${gl_cv_socket_ipv4+y}
26037 then :
26038   printf %s "(cached) " >&6
26039 else case e in #(
26040   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26041 /* end confdefs.h.  */
26042 #include <sys/types.h>
26043 #ifdef HAVE_SYS_SOCKET_H
26044 #include <sys/socket.h>
26045 #endif
26046 #ifdef HAVE_NETINET_IN_H
26047 #include <netinet/in.h>
26048 #endif
26049 #ifdef HAVE_WINSOCK2_H
26050 #include <winsock2.h>
26051 #endif
26052 int
26053 main (void)
26054 {
26055 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
26056  if (&x && &y && &z) return 0;
26057   ;
26058   return 0;
26059 }
26060 _ACEOF
26061 if ac_fn_c_try_compile "$LINENO"
26062 then :
26063   gl_cv_socket_ipv4=yes
26064 else case e in #(
26065   e) gl_cv_socket_ipv4=no ;;
26066 esac
26067 fi
26068 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26069 esac
26070 fi
26071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
26072 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
26073   if test $gl_cv_socket_ipv4 = yes; then
26074
26075 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
26076
26077   fi
26078
26079   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
26080 printf %s "checking for IPv6 sockets... " >&6; }
26081 if test ${gl_cv_socket_ipv6+y}
26082 then :
26083   printf %s "(cached) " >&6
26084 else case e in #(
26085   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26086 /* end confdefs.h.  */
26087 #include <sys/types.h>
26088 #ifdef HAVE_SYS_SOCKET_H
26089 #include <sys/socket.h>
26090 #endif
26091 #ifdef HAVE_NETINET_IN_H
26092 #include <netinet/in.h>
26093 #endif
26094 #ifdef HAVE_WINSOCK2_H
26095 #include <winsock2.h>
26096 #endif
26097 #ifdef HAVE_WS2TCPIP_H
26098 #include <ws2tcpip.h>
26099 #endif
26100 int
26101 main (void)
26102 {
26103 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
26104  if (&x && &y && &z) return 0;
26105   ;
26106   return 0;
26107 }
26108 _ACEOF
26109 if ac_fn_c_try_compile "$LINENO"
26110 then :
26111   gl_cv_socket_ipv6=yes
26112 else case e in #(
26113   e) gl_cv_socket_ipv6=no ;;
26114 esac
26115 fi
26116 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26117 esac
26118 fi
26119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
26120 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
26121   if test $gl_cv_socket_ipv6 = yes; then
26122
26123 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
26124
26125   fi
26126
26127
26128
26129   GL_GNULIB_IOCTL=0
26130
26131
26132
26133
26134
26135
26136
26137
26138   if test $ac_cv_have_decl_strerror_r = no; then
26139     HAVE_DECL_STRERROR_R=0
26140   fi
26141
26142   if test $ac_cv_func_strerror_r = yes; then
26143     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
26144       if test $gl_cv_func_strerror_r_posix_signature = yes; then
26145         case "$gl_cv_func_strerror_r_works" in
26146                     *no) REPLACE_STRERROR_R=1 ;;
26147         esac
26148       else
26149                 REPLACE_STRERROR_R=1
26150       fi
26151     else
26152                   REPLACE_STRERROR_R=1
26153     fi
26154   fi
26155
26156
26157
26158     HAVE_PSELECT=1;
26159   REPLACE_PSELECT=0;
26160   REPLACE_SELECT=0;
26161
26162
26163
26164
26165
26166   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26167 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
26168 if test ${gl_cv_header_sys_select_h_selfcontained+y}
26169 then :
26170   printf %s "(cached) " >&6
26171 else case e in #(
26172   e)
26173                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26174 /* end confdefs.h.  */
26175 #include <sys/select.h>
26176 int
26177 main (void)
26178 {
26179 struct timeval b;
26180   ;
26181   return 0;
26182 }
26183 _ACEOF
26184 if ac_fn_c_try_compile "$LINENO"
26185 then :
26186   gl_cv_header_sys_select_h_selfcontained=yes
26187 else case e in #(
26188   e) gl_cv_header_sys_select_h_selfcontained=no ;;
26189 esac
26190 fi
26191 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26192                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26193         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26194 /* end confdefs.h.  */
26195 #include <sys/select.h>
26196 int
26197 main (void)
26198 {
26199 int memset; int bzero;
26200   ;
26201   return 0;
26202 }
26203
26204 _ACEOF
26205 if ac_fn_c_try_compile "$LINENO"
26206 then :
26207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26208 /* end confdefs.h.  */
26209 #include <sys/select.h>
26210 int
26211 main (void)
26212 {
26213
26214                   #undef memset
26215                   #define memset nonexistent_memset
26216                   extern
26217                   #ifdef __cplusplus
26218                   "C"
26219                   #endif
26220                   void *memset (void *, int, unsigned long);
26221                   #undef bzero
26222                   #define bzero nonexistent_bzero
26223                   extern
26224                   #ifdef __cplusplus
26225                   "C"
26226                   #endif
26227                   void bzero (void *, unsigned long);
26228                   fd_set fds;
26229                   FD_ZERO (&fds);
26230
26231   ;
26232   return 0;
26233 }
26234
26235 _ACEOF
26236 if ac_fn_c_try_link "$LINENO"
26237 then :
26238
26239 else case e in #(
26240   e) gl_cv_header_sys_select_h_selfcontained=no ;;
26241 esac
26242 fi
26243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26244     conftest$ac_exeext conftest.$ac_ext
26245
26246 fi
26247 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26248       fi
26249      ;;
26250 esac
26251 fi
26252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26253 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263      if test $gl_cv_have_include_next = yes; then
26264        gl_cv_next_sys_select_h='<'sys/select.h'>'
26265      else
26266        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26267 printf %s "checking absolute name of <sys/select.h>... " >&6; }
26268 if test ${gl_cv_next_sys_select_h+y}
26269 then :
26270   printf %s "(cached) " >&6
26271 else case e in #(
26272   e)
26273              if test $ac_cv_header_sys_select_h = yes; then
26274
26275
26276
26277
26278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26279 /* end confdefs.h.  */
26280 #include <sys/select.h>
26281 _ACEOF
26282                 case "$host_os" in
26283     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26284     *)    gl_absname_cpp="$ac_cpp" ;;
26285   esac
26286
26287   case "$host_os" in
26288     mingw*)
26289                                           gl_dirsep_regex='[/\\]'
26290       ;;
26291     *)
26292       gl_dirsep_regex='\/'
26293       ;;
26294   esac
26295       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26296   gl_header_literal_regex=`echo 'sys/select.h' \
26297                            | sed -e "$gl_make_literal_regex_sed"`
26298   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26299       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26300       s|^/[^/]|//&|
26301       p
26302       q
26303     }'
26304
26305         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26306   sed -n "$gl_absolute_header_sed"`
26307
26308           gl_header=$gl_cv_absolute_sys_select_h
26309           gl_cv_next_sys_select_h='"'$gl_header'"'
26310           else
26311                gl_cv_next_sys_select_h='<'sys/select.h'>'
26312              fi
26313
26314           ;;
26315 esac
26316 fi
26317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26318 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
26319      fi
26320      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26321
26322      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26323        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26324        gl_next_as_first_directive='<'sys/select.h'>'
26325      else
26326        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26327        gl_next_as_first_directive=$gl_cv_next_sys_select_h
26328      fi
26329      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26330
26331
26332
26333
26334   if test $ac_cv_header_sys_select_h = yes; then
26335     HAVE_SYS_SELECT_H=1
26336   else
26337     HAVE_SYS_SELECT_H=0
26338   fi
26339
26340
26341
26342
26343
26344   if test $ac_cv_header_sys_socket_h != yes; then
26345                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26346 if test "x$ac_cv_header_winsock2_h" = xyes
26347 then :
26348   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
26349
26350 fi
26351
26352   fi
26353   if test "$ac_cv_header_winsock2_h" = yes; then
26354     HAVE_WINSOCK2_H=1
26355     UNISTD_H_HAVE_WINSOCK2_H=1
26356     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26357   else
26358     HAVE_WINSOCK2_H=0
26359   fi
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370   GL_GNULIB_PSELECT=0
26371
26372
26373
26374   GL_GNULIB_SELECT=0
26375
26376
26377
26378
26379     HAVE_PTHREAD_T=1;
26380   HAVE_PTHREAD_SPINLOCK_T=1;
26381   HAVE_PTHREAD_CREATE_DETACHED=1;
26382   HAVE_PTHREAD_MUTEX_RECURSIVE=1;
26383   HAVE_PTHREAD_MUTEX_ROBUST=1;
26384   HAVE_PTHREAD_PROCESS_SHARED=1;
26385   HAVE_PTHREAD_CREATE=1;
26386   HAVE_PTHREAD_ATTR_INIT=1;
26387   HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
26388   HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
26389   HAVE_PTHREAD_ATTR_DESTROY=1;
26390   HAVE_PTHREAD_SELF=1;
26391   HAVE_PTHREAD_EQUAL=1;
26392   HAVE_PTHREAD_DETACH=1;
26393   HAVE_PTHREAD_JOIN=1;
26394   HAVE_PTHREAD_EXIT=1;
26395   HAVE_PTHREAD_ONCE=1;
26396   HAVE_PTHREAD_MUTEX_INIT=1;
26397   HAVE_PTHREAD_MUTEXATTR_INIT=1;
26398   HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
26399   HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
26400   HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
26401   HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
26402   HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
26403   HAVE_PTHREAD_MUTEX_LOCK=1;
26404   HAVE_PTHREAD_MUTEX_TRYLOCK=1;
26405   HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
26406   HAVE_PTHREAD_MUTEX_UNLOCK=1;
26407   HAVE_PTHREAD_MUTEX_DESTROY=1;
26408   HAVE_PTHREAD_RWLOCK_INIT=1;
26409   HAVE_PTHREAD_RWLOCKATTR_INIT=1;
26410   HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
26411   HAVE_PTHREAD_RWLOCK_RDLOCK=1;
26412   HAVE_PTHREAD_RWLOCK_WRLOCK=1;
26413   HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
26414   HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
26415   HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
26416   HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
26417   HAVE_PTHREAD_RWLOCK_UNLOCK=1;
26418   HAVE_PTHREAD_RWLOCK_DESTROY=1;
26419   HAVE_PTHREAD_COND_INIT=1;
26420   HAVE_PTHREAD_CONDATTR_INIT=1;
26421   HAVE_PTHREAD_CONDATTR_DESTROY=1;
26422   HAVE_PTHREAD_COND_WAIT=1;
26423   HAVE_PTHREAD_COND_TIMEDWAIT=1;
26424   HAVE_PTHREAD_COND_SIGNAL=1;
26425   HAVE_PTHREAD_COND_BROADCAST=1;
26426   HAVE_PTHREAD_COND_DESTROY=1;
26427   HAVE_PTHREAD_KEY_CREATE=1;
26428   HAVE_PTHREAD_SETSPECIFIC=1;
26429   HAVE_PTHREAD_GETSPECIFIC=1;
26430   HAVE_PTHREAD_KEY_DELETE=1;
26431   HAVE_PTHREAD_SPIN_INIT=1;
26432   HAVE_PTHREAD_SPIN_LOCK=1;
26433   HAVE_PTHREAD_SPIN_TRYLOCK=1;
26434   HAVE_PTHREAD_SPIN_UNLOCK=1;
26435   HAVE_PTHREAD_SPIN_DESTROY=1;
26436   REPLACE_PTHREAD_CREATE=0;
26437   REPLACE_PTHREAD_ATTR_INIT=0;
26438   REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
26439   REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
26440   REPLACE_PTHREAD_ATTR_DESTROY=0;
26441   REPLACE_PTHREAD_SELF=0;
26442   REPLACE_PTHREAD_EQUAL=0;
26443   REPLACE_PTHREAD_DETACH=0;
26444   REPLACE_PTHREAD_JOIN=0;
26445   REPLACE_PTHREAD_EXIT=0;
26446   REPLACE_PTHREAD_ONCE=0;
26447   REPLACE_PTHREAD_MUTEX_INIT=0;
26448   REPLACE_PTHREAD_MUTEXATTR_INIT=0;
26449   REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
26450   REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
26451   REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
26452   REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
26453   REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
26454   REPLACE_PTHREAD_MUTEX_LOCK=0;
26455   REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
26456   REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
26457   REPLACE_PTHREAD_MUTEX_UNLOCK=0;
26458   REPLACE_PTHREAD_MUTEX_DESTROY=0;
26459   REPLACE_PTHREAD_RWLOCK_INIT=0;
26460   REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
26461   REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
26462   REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
26463   REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
26464   REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
26465   REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
26466   REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
26467   REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
26468   REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
26469   REPLACE_PTHREAD_RWLOCK_DESTROY=0;
26470   REPLACE_PTHREAD_COND_INIT=0;
26471   REPLACE_PTHREAD_CONDATTR_INIT=0;
26472   REPLACE_PTHREAD_CONDATTR_DESTROY=0;
26473   REPLACE_PTHREAD_COND_WAIT=0;
26474   REPLACE_PTHREAD_COND_TIMEDWAIT=0;
26475   REPLACE_PTHREAD_COND_SIGNAL=0;
26476   REPLACE_PTHREAD_COND_BROADCAST=0;
26477   REPLACE_PTHREAD_COND_DESTROY=0;
26478   REPLACE_PTHREAD_KEY_CREATE=0;
26479   REPLACE_PTHREAD_SETSPECIFIC=0;
26480   REPLACE_PTHREAD_GETSPECIFIC=0;
26481   REPLACE_PTHREAD_KEY_DELETE=0;
26482   REPLACE_PTHREAD_SPIN_INIT=0;
26483   REPLACE_PTHREAD_SPIN_LOCK=0;
26484   REPLACE_PTHREAD_SPIN_TRYLOCK=0;
26485   REPLACE_PTHREAD_SPIN_UNLOCK=0;
26486   REPLACE_PTHREAD_SPIN_DESTROY=0;
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504      if test $gl_cv_have_include_next = yes; then
26505        gl_cv_next_pthread_h='<'pthread.h'>'
26506      else
26507        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
26508 printf %s "checking absolute name of <pthread.h>... " >&6; }
26509 if test ${gl_cv_next_pthread_h+y}
26510 then :
26511   printf %s "(cached) " >&6
26512 else case e in #(
26513   e)
26514              if test $ac_cv_header_pthread_h = yes; then
26515
26516
26517
26518
26519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26520 /* end confdefs.h.  */
26521 #include <pthread.h>
26522 _ACEOF
26523                 case "$host_os" in
26524     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26525     *)    gl_absname_cpp="$ac_cpp" ;;
26526   esac
26527
26528   case "$host_os" in
26529     mingw*)
26530                                           gl_dirsep_regex='[/\\]'
26531       ;;
26532     *)
26533       gl_dirsep_regex='\/'
26534       ;;
26535   esac
26536       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26537   gl_header_literal_regex=`echo 'pthread.h' \
26538                            | sed -e "$gl_make_literal_regex_sed"`
26539   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26540       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26541       s|^/[^/]|//&|
26542       p
26543       q
26544     }'
26545
26546         gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26547   sed -n "$gl_absolute_header_sed"`
26548
26549           gl_header=$gl_cv_absolute_pthread_h
26550           gl_cv_next_pthread_h='"'$gl_header'"'
26551           else
26552                gl_cv_next_pthread_h='<'pthread.h'>'
26553              fi
26554
26555           ;;
26556 esac
26557 fi
26558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
26559 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
26560      fi
26561      NEXT_PTHREAD_H=$gl_cv_next_pthread_h
26562
26563      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26564        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26565        gl_next_as_first_directive='<'pthread.h'>'
26566      else
26567        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26568        gl_next_as_first_directive=$gl_cv_next_pthread_h
26569      fi
26570      NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
26571
26572
26573
26574
26575   if test $ac_cv_header_pthread_h = yes; then
26576     HAVE_PTHREAD_H=1
26577
26578
26579       if { case "$host_os" in mingw*) true;; *) false;; esac; } \
26580          && test $gl_threads_api = windows; then
26581         HAVE_PTHREAD_H=0
26582       fi
26583
26584   else
26585     HAVE_PTHREAD_H=0
26586   fi
26587
26588
26589   ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
26590      #if HAVE_PTHREAD_H
26591       #include <pthread.h>
26592      #endif
26593 "
26594 if test "x$ac_cv_type_pthread_t" = xyes
26595 then :
26596
26597 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
26598
26599
26600 fi
26601 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
26602      #if HAVE_PTHREAD_H
26603       #include <pthread.h>
26604      #endif
26605 "
26606 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
26607 then :
26608
26609 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
26610
26611
26612 fi
26613
26614   if test $ac_cv_type_pthread_t != yes; then
26615     HAVE_PTHREAD_T=0
26616   fi
26617   if test $ac_cv_type_pthread_spinlock_t != yes; then
26618     HAVE_PTHREAD_SPINLOCK_T=0
26619   fi
26620
26621
26622   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
26623 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
26624 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
26625 then :
26626   printf %s "(cached) " >&6
26627 else case e in #(
26628   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26629 /* end confdefs.h.  */
26630 #include <pthread.h>
26631             int x = PTHREAD_CREATE_DETACHED;
26632
26633 int
26634 main (void)
26635 {
26636
26637   ;
26638   return 0;
26639 }
26640 _ACEOF
26641 if ac_fn_c_try_compile "$LINENO"
26642 then :
26643   gl_cv_const_PTHREAD_CREATE_DETACHED=yes
26644 else case e in #(
26645   e) gl_cv_const_PTHREAD_CREATE_DETACHED=no ;;
26646 esac
26647 fi
26648 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26649      ;;
26650 esac
26651 fi
26652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
26653 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
26654   if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
26655     HAVE_PTHREAD_CREATE_DETACHED=0
26656   fi
26657
26658   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
26659 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
26660 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
26661 then :
26662   printf %s "(cached) " >&6
26663 else case e in #(
26664   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26665 /* end confdefs.h.  */
26666 #include <pthread.h>
26667             int x = PTHREAD_MUTEX_RECURSIVE;
26668
26669 int
26670 main (void)
26671 {
26672
26673   ;
26674   return 0;
26675 }
26676 _ACEOF
26677 if ac_fn_c_try_compile "$LINENO"
26678 then :
26679   gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
26680 else case e in #(
26681   e) gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no ;;
26682 esac
26683 fi
26684 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26685      ;;
26686 esac
26687 fi
26688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
26689 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
26690   if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
26691     HAVE_PTHREAD_MUTEX_RECURSIVE=0
26692   fi
26693
26694   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
26695 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
26696 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
26697 then :
26698   printf %s "(cached) " >&6
26699 else case e in #(
26700   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26701 /* end confdefs.h.  */
26702 #include <pthread.h>
26703             int x = PTHREAD_MUTEX_ROBUST;
26704
26705 int
26706 main (void)
26707 {
26708
26709   ;
26710   return 0;
26711 }
26712 _ACEOF
26713 if ac_fn_c_try_compile "$LINENO"
26714 then :
26715   gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
26716 else case e in #(
26717   e) gl_cv_const_PTHREAD_MUTEX_ROBUST=no ;;
26718 esac
26719 fi
26720 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26721      ;;
26722 esac
26723 fi
26724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
26725 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
26726   if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
26727     HAVE_PTHREAD_MUTEX_ROBUST=0
26728   fi
26729
26730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
26731 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
26732 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
26733 then :
26734   printf %s "(cached) " >&6
26735 else case e in #(
26736   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26737 /* end confdefs.h.  */
26738 #include <pthread.h>
26739             int x = PTHREAD_PROCESS_SHARED;
26740
26741 int
26742 main (void)
26743 {
26744
26745   ;
26746   return 0;
26747 }
26748 _ACEOF
26749 if ac_fn_c_try_compile "$LINENO"
26750 then :
26751   gl_cv_const_PTHREAD_PROCESS_SHARED=yes
26752 else case e in #(
26753   e) gl_cv_const_PTHREAD_PROCESS_SHARED=no ;;
26754 esac
26755 fi
26756 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26757      ;;
26758 esac
26759 fi
26760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
26761 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
26762   if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
26763     HAVE_PTHREAD_PROCESS_SHARED=0
26764   fi
26765
26766
26767
26768
26769
26770
26771
26772     LIB_PTHREAD="$LIBPMULTITHREAD"
26773
26774
26775
26776
26777   GL_GNULIB_PTHREAD_THREAD=0
26778
26779
26780
26781   GL_GNULIB_PTHREAD_ONCE=0
26782
26783
26784
26785   GL_GNULIB_PTHREAD_MUTEX=0
26786
26787
26788
26789   GL_GNULIB_PTHREAD_RWLOCK=0
26790
26791
26792
26793   GL_GNULIB_PTHREAD_COND=0
26794
26795
26796
26797   GL_GNULIB_PTHREAD_TSS=0
26798
26799
26800
26801   GL_GNULIB_PTHREAD_SPIN=0
26802
26803
26804
26805   GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
26806
26807
26808
26809
26810
26811     HAVE_SCHED_YIELD=1;
26812   REPLACE_SCHED_YIELD=0;
26813
26814
26815
26816
26817
26818
26819
26820   ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
26821        #include <sys/cdefs.h>
26822       #endif
26823
26824 "
26825 if test "x$ac_cv_header_sched_h" = xyes
26826 then :
26827   printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
26828
26829 fi
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839      if test $gl_cv_have_include_next = yes; then
26840        gl_cv_next_sched_h='<'sched.h'>'
26841      else
26842        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
26843 printf %s "checking absolute name of <sched.h>... " >&6; }
26844 if test ${gl_cv_next_sched_h+y}
26845 then :
26846   printf %s "(cached) " >&6
26847 else case e in #(
26848   e)
26849
26850
26851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26852 /* end confdefs.h.  */
26853 #include <sched.h>
26854 _ACEOF
26855                 case "$host_os" in
26856     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26857     *)    gl_absname_cpp="$ac_cpp" ;;
26858   esac
26859
26860   case "$host_os" in
26861     mingw*)
26862                                           gl_dirsep_regex='[/\\]'
26863       ;;
26864     *)
26865       gl_dirsep_regex='\/'
26866       ;;
26867   esac
26868       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26869   gl_header_literal_regex=`echo 'sched.h' \
26870                            | sed -e "$gl_make_literal_regex_sed"`
26871   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26872       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26873       s|^/[^/]|//&|
26874       p
26875       q
26876     }'
26877
26878         gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26879   sed -n "$gl_absolute_header_sed"`
26880
26881           gl_header=$gl_cv_absolute_sched_h
26882           gl_cv_next_sched_h='"'$gl_header'"'
26883
26884           ;;
26885 esac
26886 fi
26887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
26888 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
26889      fi
26890      NEXT_SCHED_H=$gl_cv_next_sched_h
26891
26892      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26893        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26894        gl_next_as_first_directive='<'sched.h'>'
26895      else
26896        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26897        gl_next_as_first_directive=$gl_cv_next_sched_h
26898      fi
26899      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
26900
26901
26902
26903
26904
26905   if test "$ac_cv_header_sched_h" = yes; then
26906     HAVE_SCHED_H=1
26907   else
26908     HAVE_SCHED_H=0
26909   fi
26910
26911
26912   if test "$HAVE_SCHED_H" = 1; then
26913     ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
26914          #include <sys/cdefs.h>
26915         #endif
26916         #include <sched.h>
26917
26918 "
26919 if test "x$ac_cv_type_struct_sched_param" = xyes
26920 then :
26921   HAVE_STRUCT_SCHED_PARAM=1
26922 else case e in #(
26923   e) HAVE_STRUCT_SCHED_PARAM=0 ;;
26924 esac
26925 fi
26926
26927   else
26928     HAVE_STRUCT_SCHED_PARAM=0
26929     case "$host_os" in
26930       os2*)
26931                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
26932 "
26933 if test "x$ac_cv_type_struct_sched_param" = xyes
26934 then :
26935   HAVE_STRUCT_SCHED_PARAM=1
26936 fi
26937
26938         ;;
26939       vms)
26940                 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
26941 "
26942 if test "x$ac_cv_type_struct_sched_param" = xyes
26943 then :
26944   HAVE_STRUCT_SCHED_PARAM=1
26945 fi
26946
26947         ;;
26948     esac
26949   fi
26950
26951
26952   if test "$ac_cv_header_sys_cdefs_h" = yes; then
26953     HAVE_SYS_CDEFS_H=1
26954   else
26955     HAVE_SYS_CDEFS_H=0
26956   fi
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967   GL_GNULIB_SCHED_YIELD=0
26968
26969
26970
26971
26972
26973
26974
26975
26976   if test $ac_cv_header_sys_socket_h != yes; then
26977                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26978 if test "x$ac_cv_header_winsock2_h" = xyes
26979 then :
26980   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
26981
26982 fi
26983
26984   fi
26985   if test "$ac_cv_header_winsock2_h" = yes; then
26986     HAVE_WINSOCK2_H=1
26987     UNISTD_H_HAVE_WINSOCK2_H=1
26988     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26989   else
26990     HAVE_WINSOCK2_H=0
26991   fi
26992
26993    LIBSOCKET=
26994   if test $HAVE_WINSOCK2_H = 1; then
26995                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
26996 printf %s "checking for WSAStartup... " >&6; }
26997 if test ${gl_cv_func_wsastartup+y}
26998 then :
26999   printf %s "(cached) " >&6
27000 else case e in #(
27001   e)
27002        gl_save_LIBS="$LIBS"
27003        LIBS="$LIBS -lws2_32"
27004        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27005 /* end confdefs.h.  */
27006
27007 #ifdef HAVE_WINSOCK2_H
27008 # include <winsock2.h>
27009 #endif
27010 int
27011 main (void)
27012 {
27013
27014             WORD wVersionRequested = MAKEWORD(1, 1);
27015             WSADATA wsaData;
27016             int err = WSAStartup(wVersionRequested, &wsaData);
27017             WSACleanup ();
27018
27019   ;
27020   return 0;
27021 }
27022
27023 _ACEOF
27024 if ac_fn_c_try_link "$LINENO"
27025 then :
27026   gl_cv_func_wsastartup=yes
27027 else case e in #(
27028   e) gl_cv_func_wsastartup=no ;;
27029 esac
27030 fi
27031 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27032     conftest$ac_exeext conftest.$ac_ext
27033        LIBS="$gl_save_LIBS"
27034        ;;
27035 esac
27036 fi
27037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
27038 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
27039     if test "$gl_cv_func_wsastartup" = "yes"; then
27040
27041 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
27042
27043       LIBSOCKET='-lws2_32'
27044     fi
27045   else
27046                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
27047 printf %s "checking for library containing setsockopt... " >&6; }
27048 if test ${gl_cv_lib_socket+y}
27049 then :
27050   printf %s "(cached) " >&6
27051 else case e in #(
27052   e)
27053       gl_cv_lib_socket=
27054       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27055 /* end confdefs.h.  */
27056 extern
27057 #ifdef __cplusplus
27058 "C"
27059 #endif
27060 char setsockopt();
27061 int
27062 main (void)
27063 {
27064 setsockopt();
27065   ;
27066   return 0;
27067 }
27068 _ACEOF
27069 if ac_fn_c_try_link "$LINENO"
27070 then :
27071
27072 else case e in #(
27073   e) gl_save_LIBS="$LIBS"
27074          LIBS="$gl_save_LIBS -lsocket"
27075          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27076 /* end confdefs.h.  */
27077 extern
27078 #ifdef __cplusplus
27079 "C"
27080 #endif
27081 char setsockopt();
27082 int
27083 main (void)
27084 {
27085 setsockopt();
27086   ;
27087   return 0;
27088 }
27089 _ACEOF
27090 if ac_fn_c_try_link "$LINENO"
27091 then :
27092   gl_cv_lib_socket="-lsocket"
27093 fi
27094 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27095     conftest$ac_exeext conftest.$ac_ext
27096          if test -z "$gl_cv_lib_socket"; then
27097            LIBS="$gl_save_LIBS -lnetwork"
27098            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27099 /* end confdefs.h.  */
27100 extern
27101 #ifdef __cplusplus
27102 "C"
27103 #endif
27104 char setsockopt();
27105 int
27106 main (void)
27107 {
27108 setsockopt();
27109   ;
27110   return 0;
27111 }
27112 _ACEOF
27113 if ac_fn_c_try_link "$LINENO"
27114 then :
27115   gl_cv_lib_socket="-lnetwork"
27116 fi
27117 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27118     conftest$ac_exeext conftest.$ac_ext
27119            if test -z "$gl_cv_lib_socket"; then
27120              LIBS="$gl_save_LIBS -lnet"
27121              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27122 /* end confdefs.h.  */
27123 extern
27124 #ifdef __cplusplus
27125 "C"
27126 #endif
27127 char setsockopt();
27128 int
27129 main (void)
27130 {
27131 setsockopt();
27132   ;
27133   return 0;
27134 }
27135 _ACEOF
27136 if ac_fn_c_try_link "$LINENO"
27137 then :
27138   gl_cv_lib_socket="-lnet"
27139 fi
27140 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27141     conftest$ac_exeext conftest.$ac_ext
27142            fi
27143          fi
27144          LIBS="$gl_save_LIBS"
27145          ;;
27146 esac
27147 fi
27148 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27149     conftest$ac_exeext conftest.$ac_ext
27150       if test -z "$gl_cv_lib_socket"; then
27151         gl_cv_lib_socket="none needed"
27152       fi
27153      ;;
27154 esac
27155 fi
27156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
27157 printf "%s\n" "$gl_cv_lib_socket" >&6; }
27158     if test "$gl_cv_lib_socket" != "none needed"; then
27159       LIBSOCKET="$gl_cv_lib_socket"
27160     fi
27161   fi
27162
27163
27164
27165
27166
27167
27168   :
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
27180 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
27181 if test ${gl_cv_func_snprintf_retval_c99+y}
27182 then :
27183   printf %s "(cached) " >&6
27184 else case e in #(
27185   e)
27186       if test "$cross_compiling" = yes
27187 then :
27188   case "$host_os" in
27189                                  # Guess yes on glibc systems.
27190            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
27191                                  # Guess yes on musl systems.
27192            *-musl* | midipix*)   gl_cv_func_snprintf_retval_c99="guessing yes";;
27193                                  # Guess yes on FreeBSD >= 5.
27194            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
27195            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27196            midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
27197                                  # Guess yes on Mac OS X >= 10.3.
27198            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
27199            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
27200                                  # Guess yes on OpenBSD >= 3.9.
27201            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27202                                  gl_cv_func_snprintf_retval_c99="guessing no";;
27203            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
27204                                  # Guess yes on Solaris >= 2.10.
27205            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
27206            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
27207                                  # Guess yes on AIX >= 4.
27208            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
27209            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
27210                                  # Guess yes on NetBSD >= 3.
27211            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27212                                  gl_cv_func_snprintf_retval_c99="guessing no";;
27213            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
27214                                  # Guess yes on BeOS.
27215            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
27216                                  # Guess yes on Android.
27217            linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
27218                                  # Guess yes on MSVC, no on mingw.
27219            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27220 /* end confdefs.h.  */
27221
27222 #ifdef _MSC_VER
27223  Known
27224 #endif
27225
27226 _ACEOF
27227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27228   $EGREP_TRADITIONAL "Known" >/dev/null 2>&1
27229 then :
27230   gl_cv_func_snprintf_retval_c99="guessing yes"
27231 else case e in #(
27232   e) gl_cv_func_snprintf_retval_c99="guessing no" ;;
27233 esac
27234 fi
27235 rm -rf conftest*
27236
27237                                  ;;
27238                                  # If we don't know, obey --enable-cross-guesses.
27239            *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
27240          esac
27241
27242 else case e in #(
27243   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27244 /* end confdefs.h.  */
27245
27246 #include <stdio.h>
27247 #include <string.h>
27248 #if HAVE_SNPRINTF
27249 # define my_snprintf snprintf
27250 #else
27251 # include <stdarg.h>
27252 static int my_snprintf (char *buf, int size, const char *format, ...)
27253 {
27254   va_list args;
27255   int ret;
27256   va_start (args, format);
27257   ret = vsnprintf (buf, size, format, args);
27258   va_end (args);
27259   return ret;
27260 }
27261 #endif
27262 static char buf[100];
27263 int main ()
27264 {
27265   strcpy (buf, "ABCDEF");
27266   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
27267     return 1;
27268   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
27269     return 2;
27270   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
27271     return 3;
27272   return 0;
27273 }
27274 _ACEOF
27275 if ac_fn_c_try_run "$LINENO"
27276 then :
27277   gl_cv_func_snprintf_retval_c99=yes
27278 else case e in #(
27279   e) gl_cv_func_snprintf_retval_c99=no ;;
27280 esac
27281 fi
27282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27283   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27284 esac
27285 fi
27286
27287      ;;
27288 esac
27289 fi
27290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
27291 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
27292
27293
27294
27295      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
27296 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
27297 if test ${gl_cv_func_printf_positions+y}
27298 then :
27299   printf %s "(cached) " >&6
27300 else case e in #(
27301   e)
27302       if test "$cross_compiling" = yes
27303 then :
27304
27305          case "$host_os" in
27306            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
27307                             gl_cv_func_printf_positions="guessing no";;
27308            beos*)           gl_cv_func_printf_positions="guessing no";;
27309                             # Guess yes on Android.
27310            linux*-android*) gl_cv_func_printf_positions="guessing yes";;
27311                             # Guess no on native Windows.
27312            mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
27313            *)               gl_cv_func_printf_positions="guessing yes";;
27314          esac
27315
27316 else case e in #(
27317   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27318 /* end confdefs.h.  */
27319
27320 #include <stdio.h>
27321 #include <string.h>
27322 /* The string "%2$d %1$d", with dollar characters protected from the shell's
27323    dollar expansion (possibly an autoconf bug).  */
27324 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
27325 static char buf[100];
27326 int main ()
27327 {
27328   sprintf (buf, format, 33, 55);
27329   return (strcmp (buf, "55 33") != 0);
27330 }
27331 _ACEOF
27332 if ac_fn_c_try_run "$LINENO"
27333 then :
27334   gl_cv_func_printf_positions=yes
27335 else case e in #(
27336   e) gl_cv_func_printf_positions=no ;;
27337 esac
27338 fi
27339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27340   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27341 esac
27342 fi
27343
27344      ;;
27345 esac
27346 fi
27347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
27348 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
27349
27350 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27351 if test "x$ac_cv_have_decl_snprintf" = xyes
27352 then :
27353   ac_have_decl=1
27354 else case e in #(
27355   e) ac_have_decl=0 ;;
27356 esac
27357 fi
27358 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
27359
27360
27361   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
27362 printf %s "checking where to find the exponent in a 'double'... " >&6; }
27363 if test ${gl_cv_cc_double_expbit0+y}
27364 then :
27365   printf %s "(cached) " >&6
27366 else case e in #(
27367   e)
27368       if test "$cross_compiling" = yes
27369 then :
27370
27371                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27372 /* end confdefs.h.  */
27373
27374 #if defined arm || defined __arm || defined __arm__
27375   mixed_endianness
27376 #endif
27377
27378 _ACEOF
27379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27380   $EGREP_TRADITIONAL "mixed_endianness" >/dev/null 2>&1
27381 then :
27382   gl_cv_cc_double_expbit0="unknown"
27383 else case e in #(
27384   e)
27385                                                          :
27386 if test ${ac_cv_c_bigendian+y}
27387 then :
27388   printf %s "(cached) " >&6
27389 else case e in #(
27390   e) ac_cv_c_bigendian=unknown
27391     # See if we're dealing with a universal compiler.
27392     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27393 /* end confdefs.h.  */
27394 #ifndef __APPLE_CC__
27395                not a universal capable compiler
27396              #endif
27397              typedef int dummy;
27398
27399 _ACEOF
27400 if ac_fn_c_try_compile "$LINENO"
27401 then :
27402
27403         # Check for potential -arch flags.  It is not universal unless
27404         # there are at least two -arch flags with different values.
27405         ac_arch=
27406         ac_prev=
27407         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27408          if test -n "$ac_prev"; then
27409            case $ac_word in
27410              i?86 | x86_64 | ppc | ppc64)
27411                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27412                  ac_arch=$ac_word
27413                else
27414                  ac_cv_c_bigendian=universal
27415                  break
27416                fi
27417                ;;
27418            esac
27419            ac_prev=
27420          elif test "x$ac_word" = "x-arch"; then
27421            ac_prev=arch
27422          fi
27423        done
27424 fi
27425 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27426     if test $ac_cv_c_bigendian = unknown; then
27427       # See if sys/param.h defines the BYTE_ORDER macro.
27428       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27429 /* end confdefs.h.  */
27430 #include <sys/types.h>
27431              #include <sys/param.h>
27432
27433 int
27434 main (void)
27435 {
27436 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
27437                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
27438                      && LITTLE_ENDIAN)
27439               bogus endian macros
27440              #endif
27441
27442   ;
27443   return 0;
27444 }
27445 _ACEOF
27446 if ac_fn_c_try_compile "$LINENO"
27447 then :
27448   # It does; now see whether it defined to BIG_ENDIAN or not.
27449          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27450 /* end confdefs.h.  */
27451 #include <sys/types.h>
27452                 #include <sys/param.h>
27453
27454 int
27455 main (void)
27456 {
27457 #if BYTE_ORDER != BIG_ENDIAN
27458                  not big endian
27459                 #endif
27460
27461   ;
27462   return 0;
27463 }
27464 _ACEOF
27465 if ac_fn_c_try_compile "$LINENO"
27466 then :
27467   ac_cv_c_bigendian=yes
27468 else case e in #(
27469   e) ac_cv_c_bigendian=no ;;
27470 esac
27471 fi
27472 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27473 fi
27474 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27475     fi
27476     if test $ac_cv_c_bigendian = unknown; then
27477       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27478       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27479 /* end confdefs.h.  */
27480 #include <limits.h>
27481
27482 int
27483 main (void)
27484 {
27485 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27486               bogus endian macros
27487              #endif
27488
27489   ;
27490   return 0;
27491 }
27492 _ACEOF
27493 if ac_fn_c_try_compile "$LINENO"
27494 then :
27495   # It does; now see whether it defined to _BIG_ENDIAN or not.
27496          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27497 /* end confdefs.h.  */
27498 #include <limits.h>
27499
27500 int
27501 main (void)
27502 {
27503 #ifndef _BIG_ENDIAN
27504                  not big endian
27505                 #endif
27506
27507   ;
27508   return 0;
27509 }
27510 _ACEOF
27511 if ac_fn_c_try_compile "$LINENO"
27512 then :
27513   ac_cv_c_bigendian=yes
27514 else case e in #(
27515   e) ac_cv_c_bigendian=no ;;
27516 esac
27517 fi
27518 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27519 fi
27520 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27521     fi
27522     if test $ac_cv_c_bigendian = unknown; then
27523       # Compile a test program.
27524       if test "$cross_compiling" = yes
27525 then :
27526   # Try to guess by grepping values from an object file.
27527          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27528 /* end confdefs.h.  */
27529 unsigned short int ascii_mm[] =
27530                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27531                 unsigned short int ascii_ii[] =
27532                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27533                 int use_ascii (int i) {
27534                   return ascii_mm[i] + ascii_ii[i];
27535                 }
27536                 unsigned short int ebcdic_ii[] =
27537                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27538                 unsigned short int ebcdic_mm[] =
27539                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27540                 int use_ebcdic (int i) {
27541                   return ebcdic_mm[i] + ebcdic_ii[i];
27542                 }
27543                 int
27544                 main (int argc, char **argv)
27545                 {
27546                   /* Intimidate the compiler so that it does not
27547                      optimize the arrays away.  */
27548                   char *p = argv[0];
27549                   ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
27550                   ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
27551                   return use_ascii (argc) == use_ebcdic (*p);
27552                 }
27553 _ACEOF
27554 if ac_fn_c_try_link "$LINENO"
27555 then :
27556   if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
27557               ac_cv_c_bigendian=yes
27558             fi
27559             if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
27560               if test "$ac_cv_c_bigendian" = unknown; then
27561                 ac_cv_c_bigendian=no
27562               else
27563                 # finding both strings is unlikely to happen, but who knows?
27564                 ac_cv_c_bigendian=unknown
27565               fi
27566             fi
27567 fi
27568 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27569     conftest$ac_exeext conftest.$ac_ext
27570 else case e in #(
27571   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27572 /* end confdefs.h.  */
27573 $ac_includes_default
27574 int
27575 main (void)
27576 {
27577
27578              /* Are we little or big endian?  From Harbison&Steele.  */
27579              union
27580              {
27581                long int l;
27582                char c[sizeof (long int)];
27583              } u;
27584              u.l = 1;
27585              return u.c[sizeof (long int) - 1] == 1;
27586
27587   ;
27588   return 0;
27589 }
27590 _ACEOF
27591 if ac_fn_c_try_run "$LINENO"
27592 then :
27593   ac_cv_c_bigendian=no
27594 else case e in #(
27595   e) ac_cv_c_bigendian=yes ;;
27596 esac
27597 fi
27598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27599   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27600 esac
27601 fi
27602
27603     fi ;;
27604 esac
27605 fi
27606 :
27607  case $ac_cv_c_bigendian in #(
27608    yes)
27609      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
27610    no)
27611      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
27612    universal)
27613
27614 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
27615
27616      ;; #(
27617    *)
27618      gl_cv_cc_double_expbit0="unknown" ;;
27619  esac
27620
27621                                                        ;;
27622 esac
27623 fi
27624 rm -rf conftest*
27625
27626
27627 else case e in #(
27628   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27629 /* end confdefs.h.  */
27630
27631 #include <float.h>
27632 #include <stddef.h>
27633 #include <stdio.h>
27634 #include <string.h>
27635 #define NWORDS \
27636   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27637 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
27638 static unsigned int ored_words[NWORDS];
27639 static unsigned int anded_words[NWORDS];
27640 static void add_to_ored_words (double x)
27641 {
27642   memory_double m;
27643   size_t i;
27644   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
27645   memset (&m, 0, sizeof (memory_double));
27646   m.value = x;
27647   for (i = 0; i < NWORDS; i++)
27648     {
27649       ored_words[i] |= m.word[i];
27650       anded_words[i] &= m.word[i];
27651     }
27652 }
27653 int main ()
27654 {
27655   size_t j;
27656   FILE *fp = fopen ("conftest.out", "w");
27657   if (fp == NULL)
27658     return 1;
27659   for (j = 0; j < NWORDS; j++)
27660     anded_words[j] = ~ (unsigned int) 0;
27661   add_to_ored_words (0.25);
27662   add_to_ored_words (0.5);
27663   add_to_ored_words (1.0);
27664   add_to_ored_words (2.0);
27665   add_to_ored_words (4.0);
27666   /* Remove bits that are common (e.g. if representation of the first mantissa
27667      bit is explicit).  */
27668   for (j = 0; j < NWORDS; j++)
27669     ored_words[j] &= ~anded_words[j];
27670   /* Now find the nonzero word.  */
27671   for (j = 0; j < NWORDS; j++)
27672     if (ored_words[j] != 0)
27673       break;
27674   if (j < NWORDS)
27675     {
27676       size_t i;
27677       for (i = j + 1; i < NWORDS; i++)
27678         if (ored_words[i] != 0)
27679           {
27680             fprintf (fp, "unknown");
27681             return (fclose (fp) != 0);
27682           }
27683       for (i = 0; ; i++)
27684         if ((ored_words[j] >> i) & 1)
27685           {
27686             fprintf (fp, "word %d bit %d", (int) j, (int) i);
27687             return (fclose (fp) != 0);
27688           }
27689     }
27690   fprintf (fp, "unknown");
27691   return (fclose (fp) != 0);
27692 }
27693
27694 _ACEOF
27695 if ac_fn_c_try_run "$LINENO"
27696 then :
27697   gl_cv_cc_double_expbit0=`cat conftest.out`
27698 else case e in #(
27699   e) gl_cv_cc_double_expbit0="unknown" ;;
27700 esac
27701 fi
27702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27703   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27704 esac
27705 fi
27706
27707       rm -f conftest.out
27708      ;;
27709 esac
27710 fi
27711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
27712 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
27713   case "$gl_cv_cc_double_expbit0" in
27714     word*bit*)
27715       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27716       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
27717
27718 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
27719
27720
27721 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
27722
27723       ;;
27724   esac
27725
27726
27727
27728
27729
27730
27731   if test $ac_cv_header_sys_ioctl_h = yes; then
27732     HAVE_SYS_IOCTL_H=1
27733             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
27734 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
27735 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
27736 then :
27737   printf %s "(cached) " >&6
27738 else case e in #(
27739   e)        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27740 /* end confdefs.h.  */
27741 #include <sys/ioctl.h>
27742 int
27743 main (void)
27744 {
27745 (void) ioctl;
27746   ;
27747   return 0;
27748 }
27749 _ACEOF
27750 if ac_fn_c_try_compile "$LINENO"
27751 then :
27752   gl_cv_decl_ioctl_in_sys_ioctl_h=yes
27753 else case e in #(
27754   e) gl_cv_decl_ioctl_in_sys_ioctl_h=no ;;
27755 esac
27756 fi
27757 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27758        ;;
27759 esac
27760 fi
27761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
27762 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
27763   else
27764     HAVE_SYS_IOCTL_H=0
27765   fi
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776      if test $gl_cv_have_include_next = yes; then
27777        gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
27778      else
27779        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
27780 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
27781 if test ${gl_cv_next_sys_ioctl_h+y}
27782 then :
27783   printf %s "(cached) " >&6
27784 else case e in #(
27785   e)
27786              if test $ac_cv_header_sys_ioctl_h = yes; then
27787
27788
27789
27790
27791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27792 /* end confdefs.h.  */
27793 #include <sys/ioctl.h>
27794 _ACEOF
27795                 case "$host_os" in
27796     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27797     *)    gl_absname_cpp="$ac_cpp" ;;
27798   esac
27799
27800   case "$host_os" in
27801     mingw*)
27802                                           gl_dirsep_regex='[/\\]'
27803       ;;
27804     *)
27805       gl_dirsep_regex='\/'
27806       ;;
27807   esac
27808       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27809   gl_header_literal_regex=`echo 'sys/ioctl.h' \
27810                            | sed -e "$gl_make_literal_regex_sed"`
27811   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27812       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27813       s|^/[^/]|//&|
27814       p
27815       q
27816     }'
27817
27818         gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27819   sed -n "$gl_absolute_header_sed"`
27820
27821           gl_header=$gl_cv_absolute_sys_ioctl_h
27822           gl_cv_next_sys_ioctl_h='"'$gl_header'"'
27823           else
27824                gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
27825              fi
27826
27827           ;;
27828 esac
27829 fi
27830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
27831 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
27832      fi
27833      NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
27834
27835      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27836        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27837        gl_next_as_first_directive='<'sys/ioctl.h'>'
27838      else
27839        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27840        gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
27841      fi
27842      NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867      if test $gl_cv_have_include_next = yes; then
27868        gl_cv_next_sys_uio_h='<'sys/uio.h'>'
27869      else
27870        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
27871 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
27872 if test ${gl_cv_next_sys_uio_h+y}
27873 then :
27874   printf %s "(cached) " >&6
27875 else case e in #(
27876   e)
27877              if test $ac_cv_header_sys_uio_h = yes; then
27878
27879
27880
27881
27882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27883 /* end confdefs.h.  */
27884 #include <sys/uio.h>
27885 _ACEOF
27886                 case "$host_os" in
27887     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27888     *)    gl_absname_cpp="$ac_cpp" ;;
27889   esac
27890
27891   case "$host_os" in
27892     mingw*)
27893                                           gl_dirsep_regex='[/\\]'
27894       ;;
27895     *)
27896       gl_dirsep_regex='\/'
27897       ;;
27898   esac
27899       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27900   gl_header_literal_regex=`echo 'sys/uio.h' \
27901                            | sed -e "$gl_make_literal_regex_sed"`
27902   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27903       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27904       s|^/[^/]|//&|
27905       p
27906       q
27907     }'
27908
27909         gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27910   sed -n "$gl_absolute_header_sed"`
27911
27912           gl_header=$gl_cv_absolute_sys_uio_h
27913           gl_cv_next_sys_uio_h='"'$gl_header'"'
27914           else
27915                gl_cv_next_sys_uio_h='<'sys/uio.h'>'
27916              fi
27917
27918           ;;
27919 esac
27920 fi
27921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
27922 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
27923      fi
27924      NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
27925
27926      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27927        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27928        gl_next_as_first_directive='<'sys/uio.h'>'
27929      else
27930        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27931        gl_next_as_first_directive=$gl_cv_next_sys_uio_h
27932      fi
27933      NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
27934
27935
27936
27937
27938   if test $ac_cv_header_sys_uio_h = yes; then
27939     HAVE_SYS_UIO_H=1
27940   else
27941     HAVE_SYS_UIO_H=0
27942   fi
27943
27944
27945
27946
27947
27948
27949   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
27950 printf %s "checking for inttypes.h... " >&6; }
27951 if test ${gl_cv_header_inttypes_h+y}
27952 then :
27953   printf %s "(cached) " >&6
27954 else case e in #(
27955   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27956 /* end confdefs.h.  */
27957
27958 #include <sys/types.h>
27959 #include <inttypes.h>
27960
27961 int
27962 main (void)
27963 {
27964 uintmax_t i = (uintmax_t) -1; return !i;
27965   ;
27966   return 0;
27967 }
27968 _ACEOF
27969 if ac_fn_c_try_compile "$LINENO"
27970 then :
27971   gl_cv_header_inttypes_h=yes
27972 else case e in #(
27973   e) gl_cv_header_inttypes_h=no ;;
27974 esac
27975 fi
27976 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27977 esac
27978 fi
27979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
27980 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
27981   if test $gl_cv_header_inttypes_h = yes; then
27982
27983 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
27984
27985   fi
27986
27987
27988   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
27989 printf %s "checking for stdint.h... " >&6; }
27990 if test ${gl_cv_header_stdint_h+y}
27991 then :
27992   printf %s "(cached) " >&6
27993 else case e in #(
27994   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27995 /* end confdefs.h.  */
27996 #include <sys/types.h>
27997             #include <stdint.h>
27998 int
27999 main (void)
28000 {
28001 uintmax_t i = (uintmax_t) -1; return !i;
28002   ;
28003   return 0;
28004 }
28005 _ACEOF
28006 if ac_fn_c_try_compile "$LINENO"
28007 then :
28008   gl_cv_header_stdint_h=yes
28009 else case e in #(
28010   e) gl_cv_header_stdint_h=no ;;
28011 esac
28012 fi
28013 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28014 esac
28015 fi
28016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
28017 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
28018   if test $gl_cv_header_stdint_h = yes; then
28019
28020 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
28021
28022   fi
28023
28024
28025
28026
28027   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
28028 printf %s "checking for intmax_t... " >&6; }
28029 if test ${gt_cv_c_intmax_t+y}
28030 then :
28031   printf %s "(cached) " >&6
28032 else case e in #(
28033   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28034 /* end confdefs.h.  */
28035
28036 #include <stddef.h>
28037 #include <stdlib.h>
28038 #if HAVE_STDINT_H_WITH_UINTMAX
28039 #include <stdint.h>
28040 #endif
28041 #if HAVE_INTTYPES_H_WITH_UINTMAX
28042 #include <inttypes.h>
28043 #endif
28044
28045 int
28046 main (void)
28047 {
28048 intmax_t x = -1; return !x;
28049   ;
28050   return 0;
28051 }
28052 _ACEOF
28053 if ac_fn_c_try_compile "$LINENO"
28054 then :
28055   gt_cv_c_intmax_t=yes
28056 else case e in #(
28057   e) gt_cv_c_intmax_t=no ;;
28058 esac
28059 fi
28060 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28061 esac
28062 fi
28063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
28064 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
28065   if test $gt_cv_c_intmax_t = yes; then
28066
28067 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
28068
28069   else
28070
28071 printf "%s\n" "#define intmax_t long long" >>confdefs.h
28072
28073   fi
28074
28075
28076
28077
28078   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
28079 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
28080 if test ${gl_cv_func_snprintf_truncation_c99+y}
28081 then :
28082   printf %s "(cached) " >&6
28083 else case e in #(
28084   e)
28085       if test "$cross_compiling" = yes
28086 then :
28087
28088          case "$host_os" in
28089                                  # Guess yes on glibc systems.
28090            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
28091                                  # Guess yes on musl systems.
28092            *-musl* | midipix*)   gl_cv_func_snprintf_truncation_c99="guessing yes";;
28093                                  # Guess yes on FreeBSD >= 5.
28094            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
28095            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28096            midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
28097                                  # Guess yes on Mac OS X >= 10.3.
28098            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
28099            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
28100                                  # Guess yes on OpenBSD >= 3.9.
28101            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
28102                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
28103            openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
28104                                  # Guess yes on Solaris >= 2.6.
28105            solaris2.[0-5] | solaris2.[0-5].*)
28106                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
28107            solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
28108                                  # Guess yes on AIX >= 4.
28109            aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
28110            aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
28111                                  # Guess yes on HP-UX >= 11.
28112            hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28113            hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
28114                                  # Guess yes on IRIX >= 6.5.
28115            irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
28116                                  # Guess yes on OSF/1 >= 5.
28117            osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
28118            osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
28119                                  # Guess yes on NetBSD >= 3.
28120            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
28121                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
28122            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
28123                                  # Guess yes on BeOS.
28124            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
28125                                  # Guess yes on Android.
28126            linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
28127                                  # Guess no on native Windows.
28128            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
28129                                  # If we don't know, obey --enable-cross-guesses.
28130            *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
28131          esac
28132
28133 else case e in #(
28134   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28135 /* end confdefs.h.  */
28136
28137 #include <stdio.h>
28138 #include <string.h>
28139 #if HAVE_SNPRINTF
28140 # define my_snprintf snprintf
28141 #else
28142 # include <stdarg.h>
28143 static int my_snprintf (char *buf, int size, const char *format, ...)
28144 {
28145   va_list args;
28146   int ret;
28147   va_start (args, format);
28148   ret = vsnprintf (buf, size, format, args);
28149   va_end (args);
28150   return ret;
28151 }
28152 #endif
28153 static char buf[100];
28154 int main ()
28155 {
28156   strcpy (buf, "ABCDEF");
28157   my_snprintf (buf, 3, "%d %d", 4567, 89);
28158   if (memcmp (buf, "45\0DEF", 6) != 0)
28159     return 1;
28160   return 0;
28161 }
28162 _ACEOF
28163 if ac_fn_c_try_run "$LINENO"
28164 then :
28165   gl_cv_func_snprintf_truncation_c99=yes
28166 else case e in #(
28167   e) gl_cv_func_snprintf_truncation_c99=no ;;
28168 esac
28169 fi
28170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28171   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28172 esac
28173 fi
28174
28175      ;;
28176 esac
28177 fi
28178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
28179 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
28180
28181
28182
28183
28184
28185   ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
28186 if test "x$ac_cv_func_wcslen" = xyes
28187 then :
28188   printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
28189
28190 fi
28191
28192
28193
28194
28195   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28196 if test "x$ac_cv_func_snprintf" = xyes
28197 then :
28198   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
28199
28200 fi
28201 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
28202 if test "x$ac_cv_func_strnlen" = xyes
28203 then :
28204   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
28205
28206 fi
28207 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
28208 if test "x$ac_cv_func_wcrtomb" = xyes
28209 then :
28210   printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
28211
28212 fi
28213
28214       ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
28215 " "$ac_c_undeclared_builtin_options" "CFLAGS"
28216 if test "x$ac_cv_have_decl__snprintf" = xyes
28217 then :
28218   ac_have_decl=1
28219 else case e in #(
28220   e) ac_have_decl=0 ;;
28221 esac
28222 fi
28223 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
28224
28225
28226   case "$gl_cv_func_snprintf_retval_c99" in
28227     *yes)
28228
28229 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
28230
28231       ;;
28232   esac
28233
28234   case "$gl_cv_func_snprintf_truncation_c99" in
28235     *yes)
28236
28237 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
28238
28239       ;;
28240   esac
28241
28242
28243
28244
28245
28246       GL_CFLAG_GNULIB_WARNINGS=''
28247   if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
28248                                                                             cat > conftest.c <<\EOF
28249       #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28250       -Wno-cast-qual
28251       -Wno-conversion
28252       -Wno-float-equal
28253       -Wno-sign-compare
28254       -Wno-undef
28255       -Wno-unused-function
28256       -Wno-unused-parameter
28257       #endif
28258       #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28259       -Wno-float-conversion
28260       #endif
28261       #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28262       -Wimplicit-fallthrough
28263       #endif
28264       #if __GNUC__ >= 4 && __GNUC__ < 11 && !defined __clang__
28265       -Wno-missing-field-initializers
28266       #endif
28267       #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28268       -Wno-pedantic
28269       #endif
28270       #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28271       -Wno-sign-conversion
28272       -Wno-type-limits
28273       #endif
28274       #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
28275       -Wno-unsuffixed-float-constants
28276       #endif
28277 EOF
28278     gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
28279     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
28280   (eval $gl_command) 2>&5
28281   ac_status=$?
28282   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28283   test $ac_status = 0; }; then
28284       gl_options=`grep -v '#' conftest.out`
28285       for word in $gl_options; do
28286         GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
28287       done
28288     fi
28289     rm -f conftest.c conftest.out
28290   fi
28291
28292
28293
28294
28295    if false; then
28296   GL_COND_LIBTOOL_TRUE=
28297   GL_COND_LIBTOOL_FALSE='#'
28298 else
28299   GL_COND_LIBTOOL_TRUE='#'
28300   GL_COND_LIBTOOL_FALSE=
28301 fi
28302
28303   gl_cond_libtool=false
28304   gl_libdeps=
28305   gl_ltlibdeps=
28306   gl_m4_base='m4'
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319   gl_source_base='lib'
28320   gl_source_base_prefix=
28321
28322   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alignas and alignof" >&5
28323 printf %s "checking for alignas and alignof... " >&6; }
28324 if test ${gl_cv_header_working_stdalign_h+y}
28325 then :
28326   printf %s "(cached) " >&6
28327 else case e in #(
28328   e) gl_save_CFLAGS=$CFLAGS
28329      for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
28330       case $gl_working in #(
28331   *stdalign.h*) :
28332     CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H" ;; #(
28333   *) :
28334      ;;
28335 esac
28336       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28337 /* end confdefs.h.  */
28338 #include <stdint.h>
28339             #ifdef INCLUDE_STDALIGN_H
28340              #include <stdalign.h>
28341             #endif
28342             #include <stddef.h>
28343
28344             /* Test that alignof yields a result consistent with offsetof.
28345                This catches GCC bug 52023
28346                <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
28347             #ifdef __cplusplus
28348                template <class t> struct alignof_helper { char a; t b; };
28349             # define ao(type) offsetof (alignof_helper<type>, b)
28350             #else
28351             # define ao(type) offsetof (struct { char a; type b; }, b)
28352             #endif
28353             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28354             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28355             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28356
28357             /* Test alignas only on platforms where gnulib can help.  */
28358             #if \
28359                 ((defined __cplusplus && 201103 <= __cplusplus) \
28360                  || (__TINYC__ && defined __attribute__) \
28361                  || (defined __APPLE__ && defined __MACH__ \
28362                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
28363                      : __GNUC__) \
28364                  || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
28365                  || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
28366                  || 1300 <= _MSC_VER)
28367               struct alignas_test { char c; char alignas (8) alignas_8; };
28368               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28369                                 ? 1 : -1];
28370             #endif
28371
28372 int
28373 main (void)
28374 {
28375
28376   ;
28377   return 0;
28378 }
28379 _ACEOF
28380 if ac_fn_c_try_compile "$LINENO"
28381 then :
28382   gl_cv_header_working_stdalign_h=$gl_working
28383 else case e in #(
28384   e) gl_cv_header_working_stdalign_h=no ;;
28385 esac
28386 fi
28387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28388
28389       CFLAGS=$gl_save_CFLAGS
28390       test "$gl_cv_header_working_stdalign_h" != no && break
28391      done ;;
28392 esac
28393 fi
28394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28395 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
28396
28397   case $gl_cv_header_working_stdalign_h in #(
28398   yes*keyword*) :
28399
28400 printf "%s\n" "#define HAVE_C_ALIGNASOF 1" >>confdefs.h
28401  ;; #(
28402   *) :
28403      ;;
28404 esac
28405
28406
28407
28408
28409
28410   if test $ac_cv_func_alloca_works = no; then
28411     :
28412   fi
28413
28414   # Define an additional variable used in the Makefile substitution.
28415   if test $ac_cv_working_alloca_h = yes; then
28416     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
28417 printf %s "checking for alloca as a compiler built-in... " >&6; }
28418 if test ${gl_cv_rpl_alloca+y}
28419 then :
28420   printf %s "(cached) " >&6
28421 else case e in #(
28422   e)
28423       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28424 /* end confdefs.h.  */
28425
28426 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
28427         Need own alloca
28428 #endif
28429
28430 _ACEOF
28431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28432   $EGREP_TRADITIONAL "Need own alloca" >/dev/null 2>&1
28433 then :
28434   gl_cv_rpl_alloca=yes
28435 else case e in #(
28436   e) gl_cv_rpl_alloca=no ;;
28437 esac
28438 fi
28439 rm -rf conftest*
28440
28441      ;;
28442 esac
28443 fi
28444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
28445 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
28446     if test $gl_cv_rpl_alloca = yes; then
28447
28448 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
28449
28450       GL_GENERATE_ALLOCA_H=true
28451     else
28452                   GL_GENERATE_ALLOCA_H=false
28453     fi
28454   else
28455     GL_GENERATE_ALLOCA_H=true
28456   fi
28457
28458   if test $ac_cv_working_alloca_h = yes; then
28459     HAVE_ALLOCA_H=1
28460   else
28461     HAVE_ALLOCA_H=0
28462   fi
28463
28464
28465
28466
28467
28468
28469   case "$GL_GENERATE_ALLOCA_H" in
28470     false) ALLOCA_H='' ;;
28471     true)
28472                   if test -z "$ALLOCA_H"; then
28473         ALLOCA_H="${gl_source_base_prefix}alloca.h"
28474       fi
28475       ;;
28476     *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
28477   esac
28478
28479
28480      if $GL_GENERATE_ALLOCA_H; then
28481   GL_GENERATE_ALLOCA_H_TRUE=
28482   GL_GENERATE_ALLOCA_H_FALSE='#'
28483 else
28484   GL_GENERATE_ALLOCA_H_TRUE='#'
28485   GL_GENERATE_ALLOCA_H_FALSE=
28486 fi
28487 :
28488     if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28489     GL_GENERATE_ALLOCA_H_TRUE='#'
28490     GL_GENERATE_ALLOCA_H_FALSE='#'
28491   fi
28492
28493
28494
28495
28496
28497
28498
28499   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static_assert" >&5
28500 printf %s "checking for static_assert... " >&6; }
28501 if test ${gl_cv_static_assert+y}
28502 then :
28503   printf %s "(cached) " >&6
28504 else case e in #(
28505   e) gl_save_CFLAGS=$CFLAGS
28506      for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
28507       case $gl_working in #(
28508   *assert.h*) :
28509     CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H" ;; #(
28510   *) :
28511      ;;
28512 esac
28513
28514       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28515 /* end confdefs.h.  */
28516 #if defined __clang__ && __STDC_VERSION__ < 202311
28517              #pragma clang diagnostic error "-Wc2x-extensions"
28518              #pragma clang diagnostic error "-Wc++1z-extensions"
28519             #endif
28520             #ifdef INCLUDE_ASSERT_H
28521              #include <assert.h>
28522             #endif
28523             static_assert (2 + 2 == 4, "arithmetic does not work");
28524             static_assert (2 + 2 == 4);
28525
28526 int
28527 main (void)
28528 {
28529
28530             static_assert (sizeof (char) == 1, "sizeof does not work");
28531             static_assert (sizeof (char) == 1);
28532
28533   ;
28534   return 0;
28535 }
28536 _ACEOF
28537 if ac_fn_c_try_compile "$LINENO"
28538 then :
28539   gl_cv_static_assert=$gl_working
28540 else case e in #(
28541   e) gl_cv_static_assert=no ;;
28542 esac
28543 fi
28544 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28545       CFLAGS=$gl_save_CFLAGS
28546       test "$gl_cv_static_assert" != no && break
28547      done ;;
28548 esac
28549 fi
28550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_static_assert" >&5
28551 printf "%s\n" "$gl_cv_static_assert" >&6; }
28552
28553   GL_GENERATE_ASSERT_H=false
28554   case $gl_cv_static_assert in #(
28555   yes*keyword*) :
28556
28557 printf "%s\n" "#define HAVE_C_STATIC_ASSERT 1" >>confdefs.h
28558  ;; #(
28559   no) :
28560     GL_GENERATE_ASSERT_H=true
28561
28562
28563
28564
28565
28566
28567
28568
28569      if test $gl_cv_have_include_next = yes; then
28570        gl_cv_next_assert_h='<'assert.h'>'
28571      else
28572        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <assert.h>" >&5
28573 printf %s "checking absolute name of <assert.h>... " >&6; }
28574 if test ${gl_cv_next_assert_h+y}
28575 then :
28576   printf %s "(cached) " >&6
28577 else case e in #(
28578   e)
28579
28580
28581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28582 /* end confdefs.h.  */
28583 #include <assert.h>
28584 _ACEOF
28585                 case "$host_os" in
28586     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28587     *)    gl_absname_cpp="$ac_cpp" ;;
28588   esac
28589
28590   case "$host_os" in
28591     mingw*)
28592                                           gl_dirsep_regex='[/\\]'
28593       ;;
28594     *)
28595       gl_dirsep_regex='\/'
28596       ;;
28597   esac
28598       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28599   gl_header_literal_regex=`echo 'assert.h' \
28600                            | sed -e "$gl_make_literal_regex_sed"`
28601   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28602       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28603       s|^/[^/]|//&|
28604       p
28605       q
28606     }'
28607
28608         gl_cv_absolute_assert_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28609   sed -n "$gl_absolute_header_sed"`
28610
28611           gl_header=$gl_cv_absolute_assert_h
28612           gl_cv_next_assert_h='"'$gl_header'"'
28613
28614           ;;
28615 esac
28616 fi
28617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_assert_h" >&5
28618 printf "%s\n" "$gl_cv_next_assert_h" >&6; }
28619      fi
28620      NEXT_ASSERT_H=$gl_cv_next_assert_h
28621
28622      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28623        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28624        gl_next_as_first_directive='<'assert.h'>'
28625      else
28626        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28627        gl_next_as_first_directive=$gl_cv_next_assert_h
28628      fi
28629      NEXT_AS_FIRST_DIRECTIVE_ASSERT_H=$gl_next_as_first_directive
28630
28631
28632
28633  ;; #(
28634   *) :
28635      ;;
28636 esac
28637
28638
28639
28640
28641
28642
28643
28644   case "$GL_GENERATE_ASSERT_H" in
28645     false) ASSERT_H='' ;;
28646     true)
28647                   if test -z "$ASSERT_H"; then
28648         ASSERT_H="${gl_source_base_prefix}assert.h"
28649       fi
28650       ;;
28651     *) echo "*** GL_GENERATE_ASSERT_H is not set correctly" 1>&2; exit 1 ;;
28652   esac
28653
28654
28655      if $GL_GENERATE_ASSERT_H; then
28656   GL_GENERATE_ASSERT_H_TRUE=
28657   GL_GENERATE_ASSERT_H_FALSE='#'
28658 else
28659   GL_GENERATE_ASSERT_H_TRUE='#'
28660   GL_GENERATE_ASSERT_H_FALSE=
28661 fi
28662 :
28663     if test -z "${GL_GENERATE_ASSERT_H_TRUE}" && test -z "${GL_GENERATE_ASSERT_H_FALSE}"; then
28664     GL_GENERATE_ASSERT_H_TRUE='#'
28665     GL_GENERATE_ASSERT_H_FALSE='#'
28666   fi
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679   if test $ac_cv_func_btowc = no; then
28680     HAVE_BTOWC=0
28681   else
28682
28683
28684
28685
28686         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
28687 printf %s "checking whether btowc(0) is correct... " >&6; }
28688 if test ${gl_cv_func_btowc_nul+y}
28689 then :
28690   printf %s "(cached) " >&6
28691 else case e in #(
28692   e)
28693         if test "$cross_compiling" = yes
28694 then :
28695
28696            case "$host_os" in
28697                       # Guess no on Cygwin.
28698              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
28699                       # Guess yes on native Windows.
28700              mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
28701                       # Guess yes otherwise.
28702              *)       gl_cv_func_btowc_nul="guessing yes" ;;
28703            esac
28704
28705 else case e in #(
28706   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28707 /* end confdefs.h.  */
28708
28709 #include <wchar.h>
28710 int main ()
28711 {
28712   if (btowc ('\0') != 0)
28713     return 1;
28714   return 0;
28715 }
28716 _ACEOF
28717 if ac_fn_c_try_run "$LINENO"
28718 then :
28719   gl_cv_func_btowc_nul=yes
28720 else case e in #(
28721   e) gl_cv_func_btowc_nul=no ;;
28722 esac
28723 fi
28724 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28725   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28726 esac
28727 fi
28728
28729        ;;
28730 esac
28731 fi
28732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
28733 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
28734
28735         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
28736 printf %s "checking whether btowc(EOF) is correct... " >&6; }
28737 if test ${gl_cv_func_btowc_eof+y}
28738 then :
28739   printf %s "(cached) " >&6
28740 else case e in #(
28741   e)
28742                         case "$host_os" in
28743                   # Guess no on IRIX.
28744           irix*)  gl_cv_func_btowc_eof="guessing no" ;;
28745                   # Guess yes on native Windows.
28746           mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
28747                   # Guess yes otherwise.
28748           *)      gl_cv_func_btowc_eof="guessing yes" ;;
28749         esac
28750         if test $LOCALE_FR != none; then
28751           if test "$cross_compiling" = yes
28752 then :
28753   :
28754 else case e in #(
28755   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28756 /* end confdefs.h.  */
28757
28758 #include <locale.h>
28759 #include <stdio.h>
28760 #include <wchar.h>
28761 int main ()
28762 {
28763   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28764     {
28765       if (btowc (EOF) != WEOF)
28766         return 1;
28767     }
28768   return 0;
28769 }
28770 _ACEOF
28771 if ac_fn_c_try_run "$LINENO"
28772 then :
28773   gl_cv_func_btowc_eof=yes
28774 else case e in #(
28775   e) gl_cv_func_btowc_eof=no ;;
28776 esac
28777 fi
28778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28779   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28780 esac
28781 fi
28782
28783         fi
28784        ;;
28785 esac
28786 fi
28787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
28788 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
28789
28790
28791     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc is consistent with mbrtowc in the C locale" >&5
28792 printf %s "checking whether btowc is consistent with mbrtowc in the C locale... " >&6; }
28793 if test ${gl_cv_func_btowc_consistent+y}
28794 then :
28795   printf %s "(cached) " >&6
28796 else case e in #(
28797   e)
28798         if test "$cross_compiling" = yes
28799 then :
28800   case "$host_os" in
28801                      # Guess no on mingw.
28802              mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28803 /* end confdefs.h.  */
28804
28805 #ifdef __MINGW32__
28806  Problem
28807 #endif
28808
28809 _ACEOF
28810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28811   $EGREP_TRADITIONAL "Problem" >/dev/null 2>&1
28812 then :
28813   gl_cv_func_btowc_consistent="guessing no"
28814 else case e in #(
28815   e) gl_cv_func_btowc_consistent="guessing yes" ;;
28816 esac
28817 fi
28818 rm -rf conftest*
28819
28820                      ;;
28821                      # Guess yes otherwise.
28822              *)      gl_cv_func_btowc_consistent="guessing yes" ;;
28823            esac
28824
28825 else case e in #(
28826   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827 /* end confdefs.h.  */
28828
28829 #include <stdlib.h>
28830 #include <string.h>
28831 #include <wchar.h>
28832 int main ()
28833 {
28834 #if HAVE_MBRTOWC
28835   wint_t wc1 = btowc (0x80);
28836   wchar_t wc2 = (wchar_t) 0xbadface;
28837   char buf[1] = { 0x80 };
28838   mbstate_t state;
28839   memset (&state, 0, sizeof (mbstate_t));
28840   if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
28841     return 1;
28842 #endif
28843   return 0;
28844 }
28845 _ACEOF
28846 if ac_fn_c_try_run "$LINENO"
28847 then :
28848   gl_cv_func_btowc_consistent=yes
28849 else case e in #(
28850   e) gl_cv_func_btowc_consistent=no ;;
28851 esac
28852 fi
28853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28854   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28855 esac
28856 fi
28857
28858        ;;
28859 esac
28860 fi
28861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_consistent" >&5
28862 printf "%s\n" "$gl_cv_func_btowc_consistent" >&6; }
28863
28864     case "$gl_cv_func_btowc_nul" in
28865       *yes) ;;
28866       *) REPLACE_BTOWC=1 ;;
28867     esac
28868     case "$gl_cv_func_btowc_eof" in
28869       *yes) ;;
28870       *) REPLACE_BTOWC=1 ;;
28871     esac
28872     case "$gl_cv_func_btowc_consistent" in
28873       *yes) ;;
28874       *) REPLACE_BTOWC=1 ;;
28875     esac
28876     if test $REPLACE_BTOWC = 0; then
28877
28878      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
28879 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
28880 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
28881 then :
28882   printf %s "(cached) " >&6
28883 else case e in #(
28884   e)
28885                gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
28886
28887      if test "$cross_compiling" = yes
28888 then :
28889   case "$host_os" in
28890                  # Guess yes on native Windows.
28891          mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
28892        esac
28893
28894 else case e in #(
28895   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28896 /* end confdefs.h.  */
28897 #include <limits.h>
28898             #include <locale.h>
28899             #include <wchar.h>
28900
28901 int
28902 main (void)
28903 {
28904
28905             int i;
28906             char *locale = setlocale (LC_ALL, "C");
28907             if (! locale)
28908               return 2;
28909             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
28910               {
28911                 char c = i;
28912                 wchar_t wc;
28913                 mbstate_t mbs = { 0, };
28914                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
28915                 if (1 < ss)
28916                   return 3;
28917               }
28918             return 0;
28919
28920   ;
28921   return 0;
28922 }
28923 _ACEOF
28924 if ac_fn_c_try_run "$LINENO"
28925 then :
28926   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
28927 else case e in #(
28928   e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
28929 esac
28930 fi
28931 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28932   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28933 esac
28934 fi
28935
28936      ;;
28937 esac
28938 fi
28939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
28940 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
28941
28942       case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
28943         *yes) ;;
28944         *) REPLACE_BTOWC=1 ;;
28945       esac
28946     fi
28947   fi
28948
28949
28950      if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
28951   GL_COND_OBJ_BTOWC_TRUE=
28952   GL_COND_OBJ_BTOWC_FALSE='#'
28953 else
28954   GL_COND_OBJ_BTOWC_TRUE='#'
28955   GL_COND_OBJ_BTOWC_FALSE=
28956 fi
28957 :
28958     if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
28959     GL_COND_OBJ_BTOWC_TRUE='#'
28960     GL_COND_OBJ_BTOWC_FALSE='#'
28961   fi
28962
28963   if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
28964
28965
28966   :
28967
28968
28969
28970 fi
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985           GL_GNULIB_BTOWC=1
28986
28987
28988
28989
28990
28991 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
28992
28993
28994
28995
28996   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
28997 printf %s "checking for __builtin_expect... " >&6; }
28998 if test ${gl_cv___builtin_expect+y}
28999 then :
29000   printf %s "(cached) " >&6
29001 else case e in #(
29002   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29003 /* end confdefs.h.  */
29004
29005          int
29006          main (int argc, char **argv)
29007          {
29008            argc = __builtin_expect (argc, 100);
29009            return argv[argc != 100][0];
29010          }
29011 _ACEOF
29012 if ac_fn_c_try_link "$LINENO"
29013 then :
29014   gl_cv___builtin_expect=yes
29015 else case e in #(
29016   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29017 /* end confdefs.h.  */
29018
29019              #include <builtins.h>
29020              int
29021              main (int argc, char **argv)
29022              {
29023                argc = __builtin_expect (argc, 100);
29024                return argv[argc != 100][0];
29025              }
29026 _ACEOF
29027 if ac_fn_c_try_link "$LINENO"
29028 then :
29029   gl_cv___builtin_expect="in <builtins.h>"
29030 else case e in #(
29031   e) gl_cv___builtin_expect=no ;;
29032 esac
29033 fi
29034 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29035     conftest$ac_exeext conftest.$ac_ext ;;
29036 esac
29037 fi
29038 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29039     conftest$ac_exeext conftest.$ac_ext ;;
29040 esac
29041 fi
29042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
29043 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
29044   if test "$gl_cv___builtin_expect" = yes; then
29045     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
29046
29047   elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
29048     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
29049
29050   fi
29051
29052
29053
29054
29055   if test $gl_sigsegv_uses_libsigsegv = yes; then
29056     LIBCSTACK=$LIBSIGSEGV
29057
29058     LTLIBCSTACK=$LTLIBSIGSEGV
29059
29060   fi
29061
29062
29063
29064
29065   REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
29066   if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
29067
29068      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
29069 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
29070 if test ${ac_cv_func_calloc_0_nonnull+y}
29071 then :
29072   printf %s "(cached) " >&6
29073 else case e in #(
29074   e) if test $cross_compiling != yes; then
29075        ac_cv_func_calloc_0_nonnull=yes
29076        if test "$cross_compiling" = yes
29077 then :
29078   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
29079 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
29080 as_fn_error $? "cannot run test program while cross compiling
29081 See 'config.log' for more details" "$LINENO" 5; }
29082 else case e in #(
29083   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29084 /* end confdefs.h.  */
29085 $ac_includes_default
29086 int
29087 main (void)
29088 {
29089 int result = 0;
29090               char * volatile p = calloc (0, 0);
29091               if (!p)
29092                 result |= 1;
29093               free (p);
29094               return result;
29095
29096   ;
29097   return 0;
29098 }
29099 _ACEOF
29100 if ac_fn_c_try_run "$LINENO"
29101 then :
29102
29103 else case e in #(
29104   e) ac_cv_func_calloc_0_nonnull=no ;;
29105 esac
29106 fi
29107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29108   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29109 esac
29110 fi
29111
29112      else
29113        case "$host_os" in
29114                              # Guess yes on glibc systems.
29115          *-gnu* | gnu*)      ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29116                              # Guess yes on musl systems.
29117          *-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29118                              # Guess yes on native Windows.
29119          mingw*)             ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29120                              # If we don't know, obey --enable-cross-guesses.
29121          *)                  ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
29122        esac
29123      fi
29124      ;;
29125 esac
29126 fi
29127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
29128 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
29129   case $ac_cv_func_calloc_0_nonnull in #(
29130   *yes) :
29131      ;; #(
29132   *) :
29133     REPLACE_CALLOC_FOR_CALLOC_GNU=1 ;;
29134 esac
29135
29136   fi
29137
29138   if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
29139
29140
29141
29142
29143
29144
29145
29146
29147   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
29148
29149   fi
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159           GL_GNULIB_CALLOC_GNU=1
29160
29161
29162
29163
29164
29165 printf "%s\n" "#define GNULIB_TEST_CALLOC_GNU 1" >>confdefs.h
29166
29167
29168
29169
29170
29171
29172   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
29173     REPLACE_CALLOC_FOR_CALLOC_POSIX=1
29174   fi
29175
29176   if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
29177
29178
29179
29180
29181
29182
29183
29184
29185   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
29186
29187   fi
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197           GL_GNULIB_CALLOC_POSIX=1
29198
29199
29200
29201
29202
29203 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
29204
29205
29206
29207
29208
29209
29210   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readlinkat" >&5
29211 printf %s "checking for readlinkat... " >&6; }
29212 if test ${gl_cv_onwards_func_readlinkat+y}
29213 then :
29214   printf %s "(cached) " >&6
29215 else case e in #(
29216   e)
29217   exec 9>&6 6>/dev/null
29218
29219        case "$host_os" in
29220
29221          linux*-android*)
29222            ac_fn_check_decl "$LINENO" "readlinkat" "ac_cv_have_decl_readlinkat" "#include <unistd.h>
29223 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29224 if test "x$ac_cv_have_decl_readlinkat" = xyes
29225 then :
29226
29227 fi
29228            if test $ac_cv_have_decl_readlinkat = yes; then
29229              ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
29230 if test "x$ac_cv_func_readlinkat" = xyes
29231 then :
29232
29233 fi
29234
29235              if test $ac_cv_func_readlinkat = yes; then
29236                gl_cv_onwards_func_readlinkat=yes
29237              else
29238                                                             gl_cv_onwards_func_readlinkat='future OS version'
29239              fi
29240            else
29241              gl_cv_onwards_func_readlinkat='future OS version'
29242            fi
29243            ;;
29244
29245
29246          *)
29247            ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
29248 if test "x$ac_cv_func_readlinkat" = xyes
29249 then :
29250
29251 fi
29252
29253            gl_cv_onwards_func_readlinkat=$ac_cv_func_readlinkat
29254            ;;
29255
29256        esac
29257
29258   exec 6>&9 9>&-
29259
29260      ;;
29261 esac
29262 fi
29263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_readlinkat" >&5
29264 printf "%s\n" "$gl_cv_onwards_func_readlinkat" >&6; }
29265
29266   case "$gl_cv_onwards_func_readlinkat" in
29267     future*) ac_cv_func_readlinkat=no ;;
29268     *)       ac_cv_func_readlinkat=$gl_cv_onwards_func_readlinkat ;;
29269   esac
29270   if test $ac_cv_func_readlinkat = yes; then
29271
29272 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
29273
29274   fi
29275
29276
29277
29278
29279
29280   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
29281   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
29282
29283   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
29284   # programs in the package would end up linked with that potentially-shared
29285   # library, inducing unnecessary run-time overhead.
29286   CLOCK_TIME_LIB=
29287
29288   gl_saved_libs=$LIBS
29289     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
29290 printf %s "checking for library containing clock_gettime... " >&6; }
29291 if test ${ac_cv_search_clock_gettime+y}
29292 then :
29293   printf %s "(cached) " >&6
29294 else case e in #(
29295   e) ac_func_search_save_LIBS=$LIBS
29296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29297 /* end confdefs.h.  */
29298
29299 /* Override any GCC internal prototype to avoid an error.
29300    Use char because int might match the return type of a GCC
29301    builtin and then its argument prototype would still apply.
29302    The 'extern "C"' is for builds by C++ compilers;
29303    although this is not generally supported in C code supporting it here
29304    has little cost and some practical benefit (sr 110532).  */
29305 #ifdef __cplusplus
29306 extern "C"
29307 #endif
29308 char clock_gettime (void);
29309 int
29310 main (void)
29311 {
29312 return clock_gettime ();
29313   ;
29314   return 0;
29315 }
29316 _ACEOF
29317 for ac_lib in '' rt posix4
29318 do
29319   if test -z "$ac_lib"; then
29320     ac_res="none required"
29321   else
29322     ac_res=-l$ac_lib
29323     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
29324   fi
29325   if ac_fn_c_try_link "$LINENO"
29326 then :
29327   ac_cv_search_clock_gettime=$ac_res
29328 fi
29329 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29330     conftest$ac_exeext
29331   if test ${ac_cv_search_clock_gettime+y}
29332 then :
29333   break
29334 fi
29335 done
29336 if test ${ac_cv_search_clock_gettime+y}
29337 then :
29338
29339 else case e in #(
29340   e) ac_cv_search_clock_gettime=no ;;
29341 esac
29342 fi
29343 rm conftest.$ac_ext
29344 LIBS=$ac_func_search_save_LIBS ;;
29345 esac
29346 fi
29347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
29348 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
29349 ac_res=$ac_cv_search_clock_gettime
29350 if test "$ac_res" != no
29351 then :
29352   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29353   test "$ac_cv_search_clock_gettime" = "none required" ||
29354                     CLOCK_TIME_LIB=$ac_cv_search_clock_gettime
29355 fi
29356
29357     ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
29358 if test "x$ac_cv_func_clock_getres" = xyes
29359 then :
29360   printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
29361
29362 fi
29363 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
29364 if test "x$ac_cv_func_clock_gettime" = xyes
29365 then :
29366   printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
29367
29368 fi
29369 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
29370 if test "x$ac_cv_func_clock_settime" = xyes
29371 then :
29372   printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
29373
29374 fi
29375
29376   LIBS=$gl_saved_libs
29377   # For backward compatibility.
29378   LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
29379
29380
29381
29382
29383 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
29384
29385
29386
29387
29388      if test $REPLACE_CLOSE = 1; then
29389   GL_COND_OBJ_CLOSE_TRUE=
29390   GL_COND_OBJ_CLOSE_FALSE='#'
29391 else
29392   GL_COND_OBJ_CLOSE_TRUE='#'
29393   GL_COND_OBJ_CLOSE_FALSE=
29394 fi
29395 :
29396     if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
29397     GL_COND_OBJ_CLOSE_TRUE='#'
29398     GL_COND_OBJ_CLOSE_FALSE='#'
29399   fi
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410           GL_GNULIB_CLOSE=1
29411
29412
29413
29414
29415
29416 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
29431
29432
29433
29434
29435   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
29436 printf %s "checking whether // is distinct from /... " >&6; }
29437 if test ${gl_cv_double_slash_root+y}
29438 then :
29439   printf %s "(cached) " >&6
29440 else case e in #(
29441   e)  if test x"$cross_compiling" = xyes ; then
29442         # When cross-compiling, there is no way to tell whether // is special
29443         # short of a list of hosts.  However, the only known hosts to date
29444         # that have a distinct // are Apollo DomainOS (too old to port to),
29445         # Cygwin, and z/OS.  If anyone knows of another system for which // has
29446         # special semantics and is distinct from /, please report it to
29447         # <bug-gnulib@gnu.org>.
29448         case $host in
29449           *-cygwin | i370-ibm-openedition)
29450             gl_cv_double_slash_root=yes ;;
29451           *)
29452             # Be optimistic and assume that / and // are the same when we
29453             # don't know.
29454             gl_cv_double_slash_root='unknown, assuming no' ;;
29455         esac
29456       else
29457         set x `ls -di / // 2>/dev/null`
29458         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
29459           gl_cv_double_slash_root=no
29460         else
29461           gl_cv_double_slash_root=yes
29462         fi
29463       fi ;;
29464 esac
29465 fi
29466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
29467 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
29468   if test "$gl_cv_double_slash_root" = yes; then
29469
29470 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
29471
29472   fi
29473
29474
29475
29476
29477   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
29478 printf %s "checking whether dup2 works... " >&6; }
29479 if test ${gl_cv_func_dup2_works+y}
29480 then :
29481   printf %s "(cached) " >&6
29482 else case e in #(
29483   e) if test "$cross_compiling" = yes
29484 then :
29485   case "$host_os" in
29486          mingw*) # on this platform, dup2 always returns 0 for success
29487            gl_cv_func_dup2_works="guessing no" ;;
29488          cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
29489            gl_cv_func_dup2_works="guessing no" ;;
29490          aix* | freebsd*)
29491                  # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
29492                  # not EBADF.
29493            gl_cv_func_dup2_works="guessing no" ;;
29494          haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
29495            gl_cv_func_dup2_works="guessing no" ;;
29496          *-android*) # implemented using dup3(), which fails if oldfd == newfd
29497            gl_cv_func_dup2_works="guessing no" ;;
29498          os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
29499            gl_cv_func_dup2_works="guessing no" ;;
29500          *) gl_cv_func_dup2_works="guessing yes" ;;
29501        esac
29502 else case e in #(
29503   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29504 /* end confdefs.h.  */
29505
29506        #include <errno.h>
29507            #include <fcntl.h>
29508            #include <limits.h>
29509            #include <sys/resource.h>
29510            #include <unistd.h>
29511
29512
29513 $gl_mda_defines
29514
29515            #ifndef RLIM_SAVED_CUR
29516            # define RLIM_SAVED_CUR RLIM_INFINITY
29517            #endif
29518            #ifndef RLIM_SAVED_MAX
29519            # define RLIM_SAVED_MAX RLIM_INFINITY
29520            #endif
29521
29522 int
29523 main (void)
29524 {
29525 int result = 0;
29526            int bad_fd = INT_MAX;
29527            struct rlimit rlim;
29528            if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
29529                && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
29530                && rlim.rlim_cur != RLIM_INFINITY
29531                && rlim.rlim_cur != RLIM_SAVED_MAX
29532                && rlim.rlim_cur != RLIM_SAVED_CUR)
29533              bad_fd = rlim.rlim_cur;
29534            #ifdef FD_CLOEXEC
29535              if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
29536                result |= 1;
29537            #endif
29538            if (dup2 (1, 1) != 1)
29539              result |= 2;
29540            #ifdef FD_CLOEXEC
29541              if (fcntl (1, F_GETFD) != FD_CLOEXEC)
29542                result |= 4;
29543            #endif
29544            close (0);
29545            if (dup2 (0, 0) != -1)
29546              result |= 8;
29547            /* Many gnulib modules require POSIX conformance of EBADF.  */
29548            if (dup2 (2, bad_fd) == -1 && errno != EBADF)
29549              result |= 16;
29550            /* Flush out some cygwin core dumps.  */
29551            if (dup2 (2, -1) != -1 || errno != EBADF)
29552              result |= 32;
29553            dup2 (2, 255);
29554            dup2 (2, 256);
29555            /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
29556            {
29557              int fd = open (".", O_RDONLY);
29558              if (fd == -1)
29559                result |= 64;
29560              else if (dup2 (fd, fd + 1) == -1)
29561                result |= 128;
29562              close (fd);
29563            }
29564            return result;
29565   ;
29566   return 0;
29567 }
29568
29569 _ACEOF
29570 if ac_fn_c_try_run "$LINENO"
29571 then :
29572   gl_cv_func_dup2_works=yes
29573 else case e in #(
29574   e) gl_cv_func_dup2_works=no ;;
29575 esac
29576 fi
29577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29578   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29579 esac
29580 fi
29581
29582      ;;
29583 esac
29584 fi
29585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
29586 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
29587   case "$gl_cv_func_dup2_works" in
29588     *yes) ;;
29589     *)
29590       REPLACE_DUP2=1
29591       ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
29592 if test "x$ac_cv_func_setdtablesize" = xyes
29593 then :
29594   printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
29595
29596 fi
29597
29598       ;;
29599   esac
29600
29601
29602
29603      if test $REPLACE_DUP2 = 1; then
29604   GL_COND_OBJ_DUP2_TRUE=
29605   GL_COND_OBJ_DUP2_FALSE='#'
29606 else
29607   GL_COND_OBJ_DUP2_TRUE='#'
29608   GL_COND_OBJ_DUP2_FALSE=
29609 fi
29610 :
29611     if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
29612     GL_COND_OBJ_DUP2_TRUE='#'
29613     GL_COND_OBJ_DUP2_FALSE='#'
29614   fi
29615
29616   if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
29617
29618
29619
29620 fi
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630           GL_GNULIB_DUP2=1
29631
29632
29633
29634
29635
29636 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650           GL_GNULIB_ENVIRON=1
29651
29652
29653
29654
29655
29656 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
29657
29658
29659
29660
29661
29662
29663
29664
29665   case "$GL_GENERATE_ERRNO_H" in
29666     false) ERRNO_H='' ;;
29667     true)
29668                   if test -z "$ERRNO_H"; then
29669         ERRNO_H="${gl_source_base_prefix}errno.h"
29670       fi
29671       ;;
29672     *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
29673   esac
29674
29675
29676      if $GL_GENERATE_ERRNO_H; then
29677   GL_GENERATE_ERRNO_H_TRUE=
29678   GL_GENERATE_ERRNO_H_FALSE='#'
29679 else
29680   GL_GENERATE_ERRNO_H_TRUE='#'
29681   GL_GENERATE_ERRNO_H_FALSE=
29682 fi
29683 :
29684     if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29685     GL_GENERATE_ERRNO_H_TRUE='#'
29686     GL_GENERATE_ERRNO_H_FALSE='#'
29687   fi
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698      if test $GL_GENERATE_ERROR_H = true; then
29699   GL_COND_OBJ_ERROR_TRUE=
29700   GL_COND_OBJ_ERROR_FALSE='#'
29701 else
29702   GL_COND_OBJ_ERROR_TRUE='#'
29703   GL_COND_OBJ_ERROR_FALSE=
29704 fi
29705 :
29706     if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
29707     GL_COND_OBJ_ERROR_TRUE='#'
29708     GL_COND_OBJ_ERROR_FALSE='#'
29709   fi
29710
29711   if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
29712
29713
29714
29715
29716
29717   :
29718
29719
29720 fi
29721
29722
29723   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
29724
29725
29726
29727   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
29728
29729
29730
29731
29732
29733
29734   case "$GL_GENERATE_ERROR_H" in
29735     false) ERROR_H='' ;;
29736     true)
29737                   if test -z "$ERROR_H"; then
29738         ERROR_H="${gl_source_base_prefix}error.h"
29739       fi
29740       ;;
29741     *) echo "*** GL_GENERATE_ERROR_H is not set correctly" 1>&2; exit 1 ;;
29742   esac
29743
29744
29745      if $GL_GENERATE_ERROR_H; then
29746   GL_GENERATE_ERROR_H_TRUE=
29747   GL_GENERATE_ERROR_H_FALSE='#'
29748 else
29749   GL_GENERATE_ERROR_H_TRUE='#'
29750   GL_GENERATE_ERROR_H_FALSE=
29751 fi
29752 :
29753     if test -z "${GL_GENERATE_ERROR_H_TRUE}" && test -z "${GL_GENERATE_ERROR_H_FALSE}"; then
29754     GL_GENERATE_ERROR_H_TRUE='#'
29755     GL_GENERATE_ERROR_H_FALSE='#'
29756   fi
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769   if test $ac_cv_func_fcntl = no; then
29770
29771
29772
29773   if test $ac_cv_func_fcntl = no; then
29774     HAVE_FCNTL=0
29775   else
29776     REPLACE_FCNTL=1
29777   fi
29778
29779   else
29780             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
29781 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
29782 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
29783 then :
29784   printf %s "(cached) " >&6
29785 else case e in #(
29786   e) if test "$cross_compiling" = yes
29787 then :
29788   case $host_os in
29789             aix* | cygwin* | haiku*)
29790                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
29791             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
29792           esac
29793 else case e in #(
29794   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29795 /* end confdefs.h.  */
29796 #include <errno.h>
29797               #include <fcntl.h>
29798               #include <limits.h>
29799               #include <sys/resource.h>
29800               #include <unistd.h>
29801
29802
29803 $gl_mda_defines
29804
29805               #ifndef RLIM_SAVED_CUR
29806               # define RLIM_SAVED_CUR RLIM_INFINITY
29807               #endif
29808               #ifndef RLIM_SAVED_MAX
29809               # define RLIM_SAVED_MAX RLIM_INFINITY
29810               #endif
29811
29812 int
29813 main (void)
29814 {
29815 int result = 0;
29816               int bad_fd = INT_MAX;
29817               struct rlimit rlim;
29818               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
29819                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
29820                   && rlim.rlim_cur != RLIM_INFINITY
29821                   && rlim.rlim_cur != RLIM_SAVED_MAX
29822                   && rlim.rlim_cur != RLIM_SAVED_CUR)
29823                 bad_fd = rlim.rlim_cur;
29824               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
29825               if (errno != EINVAL) result |= 2;
29826               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
29827               if (errno != EINVAL) result |= 8;
29828               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
29829               {
29830                 int fd;
29831                 fd = open (".", O_RDONLY);
29832                 if (fd == -1)
29833                   result |= 16;
29834                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
29835                   result |= 32;
29836
29837                 close (fd);
29838               }
29839               return result;
29840   ;
29841   return 0;
29842 }
29843 _ACEOF
29844 if ac_fn_c_try_run "$LINENO"
29845 then :
29846   gl_cv_func_fcntl_f_dupfd_works=yes
29847 else case e in #(
29848   e) gl_cv_func_fcntl_f_dupfd_works=no ;;
29849 esac
29850 fi
29851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29852   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29853 esac
29854 fi
29855  ;;
29856 esac
29857 fi
29858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
29859 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
29860     case $gl_cv_func_fcntl_f_dupfd_works in
29861       *yes) ;;
29862       *)
29863
29864
29865   if test $ac_cv_func_fcntl = no; then
29866     HAVE_FCNTL=0
29867   else
29868     REPLACE_FCNTL=1
29869   fi
29870
29871
29872 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
29873  ;;
29874     esac
29875
29876             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
29877 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
29878 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
29879 then :
29880   printf %s "(cached) " >&6
29881 else case e in #(
29882   e) if test "$cross_compiling" = yes
29883 then :
29884   case "$host_os" in
29885                      # Guess no on NetBSD.
29886             netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
29887             *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
29888           esac
29889
29890 else case e in #(
29891   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29892 /* end confdefs.h.  */
29893 #include <fcntl.h>
29894               #include <unistd.h>
29895               int main (int argc, char *argv[])
29896               {
29897                 if (argc == 1)
29898                   /* parent process */
29899                   {
29900                     if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
29901                       return 1;
29902                     return execl ("./conftest", "./conftest", "child", NULL);
29903                   }
29904                 else
29905                   /* child process */
29906                   return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
29907               }
29908
29909
29910 _ACEOF
29911 if ac_fn_c_try_run "$LINENO"
29912 then :
29913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29914 /* end confdefs.h.  */
29915
29916 #ifdef __linux__
29917 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
29918    it to support the semantics on older kernels that failed with EINVAL.  */
29919 choke me
29920 #endif
29921
29922 int
29923 main (void)
29924 {
29925
29926   ;
29927   return 0;
29928 }
29929 _ACEOF
29930 if ac_fn_c_try_compile "$LINENO"
29931 then :
29932   gl_cv_func_fcntl_f_dupfd_cloexec=yes
29933 else case e in #(
29934   e) gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" ;;
29935 esac
29936 fi
29937 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29938
29939 else case e in #(
29940   e) gl_cv_func_fcntl_f_dupfd_cloexec=no ;;
29941 esac
29942 fi
29943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29944   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29945 esac
29946 fi
29947
29948        ;;
29949 esac
29950 fi
29951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
29952 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
29953     case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
29954       *yes) ;;
29955       *)
29956
29957
29958   if test $ac_cv_func_fcntl = no; then
29959     HAVE_FCNTL=0
29960   else
29961     REPLACE_FCNTL=1
29962   fi
29963
29964                         ;;
29965     esac
29966   fi
29967
29968
29969
29970      if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
29971   GL_COND_OBJ_FCNTL_TRUE=
29972   GL_COND_OBJ_FCNTL_FALSE='#'
29973 else
29974   GL_COND_OBJ_FCNTL_TRUE='#'
29975   GL_COND_OBJ_FCNTL_FALSE=
29976 fi
29977 :
29978     if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
29979     GL_COND_OBJ_FCNTL_TRUE='#'
29980     GL_COND_OBJ_FCNTL_FALSE='#'
29981   fi
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992           GL_GNULIB_FCNTL=1
29993
29994
29995
29996
29997
29998 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
30015
30016
30017
30018
30019
30020   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
30021 printf %s "checking for mempcpy... " >&6; }
30022 if test ${gl_cv_onwards_func_mempcpy+y}
30023 then :
30024   printf %s "(cached) " >&6
30025 else case e in #(
30026   e)
30027   exec 9>&6 6>/dev/null
30028
30029        case "$host_os" in
30030
30031          linux*-android*)
30032            ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
30033 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30034 if test "x$ac_cv_have_decl_mempcpy" = xyes
30035 then :
30036
30037 fi
30038            if test $ac_cv_have_decl_mempcpy = yes; then
30039              ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30040 if test "x$ac_cv_func_mempcpy" = xyes
30041 then :
30042
30043 fi
30044
30045              if test $ac_cv_func_mempcpy = yes; then
30046                gl_cv_onwards_func_mempcpy=yes
30047              else
30048                                                             gl_cv_onwards_func_mempcpy='future OS version'
30049              fi
30050            else
30051              gl_cv_onwards_func_mempcpy='future OS version'
30052            fi
30053            ;;
30054
30055
30056          *)
30057            ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30058 if test "x$ac_cv_func_mempcpy" = xyes
30059 then :
30060
30061 fi
30062
30063            gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
30064            ;;
30065
30066        esac
30067
30068   exec 6>&9 9>&-
30069
30070      ;;
30071 esac
30072 fi
30073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
30074 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
30075
30076   case "$gl_cv_onwards_func_mempcpy" in
30077     future*) ac_cv_func_mempcpy=no ;;
30078     *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
30079   esac
30080   if test $ac_cv_func_mempcpy = yes; then
30081
30082 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
30083
30084   fi
30085
30086
30087
30088
30089   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
30090 printf %s "checking for flexible array member... " >&6; }
30091 if test ${ac_cv_c_flexmember+y}
30092 then :
30093   printf %s "(cached) " >&6
30094 else case e in #(
30095   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30096 /* end confdefs.h.  */
30097 #include <stdlib.h>
30098             #include <stdio.h>
30099             #include <stddef.h>
30100             struct m { struct m *next, **list; char name[]; };
30101             struct s { struct s *p; struct m *m; int n; double d[]; };
30102 int
30103 main (void)
30104 {
30105 int m = getchar ();
30106             size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
30107             nbytes += sizeof (struct s) - 1;
30108             nbytes -= nbytes % sizeof (struct s);
30109             struct s *p = malloc (nbytes);
30110             p->p = p;
30111             p->m = NULL;
30112             p->d[0] = 0.0;
30113             return p->d != (double *) NULL;
30114   ;
30115   return 0;
30116 }
30117 _ACEOF
30118 if ac_fn_c_try_compile "$LINENO"
30119 then :
30120   ac_cv_c_flexmember=yes
30121 else case e in #(
30122   e) ac_cv_c_flexmember=no ;;
30123 esac
30124 fi
30125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30126 esac
30127 fi
30128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
30129 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
30130   if test $ac_cv_c_flexmember = yes; then
30131
30132 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
30133
30134   else
30135     printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
30136
30137   fi
30138
30139
30140
30141
30142
30143      gl_fnmatch_required_lowercase=`
30144     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
30145   `
30146
30147   if test $ac_cv_func_fnmatch = no; then
30148     HAVE_FNMATCH=0
30149   else
30150     gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
30151     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
30152 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
30153 if eval test \${$gl_fnmatch_cache_var+y}
30154 then :
30155   printf %s "(cached) " >&6
30156 else case e in #(
30157   e)                                    if test $gl_fnmatch_required = GNU; then
30158          gl_fnmatch_gnu_start=
30159          gl_fnmatch_gnu_end=
30160        else
30161          gl_fnmatch_gnu_start='#if 0'
30162          gl_fnmatch_gnu_end='#endif'
30163        fi
30164        if test "$cross_compiling" = yes
30165 then :
30166   case "$host_os" in
30167                                 # Guess yes on musl systems.
30168             *-musl* | midipix*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
30169                                 # Guess no otherwise, even on glibc systems.
30170             *)                  eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
30171           esac
30172
30173 else case e in #(
30174   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30175 /* end confdefs.h.  */
30176 #include <fnmatch.h>
30177               static int
30178               y (char const *pattern, char const *string, int flags)
30179               {
30180                 return fnmatch (pattern, string, flags) == 0;
30181               }
30182               static int
30183               n (char const *pattern, char const *string, int flags)
30184               {
30185                 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
30186               }
30187
30188 int
30189 main (void)
30190 {
30191 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
30192               char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
30193               static char const A_1[] = { 'A' - 1, 0 };
30194               static char const A01[] = { 'A' + 1, 0 };
30195               static char const a_1[] = { 'a' - 1, 0 };
30196               static char const a01[] = { 'a' + 1, 0 };
30197               static char const bs_1[] = { '\\\\' - 1, 0 };
30198               static char const bs01[] = { '\\\\' + 1, 0 };
30199               int result = 0;
30200               if (!n ("a*", "", 0))
30201                 return 1;
30202               if (!y ("a*", "abc", 0))
30203                 return 1;
30204               if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
30205                 return 1;
30206               if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
30207                 return 2;
30208               if (!y ("a\\\\bc", "abc", 0))
30209                 return 3;
30210               if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
30211                 return 3;
30212               if (!y ("*x", ".x", 0))
30213                 return 4;
30214               if (!n ("*x", ".x", FNM_PERIOD))
30215                 return 4;
30216               if (!y (Apat, "\\\\", 0))
30217                 return 5;
30218               if (!y (Apat, "A", 0))
30219                 return 5;
30220               if (!y (apat, "\\\\", 0))
30221                 return 5;
30222               if (!y (apat, "a", 0))
30223                 return 5;
30224               if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
30225                 return 5;
30226               if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
30227                 return 5;
30228               if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
30229                 return 5;
30230               if (!(y (apat, a01, 0) == ('a' < '\\\\')))
30231                 return 5;
30232               if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
30233                 return 5;
30234               if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
30235                 return 5;
30236               if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
30237                 return 5;
30238               if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
30239                 return 5;
30240               $gl_fnmatch_gnu_start
30241               if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
30242                 result |= 8;
30243               if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
30244                 result |= 16;
30245               if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
30246                 result |= 32;
30247               if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
30248                 result |= 64;
30249               if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
30250                 result |= 64;
30251               if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
30252                 result |= 64;
30253               $gl_fnmatch_gnu_end
30254               return result;
30255
30256   ;
30257   return 0;
30258 }
30259 _ACEOF
30260 if ac_fn_c_try_run "$LINENO"
30261 then :
30262   eval "$gl_fnmatch_cache_var=yes"
30263 else case e in #(
30264   e) eval "$gl_fnmatch_cache_var=no" ;;
30265 esac
30266 fi
30267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30268   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30269 esac
30270 fi
30271
30272        ;;
30273 esac
30274 fi
30275 eval ac_res=\$$gl_fnmatch_cache_var
30276                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30277 printf "%s\n" "$ac_res" >&6; }
30278     eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
30279     case "$gl_fnmatch_result" in
30280       *yes) ;;
30281       *) REPLACE_FNMATCH=1 ;;
30282     esac
30283   fi
30284   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30285
30286
30287
30288
30289
30290
30291   GL_GENERATE_FNMATCH_H=true
30292
30293   fi
30294
30295
30296
30297
30298
30299   case "$GL_GENERATE_FNMATCH_H" in
30300     false) FNMATCH_H='' ;;
30301     true)
30302                   if test -z "$FNMATCH_H"; then
30303         FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
30304       fi
30305       ;;
30306     *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
30307   esac
30308
30309
30310      if $GL_GENERATE_FNMATCH_H; then
30311   GL_GENERATE_FNMATCH_H_TRUE=
30312   GL_GENERATE_FNMATCH_H_FALSE='#'
30313 else
30314   GL_GENERATE_FNMATCH_H_TRUE='#'
30315   GL_GENERATE_FNMATCH_H_FALSE=
30316 fi
30317 :
30318     if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30319     GL_GENERATE_FNMATCH_H_TRUE='#'
30320     GL_GENERATE_FNMATCH_H_FALSE='#'
30321   fi
30322
30323
30324
30325
30326
30327   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30328
30329
30330
30331
30332
30333
30334
30335
30336   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
30337
30338
30339
30340
30341
30342   fi
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352           GL_GNULIB_FNMATCH=1
30353
30354
30355
30356
30357
30358 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
30359
30360
30361
30362
30363
30364
30365
30366
30367   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30368
30369
30370
30371
30372
30373
30374
30375
30376   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
30377
30378
30379
30380
30381
30382   fi
30383
30384
30385 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398   case "$GL_GENERATE_FNMATCH_H" in
30399     false) FNMATCH_H='' ;;
30400     true)
30401                   if test -z "$FNMATCH_H"; then
30402         FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
30403       fi
30404       ;;
30405     *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
30406   esac
30407
30408
30409      if $GL_GENERATE_FNMATCH_H; then
30410   GL_GENERATE_FNMATCH_H_TRUE=
30411   GL_GENERATE_FNMATCH_H_FALSE='#'
30412 else
30413   GL_GENERATE_FNMATCH_H_TRUE='#'
30414   GL_GENERATE_FNMATCH_H_FALSE=
30415 fi
30416 :
30417     if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30418     GL_GENERATE_FNMATCH_H_TRUE='#'
30419     GL_GENERATE_FNMATCH_H_FALSE='#'
30420   fi
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430   if test $REPLACE_FCLOSE = 1; then
30431     REPLACE_FOPEN=1
30432   fi
30433
30434   if test $REPLACE_FOPEN = 1; then
30435
30436
30437
30438
30439
30440
30441
30442
30443   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
30444
30445     :
30446   fi
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456           GL_GNULIB_FOPEN=1
30457
30458
30459
30460
30461
30462 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
30463
30464
30465
30466
30467
30468   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
30469 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
30470 if test ${gl_cv_func_fopen_mode_x+y}
30471 then :
30472   printf %s "(cached) " >&6
30473 else case e in #(
30474   e) rm -f conftest.x
30475      if test "$cross_compiling" = yes
30476 then :
30477   case "$host_os" in
30478           # Guess yes on glibc and musl systems.
30479           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
30480             gl_cv_func_fopen_mode_x="guessing yes" ;;
30481           # If we don't know, obey --enable-cross-guesses.
30482           *)
30483             gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
30484         esac
30485
30486 else case e in #(
30487   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30488 /* end confdefs.h.  */
30489
30490 #include <stdio.h>
30491 #include <errno.h>
30492 int main ()
30493 {
30494   FILE *fp;
30495   fp = fopen ("conftest.x", "w");
30496   fclose (fp);
30497   fp = fopen ("conftest.x", "wx");
30498   if (fp != NULL)
30499     /* 'x' ignored */
30500     return 1;
30501   else if (errno == EEXIST)
30502     return 0;
30503   else
30504     /* 'x' rejected */
30505     return 2;
30506 }
30507 _ACEOF
30508 if ac_fn_c_try_run "$LINENO"
30509 then :
30510   gl_cv_func_fopen_mode_x=yes
30511 else case e in #(
30512   e) gl_cv_func_fopen_mode_x=no ;;
30513 esac
30514 fi
30515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30516   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30517 esac
30518 fi
30519
30520      rm -f conftest.x
30521      ;;
30522 esac
30523 fi
30524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
30525 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
30526   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
30527 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
30528 if test ${gl_cv_func_fopen_mode_e+y}
30529 then :
30530   printf %s "(cached) " >&6
30531 else case e in #(
30532   e) echo foo > conftest.x
30533      if test "$cross_compiling" = yes
30534 then :
30535   case "$host_os" in
30536           # Guess yes on glibc and musl systems.
30537           linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
30538             gl_cv_func_fopen_mode_e="guessing yes" ;;
30539           # Guess no on native Windows.
30540           mingw*)
30541             gl_cv_func_fopen_mode_e="guessing no" ;;
30542           # If we don't know, obey --enable-cross-guesses.
30543           *)
30544             gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
30545         esac
30546
30547 else case e in #(
30548   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549 /* end confdefs.h.  */
30550
30551 #include <stdio.h>
30552 #include <errno.h>
30553 #include <fcntl.h>
30554
30555
30556 $gl_mda_defines
30557
30558 int main ()
30559 {
30560   FILE *fp = fopen ("conftest.x", "re");
30561   if (fp != NULL)
30562     {
30563       if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
30564         return 0;
30565       else
30566         /* 'e' ignored */
30567         return 1;
30568     }
30569   else
30570     /* 'e' rejected */
30571     return 2;
30572 }
30573 _ACEOF
30574 if ac_fn_c_try_run "$LINENO"
30575 then :
30576   gl_cv_func_fopen_mode_e=yes
30577 else case e in #(
30578   e) gl_cv_func_fopen_mode_e=no ;;
30579 esac
30580 fi
30581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30582   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30583 esac
30584 fi
30585
30586      rm -f conftest.x
30587      ;;
30588 esac
30589 fi
30590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
30591 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
30592   REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN"
30593   case "$gl_cv_func_fopen_mode_x" in
30594     *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
30595   esac
30596   case "$gl_cv_func_fopen_mode_e" in
30597     *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
30598   esac
30599
30600   if test $REPLACE_FOPEN_FOR_FOPEN_GNU = 1; then
30601
30602
30603
30604
30605
30606
30607
30608
30609   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
30610
30611     :
30612   fi
30613
30614
30615 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627           GL_GNULIB_FOPEN_GNU=1
30628
30629
30630
30631
30632
30633 printf "%s\n" "#define GNULIB_TEST_FOPEN_GNU 1" >>confdefs.h
30634
30635
30636
30637
30638
30639
30640                           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
30641 printf %s "checking whether free is known to preserve errno... " >&6; }
30642 if test ${gl_cv_func_free_preserves_errno+y}
30643 then :
30644   printf %s "(cached) " >&6
30645 else case e in #(
30646   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30647 /* end confdefs.h.  */
30648 #include <stdlib.h>
30649
30650 int
30651 main (void)
30652 {
30653 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
30654             #elif defined __OpenBSD__
30655             #elif defined __sun
30656             #else
30657               #error "'free' is not known to preserve errno"
30658             #endif
30659
30660   ;
30661   return 0;
30662 }
30663 _ACEOF
30664 if ac_fn_c_try_compile "$LINENO"
30665 then :
30666   gl_cv_func_free_preserves_errno=yes
30667 else case e in #(
30668   e) gl_cv_func_free_preserves_errno=no ;;
30669 esac
30670 fi
30671 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30672      ;;
30673 esac
30674 fi
30675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
30676 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
30677
30678   case $gl_cv_func_free_preserves_errno in
30679    *yes)
30680
30681 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
30682
30683     ;;
30684    *) REPLACE_FREE=1 ;;
30685   esac
30686
30687
30688      if test $REPLACE_FREE = 1; then
30689   GL_COND_OBJ_FREE_TRUE=
30690   GL_COND_OBJ_FREE_FALSE='#'
30691 else
30692   GL_COND_OBJ_FREE_TRUE='#'
30693   GL_COND_OBJ_FREE_FALSE=
30694 fi
30695 :
30696     if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
30697     GL_COND_OBJ_FREE_TRUE='#'
30698     GL_COND_OBJ_FREE_FALSE='#'
30699   fi
30700
30701   if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
30702
30703     :
30704
30705 fi
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715           GL_GNULIB_FREE_POSIX=1
30716
30717
30718
30719
30720
30721 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
30722
30723
30724
30725
30726
30727
30728   case "$host_os" in
30729     mingw* | pw* | os2*)
30730       REPLACE_FREOPEN=1
30731       ;;
30732     *)
30733       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
30734 printf %s "checking whether freopen works on closed fds... " >&6; }
30735 if test ${gl_cv_func_freopen_works_on_closed+y}
30736 then :
30737   printf %s "(cached) " >&6
30738 else case e in #(
30739   e) if test "$cross_compiling" = yes
30740 then :
30741   case $host_os in
30742               *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
30743               *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
30744             esac
30745 else case e in #(
30746   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30747 /* end confdefs.h.  */
30748 #include <stdio.h>
30749                 #include <unistd.h>
30750
30751
30752 $gl_mda_defines
30753
30754 int
30755 main (void)
30756 {
30757 close (0);
30758                 return !(freopen ("/dev/null", "r", stdin)
30759                          && getchar () == EOF
30760                          && !ferror (stdin) && feof (stdin));
30761   ;
30762   return 0;
30763 }
30764 _ACEOF
30765 if ac_fn_c_try_run "$LINENO"
30766 then :
30767   gl_cv_func_freopen_works_on_closed=yes
30768 else case e in #(
30769   e) gl_cv_func_freopen_works_on_closed=no ;;
30770 esac
30771 fi
30772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30773   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30774 esac
30775 fi
30776  ;;
30777 esac
30778 fi
30779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
30780 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
30781       case $gl_cv_func_freopen_works_on_closed in
30782         *no) REPLACE_FREOPEN=1;;
30783       esac
30784   esac
30785
30786
30787      if test $REPLACE_FREOPEN = 1; then
30788   GL_COND_OBJ_FREOPEN_TRUE=
30789   GL_COND_OBJ_FREOPEN_FALSE='#'
30790 else
30791   GL_COND_OBJ_FREOPEN_TRUE='#'
30792   GL_COND_OBJ_FREOPEN_FALSE=
30793 fi
30794 :
30795     if test -z "${GL_COND_OBJ_FREOPEN_TRUE}" && test -z "${GL_COND_OBJ_FREOPEN_FALSE}"; then
30796     GL_COND_OBJ_FREOPEN_TRUE='#'
30797     GL_COND_OBJ_FREOPEN_FALSE='#'
30798   fi
30799
30800   if test -z "$GL_COND_OBJ_FREOPEN_TRUE"; then :
30801
30802     :
30803
30804 fi
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814           GL_GNULIB_FREOPEN=1
30815
30816
30817
30818
30819
30820 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
30821
30822
30823
30824
30825
30826
30827
30828   case "$host_os" in
30829     mingw* | solaris*)
30830                         REPLACE_FSTAT=1
30831       ;;
30832   esac
30833
30834
30835
30836
30837      if test $REPLACE_FSTAT = 1; then
30838   GL_COND_OBJ_FSTAT_TRUE=
30839   GL_COND_OBJ_FSTAT_FALSE='#'
30840 else
30841   GL_COND_OBJ_FSTAT_TRUE='#'
30842   GL_COND_OBJ_FSTAT_FALSE=
30843 fi
30844 :
30845     if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
30846     GL_COND_OBJ_FSTAT_TRUE='#'
30847     GL_COND_OBJ_FSTAT_FALSE='#'
30848   fi
30849
30850   if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
30851
30852     case "$host_os" in
30853       mingw*)
30854
30855
30856
30857
30858
30859
30860
30861
30862   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
30863
30864         ;;
30865     esac
30866
30867
30868
30869   :
30870
30871
30872 fi
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882           GL_GNULIB_FSTAT=1
30883
30884
30885
30886
30887
30888 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
30889
30890
30891
30892
30893
30894
30895
30896
30897   if test $ac_cv_func_getdtablesize = yes &&
30898      test $ac_cv_have_decl_getdtablesize = yes; then
30899     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
30900 printf %s "checking whether getdtablesize works... " >&6; }
30901 if test ${gl_cv_func_getdtablesize_works+y}
30902 then :
30903   printf %s "(cached) " >&6
30904 else case e in #(
30905   e)                                                  case "$host_os" in
30906          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
30907          *)
30908                                                        if test "$cross_compiling" = yes
30909 then :
30910   case "$host_os" in
30911                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
30912                   gl_cv_func_getdtablesize_works="guessing no" ;;
30913                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
30914               esac
30915
30916 else case e in #(
30917   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30918 /* end confdefs.h.  */
30919
30920              #include <unistd.h>
30921
30922
30923 $gl_mda_defines
30924
30925
30926 int
30927 main (void)
30928 {
30929 int size = getdtablesize();
30930                  if (dup2 (0, getdtablesize()) != -1)
30931                    return 1;
30932                  if (size != getdtablesize())
30933                    return 2;
30934
30935   ;
30936   return 0;
30937 }
30938 _ACEOF
30939 if ac_fn_c_try_run "$LINENO"
30940 then :
30941   gl_cv_func_getdtablesize_works=yes
30942 else case e in #(
30943   e) gl_cv_func_getdtablesize_works=no ;;
30944 esac
30945 fi
30946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30947   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30948 esac
30949 fi
30950
30951            ;;
30952        esac
30953        ;;
30954 esac
30955 fi
30956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
30957 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
30958     case "$gl_cv_func_getdtablesize_works" in
30959       *yes | "no (limitation)") ;;
30960       *) REPLACE_GETDTABLESIZE=1 ;;
30961     esac
30962   else
30963     HAVE_GETDTABLESIZE=0
30964   fi
30965
30966
30967      if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
30968   GL_COND_OBJ_GETDTABLESIZE_TRUE=
30969   GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
30970 else
30971   GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
30972   GL_COND_OBJ_GETDTABLESIZE_FALSE=
30973 fi
30974 :
30975     if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
30976     GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
30977     GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
30978   fi
30979
30980   if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
30981
30982     :
30983
30984 fi
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994           GL_GNULIB_GETDTABLESIZE=1
30995
30996
30997
30998
30999
31000 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013     REPLACE_GETOPT=0
31014     if test -n "$gl_replace_getopt"; then
31015       REPLACE_GETOPT=1
31016     fi
31017
31018   GL_GENERATE_GETOPT_H=false
31019   GL_GENERATE_GETOPT_CDEFS_H=false
31020   if test $REPLACE_GETOPT = 1; then
31021
31022
31023   if test $ac_cv_header_sys_cdefs_h = yes; then
31024     HAVE_SYS_CDEFS_H=1
31025   else
31026     HAVE_SYS_CDEFS_H=0
31027   fi
31028
31029
31030
31031 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
31032
31033   GL_GENERATE_GETOPT_H=true
31034   GL_GENERATE_GETOPT_CDEFS_H=true
31035
31036   fi
31037
31038
31039
31040
31041
31042   case "$GL_GENERATE_GETOPT_H" in
31043     false) GETOPT_H='' ;;
31044     true)
31045                   if test -z "$GETOPT_H"; then
31046         GETOPT_H="${gl_source_base_prefix}getopt.h"
31047       fi
31048       ;;
31049     *) echo "*** GL_GENERATE_GETOPT_H is not set correctly" 1>&2; exit 1 ;;
31050   esac
31051
31052
31053      if $GL_GENERATE_GETOPT_H; then
31054   GL_GENERATE_GETOPT_H_TRUE=
31055   GL_GENERATE_GETOPT_H_FALSE='#'
31056 else
31057   GL_GENERATE_GETOPT_H_TRUE='#'
31058   GL_GENERATE_GETOPT_H_FALSE=
31059 fi
31060 :
31061     if test -z "${GL_GENERATE_GETOPT_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_H_FALSE}"; then
31062     GL_GENERATE_GETOPT_H_TRUE='#'
31063     GL_GENERATE_GETOPT_H_FALSE='#'
31064   fi
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074   case "$GL_GENERATE_GETOPT_CDEFS_H" in
31075     false) GETOPT_CDEFS_H='' ;;
31076     true)
31077                   if test -z "$GETOPT_CDEFS_H"; then
31078         GETOPT_CDEFS_H="${gl_source_base_prefix}getopt-cdefs.h"
31079       fi
31080       ;;
31081     *) echo "*** GL_GENERATE_GETOPT_CDEFS_H is not set correctly" 1>&2; exit 1 ;;
31082   esac
31083
31084
31085      if $GL_GENERATE_GETOPT_CDEFS_H; then
31086   GL_GENERATE_GETOPT_CDEFS_H_TRUE=
31087   GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
31088 else
31089   GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
31090   GL_GENERATE_GETOPT_CDEFS_H_FALSE=
31091 fi
31092 :
31093     if test -z "${GL_GENERATE_GETOPT_CDEFS_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_CDEFS_H_FALSE}"; then
31094     GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
31095     GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
31096   fi
31097
31098
31099
31100
31101
31102
31103
31104      if test $REPLACE_GETOPT = 1; then
31105   GL_COND_OBJ_GETOPT_TRUE=
31106   GL_COND_OBJ_GETOPT_FALSE='#'
31107 else
31108   GL_COND_OBJ_GETOPT_TRUE='#'
31109   GL_COND_OBJ_GETOPT_FALSE=
31110 fi
31111 :
31112     if test -z "${GL_COND_OBJ_GETOPT_TRUE}" && test -z "${GL_COND_OBJ_GETOPT_FALSE}"; then
31113     GL_COND_OBJ_GETOPT_TRUE='#'
31114     GL_COND_OBJ_GETOPT_FALSE='#'
31115   fi
31116
31117   if test -z "$GL_COND_OBJ_GETOPT_TRUE"; then :
31118
31119
31120
31121
31122
31123
31124
31125   GL_GNULIB_UNISTD_H_GETOPT=1
31126
31127
31128
31129 fi
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139           GL_GNULIB_GETOPT_POSIX=1
31140
31141
31142
31143
31144
31145 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
31146
31147
31148
31149
31150
31151
31152
31153       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
31154 printf %s "checking for getpagesize... " >&6; }
31155 if test ${gl_cv_func_getpagesize+y}
31156 then :
31157   printf %s "(cached) " >&6
31158 else case e in #(
31159   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31160 /* end confdefs.h.  */
31161 #include <unistd.h>
31162 int
31163 main (void)
31164 {
31165 return getpagesize();
31166   ;
31167   return 0;
31168 }
31169
31170 _ACEOF
31171 if ac_fn_c_try_link "$LINENO"
31172 then :
31173   gl_cv_func_getpagesize=yes
31174 else case e in #(
31175   e) gl_cv_func_getpagesize=no ;;
31176 esac
31177 fi
31178 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31179     conftest$ac_exeext conftest.$ac_ext
31180      ;;
31181 esac
31182 fi
31183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
31184 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
31185
31186   if test $gl_cv_func_getpagesize = no; then
31187     HAVE_GETPAGESIZE=0
31188     ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
31189 if test "x$ac_cv_header_OS_h" = xyes
31190 then :
31191   printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
31192
31193 fi
31194
31195     if test $ac_cv_header_OS_h = yes; then
31196       HAVE_OS_H=1
31197     fi
31198     ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
31199 if test "x$ac_cv_header_sys_param_h" = xyes
31200 then :
31201   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
31202
31203 fi
31204
31205     if test $ac_cv_header_sys_param_h = yes; then
31206       HAVE_SYS_PARAM_H=1
31207     fi
31208   fi
31209   case "$host_os" in
31210     mingw*)
31211       REPLACE_GETPAGESIZE=1
31212       ;;
31213   esac
31214       ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31215 if test "x$ac_cv_have_decl_getpagesize" = xyes
31216 then :
31217
31218 else case e in #(
31219   e) HAVE_DECL_GETPAGESIZE=0 ;;
31220 esac
31221 fi
31222
31223
31224      if test $REPLACE_GETPAGESIZE = 1; then
31225   GL_COND_OBJ_GETPAGESIZE_TRUE=
31226   GL_COND_OBJ_GETPAGESIZE_FALSE='#'
31227 else
31228   GL_COND_OBJ_GETPAGESIZE_TRUE='#'
31229   GL_COND_OBJ_GETPAGESIZE_FALSE=
31230 fi
31231 :
31232     if test -z "${GL_COND_OBJ_GETPAGESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETPAGESIZE_FALSE}"; then
31233     GL_COND_OBJ_GETPAGESIZE_TRUE='#'
31234     GL_COND_OBJ_GETPAGESIZE_FALSE='#'
31235   fi
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246           GL_GNULIB_GETPAGESIZE=1
31247
31248
31249
31250
31251
31252 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
31253
31254
31255
31256
31257
31258
31259
31260
31261   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getprogname" >&5
31262 printf %s "checking for getprogname... " >&6; }
31263 if test ${gl_cv_onwards_func_getprogname+y}
31264 then :
31265   printf %s "(cached) " >&6
31266 else case e in #(
31267   e)
31268   exec 9>&6 6>/dev/null
31269
31270        case "$host_os" in
31271
31272          linux*-android*)
31273            ac_fn_check_decl "$LINENO" "getprogname" "ac_cv_have_decl_getprogname" "#include <stdlib.h>
31274 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31275 if test "x$ac_cv_have_decl_getprogname" = xyes
31276 then :
31277
31278 fi
31279            if test $ac_cv_have_decl_getprogname = yes; then
31280              ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
31281 if test "x$ac_cv_func_getprogname" = xyes
31282 then :
31283
31284 fi
31285
31286              if test $ac_cv_func_getprogname = yes; then
31287                gl_cv_onwards_func_getprogname=yes
31288              else
31289                                                             gl_cv_onwards_func_getprogname='future OS version'
31290              fi
31291            else
31292              gl_cv_onwards_func_getprogname='future OS version'
31293            fi
31294            ;;
31295
31296
31297          *)
31298            ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
31299 if test "x$ac_cv_func_getprogname" = xyes
31300 then :
31301
31302 fi
31303
31304            gl_cv_onwards_func_getprogname=$ac_cv_func_getprogname
31305            ;;
31306
31307        esac
31308
31309   exec 6>&9 9>&-
31310
31311      ;;
31312 esac
31313 fi
31314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getprogname" >&5
31315 printf "%s\n" "$gl_cv_onwards_func_getprogname" >&6; }
31316
31317   case "$gl_cv_onwards_func_getprogname" in
31318     future*) ac_cv_func_getprogname=no ;;
31319     *)       ac_cv_func_getprogname=$gl_cv_onwards_func_getprogname ;;
31320   esac
31321   if test $ac_cv_func_getprogname = yes; then
31322
31323 printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h
31324
31325   fi
31326
31327
31328   if test $ac_cv_func_getprogname = no; then
31329     HAVE_GETPROGNAME=0
31330     case "$gl_cv_onwards_func_getprogname" in
31331       future*) REPLACE_GETPROGNAME=1 ;;
31332     esac
31333   fi
31334   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
31335 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31336 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
31337 then :
31338   ac_have_decl=1
31339 else case e in #(
31340   e) ac_have_decl=0 ;;
31341 esac
31342 fi
31343 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
31344 if test $ac_have_decl = 1
31345 then :
31346
31347 else case e in #(
31348   e) HAVE_DECL_PROGRAM_INVOCATION_NAME=0 ;;
31349 esac
31350 fi
31351
31352
31353
31354      if test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1; then
31355   GL_COND_OBJ_GETPROGNAME_TRUE=
31356   GL_COND_OBJ_GETPROGNAME_FALSE='#'
31357 else
31358   GL_COND_OBJ_GETPROGNAME_TRUE='#'
31359   GL_COND_OBJ_GETPROGNAME_FALSE=
31360 fi
31361 :
31362     if test -z "${GL_COND_OBJ_GETPROGNAME_TRUE}" && test -z "${GL_COND_OBJ_GETPROGNAME_FALSE}"; then
31363     GL_COND_OBJ_GETPROGNAME_TRUE='#'
31364     GL_COND_OBJ_GETPROGNAME_FALSE='#'
31365   fi
31366
31367   if test -z "$GL_COND_OBJ_GETPROGNAME_TRUE"; then :
31368
31369
31370
31371
31372   ac_found=0
31373   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
31374 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31375 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
31376 then :
31377   ac_have_decl=1
31378 else case e in #(
31379   e) ac_have_decl=0 ;;
31380 esac
31381 fi
31382 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
31383 if test $ac_have_decl = 1
31384 then :
31385   ac_found=1
31386 fi
31387
31388   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
31389 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31390 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
31391 then :
31392   ac_have_decl=1
31393 else case e in #(
31394   e) ac_have_decl=0 ;;
31395 esac
31396 fi
31397 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
31398 if test $ac_have_decl = 1
31399 then :
31400   ac_found=1
31401 fi
31402
31403   ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
31404 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31405 if test "x$ac_cv_have_decl___argv" = xyes
31406 then :
31407   ac_have_decl=1
31408 else case e in #(
31409   e) ac_have_decl=0 ;;
31410 esac
31411 fi
31412 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
31413 if test $ac_have_decl = 1
31414 then :
31415   ac_found=1
31416 fi
31417
31418
31419   # Incur the cost of this test only if none of the above worked.
31420   if test $ac_found = 0; then
31421     # On OpenBSD 5.1, using the global __progname variable appears to be
31422     # the only way to implement getprogname.
31423     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
31424 printf %s "checking whether __progname is defined in default libraries... " >&6; }
31425 if test ${gl_cv_var___progname+y}
31426 then :
31427   printf %s "(cached) " >&6
31428 else case e in #(
31429   e)
31430         gl_cv_var___progname=
31431         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31432 /* end confdefs.h.  */
31433 extern char *__progname;
31434 int
31435 main (void)
31436 {
31437 return *__progname;
31438
31439   ;
31440   return 0;
31441 }
31442 _ACEOF
31443 if ac_fn_c_try_link "$LINENO"
31444 then :
31445   gl_cv_var___progname=yes
31446
31447 fi
31448 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31449     conftest$ac_exeext conftest.$ac_ext
31450
31451      ;;
31452 esac
31453 fi
31454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
31455 printf "%s\n" "$gl_cv_var___progname" >&6; }
31456     if test "$gl_cv_var___progname" = yes; then
31457
31458 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
31459
31460     fi
31461   fi
31462
31463
31464 fi
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474           GL_GNULIB_GETPROGNAME=1
31475
31476
31477
31478
31479
31480 printf "%s\n" "#define GNULIB_TEST_GETPROGNAME 1" >>confdefs.h
31481
31482
31483
31484
31485
31486
31487
31488
31489   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getrandom" >&5
31490 printf %s "checking for getrandom... " >&6; }
31491 if test ${gl_cv_onwards_func_getrandom+y}
31492 then :
31493   printf %s "(cached) " >&6
31494 else case e in #(
31495   e)
31496   exec 9>&6 6>/dev/null
31497
31498        case "$host_os" in
31499
31500          linux*-android*)
31501            ac_fn_check_decl "$LINENO" "getrandom" "ac_cv_have_decl_getrandom" "/* Additional includes are needed before <sys/random.h> on uClibc
31502          and Mac OS X.  */
31503       #include <sys/types.h>
31504       #include <stdlib.h>
31505       #include <sys/random.h>
31506
31507 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31508 if test "x$ac_cv_have_decl_getrandom" = xyes
31509 then :
31510
31511 fi
31512            if test $ac_cv_have_decl_getrandom = yes; then
31513              ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
31514 if test "x$ac_cv_func_getrandom" = xyes
31515 then :
31516
31517 fi
31518
31519              if test $ac_cv_func_getrandom = yes; then
31520                gl_cv_onwards_func_getrandom=yes
31521              else
31522                                                             gl_cv_onwards_func_getrandom='future OS version'
31523              fi
31524            else
31525              gl_cv_onwards_func_getrandom='future OS version'
31526            fi
31527            ;;
31528
31529
31530          *)
31531            ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
31532 if test "x$ac_cv_func_getrandom" = xyes
31533 then :
31534
31535 fi
31536
31537            gl_cv_onwards_func_getrandom=$ac_cv_func_getrandom
31538            ;;
31539
31540        esac
31541
31542   exec 6>&9 9>&-
31543
31544      ;;
31545 esac
31546 fi
31547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getrandom" >&5
31548 printf "%s\n" "$gl_cv_onwards_func_getrandom" >&6; }
31549
31550   case "$gl_cv_onwards_func_getrandom" in
31551     future*) ac_cv_func_getrandom=no ;;
31552     *)       ac_cv_func_getrandom=$gl_cv_onwards_func_getrandom ;;
31553   esac
31554   if test $ac_cv_func_getrandom = yes; then
31555
31556 printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
31557
31558   fi
31559
31560
31561   if test "$ac_cv_func_getrandom" != yes; then
31562     HAVE_GETRANDOM=0
31563     case "$gl_cv_onwards_func_getrandom" in
31564       future*) REPLACE_GETRANDOM=1 ;;
31565     esac
31566   else
31567         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
31568 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
31569 if test ${gl_cv_func_getrandom_ok+y}
31570 then :
31571   printf %s "(cached) " >&6
31572 else case e in #(
31573   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31574 /* end confdefs.h.  */
31575 /* Additional includes are needed before <sys/random.h> on uClibc
31576                  and Mac OS X.  */
31577               #include <sys/types.h>
31578               #include <stdlib.h>
31579               #include <sys/random.h>
31580               ssize_t getrandom (void *, size_t, unsigned int);
31581
31582 int
31583 main (void)
31584 {
31585
31586   ;
31587   return 0;
31588 }
31589
31590 _ACEOF
31591 if ac_fn_c_try_compile "$LINENO"
31592 then :
31593   gl_cv_func_getrandom_ok=yes
31594 else case e in #(
31595   e) gl_cv_func_getrandom_ok=no ;;
31596 esac
31597 fi
31598 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31599        ;;
31600 esac
31601 fi
31602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
31603 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
31604     if test $gl_cv_func_getrandom_ok = no; then
31605       REPLACE_GETRANDOM=1
31606     fi
31607   fi
31608
31609   case "$host_os" in
31610     mingw*)
31611       ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
31612
31613 "
31614 if test "x$ac_cv_header_bcrypt_h" = xyes
31615 then :
31616   printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
31617
31618 fi
31619
31620       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
31621 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
31622 if test ${gl_cv_lib_assume_bcrypt+y}
31623 then :
31624   printf %s "(cached) " >&6
31625 else case e in #(
31626   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31627 /* end confdefs.h.  */
31628 #include <windows.h>
31629 int
31630 main (void)
31631 {
31632 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
31633                   cannot assume it
31634                 #endif
31635
31636   ;
31637   return 0;
31638 }
31639
31640 _ACEOF
31641 if ac_fn_c_try_compile "$LINENO"
31642 then :
31643   gl_cv_lib_assume_bcrypt=yes
31644 else case e in #(
31645   e) gl_cv_lib_assume_bcrypt=no ;;
31646 esac
31647 fi
31648 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31649          ;;
31650 esac
31651 fi
31652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
31653 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
31654       if test $gl_cv_lib_assume_bcrypt = yes; then
31655
31656 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
31657
31658         GETRANDOM_LIB='-lbcrypt'
31659       else
31660         GETRANDOM_LIB='-ladvapi32'
31661       fi
31662       ;;
31663     *)
31664       GETRANDOM_LIB= ;;
31665   esac
31666
31667     LIB_GETRANDOM="$GETRANDOM_LIB"
31668
31669
31670
31671      if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
31672   GL_COND_OBJ_GETRANDOM_TRUE=
31673   GL_COND_OBJ_GETRANDOM_FALSE='#'
31674 else
31675   GL_COND_OBJ_GETRANDOM_TRUE='#'
31676   GL_COND_OBJ_GETRANDOM_FALSE=
31677 fi
31678 :
31679     if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
31680     GL_COND_OBJ_GETRANDOM_TRUE='#'
31681     GL_COND_OBJ_GETRANDOM_FALSE='#'
31682   fi
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693           GL_GNULIB_GETRANDOM=1
31694
31695
31696
31697
31698
31699 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710   if test $gl_cv_func_timespec_get = yes; then
31711
31712 printf "%s\n" "#define HAVE_TIMESPEC_GET 1" >>confdefs.h
31713
31714   fi
31715
31716
31717
31718
31719
31720
31721
31722
31723   gl_gettimeofday_timezone=void
31724   if test $ac_cv_func_gettimeofday != yes; then
31725     HAVE_GETTIMEOFDAY=0
31726   else
31727     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
31728 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
31729 if test ${gl_cv_func_gettimeofday_posix_signature+y}
31730 then :
31731   printf %s "(cached) " >&6
31732 else case e in #(
31733   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31734 /* end confdefs.h.  */
31735 #include <sys/time.h>
31736               struct timeval c;
31737               int gettimeofday (struct timeval *restrict, void *restrict);
31738
31739 int
31740 main (void)
31741 {
31742 /* glibc uses struct timezone * rather than the POSIX void *
31743                  if _GNU_SOURCE is defined.  However, since the only portable
31744                  use of gettimeofday uses NULL as the second parameter, and
31745                  since the glibc definition is actually more typesafe, it is
31746                  not worth wrapping this to get a compliant signature.  */
31747               int (*f) (struct timeval *restrict, void *restrict)
31748                 = gettimeofday;
31749               int x = f (&c, 0);
31750               return !(x | c.tv_sec | c.tv_usec);
31751
31752   ;
31753   return 0;
31754 }
31755 _ACEOF
31756 if ac_fn_c_try_compile "$LINENO"
31757 then :
31758   gl_cv_func_gettimeofday_posix_signature=yes
31759 else case e in #(
31760   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31761 /* end confdefs.h.  */
31762 #include <sys/time.h>
31763 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
31764
31765 int
31766 main (void)
31767 {
31768
31769   ;
31770   return 0;
31771 }
31772 _ACEOF
31773 if ac_fn_c_try_compile "$LINENO"
31774 then :
31775   gl_cv_func_gettimeofday_posix_signature=almost
31776 else case e in #(
31777   e) gl_cv_func_gettimeofday_posix_signature=no ;;
31778 esac
31779 fi
31780 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31781 esac
31782 fi
31783 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31784 esac
31785 fi
31786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
31787 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
31788     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
31789       gl_gettimeofday_timezone='struct timezone'
31790     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
31791       REPLACE_GETTIMEOFDAY=1
31792     fi
31793         if test $REPLACE_STRUCT_TIMEVAL = 1; then
31794       REPLACE_GETTIMEOFDAY=1
31795     fi
31796             case "$host_os" in
31797       mingw*) REPLACE_GETTIMEOFDAY=1 ;;
31798     esac
31799   fi
31800
31801 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
31802
31803
31804
31805      if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
31806   GL_COND_OBJ_GETTIMEOFDAY_TRUE=
31807   GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
31808 else
31809   GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
31810   GL_COND_OBJ_GETTIMEOFDAY_FALSE=
31811 fi
31812 :
31813     if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
31814     GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
31815     GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
31816   fi
31817
31818   if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
31819
31820     :
31821
31822 fi
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832           GL_GNULIB_GETTIMEOFDAY=1
31833
31834
31835
31836
31837
31838 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
31839
31840
31841
31842
31843
31844    if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
31845   GNU_MAKE_TRUE=
31846   GNU_MAKE_FALSE='#'
31847 else
31848   GNU_MAKE_TRUE='#'
31849   GNU_MAKE_FALSE=
31850 fi
31851
31852
31853   # Autoconf 2.61a.99 and earlier don't support linking a file only
31854   # in VPATH builds.  But since GNUmakefile is for maintainer use
31855   # only, it does not matter if we skip the link with older autoconf.
31856   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
31857   # builds, so use a shell variable to bypass this.
31858   GNUmakefile=GNUmakefile
31859   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
31860
31861
31862   HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
31863
31864     LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878           GL_GNULIB_ICONV=1
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893   case "$GL_GENERATE_ICONV_H" in
31894     false) ICONV_H='' ;;
31895     true)
31896                   if test -z "$ICONV_H"; then
31897         ICONV_H="${gl_source_base_prefix}iconv.h"
31898       fi
31899       ;;
31900     *) echo "*** GL_GENERATE_ICONV_H is not set correctly" 1>&2; exit 1 ;;
31901   esac
31902
31903
31904      if $GL_GENERATE_ICONV_H; then
31905   GL_GENERATE_ICONV_H_TRUE=
31906   GL_GENERATE_ICONV_H_FALSE='#'
31907 else
31908   GL_GENERATE_ICONV_H_TRUE='#'
31909   GL_GENERATE_ICONV_H_FALSE=
31910 fi
31911 :
31912     if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
31913     GL_GENERATE_ICONV_H_TRUE='#'
31914     GL_GENERATE_ICONV_H_FALSE='#'
31915   fi
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926   if test "$am_cv_func_iconv" = yes; then
31927
31928
31929
31930
31931
31932
31933   GL_GENERATE_ICONV_H=true
31934
31935             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31936 /* end confdefs.h.  */
31937
31938       #include <iconv.h>
31939       #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
31940        gnu_iconv
31941       #endif
31942
31943 _ACEOF
31944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31945   $EGREP_TRADITIONAL "gnu_iconv" >/dev/null 2>&1
31946 then :
31947   gl_func_iconv_gnu=yes
31948 else case e in #(
31949   e) gl_func_iconv_gnu=no ;;
31950 esac
31951 fi
31952 rm -rf conftest*
31953
31954     if test $gl_func_iconv_gnu = no; then
31955       iconv_flavor=
31956       case "$host_os" in
31957         aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
31958         irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
31959         hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
31960         osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
31961         solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
31962         openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
31963       esac
31964       if test -n "$iconv_flavor"; then
31965
31966 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
31967
31968
31969
31970
31971
31972
31973
31974
31975   GL_GENERATE_ICONV_H=true
31976
31977   REPLACE_ICONV_OPEN=1
31978
31979       fi
31980     fi
31981
31982   fi
31983
31984
31985
31986
31987
31988   case "$GL_GENERATE_ICONV_H" in
31989     false) ICONV_H='' ;;
31990     true)
31991                   if test -z "$ICONV_H"; then
31992         ICONV_H="${gl_source_base_prefix}iconv.h"
31993       fi
31994       ;;
31995     *) echo "*** GL_GENERATE_ICONV_H is not set correctly" 1>&2; exit 1 ;;
31996   esac
31997
31998
31999      if $GL_GENERATE_ICONV_H; then
32000   GL_GENERATE_ICONV_H_TRUE=
32001   GL_GENERATE_ICONV_H_FALSE='#'
32002 else
32003   GL_GENERATE_ICONV_H_TRUE='#'
32004   GL_GENERATE_ICONV_H_FALSE=
32005 fi
32006 :
32007     if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
32008     GL_GENERATE_ICONV_H_TRUE='#'
32009     GL_GENERATE_ICONV_H_FALSE='#'
32010   fi
32011
32012
32013
32014
32015
32016
32017      if test $REPLACE_ICONV_OPEN = 1; then
32018   GL_COND_OBJ_ICONV_OPEN_TRUE=
32019   GL_COND_OBJ_ICONV_OPEN_FALSE='#'
32020 else
32021   GL_COND_OBJ_ICONV_OPEN_TRUE='#'
32022   GL_COND_OBJ_ICONV_OPEN_FALSE=
32023 fi
32024 :
32025     if test -z "${GL_COND_OBJ_ICONV_OPEN_TRUE}" && test -z "${GL_COND_OBJ_ICONV_OPEN_FALSE}"; then
32026     GL_COND_OBJ_ICONV_OPEN_TRUE='#'
32027     GL_COND_OBJ_ICONV_OPEN_FALSE='#'
32028   fi
32029
32030
32031      if test $REPLACE_ICONV = 1; then
32032   GL_COND_OBJ_ICONV_TRUE=
32033   GL_COND_OBJ_ICONV_FALSE='#'
32034 else
32035   GL_COND_OBJ_ICONV_TRUE='#'
32036   GL_COND_OBJ_ICONV_FALSE=
32037 fi
32038 :
32039     if test -z "${GL_COND_OBJ_ICONV_TRUE}" && test -z "${GL_COND_OBJ_ICONV_FALSE}"; then
32040     GL_COND_OBJ_ICONV_TRUE='#'
32041     GL_COND_OBJ_ICONV_FALSE='#'
32042   fi
32043
32044
32045
32046   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
32047 printf %s "checking whether the compiler generally respects inline... " >&6; }
32048 if test ${gl_cv_c_inline_effective+y}
32049 then :
32050   printf %s "(cached) " >&6
32051 else case e in #(
32052   e) if test $ac_cv_c_inline = no; then
32053        gl_cv_c_inline_effective=no
32054      else
32055                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32056 /* end confdefs.h.  */
32057
32058 int
32059 main (void)
32060 {
32061 #ifdef __NO_INLINE__
32062                #error "inline is not effective"
32063              #endif
32064   ;
32065   return 0;
32066 }
32067 _ACEOF
32068 if ac_fn_c_try_compile "$LINENO"
32069 then :
32070   gl_cv_c_inline_effective=yes
32071 else case e in #(
32072   e) gl_cv_c_inline_effective=no ;;
32073 esac
32074 fi
32075 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32076      fi
32077      ;;
32078 esac
32079 fi
32080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
32081 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
32082   if test $gl_cv_c_inline_effective = yes; then
32083
32084 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
32085
32086   fi
32087
32088
32089
32090
32091   :
32092
32093   :
32094   :
32095   :
32096   :
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111   if test $ac_cv_func_isblank = no; then
32112     HAVE_ISBLANK=0
32113   fi
32114
32115
32116      if test $HAVE_ISBLANK = 0; then
32117   GL_COND_OBJ_ISBLANK_TRUE=
32118   GL_COND_OBJ_ISBLANK_FALSE='#'
32119 else
32120   GL_COND_OBJ_ISBLANK_TRUE='#'
32121   GL_COND_OBJ_ISBLANK_FALSE=
32122 fi
32123 :
32124     if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
32125     GL_COND_OBJ_ISBLANK_TRUE='#'
32126     GL_COND_OBJ_ISBLANK_FALSE='#'
32127   fi
32128
32129
32130
32131 printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143           GL_GNULIB_ISBLANK=1
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iswblank" >&5
32155 printf %s "checking for iswblank... " >&6; }
32156 if test ${gl_cv_onwards_func_iswblank+y}
32157 then :
32158   printf %s "(cached) " >&6
32159 else case e in #(
32160   e)
32161   exec 9>&6 6>/dev/null
32162
32163        case "$host_os" in
32164
32165          linux*-android*)
32166            ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "#include <wctype.h>
32167 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32168 if test "x$ac_cv_have_decl_iswblank" = xyes
32169 then :
32170
32171 fi
32172            if test $ac_cv_have_decl_iswblank = yes; then
32173              ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
32174 if test "x$ac_cv_func_iswblank" = xyes
32175 then :
32176
32177 fi
32178
32179              if test $ac_cv_func_iswblank = yes; then
32180                gl_cv_onwards_func_iswblank=yes
32181              else
32182                                                             gl_cv_onwards_func_iswblank='future OS version'
32183              fi
32184            else
32185              gl_cv_onwards_func_iswblank='future OS version'
32186            fi
32187            ;;
32188
32189
32190          *)
32191            ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
32192 if test "x$ac_cv_func_iswblank" = xyes
32193 then :
32194
32195 fi
32196
32197            gl_cv_onwards_func_iswblank=$ac_cv_func_iswblank
32198            ;;
32199
32200        esac
32201
32202   exec 6>&9 9>&-
32203
32204      ;;
32205 esac
32206 fi
32207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_iswblank" >&5
32208 printf "%s\n" "$gl_cv_onwards_func_iswblank" >&6; }
32209
32210   case "$gl_cv_onwards_func_iswblank" in
32211     future*) ac_cv_func_iswblank=no ;;
32212     *)       ac_cv_func_iswblank=$gl_cv_onwards_func_iswblank ;;
32213   esac
32214   if test $ac_cv_func_iswblank = yes; then
32215
32216 printf "%s\n" "#define HAVE_ISWBLANK 1" >>confdefs.h
32217
32218   fi
32219
32220
32221   ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
32222     #include <wchar.h>
32223     #include <wctype.h>
32224
32225 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32226 if test "x$ac_cv_have_decl_iswblank" = xyes
32227 then :
32228   ac_have_decl=1
32229 else case e in #(
32230   e) ac_have_decl=0 ;;
32231 esac
32232 fi
32233 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
32234
32235   if test $ac_cv_func_iswblank = no; then
32236     HAVE_ISWBLANK=0
32237     if test $ac_cv_have_decl_iswblank = yes \
32238        || case "$gl_cv_onwards_func_iswblank" in \
32239             future*) true ;; \
32240             *) false ;; \
32241           esac; then
32242       REPLACE_ISWBLANK=1
32243     fi
32244   fi
32245   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32246         :
32247   else
32248     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
32249             :
32250     fi
32251   fi
32252
32253
32254
32255      if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && { test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; }; then
32256   GL_COND_OBJ_ISWBLANK_TRUE=
32257   GL_COND_OBJ_ISWBLANK_FALSE='#'
32258 else
32259   GL_COND_OBJ_ISWBLANK_TRUE='#'
32260   GL_COND_OBJ_ISWBLANK_FALSE=
32261 fi
32262 :
32263     if test -z "${GL_COND_OBJ_ISWBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISWBLANK_FALSE}"; then
32264     GL_COND_OBJ_ISWBLANK_TRUE='#'
32265     GL_COND_OBJ_ISWBLANK_FALSE='#'
32266   fi
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277           GL_GNULIB_ISWBLANK=1
32278
32279
32280
32281
32282
32283 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32296         REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
32297   else
32298     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
32299 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
32300 if test ${gl_cv_func_iswdigit_works+y}
32301 then :
32302   printf %s "(cached) " >&6
32303 else case e in #(
32304   e)
32305                      case "$host_os" in
32306          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
32307          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
32308            gl_cv_func_iswdigit_works="guessing no" ;;
32309          # Guess yes otherwise.
32310          *) gl_cv_func_iswdigit_works="guessing yes" ;;
32311        esac
32312        if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
32313          if test "$cross_compiling" = yes
32314 then :
32315   :
32316 else case e in #(
32317   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32318 /* end confdefs.h.  */
32319
32320 #include <locale.h>
32321 #include <stdlib.h>
32322 #include <string.h>
32323 #include <wchar.h>
32324 #include <wctype.h>
32325
32326 /* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
32327 static int
32328 for_character (const char *s, size_t n)
32329 {
32330   mbstate_t state;
32331   wchar_t wc;
32332   size_t ret;
32333
32334   memset (&state, '\0', sizeof (mbstate_t));
32335   wc = (wchar_t) 0xBADFACE;
32336   ret = mbrtowc (&wc, s, n, &state);
32337   if (ret != n)
32338     abort ();
32339
32340   return iswdigit (wc);
32341 }
32342
32343 int
32344 main (int argc, char *argv[])
32345 {
32346   int is;
32347   int result = 0;
32348
32349   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
32350     {
32351       /* This fails on mingw, MSVC 14.  */
32352       /* U+00B2 SUPERSCRIPT TWO */
32353       is = for_character ("\262", 1);
32354       if (!(is == 0))
32355         result |= 1;
32356     }
32357   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32358     {
32359       /* This fails on NetBSD 8.0.  */
32360       /* U+FF11 FULLWIDTH DIGIT ONE */
32361       is = for_character ("\243\261", 2);
32362       if (!(is == 0))
32363         result |= 2;
32364     }
32365   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
32366     {
32367       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
32368       /* U+0663 ARABIC-INDIC DIGIT THREE */
32369       is = for_character ("\331\243", 2);
32370       if (!(is == 0))
32371         result |= 4;
32372       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
32373       /* U+FF11 FULLWIDTH DIGIT ONE */
32374       is = for_character ("\357\274\221", 3);
32375       if (!(is == 0))
32376         result |= 8;
32377     }
32378   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32379     {
32380       /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
32381       /* U+FF11 FULLWIDTH DIGIT ONE */
32382       is = for_character ("\243\261", 2);
32383       if (!(is == 0))
32384         result |= 16;
32385     }
32386   return result;
32387 }
32388 _ACEOF
32389 if ac_fn_c_try_run "$LINENO"
32390 then :
32391   gl_cv_func_iswdigit_works=yes
32392 else case e in #(
32393   e) gl_cv_func_iswdigit_works=no ;;
32394 esac
32395 fi
32396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32397   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32398 esac
32399 fi
32400
32401        fi
32402        ;;
32403 esac
32404 fi
32405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
32406 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
32407     case "$gl_cv_func_iswdigit_works" in
32408       *yes) ;;
32409       *) REPLACE_ISWDIGIT=1 ;;
32410     esac
32411   fi
32412
32413
32414      if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWDIGIT = 1; then
32415   GL_COND_OBJ_ISWDIGIT_TRUE=
32416   GL_COND_OBJ_ISWDIGIT_FALSE='#'
32417 else
32418   GL_COND_OBJ_ISWDIGIT_TRUE='#'
32419   GL_COND_OBJ_ISWDIGIT_FALSE=
32420 fi
32421 :
32422     if test -z "${GL_COND_OBJ_ISWDIGIT_TRUE}" && test -z "${GL_COND_OBJ_ISWDIGIT_FALSE}"; then
32423     GL_COND_OBJ_ISWDIGIT_TRUE='#'
32424     GL_COND_OBJ_ISWDIGIT_FALSE='#'
32425   fi
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436           GL_GNULIB_ISWDIGIT=1
32437
32438
32439
32440
32441
32442 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32454         REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
32455   else
32456     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
32457 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
32458 if test ${gl_cv_func_iswxdigit_works+y}
32459 then :
32460   printf %s "(cached) " >&6
32461 else case e in #(
32462   e)
32463                      case "$host_os" in
32464          # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
32465          freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
32466            gl_cv_func_iswxdigit_works="guessing no" ;;
32467          # Guess yes otherwise.
32468          *) gl_cv_func_iswxdigit_works="guessing yes" ;;
32469        esac
32470        if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
32471          if test "$cross_compiling" = yes
32472 then :
32473   :
32474 else case e in #(
32475   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32476 /* end confdefs.h.  */
32477
32478 #include <locale.h>
32479 #include <stdlib.h>
32480 #include <string.h>
32481 #include <wchar.h>
32482 #include <wctype.h>
32483
32484 /* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
32485 static int
32486 for_character (const char *s, size_t n)
32487 {
32488   mbstate_t state;
32489   wchar_t wc;
32490   size_t ret;
32491
32492   memset (&state, '\0', sizeof (mbstate_t));
32493   wc = (wchar_t) 0xBADFACE;
32494   ret = mbrtowc (&wc, s, n, &state);
32495   if (ret != n)
32496     abort ();
32497
32498   return iswxdigit (wc);
32499 }
32500
32501 int
32502 main (int argc, char *argv[])
32503 {
32504   int is;
32505   int result = 0;
32506
32507   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32508     {
32509       /* This fails on NetBSD 8.0.  */
32510       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
32511       is = for_character ("\243\301", 2);
32512       if (!(is == 0))
32513         result |= 1;
32514     }
32515   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
32516     {
32517       /* This fails on FreeBSD 13.0.  */
32518       /* U+0663 ARABIC-INDIC DIGIT THREE */
32519       is = for_character ("\331\243", 2);
32520       if (!(is == 0))
32521         result |= 2;
32522       /* This fails on MSVC 14.  */
32523       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
32524       is = for_character ("\357\274\241", 3);
32525       if (!(is == 0))
32526         result |= 4;
32527     }
32528   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32529     {
32530       /* This fails on Solaris 10, Solaris 11.4.  */
32531       /* U+FF11 FULLWIDTH DIGIT ONE */
32532       is = for_character ("\243\261", 2);
32533       if (!(is == 0))
32534         result |= 8;
32535     }
32536   return result;
32537 }
32538 _ACEOF
32539 if ac_fn_c_try_run "$LINENO"
32540 then :
32541   gl_cv_func_iswxdigit_works=yes
32542 else case e in #(
32543   e) gl_cv_func_iswxdigit_works=no ;;
32544 esac
32545 fi
32546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32547   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32548 esac
32549 fi
32550
32551        fi
32552        ;;
32553 esac
32554 fi
32555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
32556 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
32557     case "$gl_cv_func_iswxdigit_works" in
32558       *yes) ;;
32559       *) REPLACE_ISWXDIGIT=1 ;;
32560     esac
32561   fi
32562
32563
32564      if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWXDIGIT = 1; then
32565   GL_COND_OBJ_ISWXDIGIT_TRUE=
32566   GL_COND_OBJ_ISWXDIGIT_FALSE='#'
32567 else
32568   GL_COND_OBJ_ISWXDIGIT_TRUE='#'
32569   GL_COND_OBJ_ISWXDIGIT_FALSE=
32570 fi
32571 :
32572     if test -z "${GL_COND_OBJ_ISWXDIGIT_TRUE}" && test -z "${GL_COND_OBJ_ISWXDIGIT_FALSE}"; then
32573     GL_COND_OBJ_ISWXDIGIT_TRUE='#'
32574     GL_COND_OBJ_ISWXDIGIT_FALSE='#'
32575   fi
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586           GL_GNULIB_ISWXDIGIT=1
32587
32588
32589
32590
32591
32592 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
32606 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
32607 if test ${gl_cv_c___inline+y}
32608 then :
32609   printf %s "(cached) " >&6
32610 else case e in #(
32611   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32612 /* end confdefs.h.  */
32613 typedef int foo_t;
32614            static __inline foo_t foo (void) { return 0; }
32615 int
32616 main (void)
32617 {
32618 return foo ();
32619   ;
32620   return 0;
32621 }
32622 _ACEOF
32623 if ac_fn_c_try_compile "$LINENO"
32624 then :
32625   gl_cv_c___inline=yes
32626 else case e in #(
32627   e) gl_cv_c___inline=no ;;
32628 esac
32629 fi
32630 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32631 esac
32632 fi
32633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
32634 printf "%s\n" "$gl_cv_c___inline" >&6; }
32635   if test $gl_cv_c___inline = yes; then
32636
32637 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
32638
32639   fi
32640
32641
32642
32643
32644
32645
32646   case "$GL_GENERATE_LIMITS_H" in
32647     false) LIMITS_H='' ;;
32648     true)
32649                   if test -z "$LIMITS_H"; then
32650         LIMITS_H="${gl_source_base_prefix}limits.h"
32651       fi
32652       ;;
32653     *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
32654   esac
32655
32656
32657      if $GL_GENERATE_LIMITS_H; then
32658   GL_GENERATE_LIMITS_H_TRUE=
32659   GL_GENERATE_LIMITS_H_FALSE='#'
32660 else
32661   GL_GENERATE_LIMITS_H_TRUE='#'
32662   GL_GENERATE_LIMITS_H_FALSE=
32663 fi
32664 :
32665     if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32666     GL_GENERATE_LIMITS_H_TRUE='#'
32667     GL_GENERATE_LIMITS_H_FALSE='#'
32668   fi
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678     LOCALCHARSET_TESTS_ENVIRONMENT=
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691   if test $REPLACE_STRUCT_LCONV = 1; then
32692     REPLACE_LOCALECONV=1
32693   fi
32694   if test $REPLACE_LOCALECONV = 0; then
32695             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localeconv works" >&5
32696 printf %s "checking whether localeconv works... " >&6; }
32697 if test ${gl_cv_func_localeconv_works+y}
32698 then :
32699   printf %s "(cached) " >&6
32700 else case e in #(
32701   e) if test "$cross_compiling" = yes
32702 then :
32703   case "$host_os" in
32704                                 # Guess yes on glibc systems.
32705             *-gnu* | gnu*)      gl_cv_func_localeconv_works="guessing yes" ;;
32706                                 # Guess yes on musl systems.
32707             *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
32708                                 # Guess no on native Windows.
32709             mingw*)             gl_cv_func_localeconv_works="guessing no" ;;
32710                                 # If we don't know, obey --enable-cross-guesses.
32711             *)                  gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
32712           esac
32713
32714 else case e in #(
32715   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32716 /* end confdefs.h.  */
32717
32718             #include <locale.h>
32719             #include <limits.h>
32720             int main ()
32721             {
32722               struct lconv *l = localeconv ();
32723               return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
32724             }
32725
32726 _ACEOF
32727 if ac_fn_c_try_run "$LINENO"
32728 then :
32729   gl_cv_func_localeconv_works=yes
32730 else case e in #(
32731   e) gl_cv_func_localeconv_works=no ;;
32732 esac
32733 fi
32734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32735   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32736 esac
32737 fi
32738
32739        ;;
32740 esac
32741 fi
32742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localeconv_works" >&5
32743 printf "%s\n" "$gl_cv_func_localeconv_works" >&6; }
32744     case "$gl_cv_func_localeconv_works" in
32745       *yes) ;;
32746       *) REPLACE_LOCALECONV=1 ;;
32747     esac
32748   fi
32749
32750
32751      if test $REPLACE_LOCALECONV = 1; then
32752   GL_COND_OBJ_LOCALECONV_TRUE=
32753   GL_COND_OBJ_LOCALECONV_FALSE='#'
32754 else
32755   GL_COND_OBJ_LOCALECONV_TRUE='#'
32756   GL_COND_OBJ_LOCALECONV_FALSE=
32757 fi
32758 :
32759     if test -z "${GL_COND_OBJ_LOCALECONV_TRUE}" && test -z "${GL_COND_OBJ_LOCALECONV_FALSE}"; then
32760     GL_COND_OBJ_LOCALECONV_TRUE='#'
32761     GL_COND_OBJ_LOCALECONV_FALSE='#'
32762   fi
32763
32764   if test -z "$GL_COND_OBJ_LOCALECONV_TRUE"; then :
32765
32766
32767   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
32768 "
32769 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
32770 then :
32771
32772 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
32773
32774
32775 fi
32776
32777   ac_fn_c_check_member "$LINENO" "struct lconv" "int_p_cs_precedes" "ac_cv_member_struct_lconv_int_p_cs_precedes" "#include <locale.h>
32778 "
32779 if test "x$ac_cv_member_struct_lconv_int_p_cs_precedes" = xyes
32780 then :
32781
32782 printf "%s\n" "#define HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES 1" >>confdefs.h
32783
32784
32785 fi
32786
32787
32788
32789 fi
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799           GL_GNULIB_LOCALECONV=1
32800
32801
32802
32803
32804
32805 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
32806
32807
32808
32809
32810
32811   if test "$gl_threads_api" = posix; then
32812     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
32813     # pthread_rwlock_* functions.
32814     has_rwlock=false
32815     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
32816 "
32817 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
32818 then :
32819   has_rwlock=true
32820
32821 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
32822
32823 fi
32824
32825     if $has_rwlock; then
32826
32827
32828      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
32829 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
32830 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
32831 then :
32832   printf %s "(cached) " >&6
32833 else case e in #(
32834   e) save_LIBS="$LIBS"
32835      LIBS="$LIBS $LIBMULTITHREAD"
32836      if test "$cross_compiling" = yes
32837 then :
32838   case "$host_os" in
32839                               # Guess no on glibc systems.
32840           *-gnu* | gnu*)      gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32841                               # Guess no on musl systems.
32842           *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32843                               # Guess no on bionic systems.
32844           *-android*)         gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32845                               # Guess yes on native Windows with the mingw-w64 winpthreads library.
32846                               # Guess no on native Windows with the gnulib windows-rwlock module.
32847           mingw*)             if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
32848                                 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
32849                               else
32850                                 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
32851                               fi
32852                               ;;
32853                               # If we don't know, obey --enable-cross-guesses.
32854           *)                  gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
32855          esac
32856
32857 else case e in #(
32858   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32859 /* end confdefs.h.  */
32860
32861 #include <errno.h>
32862 #include <pthread.h>
32863 #include <stdlib.h>
32864 #include <unistd.h>
32865
32866 #define SUCCEED() exit (0)
32867 #define FAILURE() exit (1)
32868 #define UNEXPECTED(n) (exit (10 + (n)))
32869
32870 /* The main thread creates the waiting writer and the requesting reader threads
32871    in the default way; this guarantees that they have the same priority.
32872    We can reuse the main thread as first reader thread.  */
32873
32874 static pthread_rwlock_t lock;
32875 static pthread_t reader1;
32876 static pthread_t writer;
32877 static pthread_t reader2;
32878 static pthread_t timer;
32879 /* Used to pass control from writer to reader2 and from reader2 to timer,
32880    as in a relay race.
32881    Passing control from one running thread to another running thread
32882    is most likely faster than to create the second thread.  */
32883 static pthread_mutex_t baton;
32884
32885 static void *
32886 timer_func (void *ignored)
32887 {
32888   /* Step 13 (can be before or after step 12):
32889      The timer thread takes the baton, then waits a moment to make sure
32890      it can tell whether the second reader thread is blocked at step 12.  */
32891   if (pthread_mutex_lock (&baton))
32892     UNEXPECTED (13);
32893   usleep (100000);
32894   /* By the time we get here, it's clear that the second reader thread is
32895      blocked at step 12.  This is the desired behaviour.  */
32896   SUCCEED ();
32897 }
32898
32899 static void *
32900 reader2_func (void *ignored)
32901 {
32902   int err;
32903
32904   /* Step 8 (can be before or after step 7):
32905      The second reader thread takes the baton, then waits a moment to make sure
32906      the writer thread has reached step 7.  */
32907   if (pthread_mutex_lock (&baton))
32908     UNEXPECTED (8);
32909   usleep (100000);
32910   /* Step 9: The second reader thread requests the lock.  */
32911   err = pthread_rwlock_tryrdlock (&lock);
32912   if (err == 0)
32913     FAILURE ();
32914   else if (err != EBUSY)
32915     UNEXPECTED (9);
32916   /* Step 10: Launch a timer, to test whether the next call blocks.  */
32917   if (pthread_create (&timer, NULL, timer_func, NULL))
32918     UNEXPECTED (10);
32919   /* Step 11: Release the baton.  */
32920   if (pthread_mutex_unlock (&baton))
32921     UNEXPECTED (11);
32922   /* Step 12: The second reader thread requests the lock.  */
32923   err = pthread_rwlock_rdlock (&lock);
32924   if (err == 0)
32925     FAILURE ();
32926   else
32927     UNEXPECTED (12);
32928 }
32929
32930 static void *
32931 writer_func (void *ignored)
32932 {
32933   /* Step 4: Take the baton, so that the second reader thread does not go ahead
32934      too early.  */
32935   if (pthread_mutex_lock (&baton))
32936     UNEXPECTED (4);
32937   /* Step 5: Create the second reader thread.  */
32938   if (pthread_create (&reader2, NULL, reader2_func, NULL))
32939     UNEXPECTED (5);
32940   /* Step 6: Release the baton.  */
32941   if (pthread_mutex_unlock (&baton))
32942     UNEXPECTED (6);
32943   /* Step 7: The writer thread requests the lock.  */
32944   if (pthread_rwlock_wrlock (&lock))
32945     UNEXPECTED (7);
32946   return NULL;
32947 }
32948
32949 int
32950 main ()
32951 {
32952   reader1 = pthread_self ();
32953
32954   /* Step 1: The main thread initializes the lock and the baton.  */
32955   if (pthread_rwlock_init (&lock, NULL))
32956     UNEXPECTED (1);
32957   if (pthread_mutex_init (&baton, NULL))
32958     UNEXPECTED (1);
32959   /* Step 2: The main thread acquires the lock as a reader.  */
32960   if (pthread_rwlock_rdlock (&lock))
32961     UNEXPECTED (2);
32962   /* Step 3: Create the writer thread.  */
32963   if (pthread_create (&writer, NULL, writer_func, NULL))
32964     UNEXPECTED (3);
32965   /* Job done.  Go to sleep.  */
32966   for (;;)
32967     {
32968       sleep (1);
32969     }
32970 }
32971
32972 _ACEOF
32973 if ac_fn_c_try_run "$LINENO"
32974 then :
32975   gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
32976 else case e in #(
32977   e) gl_cv_pthread_rwlock_rdlock_prefer_writer=no ;;
32978 esac
32979 fi
32980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32981   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32982 esac
32983 fi
32984
32985      LIBS="$save_LIBS"
32986      ;;
32987 esac
32988 fi
32989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
32990 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
32991   case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
32992     *yes)
32993
32994 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
32995
32996       ;;
32997   esac
32998
32999     fi
33000     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
33001     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33002 /* end confdefs.h.  */
33003
33004       #include <pthread.h>
33005 int
33006 main (void)
33007 {
33008
33009 #if __FreeBSD__ == 4
33010 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
33011 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
33012        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
33013 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
33014 #else
33015 int x = (int)PTHREAD_MUTEX_RECURSIVE;
33016 return !x;
33017 #endif
33018
33019   ;
33020   return 0;
33021 }
33022 _ACEOF
33023 if ac_fn_c_try_compile "$LINENO"
33024 then :
33025
33026 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
33027
33028 fi
33029 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33030   fi
33031   :
33032
33033
33034
33035 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
33036
33037
33038
33039
33040
33041
33042   if test $ac_cv_func_lstat = yes; then
33043
33044     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
33045       solaris* | *no)
33046         REPLACE_LSTAT=1
33047         ;;
33048     esac
33049   else
33050     HAVE_LSTAT=0
33051   fi
33052
33053
33054      if test $REPLACE_LSTAT = 1; then
33055   GL_COND_OBJ_LSTAT_TRUE=
33056   GL_COND_OBJ_LSTAT_FALSE='#'
33057 else
33058   GL_COND_OBJ_LSTAT_TRUE='#'
33059   GL_COND_OBJ_LSTAT_FALSE=
33060 fi
33061 :
33062     if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
33063     GL_COND_OBJ_LSTAT_TRUE='#'
33064     GL_COND_OBJ_LSTAT_FALSE='#'
33065   fi
33066
33067   if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
33068
33069     :
33070
33071 fi
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081           GL_GNULIB_LSTAT=1
33082
33083
33084
33085
33086
33087 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097   REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
33098   if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
33099
33100     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
33101 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
33102 if test ${ac_cv_func_malloc_0_nonnull+y}
33103 then :
33104   printf %s "(cached) " >&6
33105 else case e in #(
33106   e) if test "$cross_compiling" = yes
33107 then :
33108   case "$host_os" in
33109           # Guess yes on platforms where we know the result.
33110           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
33111           | gnu* | *-musl* | midipix* | midnightbsd* \
33112           | hpux* | solaris* | cygwin* | mingw* | msys* )
33113             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
33114           # If we don't know, obey --enable-cross-guesses.
33115           *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
33116         esac
33117
33118 else case e in #(
33119   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33120 /* end confdefs.h.  */
33121 #include <stdlib.h>
33122
33123 int
33124 main (void)
33125 {
33126 void *p = malloc (0);
33127             int result = !p;
33128             free (p);
33129             return result;
33130   ;
33131   return 0;
33132 }
33133
33134 _ACEOF
33135 if ac_fn_c_try_run "$LINENO"
33136 then :
33137   ac_cv_func_malloc_0_nonnull=yes
33138 else case e in #(
33139   e) ac_cv_func_malloc_0_nonnull=no ;;
33140 esac
33141 fi
33142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33143   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33144 esac
33145 fi
33146
33147      ;;
33148 esac
33149 fi
33150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
33151 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
33152   case $ac_cv_func_malloc_0_nonnull in #(
33153   *yes) :
33154      ;; #(
33155   *) :
33156     REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;;
33157 esac
33158
33159   fi
33160
33161   if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
33162
33163
33164
33165
33166
33167
33168
33169
33170   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33171
33172   fi
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182           GL_GNULIB_MALLOC_GNU=1
33183
33184
33185
33186
33187
33188 printf "%s\n" "#define GNULIB_TEST_MALLOC_GNU 1" >>confdefs.h
33189
33190
33191
33192
33193   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
33194
33195
33196
33197
33198
33199
33200
33201
33202   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33203
33204   fi
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214           GL_GNULIB_MALLOC_POSIX=1
33215
33216
33217
33218
33219
33220 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232   :
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243   if test $ac_cv_func_mbrtowc = no; then
33244     HAVE_MBRTOWC=0
33245     ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
33246       #include <wchar.h>
33247
33248 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33249 if test "x$ac_cv_have_decl_mbrtowc" = xyes
33250 then :
33251   ac_have_decl=1
33252 else case e in #(
33253   e) ac_have_decl=0 ;;
33254 esac
33255 fi
33256 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
33257
33258     if test $ac_cv_have_decl_mbrtowc = yes; then
33259                         REPLACE_MBRTOWC=1
33260     fi
33261   else
33262     if test $REPLACE_MBSTATE_T = 1; then
33263       REPLACE_MBRTOWC=1
33264     else
33265
33266
33267
33268      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
33269 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
33270 if test ${gl_cv_func_mbrtowc_null_arg1+y}
33271 then :
33272   printf %s "(cached) " >&6
33273 else case e in #(
33274   e)
33275                   case "$host_os" in
33276                   # Guess no on Solaris.
33277         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
33278                   # Guess yes otherwise.
33279         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
33280       esac
33281       if test $LOCALE_FR_UTF8 != none; then
33282         if test "$cross_compiling" = yes
33283 then :
33284   :
33285 else case e in #(
33286   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33287 /* end confdefs.h.  */
33288
33289 #include <locale.h>
33290 #include <stdlib.h>
33291 #include <string.h>
33292 #include <wchar.h>
33293 int main ()
33294 {
33295   int result = 0;
33296
33297   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33298     {
33299       char input[] = "\303\237er";
33300       mbstate_t state;
33301       wchar_t wc;
33302       size_t ret;
33303
33304       memset (&state, '\0', sizeof (mbstate_t));
33305       wc = (wchar_t) 0xBADFACE;
33306       ret = mbrtowc (&wc, input, 5, &state);
33307       if (ret != 2)
33308         result |= 1;
33309       if (!mbsinit (&state))
33310         result |= 2;
33311
33312       memset (&state, '\0', sizeof (mbstate_t));
33313       ret = mbrtowc (NULL, input, 5, &state);
33314       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
33315         result |= 4;
33316       if (!mbsinit (&state))
33317         result |= 8;
33318     }
33319   return result;
33320 }
33321 _ACEOF
33322 if ac_fn_c_try_run "$LINENO"
33323 then :
33324   gl_cv_func_mbrtowc_null_arg1=yes
33325 else case e in #(
33326   e) gl_cv_func_mbrtowc_null_arg1=no ;;
33327 esac
33328 fi
33329 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33330   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33331 esac
33332 fi
33333
33334       fi
33335      ;;
33336 esac
33337 fi
33338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
33339 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
33340
33341
33342
33343
33344      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
33345 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
33346 if test ${gl_cv_func_mbrtowc_null_arg2+y}
33347 then :
33348   printf %s "(cached) " >&6
33349 else case e in #(
33350   e)
33351                   case "$host_os" in
33352               # Guess no on OSF/1.
33353         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
33354               # Guess yes otherwise.
33355         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
33356       esac
33357       if test $LOCALE_FR_UTF8 != none; then
33358         if test "$cross_compiling" = yes
33359 then :
33360   :
33361 else case e in #(
33362   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33363 /* end confdefs.h.  */
33364
33365 #include <locale.h>
33366 #include <string.h>
33367 #include <wchar.h>
33368 int main ()
33369 {
33370   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33371     {
33372       mbstate_t state;
33373       wchar_t wc;
33374       int ret;
33375
33376       memset (&state, '\0', sizeof (mbstate_t));
33377       wc = (wchar_t) 0xBADFACE;
33378       mbrtowc (&wc, NULL, 5, &state);
33379       /* Check that wc was not modified.  */
33380       if (wc != (wchar_t) 0xBADFACE)
33381         return 2;
33382     }
33383   return 0;
33384 }
33385 _ACEOF
33386 if ac_fn_c_try_run "$LINENO"
33387 then :
33388   gl_cv_func_mbrtowc_null_arg2=yes
33389 else case e in #(
33390   e) gl_cv_func_mbrtowc_null_arg2=no ;;
33391 esac
33392 fi
33393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33394   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33395 esac
33396 fi
33397
33398       fi
33399      ;;
33400 esac
33401 fi
33402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
33403 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
33404
33405
33406
33407
33408
33409
33410   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
33411 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
33412 if test ${gl_cv_func_mbrtowc_retval+y}
33413 then :
33414   printf %s "(cached) " >&6
33415 else case e in #(
33416   e)
33417                   case "$host_os" in
33418                                    # Guess no on HP-UX, Solaris, native Windows.
33419         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
33420                                    # Guess yes otherwise.
33421         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
33422       esac
33423       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
33424          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
33425         if test "$cross_compiling" = yes
33426 then :
33427   :
33428 else case e in #(
33429   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33430 /* end confdefs.h.  */
33431
33432 #include <locale.h>
33433 #include <string.h>
33434 #include <wchar.h>
33435 int main ()
33436 {
33437   int result = 0;
33438   int found_some_locale = 0;
33439   /* This fails on Solaris.  */
33440   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33441     {
33442       char input[] = "B\303\274\303\237er"; /* "Büßer" */
33443       mbstate_t state;
33444       wchar_t wc;
33445
33446       memset (&state, '\0', sizeof (mbstate_t));
33447       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33448         {
33449           input[1] = '\0';
33450           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
33451             result |= 1;
33452         }
33453       found_some_locale = 1;
33454     }
33455   /* This fails on HP-UX 11.11.  */
33456   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33457     {
33458       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
33459       mbstate_t state;
33460       wchar_t wc;
33461
33462       memset (&state, '\0', sizeof (mbstate_t));
33463       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33464         {
33465           input[1] = '\0';
33466           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
33467             result |= 2;
33468         }
33469       found_some_locale = 1;
33470     }
33471   /* This fails on native Windows.  */
33472   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
33473     {
33474       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
33475       mbstate_t state;
33476       wchar_t wc;
33477
33478       memset (&state, '\0', sizeof (mbstate_t));
33479       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33480         {
33481           input[3] = '\0';
33482           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33483             result |= 4;
33484         }
33485       found_some_locale = 1;
33486     }
33487   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
33488     {
33489       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
33490       mbstate_t state;
33491       wchar_t wc;
33492
33493       memset (&state, '\0', sizeof (mbstate_t));
33494       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33495         {
33496           input[3] = '\0';
33497           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33498             result |= 8;
33499         }
33500       found_some_locale = 1;
33501     }
33502   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
33503     {
33504       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
33505       mbstate_t state;
33506       wchar_t wc;
33507
33508       memset (&state, '\0', sizeof (mbstate_t));
33509       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33510         {
33511           input[3] = '\0';
33512           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33513             result |= 16;
33514         }
33515       found_some_locale = 1;
33516     }
33517   return (found_some_locale ? result : 77);
33518 }
33519 _ACEOF
33520 if ac_fn_c_try_run "$LINENO"
33521 then :
33522   gl_cv_func_mbrtowc_retval=yes
33523 else case e in #(
33524   e) if test $? != 77; then
33525              gl_cv_func_mbrtowc_retval=no
33526            fi
33527            ;;
33528 esac
33529 fi
33530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33531   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33532 esac
33533 fi
33534
33535       fi
33536      ;;
33537 esac
33538 fi
33539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
33540 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
33541
33542
33543
33544
33545      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
33546 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
33547 if test ${gl_cv_func_mbrtowc_nul_retval+y}
33548 then :
33549   printf %s "(cached) " >&6
33550 else case e in #(
33551   e)
33552                   case "$host_os" in
33553                        # Guess no on Solaris 8 and 9.
33554         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
33555                        # Guess yes otherwise.
33556         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
33557       esac
33558       if test $LOCALE_ZH_CN != none; then
33559         if test "$cross_compiling" = yes
33560 then :
33561   :
33562 else case e in #(
33563   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33564 /* end confdefs.h.  */
33565
33566 #include <locale.h>
33567 #include <string.h>
33568 #include <wchar.h>
33569 int main ()
33570 {
33571   /* This fails on Solaris 8 and 9.  */
33572   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33573     {
33574       mbstate_t state;
33575       wchar_t wc;
33576
33577       memset (&state, '\0', sizeof (mbstate_t));
33578       if (mbrtowc (&wc, "", 1, &state) != 0)
33579         return 2;
33580     }
33581   return 0;
33582 }
33583 _ACEOF
33584 if ac_fn_c_try_run "$LINENO"
33585 then :
33586   gl_cv_func_mbrtowc_nul_retval=yes
33587 else case e in #(
33588   e) gl_cv_func_mbrtowc_nul_retval=no ;;
33589 esac
33590 fi
33591 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33592   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33593 esac
33594 fi
33595
33596       fi
33597      ;;
33598 esac
33599 fi
33600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
33601 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
33602
33603
33604
33605      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
33606 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
33607 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
33608 then :
33609   printf %s "(cached) " >&6
33610 else case e in #(
33611   e)
33612                case "$host_os" in
33613                # Guess yes on native Windows.
33614        mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
33615        *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
33616      esac
33617      case "$host_os" in
33618        mingw*)
33619          if test "$cross_compiling" = yes
33620 then :
33621   :
33622 else case e in #(
33623   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33624 /* end confdefs.h.  */
33625
33626 #include <locale.h>
33627 #include <string.h>
33628 #include <wchar.h>
33629 int main ()
33630 {
33631   int result = 0;
33632   if (setlocale (LC_ALL, "French_France.65001") != NULL)
33633     {
33634       wchar_t wc = (wchar_t) 0xBADFACE;
33635       mbstate_t state;
33636
33637       memset (&state, '\0', sizeof (mbstate_t));
33638       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
33639           && wc != (wchar_t) 0xBADFACE)
33640         result |= 1;
33641     }
33642   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
33643     {
33644       wchar_t wc = (wchar_t) 0xBADFACE;
33645       mbstate_t state;
33646
33647       memset (&state, '\0', sizeof (mbstate_t));
33648       if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
33649           && wc != (wchar_t) 0xBADFACE)
33650         result |= 2;
33651     }
33652   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
33653     {
33654       wchar_t wc = (wchar_t) 0xBADFACE;
33655       mbstate_t state;
33656
33657       memset (&state, '\0', sizeof (mbstate_t));
33658       if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
33659           && wc != (wchar_t) 0xBADFACE)
33660         result |= 4;
33661     }
33662   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
33663     {
33664       wchar_t wc = (wchar_t) 0xBADFACE;
33665       mbstate_t state;
33666
33667       memset (&state, '\0', sizeof (mbstate_t));
33668       if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
33669           && wc != (wchar_t) 0xBADFACE)
33670         result |= 8;
33671     }
33672   return result;
33673 }
33674 _ACEOF
33675 if ac_fn_c_try_run "$LINENO"
33676 then :
33677   gl_cv_func_mbrtowc_stores_incomplete=no
33678 else case e in #(
33679   e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
33680 esac
33681 fi
33682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33683   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33684 esac
33685 fi
33686
33687          ;;
33688        *)
33689
33690          if test $LOCALE_FR_UTF8 != none; then
33691            if test "$cross_compiling" = yes
33692 then :
33693   :
33694 else case e in #(
33695   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33696 /* end confdefs.h.  */
33697
33698 #include <locale.h>
33699 #include <string.h>
33700 #include <wchar.h>
33701 int main ()
33702 {
33703   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33704     {
33705       wchar_t wc = (wchar_t) 0xBADFACE;
33706       mbstate_t state;
33707
33708       memset (&state, '\0', sizeof (mbstate_t));
33709       if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
33710           && wc != (wchar_t) 0xBADFACE)
33711         return 1;
33712     }
33713   return 0;
33714 }
33715 _ACEOF
33716 if ac_fn_c_try_run "$LINENO"
33717 then :
33718   gl_cv_func_mbrtowc_stores_incomplete=no
33719 else case e in #(
33720   e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
33721 esac
33722 fi
33723 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33724   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33725 esac
33726 fi
33727
33728          fi
33729          ;;
33730      esac
33731      ;;
33732 esac
33733 fi
33734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
33735 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
33736
33737
33738
33739      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
33740 printf %s "checking whether mbrtowc works on empty input... " >&6; }
33741 if test ${gl_cv_func_mbrtowc_empty_input+y}
33742 then :
33743   printf %s "(cached) " >&6
33744 else case e in #(
33745   e)
33746                   case "$host_os" in
33747                               # Guess no on AIX and glibc systems.
33748         aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
33749                               # Guess yes on native Windows.
33750         mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
33751         *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
33752       esac
33753       if test "$cross_compiling" = yes
33754 then :
33755   :
33756 else case e in #(
33757   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33758 /* end confdefs.h.  */
33759
33760            #include <wchar.h>
33761            static wchar_t wc;
33762            static mbstate_t mbs;
33763            int
33764            main (void)
33765            {
33766              return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
33767            }
33768 _ACEOF
33769 if ac_fn_c_try_run "$LINENO"
33770 then :
33771   gl_cv_func_mbrtowc_empty_input=yes
33772 else case e in #(
33773   e) gl_cv_func_mbrtowc_empty_input=no ;;
33774 esac
33775 fi
33776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33777   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33778 esac
33779 fi
33780
33781      ;;
33782 esac
33783 fi
33784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
33785 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
33786
33787
33788      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
33789 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
33790 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
33791 then :
33792   printf %s "(cached) " >&6
33793 else case e in #(
33794   e)
33795                gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
33796
33797      if test "$cross_compiling" = yes
33798 then :
33799   case "$host_os" in
33800                  # Guess yes on native Windows.
33801          mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
33802        esac
33803
33804 else case e in #(
33805   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33806 /* end confdefs.h.  */
33807 #include <limits.h>
33808             #include <locale.h>
33809             #include <wchar.h>
33810
33811 int
33812 main (void)
33813 {
33814
33815             int i;
33816             char *locale = setlocale (LC_ALL, "C");
33817             if (! locale)
33818               return 2;
33819             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
33820               {
33821                 char c = i;
33822                 wchar_t wc;
33823                 mbstate_t mbs = { 0, };
33824                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
33825                 if (1 < ss)
33826                   return 3;
33827               }
33828             return 0;
33829
33830   ;
33831   return 0;
33832 }
33833 _ACEOF
33834 if ac_fn_c_try_run "$LINENO"
33835 then :
33836   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
33837 else case e in #(
33838   e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
33839 esac
33840 fi
33841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33842   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33843 esac
33844 fi
33845
33846      ;;
33847 esac
33848 fi
33849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
33850 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
33851
33852       case "$gl_cv_func_mbrtowc_null_arg1" in
33853         *yes) ;;
33854         *)
33855 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
33856
33857            REPLACE_MBRTOWC=1
33858            ;;
33859       esac
33860       case "$gl_cv_func_mbrtowc_null_arg2" in
33861         *yes) ;;
33862         *)
33863 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
33864
33865            REPLACE_MBRTOWC=1
33866            ;;
33867       esac
33868       case "$gl_cv_func_mbrtowc_retval" in
33869         *yes) ;;
33870         *)
33871 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
33872
33873            REPLACE_MBRTOWC=1
33874            ;;
33875       esac
33876       case "$gl_cv_func_mbrtowc_nul_retval" in
33877         *yes) ;;
33878         *)
33879 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
33880
33881            REPLACE_MBRTOWC=1
33882            ;;
33883       esac
33884       case "$gl_cv_func_mbrtowc_stores_incomplete" in
33885         *no) ;;
33886         *)
33887 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
33888
33889            REPLACE_MBRTOWC=1
33890            ;;
33891       esac
33892       case "$gl_cv_func_mbrtowc_empty_input" in
33893         *yes) ;;
33894         *)
33895 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
33896
33897            REPLACE_MBRTOWC=1
33898            ;;
33899       esac
33900       case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
33901         *yes) ;;
33902         *)
33903 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
33904
33905            REPLACE_MBRTOWC=1
33906            ;;
33907       esac
33908     fi
33909   fi
33910   if test $REPLACE_MBSTATE_T = 1; then
33911     case "$host_os" in
33912       mingw*) MBRTOWC_LIB= ;;
33913       *)
33914
33915
33916   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
33917 printf %s "checking whether imported symbols can be declared weak... " >&6; }
33918 if test ${gl_cv_have_weak+y}
33919 then :
33920   printf %s "(cached) " >&6
33921 else case e in #(
33922   e) case "$host_os" in
33923        cygwin* | mingw*)
33924                                              gl_cv_have_weak="guessing no"
33925          ;;
33926        *)
33927          gl_cv_have_weak=no
33928                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33929 /* end confdefs.h.  */
33930 extern void xyzzy ();
33931 #pragma weak xyzzy
33932 int
33933 main (void)
33934 {
33935 xyzzy();
33936   ;
33937   return 0;
33938 }
33939 _ACEOF
33940 if ac_fn_c_try_link "$LINENO"
33941 then :
33942   gl_cv_have_weak=maybe
33943 fi
33944 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33945     conftest$ac_exeext conftest.$ac_ext
33946          if test $gl_cv_have_weak = maybe; then
33947                                  if test "$cross_compiling" = yes
33948 then :
33949                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33950 /* end confdefs.h.  */
33951 #ifdef __ELF__
33952                  Extensible Linking Format
33953                  #endif
33954
33955 _ACEOF
33956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33957   $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
33958 then :
33959   gl_cv_have_weak="guessing yes"
33960 else case e in #(
33961   e) gl_cv_have_weak="guessing no" ;;
33962 esac
33963 fi
33964 rm -rf conftest*
33965
33966
33967 else case e in #(
33968   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33969 /* end confdefs.h.  */
33970
33971 #include <stdio.h>
33972 #pragma weak fputs
33973 int main ()
33974 {
33975   return (fputs == NULL);
33976 }
33977 _ACEOF
33978 if ac_fn_c_try_run "$LINENO"
33979 then :
33980   gl_cv_have_weak=yes
33981 else case e in #(
33982   e) gl_cv_have_weak=no ;;
33983 esac
33984 fi
33985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33986   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33987 esac
33988 fi
33989
33990          fi
33991          ;;
33992      esac
33993           case " $LDFLAGS " in
33994        *" -static "*) gl_cv_have_weak=no ;;
33995      esac
33996                     case "$gl_cv_have_weak" in
33997        *yes)
33998          case "$host_os" in
33999            freebsd* | dragonfly* | midnightbsd*)
34000              : > conftest1.c
34001              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
34002              cat <<EOF > conftest2.c
34003 #include <pthread.h>
34004 #pragma weak pthread_mutexattr_gettype
34005 int main ()
34006 {
34007   return (pthread_mutexattr_gettype != NULL);
34008 }
34009 EOF
34010              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
34011                || gl_cv_have_weak=no
34012              rm -f conftest1.c libempty.so conftest2.c conftest
34013              ;;
34014          esac
34015          ;;
34016      esac
34017      ;;
34018 esac
34019 fi
34020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
34021 printf "%s\n" "$gl_cv_have_weak" >&6; }
34022   case "$gl_cv_have_weak" in
34023     *yes)
34024
34025 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
34026
34027       ;;
34028   esac
34029
34030         case "$gl_cv_have_weak" in
34031           *yes) MBRTOWC_LIB= ;;
34032           *)    MBRTOWC_LIB="$LIBPTHREAD" ;;
34033         esac
34034         ;;
34035     esac
34036   else
34037     MBRTOWC_LIB=
34038   fi
34039
34040     LIB_MBRTOWC="$MBRTOWC_LIB"
34041
34042
34043
34044      if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
34045   GL_COND_OBJ_MBRTOWC_TRUE=
34046   GL_COND_OBJ_MBRTOWC_FALSE='#'
34047 else
34048   GL_COND_OBJ_MBRTOWC_TRUE='#'
34049   GL_COND_OBJ_MBRTOWC_FALSE=
34050 fi
34051 :
34052     if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
34053     GL_COND_OBJ_MBRTOWC_TRUE='#'
34054     GL_COND_OBJ_MBRTOWC_FALSE='#'
34055   fi
34056
34057   if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
34058
34059     if test $REPLACE_MBSTATE_T = 1; then
34060
34061
34062
34063
34064
34065
34066
34067
34068   gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078   gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
34079
34080
34081
34082
34083   CFLAG_VISIBILITY=
34084   HAVE_VISIBILITY=0
34085   if test -n "$GCC"; then
34086                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
34087 printf %s "checking whether the -Werror option is usable... " >&6; }
34088 if test ${gl_cv_cc_vis_werror+y}
34089 then :
34090   printf %s "(cached) " >&6
34091 else case e in #(
34092   e) gl_save_CFLAGS="$CFLAGS"
34093        CFLAGS="$CFLAGS -Werror"
34094        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34095 /* end confdefs.h.  */
34096
34097 int
34098 main (void)
34099 {
34100
34101   ;
34102   return 0;
34103 }
34104 _ACEOF
34105 if ac_fn_c_try_compile "$LINENO"
34106 then :
34107   gl_cv_cc_vis_werror=yes
34108 else case e in #(
34109   e) gl_cv_cc_vis_werror=no ;;
34110 esac
34111 fi
34112 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34113        CFLAGS="$gl_save_CFLAGS"
34114        ;;
34115 esac
34116 fi
34117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
34118 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
34119         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
34120 printf %s "checking for simple visibility declarations... " >&6; }
34121 if test ${gl_cv_cc_visibility+y}
34122 then :
34123   printf %s "(cached) " >&6
34124 else case e in #(
34125   e) gl_save_CFLAGS="$CFLAGS"
34126        CFLAGS="$CFLAGS -fvisibility=hidden"
34127                                           if test $gl_cv_cc_vis_werror = yes; then
34128          CFLAGS="$CFLAGS -Werror"
34129        fi
34130        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34131 /* end confdefs.h.  */
34132 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
34133               extern __attribute__((__visibility__("default"))) int exportedvar;
34134               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
34135               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
34136               void dummyfunc (void);
34137               int hiddenvar;
34138               int exportedvar;
34139               int hiddenfunc (void) { return 51; }
34140               int exportedfunc (void) { return 1225736919; }
34141               void dummyfunc (void) {}
34142
34143 int
34144 main (void)
34145 {
34146
34147   ;
34148   return 0;
34149 }
34150 _ACEOF
34151 if ac_fn_c_try_compile "$LINENO"
34152 then :
34153   gl_cv_cc_visibility=yes
34154 else case e in #(
34155   e) gl_cv_cc_visibility=no ;;
34156 esac
34157 fi
34158 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34159        CFLAGS="$gl_save_CFLAGS"
34160        ;;
34161 esac
34162 fi
34163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
34164 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
34165     if test $gl_cv_cc_visibility = yes; then
34166       CFLAG_VISIBILITY="-fvisibility=hidden"
34167       HAVE_VISIBILITY=1
34168     fi
34169   fi
34170
34171
34172
34173 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
34174
34175
34176
34177     fi
34178
34179
34180   :
34181
34182
34183 fi
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198           GL_GNULIB_MBRTOWC=1
34199
34200
34201
34202
34203
34204 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222           GL_GNULIB_MBSCASECMP=1
34223
34224
34225
34226
34227
34228 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240   if test $ac_cv_func_mbsinit = no; then
34241     HAVE_MBSINIT=0
34242     ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
34243       #include <wchar.h>
34244
34245 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34246 if test "x$ac_cv_have_decl_mbsinit" = xyes
34247 then :
34248   ac_have_decl=1
34249 else case e in #(
34250   e) ac_have_decl=0 ;;
34251 esac
34252 fi
34253 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
34254
34255     if test $ac_cv_have_decl_mbsinit = yes; then
34256                         REPLACE_MBSINIT=1
34257     fi
34258   else
34259     if test $REPLACE_MBSTATE_T = 1; then
34260       REPLACE_MBSINIT=1
34261     else
34262                         case "$host_os" in
34263         mingw*) REPLACE_MBSINIT=1 ;;
34264       esac
34265     fi
34266   fi
34267
34268
34269      if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
34270   GL_COND_OBJ_MBSINIT_TRUE=
34271   GL_COND_OBJ_MBSINIT_FALSE='#'
34272 else
34273   GL_COND_OBJ_MBSINIT_TRUE='#'
34274   GL_COND_OBJ_MBSINIT_FALSE=
34275 fi
34276 :
34277     if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
34278     GL_COND_OBJ_MBSINIT_TRUE='#'
34279     GL_COND_OBJ_MBSINIT_FALSE='#'
34280   fi
34281
34282   if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
34283
34284
34285   :
34286
34287
34288 fi
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303           GL_GNULIB_MBSINIT=1
34304
34305
34306
34307
34308
34309 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
34310
34311
34312
34313
34314
34315
34316   if test $ac_cv_func_mbslen = yes; then
34317     HAVE_MBSLEN=1
34318   else
34319     HAVE_MBSLEN=0
34320   fi
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336           GL_GNULIB_MBSLEN=1
34337
34338
34339
34340
34341
34342 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353   if test $ac_cv_func_mbsrtowcs = no; then
34354     HAVE_MBSRTOWCS=0
34355     ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
34356       #include <wchar.h>
34357
34358 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34359 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
34360 then :
34361   ac_have_decl=1
34362 else case e in #(
34363   e) ac_have_decl=0 ;;
34364 esac
34365 fi
34366 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
34367
34368     if test $ac_cv_have_decl_mbsrtowcs = yes; then
34369                         REPLACE_MBSRTOWCS=1
34370     fi
34371   else
34372     if test $REPLACE_MBSTATE_T = 1; then
34373       REPLACE_MBSRTOWCS=1
34374     else
34375
34376
34377
34378
34379
34380
34381      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
34382 printf %s "checking whether mbsrtowcs works... " >&6; }
34383 if test ${gl_cv_func_mbsrtowcs_works+y}
34384 then :
34385   printf %s "(cached) " >&6
34386 else case e in #(
34387   e)
34388                   case "$host_os" in
34389                                    # Guess no on HP-UX, Solaris, mingw.
34390         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
34391                                    # Guess yes otherwise.
34392         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
34393       esac
34394       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
34395         if test "$cross_compiling" = yes
34396 then :
34397   :
34398 else case e in #(
34399   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34400 /* end confdefs.h.  */
34401
34402 #include <locale.h>
34403 #include <string.h>
34404 #include <wchar.h>
34405 int main ()
34406 {
34407   int result = 0;
34408   /* Test whether the function supports a NULL destination argument.
34409      This fails on native Windows.  */
34410   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
34411     {
34412       const char input[] = "\337er";
34413       const char *src = input;
34414       mbstate_t state;
34415
34416       memset (&state, '\0', sizeof (mbstate_t));
34417       if (mbsrtowcs (NULL, &src, 1, &state) != 3
34418           || src != input)
34419         result |= 1;
34420     }
34421   /* Test whether the function works when started with a conversion state
34422      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
34423   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
34424     {
34425       const char input[] = "B\303\274\303\237er";
34426       mbstate_t state;
34427
34428       memset (&state, '\0', sizeof (mbstate_t));
34429       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
34430         if (!mbsinit (&state))
34431           {
34432             const char *src = input + 2;
34433             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
34434               result |= 2;
34435           }
34436     }
34437   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
34438     {
34439       const char input[] = "<\306\374\313\334\270\354>";
34440       mbstate_t state;
34441
34442       memset (&state, '\0', sizeof (mbstate_t));
34443       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
34444         if (!mbsinit (&state))
34445           {
34446             const char *src = input + 4;
34447             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
34448               result |= 4;
34449           }
34450     }
34451   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
34452     {
34453       const char input[] = "B\250\271\201\060\211\070er";
34454       mbstate_t state;
34455
34456       memset (&state, '\0', sizeof (mbstate_t));
34457       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
34458         if (!mbsinit (&state))
34459           {
34460             const char *src = input + 2;
34461             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
34462               result |= 8;
34463           }
34464     }
34465   return result;
34466 }
34467 _ACEOF
34468 if ac_fn_c_try_run "$LINENO"
34469 then :
34470   gl_cv_func_mbsrtowcs_works=yes
34471 else case e in #(
34472   e) gl_cv_func_mbsrtowcs_works=no ;;
34473 esac
34474 fi
34475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34476   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34477 esac
34478 fi
34479
34480       fi
34481      ;;
34482 esac
34483 fi
34484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
34485 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
34486
34487       case "$gl_cv_func_mbsrtowcs_works" in
34488         *yes) ;;
34489         *) REPLACE_MBSRTOWCS=1 ;;
34490       esac
34491       if test $REPLACE_MBSRTOWCS = 0; then
34492
34493      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
34494 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
34495 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
34496 then :
34497   printf %s "(cached) " >&6
34498 else case e in #(
34499   e)
34500                gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
34501
34502      if test "$cross_compiling" = yes
34503 then :
34504   case "$host_os" in
34505                  # Guess yes on native Windows.
34506          mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
34507        esac
34508
34509 else case e in #(
34510   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34511 /* end confdefs.h.  */
34512 #include <limits.h>
34513             #include <locale.h>
34514             #include <wchar.h>
34515
34516 int
34517 main (void)
34518 {
34519
34520             int i;
34521             char *locale = setlocale (LC_ALL, "C");
34522             if (! locale)
34523               return 2;
34524             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
34525               {
34526                 char c = i;
34527                 wchar_t wc;
34528                 mbstate_t mbs = { 0, };
34529                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
34530                 if (1 < ss)
34531                   return 3;
34532               }
34533             return 0;
34534
34535   ;
34536   return 0;
34537 }
34538 _ACEOF
34539 if ac_fn_c_try_run "$LINENO"
34540 then :
34541   gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
34542 else case e in #(
34543   e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
34544 esac
34545 fi
34546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34547   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34548 esac
34549 fi
34550
34551      ;;
34552 esac
34553 fi
34554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
34555 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
34556
34557         case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
34558           *yes) ;;
34559           *) REPLACE_MBSRTOWCS=1 ;;
34560         esac
34561       fi
34562     fi
34563   fi
34564
34565
34566      if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
34567   GL_COND_OBJ_MBSRTOWCS_TRUE=
34568   GL_COND_OBJ_MBSRTOWCS_FALSE='#'
34569 else
34570   GL_COND_OBJ_MBSRTOWCS_TRUE='#'
34571   GL_COND_OBJ_MBSRTOWCS_FALSE=
34572 fi
34573 :
34574     if test -z "${GL_COND_OBJ_MBSRTOWCS_TRUE}" && test -z "${GL_COND_OBJ_MBSRTOWCS_FALSE}"; then
34575     GL_COND_OBJ_MBSRTOWCS_TRUE='#'
34576     GL_COND_OBJ_MBSRTOWCS_FALSE='#'
34577   fi
34578
34579   if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
34590
34591
34592   :
34593
34594
34595 fi
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610           GL_GNULIB_MBSRTOWCS=1
34611
34612
34613
34614
34615
34616 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634           GL_GNULIB_MBSSTR=1
34635
34636
34637
34638
34639
34640 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
34641
34642
34643
34644
34645
34646
34647
34648
34649   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbtowc" >&5
34650 printf %s "checking for mbtowc... " >&6; }
34651 if test ${gl_cv_onwards_func_mbtowc+y}
34652 then :
34653   printf %s "(cached) " >&6
34654 else case e in #(
34655   e)
34656   exec 9>&6 6>/dev/null
34657
34658        case "$host_os" in
34659
34660          linux*-android*)
34661            ac_fn_check_decl "$LINENO" "mbtowc" "ac_cv_have_decl_mbtowc" "#include <stdlib.h>
34662 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34663 if test "x$ac_cv_have_decl_mbtowc" = xyes
34664 then :
34665
34666 fi
34667            if test $ac_cv_have_decl_mbtowc = yes; then
34668              ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
34669 if test "x$ac_cv_func_mbtowc" = xyes
34670 then :
34671
34672 fi
34673
34674              if test $ac_cv_func_mbtowc = yes; then
34675                gl_cv_onwards_func_mbtowc=yes
34676              else
34677                                                             gl_cv_onwards_func_mbtowc='future OS version'
34678              fi
34679            else
34680              gl_cv_onwards_func_mbtowc='future OS version'
34681            fi
34682            ;;
34683
34684
34685          *)
34686            ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
34687 if test "x$ac_cv_func_mbtowc" = xyes
34688 then :
34689
34690 fi
34691
34692            gl_cv_onwards_func_mbtowc=$ac_cv_func_mbtowc
34693            ;;
34694
34695        esac
34696
34697   exec 6>&9 9>&-
34698
34699      ;;
34700 esac
34701 fi
34702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mbtowc" >&5
34703 printf "%s\n" "$gl_cv_onwards_func_mbtowc" >&6; }
34704
34705   case "$gl_cv_onwards_func_mbtowc" in
34706     future*) ac_cv_func_mbtowc=no ;;
34707     *)       ac_cv_func_mbtowc=$gl_cv_onwards_func_mbtowc ;;
34708   esac
34709   if test $ac_cv_func_mbtowc = yes; then
34710
34711 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
34712
34713   fi
34714
34715
34716   if test $ac_cv_func_mbtowc = no; then
34717     HAVE_MBTOWC=0
34718     case "$gl_cv_onwards_func_mbtowc" in
34719       future*) REPLACE_MBTOWC=1 ;;
34720     esac
34721   else
34722     if false; then
34723       REPLACE_MBTOWC=1
34724     fi
34725   fi
34726
34727
34728      if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
34729   GL_COND_OBJ_MBTOWC_TRUE=
34730   GL_COND_OBJ_MBTOWC_FALSE='#'
34731 else
34732   GL_COND_OBJ_MBTOWC_TRUE='#'
34733   GL_COND_OBJ_MBTOWC_FALSE=
34734 fi
34735 :
34736     if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
34737     GL_COND_OBJ_MBTOWC_TRUE='#'
34738     GL_COND_OBJ_MBTOWC_FALSE='#'
34739   fi
34740
34741   if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
34742
34743
34744   :
34745
34746
34747 fi
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757           GL_GNULIB_MBTOWC=1
34758
34759
34760
34761
34762
34763 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
34764
34765
34766
34767
34768
34769   :
34770
34771
34772
34773      if test $REPLACE_MEMCHR = 1; then
34774   GL_COND_OBJ_MEMCHR_TRUE=
34775   GL_COND_OBJ_MEMCHR_FALSE='#'
34776 else
34777   GL_COND_OBJ_MEMCHR_TRUE='#'
34778   GL_COND_OBJ_MEMCHR_FALSE=
34779 fi
34780 :
34781     if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
34782     GL_COND_OBJ_MEMCHR_TRUE='#'
34783     GL_COND_OBJ_MEMCHR_FALSE='#'
34784   fi
34785
34786   if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
34787
34788
34789   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
34790 if test "x$ac_cv_header_bp_sym_h" = xyes
34791 then :
34792   printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
34793
34794 fi
34795
34796
34797
34798 fi
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813           GL_GNULIB_MEMCHR=1
34814
34815
34816
34817
34818
34819 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
34832 printf %s "checking for mempcpy... " >&6; }
34833 if test ${gl_cv_onwards_func_mempcpy+y}
34834 then :
34835   printf %s "(cached) " >&6
34836 else case e in #(
34837   e)
34838   exec 9>&6 6>/dev/null
34839
34840        case "$host_os" in
34841
34842          linux*-android*)
34843            ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
34844 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34845 if test "x$ac_cv_have_decl_mempcpy" = xyes
34846 then :
34847
34848 fi
34849            if test $ac_cv_have_decl_mempcpy = yes; then
34850              ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
34851 if test "x$ac_cv_func_mempcpy" = xyes
34852 then :
34853
34854 fi
34855
34856              if test $ac_cv_func_mempcpy = yes; then
34857                gl_cv_onwards_func_mempcpy=yes
34858              else
34859                                                             gl_cv_onwards_func_mempcpy='future OS version'
34860              fi
34861            else
34862              gl_cv_onwards_func_mempcpy='future OS version'
34863            fi
34864            ;;
34865
34866
34867          *)
34868            ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
34869 if test "x$ac_cv_func_mempcpy" = xyes
34870 then :
34871
34872 fi
34873
34874            gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
34875            ;;
34876
34877        esac
34878
34879   exec 6>&9 9>&-
34880
34881      ;;
34882 esac
34883 fi
34884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
34885 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
34886
34887   case "$gl_cv_onwards_func_mempcpy" in
34888     future*) ac_cv_func_mempcpy=no ;;
34889     *)       ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
34890   esac
34891   if test $ac_cv_func_mempcpy = yes; then
34892
34893 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
34894
34895   fi
34896
34897
34898   if test $ac_cv_func_mempcpy = no; then
34899     HAVE_MEMPCPY=0
34900     case "$gl_cv_onwards_func_mempcpy" in
34901       future*) REPLACE_MEMPCPY=1 ;;
34902     esac
34903   fi
34904
34905
34906      if test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1; then
34907   GL_COND_OBJ_MEMPCPY_TRUE=
34908   GL_COND_OBJ_MEMPCPY_FALSE='#'
34909 else
34910   GL_COND_OBJ_MEMPCPY_TRUE='#'
34911   GL_COND_OBJ_MEMPCPY_FALSE=
34912 fi
34913 :
34914     if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
34915     GL_COND_OBJ_MEMPCPY_TRUE='#'
34916     GL_COND_OBJ_MEMPCPY_FALSE='#'
34917   fi
34918
34919   if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
34920
34921
34922   :
34923
34924
34925 fi
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940           GL_GNULIB_MEMPCPY=1
34941
34942
34943
34944
34945
34946 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
34947
34948
34949
34950
34951
34952
34953
34954
34955   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
34956 printf %s "checking whether mkdir handles trailing slash... " >&6; }
34957 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
34958 then :
34959   printf %s "(cached) " >&6
34960 else case e in #(
34961   e) rm -rf conftest.dir
34962      if test "$cross_compiling" = yes
34963 then :
34964   case "$host_os" in
34965                            # Guess yes on Linux systems.
34966           linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34967                            # Guess yes on systems that emulate the Linux system calls.
34968           midipix*)        gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34969                            # Guess yes on glibc systems.
34970           *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34971                            # Guess yes on MSVC, no on mingw.
34972           mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34973 /* end confdefs.h.  */
34974
34975 #ifdef _MSC_VER
34976  Known
34977 #endif
34978
34979 _ACEOF
34980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34981   $EGREP_TRADITIONAL "Known" >/dev/null 2>&1
34982 then :
34983   gl_cv_func_mkdir_trailing_slash_works="guessing yes"
34984 else case e in #(
34985   e) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
34986 esac
34987 fi
34988 rm -rf conftest*
34989
34990                            ;;
34991                            # If we don't know, obey --enable-cross-guesses.
34992           *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
34993         esac
34994
34995 else case e in #(
34996   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34997 /* end confdefs.h.  */
34998
34999           #include <sys/types.h>
35000           #include <sys/stat.h>
35001
35002
35003 $gl_mda_defines
35004
35005 int
35006 main (void)
35007 {
35008 return mkdir ("conftest.dir/", 0700);
35009   ;
35010   return 0;
35011 }
35012 _ACEOF
35013 if ac_fn_c_try_run "$LINENO"
35014 then :
35015   gl_cv_func_mkdir_trailing_slash_works=yes
35016 else case e in #(
35017   e) gl_cv_func_mkdir_trailing_slash_works=no ;;
35018 esac
35019 fi
35020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35021   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35022 esac
35023 fi
35024
35025      rm -rf conftest.dir
35026      ;;
35027 esac
35028 fi
35029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
35030 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
35031   case "$gl_cv_func_mkdir_trailing_slash_works" in
35032     *yes) ;;
35033     *)
35034       REPLACE_MKDIR=1
35035       ;;
35036   esac
35037
35038   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
35039 printf %s "checking whether mkdir handles trailing dot... " >&6; }
35040 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
35041 then :
35042   printf %s "(cached) " >&6
35043 else case e in #(
35044   e) rm -rf conftest.dir
35045      if test "$cross_compiling" = yes
35046 then :
35047   case "$host_os" in
35048                          # Guess yes on glibc systems.
35049           *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35050                          # Guess yes on musl systems.
35051           *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35052                          # Guess yes on systems that emulate the Linux system calls.
35053           midipix*)      gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35054                          # Guess no on native Windows.
35055           mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
35056                          # If we don't know, obey --enable-cross-guesses.
35057           *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
35058         esac
35059
35060 else case e in #(
35061   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35062 /* end confdefs.h.  */
35063
35064           #include <sys/types.h>
35065           #include <sys/stat.h>
35066
35067
35068 $gl_mda_defines
35069
35070 int
35071 main (void)
35072 {
35073 return !mkdir ("conftest.dir/./", 0700);
35074   ;
35075   return 0;
35076 }
35077 _ACEOF
35078 if ac_fn_c_try_run "$LINENO"
35079 then :
35080   gl_cv_func_mkdir_trailing_dot_works=yes
35081 else case e in #(
35082   e) gl_cv_func_mkdir_trailing_dot_works=no ;;
35083 esac
35084 fi
35085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35086   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35087 esac
35088 fi
35089
35090      rm -rf conftest.dir
35091
35092    ;;
35093 esac
35094 fi
35095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
35096 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
35097   case "$gl_cv_func_mkdir_trailing_dot_works" in
35098     *yes) ;;
35099     *)
35100       REPLACE_MKDIR=1
35101
35102 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
35103
35104       ;;
35105   esac
35106
35107
35108      if test $REPLACE_MKDIR = 1; then
35109   GL_COND_OBJ_MKDIR_TRUE=
35110   GL_COND_OBJ_MKDIR_FALSE='#'
35111 else
35112   GL_COND_OBJ_MKDIR_TRUE='#'
35113   GL_COND_OBJ_MKDIR_FALSE=
35114 fi
35115 :
35116     if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then
35117     GL_COND_OBJ_MKDIR_TRUE='#'
35118     GL_COND_OBJ_MKDIR_FALSE='#'
35119   fi
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130           GL_GNULIB_MKDIR=1
35131
35132
35133
35134
35135
35136 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
35137
35138
35139
35140
35141
35142
35143
35144   if test $ac_cv_func_mkstemp = yes; then
35145     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
35146 printf %s "checking for working mkstemp... " >&6; }
35147 if test ${gl_cv_func_working_mkstemp+y}
35148 then :
35149   printf %s "(cached) " >&6
35150 else case e in #(
35151   e)
35152         mkdir conftest.mkstemp
35153         if test "$cross_compiling" = yes
35154 then :
35155   case "$host_os" in
35156                                  # Guess yes on glibc systems.
35157              *-gnu* | gnu*)      gl_cv_func_working_mkstemp="guessing yes" ;;
35158                                  # Guess yes on musl systems.
35159              *-musl* | midipix*) gl_cv_func_working_mkstemp="guessing yes" ;;
35160                                  # Guess no on native Windows.
35161              mingw*)             gl_cv_func_working_mkstemp="guessing no" ;;
35162                                  # If we don't know, obey --enable-cross-guesses.
35163              *)                  gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
35164            esac
35165
35166 else case e in #(
35167   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35168 /* end confdefs.h.  */
35169 $ac_includes_default
35170
35171
35172 $gl_mda_defines
35173
35174 int
35175 main (void)
35176 {
35177 int result = 0;
35178               int i;
35179               off_t large = (off_t) 4294967295u;
35180               if (large < 0)
35181                 large = 2147483647;
35182               umask (0);
35183               for (i = 0; i < 70; i++)
35184                 {
35185                   char templ[] = "conftest.mkstemp/coXXXXXX";
35186                   int (*mkstemp_function) (char *) = mkstemp;
35187                   int fd = mkstemp_function (templ);
35188                   if (fd < 0)
35189                     result |= 1;
35190                   else
35191                     {
35192                       struct stat st;
35193                       if (lseek (fd, large, SEEK_SET) != large)
35194                         result |= 2;
35195                       if (fstat (fd, &st) < 0)
35196                         result |= 4;
35197                       else if (st.st_mode & 0077)
35198                         result |= 8;
35199                       if (close (fd))
35200                         result |= 16;
35201                     }
35202                 }
35203               return result;
35204   ;
35205   return 0;
35206 }
35207 _ACEOF
35208 if ac_fn_c_try_run "$LINENO"
35209 then :
35210   gl_cv_func_working_mkstemp=yes
35211 else case e in #(
35212   e) gl_cv_func_working_mkstemp=no ;;
35213 esac
35214 fi
35215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35216   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35217 esac
35218 fi
35219
35220         rm -rf conftest.mkstemp
35221        ;;
35222 esac
35223 fi
35224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
35225 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
35226     case "$gl_cv_func_working_mkstemp" in
35227       *yes) ;;
35228       *)
35229         REPLACE_MKSTEMP=1
35230         ;;
35231     esac
35232   else
35233     HAVE_MKSTEMP=0
35234   fi
35235
35236
35237      if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
35238   GL_COND_OBJ_MKSTEMP_TRUE=
35239   GL_COND_OBJ_MKSTEMP_FALSE='#'
35240 else
35241   GL_COND_OBJ_MKSTEMP_TRUE='#'
35242   GL_COND_OBJ_MKSTEMP_FALSE=
35243 fi
35244 :
35245     if test -z "${GL_COND_OBJ_MKSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKSTEMP_FALSE}"; then
35246     GL_COND_OBJ_MKSTEMP_TRUE='#'
35247     GL_COND_OBJ_MKSTEMP_FALSE='#'
35248   fi
35249
35250   if test -z "$GL_COND_OBJ_MKSTEMP_TRUE"; then :
35251
35252
35253
35254
35255 fi
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265           GL_GNULIB_MKSTEMP=1
35266
35267
35268
35269
35270
35271 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
35272
35273
35274
35275
35276
35277
35278
35279
35280   REPLACE_MKTIME=0
35281   if test "$gl_cv_func_working_mktime" != yes; then
35282     REPLACE_MKTIME=1
35283
35284 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
35285
35286   fi
35287   case "$host_os" in
35288     mingw*)
35289       REPLACE_MKTIME=1
35290
35291 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
35292
35293       ;;
35294   esac
35295
35296   if test $REPLACE_MKTIME = 1; then
35297
35298
35299
35300
35301
35302
35303
35304
35305   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
35306
35307     :
35308   fi
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318           GL_GNULIB_MKTIME=1
35319
35320
35321
35322
35323
35324 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
35325
35326
35327
35328
35329
35330
35331   WANT_MKTIME_INTERNAL=0
35332     ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
35333 if test "x$ac_cv_func___mktime_internal" = xyes
35334 then :
35335
35336 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
35337
35338
35339 else case e in #(
35340   e)           WANT_MKTIME_INTERNAL=1
35341
35342 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
35343
35344      ;;
35345 esac
35346 fi
35347
35348
35349   if test $WANT_MKTIME_INTERNAL = 1; then
35350
35351
35352
35353
35354
35355
35356
35357
35358   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
35359
35360     :
35361   fi
35362
35363
35364      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35365   GL_COND_OBJ_MSVC_INVAL_TRUE=
35366   GL_COND_OBJ_MSVC_INVAL_FALSE='#'
35367 else
35368   GL_COND_OBJ_MSVC_INVAL_TRUE='#'
35369   GL_COND_OBJ_MSVC_INVAL_FALSE=
35370 fi
35371 :
35372     if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
35373     GL_COND_OBJ_MSVC_INVAL_TRUE='#'
35374     GL_COND_OBJ_MSVC_INVAL_FALSE='#'
35375   fi
35376
35377
35378
35379      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35380   GL_COND_OBJ_MSVC_NOTHROW_TRUE=
35381   GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
35382 else
35383   GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
35384   GL_COND_OBJ_MSVC_NOTHROW_FALSE=
35385 fi
35386 :
35387     if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
35388     GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
35389     GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
35390   fi
35391
35392
35393
35394 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
35395
35396
35397
35398
35399
35400
35401
35402
35403   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo" >&5
35404 printf %s "checking for nl_langinfo... " >&6; }
35405 if test ${gl_cv_onwards_func_nl_langinfo+y}
35406 then :
35407   printf %s "(cached) " >&6
35408 else case e in #(
35409   e)
35410   exec 9>&6 6>/dev/null
35411
35412        case "$host_os" in
35413
35414          linux*-android*)
35415            ac_fn_check_decl "$LINENO" "nl_langinfo" "ac_cv_have_decl_nl_langinfo" "#include <langinfo.h>
35416 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35417 if test "x$ac_cv_have_decl_nl_langinfo" = xyes
35418 then :
35419
35420 fi
35421            if test $ac_cv_have_decl_nl_langinfo = yes; then
35422              ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35423 if test "x$ac_cv_func_nl_langinfo" = xyes
35424 then :
35425
35426 fi
35427
35428              if test $ac_cv_func_nl_langinfo = yes; then
35429                gl_cv_onwards_func_nl_langinfo=yes
35430              else
35431                                                             gl_cv_onwards_func_nl_langinfo='future OS version'
35432              fi
35433            else
35434              gl_cv_onwards_func_nl_langinfo='future OS version'
35435            fi
35436            ;;
35437
35438
35439          *)
35440            ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35441 if test "x$ac_cv_func_nl_langinfo" = xyes
35442 then :
35443
35444 fi
35445
35446            gl_cv_onwards_func_nl_langinfo=$ac_cv_func_nl_langinfo
35447            ;;
35448
35449        esac
35450
35451   exec 6>&9 9>&-
35452
35453      ;;
35454 esac
35455 fi
35456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_nl_langinfo" >&5
35457 printf "%s\n" "$gl_cv_onwards_func_nl_langinfo" >&6; }
35458
35459   case "$gl_cv_onwards_func_nl_langinfo" in
35460     future*) ac_cv_func_nl_langinfo=no ;;
35461     *)       ac_cv_func_nl_langinfo=$gl_cv_onwards_func_nl_langinfo ;;
35462   esac
35463   if test $ac_cv_func_nl_langinfo = yes; then
35464
35465 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
35466
35467   fi
35468
35469
35470
35471
35472
35473
35474   if test $ac_cv_func_nl_langinfo = yes; then
35475     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
35476     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
35477 printf %s "checking whether YESEXPR works... " >&6; }
35478 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
35479 then :
35480   printf %s "(cached) " >&6
35481 else case e in #(
35482   e) if test "$cross_compiling" = yes
35483 then :
35484
35485          case "$host_os" in
35486                    # Guess no on irix systems.
35487            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
35488                    # Guess yes elsewhere.
35489            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
35490          esac
35491
35492 else case e in #(
35493   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35494 /* end confdefs.h.  */
35495 #include <langinfo.h>
35496
35497 int
35498 main (void)
35499 {
35500 return !*nl_langinfo(YESEXPR);
35501
35502   ;
35503   return 0;
35504 }
35505 _ACEOF
35506 if ac_fn_c_try_run "$LINENO"
35507 then :
35508   gl_cv_func_nl_langinfo_yesexpr_works=yes
35509 else case e in #(
35510   e) gl_cv_func_nl_langinfo_yesexpr_works=no ;;
35511 esac
35512 fi
35513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35514   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35515 esac
35516 fi
35517
35518        ;;
35519 esac
35520 fi
35521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
35522 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
35523     case $gl_cv_func_nl_langinfo_yesexpr_works in
35524       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
35525       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
35526     esac
35527
35528 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
35529
35530     # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
35531     case "$host_os" in
35532       solaris*) NL_LANGINFO_MTSAFE=0 ;;
35533       *)        NL_LANGINFO_MTSAFE=1 ;;
35534     esac
35535
35536 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
35537
35538     if test $HAVE_LANGINFO_CODESET = 1 \
35539        && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
35540        && test $HAVE_LANGINFO_ALTMON = 1 \
35541        && test $HAVE_LANGINFO_ERA = 1 \
35542        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
35543        && test $NL_LANGINFO_MTSAFE = 1; then
35544       :
35545     else
35546       REPLACE_NL_LANGINFO=1
35547
35548 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
35549
35550     fi
35551   else
35552     HAVE_NL_LANGINFO=0
35553     case "$gl_cv_onwards_func_nl_langinfo" in
35554       future*) REPLACE_NL_LANGINFO=1 ;;
35555     esac
35556   fi
35557   if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
35558     LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB"
35559   else
35560     LIB_NL_LANGINFO=
35561   fi
35562
35563
35564
35565      if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
35566   GL_COND_OBJ_NL_LANGINFO_TRUE=
35567   GL_COND_OBJ_NL_LANGINFO_FALSE='#'
35568 else
35569   GL_COND_OBJ_NL_LANGINFO_TRUE='#'
35570   GL_COND_OBJ_NL_LANGINFO_FALSE=
35571 fi
35572 :
35573     if test -z "${GL_COND_OBJ_NL_LANGINFO_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_FALSE}"; then
35574     GL_COND_OBJ_NL_LANGINFO_TRUE='#'
35575     GL_COND_OBJ_NL_LANGINFO_FALSE='#'
35576   fi
35577
35578
35579      if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
35580   GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE=
35581   GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
35582 else
35583   GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
35584   GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE=
35585 fi
35586 :
35587     if test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE}"; then
35588     GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
35589     GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
35590   fi
35591
35592   if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
35593
35594
35595
35596   CFLAG_VISIBILITY=
35597   HAVE_VISIBILITY=0
35598   if test -n "$GCC"; then
35599                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
35600 printf %s "checking whether the -Werror option is usable... " >&6; }
35601 if test ${gl_cv_cc_vis_werror+y}
35602 then :
35603   printf %s "(cached) " >&6
35604 else case e in #(
35605   e) gl_save_CFLAGS="$CFLAGS"
35606        CFLAGS="$CFLAGS -Werror"
35607        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35608 /* end confdefs.h.  */
35609
35610 int
35611 main (void)
35612 {
35613
35614   ;
35615   return 0;
35616 }
35617 _ACEOF
35618 if ac_fn_c_try_compile "$LINENO"
35619 then :
35620   gl_cv_cc_vis_werror=yes
35621 else case e in #(
35622   e) gl_cv_cc_vis_werror=no ;;
35623 esac
35624 fi
35625 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35626        CFLAGS="$gl_save_CFLAGS"
35627        ;;
35628 esac
35629 fi
35630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
35631 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
35632         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
35633 printf %s "checking for simple visibility declarations... " >&6; }
35634 if test ${gl_cv_cc_visibility+y}
35635 then :
35636   printf %s "(cached) " >&6
35637 else case e in #(
35638   e) gl_save_CFLAGS="$CFLAGS"
35639        CFLAGS="$CFLAGS -fvisibility=hidden"
35640                                           if test $gl_cv_cc_vis_werror = yes; then
35641          CFLAGS="$CFLAGS -Werror"
35642        fi
35643        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35644 /* end confdefs.h.  */
35645 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
35646               extern __attribute__((__visibility__("default"))) int exportedvar;
35647               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
35648               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
35649               void dummyfunc (void);
35650               int hiddenvar;
35651               int exportedvar;
35652               int hiddenfunc (void) { return 51; }
35653               int exportedfunc (void) { return 1225736919; }
35654               void dummyfunc (void) {}
35655
35656 int
35657 main (void)
35658 {
35659
35660   ;
35661   return 0;
35662 }
35663 _ACEOF
35664 if ac_fn_c_try_compile "$LINENO"
35665 then :
35666   gl_cv_cc_visibility=yes
35667 else case e in #(
35668   e) gl_cv_cc_visibility=no ;;
35669 esac
35670 fi
35671 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35672        CFLAGS="$gl_save_CFLAGS"
35673        ;;
35674 esac
35675 fi
35676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
35677 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
35678     if test $gl_cv_cc_visibility = yes; then
35679       CFLAG_VISIBILITY="-fvisibility=hidden"
35680       HAVE_VISIBILITY=1
35681     fi
35682   fi
35683
35684
35685
35686 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
35687
35688
35689
35690   fi
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700           GL_GNULIB_NL_LANGINFO=1
35701
35702
35703
35704
35705
35706 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
35707
35708
35709
35710
35711
35712
35713  # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
35714
35715
35716
35717
35718
35719 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
35720
35721
35722
35723   ac_ext=c
35724 ac_cpp='$CPP $CPPFLAGS'
35725 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35726 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35727 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35728
35729      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C nullptr" >&5
35730 printf %s "checking for C nullptr... " >&6; }
35731 if test ${gl_cv_c_nullptr+y}
35732 then :
35733   printf %s "(cached) " >&6
35734 else case e in #(
35735   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35736 /* end confdefs.h.  */
35737 int *p = nullptr;
35738 _ACEOF
35739 if ac_fn_c_try_compile "$LINENO"
35740 then :
35741   gl_cv_c_nullptr=yes
35742 else case e in #(
35743   e) gl_cv_c_nullptr=no ;;
35744 esac
35745 fi
35746 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35747 esac
35748 fi
35749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_nullptr" >&5
35750 printf "%s\n" "$gl_cv_c_nullptr" >&6; }
35751       gl_c_nullptr=$gl_cv_c_nullptr
35752       ac_ext=c
35753 ac_cpp='$CPP $CPPFLAGS'
35754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35757
35758   if test "$gl_c_nullptr" = yes; then
35759
35760 printf "%s\n" "#define HAVE_C_NULLPTR 1" >>confdefs.h
35761
35762   fi
35763
35764
35765
35766
35767
35768
35769   case "$host_os" in
35770     mingw* | pw*)
35771       REPLACE_OPEN=1
35772       ;;
35773     *)
35774
35775       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
35776         REPLACE_OPEN=1
35777       fi
35778
35779
35780   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
35781 printf %s "checking whether open recognizes a trailing slash... " >&6; }
35782 if test ${gl_cv_func_open_slash+y}
35783 then :
35784   printf %s "(cached) " >&6
35785 else case e in #(
35786   e) # Assume that if we have lstat, we can also check symlinks.
35787      if test $ac_cv_func_lstat = yes; then
35788        touch conftest.tmp
35789        ln -s conftest.tmp conftest.lnk
35790      fi
35791      if test "$cross_compiling" = yes
35792 then :
35793
35794         case "$host_os" in
35795           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
35796             gl_cv_func_open_slash="guessing no" ;;
35797           *)
35798             gl_cv_func_open_slash="guessing yes" ;;
35799         esac
35800
35801 else case e in #(
35802   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35803 /* end confdefs.h.  */
35804
35805 #include <fcntl.h>
35806 #if HAVE_UNISTD_H
35807 # include <unistd.h>
35808 #endif
35809
35810
35811 $gl_mda_defines
35812
35813 int main ()
35814 {
35815   int result = 0;
35816 #if HAVE_LSTAT
35817   if (open ("conftest.lnk/", O_RDONLY) != -1)
35818     result |= 1;
35819 #endif
35820   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
35821     result |= 2;
35822   return result;
35823 }
35824 _ACEOF
35825 if ac_fn_c_try_run "$LINENO"
35826 then :
35827   gl_cv_func_open_slash=yes
35828 else case e in #(
35829   e) gl_cv_func_open_slash=no ;;
35830 esac
35831 fi
35832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35833   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35834 esac
35835 fi
35836
35837      rm -f conftest.sl conftest.tmp conftest.lnk
35838      ;;
35839 esac
35840 fi
35841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
35842 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
35843   case "$gl_cv_func_open_slash" in
35844     *no)
35845
35846 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
35847
35848       ;;
35849   esac
35850
35851       case "$gl_cv_func_open_slash" in
35852         *no)
35853           REPLACE_OPEN=1
35854           ;;
35855       esac
35856       ;;
35857   esac
35858
35859
35860
35861
35862      if test $REPLACE_OPEN = 1; then
35863   GL_COND_OBJ_OPEN_TRUE=
35864   GL_COND_OBJ_OPEN_FALSE='#'
35865 else
35866   GL_COND_OBJ_OPEN_TRUE='#'
35867   GL_COND_OBJ_OPEN_FALSE=
35868 fi
35869 :
35870     if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
35871     GL_COND_OBJ_OPEN_TRUE='#'
35872     GL_COND_OBJ_OPEN_FALSE='#'
35873   fi
35874
35875   if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
35876
35877
35878
35879   :
35880
35881
35882 fi
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892           GL_GNULIB_OPEN=1
35893
35894
35895
35896
35897
35898 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
35899
35900
35901
35902
35903
35904
35905
35906   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl 5.005 or newer" >&5
35907 printf %s "checking for Perl 5.005 or newer... " >&6; }
35908 if test ${gl_cv_prog_perl+y}
35909 then :
35910   printf %s "(cached) " >&6
35911 else case e in #(
35912   e)
35913   if test "${PERL+set}" = set; then
35914     # 'PERL' is set in the user's environment.
35915     candidate_perl_names="$PERL"
35916     perl_specified=yes
35917   else
35918     candidate_perl_names='perl perl5'
35919     perl_specified=no
35920   fi
35921
35922   gl_cv_prog_perl=no
35923   for perl in $candidate_perl_names; do
35924     # Run test in a subshell; some versions of sh will print an error if
35925     # an executable is not found, even if stderr is redirected.
35926     if ( $perl -e 'require 5.005; use File::Compare; use warnings;' ) > /dev/null 2>&1; then
35927       gl_cv_prog_perl=$perl
35928       break
35929     fi
35930   done
35931   ;;
35932 esac
35933 fi
35934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_perl" >&5
35935 printf "%s\n" "$gl_cv_prog_perl" >&6; }
35936
35937 if test "$gl_cv_prog_perl" != no; then
35938   PERL=$gl_cv_prog_perl
35939 else
35940   PERL="$am_missing_run perl"
35941   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
35942 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
35943          a usable version of the Perl File::Compare module.  As a result,
35944          you may be unable to run a few tests or to regenerate certain
35945          files if you modify the sources from which they are derived.
35946  " >&5
35947 printf "%s\n" "$as_me: WARNING:
35948 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
35949          a usable version of the Perl File::Compare module.  As a result,
35950          you may be unable to run a few tests or to regenerate certain
35951          files if you modify the sources from which they are derived.
35952  " >&2;}
35953 fi
35954
35955
35956
35957
35958   ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
35959 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35960 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
35961 then :
35962   ac_have_decl=1
35963 else case e in #(
35964   e) ac_have_decl=0 ;;
35965 esac
35966 fi
35967 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
35968
35969   ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
35970 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35971 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
35972 then :
35973   ac_have_decl=1
35974 else case e in #(
35975   e) ac_have_decl=0 ;;
35976 esac
35977 fi
35978 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
35979
35980
35981
35982   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
35983
35984
35985
35986   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
35987
35988
35989       :
35990
35991
35992
35993   :
35994
35995
35996
35997
35998   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
35999 if test "x$ac_cv_func_raise" = xyes
36000 then :
36001   printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
36002
36003 fi
36004
36005   if test $ac_cv_func_raise = no; then
36006     HAVE_RAISE=0
36007   else
36008
36009
36010       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
36011         REPLACE_RAISE=1
36012       fi
36013
36014
36015
36016
36017
36018   HAVE_POSIX_SIGNALBLOCKING=0
36019   if test "$gl_cv_type_sigset_t" = yes; then
36020     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
36021 if test "x$ac_cv_func_sigprocmask" = xyes
36022 then :
36023   HAVE_POSIX_SIGNALBLOCKING=1
36024 fi
36025
36026   fi
36027
36028       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
36029         :
36030       fi
36031
36032   fi
36033
36034
36035      if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
36036   GL_COND_OBJ_RAISE_TRUE=
36037   GL_COND_OBJ_RAISE_FALSE='#'
36038 else
36039   GL_COND_OBJ_RAISE_TRUE='#'
36040   GL_COND_OBJ_RAISE_FALSE=
36041 fi
36042 :
36043     if test -z "${GL_COND_OBJ_RAISE_TRUE}" && test -z "${GL_COND_OBJ_RAISE_FALSE}"; then
36044     GL_COND_OBJ_RAISE_TRUE='#'
36045     GL_COND_OBJ_RAISE_FALSE='#'
36046   fi
36047
36048   if test -z "$GL_COND_OBJ_RAISE_TRUE"; then :
36049
36050     :
36051
36052 fi
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062           GL_GNULIB_RAISE=1
36063
36064
36065
36066
36067
36068 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
36069
36070
36071
36072
36073
36074
36075
36076   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
36077 if test "x$ac_cv_func_rawmemchr" = xyes
36078 then :
36079   printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
36080
36081 fi
36082
36083   if test $ac_cv_func_rawmemchr = no; then
36084     HAVE_RAWMEMCHR=0
36085   fi
36086
36087
36088      if test $HAVE_RAWMEMCHR = 0; then
36089   GL_COND_OBJ_RAWMEMCHR_TRUE=
36090   GL_COND_OBJ_RAWMEMCHR_FALSE='#'
36091 else
36092   GL_COND_OBJ_RAWMEMCHR_TRUE='#'
36093   GL_COND_OBJ_RAWMEMCHR_FALSE=
36094 fi
36095 :
36096     if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
36097     GL_COND_OBJ_RAWMEMCHR_TRUE='#'
36098     GL_COND_OBJ_RAWMEMCHR_FALSE='#'
36099   fi
36100
36101   if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
36102
36103     :
36104
36105 fi
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120           GL_GNULIB_RAWMEMCHR=1
36121
36122
36123
36124
36125
36126 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
36127
36128
36129
36130
36131
36132
36133   if test $ac_cv_func_readlink = no; then
36134     HAVE_READLINK=0
36135   else
36136     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
36137 printf %s "checking whether readlink signature is correct... " >&6; }
36138 if test ${gl_cv_decl_readlink_works+y}
36139 then :
36140   printf %s "(cached) " >&6
36141 else case e in #(
36142   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36143 /* end confdefs.h.  */
36144 #include <unistd.h>
36145       /* Cause compilation failure if original declaration has wrong type.  */
36146       ssize_t readlink (const char *, char *, size_t);
36147 int
36148 main (void)
36149 {
36150
36151   ;
36152   return 0;
36153 }
36154 _ACEOF
36155 if ac_fn_c_try_compile "$LINENO"
36156 then :
36157   gl_cv_decl_readlink_works=yes
36158 else case e in #(
36159   e) gl_cv_decl_readlink_works=no ;;
36160 esac
36161 fi
36162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36163 esac
36164 fi
36165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
36166 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
36167             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
36168 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
36169 if test ${gl_cv_func_readlink_trailing_slash+y}
36170 then :
36171   printf %s "(cached) " >&6
36172 else case e in #(
36173   e) # We have readlink, so assume ln -s works.
36174        ln -s conftest.no-such conftest.link
36175        ln -s conftest.link conftest.lnk2
36176        if test "$cross_compiling" = yes
36177 then :
36178   case "$host_os" in
36179             # Guess yes on Linux or glibc systems.
36180             linux-* | linux | *-gnu* | gnu*)
36181               gl_cv_func_readlink_trailing_slash="guessing yes" ;;
36182             # Guess yes on systems that emulate the Linux system calls.
36183             midipix*)
36184               gl_cv_func_readlink_trailing_slash="guessing yes" ;;
36185             # Guess no on AIX or HP-UX.
36186             aix* | hpux*)
36187               gl_cv_func_readlink_trailing_slash="guessing no" ;;
36188             # If we don't know, obey --enable-cross-guesses.
36189             *)
36190               gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
36191           esac
36192
36193 else case e in #(
36194   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36195 /* end confdefs.h.  */
36196 #include <unistd.h>
36197
36198 int
36199 main (void)
36200 {
36201 char buf[20];
36202       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
36203   ;
36204   return 0;
36205 }
36206 _ACEOF
36207 if ac_fn_c_try_run "$LINENO"
36208 then :
36209   gl_cv_func_readlink_trailing_slash=yes
36210 else case e in #(
36211   e) gl_cv_func_readlink_trailing_slash=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 esac
36217 fi
36218
36219       rm -f conftest.link conftest.lnk2 ;;
36220 esac
36221 fi
36222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
36223 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
36224     case "$gl_cv_func_readlink_trailing_slash" in
36225       *yes)
36226         if test "$gl_cv_decl_readlink_works" != yes; then
36227           REPLACE_READLINK=1
36228         fi
36229         ;;
36230       *)
36231
36232 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
36233
36234         REPLACE_READLINK=1
36235         ;;
36236     esac
36237
36238     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
36239 printf %s "checking whether readlink truncates results correctly... " >&6; }
36240 if test ${gl_cv_func_readlink_truncate+y}
36241 then :
36242   printf %s "(cached) " >&6
36243 else case e in #(
36244   e) # We have readlink, so assume ln -s works.
36245        ln -s ab conftest.link
36246        if test "$cross_compiling" = yes
36247 then :
36248   case "$host_os" in
36249             # Guess yes on Linux or glibc systems.
36250             linux-* | linux | *-gnu* | gnu*)
36251               gl_cv_func_readlink_truncate="guessing yes" ;;
36252             # Guess yes on systems that emulate the Linux system calls.
36253             midipix*)
36254               gl_cv_func_readlink_truncate="guessing yes" ;;
36255             # Guess no on AIX or HP-UX.
36256             aix* | hpux*)
36257               gl_cv_func_readlink_truncate="guessing no" ;;
36258             # If we don't know, obey --enable-cross-guesses.
36259             *)
36260               gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
36261           esac
36262
36263 else case e in #(
36264   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36265 /* end confdefs.h.  */
36266 #include <unistd.h>
36267
36268 int
36269 main (void)
36270 {
36271 char c;
36272       return readlink ("conftest.link", &c, 1) != 1;
36273   ;
36274   return 0;
36275 }
36276 _ACEOF
36277 if ac_fn_c_try_run "$LINENO"
36278 then :
36279   gl_cv_func_readlink_truncate=yes
36280 else case e in #(
36281   e) gl_cv_func_readlink_truncate=no ;;
36282 esac
36283 fi
36284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36285   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36286 esac
36287 fi
36288
36289       rm -f conftest.link conftest.lnk2 ;;
36290 esac
36291 fi
36292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
36293 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
36294     case $gl_cv_func_readlink_truncate in
36295       *yes)
36296         if test "$gl_cv_decl_readlink_works" != yes; then
36297           REPLACE_READLINK=1
36298         fi
36299         ;;
36300       *)
36301
36302 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
36303
36304         REPLACE_READLINK=1
36305         ;;
36306     esac
36307   fi
36308
36309
36310      if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
36311   GL_COND_OBJ_READLINK_TRUE=
36312   GL_COND_OBJ_READLINK_FALSE='#'
36313 else
36314   GL_COND_OBJ_READLINK_TRUE='#'
36315   GL_COND_OBJ_READLINK_FALSE=
36316 fi
36317 :
36318     if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
36319     GL_COND_OBJ_READLINK_TRUE='#'
36320     GL_COND_OBJ_READLINK_FALSE='#'
36321   fi
36322
36323   if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
36324
36325
36326   :
36327
36328
36329 fi
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339           GL_GNULIB_READLINK=1
36340
36341
36342
36343
36344
36345 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
36346
36347
36348
36349
36350
36351
36352   if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
36353
36354     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
36355 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
36356 if test ${ac_cv_func_realloc_0_nonnull+y}
36357 then :
36358   printf %s "(cached) " >&6
36359 else case e in #(
36360   e) if test "$cross_compiling" = yes
36361 then :
36362   case "$host_os" in
36363           # Guess yes on platforms where we know the result.
36364           *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
36365           | gnu* | *-musl* | midipix* | midnightbsd* \
36366           | hpux* | solaris* | cygwin* | mingw* | msys* )
36367             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
36368           # If we don't know, obey --enable-cross-guesses.
36369           *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
36370         esac
36371
36372 else case e in #(
36373   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36374 /* end confdefs.h.  */
36375 #include <stdlib.h>
36376
36377 int
36378 main (void)
36379 {
36380 void *p = realloc (0, 0);
36381             int result = !p;
36382             free (p);
36383             return result;
36384   ;
36385   return 0;
36386 }
36387
36388 _ACEOF
36389 if ac_fn_c_try_run "$LINENO"
36390 then :
36391   ac_cv_func_realloc_0_nonnull=yes
36392 else case e in #(
36393   e) ac_cv_func_realloc_0_nonnull=no ;;
36394 esac
36395 fi
36396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36397   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36398 esac
36399 fi
36400
36401      ;;
36402 esac
36403 fi
36404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
36405 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
36406   case $ac_cv_func_realloc_0_nonnull in #(
36407   *yes) :
36408      ;; #(
36409   *) :
36410     REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;;
36411 esac
36412
36413   fi
36414
36415   if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
36416
36417
36418
36419
36420
36421
36422
36423
36424   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
36425
36426   fi
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436           GL_GNULIB_REALLOC_GNU=1
36437
36438
36439
36440
36441
36442 printf "%s\n" "#define GNULIB_TEST_REALLOC_GNU 1" >>confdefs.h
36443
36444
36445
36446
36447
36448
36449   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
36450     REPLACE_REALLOC_FOR_REALLOC_POSIX=1
36451   fi
36452
36453   if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
36454
36455
36456
36457
36458
36459
36460
36461
36462   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
36463
36464   fi
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474           GL_GNULIB_REALLOC_POSIX=1
36475
36476
36477
36478
36479
36480 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
36492 printf %s "checking for reallocarray... " >&6; }
36493 if test ${gl_cv_onwards_func_reallocarray+y}
36494 then :
36495   printf %s "(cached) " >&6
36496 else case e in #(
36497   e)
36498   exec 9>&6 6>/dev/null
36499
36500        case "$host_os" in
36501
36502          linux*-android*)
36503            ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "#include <stdlib.h>
36504 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36505 if test "x$ac_cv_have_decl_reallocarray" = xyes
36506 then :
36507
36508 fi
36509            if test $ac_cv_have_decl_reallocarray = yes; then
36510              ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
36511 if test "x$ac_cv_func_reallocarray" = xyes
36512 then :
36513
36514 fi
36515
36516              if test $ac_cv_func_reallocarray = yes; then
36517                gl_cv_onwards_func_reallocarray=yes
36518              else
36519                                                             gl_cv_onwards_func_reallocarray='future OS version'
36520              fi
36521            else
36522              gl_cv_onwards_func_reallocarray='future OS version'
36523            fi
36524            ;;
36525
36526
36527          *)
36528            ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
36529 if test "x$ac_cv_func_reallocarray" = xyes
36530 then :
36531
36532 fi
36533
36534            gl_cv_onwards_func_reallocarray=$ac_cv_func_reallocarray
36535            ;;
36536
36537        esac
36538
36539   exec 6>&9 9>&-
36540
36541      ;;
36542 esac
36543 fi
36544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_reallocarray" >&5
36545 printf "%s\n" "$gl_cv_onwards_func_reallocarray" >&6; }
36546
36547   case "$gl_cv_onwards_func_reallocarray" in
36548     future*) ac_cv_func_reallocarray=no ;;
36549     *)       ac_cv_func_reallocarray=$gl_cv_onwards_func_reallocarray ;;
36550   esac
36551   if test $ac_cv_func_reallocarray = yes; then
36552
36553 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
36554
36555   fi
36556
36557
36558   if test "$ac_cv_func_reallocarray" = no; then
36559     HAVE_REALLOCARRAY=0
36560     case "$gl_cv_onwards_func_reallocarray" in
36561       future*) REPLACE_REALLOCARRAY=1 ;;
36562     esac
36563   elif test "$gl_cv_malloc_ptrdiff" = no; then
36564     REPLACE_REALLOCARRAY=1
36565   fi
36566
36567
36568      if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
36569   GL_COND_OBJ_REALLOCARRAY_TRUE=
36570   GL_COND_OBJ_REALLOCARRAY_FALSE='#'
36571 else
36572   GL_COND_OBJ_REALLOCARRAY_TRUE='#'
36573   GL_COND_OBJ_REALLOCARRAY_FALSE=
36574 fi
36575 :
36576     if test -z "${GL_COND_OBJ_REALLOCARRAY_TRUE}" && test -z "${GL_COND_OBJ_REALLOCARRAY_FALSE}"; then
36577     GL_COND_OBJ_REALLOCARRAY_TRUE='#'
36578     GL_COND_OBJ_REALLOCARRAY_FALSE='#'
36579   fi
36580
36581   if test -z "$GL_COND_OBJ_REALLOCARRAY_TRUE"; then :
36582
36583     :
36584
36585 fi
36586
36587
36588 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600           GL_GNULIB_REALLOCARRAY=1
36601
36602
36603
36604
36605
36606 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
36607
36608
36609
36610
36611
36612 # Check whether --with-included-regex was given.
36613 if test ${with_included_regex+y}
36614 then :
36615   withval=$with_included_regex;
36616 fi
36617
36618
36619   case $with_included_regex in #(
36620   yes|no) ac_use_included_regex=$with_included_regex
36621         ;;
36622   '')
36623     # If the system regex support is good enough that it passes the
36624     # following run test, then default to *not* using the included regex.c.
36625     # If cross compiling, assume the test would fail and use the included
36626     # regex.c.
36627
36628
36629     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
36630 printf %s "checking for working re_compile_pattern... " >&6; }
36631 if test ${gl_cv_func_re_compile_pattern_working+y}
36632 then :
36633   printf %s "(cached) " >&6
36634 else case e in #(
36635   e) if test "$cross_compiling" = yes
36636 then :
36637   case "$host_os" in
36638                    # Guess no on native Windows.
36639            mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
36640                    # Otherwise obey --enable-cross-guesses.
36641            *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
36642          esac
36643
36644 else case e in #(
36645   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36646 /* end confdefs.h.  */
36647 #include <regex.h>
36648
36649             #include <locale.h>
36650             #include <limits.h>
36651             #include <string.h>
36652
36653             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
36654             # include <signal.h>
36655             # include <unistd.h>
36656             #endif
36657
36658             #if HAVE_MALLOC_H
36659             # include <malloc.h>
36660             #endif
36661
36662             #ifdef M_CHECK_ACTION
36663             /* Exit with distinguishable exit code.  */
36664             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
36665             #endif
36666
36667 int
36668 main (void)
36669 {
36670 int result = 0;
36671             static struct re_pattern_buffer regex;
36672             unsigned char folded_chars[UCHAR_MAX + 1];
36673             int i;
36674             const char *s;
36675             struct re_registers regs;
36676
36677             /* Some builds of glibc go into an infinite loop on this
36678                test.  Use alarm to force death, and mallopt to avoid
36679                malloc recursion in diagnosing the corrupted heap. */
36680 #if HAVE_DECL_ALARM
36681             signal (SIGALRM, SIG_DFL);
36682             alarm (2);
36683 #endif
36684 #ifdef M_CHECK_ACTION
36685             signal (SIGABRT, sigabrt_no_core);
36686             mallopt (M_CHECK_ACTION, 2);
36687 #endif
36688
36689             if (setlocale (LC_ALL, "en_US.UTF-8"))
36690               {
36691                 {
36692                   /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
36693                      This test needs valgrind to catch the bug on Debian
36694                      GNU/Linux 3.1 x86, but it might catch the bug better
36695                      on other platforms and it shouldn't hurt to try the
36696                      test here.  */
36697                   static char const pat[] = "insert into";
36698                   static char const data[] =
36699                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
36700                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
36701                                  | RE_ICASE);
36702                   memset (&regex, 0, sizeof regex);
36703                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
36704                   if (s)
36705                     result |= 1;
36706                   else
36707                     {
36708                       if (re_search (&regex, data, sizeof data - 1,
36709                                      0, sizeof data - 1, &regs)
36710                           != -1)
36711                         result |= 1;
36712                       regfree (&regex);
36713                     }
36714                 }
36715
36716                 {
36717                   /* This test is from glibc bug 15078.
36718                      The test case is from Andreas Schwab in
36719                      <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
36720                      */
36721                   static char const pat[] = "[^x]x";
36722                   static char const data[] =
36723                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
36724                     "\xe1\x80\x80"
36725                     "\xe1\x80\xbb"
36726                     "\xe1\x80\xbd"
36727                     "\xe1\x80\x94"
36728                     "\xe1\x80\xba"
36729                     "\xe1\x80\xaf"
36730                     "\xe1\x80\x95"
36731                     "\xe1\x80\xba"
36732                     "x";
36733                   re_set_syntax (0);
36734                   memset (&regex, 0, sizeof regex);
36735                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
36736                   if (s)
36737                     result |= 1;
36738                   else
36739                     {
36740                       i = re_search (&regex, data, sizeof data - 1,
36741                                      0, sizeof data - 1, 0);
36742                       if (i != 0 && i != 21)
36743                         result |= 1;
36744                       regfree (&regex);
36745                     }
36746                 }
36747
36748                 if (! setlocale (LC_ALL, "C"))
36749                   return 1;
36750               }
36751
36752             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
36753             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
36754             memset (&regex, 0, sizeof regex);
36755             s = re_compile_pattern ("a[^x]b", 6, &regex);
36756             if (s)
36757               result |= 2;
36758             else
36759               {
36760                 /* This should fail, but succeeds for glibc-2.5.  */
36761                 if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
36762                   result |= 2;
36763                 regfree (&regex);
36764               }
36765
36766             /* This regular expression is from Spencer ere test number 75
36767                in grep-2.3.  */
36768             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
36769             memset (&regex, 0, sizeof regex);
36770             for (i = 0; i <= UCHAR_MAX; i++)
36771               folded_chars[i] = i;
36772             regex.translate = folded_chars;
36773             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
36774             /* This should fail with _Invalid character class name_ error.  */
36775             if (!s)
36776               {
36777                 result |= 4;
36778                 regfree (&regex);
36779               }
36780
36781             /* Ensure that [b-a] is diagnosed as invalid, when
36782                using RE_NO_EMPTY_RANGES. */
36783             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
36784             memset (&regex, 0, sizeof regex);
36785             s = re_compile_pattern ("a[b-a]", 6, &regex);
36786             if (s == 0)
36787               {
36788                 result |= 8;
36789                 regfree (&regex);
36790               }
36791
36792             /* This should succeed, but does not for glibc-2.1.3.  */
36793             memset (&regex, 0, sizeof regex);
36794             s = re_compile_pattern ("{1", 2, &regex);
36795             if (s)
36796               result |= 8;
36797             else
36798               regfree (&regex);
36799
36800             /* The following example is derived from a problem report
36801                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
36802             memset (&regex, 0, sizeof regex);
36803             s = re_compile_pattern ("[an\371]*n", 7, &regex);
36804             if (s)
36805               result |= 8;
36806             else
36807               {
36808                 /* This should match, but does not for glibc-2.2.1.  */
36809                 if (re_match (&regex, "an", 2, 0, &regs) != 2)
36810                   result |= 8;
36811                 else
36812                   {
36813                     free (regs.start);
36814                     free (regs.end);
36815                   }
36816                 regfree (&regex);
36817               }
36818
36819             memset (&regex, 0, sizeof regex);
36820             s = re_compile_pattern ("x", 1, &regex);
36821             if (s)
36822               result |= 8;
36823             else
36824               {
36825                 /* glibc-2.2.93 does not work with a negative RANGE argument.  */
36826                 if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
36827                   result |= 8;
36828                 else
36829                   {
36830                     free (regs.start);
36831                     free (regs.end);
36832                   }
36833                 regfree (&regex);
36834               }
36835
36836             /* The version of regex.c in older versions of gnulib
36837                ignored RE_ICASE.  Detect that problem too.  */
36838             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
36839             memset (&regex, 0, sizeof regex);
36840             s = re_compile_pattern ("x", 1, &regex);
36841             if (s)
36842               result |= 16;
36843             else
36844               {
36845                 if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
36846                   result |= 16;
36847                 else
36848                   {
36849                     free (regs.start);
36850                     free (regs.end);
36851                   }
36852                 regfree (&regex);
36853               }
36854
36855             /* Catch a bug reported by Vin Shelton in
36856                https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
36857                */
36858             re_set_syntax (RE_SYNTAX_POSIX_BASIC
36859                            & ~RE_CONTEXT_INVALID_DUP
36860                            & ~RE_NO_EMPTY_RANGES);
36861             memset (&regex, 0, sizeof regex);
36862             s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
36863             if (s)
36864               result |= 32;
36865             else
36866               regfree (&regex);
36867
36868             /* REG_STARTEND was added to glibc on 2004-01-15.
36869                Reject older versions.  */
36870             if (! REG_STARTEND)
36871               result |= 64;
36872
36873             /* Matching with the compiled form of this regexp would provoke
36874                an assertion failure prior to glibc-2.28:
36875                  regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
36876                With glibc-2.28, compilation fails and reports the invalid
36877                back reference.  */
36878             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
36879             memset (&regex, 0, sizeof regex);
36880             s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
36881             if (!s)
36882               {
36883                 memset (&regs, 0, sizeof regs);
36884                 i = re_search (&regex, "x", 1, 0, 1, &regs);
36885                 if (i != -1)
36886                   result |= 64;
36887                 if (0 <= i)
36888                   {
36889                     free (regs.start);
36890                     free (regs.end);
36891                   }
36892                 regfree (&regex);
36893               }
36894             else
36895               {
36896                 if (strcmp (s, "Invalid back reference"))
36897                   result |= 64;
36898               }
36899
36900             /* glibc bug 11053.  */
36901             re_set_syntax (RE_SYNTAX_POSIX_BASIC);
36902             memset (&regex, 0, sizeof regex);
36903             static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
36904             s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
36905             if (s)
36906               result |= 64;
36907             else
36908               {
36909                 memset (&regs, 0, sizeof regs);
36910                 static char const data[] = "a";
36911                 int datalen = sizeof data - 1;
36912                 i = re_search (&regex, data, datalen, 0, datalen, &regs);
36913                 if (i != 0)
36914                   result |= 64;
36915                 else if (regs.num_regs < 2)
36916                   result |= 64;
36917                 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
36918                   result |= 64;
36919                 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
36920                   result |= 64;
36921                 regfree (&regex);
36922                 free (regs.start);
36923                 free (regs.end);
36924               }
36925
36926 #if 0
36927             /* It would be nice to reject hosts whose regoff_t values are too
36928                narrow (including glibc on hosts with 64-bit ptrdiff_t and
36929                32-bit int), but we should wait until glibc implements this
36930                feature.  Otherwise, support for equivalence classes and
36931                multibyte collation symbols would always be broken except
36932                when compiling --without-included-regex.   */
36933             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
36934                 || sizeof (regoff_t) < sizeof (ssize_t))
36935               result |= 64;
36936 #endif
36937
36938             return result;
36939
36940   ;
36941   return 0;
36942 }
36943 _ACEOF
36944 if ac_fn_c_try_run "$LINENO"
36945 then :
36946   gl_cv_func_re_compile_pattern_working=yes
36947 else case e in #(
36948   e) gl_cv_func_re_compile_pattern_working=no ;;
36949 esac
36950 fi
36951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36952   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36953 esac
36954 fi
36955
36956        ;;
36957 esac
36958 fi
36959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
36960 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
36961     case "$gl_cv_func_re_compile_pattern_working" in #(
36962       *yes) ac_use_included_regex=no;; #(
36963       *no) ac_use_included_regex=yes;;
36964     esac
36965     ;;
36966   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
36967     ;;
36968   esac
36969
36970   if test $ac_use_included_regex = yes; then
36971
36972 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
36973
36974
36975 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
36976
36977
36978 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
36979
36980
36981 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
36982
36983
36984 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
36985
36986
36987 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
36988
36989
36990 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
36991
36992
36993 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
36994
36995
36996 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
36997
36998
36999 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
37000
37001
37002 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
37003
37004
37005 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
37006
37007
37008 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
37009
37010
37011 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
37012
37013
37014 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
37015
37016
37017 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
37018
37019
37020 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
37021
37022   fi
37023
37024
37025      if test $ac_use_included_regex = yes; then
37026   GL_COND_OBJ_REGEX_TRUE=
37027   GL_COND_OBJ_REGEX_FALSE='#'
37028 else
37029   GL_COND_OBJ_REGEX_TRUE='#'
37030   GL_COND_OBJ_REGEX_FALSE=
37031 fi
37032 :
37033     if test -z "${GL_COND_OBJ_REGEX_TRUE}" && test -z "${GL_COND_OBJ_REGEX_FALSE}"; then
37034     GL_COND_OBJ_REGEX_TRUE='#'
37035     GL_COND_OBJ_REGEX_FALSE='#'
37036   fi
37037
37038   if test -z "$GL_COND_OBJ_REGEX_TRUE"; then :
37039
37040
37041
37042
37043
37044
37045
37046   ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
37047 if test "x$ac_cv_header_libintl_h" = xyes
37048 then :
37049   printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
37050
37051 fi
37052
37053
37054   ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
37055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37056 if test "x$ac_cv_have_decl_isblank" = xyes
37057 then :
37058   ac_have_decl=1
37059 else case e in #(
37060   e) ac_have_decl=0 ;;
37061 esac
37062 fi
37063 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
37064
37065
37066
37067 fi
37068
37069
37070      if test $ac_cv_func_setenv = no; then
37071     HAVE_SETENV=0
37072   else
37073     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
37074 printf %s "checking whether setenv validates arguments... " >&6; }
37075 if test ${gl_cv_func_setenv_works+y}
37076 then :
37077   printf %s "(cached) " >&6
37078 else case e in #(
37079   e) if test "$cross_compiling" = yes
37080 then :
37081   case "$host_os" in
37082                              # Guess yes on glibc systems.
37083          *-gnu* | gnu*)      gl_cv_func_setenv_works="guessing yes" ;;
37084                              # Guess yes on musl systems.
37085          *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
37086                              # If we don't know, obey --enable-cross-guesses.
37087          *)                  gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
37088        esac
37089
37090 else case e in #(
37091   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37092 /* end confdefs.h.  */
37093
37094        #include <stdlib.h>
37095        #include <errno.h>
37096        #include <string.h>
37097
37098 int
37099 main (void)
37100 {
37101
37102        int result = 0;
37103        {
37104          if (setenv ("", "", 0) != -1)
37105            result |= 1;
37106          else if (errno != EINVAL)
37107            result |= 2;
37108        }
37109        {
37110          if (setenv ("a", "=", 1) != 0)
37111            result |= 4;
37112          else if (strcmp (getenv ("a"), "=") != 0)
37113            result |= 8;
37114        }
37115        return result;
37116
37117   ;
37118   return 0;
37119 }
37120 _ACEOF
37121 if ac_fn_c_try_run "$LINENO"
37122 then :
37123   gl_cv_func_setenv_works=yes
37124 else case e in #(
37125   e) gl_cv_func_setenv_works=no ;;
37126 esac
37127 fi
37128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37129   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37130 esac
37131 fi
37132  ;;
37133 esac
37134 fi
37135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
37136 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
37137     case "$gl_cv_func_setenv_works" in
37138       *yes) ;;
37139       *)
37140         REPLACE_SETENV=1
37141         ;;
37142     esac
37143   fi
37144
37145
37146      if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
37147   GL_COND_OBJ_SETENV_TRUE=
37148   GL_COND_OBJ_SETENV_FALSE='#'
37149 else
37150   GL_COND_OBJ_SETENV_TRUE='#'
37151   GL_COND_OBJ_SETENV_FALSE=
37152 fi
37153 :
37154     if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
37155     GL_COND_OBJ_SETENV_TRUE='#'
37156     GL_COND_OBJ_SETENV_FALSE='#'
37157   fi
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168           GL_GNULIB_SETENV=1
37169
37170
37171
37172
37173
37174 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
37175
37176
37177
37178
37179
37180
37181
37182
37183   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
37184 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
37185 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
37186 then :
37187   printf %s "(cached) " >&6
37188 else case e in #(
37189   e) case "$host_os" in
37190        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
37191        *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
37192          gl_cv_func_setlocale_null_all_mtsafe=no ;;
37193        # Guess no on Cygwin < 3.4.6.
37194        cygwin*)
37195          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37196 /* end confdefs.h.  */
37197
37198 #if defined __CYGWIN__
37199  #include <cygwin/version.h>
37200  #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
37201   Lucky user
37202  #endif
37203 #endif
37204
37205 _ACEOF
37206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37207   $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
37208 then :
37209   gl_cv_func_setlocale_null_all_mtsafe=yes
37210 else case e in #(
37211   e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
37212 esac
37213 fi
37214 rm -rf conftest*
37215
37216         ;;
37217        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
37218        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
37219          gl_cv_func_setlocale_null_all_mtsafe=yes ;;
37220        # If we don't know, obey --enable-cross-guesses.
37221        *)
37222          gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
37223      esac
37224      ;;
37225 esac
37226 fi
37227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
37228 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
37229     case "$host_os" in
37230     mingw*) ;;
37231     *)
37232       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
37233         gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
37234       fi
37235       ;;
37236   esac
37237   case "$gl_cv_func_setlocale_null_all_mtsafe" in
37238     *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
37239     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
37240   esac
37241
37242 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
37243
37244
37245     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
37246 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
37247 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
37248 then :
37249   printf %s "(cached) " >&6
37250 else case e in #(
37251   e) case "$host_os" in
37252        # Guess no on OpenBSD, AIX.
37253        openbsd* | aix*)
37254          gl_cv_func_setlocale_null_one_mtsafe=no ;;
37255        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
37256        *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
37257          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
37258        # If we don't know, obey --enable-cross-guesses.
37259        *)
37260          gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
37261      esac
37262      ;;
37263 esac
37264 fi
37265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
37266 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
37267     case "$host_os" in
37268     mingw*) ;;
37269     *)
37270       if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
37271         gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
37272       fi
37273       ;;
37274   esac
37275   case "$gl_cv_func_setlocale_null_one_mtsafe" in
37276     *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
37277     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
37278   esac
37279
37280 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
37281
37282
37283     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
37284     case "$host_os" in
37285       mingw*) SETLOCALE_NULL_LIB= ;;
37286       *)
37287
37288
37289   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
37290 printf %s "checking whether imported symbols can be declared weak... " >&6; }
37291 if test ${gl_cv_have_weak+y}
37292 then :
37293   printf %s "(cached) " >&6
37294 else case e in #(
37295   e) case "$host_os" in
37296        cygwin* | mingw*)
37297                                              gl_cv_have_weak="guessing no"
37298          ;;
37299        *)
37300          gl_cv_have_weak=no
37301                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37302 /* end confdefs.h.  */
37303 extern void xyzzy ();
37304 #pragma weak xyzzy
37305 int
37306 main (void)
37307 {
37308 xyzzy();
37309   ;
37310   return 0;
37311 }
37312 _ACEOF
37313 if ac_fn_c_try_link "$LINENO"
37314 then :
37315   gl_cv_have_weak=maybe
37316 fi
37317 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37318     conftest$ac_exeext conftest.$ac_ext
37319          if test $gl_cv_have_weak = maybe; then
37320                                  if test "$cross_compiling" = yes
37321 then :
37322                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37323 /* end confdefs.h.  */
37324 #ifdef __ELF__
37325                  Extensible Linking Format
37326                  #endif
37327
37328 _ACEOF
37329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37330   $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
37331 then :
37332   gl_cv_have_weak="guessing yes"
37333 else case e in #(
37334   e) gl_cv_have_weak="guessing no" ;;
37335 esac
37336 fi
37337 rm -rf conftest*
37338
37339
37340 else case e in #(
37341   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37342 /* end confdefs.h.  */
37343
37344 #include <stdio.h>
37345 #pragma weak fputs
37346 int main ()
37347 {
37348   return (fputs == NULL);
37349 }
37350 _ACEOF
37351 if ac_fn_c_try_run "$LINENO"
37352 then :
37353   gl_cv_have_weak=yes
37354 else case e in #(
37355   e) gl_cv_have_weak=no ;;
37356 esac
37357 fi
37358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37359   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37360 esac
37361 fi
37362
37363          fi
37364          ;;
37365      esac
37366           case " $LDFLAGS " in
37367        *" -static "*) gl_cv_have_weak=no ;;
37368      esac
37369                     case "$gl_cv_have_weak" in
37370        *yes)
37371          case "$host_os" in
37372            freebsd* | dragonfly* | midnightbsd*)
37373              : > conftest1.c
37374              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
37375              cat <<EOF > conftest2.c
37376 #include <pthread.h>
37377 #pragma weak pthread_mutexattr_gettype
37378 int main ()
37379 {
37380   return (pthread_mutexattr_gettype != NULL);
37381 }
37382 EOF
37383              $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
37384                || gl_cv_have_weak=no
37385              rm -f conftest1.c libempty.so conftest2.c conftest
37386              ;;
37387          esac
37388          ;;
37389      esac
37390      ;;
37391 esac
37392 fi
37393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
37394 printf "%s\n" "$gl_cv_have_weak" >&6; }
37395   case "$gl_cv_have_weak" in
37396     *yes)
37397
37398 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
37399
37400       ;;
37401   esac
37402
37403         case "$gl_cv_have_weak" in
37404           *yes) SETLOCALE_NULL_LIB= ;;
37405           *)    SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
37406         esac
37407         ;;
37408     esac
37409   else
37410     SETLOCALE_NULL_LIB=
37411   fi
37412
37413     LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
37414
37415
37416
37417      if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
37418   GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
37419   GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
37420 else
37421   GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
37422   GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
37423 fi
37424 :
37425     if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
37426     GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
37427     GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
37428   fi
37429
37430   if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
37431
37432
37433
37434
37435   CFLAG_VISIBILITY=
37436   HAVE_VISIBILITY=0
37437   if test -n "$GCC"; then
37438                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
37439 printf %s "checking whether the -Werror option is usable... " >&6; }
37440 if test ${gl_cv_cc_vis_werror+y}
37441 then :
37442   printf %s "(cached) " >&6
37443 else case e in #(
37444   e) gl_save_CFLAGS="$CFLAGS"
37445        CFLAGS="$CFLAGS -Werror"
37446        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37447 /* end confdefs.h.  */
37448
37449 int
37450 main (void)
37451 {
37452
37453   ;
37454   return 0;
37455 }
37456 _ACEOF
37457 if ac_fn_c_try_compile "$LINENO"
37458 then :
37459   gl_cv_cc_vis_werror=yes
37460 else case e in #(
37461   e) gl_cv_cc_vis_werror=no ;;
37462 esac
37463 fi
37464 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37465        CFLAGS="$gl_save_CFLAGS"
37466        ;;
37467 esac
37468 fi
37469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
37470 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
37471         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
37472 printf %s "checking for simple visibility declarations... " >&6; }
37473 if test ${gl_cv_cc_visibility+y}
37474 then :
37475   printf %s "(cached) " >&6
37476 else case e in #(
37477   e) gl_save_CFLAGS="$CFLAGS"
37478        CFLAGS="$CFLAGS -fvisibility=hidden"
37479                                           if test $gl_cv_cc_vis_werror = yes; then
37480          CFLAGS="$CFLAGS -Werror"
37481        fi
37482        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37483 /* end confdefs.h.  */
37484 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
37485               extern __attribute__((__visibility__("default"))) int exportedvar;
37486               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
37487               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
37488               void dummyfunc (void);
37489               int hiddenvar;
37490               int exportedvar;
37491               int hiddenfunc (void) { return 51; }
37492               int exportedfunc (void) { return 1225736919; }
37493               void dummyfunc (void) {}
37494
37495 int
37496 main (void)
37497 {
37498
37499   ;
37500   return 0;
37501 }
37502 _ACEOF
37503 if ac_fn_c_try_compile "$LINENO"
37504 then :
37505   gl_cv_cc_visibility=yes
37506 else case e in #(
37507   e) gl_cv_cc_visibility=no ;;
37508 esac
37509 fi
37510 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37511        CFLAGS="$gl_save_CFLAGS"
37512        ;;
37513 esac
37514 fi
37515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
37516 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
37517     if test $gl_cv_cc_visibility = yes; then
37518       CFLAG_VISIBILITY="-fvisibility=hidden"
37519       HAVE_VISIBILITY=1
37520     fi
37521   fi
37522
37523
37524
37525 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
37526
37527
37528
37529
37530 fi
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540           GL_GNULIB_SETLOCALE_NULL=1
37541
37542
37543
37544
37545
37546 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561   HAVE_POSIX_SIGNALBLOCKING=0
37562   if test "$gl_cv_type_sigset_t" = yes; then
37563     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
37564 if test "x$ac_cv_func_sigprocmask" = xyes
37565 then :
37566   HAVE_POSIX_SIGNALBLOCKING=1
37567 fi
37568
37569   fi
37570
37571
37572      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
37573   GL_COND_OBJ_SIGPROCMASK_TRUE=
37574   GL_COND_OBJ_SIGPROCMASK_FALSE='#'
37575 else
37576   GL_COND_OBJ_SIGPROCMASK_TRUE='#'
37577   GL_COND_OBJ_SIGPROCMASK_FALSE=
37578 fi
37579 :
37580     if test -z "${GL_COND_OBJ_SIGPROCMASK_TRUE}" && test -z "${GL_COND_OBJ_SIGPROCMASK_FALSE}"; then
37581     GL_COND_OBJ_SIGPROCMASK_TRUE='#'
37582     GL_COND_OBJ_SIGPROCMASK_FALSE='#'
37583   fi
37584
37585   if test -z "$GL_COND_OBJ_SIGPROCMASK_TRUE"; then :
37586
37587     :
37588
37589 fi
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599           GL_GNULIB_SIGPROCMASK=1
37600
37601
37602
37603
37604
37605 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
37606
37607
37608
37609
37610   if test $gl_sigsegv_uses_libsigsegv = yes; then
37611     GL_GENERATE_SIGSEGV_H=false
37612   else
37613     GL_GENERATE_SIGSEGV_H=true
37614   fi
37615
37616
37617
37618
37619   case "$GL_GENERATE_SIGSEGV_H" in
37620     false) SIGSEGV_H='' ;;
37621     true)
37622                   if test -z "$SIGSEGV_H"; then
37623         SIGSEGV_H="${gl_source_base_prefix}sigsegv.h"
37624       fi
37625       ;;
37626     *) echo "*** GL_GENERATE_SIGSEGV_H is not set correctly" 1>&2; exit 1 ;;
37627   esac
37628
37629
37630      if $GL_GENERATE_SIGSEGV_H; then
37631   GL_GENERATE_SIGSEGV_H_TRUE=
37632   GL_GENERATE_SIGSEGV_H_FALSE='#'
37633 else
37634   GL_GENERATE_SIGSEGV_H_TRUE='#'
37635   GL_GENERATE_SIGSEGV_H_FALSE=
37636 fi
37637 :
37638     if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
37639     GL_GENERATE_SIGSEGV_H_TRUE='#'
37640     GL_GENERATE_SIGSEGV_H_FALSE='#'
37641   fi
37642
37643
37644
37645
37646
37647
37648   if $GL_GENERATE_SIGSEGV_H; then
37649
37650
37651
37652     case "$host_os" in
37653       solaris2.11)
37654
37655 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
37656
37657         ;;
37658     esac
37659
37660
37661
37662   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
37663 printf %s "checking for stack direction... " >&6; }
37664 if test ${sv_cv_stack_direction_msg+y}
37665 then :
37666   printf %s "(cached) " >&6
37667 else case e in #(
37668   e)
37669     case "$host_cpu" in
37670             a29k | \
37671       aarch64* | \
37672       alpha* | \
37673       arc | arceb | arc32 | arc64 | \
37674       arm* | strongarm* | xscale* | \
37675       avr | avr32 | \
37676       bfin | \
37677       c1 | c2 | c32 | c34 | c38 | \
37678       clipper | \
37679       cr16 | \
37680       cris | \
37681       csky | \
37682       d30v | \
37683       epiphany | \
37684       elxsi | \
37685       fr30 | \
37686       frv | \
37687       ft32 | \
37688       h8300 | \
37689       i?86 | x86_64 | \
37690       i860 | \
37691       ia64 | \
37692       iq2000 | \
37693       lm32 | \
37694       loongarch* | \
37695       m32c | \
37696       m32r | \
37697       m68* | \
37698       m88k | \
37699       mcore | \
37700       microblaze* | \
37701       mips* | \
37702       mmix | \
37703       mn10200 | \
37704       mn10300 | \
37705       moxie | \
37706       msp430 | \
37707       nds32* | \
37708       nios2 | nios2eb | nios2el | \
37709       ns32k | \
37710       nvptx | \
37711       or1k | \
37712       pdp11 | \
37713       pj* | \
37714       powerpc* | rs6000 | \
37715       pru | \
37716       riscv* | \
37717       rl78 | \
37718       romp | \
37719       rx | \
37720       s390* | \
37721       sh* | \
37722       sparc* | \
37723       tic6x | \
37724       tilegx | \
37725       tilepro | \
37726       v850 | \
37727       vax | \
37728       visium | \
37729       xtensa)
37730         sv_cv_stack_direction=-1 ;;
37731       c4x | \
37732       dsp16xx | \
37733       i960 | \
37734       hppa* | parisc* | \
37735       stormy16 | \
37736       we32k)
37737         sv_cv_stack_direction=1 ;;
37738       *)
37739         if test $cross_compiling = no; then
37740           cat > conftest.c <<EOF
37741 #include <stdio.h>
37742 int
37743 find_stack_direction (int *addr, int depth)
37744 {
37745   int dir, dummy = 0;
37746   if (! addr)
37747     addr = &dummy;
37748   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
37749   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
37750   return dir + dummy;
37751 }
37752 int
37753 main (int argc, char *argv[])
37754 {
37755   printf ("%d\n", find_stack_direction (NULL, argc + 20));
37756   return 0;
37757 }
37758 EOF
37759           { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37760   (eval $ac_link) 2>&5
37761   ac_status=$?
37762   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37763   test $ac_status = 0; }
37764           sv_cv_stack_direction=`./conftest`
37765         else
37766           sv_cv_stack_direction=0
37767         fi
37768         ;;
37769     esac
37770     case $sv_cv_stack_direction in
37771       1)  sv_cv_stack_direction_msg="grows up";;
37772       -1) sv_cv_stack_direction_msg="grows down";;
37773       *)  sv_cv_stack_direction_msg="unknown";;
37774     esac
37775    ;;
37776 esac
37777 fi
37778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
37779 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
37780
37781 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
37782
37783
37784
37785
37786
37787
37788
37789
37790   if test "$ac_cv_func_sigaltstack" = yes; then
37791     ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
37792 #include <signal.h>
37793 #if HAVE_SYS_SIGNAL_H
37794 # include <sys/signal.h>
37795 #endif
37796
37797 "
37798 if test "x$ac_cv_type_stack_t" = xyes
37799 then :
37800
37801 else case e in #(
37802   e)
37803 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
37804
37805        ;;
37806 esac
37807 fi
37808
37809   fi
37810
37811   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
37812 printf %s "checking for working sigaltstack... " >&6; }
37813 if test ${sv_cv_sigaltstack+y}
37814 then :
37815   printf %s "(cached) " >&6
37816 else case e in #(
37817   e)
37818     if test "$ac_cv_func_sigaltstack" = yes; then
37819       case "$host_os" in
37820         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
37821           # On MacOS X 10.2 or newer, just assume that if it compiles, it will
37822           # work. If we were to perform the real test, 1 Crash Report dialog
37823           # window would pop up.
37824           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37825 /* end confdefs.h.  */
37826
37827             #include <signal.h>
37828 int
37829 main (void)
37830 {
37831 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
37832   ;
37833   return 0;
37834 }
37835 _ACEOF
37836 if ac_fn_c_try_link "$LINENO"
37837 then :
37838   sv_cv_sigaltstack="guessing yes"
37839 else case e in #(
37840   e) sv_cv_sigaltstack=no ;;
37841 esac
37842 fi
37843 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37844     conftest$ac_exeext conftest.$ac_ext
37845           ;;
37846         *)
37847           if test "$cross_compiling" = yes
37848 then :
37849
37850                             case "$host_os" in
37851                 *)
37852                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37853 /* end confdefs.h.  */
37854
37855                     #include <signal.h>
37856 int
37857 main (void)
37858 {
37859 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
37860   ;
37861   return 0;
37862 }
37863 _ACEOF
37864 if ac_fn_c_try_link "$LINENO"
37865 then :
37866   sv_cv_sigaltstack="guessing yes"
37867 else case e in #(
37868   e) sv_cv_sigaltstack=no ;;
37869 esac
37870 fi
37871 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37872     conftest$ac_exeext conftest.$ac_ext
37873                   ;;
37874               esac
37875
37876 else case e in #(
37877   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37878 /* end confdefs.h.  */
37879
37880
37881 #include <stdlib.h>
37882 #include <signal.h>
37883 #if HAVE_SYS_SIGNAL_H
37884 # include <sys/signal.h>
37885 #endif
37886 #if HAVE_SETRLIMIT
37887 # include <sys/types.h>
37888 # include <sys/time.h>
37889 # include <sys/resource.h>
37890 #endif
37891 void stackoverflow_handler (int sig)
37892 {
37893   /* If we get here, the stack overflow was caught.  */
37894   exit (0);
37895 }
37896 volatile int * recurse_1 (volatile int n, volatile int *p)
37897 {
37898   if (n >= 0)
37899     *recurse_1 (n + 1, p) += n;
37900   return p;
37901 }
37902 int recurse (volatile int n)
37903 {
37904   int sum = 0;
37905   return *recurse_1 (n, &sum);
37906 }
37907 char mystack[2 * (1 << 24)];
37908 int main ()
37909 {
37910   stack_t altstack;
37911   struct sigaction action;
37912 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
37913   /* Before starting the endless recursion, try to be friendly to the user's
37914      machine.  On some Linux 2.2.x systems, there is no stack limit for user
37915      processes at all.  We don't want to kill such systems.  */
37916   struct rlimit rl;
37917   rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
37918   setrlimit (RLIMIT_STACK, &rl);
37919 #endif
37920   /* Install the alternate stack.  Use the midpoint of mystack, to guard
37921      against a buggy interpretation of ss_sp on IRIX.  */
37922 #ifdef SIGSTKSZ
37923   if (sizeof mystack / 2 < SIGSTKSZ)
37924     exit (3);
37925 #endif
37926   altstack.ss_sp = mystack + sizeof mystack / 2;
37927   altstack.ss_size = sizeof mystack / 2;
37928   altstack.ss_flags = 0; /* no SS_DISABLE */
37929   if (sigaltstack (&altstack, NULL) < 0)
37930     exit (1);
37931   /* Install the SIGSEGV handler.  */
37932   sigemptyset (&action.sa_mask);
37933   action.sa_handler = &stackoverflow_handler;
37934   action.sa_flags = SA_ONSTACK;
37935   sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
37936   sigaction (SIGBUS, &action, (struct sigaction *) NULL);
37937   /* Provoke a stack overflow.  */
37938   recurse (0);
37939   exit (2);
37940 }
37941 _ACEOF
37942 if ac_fn_c_try_run "$LINENO"
37943 then :
37944   sv_cv_sigaltstack=yes
37945 else case e in #(
37946   e) sv_cv_sigaltstack=no ;;
37947 esac
37948 fi
37949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37950   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37951 esac
37952 fi
37953
37954           ;;
37955       esac
37956     else
37957       sv_cv_sigaltstack=no
37958     fi
37959    ;;
37960 esac
37961 fi
37962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
37963 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
37964   if test "$sv_cv_sigaltstack" != no; then
37965
37966 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
37967
37968
37969                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
37970 printf %s "checking for correct stack_t interpretation... " >&6; }
37971 if test ${sv_cv_sigaltstack_low_base+y}
37972 then :
37973   printf %s "(cached) " >&6
37974 else case e in #(
37975   e)
37976       if test "$cross_compiling" = yes
37977 then :
37978
37979                 case "$host_os" in
37980           irix5*) sv_cv_sigaltstack_low_base="no" ;;
37981           *)      sv_cv_sigaltstack_low_base="guessing yes" ;;
37982         esac
37983
37984 else case e in #(
37985   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37986 /* end confdefs.h.  */
37987
37988
37989 #include <stdlib.h>
37990 #include <signal.h>
37991 #if HAVE_SYS_SIGNAL_H
37992 # include <sys/signal.h>
37993 #endif
37994 volatile char *stack_lower_bound;
37995 volatile char *stack_upper_bound;
37996 static void check_stack_location (volatile char *addr)
37997 {
37998   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
37999     exit (0);
38000   else
38001     exit (1);
38002 }
38003 static void stackoverflow_handler (int sig)
38004 {
38005   char dummy;
38006   check_stack_location (&dummy);
38007 }
38008 char mystack[2 * (1 << 24)];
38009 int main ()
38010 {
38011   stack_t altstack;
38012   struct sigaction action;
38013   /* Install the alternate stack.  */
38014   altstack.ss_sp = mystack + sizeof mystack / 2;
38015   altstack.ss_size = sizeof mystack / 2;
38016   stack_lower_bound = (char *) altstack.ss_sp;
38017   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
38018   altstack.ss_flags = 0; /* no SS_DISABLE */
38019   if (sigaltstack (&altstack, NULL) < 0)
38020     exit (2);
38021   /* Install the SIGSEGV handler.  */
38022   sigemptyset (&action.sa_mask);
38023   action.sa_handler = &stackoverflow_handler;
38024   action.sa_flags = SA_ONSTACK;
38025   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
38026     exit(3);
38027   /* Provoke a SIGSEGV.  */
38028   raise (SIGSEGV);
38029   exit (3);
38030 }
38031 _ACEOF
38032 if ac_fn_c_try_run "$LINENO"
38033 then :
38034   sv_cv_sigaltstack_low_base=yes
38035 else case e in #(
38036   e) sv_cv_sigaltstack_low_base=no ;;
38037 esac
38038 fi
38039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38040   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38041 esac
38042 fi
38043
38044      ;;
38045 esac
38046 fi
38047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
38048 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
38049     if test "$sv_cv_sigaltstack_low_base" = no; then
38050
38051 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
38052
38053     fi
38054   fi
38055
38056
38057   fi
38058
38059   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
38060 printf %s "checking for ssize_t... " >&6; }
38061 if test ${gt_cv_ssize_t+y}
38062 then :
38063   printf %s "(cached) " >&6
38064 else case e in #(
38065   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38066 /* end confdefs.h.  */
38067 #include <sys/types.h>
38068 int
38069 main (void)
38070 {
38071 int x = sizeof (ssize_t *) + sizeof (ssize_t);
38072             return !x;
38073   ;
38074   return 0;
38075 }
38076 _ACEOF
38077 if ac_fn_c_try_compile "$LINENO"
38078 then :
38079   gt_cv_ssize_t=yes
38080 else case e in #(
38081   e) gt_cv_ssize_t=no ;;
38082 esac
38083 fi
38084 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38085 esac
38086 fi
38087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
38088 printf "%s\n" "$gt_cv_ssize_t" >&6; }
38089   if test $gt_cv_ssize_t = no; then
38090
38091 printf "%s\n" "#define ssize_t int" >>confdefs.h
38092
38093   fi
38094
38095
38096
38097
38098
38099   case "$host_os" in
38100     mingw*)
38101                   REPLACE_STAT=1
38102       ;;
38103     *)
38104                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
38105 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
38106 if test ${gl_cv_func_stat_file_slash+y}
38107 then :
38108   printf %s "(cached) " >&6
38109 else case e in #(
38110   e) touch conftest.tmp
38111          # Assume that if we have lstat, we can also check symlinks.
38112          if test $ac_cv_func_lstat = yes; then
38113            ln -s conftest.tmp conftest.lnk
38114          fi
38115          if test "$cross_compiling" = yes
38116 then :
38117   case "$host_os" in
38118                                # Guess yes on Linux systems.
38119               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
38120                                # Guess yes on systems that emulate the Linux system calls.
38121               midipix*)        gl_cv_func_stat_file_slash="guessing yes" ;;
38122                                # Guess yes on glibc systems.
38123               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
38124                                # If we don't know, obey --enable-cross-guesses.
38125               *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
38126             esac
38127
38128 else case e in #(
38129   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38130 /* end confdefs.h.  */
38131 #include <sys/stat.h>
38132
38133 int
38134 main (void)
38135 {
38136 int result = 0;
38137                struct stat st;
38138                if (!stat ("conftest.tmp/", &st))
38139                  result |= 1;
38140 #if HAVE_LSTAT
38141                if (!stat ("conftest.lnk/", &st))
38142                  result |= 2;
38143 #endif
38144                return result;
38145
38146   ;
38147   return 0;
38148 }
38149 _ACEOF
38150 if ac_fn_c_try_run "$LINENO"
38151 then :
38152   gl_cv_func_stat_file_slash=yes
38153 else case e in #(
38154   e) gl_cv_func_stat_file_slash=no ;;
38155 esac
38156 fi
38157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38158   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38159 esac
38160 fi
38161
38162          rm -f conftest.tmp conftest.lnk ;;
38163 esac
38164 fi
38165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
38166 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
38167       case $gl_cv_func_stat_file_slash in
38168         *no)
38169           REPLACE_STAT=1
38170
38171 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
38172 ;;
38173       esac
38174       case $host_os in
38175                 solaris*)
38176           REPLACE_FSTAT=1 ;;
38177       esac
38178       ;;
38179   esac
38180
38181
38182      if test $REPLACE_STAT = 1; then
38183   GL_COND_OBJ_STAT_TRUE=
38184   GL_COND_OBJ_STAT_FALSE='#'
38185 else
38186   GL_COND_OBJ_STAT_TRUE='#'
38187   GL_COND_OBJ_STAT_FALSE=
38188 fi
38189 :
38190     if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
38191     GL_COND_OBJ_STAT_TRUE='#'
38192     GL_COND_OBJ_STAT_FALSE='#'
38193   fi
38194
38195   if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
38196
38197     case "$host_os" in
38198       mingw*)
38199
38200
38201
38202
38203
38204
38205
38206
38207   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
38208
38209         ;;
38210     esac
38211
38212
38213
38214   :
38215
38216
38217 fi
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227           GL_GNULIB_STAT=1
38228
38229
38230
38231
38232
38233 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
38234
38235
38236
38237
38238
38239
38240
38241   ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
38242      #include <sys/stat.h>
38243 "
38244 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
38245 then :
38246
38247 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
38248
38249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
38250 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
38251 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
38252 then :
38253   printf %s "(cached) " >&6
38254 else case e in #(
38255   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38256 /* end confdefs.h.  */
38257
38258             #include <sys/types.h>
38259             #include <sys/stat.h>
38260             #if HAVE_SYS_TIME_H
38261             # include <sys/time.h>
38262             #endif
38263             #include <time.h>
38264             struct timespec ts;
38265             struct stat st;
38266
38267 int
38268 main (void)
38269 {
38270
38271             st.st_atim = ts;
38272
38273   ;
38274   return 0;
38275 }
38276 _ACEOF
38277 if ac_fn_c_try_compile "$LINENO"
38278 then :
38279   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
38280 else case e in #(
38281   e) ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no ;;
38282 esac
38283 fi
38284 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38285 esac
38286 fi
38287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
38288 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
38289      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
38290
38291 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
38292
38293      fi
38294 else case e in #(
38295   e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
38296         #include <sys/stat.h>
38297 "
38298 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
38299 then :
38300
38301 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
38302
38303
38304 else case e in #(
38305   e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
38306            #include <sys/stat.h>
38307 "
38308 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
38309 then :
38310
38311 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
38312
38313
38314 else case e in #(
38315   e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
38316               #include <sys/stat.h>
38317 "
38318 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
38319 then :
38320
38321 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
38322
38323
38324 fi
38325  ;;
38326 esac
38327 fi
38328  ;;
38329 esac
38330 fi
38331  ;;
38332 esac
38333 fi
38334
38335
38336
38337
38338
38339   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
38340      #include <sys/stat.h>
38341 "
38342 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
38343 then :
38344
38345 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
38346
38347
38348 else case e in #(
38349   e) ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
38350         #include <sys/stat.h>
38351 "
38352 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
38353 then :
38354
38355 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
38356
38357
38358 else case e in #(
38359   e) ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
38360           #include <sys/stat.h>
38361 "
38362 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
38363 then :
38364
38365 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
38366
38367
38368 fi
38369  ;;
38370 esac
38371 fi
38372  ;;
38373 esac
38374 fi
38375
38376
38377
38378   GL_GENERATE_STDARG_H=false
38379   NEXT_STDARG_H='<stdarg.h>'
38380   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
38381 printf %s "checking for va_copy... " >&6; }
38382 if test ${gl_cv_func_va_copy+y}
38383 then :
38384   printf %s "(cached) " >&6
38385 else case e in #(
38386   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38387 /* end confdefs.h.  */
38388 #include <stdarg.h>
38389 int
38390 main (void)
38391 {
38392
38393 #ifndef va_copy
38394 void (*func) (va_list, va_list) = va_copy;
38395 #endif
38396
38397   ;
38398   return 0;
38399 }
38400 _ACEOF
38401 if ac_fn_c_try_compile "$LINENO"
38402 then :
38403   gl_cv_func_va_copy=yes
38404 else case e in #(
38405   e) gl_cv_func_va_copy=no ;;
38406 esac
38407 fi
38408 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38409      ;;
38410 esac
38411 fi
38412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
38413 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
38414   if test $gl_cv_func_va_copy = no; then
38415                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38416 /* end confdefs.h.  */
38417 #if defined _AIX && !defined __GNUC__
38418         AIX vaccine
38419        #endif
38420
38421 _ACEOF
38422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38423   $EGREP_TRADITIONAL "vaccine" >/dev/null 2>&1
38424 then :
38425   gl_aixcc=yes
38426 else case e in #(
38427   e) gl_aixcc=no ;;
38428 esac
38429 fi
38430 rm -rf conftest*
38431
38432     if test $gl_aixcc = yes; then
38433             GL_GENERATE_STDARG_H=true
38434
38435
38436
38437
38438
38439
38440
38441
38442      if test $gl_cv_have_include_next = yes; then
38443        gl_cv_next_stdarg_h='<'stdarg.h'>'
38444      else
38445        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
38446 printf %s "checking absolute name of <stdarg.h>... " >&6; }
38447 if test ${gl_cv_next_stdarg_h+y}
38448 then :
38449   printf %s "(cached) " >&6
38450 else case e in #(
38451   e)
38452
38453
38454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38455 /* end confdefs.h.  */
38456 #include <stdarg.h>
38457 _ACEOF
38458                 case "$host_os" in
38459     aix*) gl_absname_cpp="$ac_cpp -C" ;;
38460     *)    gl_absname_cpp="$ac_cpp" ;;
38461   esac
38462
38463   case "$host_os" in
38464     mingw*)
38465                                           gl_dirsep_regex='[/\\]'
38466       ;;
38467     *)
38468       gl_dirsep_regex='\/'
38469       ;;
38470   esac
38471       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38472   gl_header_literal_regex=`echo 'stdarg.h' \
38473                            | sed -e "$gl_make_literal_regex_sed"`
38474   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38475       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38476       s|^/[^/]|//&|
38477       p
38478       q
38479     }'
38480
38481         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38482   sed -n "$gl_absolute_header_sed"`
38483
38484           gl_header=$gl_cv_absolute_stdarg_h
38485           gl_cv_next_stdarg_h='"'$gl_header'"'
38486
38487           ;;
38488 esac
38489 fi
38490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
38491 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
38492      fi
38493      NEXT_STDARG_H=$gl_cv_next_stdarg_h
38494
38495      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38496        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38497        gl_next_as_first_directive='<'stdarg.h'>'
38498      else
38499        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38500        gl_next_as_first_directive=$gl_cv_next_stdarg_h
38501      fi
38502      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
38503
38504
38505
38506
38507             if test "$gl_cv_next_stdarg_h" = '""'; then
38508         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
38509         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
38510       fi
38511     else
38512
38513
38514   exec 9>&6 6>/dev/null
38515
38516     if test ${gl_cv_func___va_copy+y}
38517 then :
38518   printf %s "(cached) " >&6
38519 else case e in #(
38520   e)
38521         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38522 /* end confdefs.h.  */
38523 #include <stdarg.h>
38524 int
38525 main (void)
38526 {
38527
38528 #ifndef __va_copy
38529 error, bail out
38530 #endif
38531
38532   ;
38533   return 0;
38534 }
38535 _ACEOF
38536 if ac_fn_c_try_compile "$LINENO"
38537 then :
38538   gl_cv_func___va_copy=yes
38539 else case e in #(
38540   e) gl_cv_func___va_copy=no ;;
38541 esac
38542 fi
38543 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38544 esac
38545 fi
38546
38547
38548   exec 6>&9 9>&-
38549
38550
38551       if test $gl_cv_func___va_copy = yes; then
38552
38553 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
38554
38555       else
38556
38557
38558 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
38559
38560       fi
38561     fi
38562   fi
38563
38564
38565
38566
38567
38568
38569   case "$GL_GENERATE_STDARG_H" in
38570     false) STDARG_H='' ;;
38571     true)
38572                   if test -z "$STDARG_H"; then
38573         STDARG_H="${gl_source_base_prefix}stdarg.h"
38574       fi
38575       ;;
38576     *) echo "*** GL_GENERATE_STDARG_H is not set correctly" 1>&2; exit 1 ;;
38577   esac
38578
38579
38580      if $GL_GENERATE_STDARG_H; then
38581   GL_GENERATE_STDARG_H_TRUE=
38582   GL_GENERATE_STDARG_H_FALSE='#'
38583 else
38584   GL_GENERATE_STDARG_H_TRUE='#'
38585   GL_GENERATE_STDARG_H_FALSE=
38586 fi
38587 :
38588     if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
38589     GL_GENERATE_STDARG_H_TRUE='#'
38590     GL_GENERATE_STDARG_H_FALSE='#'
38591   fi
38592
38593
38594
38595
38596
38597
38598
38599   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5
38600 printf %s "checking for bool, true, false... " >&6; }
38601 if test ${gl_cv_c_bool+y}
38602 then :
38603   printf %s "(cached) " >&6
38604 else case e in #(
38605   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38606 /* end confdefs.h.  */
38607
38608           #if true == false
38609            #error "true == false"
38610           #endif
38611           extern bool b;
38612           bool b = true == false;
38613 _ACEOF
38614 if ac_fn_c_try_compile "$LINENO"
38615 then :
38616   gl_cv_c_bool=yes
38617 else case e in #(
38618   e) gl_cv_c_bool=no ;;
38619 esac
38620 fi
38621 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38622 esac
38623 fi
38624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5
38625 printf "%s\n" "$gl_cv_c_bool" >&6; }
38626   if test "$gl_cv_c_bool" = yes; then
38627
38628 printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h
38629
38630   fi
38631
38632
38633
38634
38635
38636
38637   if test $ac_cv_header_stdckdint_h = yes; then
38638     GL_GENERATE_STDCKDINT_H=false
38639   else
38640     GL_GENERATE_STDCKDINT_H=true
38641   fi
38642
38643
38644
38645
38646   case "$GL_GENERATE_STDCKDINT_H" in
38647     false) STDCKDINT_H='' ;;
38648     true)
38649                   if test -z "$STDCKDINT_H"; then
38650         STDCKDINT_H="${gl_source_base_prefix}stdckdint.h"
38651       fi
38652       ;;
38653     *) echo "*** GL_GENERATE_STDCKDINT_H is not set correctly" 1>&2; exit 1 ;;
38654   esac
38655
38656
38657      if $GL_GENERATE_STDCKDINT_H; then
38658   GL_GENERATE_STDCKDINT_H_TRUE=
38659   GL_GENERATE_STDCKDINT_H_FALSE='#'
38660 else
38661   GL_GENERATE_STDCKDINT_H_TRUE='#'
38662   GL_GENERATE_STDCKDINT_H_FALSE=
38663 fi
38664 :
38665     if test -z "${GL_GENERATE_STDCKDINT_H_TRUE}" && test -z "${GL_GENERATE_STDCKDINT_H_FALSE}"; then
38666     GL_GENERATE_STDCKDINT_H_TRUE='#'
38667     GL_GENERATE_STDCKDINT_H_FALSE='#'
38668   fi
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685   case "$GL_GENERATE_STDDEF_H" in
38686     false) STDDEF_H='' ;;
38687     true)
38688                   if test -z "$STDDEF_H"; then
38689         STDDEF_H="${gl_source_base_prefix}stddef.h"
38690       fi
38691       ;;
38692     *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
38693   esac
38694
38695
38696      if $GL_GENERATE_STDDEF_H; then
38697   GL_GENERATE_STDDEF_H_TRUE=
38698   GL_GENERATE_STDDEF_H_FALSE='#'
38699 else
38700   GL_GENERATE_STDDEF_H_TRUE='#'
38701   GL_GENERATE_STDDEF_H_FALSE=
38702 fi
38703 :
38704     if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38705     GL_GENERATE_STDDEF_H_TRUE='#'
38706     GL_GENERATE_STDDEF_H_FALSE='#'
38707   fi
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719   case "$GL_GENERATE_STDINT_H" in
38720     false) STDINT_H='' ;;
38721     true)
38722                   if test -z "$STDINT_H"; then
38723         STDINT_H="${gl_source_base_prefix}stdint.h"
38724       fi
38725       ;;
38726     *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
38727   esac
38728
38729
38730      if $GL_GENERATE_STDINT_H; then
38731   GL_GENERATE_STDINT_H_TRUE=
38732   GL_GENERATE_STDINT_H_FALSE='#'
38733 else
38734   GL_GENERATE_STDINT_H_TRUE='#'
38735   GL_GENERATE_STDINT_H_FALSE=
38736 fi
38737 :
38738     if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
38739     GL_GENERATE_STDINT_H_TRUE='#'
38740     GL_GENERATE_STDINT_H_FALSE='#'
38741   fi
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751   case "$GL_GENERATE_LIMITS_H" in
38752     false) LIMITS_H='' ;;
38753     true)
38754                   if test -z "$LIMITS_H"; then
38755         LIMITS_H="${gl_source_base_prefix}limits.h"
38756       fi
38757       ;;
38758     *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
38759   esac
38760
38761
38762      if $GL_GENERATE_LIMITS_H; then
38763   GL_GENERATE_LIMITS_H_TRUE=
38764   GL_GENERATE_LIMITS_H_FALSE='#'
38765 else
38766   GL_GENERATE_LIMITS_H_TRUE='#'
38767   GL_GENERATE_LIMITS_H_FALSE=
38768 fi
38769 :
38770     if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
38771     GL_GENERATE_LIMITS_H_TRUE='#'
38772     GL_GENERATE_LIMITS_H_FALSE='#'
38773   fi
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788      if test $REPLACE_STDIO_READ_FUNCS = 1; then
38789   GL_COND_OBJ_STDIO_READ_TRUE=
38790   GL_COND_OBJ_STDIO_READ_FALSE='#'
38791 else
38792   GL_COND_OBJ_STDIO_READ_TRUE='#'
38793   GL_COND_OBJ_STDIO_READ_FALSE=
38794 fi
38795 :
38796     if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
38797     GL_COND_OBJ_STDIO_READ_TRUE='#'
38798     GL_COND_OBJ_STDIO_READ_FALSE='#'
38799   fi
38800
38801
38802      if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
38803   GL_COND_OBJ_STDIO_WRITE_TRUE=
38804   GL_COND_OBJ_STDIO_WRITE_FALSE='#'
38805 else
38806   GL_COND_OBJ_STDIO_WRITE_TRUE='#'
38807   GL_COND_OBJ_STDIO_WRITE_FALSE=
38808 fi
38809 :
38810     if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
38811     GL_COND_OBJ_STDIO_WRITE_TRUE='#'
38812     GL_COND_OBJ_STDIO_WRITE_FALSE='#'
38813   fi
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824           GL_GNULIB_FSCANF=1
38825
38826
38827
38828
38829
38830 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
38831
38832
38833
38834
38835
38836 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848           GL_GNULIB_SCANF=1
38849
38850
38851
38852
38853
38854 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
38855
38856
38857
38858
38859
38860 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872           GL_GNULIB_FGETC=1
38873
38874
38875
38876
38877
38878 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891           GL_GNULIB_GETC=1
38892
38893
38894
38895
38896
38897 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910           GL_GNULIB_GETCHAR=1
38911
38912
38913
38914
38915
38916 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929           GL_GNULIB_FGETS=1
38930
38931
38932
38933
38934
38935 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948           GL_GNULIB_FREAD=1
38949
38950
38951
38952
38953
38954 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967           GL_GNULIB_FPRINTF=1
38968
38969
38970
38971
38972
38973 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986           GL_GNULIB_PRINTF=1
38987
38988
38989
38990
38991
38992 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005           GL_GNULIB_VFPRINTF=1
39006
39007
39008
39009
39010
39011 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024           GL_GNULIB_VPRINTF=1
39025
39026
39027
39028
39029
39030 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043           GL_GNULIB_FPUTC=1
39044
39045
39046
39047
39048
39049 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062           GL_GNULIB_PUTC=1
39063
39064
39065
39066
39067
39068 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081           GL_GNULIB_PUTCHAR=1
39082
39083
39084
39085
39086
39087 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100           GL_GNULIB_FPUTS=1
39101
39102
39103
39104
39105
39106 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119           GL_GNULIB_PUTS=1
39120
39121
39122
39123
39124
39125 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138           GL_GNULIB_FWRITE=1
39139
39140
39141
39142
39143
39144 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stpcpy" >&5
39164 printf %s "checking for stpcpy... " >&6; }
39165 if test ${gl_cv_onwards_func_stpcpy+y}
39166 then :
39167   printf %s "(cached) " >&6
39168 else case e in #(
39169   e)
39170   exec 9>&6 6>/dev/null
39171
39172        case "$host_os" in
39173
39174          linux*-android*)
39175            ac_fn_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "#include <string.h>
39176 " "$ac_c_undeclared_builtin_options" "CFLAGS"
39177 if test "x$ac_cv_have_decl_stpcpy" = xyes
39178 then :
39179
39180 fi
39181            if test $ac_cv_have_decl_stpcpy = yes; then
39182              ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
39183 if test "x$ac_cv_func_stpcpy" = xyes
39184 then :
39185
39186 fi
39187
39188              if test $ac_cv_func_stpcpy = yes; then
39189                gl_cv_onwards_func_stpcpy=yes
39190              else
39191                                                             gl_cv_onwards_func_stpcpy='future OS version'
39192              fi
39193            else
39194              gl_cv_onwards_func_stpcpy='future OS version'
39195            fi
39196            ;;
39197
39198
39199          *)
39200            ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
39201 if test "x$ac_cv_func_stpcpy" = xyes
39202 then :
39203
39204 fi
39205
39206            gl_cv_onwards_func_stpcpy=$ac_cv_func_stpcpy
39207            ;;
39208
39209        esac
39210
39211   exec 6>&9 9>&-
39212
39213      ;;
39214 esac
39215 fi
39216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_stpcpy" >&5
39217 printf "%s\n" "$gl_cv_onwards_func_stpcpy" >&6; }
39218
39219   case "$gl_cv_onwards_func_stpcpy" in
39220     future*) ac_cv_func_stpcpy=no ;;
39221     *)       ac_cv_func_stpcpy=$gl_cv_onwards_func_stpcpy ;;
39222   esac
39223   if test $ac_cv_func_stpcpy = yes; then
39224
39225 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
39226
39227   fi
39228
39229
39230   if test $ac_cv_func_stpcpy = no; then
39231     HAVE_STPCPY=0
39232     case "$gl_cv_onwards_func_stpcpy" in
39233       future*) REPLACE_STPCPY=1 ;;
39234     esac
39235   fi
39236
39237
39238      if test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1; then
39239   GL_COND_OBJ_STPCPY_TRUE=
39240   GL_COND_OBJ_STPCPY_FALSE='#'
39241 else
39242   GL_COND_OBJ_STPCPY_TRUE='#'
39243   GL_COND_OBJ_STPCPY_FALSE=
39244 fi
39245 :
39246     if test -z "${GL_COND_OBJ_STPCPY_TRUE}" && test -z "${GL_COND_OBJ_STPCPY_FALSE}"; then
39247     GL_COND_OBJ_STPCPY_TRUE='#'
39248     GL_COND_OBJ_STPCPY_FALSE='#'
39249   fi
39250
39251   if test -z "$GL_COND_OBJ_STPCPY_TRUE"; then :
39252
39253
39254   :
39255
39256
39257 fi
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272           GL_GNULIB_STPCPY=1
39273
39274
39275
39276
39277
39278 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
39279
39280
39281
39282
39283
39284
39285   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
39286 if test "x$ac_cv_func_strcasecmp" = xyes
39287 then :
39288   printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
39289
39290 fi
39291
39292   if test $ac_cv_func_strcasecmp = no; then
39293     HAVE_STRCASECMP=0
39294   fi
39295
39296
39297
39298   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
39299 if test "x$ac_cv_func_strncasecmp" = xyes
39300 then :
39301   printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
39302
39303 fi
39304
39305   if test $ac_cv_func_strncasecmp = yes; then
39306     HAVE_STRNCASECMP=1
39307   else
39308     HAVE_STRNCASECMP=0
39309   fi
39310   ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
39311 if test "x$ac_cv_have_decl_strncasecmp" = xyes
39312 then :
39313   ac_have_decl=1
39314 else case e in #(
39315   e) ac_have_decl=0 ;;
39316 esac
39317 fi
39318 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
39319
39320   if test $ac_cv_have_decl_strncasecmp = no; then
39321     HAVE_DECL_STRNCASECMP=0
39322   fi
39323
39324
39325
39326      if test $HAVE_STRCASECMP = 0; then
39327   GL_COND_OBJ_STRCASECMP_TRUE=
39328   GL_COND_OBJ_STRCASECMP_FALSE='#'
39329 else
39330   GL_COND_OBJ_STRCASECMP_TRUE='#'
39331   GL_COND_OBJ_STRCASECMP_FALSE=
39332 fi
39333 :
39334     if test -z "${GL_COND_OBJ_STRCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRCASECMP_FALSE}"; then
39335     GL_COND_OBJ_STRCASECMP_TRUE='#'
39336     GL_COND_OBJ_STRCASECMP_FALSE='#'
39337   fi
39338
39339   if test -z "$GL_COND_OBJ_STRCASECMP_TRUE"; then :
39340
39341
39342   :
39343
39344
39345 fi
39346
39347      if test $HAVE_STRNCASECMP = 0; then
39348   GL_COND_OBJ_STRNCASECMP_TRUE=
39349   GL_COND_OBJ_STRNCASECMP_FALSE='#'
39350 else
39351   GL_COND_OBJ_STRNCASECMP_TRUE='#'
39352   GL_COND_OBJ_STRNCASECMP_FALSE=
39353 fi
39354 :
39355     if test -z "${GL_COND_OBJ_STRNCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRNCASECMP_FALSE}"; then
39356     GL_COND_OBJ_STRNCASECMP_TRUE='#'
39357     GL_COND_OBJ_STRNCASECMP_FALSE='#'
39358   fi
39359
39360   if test -z "$GL_COND_OBJ_STRNCASECMP_TRUE"; then :
39361
39362
39363   :
39364
39365
39366 fi
39367
39368
39369
39370
39371
39372
39373
39374   if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
39375     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
39376 printf %s "checking for working strerror function... " >&6; }
39377 if test ${gl_cv_func_working_strerror+y}
39378 then :
39379   printf %s "(cached) " >&6
39380 else case e in #(
39381   e) if test "$cross_compiling" = yes
39382 then :
39383   case "$host_os" in
39384                                # Guess yes on glibc systems.
39385            *-gnu* | gnu*)      gl_cv_func_working_strerror="guessing yes" ;;
39386                                # Guess yes on musl systems.
39387            *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
39388                                # If we don't know, obey --enable-cross-guesses.
39389            *)                  gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
39390          esac
39391
39392 else case e in #(
39393   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39394 /* end confdefs.h.  */
39395 #include <string.h>
39396
39397 int
39398 main (void)
39399 {
39400 if (!*strerror (-2)) return 1;
39401   ;
39402   return 0;
39403 }
39404 _ACEOF
39405 if ac_fn_c_try_run "$LINENO"
39406 then :
39407   gl_cv_func_working_strerror=yes
39408 else case e in #(
39409   e) gl_cv_func_working_strerror=no ;;
39410 esac
39411 fi
39412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39413   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39414 esac
39415 fi
39416
39417      ;;
39418 esac
39419 fi
39420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
39421 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
39422     case "$gl_cv_func_working_strerror" in
39423       *yes) ;;
39424       *)
39425                         REPLACE_STRERROR=1
39426         ;;
39427     esac
39428
39429                   case "$gl_cv_func_strerror_r_works" in
39430         *no) REPLACE_STRERROR=1 ;;
39431       esac
39432
39433   else
39434             REPLACE_STRERROR=1
39435   fi
39436
39437
39438      if test $REPLACE_STRERROR = 1; then
39439   GL_COND_OBJ_STRERROR_TRUE=
39440   GL_COND_OBJ_STRERROR_FALSE='#'
39441 else
39442   GL_COND_OBJ_STRERROR_TRUE='#'
39443   GL_COND_OBJ_STRERROR_FALSE=
39444 fi
39445 :
39446     if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
39447     GL_COND_OBJ_STRERROR_TRUE='#'
39448     GL_COND_OBJ_STRERROR_FALSE='#'
39449   fi
39450
39451
39452
39453 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470           GL_GNULIB_STRERROR=1
39471
39472
39473
39474
39475
39476 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
39477
39478
39479
39480
39481
39482
39483      if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
39484   GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
39485   GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
39486 else
39487   GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
39488   GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
39489 fi
39490 :
39491     if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
39492     GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
39493     GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
39494   fi
39495
39496   if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
39497
39498
39499
39500
39501
39502   if test $ac_cv_header_sys_socket_h != yes; then
39503                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
39504 if test "x$ac_cv_header_winsock2_h" = xyes
39505 then :
39506   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
39507
39508 fi
39509
39510   fi
39511   if test "$ac_cv_header_winsock2_h" = yes; then
39512     HAVE_WINSOCK2_H=1
39513     UNISTD_H_HAVE_WINSOCK2_H=1
39514     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
39515   else
39516     HAVE_WINSOCK2_H=0
39517   fi
39518
39519
39520
39521 fi
39522   if test $gl_cond_libtool = false; then
39523     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
39524     gl_libdeps="$gl_libdeps $LIBICONV"
39525   fi
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551   if test $ac_cv_have_decl_strnlen = no; then
39552     HAVE_DECL_STRNLEN=0
39553   else
39554
39555          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
39556 printf %s "checking for working strnlen... " >&6; }
39557 if test ${ac_cv_func_strnlen_working+y}
39558 then :
39559   printf %s "(cached) " >&6
39560 else case e in #(
39561   e) if test "$cross_compiling" = yes
39562 then :
39563   # Guess no on AIX systems, yes otherwise.
39564                 case "$host_os" in
39565                   aix*) ac_cv_func_strnlen_working=no;;
39566                   *)    ac_cv_func_strnlen_working=yes;;
39567                 esac
39568 else case e in #(
39569   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39570 /* end confdefs.h.  */
39571 $ac_includes_default
39572 int
39573 main (void)
39574 {
39575
39576 #define S "foobar"
39577 #define S_LEN (sizeof S - 1)
39578
39579   /* At least one implementation is buggy: that of AIX 4.3 would
39580      give strnlen (S, 1) == 3.  */
39581
39582   int i;
39583   for (i = 0; i < S_LEN + 1; ++i)
39584     {
39585       int expected = i <= S_LEN ? i : S_LEN;
39586       if (strnlen (S, i) != expected)
39587         return 1;
39588     }
39589   return 0;
39590
39591   ;
39592   return 0;
39593 }
39594 _ACEOF
39595 if ac_fn_c_try_run "$LINENO"
39596 then :
39597   ac_cv_func_strnlen_working=yes
39598 else case e in #(
39599   e) ac_cv_func_strnlen_working=no ;;
39600 esac
39601 fi
39602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39603   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39604 esac
39605 fi
39606  ;;
39607 esac
39608 fi
39609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
39610 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
39611 test $ac_cv_func_strnlen_working = no && :
39612
39613
39614     if test $ac_cv_func_strnlen_working = no; then
39615       REPLACE_STRNLEN=1
39616     fi
39617   fi
39618
39619
39620      if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
39621   GL_COND_OBJ_STRNLEN_TRUE=
39622   GL_COND_OBJ_STRNLEN_FALSE='#'
39623 else
39624   GL_COND_OBJ_STRNLEN_TRUE='#'
39625   GL_COND_OBJ_STRNLEN_FALSE=
39626 fi
39627 :
39628     if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
39629     GL_COND_OBJ_STRNLEN_TRUE='#'
39630     GL_COND_OBJ_STRNLEN_FALSE='#'
39631   fi
39632
39633   if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
39634
39635     :
39636
39637 fi
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652           GL_GNULIB_STRNLEN=1
39653
39654
39655
39656
39657
39658 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
39659
39660
39661
39662
39663
39664
39665
39666   if test $ac_cv_func_strptime != yes; then
39667     HAVE_STRPTIME=0
39668   fi
39669
39670
39671      if test $HAVE_STRPTIME = 0; then
39672   GL_COND_OBJ_STRPTIME_TRUE=
39673   GL_COND_OBJ_STRPTIME_FALSE='#'
39674 else
39675   GL_COND_OBJ_STRPTIME_TRUE='#'
39676   GL_COND_OBJ_STRPTIME_FALSE=
39677 fi
39678 :
39679     if test -z "${GL_COND_OBJ_STRPTIME_TRUE}" && test -z "${GL_COND_OBJ_STRPTIME_FALSE}"; then
39680     GL_COND_OBJ_STRPTIME_TRUE='#'
39681     GL_COND_OBJ_STRPTIME_FALSE='#'
39682   fi
39683
39684   if test -z "$GL_COND_OBJ_STRPTIME_TRUE"; then :
39685
39686
39687
39688   :
39689
39690
39691 fi
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701           GL_GNULIB_STRPTIME=1
39702
39703
39704
39705
39706
39707 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
39708
39709
39710
39711
39712
39713
39714
39715
39716   if test "$ac_cv_have_decl_strtoimax" != yes; then
39717     HAVE_DECL_STRTOIMAX=0
39718   fi
39719
39720   if test "$ac_cv_func_strtoimax" = yes; then
39721     HAVE_STRTOIMAX=1
39722              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
39723 printf %s "checking whether strtoimax works... " >&6; }
39724 if test ${gl_cv_func_strtoimax+y}
39725 then :
39726   printf %s "(cached) " >&6
39727 else case e in #(
39728   e) if test "$cross_compiling" = yes
39729 then :
39730   case "$host_os" in
39731                     # Guess no on AIX 5.
39732             aix5*)  gl_cv_func_strtoimax="guessing no" ;;
39733                     # Guess yes on native Windows.
39734             mingw*) gl_cv_func_strtoimax="guessing yes" ;;
39735                     # Guess yes otherwise.
39736             *)      gl_cv_func_strtoimax="guessing yes" ;;
39737           esac
39738
39739 else case e in #(
39740   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39741 /* end confdefs.h.  */
39742
39743 #include <errno.h>
39744 #include <string.h>
39745 #include <inttypes.h>
39746 int main ()
39747 {
39748   if (sizeof (intmax_t) > sizeof (int))
39749     {
39750       const char *s = "4294967295";
39751       char *p;
39752       intmax_t res;
39753       errno = 0;
39754       res = strtoimax (s, &p, 10);
39755       if (p != s + strlen (s))
39756         return 1;
39757       if (errno != 0)
39758         return 2;
39759       if (res != (intmax_t) 65535 * (intmax_t) 65537)
39760         return 3;
39761     }
39762   else
39763     {
39764       const char *s = "2147483647";
39765       char *p;
39766       intmax_t res;
39767       errno = 0;
39768       res = strtoimax (s, &p, 10);
39769       if (p != s + strlen (s))
39770         return 1;
39771       if (errno != 0)
39772         return 2;
39773       if (res != 2147483647)
39774         return 3;
39775     }
39776   return 0;
39777 }
39778
39779 _ACEOF
39780 if ac_fn_c_try_run "$LINENO"
39781 then :
39782   gl_cv_func_strtoimax=yes
39783 else case e in #(
39784   e) gl_cv_func_strtoimax=no ;;
39785 esac
39786 fi
39787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39788   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39789 esac
39790 fi
39791
39792        ;;
39793 esac
39794 fi
39795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
39796 printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
39797     case "$gl_cv_func_strtoimax" in
39798       *no) REPLACE_STRTOIMAX=1 ;;
39799     esac
39800   else
39801     if test "$ac_cv_have_decl_strtoimax" = yes; then
39802       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
39803       REPLACE_STRTOIMAX=1
39804     fi
39805     HAVE_STRTOIMAX=0
39806   fi
39807
39808
39809      if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
39810   GL_COND_OBJ_STRTOIMAX_TRUE=
39811   GL_COND_OBJ_STRTOIMAX_FALSE='#'
39812 else
39813   GL_COND_OBJ_STRTOIMAX_TRUE='#'
39814   GL_COND_OBJ_STRTOIMAX_FALSE=
39815 fi
39816 :
39817     if test -z "${GL_COND_OBJ_STRTOIMAX_TRUE}" && test -z "${GL_COND_OBJ_STRTOIMAX_FALSE}"; then
39818     GL_COND_OBJ_STRTOIMAX_TRUE='#'
39819     GL_COND_OBJ_STRTOIMAX_FALSE='#'
39820   fi
39821
39822   if test -z "$GL_COND_OBJ_STRTOIMAX_TRUE"; then :
39823
39824
39825   ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
39826 if test "x$ac_cv_have_decl_strtoll" = xyes
39827 then :
39828   ac_have_decl=1
39829 else case e in #(
39830   e) ac_have_decl=0 ;;
39831 esac
39832 fi
39833 printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
39834
39835
39836
39837 fi
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847           GL_GNULIB_STRTOIMAX=1
39848
39849
39850
39851
39852
39853
39854
39855   ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
39856 if test "x$ac_cv_func_strtoll" = xyes
39857 then :
39858   printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
39859
39860 fi
39861
39862   if test $ac_cv_func_strtoll = yes; then
39863     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
39864 printf %s "checking whether strtoll works... " >&6; }
39865 if test ${gl_cv_func_strtoll_works+y}
39866 then :
39867   printf %s "(cached) " >&6
39868 else case e in #(
39869   e) if test "$cross_compiling" = yes
39870 then :
39871   case "$host_os" in
39872                                 # Guess no on native Windows.
39873             mingw*)             gl_cv_func_strtoll_works="guessing no" ;;
39874                                 # Guess no on glibc systems.
39875             *-gnu* | gnu*)      gl_cv_func_strtoll_works="guessing no" ;;
39876                                 # Guess no on musl systems.
39877             *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
39878             *)                  gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
39879           esac
39880
39881 else case e in #(
39882   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39883 /* end confdefs.h.  */
39884 #include <stdlib.h>
39885 int
39886 main (void)
39887 {
39888 int result = 0;
39889               char *term;
39890               /* This test fails on Minix and native Windows.  */
39891               {
39892                 const char input[] = "0x";
39893                 (void) strtoll (input, &term, 16);
39894                 if (term != input + 1)
39895                   result |= 1;
39896               }
39897               /* This test fails on pre-C23 platforms.  */
39898               {
39899                 const char input[] = "0b1";
39900                 (void) strtoll (input, &term, 2);
39901                 if (term != input + 3)
39902                   result |= 2;
39903               }
39904               return result;
39905
39906   ;
39907   return 0;
39908 }
39909
39910 _ACEOF
39911 if ac_fn_c_try_run "$LINENO"
39912 then :
39913   gl_cv_func_strtoll_works=yes
39914 else case e in #(
39915   e) gl_cv_func_strtoll_works=no ;;
39916 esac
39917 fi
39918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39919   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39920 esac
39921 fi
39922
39923      ;;
39924 esac
39925 fi
39926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
39927 printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
39928     case "$gl_cv_func_strtoll_works" in
39929       *yes) ;;
39930       *)    REPLACE_STRTOLL=1 ;;
39931     esac
39932   else
39933     HAVE_STRTOLL=0
39934   fi
39935
39936
39937      if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
39938   GL_COND_OBJ_STRTOLL_TRUE=
39939   GL_COND_OBJ_STRTOLL_FALSE='#'
39940 else
39941   GL_COND_OBJ_STRTOLL_TRUE='#'
39942   GL_COND_OBJ_STRTOLL_FALSE=
39943 fi
39944 :
39945     if test -z "${GL_COND_OBJ_STRTOLL_TRUE}" && test -z "${GL_COND_OBJ_STRTOLL_FALSE}"; then
39946     GL_COND_OBJ_STRTOLL_TRUE='#'
39947     GL_COND_OBJ_STRTOLL_FALSE='#'
39948   fi
39949
39950   if test -z "$GL_COND_OBJ_STRTOLL_TRUE"; then :
39951
39952
39953   :
39954
39955
39956 fi
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966           GL_GNULIB_STRTOLL=1
39967
39968
39969
39970
39971
39972 printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014   :
40015
40016
40017
40018
40019 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036       ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
40037          gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40038          been included before.  */
40039       #if defined __MINGW32__
40040       # include <unistd.h>
40041       #endif
40042       #include <time.h>
40043
40044 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40045 if test "x$ac_cv_have_decl_localtime_r" = xyes
40046 then :
40047   ac_have_decl=1
40048 else case e in #(
40049   e) ac_have_decl=0 ;;
40050 esac
40051 fi
40052 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
40053
40054   if test $ac_cv_have_decl_localtime_r = no; then
40055     HAVE_DECL_LOCALTIME_R=0
40056   fi
40057
40058
40059   if test $ac_cv_func_localtime_r = yes; then
40060     HAVE_LOCALTIME_R=1
40061     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
40062 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
40063 if test ${gl_cv_time_r_posix+y}
40064 then :
40065   printf %s "(cached) " >&6
40066 else case e in #(
40067   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40068 /* end confdefs.h.  */
40069 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
40070                  gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40071                  been included before.  */
40072               #if defined __MINGW32__
40073               # include <unistd.h>
40074               #endif
40075               #include <time.h>
40076
40077 int
40078 main (void)
40079 {
40080 /* We don't need to append 'restrict's to the argument types,
40081                  even though the POSIX signature has the 'restrict's,
40082                  since C99 says they can't affect type compatibility.  */
40083               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
40084               if (ptr) return 0;
40085               /* Check the return type is a pointer.
40086                  On HP-UX 10 it is 'int'.  */
40087               *localtime_r (0, 0);
40088   ;
40089   return 0;
40090 }
40091
40092 _ACEOF
40093 if ac_fn_c_try_compile "$LINENO"
40094 then :
40095   gl_cv_time_r_posix=yes
40096 else case e in #(
40097   e) gl_cv_time_r_posix=no ;;
40098 esac
40099 fi
40100 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40101        ;;
40102 esac
40103 fi
40104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
40105 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
40106     if test $gl_cv_time_r_posix = yes; then
40107       REPLACE_LOCALTIME_R=0
40108     else
40109       REPLACE_LOCALTIME_R=1
40110     fi
40111   else
40112     HAVE_LOCALTIME_R=0
40113                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
40114 printf %s "checking whether localtime_r exists as an inline function... " >&6; }
40115 if test ${gl_cv_func_localtime_r_inline+y}
40116 then :
40117   printf %s "(cached) " >&6
40118 else case e in #(
40119   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40120 /* end confdefs.h.  */
40121 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
40122                  gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40123                  been included before.  */
40124               #if defined __MINGW32__
40125               # include <unistd.h>
40126               #endif
40127               #include <time.h>
40128
40129 int
40130 main (void)
40131 {
40132 time_t a;
40133               struct tm r;
40134               localtime_r (&a, &r);
40135
40136   ;
40137   return 0;
40138 }
40139
40140 _ACEOF
40141 if ac_fn_c_try_link "$LINENO"
40142 then :
40143   gl_cv_func_localtime_r_inline=yes
40144 else case e in #(
40145   e) gl_cv_func_localtime_r_inline=no ;;
40146 esac
40147 fi
40148 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40149     conftest$ac_exeext conftest.$ac_ext
40150        ;;
40151 esac
40152 fi
40153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
40154 printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
40155     if test $gl_cv_func_localtime_r_inline = yes; then
40156       REPLACE_LOCALTIME_R=1
40157     fi
40158   fi
40159
40160
40161      if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
40162   GL_COND_OBJ_TIME_R_TRUE=
40163   GL_COND_OBJ_TIME_R_FALSE='#'
40164 else
40165   GL_COND_OBJ_TIME_R_TRUE='#'
40166   GL_COND_OBJ_TIME_R_FALSE=
40167 fi
40168 :
40169     if test -z "${GL_COND_OBJ_TIME_R_TRUE}" && test -z "${GL_COND_OBJ_TIME_R_FALSE}"; then
40170     GL_COND_OBJ_TIME_R_TRUE='#'
40171     GL_COND_OBJ_TIME_R_FALSE='#'
40172   fi
40173
40174   if test -z "$GL_COND_OBJ_TIME_R_TRUE"; then :
40175
40176
40177   :
40178
40179
40180 fi
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190           GL_GNULIB_TIME_R=1
40191
40192
40193
40194
40195
40196 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
40197
40198
40199
40200
40201
40202
40203
40204
40205   # On Mac OS X 10.6, localtime loops forever with some time_t values.
40206   # See Bug#27706, Bug#27736, and
40207   # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
40208   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
40209 printf %s "checking whether localtime works even near extrema... " >&6; }
40210 if test ${gl_cv_func_localtime_works+y}
40211 then :
40212   printf %s "(cached) " >&6
40213 else case e in #(
40214   e) gl_cv_func_localtime_works=yes
40215      if test "$cross_compiling" = yes
40216 then :
40217   gl_cv_func_localtime_works="guessing yes"
40218 else case e in #(
40219   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40220 /* end confdefs.h.  */
40221 #include <stdlib.h>
40222             #include <string.h>
40223             #include <unistd.h>
40224             #include <time.h>
40225
40226 int
40227 main (void)
40228 {
40229
40230             time_t t = -67768038400666600;
40231             struct tm *tm;
40232             char *tz = getenv ("TZ");
40233             if (! (tz && strcmp (tz, "QQQ0") == 0))
40234               return 0;
40235             alarm (2);
40236             tm = localtime (&t);
40237             /* Use TM and *TM to suppress over-optimization.  */
40238             return tm && tm->tm_isdst;
40239
40240   ;
40241   return 0;
40242 }
40243 _ACEOF
40244 if ac_fn_c_try_run "$LINENO"
40245 then :
40246   (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
40247            gl_cv_func_localtime_works=no
40248 fi
40249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40250   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40251 esac
40252 fi
40253  ;;
40254 esac
40255 fi
40256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
40257 printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
40258   if test "$gl_cv_func_localtime_works" = no; then
40259
40260 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
40261
40262   fi
40263
40264   ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
40265 "
40266 if test "x$ac_cv_type_timezone_t" = xyes
40267 then :
40268
40269 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
40270
40271
40272 fi
40273
40274   if test "$ac_cv_type_timezone_t" = yes; then
40275     HAVE_TIMEZONE_T=1
40276   fi
40277
40278
40279      if test $HAVE_TIMEZONE_T = 0; then
40280   GL_COND_OBJ_TIME_RZ_TRUE=
40281   GL_COND_OBJ_TIME_RZ_FALSE='#'
40282 else
40283   GL_COND_OBJ_TIME_RZ_TRUE='#'
40284   GL_COND_OBJ_TIME_RZ_FALSE=
40285 fi
40286 :
40287     if test -z "${GL_COND_OBJ_TIME_RZ_TRUE}" && test -z "${GL_COND_OBJ_TIME_RZ_FALSE}"; then
40288     GL_COND_OBJ_TIME_RZ_TRUE='#'
40289     GL_COND_OBJ_TIME_RZ_FALSE='#'
40290   fi
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301           GL_GNULIB_TIME_RZ=1
40302
40303
40304
40305
40306
40307 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
40308
40309
40310
40311
40312
40313
40314   REPLACE_TIMEGM=0
40315
40316
40317   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timegm" >&5
40318 printf %s "checking for timegm... " >&6; }
40319 if test ${gl_cv_onwards_func_timegm+y}
40320 then :
40321   printf %s "(cached) " >&6
40322 else case e in #(
40323   e)
40324   exec 9>&6 6>/dev/null
40325
40326        case "$host_os" in
40327
40328          linux*-android*)
40329            ac_fn_check_decl "$LINENO" "timegm" "ac_cv_have_decl_timegm" "#include <time.h>
40330 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40331 if test "x$ac_cv_have_decl_timegm" = xyes
40332 then :
40333
40334 fi
40335            if test $ac_cv_have_decl_timegm = yes; then
40336              ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
40337 if test "x$ac_cv_func_timegm" = xyes
40338 then :
40339
40340 fi
40341
40342              if test $ac_cv_func_timegm = yes; then
40343                gl_cv_onwards_func_timegm=yes
40344              else
40345                                                             gl_cv_onwards_func_timegm='future OS version'
40346              fi
40347            else
40348              gl_cv_onwards_func_timegm='future OS version'
40349            fi
40350            ;;
40351
40352
40353          *)
40354            ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
40355 if test "x$ac_cv_func_timegm" = xyes
40356 then :
40357
40358 fi
40359
40360            gl_cv_onwards_func_timegm=$ac_cv_func_timegm
40361            ;;
40362
40363        esac
40364
40365   exec 6>&9 9>&-
40366
40367      ;;
40368 esac
40369 fi
40370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timegm" >&5
40371 printf "%s\n" "$gl_cv_onwards_func_timegm" >&6; }
40372
40373   case "$gl_cv_onwards_func_timegm" in
40374     future*) ac_cv_func_timegm=no ;;
40375     *)       ac_cv_func_timegm=$gl_cv_onwards_func_timegm ;;
40376   esac
40377   if test $ac_cv_func_timegm = yes; then
40378
40379 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
40380
40381   fi
40382
40383
40384   if test $ac_cv_func_timegm = yes; then
40385     if test "$gl_cv_func_working_mktime" != yes; then
40386       # Assume that timegm is buggy if mktime is.
40387       REPLACE_TIMEGM=1
40388     fi
40389   else
40390     HAVE_TIMEGM=0
40391     case "$gl_cv_onwards_func_timegm" in
40392       future*) REPLACE_TIMEGM=1 ;;
40393     esac
40394   fi
40395
40396
40397      if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
40398   GL_COND_OBJ_TIMEGM_TRUE=
40399   GL_COND_OBJ_TIMEGM_FALSE='#'
40400 else
40401   GL_COND_OBJ_TIMEGM_TRUE='#'
40402   GL_COND_OBJ_TIMEGM_FALSE=
40403 fi
40404 :
40405     if test -z "${GL_COND_OBJ_TIMEGM_TRUE}" && test -z "${GL_COND_OBJ_TIMEGM_FALSE}"; then
40406     GL_COND_OBJ_TIMEGM_TRUE='#'
40407     GL_COND_OBJ_TIMEGM_FALSE='#'
40408   fi
40409
40410   if test -z "$GL_COND_OBJ_TIMEGM_TRUE"; then :
40411
40412
40413   :
40414
40415
40416 fi
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426           GL_GNULIB_TIMEGM=1
40427
40428
40429
40430
40431
40432 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
40433
40434
40435
40436   :
40437
40438
40439
40440   REPLACE_TZSET=0
40441   case "$host_os" in
40442     mingw*) REPLACE_TZSET=1 ;;
40443   esac
40444
40445
40446      if test $REPLACE_TZSET = 1; then
40447   GL_COND_OBJ_TZSET_TRUE=
40448   GL_COND_OBJ_TZSET_FALSE='#'
40449 else
40450   GL_COND_OBJ_TZSET_TRUE='#'
40451   GL_COND_OBJ_TZSET_FALSE=
40452 fi
40453 :
40454     if test -z "${GL_COND_OBJ_TZSET_TRUE}" && test -z "${GL_COND_OBJ_TZSET_FALSE}"; then
40455     GL_COND_OBJ_TZSET_TRUE='#'
40456     GL_COND_OBJ_TZSET_FALSE='#'
40457   fi
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468           GL_GNULIB_TZSET=1
40469
40470
40471
40472
40473
40474 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487       if  { test "$HAVE_LIBUNISTRING" != yes \
40488     || {
40489
40490
40491
40492             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40493             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40494                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40495                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40496                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40497                          }
40498                     }
40499                }
40500
40501
40502
40503
40504        }
40505   }; then
40506             if test -z "$LIBUNISTRING_UNISTR_H"; then
40507       LIBUNISTRING_UNISTR_H="${gl_source_base_prefix}unistr.h"
40508     fi
40509   else
40510     LIBUNISTRING_UNISTR_H=
40511   fi
40512
40513
40514
40515
40516
40517 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
40518
40519
40520
40521
40522
40523      if  { test "$HAVE_LIBUNISTRING" != yes \
40524     || {
40525
40526
40527
40528             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40529             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40530                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40531                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40532                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40533                          }
40534                     }
40535                }
40536
40537
40538
40539
40540        }
40541   }; then
40542   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
40543   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
40544 else
40545   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
40546   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
40547 fi
40548 :
40549     if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
40550     LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
40551     LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
40552   fi
40553
40554
40555
40556
40557 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
40558
40559
40560
40561
40562
40563      if  { test "$HAVE_LIBUNISTRING" != yes \
40564     || {
40565
40566
40567
40568             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40569             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40570                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40571                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40572                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40573                          }
40574                     }
40575                }
40576
40577
40578
40579
40580        }
40581   }; then
40582   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
40583   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
40584 else
40585   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
40586   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
40587 fi
40588 :
40589     if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
40590     LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
40591     LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
40592   fi
40593
40594
40595
40596
40597       if  { test "$HAVE_LIBUNISTRING" != yes \
40598     || {
40599
40600
40601
40602             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40603             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40604                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40605                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40606                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40607                          }
40608                     }
40609                }
40610
40611
40612
40613
40614        }
40615   }; then
40616             if test -z "$LIBUNISTRING_UNITYPES_H"; then
40617       LIBUNISTRING_UNITYPES_H="${gl_source_base_prefix}unitypes.h"
40618     fi
40619   else
40620     LIBUNISTRING_UNITYPES_H=
40621   fi
40622
40623
40624
40625
40626
40627
40628       if  { test "$HAVE_LIBUNISTRING" != yes \
40629     || {
40630
40631
40632
40633             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40634             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40635                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40636                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40637                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40638                          }
40639                     }
40640                }
40641
40642
40643
40644
40645        }
40646   }; then
40647             if test -z "$LIBUNISTRING_UNIWIDTH_H"; then
40648       LIBUNISTRING_UNIWIDTH_H="${gl_source_base_prefix}uniwidth.h"
40649     fi
40650   else
40651     LIBUNISTRING_UNIWIDTH_H=
40652   fi
40653
40654
40655
40656
40657
40658
40659      if  { test "$HAVE_LIBUNISTRING" != yes \
40660     || {
40661
40662
40663
40664             test $LIBUNISTRING_VERSION_MAJOR -lt 1 \
40665             || { test $LIBUNISTRING_VERSION_MAJOR -eq 1 \
40666                  && { test $LIBUNISTRING_VERSION_MINOR -lt 1 \
40667                       || { test $LIBUNISTRING_VERSION_MINOR -eq 1 \
40668                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40669                          }
40670                     }
40671                }
40672
40673
40674
40675
40676        }
40677   }; then
40678   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
40679   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
40680 else
40681   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
40682   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
40683 fi
40684 :
40685     if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
40686     LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
40687     LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
40688   fi
40689
40690
40691
40692 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
40693
40694
40695 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717   if test $ac_cv_have_decl_unsetenv = no; then
40718     HAVE_DECL_UNSETENV=0
40719   fi
40720   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
40721 if test "x$ac_cv_func_unsetenv" = xyes
40722 then :
40723   printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
40724
40725 fi
40726
40727   if test $ac_cv_func_unsetenv = no; then
40728     HAVE_UNSETENV=0
40729   else
40730     HAVE_UNSETENV=1
40731         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
40732 printf %s "checking for unsetenv() return type... " >&6; }
40733 if test ${gt_cv_func_unsetenv_ret+y}
40734 then :
40735   printf %s "(cached) " >&6
40736 else case e in #(
40737   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40738 /* end confdefs.h.  */
40739
40740 #undef _BSD
40741 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
40742 #include <stdlib.h>
40743 extern
40744 #ifdef __cplusplus
40745 "C"
40746 #endif
40747 int unsetenv (const char *name);
40748
40749 int
40750 main (void)
40751 {
40752
40753   ;
40754   return 0;
40755 }
40756 _ACEOF
40757 if ac_fn_c_try_compile "$LINENO"
40758 then :
40759   gt_cv_func_unsetenv_ret='int'
40760 else case e in #(
40761   e) gt_cv_func_unsetenv_ret='void' ;;
40762 esac
40763 fi
40764 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40765 esac
40766 fi
40767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
40768 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
40769     if test $gt_cv_func_unsetenv_ret = 'void'; then
40770
40771 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
40772
40773       REPLACE_UNSETENV=1
40774     fi
40775
40776                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
40777 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
40778 if test ${gl_cv_func_unsetenv_works+y}
40779 then :
40780   printf %s "(cached) " >&6
40781 else case e in #(
40782   e) if test "$cross_compiling" = yes
40783 then :
40784   case "$host_os" in
40785                     # Guess yes on glibc systems.
40786             *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
40787                     # If we don't know, obey --enable-cross-guesses.
40788             *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
40789           esac
40790
40791 else case e in #(
40792   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40793 /* end confdefs.h.  */
40794
40795             #include <stdlib.h>
40796             #include <errno.h>
40797             extern char **environ;
40798
40799
40800 $gl_mda_defines
40801
40802 int
40803 main (void)
40804 {
40805
40806             char entry1[] = "a=1";
40807             char entry2[] = "b=2";
40808             char *env[] = { entry1, entry2, NULL };
40809             if (putenv ((char *) "a=1")) return 1;
40810             if (putenv (entry2)) return 2;
40811             entry2[0] = 'a';
40812             unsetenv ("a");
40813             if (getenv ("a")) return 3;
40814             if (!unsetenv ("") || errno != EINVAL) return 4;
40815             entry2[0] = 'b';
40816             environ = env;
40817             if (!getenv ("a")) return 5;
40818             entry2[0] = 'a';
40819             unsetenv ("a");
40820             if (getenv ("a")) return 6;
40821
40822   ;
40823   return 0;
40824 }
40825 _ACEOF
40826 if ac_fn_c_try_run "$LINENO"
40827 then :
40828   gl_cv_func_unsetenv_works=yes
40829 else case e in #(
40830   e) gl_cv_func_unsetenv_works=no ;;
40831 esac
40832 fi
40833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40834   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40835 esac
40836 fi
40837
40838        ;;
40839 esac
40840 fi
40841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
40842 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
40843     case "$gl_cv_func_unsetenv_works" in
40844       *yes) ;;
40845       *)
40846         REPLACE_UNSETENV=1
40847         ;;
40848     esac
40849   fi
40850
40851
40852      if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
40853   GL_COND_OBJ_UNSETENV_TRUE=
40854   GL_COND_OBJ_UNSETENV_FALSE='#'
40855 else
40856   GL_COND_OBJ_UNSETENV_TRUE='#'
40857   GL_COND_OBJ_UNSETENV_FALSE=
40858 fi
40859 :
40860     if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
40861     GL_COND_OBJ_UNSETENV_TRUE='#'
40862     GL_COND_OBJ_UNSETENV_FALSE='#'
40863   fi
40864
40865   if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
40866
40867
40868
40869
40870
40871
40872 fi
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882           GL_GNULIB_UNSETENV=1
40883
40884
40885
40886
40887
40888 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
40889
40890
40891
40892
40893   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
40894 printf %s "checking for variable-length arrays... " >&6; }
40895 if test ${ac_cv_c_vararrays+y}
40896 then :
40897   printf %s "(cached) " >&6
40898 else case e in #(
40899   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40900 /* end confdefs.h.  */
40901         #ifndef __STDC_NO_VLA__
40902         #error __STDC_NO_VLA__ not defined
40903         #endif
40904
40905 _ACEOF
40906 if ac_fn_c_try_compile "$LINENO"
40907 then :
40908   ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
40909 else case e in #(
40910   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40911 /* end confdefs.h.  */
40912 /* Test for VLA support.  This test is partly inspired
40913                   from examples in the C standard.  Use at least two VLA
40914                   functions to detect the GCC 3.4.3 bug described in:
40915                   https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
40916                   */
40917                #ifdef __STDC_NO_VLA__
40918                 syntax error;
40919                #else
40920                  extern int n;
40921                  int B[100];
40922                  int fvla (int m, int C[m][m]);
40923
40924                  int
40925                  simple (int count, int all[static count])
40926                  {
40927                    return all[count - 1];
40928                  }
40929
40930                  int
40931                  fvla (int m, int C[m][m])
40932                  {
40933                    typedef int VLA[m][m];
40934                    VLA x;
40935                    int D[m];
40936                    static int (*q)[m] = &B;
40937                    int (*s)[n] = q;
40938                    return C && &x[0][0] == &D[0] && &D[0] == s[0];
40939                  }
40940                #endif
40941
40942 int
40943 main (void)
40944 {
40945
40946   ;
40947   return 0;
40948 }
40949 _ACEOF
40950 if ac_fn_c_try_compile "$LINENO"
40951 then :
40952   ac_cv_c_vararrays=yes
40953 else case e in #(
40954   e) ac_cv_c_vararrays=no ;;
40955 esac
40956 fi
40957 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40958 esac
40959 fi
40960 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40961 esac
40962 fi
40963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
40964 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
40965   if test "$ac_cv_c_vararrays" = yes; then
40966
40967 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
40968
40969   elif test "$ac_cv_c_vararrays" = no; then
40970
40971 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
40972
40973   fi
40974
40975
40976 # Check whether --with-packager was given.
40977 if test ${with_packager+y}
40978 then :
40979   withval=$with_packager;       case $withval in
40980         yes|no) ;;
40981         *)
40982 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
40983  ;;
40984       esac
40985
40986 fi
40987
40988
40989
40990 # Check whether --with-packager-version was given.
40991 if test ${with_packager_version+y}
40992 then :
40993   withval=$with_packager_version;       case $withval in
40994         yes|no) ;;
40995         *)
40996 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
40997  ;;
40998       esac
40999
41000 fi
41001
41002
41003
41004 # Check whether --with-packager-bug-reports was given.
41005 if test ${with_packager_bug_reports+y}
41006 then :
41007   withval=$with_packager_bug_reports;       case $withval in
41008         yes|no) ;;
41009         *)
41010 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
41011  ;;
41012       esac
41013
41014 fi
41015
41016
41017   if test "X$with_packager" = "X" && \
41018      test "X$with_packager_version$with_packager_bug_reports" != "X"
41019   then
41020     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
41021   fi
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042   if test $ac_cv_func_wcrtomb = no; then
41043     HAVE_WCRTOMB=0
41044     ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
41045       #include <wchar.h>
41046
41047 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41048 if test "x$ac_cv_have_decl_wcrtomb" = xyes
41049 then :
41050   ac_have_decl=1
41051 else case e in #(
41052   e) ac_have_decl=0 ;;
41053 esac
41054 fi
41055 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
41056
41057     if test $ac_cv_have_decl_wcrtomb = yes; then
41058                         REPLACE_WCRTOMB=1
41059     fi
41060   else
41061                         if test $REPLACE_WCRTOMB = 0; then
41062
41063
41064
41065
41066
41067              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
41068 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
41069 if test ${gl_cv_func_wcrtomb_works+y}
41070 then :
41071   printf %s "(cached) " >&6
41072 else case e in #(
41073   e) if test "$cross_compiling" = yes
41074 then :
41075   case "$host_os" in
41076                                # Guess no on Android.
41077               linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
41078                                # Guess yes otherwise.
41079               *)               gl_cv_func_wcrtomb_works="guessing yes";;
41080             esac
41081
41082 else case e in #(
41083   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41084 /* end confdefs.h.  */
41085
41086 #include <string.h>
41087 #include <stdlib.h>
41088 #include <wchar.h>
41089 int main ()
41090 {
41091   mbstate_t state;
41092   char out[64];
41093   int count;
41094   memset (&state, 0, sizeof (state));
41095   out[0] = 'x';
41096   count = wcrtomb (out, L'a', &state);
41097   return !(count == 1 && out[0] == 'a');
41098 }
41099 _ACEOF
41100 if ac_fn_c_try_run "$LINENO"
41101 then :
41102   gl_cv_func_wcrtomb_works=yes
41103 else case e in #(
41104   e) gl_cv_func_wcrtomb_works=no ;;
41105 esac
41106 fi
41107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41108   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41109 esac
41110 fi
41111
41112          ;;
41113 esac
41114 fi
41115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
41116 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
41117       case "$gl_cv_func_wcrtomb_works" in
41118         *yes) ;;
41119         *)
41120 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
41121
41122            REPLACE_WCRTOMB=1 ;;
41123       esac
41124     fi
41125     if test $REPLACE_WCRTOMB = 0; then
41126       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
41127 printf %s "checking whether wcrtomb return value is correct... " >&6; }
41128 if test ${gl_cv_func_wcrtomb_retval+y}
41129 then :
41130   printf %s "(cached) " >&6
41131 else case e in #(
41132   e)
41133                               case "$host_os" in
41134             # Guess no on AIX 4, OSF/1, Solaris, native Windows.
41135             aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
41136             # Guess yes otherwise.
41137             *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
41138           esac
41139           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
41140             if test "$cross_compiling" = yes
41141 then :
41142   :
41143 else case e in #(
41144   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41145 /* end confdefs.h.  */
41146
41147 #include <locale.h>
41148 #include <string.h>
41149 #include <wchar.h>
41150 #include <stdlib.h>
41151 int main ()
41152 {
41153   int result = 0;
41154   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
41155     {
41156       if (wcrtomb (NULL, 0, NULL) != 1)
41157         result |= 1;
41158     }
41159   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
41160     {
41161       if (wcrtomb (NULL, 0, NULL) != 1)
41162         result |= 2;
41163       {
41164         wchar_t wc = (wchar_t) 0xBADFACE;
41165         if (mbtowc (&wc, "\303\274", 2) == 2)
41166           if (wcrtomb (NULL, wc, NULL) != 1)
41167             result |= 2;
41168       }
41169     }
41170   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
41171     {
41172       if (wcrtomb (NULL, 0, NULL) != 1)
41173         result |= 4;
41174     }
41175   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
41176     {
41177       if (wcrtomb (NULL, 0, NULL) != 1)
41178         result |= 8;
41179     }
41180   return result;
41181 }
41182 _ACEOF
41183 if ac_fn_c_try_run "$LINENO"
41184 then :
41185   gl_cv_func_wcrtomb_retval=yes
41186 else case e in #(
41187   e) gl_cv_func_wcrtomb_retval=no ;;
41188 esac
41189 fi
41190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41191   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41192 esac
41193 fi
41194
41195           fi
41196          ;;
41197 esac
41198 fi
41199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
41200 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
41201       case "$gl_cv_func_wcrtomb_retval" in
41202         *yes) ;;
41203         *)
41204 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
41205
41206            REPLACE_WCRTOMB=1 ;;
41207       esac
41208     fi
41209   fi
41210
41211
41212      if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
41213   GL_COND_OBJ_WCRTOMB_TRUE=
41214   GL_COND_OBJ_WCRTOMB_FALSE='#'
41215 else
41216   GL_COND_OBJ_WCRTOMB_TRUE='#'
41217   GL_COND_OBJ_WCRTOMB_FALSE=
41218 fi
41219 :
41220     if test -z "${GL_COND_OBJ_WCRTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCRTOMB_FALSE}"; then
41221     GL_COND_OBJ_WCRTOMB_TRUE='#'
41222     GL_COND_OBJ_WCRTOMB_FALSE='#'
41223   fi
41224
41225   if test -z "$GL_COND_OBJ_WCRTOMB_TRUE"; then :
41226
41227
41228   :
41229
41230
41231 fi
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246           GL_GNULIB_WCRTOMB=1
41247
41248
41249
41250
41251
41252 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274   ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
41275     #include <wchar.h>
41276
41277 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41278 if test "x$ac_cv_have_decl_wcwidth" = xyes
41279 then :
41280   ac_have_decl=1
41281 else case e in #(
41282   e) ac_have_decl=0 ;;
41283 esac
41284 fi
41285 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
41286
41287   if test $ac_cv_have_decl_wcwidth != yes; then
41288     HAVE_DECL_WCWIDTH=0
41289   fi
41290
41291   if test $ac_cv_func_wcwidth != yes; then
41292     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
41293 printf %s "checking whether wcwidth is a macro... " >&6; }
41294 if test ${gl_cv_func_wcwidth_macro+y}
41295 then :
41296   printf %s "(cached) " >&6
41297 else case e in #(
41298   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41299 /* end confdefs.h.  */
41300
41301 #include <wchar.h>
41302 #ifdef wcwidth
41303  wchar_header_defines_wcwidth
41304 #endif
41305 _ACEOF
41306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41307   $EGREP_TRADITIONAL "wchar_header_defines_wcwidth" >/dev/null 2>&1
41308 then :
41309   gl_cv_func_wcwidth_macro=yes
41310 else case e in #(
41311   e) gl_cv_func_wcwidth_macro=no ;;
41312 esac
41313 fi
41314 rm -rf conftest*
41315
41316        ;;
41317 esac
41318 fi
41319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
41320 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
41321   fi
41322
41323   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
41324     HAVE_WCWIDTH=1
41325                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
41326 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
41327 if test ${gl_cv_func_wcwidth_works+y}
41328 then :
41329   printf %s "(cached) " >&6
41330 else case e in #(
41331   e)
41332         if test "$cross_compiling" = yes
41333 then :
41334
41335            case "$host_os" in
41336                                  # Guess yes on glibc systems.
41337              *-gnu* | gnu*)      gl_cv_func_wcwidth_works="guessing yes";;
41338                                  # Guess yes on musl systems.
41339              *-musl* | midipix*) gl_cv_func_wcwidth_works="guessing yes";;
41340                                  # Guess yes on AIX 7 systems.
41341              aix[7-9]*)          gl_cv_func_wcwidth_works="guessing yes";;
41342              *)                  gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
41343            esac
41344
41345 else case e in #(
41346   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41347 /* end confdefs.h.  */
41348
41349 #include <locale.h>
41350 #include <wchar.h>
41351 #if !HAVE_DECL_WCWIDTH
41352 extern
41353 # ifdef __cplusplus
41354 "C"
41355 # endif
41356 int wcwidth (int);
41357 #endif
41358 int main ()
41359 {
41360   int result = 0;
41361   if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
41362     {
41363       if (wcwidth (0x0301) > 0)
41364         result |= 1;
41365       if (wcwidth (0x05B0) > 0)
41366         result |= 2;
41367       if (wcwidth (0x200B) > 0)
41368         result |= 4;
41369       if (wcwidth (0xFF1A) == 0)
41370         result |= 8;
41371       if (wcwidth (0x2202) > 1)
41372         result |= 16;
41373     }
41374   return result;
41375 }
41376 _ACEOF
41377 if ac_fn_c_try_run "$LINENO"
41378 then :
41379   gl_cv_func_wcwidth_works=yes
41380 else case e in #(
41381   e) gl_cv_func_wcwidth_works=no ;;
41382 esac
41383 fi
41384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41385   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41386 esac
41387 fi
41388
41389        ;;
41390 esac
41391 fi
41392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
41393 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
41394     case "$gl_cv_func_wcwidth_works" in
41395       *yes) ;;
41396       *no) REPLACE_WCWIDTH=1 ;;
41397     esac
41398   else
41399     HAVE_WCWIDTH=0
41400   fi
41401
41402
41403      if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
41404   GL_COND_OBJ_WCWIDTH_TRUE=
41405   GL_COND_OBJ_WCWIDTH_FALSE='#'
41406 else
41407   GL_COND_OBJ_WCWIDTH_TRUE='#'
41408   GL_COND_OBJ_WCWIDTH_FALSE=
41409 fi
41410 :
41411     if test -z "${GL_COND_OBJ_WCWIDTH_TRUE}" && test -z "${GL_COND_OBJ_WCWIDTH_FALSE}"; then
41412     GL_COND_OBJ_WCWIDTH_TRUE='#'
41413     GL_COND_OBJ_WCWIDTH_FALSE='#'
41414   fi
41415
41416   if test -z "$GL_COND_OBJ_WCWIDTH_TRUE"; then :
41417
41418
41419
41420   :
41421
41422
41423 fi
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438           GL_GNULIB_WCWIDTH=1
41439
41440
41441
41442
41443
41444 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
41445
41446
41447
41448
41449
41450      if case "$host_os" in mingw*) true;; *) false;; esac; then
41451   GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
41452   GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
41453 else
41454   GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
41455   GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
41456 fi
41457 :
41458     if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
41459     GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
41460     GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
41461   fi
41462
41463
41464
41465      if case "$host_os" in mingw*) true;; *) false;; esac; then
41466   GL_COND_OBJ_WINDOWS_ONCE_TRUE=
41467   GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
41468 else
41469   GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
41470   GL_COND_OBJ_WINDOWS_ONCE_FALSE=
41471 fi
41472 :
41473     if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
41474     GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
41475     GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
41476   fi
41477
41478
41479
41480      if case "$host_os" in mingw*) true;; *) false;; esac; then
41481   GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
41482   GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
41483 else
41484   GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
41485   GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
41486 fi
41487 :
41488     if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
41489     GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
41490     GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
41491   fi
41492
41493
41494
41495      if case "$host_os" in mingw*) true;; *) false;; esac; then
41496   GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
41497   GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
41498 else
41499   GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
41500   GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
41501 fi
41502 :
41503     if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
41504     GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
41505     GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
41506   fi
41507
41508
41509
41510       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
41511 printf %s "checking for wmemchr... " >&6; }
41512 if test ${gl_cv_func_wmemchr+y}
41513 then :
41514   printf %s "(cached) " >&6
41515 else case e in #(
41516   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41517 /* end confdefs.h.  */
41518 #include <wchar.h>
41519
41520 int
41521 main (void)
41522 {
41523 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
41524   ;
41525   return 0;
41526 }
41527
41528 _ACEOF
41529 if ac_fn_c_try_link "$LINENO"
41530 then :
41531   gl_cv_func_wmemchr=yes
41532 else case e in #(
41533   e) gl_cv_func_wmemchr=no ;;
41534 esac
41535 fi
41536 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41537     conftest$ac_exeext conftest.$ac_ext
41538      ;;
41539 esac
41540 fi
41541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
41542 printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
41543   if test $gl_cv_func_wmemchr = no; then
41544     HAVE_WMEMCHR=0
41545   fi
41546
41547
41548      if test $HAVE_WMEMCHR = 0; then
41549   GL_COND_OBJ_WMEMCHR_TRUE=
41550   GL_COND_OBJ_WMEMCHR_FALSE='#'
41551 else
41552   GL_COND_OBJ_WMEMCHR_TRUE='#'
41553   GL_COND_OBJ_WMEMCHR_FALSE=
41554 fi
41555 :
41556     if test -z "${GL_COND_OBJ_WMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_WMEMCHR_FALSE}"; then
41557     GL_COND_OBJ_WMEMCHR_TRUE='#'
41558     GL_COND_OBJ_WMEMCHR_FALSE='#'
41559   fi
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575           GL_GNULIB_WMEMCHR=1
41576
41577
41578
41579
41580
41581 printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmempcpy" >&5
41595 printf %s "checking for wmempcpy... " >&6; }
41596 if test ${gl_cv_onwards_func_wmempcpy+y}
41597 then :
41598   printf %s "(cached) " >&6
41599 else case e in #(
41600   e)
41601   exec 9>&6 6>/dev/null
41602
41603        case "$host_os" in
41604
41605          linux*-android*)
41606            ac_fn_check_decl "$LINENO" "wmempcpy" "ac_cv_have_decl_wmempcpy" "#include <wchar.h>
41607 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41608 if test "x$ac_cv_have_decl_wmempcpy" = xyes
41609 then :
41610
41611 fi
41612            if test $ac_cv_have_decl_wmempcpy = yes; then
41613              ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
41614 if test "x$ac_cv_func_wmempcpy" = xyes
41615 then :
41616
41617 fi
41618
41619              if test $ac_cv_func_wmempcpy = yes; then
41620                gl_cv_onwards_func_wmempcpy=yes
41621              else
41622                                                             gl_cv_onwards_func_wmempcpy='future OS version'
41623              fi
41624            else
41625              gl_cv_onwards_func_wmempcpy='future OS version'
41626            fi
41627            ;;
41628
41629
41630          *)
41631            ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
41632 if test "x$ac_cv_func_wmempcpy" = xyes
41633 then :
41634
41635 fi
41636
41637            gl_cv_onwards_func_wmempcpy=$ac_cv_func_wmempcpy
41638            ;;
41639
41640        esac
41641
41642   exec 6>&9 9>&-
41643
41644      ;;
41645 esac
41646 fi
41647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_wmempcpy" >&5
41648 printf "%s\n" "$gl_cv_onwards_func_wmempcpy" >&6; }
41649
41650   case "$gl_cv_onwards_func_wmempcpy" in
41651     future*) ac_cv_func_wmempcpy=no ;;
41652     *)       ac_cv_func_wmempcpy=$gl_cv_onwards_func_wmempcpy ;;
41653   esac
41654   if test $ac_cv_func_wmempcpy = yes; then
41655
41656 printf "%s\n" "#define HAVE_WMEMPCPY 1" >>confdefs.h
41657
41658   fi
41659
41660
41661   if test $ac_cv_func_wmempcpy = no; then
41662     HAVE_WMEMPCPY=0
41663     case "$gl_cv_onwards_func_wmempcpy" in
41664       future*) REPLACE_WMEMPCPY=1 ;;
41665     esac
41666   fi
41667
41668
41669      if test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1; then
41670   GL_COND_OBJ_WMEMPCPY_TRUE=
41671   GL_COND_OBJ_WMEMPCPY_FALSE='#'
41672 else
41673   GL_COND_OBJ_WMEMPCPY_TRUE='#'
41674   GL_COND_OBJ_WMEMPCPY_FALSE=
41675 fi
41676 :
41677     if test -z "${GL_COND_OBJ_WMEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_WMEMPCPY_FALSE}"; then
41678     GL_COND_OBJ_WMEMPCPY_TRUE='#'
41679     GL_COND_OBJ_WMEMPCPY_FALSE='#'
41680   fi
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696           GL_GNULIB_WMEMPCPY=1
41697
41698
41699
41700
41701
41702 printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
41703
41704
41705
41706   :
41707
41708
41709 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
41710
41711
41712
41713
41714 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
41715
41716
41717
41718   :
41719
41720   # End of code from modules
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732   gltests_libdeps=
41733   gltests_ltlibdeps=
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748   gl_source_base='gnulib-tests'
41749   gl_source_base_prefix=
41750   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
41751
41752   gl_module_indicator_condition=$gltests_WITNESS
41753
41754
41755
41756      if test "$ac_cv_header_winsock2_h" = yes; then
41757   GL_COND_OBJ_ACCEPT_TRUE=
41758   GL_COND_OBJ_ACCEPT_FALSE='#'
41759 else
41760   GL_COND_OBJ_ACCEPT_TRUE='#'
41761   GL_COND_OBJ_ACCEPT_FALSE=
41762 fi
41763 :
41764     if test -z "${GL_COND_OBJ_ACCEPT_TRUE}" && test -z "${GL_COND_OBJ_ACCEPT_FALSE}"; then
41765     GL_COND_OBJ_ACCEPT_TRUE='#'
41766     GL_COND_OBJ_ACCEPT_FALSE='#'
41767   fi
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778     if test "$GL_GNULIB_ACCEPT" != 1; then
41779         if test "$GL_GNULIB_ACCEPT" = 0; then
41780       GL_GNULIB_ACCEPT=$gl_module_indicator_condition
41781     else
41782       GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
41783     fi
41784   fi
41785
41786
41787
41788
41789
41790 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803   ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
41804 if test "x$ac_cv_func_atoll" = xyes
41805 then :
41806   printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
41807
41808 fi
41809
41810   if test $ac_cv_func_atoll = no; then
41811     HAVE_ATOLL=0
41812   fi
41813
41814
41815      if test $HAVE_ATOLL = 0; then
41816   GL_COND_OBJ_ATOLL_TRUE=
41817   GL_COND_OBJ_ATOLL_FALSE='#'
41818 else
41819   GL_COND_OBJ_ATOLL_TRUE='#'
41820   GL_COND_OBJ_ATOLL_FALSE=
41821 fi
41822 :
41823     if test -z "${GL_COND_OBJ_ATOLL_TRUE}" && test -z "${GL_COND_OBJ_ATOLL_FALSE}"; then
41824     GL_COND_OBJ_ATOLL_TRUE='#'
41825     GL_COND_OBJ_ATOLL_FALSE='#'
41826   fi
41827
41828   if test -z "$GL_COND_OBJ_ATOLL_TRUE"; then :
41829
41830
41831   :
41832
41833
41834 fi
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844     if test "$GL_GNULIB_ATOLL" != 1; then
41845         if test "$GL_GNULIB_ATOLL" = 0; then
41846       GL_GNULIB_ATOLL=$gl_module_indicator_condition
41847     else
41848       GL_GNULIB_ATOLL="($GL_GNULIB_ATOLL || $gl_module_indicator_condition)"
41849     fi
41850   fi
41851
41852
41853
41854
41855
41856 printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
41857
41858
41859
41860
41861
41862      if test "$ac_cv_header_winsock2_h" = yes; then
41863   GL_COND_OBJ_BIND_TRUE=
41864   GL_COND_OBJ_BIND_FALSE='#'
41865 else
41866   GL_COND_OBJ_BIND_TRUE='#'
41867   GL_COND_OBJ_BIND_FALSE=
41868 fi
41869 :
41870     if test -z "${GL_COND_OBJ_BIND_TRUE}" && test -z "${GL_COND_OBJ_BIND_FALSE}"; then
41871     GL_COND_OBJ_BIND_TRUE='#'
41872     GL_COND_OBJ_BIND_FALSE='#'
41873   fi
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884     if test "$GL_GNULIB_BIND" != 1; then
41885         if test "$GL_GNULIB_BIND" = 0; then
41886       GL_GNULIB_BIND=$gl_module_indicator_condition
41887     else
41888       GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
41889     fi
41890   fi
41891
41892
41893
41894
41895
41896 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906      if test "$ac_cv_header_winsock2_h" = yes; then
41907   GL_COND_OBJ_CONNECT_TRUE=
41908   GL_COND_OBJ_CONNECT_FALSE='#'
41909 else
41910   GL_COND_OBJ_CONNECT_TRUE='#'
41911   GL_COND_OBJ_CONNECT_FALSE=
41912 fi
41913 :
41914     if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
41915     GL_COND_OBJ_CONNECT_TRUE='#'
41916     GL_COND_OBJ_CONNECT_FALSE='#'
41917   fi
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928     if test "$GL_GNULIB_CONNECT" != 1; then
41929         if test "$GL_GNULIB_CONNECT" = 0; then
41930       GL_GNULIB_CONNECT=$gl_module_indicator_condition
41931     else
41932       GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
41933     fi
41934   fi
41935
41936
41937
41938
41939
41940 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
41941
41942
41943
41944
41945
41946
41947
41948     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
41949       REPLACE_FDOPEN=1
41950     fi
41951
41952   if test $REPLACE_FDOPEN = 0; then
41953         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
41954 printf %s "checking whether fdopen sets errno... " >&6; }
41955 if test ${gl_cv_func_fdopen_works+y}
41956 then :
41957   printf %s "(cached) " >&6
41958 else case e in #(
41959   e)
41960         if test "$cross_compiling" = yes
41961 then :
41962   case "$host_os" in
41963              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
41964              *)      gl_cv_func_fdopen_works="guessing yes" ;;
41965            esac
41966
41967 else case e in #(
41968   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41969 /* end confdefs.h.  */
41970
41971 #include <stdio.h>
41972 #include <errno.h>
41973
41974
41975 $gl_mda_defines
41976
41977 int
41978 main (void)
41979 {
41980   FILE *fp;
41981   errno = 0;
41982   fp = fdopen (-1, "r");
41983   if (fp == NULL && errno == 0)
41984     return 1;
41985   return 0;
41986 }
41987 _ACEOF
41988 if ac_fn_c_try_run "$LINENO"
41989 then :
41990   gl_cv_func_fdopen_works=yes
41991 else case e in #(
41992   e) gl_cv_func_fdopen_works=no ;;
41993 esac
41994 fi
41995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41996   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41997 esac
41998 fi
41999
42000        ;;
42001 esac
42002 fi
42003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
42004 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
42005     case "$gl_cv_func_fdopen_works" in
42006       *no) REPLACE_FDOPEN=1 ;;
42007     esac
42008   fi
42009
42010
42011      if test $REPLACE_FDOPEN = 1; then
42012   GL_COND_OBJ_FDOPEN_TRUE=
42013   GL_COND_OBJ_FDOPEN_FALSE='#'
42014 else
42015   GL_COND_OBJ_FDOPEN_TRUE='#'
42016   GL_COND_OBJ_FDOPEN_FALSE=
42017 fi
42018 :
42019     if test -z "${GL_COND_OBJ_FDOPEN_TRUE}" && test -z "${GL_COND_OBJ_FDOPEN_FALSE}"; then
42020     GL_COND_OBJ_FDOPEN_TRUE='#'
42021     GL_COND_OBJ_FDOPEN_FALSE='#'
42022   fi
42023
42024   if test -z "$GL_COND_OBJ_FDOPEN_TRUE"; then :
42025
42026
42027
42028 fi
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038     if test "$GL_GNULIB_FDOPEN" != 1; then
42039         if test "$GL_GNULIB_FDOPEN" = 0; then
42040       GL_GNULIB_FDOPEN=$gl_module_indicator_condition
42041     else
42042       GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
42043     fi
42044   fi
42045
42046
42047
42048
42049
42050 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
42051
42052
42053
42054
42055
42056
42057   GL_GENERATE_FLOAT_H=false
42058   REPLACE_FLOAT_LDBL=0
42059   case "$host_os" in
42060     aix* | beos* | openbsd* | mirbsd* | irix*)
42061       GL_GENERATE_FLOAT_H=true
42062       ;;
42063     freebsd* | dragonfly*)
42064       case "$host_cpu" in
42065         i[34567]86 )
42066           GL_GENERATE_FLOAT_H=true
42067           ;;
42068         x86_64 )
42069           # On x86_64 systems, the C compiler may still be generating
42070           # 32-bit code.
42071           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42072 /* end confdefs.h.  */
42073 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
42074                   int ok;
42075                  #else
42076                   error fail
42077                  #endif
42078
42079 _ACEOF
42080 if ac_fn_c_try_compile "$LINENO"
42081 then :
42082
42083 else case e in #(
42084   e) GL_GENERATE_FLOAT_H=true ;;
42085 esac
42086 fi
42087 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42088           ;;
42089       esac
42090       ;;
42091     linux*)
42092       case "$host_cpu" in
42093         powerpc*)
42094           GL_GENERATE_FLOAT_H=true
42095           ;;
42096       esac
42097       ;;
42098   esac
42099   case "$host_os" in
42100     aix* | freebsd* | dragonfly* | linux*)
42101       if $GL_GENERATE_FLOAT_H; then
42102         REPLACE_FLOAT_LDBL=1
42103       fi
42104       ;;
42105   esac
42106
42107     REPLACE_ITOLD=0
42108   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
42109 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
42110 if test ${gl_cv_func_itold_works+y}
42111 then :
42112   printf %s "(cached) " >&6
42113 else case e in #(
42114   e)
42115       if test "$cross_compiling" = yes
42116 then :
42117   case "$host" in
42118            sparc*-*-linux*)
42119              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42120 /* end confdefs.h.  */
42121 #if defined __LP64__ || defined __arch64__
42122                     int ok;
42123                    #else
42124                     error fail
42125                    #endif
42126
42127 _ACEOF
42128 if ac_fn_c_try_compile "$LINENO"
42129 then :
42130   gl_cv_func_itold_works="guessing no"
42131 else case e in #(
42132   e) gl_cv_func_itold_works="guessing yes" ;;
42133 esac
42134 fi
42135 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42136              ;;
42137                    # Guess yes on native Windows.
42138            mingw*) gl_cv_func_itold_works="guessing yes" ;;
42139            *)      gl_cv_func_itold_works="guessing yes" ;;
42140          esac
42141
42142 else case e in #(
42143   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42144 /* end confdefs.h.  */
42145
42146 int i = -1;
42147 volatile long double ld;
42148 int main ()
42149 {
42150   ld += i * 1.0L;
42151   if (ld > 0)
42152     return 1;
42153   return 0;
42154 }
42155 _ACEOF
42156 if ac_fn_c_try_run "$LINENO"
42157 then :
42158   gl_cv_func_itold_works=yes
42159 else case e in #(
42160   e) gl_cv_func_itold_works=no ;;
42161 esac
42162 fi
42163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42164   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42165 esac
42166 fi
42167
42168      ;;
42169 esac
42170 fi
42171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
42172 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
42173   case "$gl_cv_func_itold_works" in
42174     *no)
42175       REPLACE_ITOLD=1
42176                   GL_GENERATE_FLOAT_H=true
42177       ;;
42178   esac
42179
42180   if $GL_GENERATE_FLOAT_H; then
42181
42182
42183
42184
42185
42186
42187
42188
42189      if test $gl_cv_have_include_next = yes; then
42190        gl_cv_next_float_h='<'float.h'>'
42191      else
42192        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
42193 printf %s "checking absolute name of <float.h>... " >&6; }
42194 if test ${gl_cv_next_float_h+y}
42195 then :
42196   printf %s "(cached) " >&6
42197 else case e in #(
42198   e)
42199
42200
42201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42202 /* end confdefs.h.  */
42203 #include <float.h>
42204 _ACEOF
42205                 case "$host_os" in
42206     aix*) gl_absname_cpp="$ac_cpp -C" ;;
42207     *)    gl_absname_cpp="$ac_cpp" ;;
42208   esac
42209
42210   case "$host_os" in
42211     mingw*)
42212                                           gl_dirsep_regex='[/\\]'
42213       ;;
42214     *)
42215       gl_dirsep_regex='\/'
42216       ;;
42217   esac
42218       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42219   gl_header_literal_regex=`echo 'float.h' \
42220                            | sed -e "$gl_make_literal_regex_sed"`
42221   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42222       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42223       s|^/[^/]|//&|
42224       p
42225       q
42226     }'
42227
42228         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42229   sed -n "$gl_absolute_header_sed"`
42230
42231           gl_header=$gl_cv_absolute_float_h
42232           gl_cv_next_float_h='"'$gl_header'"'
42233
42234           ;;
42235 esac
42236 fi
42237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
42238 printf "%s\n" "$gl_cv_next_float_h" >&6; }
42239      fi
42240      NEXT_FLOAT_H=$gl_cv_next_float_h
42241
42242      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42243        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42244        gl_next_as_first_directive='<'float.h'>'
42245      else
42246        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42247        gl_next_as_first_directive=$gl_cv_next_float_h
42248      fi
42249      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
42250
42251
42252
42253
42254   fi
42255
42256
42257
42258
42259
42260
42261   case "$GL_GENERATE_FLOAT_H" in
42262     false) FLOAT_H='' ;;
42263     true)
42264                   if test -z "$FLOAT_H"; then
42265         FLOAT_H="${gl_source_base_prefix}float.h"
42266       fi
42267       ;;
42268     *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
42269   esac
42270
42271
42272      if $GL_GENERATE_FLOAT_H; then
42273   GL_GENERATE_FLOAT_H_TRUE=
42274   GL_GENERATE_FLOAT_H_FALSE='#'
42275 else
42276   GL_GENERATE_FLOAT_H_TRUE='#'
42277   GL_GENERATE_FLOAT_H_FALSE=
42278 fi
42279 :
42280     if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
42281     GL_GENERATE_FLOAT_H_TRUE='#'
42282     GL_GENERATE_FLOAT_H_FALSE='#'
42283   fi
42284
42285
42286
42287
42288
42289
42290
42291      if test $REPLACE_FLOAT_LDBL = 1; then
42292   GL_COND_OBJ_FLOAT_TRUE=
42293   GL_COND_OBJ_FLOAT_FALSE='#'
42294 else
42295   GL_COND_OBJ_FLOAT_TRUE='#'
42296   GL_COND_OBJ_FLOAT_FALSE=
42297 fi
42298 :
42299     if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then
42300     GL_COND_OBJ_FLOAT_TRUE='#'
42301     GL_COND_OBJ_FLOAT_FALSE='#'
42302   fi
42303
42304
42305      if test $REPLACE_ITOLD = 1; then
42306   GL_COND_OBJ_ITOLD_TRUE=
42307   GL_COND_OBJ_ITOLD_FALSE='#'
42308 else
42309   GL_COND_OBJ_ITOLD_TRUE='#'
42310   GL_COND_OBJ_ITOLD_FALSE=
42311 fi
42312 :
42313     if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then
42314     GL_COND_OBJ_ITOLD_TRUE='#'
42315     GL_COND_OBJ_ITOLD_FALSE='#'
42316   fi
42317
42318
42319
42320
42321
42322   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftruncate" >&5
42323 printf %s "checking for ftruncate... " >&6; }
42324 if test ${gl_cv_onwards_func_ftruncate+y}
42325 then :
42326   printf %s "(cached) " >&6
42327 else case e in #(
42328   e)
42329   exec 9>&6 6>/dev/null
42330
42331        case "$host_os" in
42332
42333          linux*-android*)
42334            ac_fn_check_decl "$LINENO" "ftruncate" "ac_cv_have_decl_ftruncate" "#include <unistd.h>
42335 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42336 if test "x$ac_cv_have_decl_ftruncate" = xyes
42337 then :
42338
42339 fi
42340            if test $ac_cv_have_decl_ftruncate = yes; then
42341              ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
42342 if test "x$ac_cv_func_ftruncate" = xyes
42343 then :
42344
42345 fi
42346
42347              if test $ac_cv_func_ftruncate = yes; then
42348                gl_cv_onwards_func_ftruncate=yes
42349              else
42350                                                             gl_cv_onwards_func_ftruncate='future OS version'
42351              fi
42352            else
42353              gl_cv_onwards_func_ftruncate='future OS version'
42354            fi
42355            ;;
42356
42357
42358          *)
42359            ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
42360 if test "x$ac_cv_func_ftruncate" = xyes
42361 then :
42362
42363 fi
42364
42365            gl_cv_onwards_func_ftruncate=$ac_cv_func_ftruncate
42366            ;;
42367
42368        esac
42369
42370   exec 6>&9 9>&-
42371
42372      ;;
42373 esac
42374 fi
42375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_ftruncate" >&5
42376 printf "%s\n" "$gl_cv_onwards_func_ftruncate" >&6; }
42377
42378   case "$gl_cv_onwards_func_ftruncate" in
42379     future*) ac_cv_func_ftruncate=no ;;
42380     *)       ac_cv_func_ftruncate=$gl_cv_onwards_func_ftruncate ;;
42381   esac
42382   if test $ac_cv_func_ftruncate = yes; then
42383
42384 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
42385
42386   fi
42387
42388
42389   if test $ac_cv_func_ftruncate = yes; then
42390
42391
42392       case "$host_os" in
42393         mingw*)
42394                                                                       REPLACE_FTRUNCATE=1
42395           ;;
42396       esac
42397
42398   else
42399     HAVE_FTRUNCATE=0
42400     case "$gl_cv_onwards_func_ftruncate" in
42401       future*) REPLACE_FTRUNCATE=1 ;;
42402     esac
42403   fi
42404
42405
42406      if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
42407   GL_COND_OBJ_FTRUNCATE_TRUE=
42408   GL_COND_OBJ_FTRUNCATE_FALSE='#'
42409 else
42410   GL_COND_OBJ_FTRUNCATE_TRUE='#'
42411   GL_COND_OBJ_FTRUNCATE_FALSE=
42412 fi
42413 :
42414     if test -z "${GL_COND_OBJ_FTRUNCATE_TRUE}" && test -z "${GL_COND_OBJ_FTRUNCATE_FALSE}"; then
42415     GL_COND_OBJ_FTRUNCATE_TRUE='#'
42416     GL_COND_OBJ_FTRUNCATE_FALSE='#'
42417   fi
42418
42419   if test -z "$GL_COND_OBJ_FTRUNCATE_TRUE"; then :
42420
42421
42422   ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
42423 if test "x$ac_cv_func__chsize" = xyes
42424 then :
42425   printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
42426
42427 fi
42428
42429
42430
42431 fi
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441     if test "$GL_GNULIB_FTRUNCATE" != 1; then
42442         if test "$GL_GNULIB_FTRUNCATE" = 0; then
42443       GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
42444     else
42445       GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
42446     fi
42447   fi
42448
42449
42450
42451
42452
42453 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
42454
42455
42456
42457
42458
42459
42460
42461
42462   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
42463   *yes,yes) ;;
42464   *)
42465         REPLACE_GETCWD=1
42466     ;;
42467   esac
42468
42469
42470      if test $REPLACE_GETCWD = 1; then
42471   GL_COND_OBJ_GETCWD_LGPL_TRUE=
42472   GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
42473 else
42474   GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
42475   GL_COND_OBJ_GETCWD_LGPL_FALSE=
42476 fi
42477 :
42478     if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
42479     GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
42480     GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
42481   fi
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492     if test "$GL_GNULIB_GETCWD" != 1; then
42493         if test "$GL_GNULIB_GETCWD" = 0; then
42494       GL_GNULIB_GETCWD=$gl_module_indicator_condition
42495     else
42496       GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
42497     fi
42498   fi
42499
42500
42501
42502
42503
42504 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
42505
42506
42507
42508
42509
42510
42511   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for duplocale" >&5
42512 printf %s "checking for duplocale... " >&6; }
42513 if test ${gl_cv_onwards_func_duplocale+y}
42514 then :
42515   printf %s "(cached) " >&6
42516 else case e in #(
42517   e)
42518   exec 9>&6 6>/dev/null
42519
42520        case "$host_os" in
42521
42522          linux*-android*)
42523            ac_fn_check_decl "$LINENO" "duplocale" "ac_cv_have_decl_duplocale" "#include <locale.h>
42524 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42525 if test "x$ac_cv_have_decl_duplocale" = xyes
42526 then :
42527
42528 fi
42529            if test $ac_cv_have_decl_duplocale = yes; then
42530              ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
42531 if test "x$ac_cv_func_duplocale" = xyes
42532 then :
42533
42534 fi
42535
42536              if test $ac_cv_func_duplocale = yes; then
42537                gl_cv_onwards_func_duplocale=yes
42538              else
42539                                                             gl_cv_onwards_func_duplocale='future OS version'
42540              fi
42541            else
42542              gl_cv_onwards_func_duplocale='future OS version'
42543            fi
42544            ;;
42545
42546
42547          *)
42548            ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
42549 if test "x$ac_cv_func_duplocale" = xyes
42550 then :
42551
42552 fi
42553
42554            gl_cv_onwards_func_duplocale=$ac_cv_func_duplocale
42555            ;;
42556
42557        esac
42558
42559   exec 6>&9 9>&-
42560
42561      ;;
42562 esac
42563 fi
42564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_duplocale" >&5
42565 printf "%s\n" "$gl_cv_onwards_func_duplocale" >&6; }
42566
42567   case "$gl_cv_onwards_func_duplocale" in
42568     future*) ac_cv_func_duplocale=no ;;
42569     *)       ac_cv_func_duplocale=$gl_cv_onwards_func_duplocale ;;
42570   esac
42571   if test $ac_cv_func_duplocale = yes; then
42572
42573 printf "%s\n" "#define HAVE_DUPLOCALE 1" >>confdefs.h
42574
42575   fi
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585                 HAVE_INET_PTON=1
42586   INET_PTON_LIB=
42587
42588
42589
42590
42591   if test $ac_cv_header_sys_socket_h != yes; then
42592                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
42593 if test "x$ac_cv_header_winsock2_h" = xyes
42594 then :
42595   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
42596
42597 fi
42598
42599   fi
42600   if test "$ac_cv_header_winsock2_h" = yes; then
42601     HAVE_WINSOCK2_H=1
42602     UNISTD_H_HAVE_WINSOCK2_H=1
42603     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
42604   else
42605     HAVE_WINSOCK2_H=0
42606   fi
42607
42608
42609   if test $HAVE_WINSOCK2_H = 1; then
42610                     REPLACE_INET_PTON=1
42611     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
42612 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42613 if test "x$ac_cv_have_decl_inet_pton" = xyes
42614 then :
42615   ac_have_decl=1
42616 else case e in #(
42617   e) ac_have_decl=0 ;;
42618 esac
42619 fi
42620 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
42621
42622     if test $ac_cv_have_decl_inet_pton = yes; then
42623       INET_PTON_LIB="-lws2_32"
42624     else
42625       HAVE_DECL_INET_PTON=0
42626     fi
42627   else
42628     gl_save_LIBS=$LIBS
42629     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
42630 printf %s "checking for library containing inet_pton... " >&6; }
42631 if test ${ac_cv_search_inet_pton+y}
42632 then :
42633   printf %s "(cached) " >&6
42634 else case e in #(
42635   e) ac_func_search_save_LIBS=$LIBS
42636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42637 /* end confdefs.h.  */
42638
42639 /* Override any GCC internal prototype to avoid an error.
42640    Use char because int might match the return type of a GCC
42641    builtin and then its argument prototype would still apply.
42642    The 'extern "C"' is for builds by C++ compilers;
42643    although this is not generally supported in C code supporting it here
42644    has little cost and some practical benefit (sr 110532).  */
42645 #ifdef __cplusplus
42646 extern "C"
42647 #endif
42648 char inet_pton (void);
42649 int
42650 main (void)
42651 {
42652 return inet_pton ();
42653   ;
42654   return 0;
42655 }
42656 _ACEOF
42657 for ac_lib in '' nsl resolv network
42658 do
42659   if test -z "$ac_lib"; then
42660     ac_res="none required"
42661   else
42662     ac_res=-l$ac_lib
42663     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
42664   fi
42665   if ac_fn_c_try_link "$LINENO"
42666 then :
42667   ac_cv_search_inet_pton=$ac_res
42668 fi
42669 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42670     conftest$ac_exeext
42671   if test ${ac_cv_search_inet_pton+y}
42672 then :
42673   break
42674 fi
42675 done
42676 if test ${ac_cv_search_inet_pton+y}
42677 then :
42678
42679 else case e in #(
42680   e) ac_cv_search_inet_pton=no ;;
42681 esac
42682 fi
42683 rm conftest.$ac_ext
42684 LIBS=$ac_func_search_save_LIBS ;;
42685 esac
42686 fi
42687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
42688 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
42689 ac_res=$ac_cv_search_inet_pton
42690 if test "$ac_res" != no
42691 then :
42692   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
42693
42694 else case e in #(
42695   e) ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
42696 if test "x$ac_cv_func_inet_pton" = xyes
42697 then :
42698   printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
42699
42700 fi
42701
42702        if test $ac_cv_func_inet_pton = no; then
42703          HAVE_INET_PTON=0
42704        fi
42705        ;;
42706 esac
42707 fi
42708
42709     LIBS=$gl_save_LIBS
42710
42711     if test "$ac_cv_search_inet_pton" != "no" \
42712        && test "$ac_cv_search_inet_pton" != "none required"; then
42713       INET_PTON_LIB="$ac_cv_search_inet_pton"
42714     fi
42715
42716
42717     ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
42718         #if HAVE_NETDB_H
42719         # include <netdb.h>
42720         #endif
42721
42722 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42723 if test "x$ac_cv_have_decl_inet_pton" = xyes
42724 then :
42725   ac_have_decl=1
42726 else case e in #(
42727   e) ac_have_decl=0 ;;
42728 esac
42729 fi
42730 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
42731
42732     if test $ac_cv_have_decl_inet_pton = no; then
42733       HAVE_DECL_INET_PTON=0
42734     fi
42735   fi
42736
42737
42738
42739      if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
42740   GL_COND_OBJ_INET_PTON_TRUE=
42741   GL_COND_OBJ_INET_PTON_FALSE='#'
42742 else
42743   GL_COND_OBJ_INET_PTON_TRUE='#'
42744   GL_COND_OBJ_INET_PTON_FALSE=
42745 fi
42746 :
42747     if test -z "${GL_COND_OBJ_INET_PTON_TRUE}" && test -z "${GL_COND_OBJ_INET_PTON_FALSE}"; then
42748     GL_COND_OBJ_INET_PTON_TRUE='#'
42749     GL_COND_OBJ_INET_PTON_FALSE='#'
42750   fi
42751
42752   if test -z "$GL_COND_OBJ_INET_PTON_TRUE"; then :
42753
42754
42755
42756
42757
42758 fi
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768     if test "$GL_GNULIB_INET_PTON" != 1; then
42769         if test "$GL_GNULIB_INET_PTON" = 0; then
42770       GL_GNULIB_INET_PTON=$gl_module_indicator_condition
42771     else
42772       GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
42773     fi
42774   fi
42775
42776
42777
42778
42779    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42780 printf %s "checking whether byte ordering is bigendian... " >&6; }
42781 if test ${ac_cv_c_bigendian+y}
42782 then :
42783   printf %s "(cached) " >&6
42784 else case e in #(
42785   e) ac_cv_c_bigendian=unknown
42786     # See if we're dealing with a universal compiler.
42787     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42788 /* end confdefs.h.  */
42789 #ifndef __APPLE_CC__
42790                not a universal capable compiler
42791              #endif
42792              typedef int dummy;
42793
42794 _ACEOF
42795 if ac_fn_c_try_compile "$LINENO"
42796 then :
42797
42798         # Check for potential -arch flags.  It is not universal unless
42799         # there are at least two -arch flags with different values.
42800         ac_arch=
42801         ac_prev=
42802         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42803          if test -n "$ac_prev"; then
42804            case $ac_word in
42805              i?86 | x86_64 | ppc | ppc64)
42806                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42807                  ac_arch=$ac_word
42808                else
42809                  ac_cv_c_bigendian=universal
42810                  break
42811                fi
42812                ;;
42813            esac
42814            ac_prev=
42815          elif test "x$ac_word" = "x-arch"; then
42816            ac_prev=arch
42817          fi
42818        done
42819 fi
42820 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42821     if test $ac_cv_c_bigendian = unknown; then
42822       # See if sys/param.h defines the BYTE_ORDER macro.
42823       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42824 /* end confdefs.h.  */
42825 #include <sys/types.h>
42826              #include <sys/param.h>
42827
42828 int
42829 main (void)
42830 {
42831 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
42832                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
42833                      && LITTLE_ENDIAN)
42834               bogus endian macros
42835              #endif
42836
42837   ;
42838   return 0;
42839 }
42840 _ACEOF
42841 if ac_fn_c_try_compile "$LINENO"
42842 then :
42843   # It does; now see whether it defined to BIG_ENDIAN or not.
42844          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42845 /* end confdefs.h.  */
42846 #include <sys/types.h>
42847                 #include <sys/param.h>
42848
42849 int
42850 main (void)
42851 {
42852 #if BYTE_ORDER != BIG_ENDIAN
42853                  not big endian
42854                 #endif
42855
42856   ;
42857   return 0;
42858 }
42859 _ACEOF
42860 if ac_fn_c_try_compile "$LINENO"
42861 then :
42862   ac_cv_c_bigendian=yes
42863 else case e in #(
42864   e) ac_cv_c_bigendian=no ;;
42865 esac
42866 fi
42867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42868 fi
42869 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42870     fi
42871     if test $ac_cv_c_bigendian = unknown; then
42872       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42873       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42874 /* end confdefs.h.  */
42875 #include <limits.h>
42876
42877 int
42878 main (void)
42879 {
42880 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42881               bogus endian macros
42882              #endif
42883
42884   ;
42885   return 0;
42886 }
42887 _ACEOF
42888 if ac_fn_c_try_compile "$LINENO"
42889 then :
42890   # It does; now see whether it defined to _BIG_ENDIAN or not.
42891          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42892 /* end confdefs.h.  */
42893 #include <limits.h>
42894
42895 int
42896 main (void)
42897 {
42898 #ifndef _BIG_ENDIAN
42899                  not big endian
42900                 #endif
42901
42902   ;
42903   return 0;
42904 }
42905 _ACEOF
42906 if ac_fn_c_try_compile "$LINENO"
42907 then :
42908   ac_cv_c_bigendian=yes
42909 else case e in #(
42910   e) ac_cv_c_bigendian=no ;;
42911 esac
42912 fi
42913 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42914 fi
42915 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42916     fi
42917     if test $ac_cv_c_bigendian = unknown; then
42918       # Compile a test program.
42919       if test "$cross_compiling" = yes
42920 then :
42921   # Try to guess by grepping values from an object file.
42922          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42923 /* end confdefs.h.  */
42924 unsigned short int ascii_mm[] =
42925                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42926                 unsigned short int ascii_ii[] =
42927                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42928                 int use_ascii (int i) {
42929                   return ascii_mm[i] + ascii_ii[i];
42930                 }
42931                 unsigned short int ebcdic_ii[] =
42932                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42933                 unsigned short int ebcdic_mm[] =
42934                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42935                 int use_ebcdic (int i) {
42936                   return ebcdic_mm[i] + ebcdic_ii[i];
42937                 }
42938                 int
42939                 main (int argc, char **argv)
42940                 {
42941                   /* Intimidate the compiler so that it does not
42942                      optimize the arrays away.  */
42943                   char *p = argv[0];
42944                   ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
42945                   ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
42946                   return use_ascii (argc) == use_ebcdic (*p);
42947                 }
42948 _ACEOF
42949 if ac_fn_c_try_link "$LINENO"
42950 then :
42951   if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
42952               ac_cv_c_bigendian=yes
42953             fi
42954             if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
42955               if test "$ac_cv_c_bigendian" = unknown; then
42956                 ac_cv_c_bigendian=no
42957               else
42958                 # finding both strings is unlikely to happen, but who knows?
42959                 ac_cv_c_bigendian=unknown
42960               fi
42961             fi
42962 fi
42963 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42964     conftest$ac_exeext conftest.$ac_ext
42965 else case e in #(
42966   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42967 /* end confdefs.h.  */
42968 $ac_includes_default
42969 int
42970 main (void)
42971 {
42972
42973              /* Are we little or big endian?  From Harbison&Steele.  */
42974              union
42975              {
42976                long int l;
42977                char c[sizeof (long int)];
42978              } u;
42979              u.l = 1;
42980              return u.c[sizeof (long int) - 1] == 1;
42981
42982   ;
42983   return 0;
42984 }
42985 _ACEOF
42986 if ac_fn_c_try_run "$LINENO"
42987 then :
42988   ac_cv_c_bigendian=no
42989 else case e in #(
42990   e) ac_cv_c_bigendian=yes ;;
42991 esac
42992 fi
42993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42994   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42995 esac
42996 fi
42997
42998     fi ;;
42999 esac
43000 fi
43001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
43002 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
43003  case $ac_cv_c_bigendian in #(
43004    yes)
43005      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
43006 ;; #(
43007    no)
43008       ;; #(
43009    universal)
43010
43011 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
43012
43013      ;; #(
43014    *)
43015      as_fn_error $? "unknown endianness
43016  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
43017  esac
43018
43019
43020
43021
43022   HAVE_IOCTL=1
43023   if test "$ac_cv_header_winsock2_h" = yes; then
43024                 HAVE_IOCTL=0
43025   else
43026     ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
43027 if test "x$ac_cv_func_ioctl" = xyes
43028 then :
43029   printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
43030
43031 fi
43032
43033                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
43034 printf %s "checking for ioctl with POSIX signature... " >&6; }
43035 if test ${gl_cv_func_ioctl_posix_signature+y}
43036 then :
43037   printf %s "(cached) " >&6
43038 else case e in #(
43039   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43040 /* end confdefs.h.  */
43041 #include <sys/ioctl.h>
43042               /* On some platforms, ioctl() is declared in <unistd.h>.  */
43043               #include <unistd.h>
43044
43045 int
43046 main (void)
43047 {
43048 extern
43049               #ifdef __cplusplus
43050               "C"
43051               #endif
43052               int ioctl (int, int, ...);
43053
43054   ;
43055   return 0;
43056 }
43057
43058 _ACEOF
43059 if ac_fn_c_try_compile "$LINENO"
43060 then :
43061   gl_cv_func_ioctl_posix_signature=yes
43062 else case e in #(
43063   e) gl_cv_func_ioctl_posix_signature=no ;;
43064 esac
43065 fi
43066 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43067        ;;
43068 esac
43069 fi
43070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
43071 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
43072     if test $gl_cv_func_ioctl_posix_signature != yes; then
43073       REPLACE_IOCTL=1
43074     fi
43075   fi
43076
43077
43078      if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
43079   GL_COND_OBJ_IOCTL_TRUE=
43080   GL_COND_OBJ_IOCTL_FALSE='#'
43081 else
43082   GL_COND_OBJ_IOCTL_TRUE='#'
43083   GL_COND_OBJ_IOCTL_FALSE=
43084 fi
43085 :
43086     if test -z "${GL_COND_OBJ_IOCTL_TRUE}" && test -z "${GL_COND_OBJ_IOCTL_FALSE}"; then
43087     GL_COND_OBJ_IOCTL_TRUE='#'
43088     GL_COND_OBJ_IOCTL_FALSE='#'
43089   fi
43090
43091
43092
43093
43094
43095
43096
43097
43098
43099
43100     if test "$GL_GNULIB_IOCTL" != 1; then
43101         if test "$GL_GNULIB_IOCTL" = 0; then
43102       GL_GNULIB_IOCTL=$gl_module_indicator_condition
43103     else
43104       GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
43105     fi
43106   fi
43107
43108
43109
43110
43111
43112 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
43113
43114
43115
43116
43117
43118
43119
43120
43121
43122
43123
43124
43125
43126      if test "$ac_cv_header_winsock2_h" = yes; then
43127   GL_COND_OBJ_LISTEN_TRUE=
43128   GL_COND_OBJ_LISTEN_FALSE='#'
43129 else
43130   GL_COND_OBJ_LISTEN_TRUE='#'
43131   GL_COND_OBJ_LISTEN_FALSE=
43132 fi
43133 :
43134     if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
43135     GL_COND_OBJ_LISTEN_TRUE='#'
43136     GL_COND_OBJ_LISTEN_FALSE='#'
43137   fi
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148     if test "$GL_GNULIB_LISTEN" != 1; then
43149         if test "$GL_GNULIB_LISTEN" = 0; then
43150       GL_GNULIB_LISTEN=$gl_module_indicator_condition
43151     else
43152       GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
43153     fi
43154   fi
43155
43156
43157
43158
43159
43160 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
43161
43162
43163
43164
43165
43166   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for newlocale" >&5
43167 printf %s "checking for newlocale... " >&6; }
43168 if test ${gl_cv_onwards_func_newlocale+y}
43169 then :
43170   printf %s "(cached) " >&6
43171 else case e in #(
43172   e)
43173   exec 9>&6 6>/dev/null
43174
43175        case "$host_os" in
43176
43177          linux*-android*)
43178            ac_fn_check_decl "$LINENO" "newlocale" "ac_cv_have_decl_newlocale" "#include <locale.h>
43179 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43180 if test "x$ac_cv_have_decl_newlocale" = xyes
43181 then :
43182
43183 fi
43184            if test $ac_cv_have_decl_newlocale = yes; then
43185              ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
43186 if test "x$ac_cv_func_newlocale" = xyes
43187 then :
43188
43189 fi
43190
43191              if test $ac_cv_func_newlocale = yes; then
43192                gl_cv_onwards_func_newlocale=yes
43193              else
43194                                                             gl_cv_onwards_func_newlocale='future OS version'
43195              fi
43196            else
43197              gl_cv_onwards_func_newlocale='future OS version'
43198            fi
43199            ;;
43200
43201
43202          *)
43203            ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
43204 if test "x$ac_cv_func_newlocale" = xyes
43205 then :
43206
43207 fi
43208
43209            gl_cv_onwards_func_newlocale=$ac_cv_func_newlocale
43210            ;;
43211
43212        esac
43213
43214   exec 6>&9 9>&-
43215
43216      ;;
43217 esac
43218 fi
43219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_newlocale" >&5
43220 printf "%s\n" "$gl_cv_onwards_func_newlocale" >&6; }
43221
43222   case "$gl_cv_onwards_func_newlocale" in
43223     future*) ac_cv_func_newlocale=no ;;
43224     *)       ac_cv_func_newlocale=$gl_cv_onwards_func_newlocale ;;
43225   esac
43226   if test $ac_cv_func_newlocale = yes; then
43227
43228 printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
43229
43230   fi
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255  nanosleep_save_libs=$LIBS
43256
43257  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
43258  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
43259  NANOSLEEP_LIB=
43260
43261  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
43262 printf %s "checking for library containing nanosleep... " >&6; }
43263 if test ${ac_cv_search_nanosleep+y}
43264 then :
43265   printf %s "(cached) " >&6
43266 else case e in #(
43267   e) ac_func_search_save_LIBS=$LIBS
43268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43269 /* end confdefs.h.  */
43270
43271 /* Override any GCC internal prototype to avoid an error.
43272    Use char because int might match the return type of a GCC
43273    builtin and then its argument prototype would still apply.
43274    The 'extern "C"' is for builds by C++ compilers;
43275    although this is not generally supported in C code supporting it here
43276    has little cost and some practical benefit (sr 110532).  */
43277 #ifdef __cplusplus
43278 extern "C"
43279 #endif
43280 char nanosleep (void);
43281 int
43282 main (void)
43283 {
43284 return nanosleep ();
43285   ;
43286   return 0;
43287 }
43288 _ACEOF
43289 for ac_lib in '' rt posix4
43290 do
43291   if test -z "$ac_lib"; then
43292     ac_res="none required"
43293   else
43294     ac_res=-l$ac_lib
43295     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
43296   fi
43297   if ac_fn_c_try_link "$LINENO"
43298 then :
43299   ac_cv_search_nanosleep=$ac_res
43300 fi
43301 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43302     conftest$ac_exeext
43303   if test ${ac_cv_search_nanosleep+y}
43304 then :
43305   break
43306 fi
43307 done
43308 if test ${ac_cv_search_nanosleep+y}
43309 then :
43310
43311 else case e in #(
43312   e) ac_cv_search_nanosleep=no ;;
43313 esac
43314 fi
43315 rm conftest.$ac_ext
43316 LIBS=$ac_func_search_save_LIBS ;;
43317 esac
43318 fi
43319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
43320 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
43321 ac_res=$ac_cv_search_nanosleep
43322 if test "$ac_res" != no
43323 then :
43324   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
43325   test "$ac_cv_search_nanosleep" = "none required" ||
43326                  NANOSLEEP_LIB=$ac_cv_search_nanosleep
43327 fi
43328
43329  if test "x$ac_cv_search_nanosleep" != xno; then
43330
43331
43332    if test $APPLE_UNIVERSAL_BUILD = 1; then
43333      # A universal build on Apple Mac OS X platforms.
43334      # The test result would be 'no (mishandles large arguments)' in 64-bit
43335      # mode but 'yes' in 32-bit mode. But we need a configuration result that
43336      # is valid in both modes.
43337      gl_cv_func_nanosleep='no (mishandles large arguments)'
43338    fi
43339
43340    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
43341 printf %s "checking for working nanosleep... " >&6; }
43342 if test ${gl_cv_func_nanosleep+y}
43343 then :
43344   printf %s "(cached) " >&6
43345 else case e in #(
43346   e)
43347      if test "$cross_compiling" = yes
43348 then :
43349   case "$host_os" in
43350           linux*) # Guess it halfway works when the kernel is Linux.
43351             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
43352           mingw*) # Guess no on native Windows.
43353             gl_cv_func_nanosleep='guessing no' ;;
43354           *)      # If we don't know, obey --enable-cross-guesses.
43355             gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
43356         esac
43357
43358 else case e in #(
43359   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43360 /* end confdefs.h.  */
43361
43362           #include <errno.h>
43363           #include <limits.h>
43364           #include <signal.h>
43365           #include <time.h>
43366           #include <unistd.h>
43367           #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
43368           #define TYPE_MAXIMUM(t) \
43369             ((t) (! TYPE_SIGNED (t) \
43370                   ? (t) -1 \
43371                   : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
43372
43373           #if HAVE_DECL_ALARM
43374           static void
43375           check_for_SIGALRM (int sig)
43376           {
43377             if (sig != SIGALRM)
43378               _exit (1);
43379           }
43380           #endif
43381
43382           int
43383           main ()
43384           {
43385             static struct timespec ts_sleep;
43386             static struct timespec ts_remaining;
43387             /* Test for major problems first.  */
43388             if (! nanosleep)
43389               return 2;
43390             ts_sleep.tv_sec = 0;
43391             ts_sleep.tv_nsec = 1;
43392             #if HAVE_DECL_ALARM
43393             {
43394               static struct sigaction act;
43395               act.sa_handler = check_for_SIGALRM;
43396               sigemptyset (&act.sa_mask);
43397               sigaction (SIGALRM, &act, NULL);
43398               alarm (1);
43399               if (nanosleep (&ts_sleep, NULL) != 0)
43400                 return 3;
43401               /* Test for a minor problem: the handling of large arguments.  */
43402               ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
43403               ts_sleep.tv_nsec = 999999999;
43404               alarm (1);
43405               if (nanosleep (&ts_sleep, &ts_remaining) != -1)
43406                 return 4;
43407               if (errno != EINTR)
43408                 return 5;
43409               if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
43410                 return 6;
43411             }
43412             #else /* A simpler test for native Windows.  */
43413             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
43414               return 3;
43415             /* Test for 32-bit mingw bug: negative nanosecond values do not
43416                cause failure.  */
43417             ts_sleep.tv_sec = 1;
43418             ts_sleep.tv_nsec = -1;
43419             if (nanosleep (&ts_sleep, &ts_remaining) != -1)
43420               return 7;
43421             #endif
43422             return 0;
43423           }
43424 _ACEOF
43425 if ac_fn_c_try_run "$LINENO"
43426 then :
43427   gl_cv_func_nanosleep=yes
43428 else case e in #(
43429   e) case $? in
43430         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
43431         7)     gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
43432         *)     gl_cv_func_nanosleep=no ;;
43433         esac ;;
43434 esac
43435 fi
43436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43437   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43438 esac
43439 fi
43440
43441      ;;
43442 esac
43443 fi
43444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
43445 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
43446    case "$gl_cv_func_nanosleep" in
43447      *yes)
43448        REPLACE_NANOSLEEP=0
43449        ;;
43450      *)
43451        REPLACE_NANOSLEEP=1
43452        case "$gl_cv_func_nanosleep" in
43453          *"mishandles large arguments"*)
43454
43455 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
43456
43457            ;;
43458        esac
43459        ;;
43460    esac
43461  else
43462    HAVE_NANOSLEEP=0
43463  fi
43464  LIBS=$nanosleep_save_libs
43465
43466  # For backward compatibility.
43467  LIB_NANOSLEEP="$NANOSLEEP_LIB"
43468
43469
43470
43471      if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
43472   GL_COND_OBJ_NANOSLEEP_TRUE=
43473   GL_COND_OBJ_NANOSLEEP_FALSE='#'
43474 else
43475   GL_COND_OBJ_NANOSLEEP_TRUE='#'
43476   GL_COND_OBJ_NANOSLEEP_FALSE=
43477 fi
43478 :
43479     if test -z "${GL_COND_OBJ_NANOSLEEP_TRUE}" && test -z "${GL_COND_OBJ_NANOSLEEP_FALSE}"; then
43480     GL_COND_OBJ_NANOSLEEP_TRUE='#'
43481     GL_COND_OBJ_NANOSLEEP_FALSE='#'
43482   fi
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493     if test "$GL_GNULIB_NANOSLEEP" != 1; then
43494         if test "$GL_GNULIB_NANOSLEEP" = 0; then
43495       GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
43496     else
43497       GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
43498     fi
43499   fi
43500
43501
43502
43503
43504
43505 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
43506
43507
43508
43509
43510
43511   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
43512 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
43513 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
43514 then :
43515   printf %s "(cached) " >&6
43516 else case e in #(
43517   e)
43518       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43519 /* end confdefs.h.  */
43520 #include <netinet/in.h>
43521 int
43522 main (void)
43523 {
43524
43525   ;
43526   return 0;
43527 }
43528 _ACEOF
43529 if ac_fn_c_try_compile "$LINENO"
43530 then :
43531   gl_cv_header_netinet_in_h_selfcontained=yes
43532 else case e in #(
43533   e) gl_cv_header_netinet_in_h_selfcontained=no ;;
43534 esac
43535 fi
43536 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43537      ;;
43538 esac
43539 fi
43540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
43541 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
43542   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
43543     GL_GENERATE_NETINET_IN_H=false
43544   else
43545     GL_GENERATE_NETINET_IN_H=true
43546     ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
43547 if test "x$ac_cv_header_netinet_in_h" = xyes
43548 then :
43549   printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
43550
43551 fi
43552
43553
43554
43555
43556
43557
43558
43559
43560
43561
43562      if test $gl_cv_have_include_next = yes; then
43563        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
43564      else
43565        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
43566 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
43567 if test ${gl_cv_next_netinet_in_h+y}
43568 then :
43569   printf %s "(cached) " >&6
43570 else case e in #(
43571   e)
43572              if test $ac_cv_header_netinet_in_h = yes; then
43573
43574
43575
43576
43577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43578 /* end confdefs.h.  */
43579 #include <netinet/in.h>
43580 _ACEOF
43581                 case "$host_os" in
43582     aix*) gl_absname_cpp="$ac_cpp -C" ;;
43583     *)    gl_absname_cpp="$ac_cpp" ;;
43584   esac
43585
43586   case "$host_os" in
43587     mingw*)
43588                                           gl_dirsep_regex='[/\\]'
43589       ;;
43590     *)
43591       gl_dirsep_regex='\/'
43592       ;;
43593   esac
43594       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43595   gl_header_literal_regex=`echo 'netinet/in.h' \
43596                            | sed -e "$gl_make_literal_regex_sed"`
43597   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43598       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43599       s|^/[^/]|//&|
43600       p
43601       q
43602     }'
43603
43604         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43605   sed -n "$gl_absolute_header_sed"`
43606
43607           gl_header=$gl_cv_absolute_netinet_in_h
43608           gl_cv_next_netinet_in_h='"'$gl_header'"'
43609           else
43610                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
43611              fi
43612
43613           ;;
43614 esac
43615 fi
43616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
43617 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
43618      fi
43619      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
43620
43621      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43622        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43623        gl_next_as_first_directive='<'netinet/in.h'>'
43624      else
43625        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43626        gl_next_as_first_directive=$gl_cv_next_netinet_in_h
43627      fi
43628      NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
43629
43630
43631
43632
43633     if test $ac_cv_header_netinet_in_h = yes; then
43634       HAVE_NETINET_IN_H=1
43635     else
43636       HAVE_NETINET_IN_H=0
43637     fi
43638
43639   fi
43640
43641
43642
43643
43644
43645   case "$GL_GENERATE_NETINET_IN_H" in
43646     false) NETINET_IN_H='' ;;
43647     true)
43648                   if test -z "$NETINET_IN_H"; then
43649         NETINET_IN_H="${gl_source_base_prefix}netinet/in.h"
43650       fi
43651       ;;
43652     *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
43653   esac
43654
43655
43656      if $GL_GENERATE_NETINET_IN_H; then
43657   GL_GENERATE_NETINET_IN_H_TRUE=
43658   GL_GENERATE_NETINET_IN_H_FALSE='#'
43659 else
43660   GL_GENERATE_NETINET_IN_H_TRUE='#'
43661   GL_GENERATE_NETINET_IN_H_FALSE=
43662 fi
43663 :
43664     if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
43665     GL_GENERATE_NETINET_IN_H_TRUE='#'
43666     GL_GENERATE_NETINET_IN_H_FALSE='#'
43667   fi
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uselocale" >&5
43683 printf %s "checking for uselocale... " >&6; }
43684 if test ${gl_cv_onwards_func_uselocale+y}
43685 then :
43686   printf %s "(cached) " >&6
43687 else case e in #(
43688   e)
43689   exec 9>&6 6>/dev/null
43690
43691        case "$host_os" in
43692
43693          linux*-android*)
43694            ac_fn_check_decl "$LINENO" "uselocale" "ac_cv_have_decl_uselocale" "#include <locale.h>
43695 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43696 if test "x$ac_cv_have_decl_uselocale" = xyes
43697 then :
43698
43699 fi
43700            if test $ac_cv_have_decl_uselocale = yes; then
43701              ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
43702 if test "x$ac_cv_func_uselocale" = xyes
43703 then :
43704
43705 fi
43706
43707              if test $ac_cv_func_uselocale = yes; then
43708                gl_cv_onwards_func_uselocale=yes
43709              else
43710                                                             gl_cv_onwards_func_uselocale='future OS version'
43711              fi
43712            else
43713              gl_cv_onwards_func_uselocale='future OS version'
43714            fi
43715            ;;
43716
43717
43718          *)
43719            ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
43720 if test "x$ac_cv_func_uselocale" = xyes
43721 then :
43722
43723 fi
43724
43725            gl_cv_onwards_func_uselocale=$ac_cv_func_uselocale
43726            ;;
43727
43728        esac
43729
43730   exec 6>&9 9>&-
43731
43732      ;;
43733 esac
43734 fi
43735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_uselocale" >&5
43736 printf "%s\n" "$gl_cv_onwards_func_uselocale" >&6; }
43737
43738   case "$gl_cv_onwards_func_uselocale" in
43739     future*) ac_cv_func_uselocale=no ;;
43740     *)       ac_cv_func_uselocale=$gl_cv_onwards_func_uselocale ;;
43741   esac
43742   if test $ac_cv_func_uselocale = yes; then
43743
43744 printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
43745
43746   fi
43747
43748
43749
43750           if test $ac_cv_func_uselocale = yes; then
43751
43752     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
43753 printf %s "checking whether uselocale works... " >&6; }
43754 if test ${gt_cv_func_uselocale_works+y}
43755 then :
43756   printf %s "(cached) " >&6
43757 else case e in #(
43758   e) if test "$cross_compiling" = yes
43759 then :
43760   # Guess no on AIX and z/OS, yes otherwise.
43761           case "$host_os" in
43762             aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
43763             *)                   gt_cv_func_uselocale_works="guessing yes" ;;
43764           esac
43765
43766 else case e in #(
43767   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43768 /* end confdefs.h.  */
43769
43770 #include <locale.h>
43771 #if HAVE_XLOCALE_H
43772 # include <xlocale.h>
43773 #endif
43774 locale_t loc1;
43775 int main ()
43776 {
43777   uselocale (NULL);
43778   setlocale (LC_ALL, "en_US.UTF-8");
43779   return 0;
43780 }
43781 _ACEOF
43782 if ac_fn_c_try_run "$LINENO"
43783 then :
43784   gt_cv_func_uselocale_works=yes
43785 else case e in #(
43786   e) gt_cv_func_uselocale_works=no ;;
43787 esac
43788 fi
43789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43790   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43791 esac
43792 fi
43793
43794        ;;
43795 esac
43796 fi
43797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
43798 printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
43799   else
43800     gt_cv_func_uselocale_works=no
43801   fi
43802   case "$gt_cv_func_uselocale_works" in
43803     *yes)
43804       gt_working_uselocale=yes
43805
43806 printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
43807
43808       ;;
43809     *)
43810       gt_working_uselocale=no
43811       ;;
43812   esac
43813
43814
43815
43816
43817
43818
43819
43820           if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
43821             REPLACE_PERROR=1
43822   fi
43823   case ${gl_cv_func_strerror_r_works-unset} in
43824     unset|*yes)
43825       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
43826 printf %s "checking whether perror matches strerror... " >&6; }
43827 if test ${gl_cv_func_perror_works+y}
43828 then :
43829   printf %s "(cached) " >&6
43830 else case e in #(
43831   e) if test "$cross_compiling" = yes
43832 then :
43833   case "$host_os" in
43834                                   # Guess yes on musl systems.
43835               *-musl* | midipix*) gl_cv_func_perror_works="guessing yes" ;;
43836                                   # Guess yes on native Windows.
43837               mingw*)             gl_cv_func_perror_works="guessing yes" ;;
43838                                   # Otherwise obey --enable-cross-guesses.
43839               *)                  gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
43840             esac
43841
43842 else case e in #(
43843   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43844 /* end confdefs.h.  */
43845 #include <errno.h>
43846                 #include <stdio.h>
43847                 #include <stdlib.h>
43848                 #include <string.h>
43849
43850 int
43851 main (void)
43852 {
43853 char *str = strerror (-1);
43854                 if (!getenv("CONFTEST_OUTPUT")) return 0;
43855                 if (!str) str = "";
43856                 puts (str);
43857                 errno = -1;
43858                 perror ("");
43859                 return 0;
43860
43861   ;
43862   return 0;
43863 }
43864 _ACEOF
43865 if ac_fn_c_try_run "$LINENO"
43866 then :
43867   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
43868                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
43869               gl_cv_func_perror_works=yes
43870             else
43871               gl_cv_func_perror_works=no
43872             fi
43873             rm -rf conftest.txt1 conftest.txt2
43874 else case e in #(
43875   e) gl_cv_func_perror_works=no ;;
43876 esac
43877 fi
43878 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43879   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43880 esac
43881 fi
43882
43883          ;;
43884 esac
43885 fi
43886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
43887 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
43888       case "$gl_cv_func_perror_works" in
43889         *yes) ;;
43890         *) REPLACE_PERROR=1 ;;
43891       esac
43892       ;;
43893     *)
43894                   REPLACE_PERROR=1
43895       ;;
43896   esac
43897     case "$host_os" in
43898                      # Yes on Android 11.
43899     linux*-android*) REPLACE_PERROR=1 ;;
43900   esac
43901
43902
43903      if test $REPLACE_PERROR = 1; then
43904   GL_COND_OBJ_PERROR_TRUE=
43905   GL_COND_OBJ_PERROR_FALSE='#'
43906 else
43907   GL_COND_OBJ_PERROR_TRUE='#'
43908   GL_COND_OBJ_PERROR_FALSE=
43909 fi
43910 :
43911     if test -z "${GL_COND_OBJ_PERROR_TRUE}" && test -z "${GL_COND_OBJ_PERROR_FALSE}"; then
43912     GL_COND_OBJ_PERROR_TRUE='#'
43913     GL_COND_OBJ_PERROR_FALSE='#'
43914   fi
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930     if test "$GL_GNULIB_PERROR" != 1; then
43931         if test "$GL_GNULIB_PERROR" = 0; then
43932       GL_GNULIB_PERROR=$gl_module_indicator_condition
43933     else
43934       GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
43935     fi
43936   fi
43937
43938
43939
43940
43941
43942 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
43943
43944
43945
43946
43947
43948
43949
43950   if test $ac_cv_func_pipe != yes; then
43951     HAVE_PIPE=0
43952   fi
43953
43954
43955      if test $HAVE_PIPE = 0; then
43956   GL_COND_OBJ_PIPE_TRUE=
43957   GL_COND_OBJ_PIPE_FALSE='#'
43958 else
43959   GL_COND_OBJ_PIPE_TRUE='#'
43960   GL_COND_OBJ_PIPE_FALSE=
43961 fi
43962 :
43963     if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
43964     GL_COND_OBJ_PIPE_TRUE='#'
43965     GL_COND_OBJ_PIPE_FALSE='#'
43966   fi
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977     if test "$GL_GNULIB_PIPE" != 1; then
43978         if test "$GL_GNULIB_PIPE" = 0; then
43979       GL_GNULIB_PIPE=$gl_module_indicator_condition
43980     else
43981       GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
43982     fi
43983   fi
43984
43985
43986
43987
43988
43989 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
43990
43991
43992
43993
43994
43995
43996
43997
43998   if test $ac_cv_func_pselect = yes; then
43999     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
44000 printf %s "checking whether signature of pselect conforms to POSIX... " >&6; }
44001 if test ${gl_cv_sig_pselect+y}
44002 then :
44003   printf %s "(cached) " >&6
44004 else case e in #(
44005   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44006 /* end confdefs.h.  */
44007 #include <sys/select.h>
44008
44009 int
44010 main (void)
44011 {
44012 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
44013                           struct timespec const *restrict,
44014                           sigset_t const *restrict) = pselect;
44015                 return !p;
44016   ;
44017   return 0;
44018 }
44019 _ACEOF
44020 if ac_fn_c_try_link "$LINENO"
44021 then :
44022   gl_cv_sig_pselect=yes
44023 else case e in #(
44024   e) gl_cv_sig_pselect=no ;;
44025 esac
44026 fi
44027 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44028     conftest$ac_exeext conftest.$ac_ext ;;
44029 esac
44030 fi
44031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
44032 printf "%s\n" "$gl_cv_sig_pselect" >&6; }
44033
44034         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
44035 printf %s "checking whether pselect detects invalid fds... " >&6; }
44036 if test ${gl_cv_func_pselect_detects_ebadf+y}
44037 then :
44038   printf %s "(cached) " >&6
44039 else case e in #(
44040   e)
44041         if test "$cross_compiling" = yes
44042 then :
44043
44044            case "$host_os" in
44045                              # Guess yes on Linux systems.
44046             linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44047                              # Guess yes on systems that emulate the Linux system calls.
44048             midipix*)        gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44049                              # Guess yes on glibc systems.
44050             *-gnu* | gnu*)   gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44051                              # If we don't know, obey --enable-cross-guesses.
44052             *)               gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
44053            esac
44054
44055 else case e in #(
44056   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44057 /* end confdefs.h.  */
44058
44059 #include <sys/types.h>
44060 #include <sys/time.h>
44061 #if HAVE_SYS_SELECT_H
44062 # include <sys/select.h>
44063 #endif
44064 #include <unistd.h>
44065 #include <errno.h>
44066
44067
44068 $gl_mda_defines
44069
44070 int
44071 main (void)
44072 {
44073
44074   fd_set set;
44075   dup2(0, 16);
44076   FD_ZERO(&set);
44077   FD_SET(16, &set);
44078   close(16);
44079   struct timespec timeout;
44080   timeout.tv_sec = 0;
44081   timeout.tv_nsec = 5000;
44082   return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
44083
44084   ;
44085   return 0;
44086 }
44087 _ACEOF
44088 if ac_fn_c_try_run "$LINENO"
44089 then :
44090   gl_cv_func_pselect_detects_ebadf=yes
44091 else case e in #(
44092   e) gl_cv_func_pselect_detects_ebadf=no ;;
44093 esac
44094 fi
44095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44096   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44097 esac
44098 fi
44099
44100        ;;
44101 esac
44102 fi
44103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
44104 printf "%s\n" "$gl_cv_func_pselect_detects_ebadf" >&6; }
44105     case $gl_cv_func_pselect_detects_ebadf in
44106       *yes) ;;
44107       *) REPLACE_PSELECT=1 ;;
44108     esac
44109   fi
44110
44111   if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
44112     REPLACE_PSELECT=1
44113   fi
44114
44115
44116      if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
44117   GL_COND_OBJ_PSELECT_TRUE=
44118   GL_COND_OBJ_PSELECT_FALSE='#'
44119 else
44120   GL_COND_OBJ_PSELECT_TRUE='#'
44121   GL_COND_OBJ_PSELECT_FALSE=
44122 fi
44123 :
44124     if test -z "${GL_COND_OBJ_PSELECT_TRUE}" && test -z "${GL_COND_OBJ_PSELECT_FALSE}"; then
44125     GL_COND_OBJ_PSELECT_TRUE='#'
44126     GL_COND_OBJ_PSELECT_FALSE='#'
44127   fi
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138     if test "$GL_GNULIB_PSELECT" != 1; then
44139         if test "$GL_GNULIB_PSELECT" = 0; then
44140       GL_GNULIB_PSELECT=$gl_module_indicator_condition
44141     else
44142       GL_GNULIB_PSELECT="($GL_GNULIB_PSELECT || $gl_module_indicator_condition)"
44143     fi
44144   fi
44145
44146
44147
44148
44149
44150 printf "%s\n" "#define GNULIB_TEST_PSELECT 1" >>confdefs.h
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166   if { case "$host_os" in mingw*) true;; *) false;; esac; } \
44167      && test $gl_threads_api = windows; then
44168             REPLACE_PTHREAD_CREATE=1
44169     REPLACE_PTHREAD_ATTR_INIT=1
44170     REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
44171     REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
44172     REPLACE_PTHREAD_ATTR_DESTROY=1
44173     REPLACE_PTHREAD_SELF=1
44174     REPLACE_PTHREAD_EQUAL=1
44175     REPLACE_PTHREAD_DETACH=1
44176     REPLACE_PTHREAD_JOIN=1
44177     REPLACE_PTHREAD_EXIT=1
44178   else
44179     if test $HAVE_PTHREAD_H = 0; then
44180       HAVE_PTHREAD_CREATE=0
44181       HAVE_PTHREAD_ATTR_INIT=0
44182       HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
44183       HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
44184       HAVE_PTHREAD_ATTR_DESTROY=0
44185       HAVE_PTHREAD_SELF=0
44186       HAVE_PTHREAD_EQUAL=0
44187       HAVE_PTHREAD_DETACH=0
44188       HAVE_PTHREAD_JOIN=0
44189       HAVE_PTHREAD_EXIT=0
44190     else
44191                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
44192 printf %s "checking whether pthread_create exists as a global function... " >&6; }
44193 if test ${gl_cv_func_pthread_create+y}
44194 then :
44195   printf %s "(cached) " >&6
44196 else case e in #(
44197   e) saved_LIBS="$LIBS"
44198          LIBS="$LIBS $LIBPMULTITHREAD"
44199          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44200 /* end confdefs.h.  */
44201 extern
44202                 #ifdef __cplusplus
44203                 "C"
44204                 #endif
44205                 int pthread_create (void);
44206                 int main ()
44207                 {
44208                   return pthread_create ();
44209                 }
44210
44211 _ACEOF
44212 if ac_fn_c_try_link "$LINENO"
44213 then :
44214   gl_cv_func_pthread_create=yes
44215 else case e in #(
44216   e) gl_cv_func_pthread_create=no ;;
44217 esac
44218 fi
44219 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44220     conftest$ac_exeext conftest.$ac_ext
44221          LIBS="$saved_LIBS"
44222          ;;
44223 esac
44224 fi
44225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
44226 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
44227       if test $gl_cv_func_pthread_create = no; then
44228         REPLACE_PTHREAD_CREATE=1
44229         REPLACE_PTHREAD_ATTR_INIT=1
44230
44231 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
44232
44233       fi
44234     fi
44235   fi
44236
44237
44238      if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
44239   GL_COND_OBJ_PTHREAD_THREAD_TRUE=
44240   GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
44241 else
44242   GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
44243   GL_COND_OBJ_PTHREAD_THREAD_FALSE=
44244 fi
44245 :
44246     if test -z "${GL_COND_OBJ_PTHREAD_THREAD_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_THREAD_FALSE}"; then
44247     GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
44248     GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
44249   fi
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260     if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
44261         if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
44262       GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
44263     else
44264       GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
44265     fi
44266   fi
44267
44268
44269
44270
44271
44272 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
44273
44274
44275
44276
44277
44278
44279
44280
44281       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
44282 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
44283 if test ${gl_cv_func_pthread_sigmask_macro+y}
44284 then :
44285   printf %s "(cached) " >&6
44286 else case e in #(
44287   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44288 /* end confdefs.h.  */
44289
44290 #include <pthread.h>
44291 #include <signal.h>
44292 #ifdef pthread_sigmask
44293  headers_define_pthread_sigmask
44294 #endif
44295 _ACEOF
44296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44297   $EGREP_TRADITIONAL "headers_define_pthread_sigmask" >/dev/null 2>&1
44298 then :
44299   gl_cv_func_pthread_sigmask_macro=yes
44300 else case e in #(
44301   e) gl_cv_func_pthread_sigmask_macro=no ;;
44302 esac
44303 fi
44304 rm -rf conftest*
44305
44306      ;;
44307 esac
44308 fi
44309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
44310 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
44311
44312   PTHREAD_SIGMASK_LIB=
44313
44314   if test $gl_cv_func_pthread_sigmask_macro = yes; then
44315         HAVE_PTHREAD_SIGMASK=0
44316         REPLACE_PTHREAD_SIGMASK=1
44317   else
44318
44319
44320
44321       if test "$gl_threads_api" = posix; then
44322         if test $ac_cv_func_pthread_sigmask = yes; then
44323                     :
44324         else
44325           if test -n "$LIBMULTITHREAD"; then
44326             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
44327 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
44328 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
44329 then :
44330   printf %s "(cached) " >&6
44331 else case e in #(
44332   e) gl_save_LIBS="$LIBS"
44333                LIBS="$LIBS $LIBMULTITHREAD"
44334                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44335 /* end confdefs.h.  */
44336 #include <pthread.h>
44337                       #include <signal.h>
44338
44339 int
44340 main (void)
44341 {
44342 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
44343   ;
44344   return 0;
44345 }
44346
44347 _ACEOF
44348 if ac_fn_c_try_link "$LINENO"
44349 then :
44350   gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
44351 else case e in #(
44352   e) gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ;;
44353 esac
44354 fi
44355 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44356     conftest$ac_exeext conftest.$ac_ext
44357                LIBS="$gl_save_LIBS"
44358                ;;
44359 esac
44360 fi
44361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
44362 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
44363             if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
44364                             PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
44365             else
44366                             HAVE_PTHREAD_SIGMASK=0
44367             fi
44368           else
44369                         HAVE_PTHREAD_SIGMASK=0
44370           fi
44371         fi
44372       else
44373                         if test $ac_cv_func_pthread_sigmask = yes; then
44374           REPLACE_PTHREAD_SIGMASK=1
44375         else
44376           HAVE_PTHREAD_SIGMASK=0
44377         fi
44378       fi
44379
44380   fi
44381
44382
44383     LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
44384
44385
44386     if test $HAVE_PTHREAD_SIGMASK = 1; then
44387
44388
44389                 if test -z "$PTHREAD_SIGMASK_LIB"; then
44390       case " $LIBS " in
44391         *' -pthread '*) ;;
44392         *' -lpthread '*) ;;
44393         *)
44394           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
44395 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
44396 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
44397 then :
44398   printf %s "(cached) " >&6
44399 else case e in #(
44400   e)
44401               if test "$cross_compiling" = yes
44402 then :
44403
44404                                   case "$host_os" in
44405                    freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
44406                      gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
44407                    *)
44408                      gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
44409                  esac
44410
44411 else case e in #(
44412   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44413 /* end confdefs.h.  */
44414
44415                    #include <pthread.h>
44416                    #include <signal.h>
44417                    #include <stddef.h>
44418                    int main ()
44419                    {
44420                      sigset_t set;
44421                      sigemptyset (&set);
44422                      return pthread_sigmask (1729, &set, NULL) != 0;
44423                    }
44424 _ACEOF
44425 if ac_fn_c_try_run "$LINENO"
44426 then :
44427   gl_cv_func_pthread_sigmask_in_libc_works=no
44428 else case e in #(
44429   e) gl_cv_func_pthread_sigmask_in_libc_works=yes ;;
44430 esac
44431 fi
44432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44433   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44434 esac
44435 fi
44436
44437              ;;
44438 esac
44439 fi
44440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
44441 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
44442           case "$gl_cv_func_pthread_sigmask_in_libc_works" in
44443             *no)
44444               REPLACE_PTHREAD_SIGMASK=1
44445
44446 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
44447
44448               ;;
44449           esac;;
44450       esac
44451     fi
44452
44453             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
44454 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
44455 if test ${gl_cv_func_pthread_sigmask_return_works+y}
44456 then :
44457   printf %s "(cached) " >&6
44458 else case e in #(
44459   e)
44460         gl_save_LIBS="$LIBS"
44461         LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
44462         if test "$cross_compiling" = yes
44463 then :
44464   case "$host_os" in
44465              cygwin*)
44466                gl_cv_func_pthread_sigmask_return_works="guessing no";;
44467              *)
44468                gl_cv_func_pthread_sigmask_return_works="guessing yes";;
44469            esac
44470
44471 else case e in #(
44472   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44473 /* end confdefs.h.  */
44474
44475 #include <pthread.h>
44476 #include <signal.h>
44477 #include <stddef.h>
44478 int main ()
44479 {
44480   sigset_t set;
44481   sigemptyset (&set);
44482   if (pthread_sigmask (1729, &set, NULL) == -1)
44483     return 1;
44484   return 0;
44485 }
44486 _ACEOF
44487 if ac_fn_c_try_run "$LINENO"
44488 then :
44489   gl_cv_func_pthread_sigmask_return_works=yes
44490 else case e in #(
44491   e) gl_cv_func_pthread_sigmask_return_works=no ;;
44492 esac
44493 fi
44494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44495   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44496 esac
44497 fi
44498
44499         LIBS="$gl_save_LIBS"
44500        ;;
44501 esac
44502 fi
44503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
44504 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
44505     case "$gl_cv_func_pthread_sigmask_return_works" in
44506       *no)
44507         REPLACE_PTHREAD_SIGMASK=1
44508
44509 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
44510
44511         ;;
44512     esac
44513
44514                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
44515 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
44516 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
44517 then :
44518   printf %s "(cached) " >&6
44519 else case e in #(
44520   e)
44521         case "$host_os" in
44522           irix*)
44523             gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
44524           *)
44525             gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
44526         esac
44527                                          gl_save_LIBS=$LIBS
44528            LIBS="$LIBS $LIBMULTITHREAD"
44529         if test "$cross_compiling" = yes
44530 then :
44531   :
44532 else case e in #(
44533   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44534 /* end confdefs.h.  */
44535
44536 #include <limits.h>
44537 #include <pthread.h>
44538 #include <signal.h>
44539 #include <stdio.h>
44540 #include <stdlib.h>
44541 #include <unistd.h>
44542
44543
44544 $gl_mda_defines
44545
44546 static volatile int sigint_occurred;
44547 static void
44548 sigint_handler (int sig)
44549 {
44550   sigint_occurred++;
44551 }
44552 int main ()
44553 {
44554   sigset_t set;
44555   pid_t pid = getpid ();
44556   char command[80];
44557   if (LONG_MAX < pid)
44558     return 6;
44559   signal (SIGINT, sigint_handler);
44560   sigemptyset (&set);
44561   sigaddset (&set, SIGINT);
44562   if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
44563     return 1;
44564   sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
44565   if (!(system (command) == 0))
44566     return 2;
44567   sleep (2);
44568   if (!(sigint_occurred == 0))
44569     return 3;
44570   if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
44571     return 4;
44572   if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
44573     return 5;
44574   return 0;
44575 }
44576 _ACEOF
44577 if ac_fn_c_try_run "$LINENO"
44578 then :
44579   :
44580 else case e in #(
44581   e) gl_cv_func_pthread_sigmask_unblock_works=no ;;
44582 esac
44583 fi
44584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44585   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44586 esac
44587 fi
44588
44589         LIBS=$gl_save_LIBS
44590        ;;
44591 esac
44592 fi
44593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
44594 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
44595     case "$gl_cv_func_pthread_sigmask_unblock_works" in
44596       *no)
44597         REPLACE_PTHREAD_SIGMASK=1
44598
44599 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
44600
44601         ;;
44602     esac
44603   fi
44604
44605
44606      if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
44607   GL_COND_OBJ_PTHREAD_SIGMASK_TRUE=
44608   GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
44609 else
44610   GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
44611   GL_COND_OBJ_PTHREAD_SIGMASK_FALSE=
44612 fi
44613 :
44614     if test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_FALSE}"; then
44615     GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
44616     GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
44617   fi
44618
44619   if test -z "$GL_COND_OBJ_PTHREAD_SIGMASK_TRUE"; then :
44620
44621
44622   if test $HAVE_PTHREAD_SIGMASK = 1; then
44623
44624 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
44625
44626   fi
44627
44628
44629 fi
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639     if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
44640         if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
44641       GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
44642     else
44643       GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
44644     fi
44645   fi
44646
44647
44648
44649
44650
44651 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
44652
44653
44654
44655
44656
44657      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
44658 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
44659 if test ${gl_cv_func_svid_putenv+y}
44660 then :
44661   printf %s "(cached) " >&6
44662 else case e in #(
44663   e) if test "$cross_compiling" = yes
44664 then :
44665           case "$host_os" in
44666                               # Guess yes on glibc systems.
44667           *-gnu* | gnu*)      gl_cv_func_svid_putenv="guessing yes" ;;
44668                               # Guess yes on musl systems.
44669           *-musl* | midipix*) gl_cv_func_svid_putenv="guessing yes" ;;
44670                               # Guess no on native Windows.
44671           mingw*)             gl_cv_func_svid_putenv="guessing no" ;;
44672                               # If we don't know, obey --enable-cross-guesses.
44673           *)                  gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
44674         esac
44675
44676 else case e in #(
44677   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44678 /* end confdefs.h.  */
44679 $ac_includes_default
44680
44681
44682 $gl_mda_defines
44683
44684 int
44685 main (void)
44686 {
44687
44688             /* Put it in env.  */
44689             if (putenv ("CONFTEST_putenv=val"))
44690               return 1;
44691
44692             /* Try to remove it.  */
44693             if (putenv ("CONFTEST_putenv"))
44694               return 2;
44695
44696             /* Make sure it was deleted.  */
44697             if (getenv ("CONFTEST_putenv") != 0)
44698               return 3;
44699
44700             return 0;
44701
44702   ;
44703   return 0;
44704 }
44705 _ACEOF
44706 if ac_fn_c_try_run "$LINENO"
44707 then :
44708   gl_cv_func_svid_putenv=yes
44709 else case e in #(
44710   e) gl_cv_func_svid_putenv=no ;;
44711 esac
44712 fi
44713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44714   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44715 esac
44716 fi
44717
44718      ;;
44719 esac
44720 fi
44721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
44722 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
44723   case "$gl_cv_func_svid_putenv" in
44724     *yes) ;;
44725     *)
44726       REPLACE_PUTENV=1
44727       ;;
44728   esac
44729
44730
44731      if test $REPLACE_PUTENV = 1; then
44732   GL_COND_OBJ_PUTENV_TRUE=
44733   GL_COND_OBJ_PUTENV_FALSE='#'
44734 else
44735   GL_COND_OBJ_PUTENV_TRUE='#'
44736   GL_COND_OBJ_PUTENV_FALSE=
44737 fi
44738 :
44739     if test -z "${GL_COND_OBJ_PUTENV_TRUE}" && test -z "${GL_COND_OBJ_PUTENV_FALSE}"; then
44740     GL_COND_OBJ_PUTENV_TRUE='#'
44741     GL_COND_OBJ_PUTENV_FALSE='#'
44742   fi
44743
44744   if test -z "$GL_COND_OBJ_PUTENV_TRUE"; then :
44745
44746
44747   ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
44748 if test "x$ac_cv_have_decl__putenv" = xyes
44749 then :
44750   ac_have_decl=1
44751 else case e in #(
44752   e) ac_have_decl=0 ;;
44753 esac
44754 fi
44755 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
44756
44757
44758
44759 fi
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769     if test "$GL_GNULIB_PUTENV" != 1; then
44770         if test "$GL_GNULIB_PUTENV" = 0; then
44771       GL_GNULIB_PUTENV=$gl_module_indicator_condition
44772     else
44773       GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
44774     fi
44775   fi
44776
44777
44778
44779
44780
44781 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802   if test "$ac_cv_header_winsock2_h" = yes; then
44803     REPLACE_SELECT=1
44804   else
44805
44806     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
44807 printf %s "checking whether select supports a 0 argument... " >&6; }
44808 if test ${gl_cv_func_select_supports0+y}
44809 then :
44810   printf %s "(cached) " >&6
44811 else case e in #(
44812   e)
44813         if test "$cross_compiling" = yes
44814 then :
44815
44816            case "$host_os" in
44817                        # Guess no on Interix.
44818              interix*) gl_cv_func_select_supports0="guessing no";;
44819                        # Guess yes otherwise.
44820              *)        gl_cv_func_select_supports0="guessing yes";;
44821            esac
44822
44823 else case e in #(
44824   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44825 /* end confdefs.h.  */
44826
44827 #include <sys/types.h>
44828 #include <sys/time.h>
44829 #if HAVE_SYS_SELECT_H
44830 #include <sys/select.h>
44831 #endif
44832 int main ()
44833 {
44834   struct timeval timeout;
44835   timeout.tv_sec = 0;
44836   timeout.tv_usec = 5;
44837   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
44838 }
44839 _ACEOF
44840 if ac_fn_c_try_run "$LINENO"
44841 then :
44842   gl_cv_func_select_supports0=yes
44843 else case e in #(
44844   e) gl_cv_func_select_supports0=no ;;
44845 esac
44846 fi
44847 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44848   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44849 esac
44850 fi
44851
44852        ;;
44853 esac
44854 fi
44855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
44856 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
44857     case "$gl_cv_func_select_supports0" in
44858       *yes) ;;
44859       *) REPLACE_SELECT=1 ;;
44860     esac
44861
44862         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
44863 printf %s "checking whether select detects invalid fds... " >&6; }
44864 if test ${gl_cv_func_select_detects_ebadf+y}
44865 then :
44866   printf %s "(cached) " >&6
44867 else case e in #(
44868   e)
44869         if test "$cross_compiling" = yes
44870 then :
44871
44872            case "$host_os" in
44873                              # Guess yes on Linux systems.
44874             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
44875                              # Guess yes on systems that emulate the Linux system calls.
44876             midipix*)        gl_cv_func_select_detects_ebadf="guessing yes" ;;
44877                              # Guess yes on glibc systems.
44878             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
44879                              # If we don't know, obey --enable-cross-guesses.
44880             *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
44881            esac
44882
44883 else case e in #(
44884   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44885 /* end confdefs.h.  */
44886
44887 #include <sys/types.h>
44888 #include <sys/time.h>
44889 #if HAVE_SYS_SELECT_H
44890 # include <sys/select.h>
44891 #endif
44892 #include <unistd.h>
44893 #include <errno.h>
44894
44895
44896 $gl_mda_defines
44897
44898 int
44899 main (void)
44900 {
44901
44902   fd_set set;
44903   dup2(0, 16);
44904   FD_ZERO(&set);
44905   FD_SET(16, &set);
44906   close(16);
44907   struct timeval timeout;
44908   timeout.tv_sec = 0;
44909   timeout.tv_usec = 5;
44910   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
44911
44912   ;
44913   return 0;
44914 }
44915 _ACEOF
44916 if ac_fn_c_try_run "$LINENO"
44917 then :
44918   gl_cv_func_select_detects_ebadf=yes
44919 else case e in #(
44920   e) gl_cv_func_select_detects_ebadf=no ;;
44921 esac
44922 fi
44923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44924   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44925 esac
44926 fi
44927
44928        ;;
44929 esac
44930 fi
44931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
44932 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
44933     case $gl_cv_func_select_detects_ebadf in
44934       *yes) ;;
44935       *) REPLACE_SELECT=1 ;;
44936     esac
44937   fi
44938
44939     SELECT_LIB="$LIBSOCKET"
44940   if test $REPLACE_SELECT = 1; then
44941     case "$host_os" in
44942       mingw*)
44943                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44944 /* end confdefs.h.  */
44945
44946 #define WIN32_LEAN_AND_MEAN
44947 #include <windows.h>
44948 int
44949 main ()
44950 {
44951   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
44952   return 0;
44953 }
44954 _ACEOF
44955 if ac_fn_c_try_link "$LINENO"
44956 then :
44957
44958 else case e in #(
44959   e) SELECT_LIB="$SELECT_LIB -luser32" ;;
44960 esac
44961 fi
44962 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44963     conftest$ac_exeext conftest.$ac_ext
44964         ;;
44965     esac
44966   fi
44967
44968     LIB_SELECT="$LIB_SELECT"
44969
44970
44971
44972      if test $REPLACE_SELECT = 1; then
44973   GL_COND_OBJ_SELECT_TRUE=
44974   GL_COND_OBJ_SELECT_FALSE='#'
44975 else
44976   GL_COND_OBJ_SELECT_TRUE='#'
44977   GL_COND_OBJ_SELECT_FALSE=
44978 fi
44979 :
44980     if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
44981     GL_COND_OBJ_SELECT_TRUE='#'
44982     GL_COND_OBJ_SELECT_FALSE='#'
44983   fi
44984
44985
44986
44987
44988
44989
44990
44991
44992
44993
44994     if test "$GL_GNULIB_SELECT" != 1; then
44995         if test "$GL_GNULIB_SELECT" = 0; then
44996       GL_GNULIB_SELECT=$gl_module_indicator_condition
44997     else
44998       GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
44999     fi
45000   fi
45001
45002
45003
45004
45005
45006 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
45007
45008
45009
45010
45011
45012
45013      if test "$ac_cv_header_winsock2_h" = yes; then
45014   GL_COND_OBJ_SETSOCKOPT_TRUE=
45015   GL_COND_OBJ_SETSOCKOPT_FALSE='#'
45016 else
45017   GL_COND_OBJ_SETSOCKOPT_TRUE='#'
45018   GL_COND_OBJ_SETSOCKOPT_FALSE=
45019 fi
45020 :
45021     if test -z "${GL_COND_OBJ_SETSOCKOPT_TRUE}" && test -z "${GL_COND_OBJ_SETSOCKOPT_FALSE}"; then
45022     GL_COND_OBJ_SETSOCKOPT_TRUE='#'
45023     GL_COND_OBJ_SETSOCKOPT_FALSE='#'
45024   fi
45025
45026
45027
45028
45029
45030
45031
45032
45033
45034
45035     if test "$GL_GNULIB_SETSOCKOPT" != 1; then
45036         if test "$GL_GNULIB_SETSOCKOPT" = 0; then
45037       GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
45038     else
45039       GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
45040     fi
45041   fi
45042
45043
45044
45045
45046
45047 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
45048
45049
45050
45051
45052
45053
45054   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
45055 if test "x$ac_cv_header_stdint_h" = xyes
45056 then :
45057   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
45058
45059 fi
45060
45061     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
45062 printf %s "checking for SIZE_MAX... " >&6; }
45063 if test ${gl_cv_size_max+y}
45064 then :
45065   printf %s "(cached) " >&6
45066 else case e in #(
45067   e)
45068     gl_cv_size_max=no
45069     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45070 /* end confdefs.h.  */
45071
45072 #include <limits.h>
45073 #if HAVE_STDINT_H
45074 #include <stdint.h>
45075 #endif
45076 #ifdef SIZE_MAX
45077 Found it
45078 #endif
45079
45080 _ACEOF
45081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45082   $EGREP_TRADITIONAL "Found it" >/dev/null 2>&1
45083 then :
45084   gl_cv_size_max=yes
45085 fi
45086 rm -rf conftest*
45087
45088     if test $gl_cv_size_max != yes; then
45089                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
45090 #include <limits.h>"
45091 then :
45092
45093 else case e in #(
45094   e) size_t_bits_minus_1= ;;
45095 esac
45096 fi
45097
45098       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
45099 then :
45100
45101 else case e in #(
45102   e) fits_in_uint= ;;
45103 esac
45104 fi
45105
45106       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
45107         if test $fits_in_uint = 1; then
45108                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45109 /* end confdefs.h.  */
45110 #include <stddef.h>
45111                  extern size_t foo;
45112                  extern unsigned long foo;
45113
45114 int
45115 main (void)
45116 {
45117
45118   ;
45119   return 0;
45120 }
45121 _ACEOF
45122 if ac_fn_c_try_compile "$LINENO"
45123 then :
45124   fits_in_uint=0
45125 fi
45126 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45127         fi
45128                                 if test $fits_in_uint = 1; then
45129           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
45130         else
45131           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
45132         fi
45133       else
45134                 gl_cv_size_max='((size_t)~(size_t)0)'
45135       fi
45136     fi
45137    ;;
45138 esac
45139 fi
45140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
45141 printf "%s\n" "$gl_cv_size_max" >&6; }
45142   if test "$gl_cv_size_max" != yes; then
45143
45144 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
45145
45146   fi
45147
45148
45149
45150
45151                ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
45152 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45153 if test "x$ac_cv_have_decl_sleep" = xyes
45154 then :
45155   ac_have_decl=1
45156 else case e in #(
45157   e) ac_have_decl=0 ;;
45158 esac
45159 fi
45160 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
45161
45162
45163   if test $ac_cv_have_decl_sleep != yes; then
45164     HAVE_SLEEP=0
45165   else
45166         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
45167 printf %s "checking for working sleep... " >&6; }
45168 if test ${gl_cv_func_sleep_works+y}
45169 then :
45170   printf %s "(cached) " >&6
45171 else case e in #(
45172   e) if test "$cross_compiling" = yes
45173 then :
45174   case "$host_os" in
45175                         # Guess yes on glibc systems.
45176          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
45177                         # Guess yes on musl systems.
45178          *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
45179                         # Guess yes on systems that emulate the Linux system calls.
45180          midipix*)      gl_cv_func_sleep_works="guessing yes" ;;
45181                         # Guess no on native Windows.
45182          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
45183                         # If we don't know, obey --enable-cross-guesses.
45184          *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
45185        esac
45186
45187 else case e in #(
45188   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45189 /* end confdefs.h.  */
45190
45191 #include <errno.h>
45192 #include <unistd.h>
45193 #include <signal.h>
45194 static void
45195 handle_alarm (int sig)
45196 {
45197   if (sig != SIGALRM)
45198     _exit (2);
45199 }
45200
45201 int
45202 main (void)
45203 {
45204
45205     /* Failure to compile this test due to missing alarm is okay,
45206        since all such platforms (mingw) also lack sleep.  */
45207     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
45208     unsigned int remaining;
45209     signal (SIGALRM, handle_alarm);
45210     alarm (1);
45211     remaining = sleep (pentecost);
45212     if (remaining > pentecost)
45213       return 3;
45214     if (remaining <= pentecost - 10)
45215       return 4;
45216     return 0;
45217
45218   ;
45219   return 0;
45220 }
45221 _ACEOF
45222 if ac_fn_c_try_run "$LINENO"
45223 then :
45224   gl_cv_func_sleep_works=yes
45225 else case e in #(
45226   e) gl_cv_func_sleep_works=no ;;
45227 esac
45228 fi
45229 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45230   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45231 esac
45232 fi
45233  ;;
45234 esac
45235 fi
45236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
45237 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
45238     case "$gl_cv_func_sleep_works" in
45239       *yes) ;;
45240       *)
45241         REPLACE_SLEEP=1
45242         ;;
45243     esac
45244   fi
45245
45246
45247      if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
45248   GL_COND_OBJ_SLEEP_TRUE=
45249   GL_COND_OBJ_SLEEP_FALSE='#'
45250 else
45251   GL_COND_OBJ_SLEEP_TRUE='#'
45252   GL_COND_OBJ_SLEEP_FALSE=
45253 fi
45254 :
45255     if test -z "${GL_COND_OBJ_SLEEP_TRUE}" && test -z "${GL_COND_OBJ_SLEEP_FALSE}"; then
45256     GL_COND_OBJ_SLEEP_TRUE='#'
45257     GL_COND_OBJ_SLEEP_FALSE='#'
45258   fi
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269     if test "$GL_GNULIB_SLEEP" != 1; then
45270         if test "$GL_GNULIB_SLEEP" = 0; then
45271       GL_GNULIB_SLEEP=$gl_module_indicator_condition
45272     else
45273       GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
45274     fi
45275   fi
45276
45277
45278
45279
45280
45281 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
45282
45283
45284
45285
45286
45287
45288   gl_cv_func_snprintf_usable=no
45289   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
45290 if test "x$ac_cv_func_snprintf" = xyes
45291 then :
45292   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
45293
45294 fi
45295
45296   if test $ac_cv_func_snprintf = yes; then
45297
45298
45299
45300   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
45301 printf %s "checking whether snprintf respects a size of 1... " >&6; }
45302 if test ${gl_cv_func_snprintf_size1+y}
45303 then :
45304   printf %s "(cached) " >&6
45305 else case e in #(
45306   e)
45307       if test "$cross_compiling" = yes
45308 then :
45309   case "$host_os" in
45310                             # Guess yes on Android.
45311            linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
45312                             # Guess yes on native Windows.
45313            mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
45314            *)               gl_cv_func_snprintf_size1="guessing yes" ;;
45315          esac
45316
45317 else case e in #(
45318   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45319 /* end confdefs.h.  */
45320
45321 #include <stdio.h>
45322 #if HAVE_SNPRINTF
45323 # define my_snprintf snprintf
45324 #else
45325 # include <stdarg.h>
45326 static int my_snprintf (char *buf, int size, const char *format, ...)
45327 {
45328   va_list args;
45329   int ret;
45330   va_start (args, format);
45331   ret = vsnprintf (buf, size, format, args);
45332   va_end (args);
45333   return ret;
45334 }
45335 #endif
45336 int main()
45337 {
45338   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
45339   my_snprintf (buf, 1, "%d", 12345);
45340   return buf[1] != 'E';
45341 }
45342 _ACEOF
45343 if ac_fn_c_try_run "$LINENO"
45344 then :
45345   gl_cv_func_snprintf_size1=yes
45346 else case e in #(
45347   e) gl_cv_func_snprintf_size1=no ;;
45348 esac
45349 fi
45350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45351   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45352 esac
45353 fi
45354
45355      ;;
45356 esac
45357 fi
45358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
45359 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
45360
45361     case "$gl_cv_func_snprintf_size1" in
45362       *yes)
45363
45364         case "$gl_cv_func_snprintf_retval_c99" in
45365           *yes)
45366
45367             case "$gl_cv_func_printf_positions" in
45368               *yes)
45369                 gl_cv_func_snprintf_usable=yes
45370                 ;;
45371             esac
45372             ;;
45373         esac
45374         ;;
45375     esac
45376   fi
45377   if test $gl_cv_func_snprintf_usable = no; then
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388   gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
45389
45390   if test $ac_cv_func_snprintf = yes; then
45391     REPLACE_SNPRINTF=1
45392   else
45393
45394     if test $ac_cv_have_decl_snprintf = yes; then
45395                         REPLACE_SNPRINTF=1
45396     fi
45397   fi
45398   :
45399
45400   fi
45401
45402   if test $ac_cv_have_decl_snprintf = no; then
45403     HAVE_DECL_SNPRINTF=0
45404   fi
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415     if test "$GL_GNULIB_SNPRINTF" != 1; then
45416         if test "$GL_GNULIB_SNPRINTF" = 0; then
45417       GL_GNULIB_SNPRINTF=$gl_module_indicator_condition
45418     else
45419       GL_GNULIB_SNPRINTF="($GL_GNULIB_SNPRINTF || $gl_module_indicator_condition)"
45420     fi
45421   fi
45422
45423
45424
45425
45426
45427 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
45428
45429
45430
45431
45432
45433 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
45434
45435
45436
45437
45438      if test "$ac_cv_header_winsock2_h" = yes; then
45439   GL_COND_OBJ_SOCKET_TRUE=
45440   GL_COND_OBJ_SOCKET_FALSE='#'
45441 else
45442   GL_COND_OBJ_SOCKET_TRUE='#'
45443   GL_COND_OBJ_SOCKET_FALSE=
45444 fi
45445 :
45446     if test -z "${GL_COND_OBJ_SOCKET_TRUE}" && test -z "${GL_COND_OBJ_SOCKET_FALSE}"; then
45447     GL_COND_OBJ_SOCKET_TRUE='#'
45448     GL_COND_OBJ_SOCKET_FALSE='#'
45449   fi
45450
45451   # When this module is used, sockets may actually occur as file descriptors,
45452   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
45453
45454
45455
45456
45457
45458
45459
45460
45461
45462
45463
45464   if test "$ac_cv_header_winsock2_h" = yes; then
45465     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45466     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45467   fi
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477     if test "$GL_GNULIB_SOCKET" != 1; then
45478         if test "$GL_GNULIB_SOCKET" = 0; then
45479       GL_GNULIB_SOCKET=$gl_module_indicator_condition
45480     else
45481       GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
45482     fi
45483   fi
45484
45485
45486
45487
45488
45489 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
45490
45491
45492
45493
45494
45495      ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
45496 /* <sys/types.h> is not needed according to POSIX, but the
45497    <sys/socket.h> in i386-unknown-freebsd4.10 and
45498    powerpc-apple-darwin5.5 required it. */
45499 #include <sys/types.h>
45500 #if HAVE_SYS_SOCKET_H
45501 # include <sys/socket.h>
45502 #elif HAVE_WS2TCPIP_H
45503 # include <ws2tcpip.h>
45504 #endif
45505
45506 "
45507 if test "x$ac_cv_type_socklen_t" = xyes
45508 then :
45509
45510 else case e in #(
45511   e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
45512 printf %s "checking for socklen_t equivalent... " >&6; }
45513 if test ${gl_cv_socklen_t_equiv+y}
45514 then :
45515   printf %s "(cached) " >&6
45516 else case e in #(
45517   e) # Systems have either "struct sockaddr *" or
45518          # "void *" as the second argument to getpeername
45519          gl_cv_socklen_t_equiv=
45520          for arg2 in "struct sockaddr" void; do
45521            for t in int size_t "unsigned int" "long int" "unsigned long int"; do
45522              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45523 /* end confdefs.h.  */
45524 #include <sys/types.h>
45525                    #include <sys/socket.h>
45526
45527                    int getpeername (int, $arg2 *, $t *);
45528 int
45529 main (void)
45530 {
45531 $t len;
45532                   getpeername (0, 0, &len);
45533   ;
45534   return 0;
45535 }
45536 _ACEOF
45537 if ac_fn_c_try_compile "$LINENO"
45538 then :
45539   gl_cv_socklen_t_equiv="$t"
45540 fi
45541 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45542              test "$gl_cv_socklen_t_equiv" != "" && break
45543            done
45544            test "$gl_cv_socklen_t_equiv" != "" && break
45545          done
45546          if test "$gl_cv_socklen_t_equiv" = ""; then
45547            as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
45548          fi
45549          ;;
45550 esac
45551 fi
45552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
45553 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
45554
45555 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
45556  ;;
45557 esac
45558 fi
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568   if test $ac_cv_have_decl_strerror_r = no; then
45569     HAVE_DECL_STRERROR_R=0
45570   fi
45571
45572   if test $ac_cv_func_strerror_r = yes; then
45573     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
45574       if test $gl_cv_func_strerror_r_posix_signature = yes; then
45575         case "$gl_cv_func_strerror_r_works" in
45576                     *no) REPLACE_STRERROR_R=1 ;;
45577         esac
45578       else
45579                 REPLACE_STRERROR_R=1
45580       fi
45581     else
45582                   REPLACE_STRERROR_R=1
45583     fi
45584   fi
45585
45586   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1
45587 then :
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597   gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
45598
45599
45600
45601
45602
45603
45604   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for catgets" >&5
45605 printf %s "checking for catgets... " >&6; }
45606 if test ${gl_cv_onwards_func_catgets+y}
45607 then :
45608   printf %s "(cached) " >&6
45609 else case e in #(
45610   e)
45611   exec 9>&6 6>/dev/null
45612
45613        case "$host_os" in
45614
45615          linux*-android*)
45616            ac_fn_check_decl "$LINENO" "catgets" "ac_cv_have_decl_catgets" "#include <nl_types.h>
45617 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45618 if test "x$ac_cv_have_decl_catgets" = xyes
45619 then :
45620
45621 fi
45622            if test $ac_cv_have_decl_catgets = yes; then
45623              ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
45624 if test "x$ac_cv_func_catgets" = xyes
45625 then :
45626
45627 fi
45628
45629              if test $ac_cv_func_catgets = yes; then
45630                gl_cv_onwards_func_catgets=yes
45631              else
45632                                                             gl_cv_onwards_func_catgets='future OS version'
45633              fi
45634            else
45635              gl_cv_onwards_func_catgets='future OS version'
45636            fi
45637            ;;
45638
45639
45640          *)
45641            ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
45642 if test "x$ac_cv_func_catgets" = xyes
45643 then :
45644
45645 fi
45646
45647            gl_cv_onwards_func_catgets=$ac_cv_func_catgets
45648            ;;
45649
45650        esac
45651
45652   exec 6>&9 9>&-
45653
45654      ;;
45655 esac
45656 fi
45657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_catgets" >&5
45658 printf "%s\n" "$gl_cv_onwards_func_catgets" >&6; }
45659
45660   case "$gl_cv_onwards_func_catgets" in
45661     future*) ac_cv_func_catgets=no ;;
45662     *)       ac_cv_func_catgets=$gl_cv_onwards_func_catgets ;;
45663   esac
45664   if test $ac_cv_func_catgets = yes; then
45665
45666 printf "%s\n" "#define HAVE_CATGETS 1" >>confdefs.h
45667
45668   fi
45669
45670
45671
45672
45673
45674 fi
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689     if test "$GL_GNULIB_STRERROR_R" != 1; then
45690         if test "$GL_GNULIB_STRERROR_R" = 0; then
45691       GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
45692     else
45693       GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
45694     fi
45695   fi
45696
45697
45698
45699
45700
45701 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
45702
45703
45704
45705
45706
45707 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
45708
45709
45710
45711
45712
45713
45714
45715
45716         if test $ac_cv_func_symlink = no; then
45717     HAVE_SYMLINK=0
45718   else
45719     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
45720 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
45721 if test ${gl_cv_func_symlink_works+y}
45722 then :
45723   printf %s "(cached) " >&6
45724 else case e in #(
45725   e) if test "$cross_compiling" = yes
45726 then :
45727   case "$host_os" in
45728                              # Guess yes on Linux systems.
45729             linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
45730                              # Guess yes on systems that emulate the Linux system calls.
45731             midipix*)        gl_cv_func_symlink_works="guessing yes" ;;
45732                              # Guess yes on glibc systems.
45733             *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
45734                              # If we don't know, obey --enable-cross-guesses.
45735             *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
45736           esac
45737
45738 else case e in #(
45739   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45740 /* end confdefs.h.  */
45741 #include <unistd.h>
45742
45743 int
45744 main (void)
45745 {
45746 int result = 0;
45747              if (!symlink ("a", "conftest.link/"))
45748                result |= 1;
45749              if (symlink ("conftest.f", "conftest.lnk2"))
45750                result |= 2;
45751              else if (!symlink ("a", "conftest.lnk2/"))
45752                result |= 4;
45753              return result;
45754
45755   ;
45756   return 0;
45757 }
45758 _ACEOF
45759 if ac_fn_c_try_run "$LINENO"
45760 then :
45761   gl_cv_func_symlink_works=yes
45762 else case e in #(
45763   e) gl_cv_func_symlink_works=no ;;
45764 esac
45765 fi
45766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45767   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45768 esac
45769 fi
45770
45771       rm -f conftest.f conftest.link conftest.lnk2 ;;
45772 esac
45773 fi
45774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
45775 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
45776     case "$gl_cv_func_symlink_works" in
45777       *yes) ;;
45778       *)
45779         REPLACE_SYMLINK=1
45780         ;;
45781     esac
45782   fi
45783
45784
45785      if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
45786   GL_COND_OBJ_SYMLINK_TRUE=
45787   GL_COND_OBJ_SYMLINK_FALSE='#'
45788 else
45789   GL_COND_OBJ_SYMLINK_TRUE='#'
45790   GL_COND_OBJ_SYMLINK_FALSE=
45791 fi
45792 :
45793     if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
45794     GL_COND_OBJ_SYMLINK_TRUE='#'
45795     GL_COND_OBJ_SYMLINK_FALSE='#'
45796   fi
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807     if test "$GL_GNULIB_SYMLINK" != 1; then
45808         if test "$GL_GNULIB_SYMLINK" = 0; then
45809       GL_GNULIB_SYMLINK=$gl_module_indicator_condition
45810     else
45811       GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
45812     fi
45813   fi
45814
45815
45816
45817
45818
45819 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855   if test $gl_threads_api = posix; then
45856     gl_save_LIBS="$LIBS"
45857     LIBS="$LIBS $LIBMULTITHREAD"
45858
45859
45860   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_atfork" >&5
45861 printf %s "checking for pthread_atfork... " >&6; }
45862 if test ${gl_cv_onwards_func_pthread_atfork+y}
45863 then :
45864   printf %s "(cached) " >&6
45865 else case e in #(
45866   e)
45867   exec 9>&6 6>/dev/null
45868
45869        case "$host_os" in
45870
45871          linux*-android*)
45872            ac_fn_check_decl "$LINENO" "pthread_atfork" "ac_cv_have_decl_pthread_atfork" "#include <pthread.h>
45873 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45874 if test "x$ac_cv_have_decl_pthread_atfork" = xyes
45875 then :
45876
45877 fi
45878            if test $ac_cv_have_decl_pthread_atfork = yes; then
45879              ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
45880 if test "x$ac_cv_func_pthread_atfork" = xyes
45881 then :
45882
45883 fi
45884
45885              if test $ac_cv_func_pthread_atfork = yes; then
45886                gl_cv_onwards_func_pthread_atfork=yes
45887              else
45888                                                             gl_cv_onwards_func_pthread_atfork='future OS version'
45889              fi
45890            else
45891              gl_cv_onwards_func_pthread_atfork='future OS version'
45892            fi
45893            ;;
45894
45895
45896          *)
45897            ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
45898 if test "x$ac_cv_func_pthread_atfork" = xyes
45899 then :
45900
45901 fi
45902
45903            gl_cv_onwards_func_pthread_atfork=$ac_cv_func_pthread_atfork
45904            ;;
45905
45906        esac
45907
45908   exec 6>&9 9>&-
45909
45910      ;;
45911 esac
45912 fi
45913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_pthread_atfork" >&5
45914 printf "%s\n" "$gl_cv_onwards_func_pthread_atfork" >&6; }
45915
45916   case "$gl_cv_onwards_func_pthread_atfork" in
45917     future*) ac_cv_func_pthread_atfork=no ;;
45918     *)       ac_cv_func_pthread_atfork=$gl_cv_onwards_func_pthread_atfork ;;
45919   esac
45920   if test $ac_cv_func_pthread_atfork = yes; then
45921
45922 printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
45923
45924   fi
45925
45926
45927     LIBS="$gl_save_LIBS"
45928   fi
45929
45930
45931
45932     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time() works" >&5
45933 printf %s "checking whether time() works... " >&6; }
45934 if test ${gl_cv_func_time_works+y}
45935 then :
45936   printf %s "(cached) " >&6
45937 else case e in #(
45938   e)                               case "$host_os" in
45939        linux*-gnu*)
45940          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45941 /* end confdefs.h.  */
45942
45943            #include <features.h>
45944            #ifdef __GNU_LIBRARY__
45945             #if __GLIBC__ == 2
45946              Unlucky GNU user
45947             #endif
45948            #endif
45949
45950 _ACEOF
45951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45952   $EGREP_TRADITIONAL "Unlucky" >/dev/null 2>&1
45953 then :
45954   gl_cv_func_time_works="guessing no"
45955 else case e in #(
45956   e) gl_cv_func_time_works="guessing yes" ;;
45957 esac
45958 fi
45959 rm -rf conftest*
45960
45961          ;;
45962        aix*)   gl_cv_func_time_works="guessing no";;
45963        mingw*) gl_cv_func_time_works="guessing no";;
45964        *) gl_cv_func_time_works="guessing yes";;
45965      esac
45966      ;;
45967 esac
45968 fi
45969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_time_works" >&5
45970 printf "%s\n" "$gl_cv_func_time_works" >&6; }
45971   case "$gl_cv_func_time_works" in
45972     *no) REPLACE_TIME=1 ;;
45973   esac
45974
45975
45976      if test $REPLACE_TIME = 1; then
45977   GL_COND_OBJ_TIME_TRUE=
45978   GL_COND_OBJ_TIME_FALSE='#'
45979 else
45980   GL_COND_OBJ_TIME_TRUE='#'
45981   GL_COND_OBJ_TIME_FALSE=
45982 fi
45983 :
45984     if test -z "${GL_COND_OBJ_TIME_TRUE}" && test -z "${GL_COND_OBJ_TIME_FALSE}"; then
45985     GL_COND_OBJ_TIME_TRUE='#'
45986     GL_COND_OBJ_TIME_FALSE='#'
45987   fi
45988
45989   if test -z "$GL_COND_OBJ_TIME_TRUE"; then :
45990
45991
45992   :
45993
45994
45995 fi
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005     if test "$GL_GNULIB_TIME" != 1; then
46006         if test "$GL_GNULIB_TIME" = 0; then
46007       GL_GNULIB_TIME=$gl_module_indicator_condition
46008     else
46009       GL_GNULIB_TIME="($GL_GNULIB_TIME || $gl_module_indicator_condition)"
46010     fi
46011   fi
46012
46013
46014
46015
46016
46017 printf "%s\n" "#define GNULIB_TEST_TIME 1" >>confdefs.h
46018
46019
46020
46021   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46022
46023
46024
46025
46026   if test $ac_cv_func_vasnprintf = no; then
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037   gltests_LIBOBJS="$gltests_LIBOBJS vasnprintf.$ac_objext"
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047   gltests_LIBOBJS="$gltests_LIBOBJS printf-args.$ac_objext"
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057   gltests_LIBOBJS="$gltests_LIBOBJS printf-parse.$ac_objext"
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067   gltests_LIBOBJS="$gltests_LIBOBJS asnprintf.$ac_objext"
46068
46069   if test $ac_cv_func_vasnprintf = yes; then
46070
46071 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
46072
46073   fi
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
46084 if test "x$ac_cv_type_ptrdiff_t" = xyes
46085 then :
46086
46087 else case e in #(
46088   e)
46089 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
46090
46091      ;;
46092 esac
46093 fi
46094
46095
46096
46097
46098
46099
46100
46101   fi
46102
46103   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113   if test $ac_cv_func_wctob = no; then
46114     HAVE_WCTOB=0
46115     HAVE_DECL_WCTOB=0
46116   else
46117     HAVE_WCTOB=1
46118
46119
46120
46121          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
46122 printf %s "checking whether wctob works... " >&6; }
46123 if test ${gl_cv_func_wctob_works+y}
46124 then :
46125   printf %s "(cached) " >&6
46126 else case e in #(
46127   e)
46128                         case "$host_os" in
46129             # Guess no on Solaris <= 9 and Cygwin.
46130           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
46131             gl_cv_func_wctob_works="guessing no" ;;
46132             # Guess no on native Windows.
46133           mingw*)
46134             gl_cv_func_wctob_works="guessing no" ;;
46135             # Guess yes otherwise.
46136           *) gl_cv_func_wctob_works="guessing yes" ;;
46137         esac
46138         case "$host_os" in
46139           cygwin*)
46140             if test "$cross_compiling" = yes
46141 then :
46142   :
46143 else case e in #(
46144   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46145 /* end confdefs.h.  */
46146
46147 #include <locale.h>
46148 #include <wchar.h>
46149
46150 register long global __asm__ ("%ebx");
46151
46152 int main ()
46153 {
46154   setlocale (LC_ALL, "en_US.UTF-8");
46155
46156   global = 0x12345678;
46157   if (wctob (0x00FC) != -1)
46158     return 1;
46159   if (global != 0x12345678)
46160     return 2;
46161   return 0;
46162 }
46163 _ACEOF
46164 if ac_fn_c_try_run "$LINENO"
46165 then :
46166   :
46167 else case e in #(
46168   e) gl_cv_func_wctob_works=no ;;
46169 esac
46170 fi
46171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46172   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
46173 esac
46174 fi
46175
46176             ;;
46177         esac
46178         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
46179           if test "$cross_compiling" = yes
46180 then :
46181   :
46182 else case e in #(
46183   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46184 /* end confdefs.h.  */
46185
46186 #include <locale.h>
46187 #include <stdlib.h>
46188 #include <wchar.h>
46189 int main ()
46190 {
46191   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
46192     {
46193       wchar_t wc;
46194
46195       if (mbtowc (&wc, "\374", 1) == 1)
46196         if (wctob (wc) != (unsigned char) '\374')
46197           return 1;
46198     }
46199   return 0;
46200 }
46201 _ACEOF
46202 if ac_fn_c_try_run "$LINENO"
46203 then :
46204   gl_cv_func_wctob_works=yes
46205 else case e in #(
46206   e) gl_cv_func_wctob_works=no ;;
46207 esac
46208 fi
46209 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46210   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
46211 esac
46212 fi
46213
46214         fi
46215        ;;
46216 esac
46217 fi
46218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
46219 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
46220     case "$gl_cv_func_wctob_works" in
46221       *yes) ;;
46222       *) REPLACE_WCTOB=1 ;;
46223     esac
46224     if test $REPLACE_WCTOB = 0; then
46225
46226             ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
46227         #include <wchar.h>
46228
46229 " "$ac_c_undeclared_builtin_options" "CFLAGS"
46230 if test "x$ac_cv_have_decl_wctob" = xyes
46231 then :
46232   ac_have_decl=1
46233 else case e in #(
46234   e) ac_have_decl=0 ;;
46235 esac
46236 fi
46237 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
46238
46239       if test $ac_cv_have_decl_wctob != yes; then
46240         HAVE_DECL_WCTOB=0
46241       fi
46242     fi
46243   fi
46244
46245
46246      if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
46247   GL_COND_OBJ_WCTOB_TRUE=
46248   GL_COND_OBJ_WCTOB_FALSE='#'
46249 else
46250   GL_COND_OBJ_WCTOB_TRUE='#'
46251   GL_COND_OBJ_WCTOB_FALSE=
46252 fi
46253 :
46254     if test -z "${GL_COND_OBJ_WCTOB_TRUE}" && test -z "${GL_COND_OBJ_WCTOB_FALSE}"; then
46255     GL_COND_OBJ_WCTOB_TRUE='#'
46256     GL_COND_OBJ_WCTOB_FALSE='#'
46257   fi
46258
46259   if test -z "$GL_COND_OBJ_WCTOB_TRUE"; then :
46260
46261
46262   :
46263
46264
46265 fi
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280     if test "$GL_GNULIB_WCTOB" != 1; then
46281         if test "$GL_GNULIB_WCTOB" = 0; then
46282       GL_GNULIB_WCTOB=$gl_module_indicator_condition
46283     else
46284       GL_GNULIB_WCTOB="($GL_GNULIB_WCTOB || $gl_module_indicator_condition)"
46285     fi
46286   fi
46287
46288
46289
46290
46291
46292 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
46293
46294
46295
46296
46297
46298
46299   if false; then
46300     REPLACE_WCTOMB=1
46301   fi
46302
46303
46304      if test $REPLACE_WCTOMB = 1; then
46305   GL_COND_OBJ_WCTOMB_TRUE=
46306   GL_COND_OBJ_WCTOMB_FALSE='#'
46307 else
46308   GL_COND_OBJ_WCTOMB_TRUE='#'
46309   GL_COND_OBJ_WCTOMB_FALSE=
46310 fi
46311 :
46312     if test -z "${GL_COND_OBJ_WCTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCTOMB_FALSE}"; then
46313     GL_COND_OBJ_WCTOMB_TRUE='#'
46314     GL_COND_OBJ_WCTOMB_FALSE='#'
46315   fi
46316
46317   if test -z "$GL_COND_OBJ_WCTOMB_TRUE"; then :
46318
46319
46320   :
46321
46322
46323 fi
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333     if test "$GL_GNULIB_WCTOMB" != 1; then
46334         if test "$GL_GNULIB_WCTOMB" = 0; then
46335       GL_GNULIB_WCTOMB=$gl_module_indicator_condition
46336     else
46337       GL_GNULIB_WCTOMB="($GL_GNULIB_WCTOMB || $gl_module_indicator_condition)"
46338     fi
46339   fi
46340
46341
46342
46343
46344
46345 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
46346
46347
46348
46349
46350
46351      if case "$host_os" in mingw*) true;; *) false;; esac; then
46352   GL_COND_OBJ_WINDOWS_THREAD_TRUE=
46353   GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
46354 else
46355   GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
46356   GL_COND_OBJ_WINDOWS_THREAD_FALSE=
46357 fi
46358 :
46359     if test -z "${GL_COND_OBJ_WINDOWS_THREAD_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_THREAD_FALSE}"; then
46360     GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
46361     GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
46362   fi
46363
46364
46365
46366      if case "$host_os" in mingw*) true;; *) false;; esac; then
46367   GL_COND_OBJ_WINDOWS_TLS_TRUE=
46368   GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
46369 else
46370   GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
46371   GL_COND_OBJ_WINDOWS_TLS_FALSE=
46372 fi
46373 :
46374     if test -z "${GL_COND_OBJ_WINDOWS_TLS_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_TLS_FALSE}"; then
46375     GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
46376     GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
46377   fi
46378
46379
46380
46381   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
46382 if test "x$ac_cv_header_stdint_h" = xyes
46383 then :
46384   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
46385
46386 fi
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401
46402   LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
46403
46404   LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
46405
46406   LIBTESTS_LIBDEPS="$gltests_libdeps"
46407
46408
46409
46410 # Ensure VLAs are not used.
46411 # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
46412
46413 printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
46414
46415
46416 # Check whether --enable-gcc-warnings was given.
46417 if test ${enable_gcc_warnings+y}
46418 then :
46419   enableval=$enable_gcc_warnings; case $enableval in
46420      yes|no) ;;
46421      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
46422    esac
46423    gl_gcc_warnings=$enableval
46424 else case e in #(
46425   e) if test -d "$srcdir"/.git; then
46426      gl_gcc_warnings=yes
46427    else
46428      gl_gcc_warnings=no
46429    fi
46430  ;;
46431 esac
46432 fi
46433
46434
46435 if test "$gl_gcc_warnings" = yes; then
46436
46437   ac_ext=c
46438 ac_cpp='$CPP $CPPFLAGS'
46439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46442
46443
46444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
46445 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
46446 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
46447 then :
46448   printf %s "(cached) " >&6
46449 else case e in #(
46450   e)
46451   gl_save_compiler_FLAGS="$CFLAGS"
46452   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
46453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46454 /* end confdefs.h.  */
46455
46456 int
46457 main (void)
46458 {
46459
46460   ;
46461   return 0;
46462 }
46463 _ACEOF
46464 if ac_fn_c_try_link "$LINENO"
46465 then :
46466   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
46467 else case e in #(
46468   e) gl_cv_warn_c__Werror__Wunknown_warning_option=no ;;
46469 esac
46470 fi
46471 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46472     conftest$ac_exeext conftest.$ac_ext
46473   CFLAGS="$gl_save_compiler_FLAGS"
46474  ;;
46475 esac
46476 fi
46477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
46478 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
46479 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
46480 then :
46481   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
46482 else case e in #(
46483   e) gl_unknown_warnings_are_errors= ;;
46484 esac
46485 fi
46486
46487   ac_ext=c
46488 ac_cpp='$CPP $CPPFLAGS'
46489 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46490 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46491 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46492
46493
46494
46495
46496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
46497 printf %s "checking whether C compiler handles -Werror... " >&6; }
46498 if test ${gl_cv_warn_c__Werror+y}
46499 then :
46500   printf %s "(cached) " >&6
46501 else case e in #(
46502   e)
46503   gl_save_compiler_FLAGS="$CFLAGS"
46504   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
46505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46506 /* end confdefs.h.  */
46507
46508 int
46509 main (void)
46510 {
46511
46512   ;
46513   return 0;
46514 }
46515 _ACEOF
46516 if ac_fn_c_try_link "$LINENO"
46517 then :
46518   gl_cv_warn_c__Werror=yes
46519 else case e in #(
46520   e) gl_cv_warn_c__Werror=no ;;
46521 esac
46522 fi
46523 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46524     conftest$ac_exeext conftest.$ac_ext
46525   CFLAGS="$gl_save_compiler_FLAGS"
46526  ;;
46527 esac
46528 fi
46529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
46530 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
46531 if test "x$gl_cv_warn_c__Werror" = xyes
46532 then :
46533   as_fn_append WERROR_CFLAGS " -Werror"
46534 fi
46535
46536
46537
46538
46539   nw=
46540   # This, $nw, is the list of warnings we disable.
46541   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
46542   nw="$nw -Wstack-protector"        # not worth working around
46543
46544
46545   ac_ext=c
46546 ac_cpp='$CPP $CPPFLAGS'
46547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46550
46551
46552
46553   if test -n "$GCC"
46554 then :
46555
46556             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
46557 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
46558 if test ${gl_cv_cc_nomfi_supported+y}
46559 then :
46560   printf %s "(cached) " >&6
46561 else case e in #(
46562   e) gl_save_CFLAGS="$CFLAGS"
46563        CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
46564        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46565 /* end confdefs.h.  */
46566
46567 int
46568 main (void)
46569 {
46570
46571   ;
46572   return 0;
46573 }
46574 _ACEOF
46575 if ac_fn_c_try_compile "$LINENO"
46576 then :
46577   gl_cv_cc_nomfi_supported=yes
46578 else case e in #(
46579   e) gl_cv_cc_nomfi_supported=no ;;
46580 esac
46581 fi
46582 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46583        CFLAGS="$gl_save_CFLAGS"
46584        ;;
46585 esac
46586 fi
46587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
46588 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
46589
46590     if test "$gl_cv_cc_nomfi_supported" = yes
46591 then :
46592
46593                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
46594 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
46595 if test ${gl_cv_cc_nomfi_needed+y}
46596 then :
46597   printf %s "(cached) " >&6
46598 else case e in #(
46599   e) gl_save_CFLAGS="$CFLAGS"
46600          CFLAGS="$CFLAGS -Wextra -Werror"
46601          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46602 /* end confdefs.h.  */
46603 int f (void)
46604                 {
46605                   typedef struct { int a; int b; } s_t;
46606                   s_t s1 = { 0, };
46607                   return s1.b;
46608                 }
46609
46610 int
46611 main (void)
46612 {
46613
46614   ;
46615   return 0;
46616 }
46617 _ACEOF
46618 if ac_fn_c_try_compile "$LINENO"
46619 then :
46620   gl_cv_cc_nomfi_needed=no
46621 else case e in #(
46622   e) gl_cv_cc_nomfi_needed=yes ;;
46623 esac
46624 fi
46625 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46626          CFLAGS="$gl_save_CFLAGS"
46627          ;;
46628 esac
46629 fi
46630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
46631 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
46632
46633 fi
46634
46635                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
46636 printf %s "checking whether -Wuninitialized is supported... " >&6; }
46637 if test ${gl_cv_cc_uninitialized_supported+y}
46638 then :
46639   printf %s "(cached) " >&6
46640 else case e in #(
46641   e) gl_save_CFLAGS="$CFLAGS"
46642        CFLAGS="$CFLAGS -Werror -Wuninitialized"
46643        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46644 /* end confdefs.h.  */
46645
46646 int
46647 main (void)
46648 {
46649
46650   ;
46651   return 0;
46652 }
46653 _ACEOF
46654 if ac_fn_c_try_compile "$LINENO"
46655 then :
46656   gl_cv_cc_uninitialized_supported=yes
46657 else case e in #(
46658   e) gl_cv_cc_uninitialized_supported=no ;;
46659 esac
46660 fi
46661 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46662        CFLAGS="$gl_save_CFLAGS"
46663        ;;
46664 esac
46665 fi
46666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
46667 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
46668
46669 fi
46670
46671   # List all gcc warning categories.
46672   # To compare this list to your installed GCC's, run this Bash command:
46673   #
46674   # comm -3 \
46675   #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
46676   #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
46677   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
46678
46679   ws=
46680   for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
46681     -Wall \
46682     -Warith-conversion \
46683     -Wbad-function-cast \
46684     -Wcast-align=strict \
46685     -Wdate-time \
46686     -Wdisabled-optimization \
46687     -Wdouble-promotion \
46688     -Wduplicated-branches \
46689     -Wduplicated-cond \
46690     -Wextra \
46691     -Wformat-signedness \
46692     -Winit-self \
46693     -Winline \
46694     -Winvalid-pch \
46695     -Wlogical-op \
46696     -Wmissing-declarations \
46697     -Wmissing-include-dirs \
46698     -Wmissing-prototypes \
46699     -Wnested-externs \
46700     -Wnull-dereference \
46701     -Wold-style-definition \
46702     -Wopenmp-simd \
46703     -Woverlength-strings \
46704     -Wpacked \
46705     -Wpointer-arith \
46706     -Wshadow \
46707     -Wstack-protector \
46708     -Wstrict-flex-arrays \
46709     -Wstrict-overflow \
46710     -Wstrict-prototypes \
46711     -Wsuggest-attribute=cold \
46712     -Wsuggest-attribute=const \
46713     -Wsuggest-attribute=format \
46714     -Wsuggest-attribute=malloc \
46715     -Wsuggest-attribute=noreturn \
46716     -Wsuggest-attribute=pure \
46717     -Wsuggest-final-methods \
46718     -Wsuggest-final-types \
46719     -Wsync-nand \
46720     -Wsystem-headers \
46721     -Wtrampolines \
46722     -Wuninitialized \
46723     -Wunknown-pragmas \
46724     -Wunsafe-loop-optimizations \
46725     -Wunused-macros \
46726     -Wvariadic-macros \
46727     -Wvector-operation-performance \
46728     -Wvla \
46729     -Wwrite-strings \
46730     \
46731     ; do
46732     as_fn_append ws " $gl_manywarn_item"
46733   done
46734
46735   # gcc --help=warnings outputs an unusual form for these options; list
46736   # them here so that the above 'comm' command doesn't report a false match.
46737   as_fn_append ws ' -Warray-bounds=2'
46738   as_fn_append ws ' -Wattribute-alias=2'
46739   as_fn_append ws ' -Wbidi-chars=any,ucn'
46740   as_fn_append ws ' -Wformat-overflow=2'
46741   as_fn_append ws ' -Wformat=2'
46742   as_fn_append ws ' -Wformat-truncation=2'
46743   as_fn_append ws ' -Wimplicit-fallthrough=5'
46744   as_fn_append ws ' -Wshift-overflow=2'
46745   as_fn_append ws ' -Wuse-after-free=3'
46746   as_fn_append ws ' -Wunused-const-variable=2'
46747   as_fn_append ws ' -Wvla-larger-than=4031'
46748
46749   # These are needed for older GCC versions.
46750   if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
46751     case $gl_gcc_version in
46752       'gcc (GCC) '[0-3].* | \
46753       'gcc (GCC) '4.[0-7].*)
46754         as_fn_append ws ' -fdiagnostics-show-option'
46755         as_fn_append ws ' -funit-at-a-time'
46756           ;;
46757     esac
46758     case $gl_gcc_version in
46759       'gcc (GCC) '[0-9].*)
46760         as_fn_append ws ' -fno-common'
46761           ;;
46762     esac
46763   fi
46764
46765   # Disable specific options as needed.
46766   if test "$gl_cv_cc_nomfi_needed" = yes; then
46767     as_fn_append ws ' -Wno-missing-field-initializers'
46768   fi
46769
46770   if test "$gl_cv_cc_uninitialized_supported" = no; then
46771     as_fn_append ws ' -Wno-uninitialized'
46772   fi
46773
46774   # This warning have too many false alarms in GCC 11.2.1.
46775   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713
46776   as_fn_append ws ' -Wno-analyzer-malloc-leak'
46777
46778   ac_ext=c
46779 ac_cpp='$CPP $CPPFLAGS'
46780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46783
46784
46785
46786   gl_warn_set=
46787   set x $ws; shift
46788   for gl_warn_item
46789   do
46790     case " $nw " in
46791       *" $gl_warn_item "*)
46792         ;;
46793       *)
46794         as_fn_append gl_warn_set " $gl_warn_item"
46795         ;;
46796     esac
46797   done
46798   ws=$gl_warn_set
46799
46800   for w in $ws; do
46801
46802
46803 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | sed "$as_sed_sh"`
46804 gl_positive="$w"
46805 case $gl_positive in
46806   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
46807 esac
46808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
46809 printf %s "checking whether C compiler handles $w... " >&6; }
46810 if eval test \${$as_gl_Warn+y}
46811 then :
46812   printf %s "(cached) " >&6
46813 else case e in #(
46814   e)
46815   gl_save_compiler_FLAGS="$CFLAGS"
46816   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
46817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46818 /* end confdefs.h.  */
46819
46820 int
46821 main (void)
46822 {
46823
46824   ;
46825   return 0;
46826 }
46827 _ACEOF
46828 if ac_fn_c_try_link "$LINENO"
46829 then :
46830   eval "$as_gl_Warn=yes"
46831 else case e in #(
46832   e) eval "$as_gl_Warn=no" ;;
46833 esac
46834 fi
46835 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46836     conftest$ac_exeext conftest.$ac_ext
46837   CFLAGS="$gl_save_compiler_FLAGS"
46838  ;;
46839 esac
46840 fi
46841 eval ac_res=\$$as_gl_Warn
46842                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46843 printf "%s\n" "$ac_res" >&6; }
46844 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
46845 then :
46846   as_fn_append WARN_CFLAGS " $w"
46847 fi
46848
46849
46850   done
46851
46852
46853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
46854 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
46855 if test ${gl_cv_warn_c__Wno_sign_compare+y}
46856 then :
46857   printf %s "(cached) " >&6
46858 else case e in #(
46859   e)
46860   gl_save_compiler_FLAGS="$CFLAGS"
46861   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
46862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46863 /* end confdefs.h.  */
46864
46865 int
46866 main (void)
46867 {
46868
46869   ;
46870   return 0;
46871 }
46872 _ACEOF
46873 if ac_fn_c_try_link "$LINENO"
46874 then :
46875   gl_cv_warn_c__Wno_sign_compare=yes
46876 else case e in #(
46877   e) gl_cv_warn_c__Wno_sign_compare=no ;;
46878 esac
46879 fi
46880 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46881     conftest$ac_exeext conftest.$ac_ext
46882   CFLAGS="$gl_save_compiler_FLAGS"
46883  ;;
46884 esac
46885 fi
46886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
46887 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
46888 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
46889 then :
46890   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
46891 fi
46892
46893      # Too many warnings for now
46894
46895
46896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
46897 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
46898 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
46899 then :
46900   printf %s "(cached) " >&6
46901 else case e in #(
46902   e)
46903   gl_save_compiler_FLAGS="$CFLAGS"
46904   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
46905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46906 /* end confdefs.h.  */
46907
46908 int
46909 main (void)
46910 {
46911
46912   ;
46913   return 0;
46914 }
46915 _ACEOF
46916 if ac_fn_c_try_link "$LINENO"
46917 then :
46918   gl_cv_warn_c__Wno_unused_parameter=yes
46919 else case e in #(
46920   e) gl_cv_warn_c__Wno_unused_parameter=no ;;
46921 esac
46922 fi
46923 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46924     conftest$ac_exeext conftest.$ac_ext
46925   CFLAGS="$gl_save_compiler_FLAGS"
46926  ;;
46927 esac
46928 fi
46929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
46930 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
46931 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
46932 then :
46933   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
46934 fi
46935
46936  # Too many warnings for now
46937
46938
46939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
46940 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
46941 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
46942 then :
46943   printf %s "(cached) " >&6
46944 else case e in #(
46945   e)
46946   gl_save_compiler_FLAGS="$CFLAGS"
46947   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
46948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46949 /* end confdefs.h.  */
46950
46951 int
46952 main (void)
46953 {
46954
46955   ;
46956   return 0;
46957 }
46958 _ACEOF
46959 if ac_fn_c_try_link "$LINENO"
46960 then :
46961   gl_cv_warn_c__Wno_format_nonliteral=yes
46962 else case e in #(
46963   e) gl_cv_warn_c__Wno_format_nonliteral=no ;;
46964 esac
46965 fi
46966 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46967     conftest$ac_exeext conftest.$ac_ext
46968   CFLAGS="$gl_save_compiler_FLAGS"
46969  ;;
46970 esac
46971 fi
46972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
46973 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
46974 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
46975 then :
46976   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
46977 fi
46978
46979
46980
46981
46982
46983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
46984 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
46985 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
46986 then :
46987   printf %s "(cached) " >&6
46988 else case e in #(
46989   e)
46990   gl_save_compiler_FLAGS="$CFLAGS"
46991   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
46992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46993 /* end confdefs.h.  */
46994
46995 int
46996 main (void)
46997 {
46998
46999   ;
47000   return 0;
47001 }
47002 _ACEOF
47003 if ac_fn_c_try_link "$LINENO"
47004 then :
47005   gl_cv_warn_c__fdiagnostics_show_option=yes
47006 else case e in #(
47007   e) gl_cv_warn_c__fdiagnostics_show_option=no ;;
47008 esac
47009 fi
47010 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47011     conftest$ac_exeext conftest.$ac_ext
47012   CFLAGS="$gl_save_compiler_FLAGS"
47013  ;;
47014 esac
47015 fi
47016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
47017 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
47018 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
47019 then :
47020   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
47021 fi
47022
47023
47024
47025
47026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
47027 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
47028 if test ${gl_cv_warn_c__funit_at_a_time+y}
47029 then :
47030   printf %s "(cached) " >&6
47031 else case e in #(
47032   e)
47033   gl_save_compiler_FLAGS="$CFLAGS"
47034   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
47035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47036 /* end confdefs.h.  */
47037
47038 int
47039 main (void)
47040 {
47041
47042   ;
47043   return 0;
47044 }
47045 _ACEOF
47046 if ac_fn_c_try_link "$LINENO"
47047 then :
47048   gl_cv_warn_c__funit_at_a_time=yes
47049 else case e in #(
47050   e) gl_cv_warn_c__funit_at_a_time=no ;;
47051 esac
47052 fi
47053 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47054     conftest$ac_exeext conftest.$ac_ext
47055   CFLAGS="$gl_save_compiler_FLAGS"
47056  ;;
47057 esac
47058 fi
47059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
47060 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
47061 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
47062 then :
47063   as_fn_append WARN_CFLAGS " -funit-at-a-time"
47064 fi
47065
47066
47067
47068
47069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
47070 printf %s "checking whether C compiler handles -fno-common... " >&6; }
47071 if test ${gl_cv_warn_c__fno_common+y}
47072 then :
47073   printf %s "(cached) " >&6
47074 else case e in #(
47075   e)
47076   gl_save_compiler_FLAGS="$CFLAGS"
47077   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
47078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47079 /* end confdefs.h.  */
47080
47081 int
47082 main (void)
47083 {
47084
47085   ;
47086   return 0;
47087 }
47088 _ACEOF
47089 if ac_fn_c_try_link "$LINENO"
47090 then :
47091   gl_cv_warn_c__fno_common=yes
47092 else case e in #(
47093   e) gl_cv_warn_c__fno_common=no ;;
47094 esac
47095 fi
47096 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47097     conftest$ac_exeext conftest.$ac_ext
47098   CFLAGS="$gl_save_compiler_FLAGS"
47099  ;;
47100 esac
47101 fi
47102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
47103 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
47104 if test "x$gl_cv_warn_c__fno_common" = xyes
47105 then :
47106   as_fn_append WARN_CFLAGS " -fno-common"
47107 fi
47108
47109
47110
47111
47112
47113
47114 printf "%s\n" "#define GCC_LINT 1" >>confdefs.h
47115
47116
47117 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
47118
47119
47120 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
47121
47122
47123   # We use a slightly smaller set of warning options for lib/.
47124   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
47125   nw=
47126   nw="$nw -Wunused-macros"
47127   nw="$nw -Wsuggest-attribute=pure"
47128   nw="$nw -Wduplicated-branches"    # Too many false alarms
47129
47130
47131   gl_warn_set=
47132   set x $WARN_CFLAGS; shift
47133   for gl_warn_item
47134   do
47135     case " $nw " in
47136       *" $gl_warn_item "*)
47137         ;;
47138       *)
47139         as_fn_append gl_warn_set " $gl_warn_item"
47140         ;;
47141     esac
47142   done
47143   GNULIB_WARN_CFLAGS=$gl_warn_set
47144
47145
47146 fi
47147
47148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
47149 printf %s "checking for inline... " >&6; }
47150 if test ${ac_cv_c_inline+y}
47151 then :
47152   printf %s "(cached) " >&6
47153 else case e in #(
47154   e) ac_cv_c_inline=no
47155 for ac_kw in inline __inline__ __inline; do
47156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47157 /* end confdefs.h.  */
47158 #ifndef __cplusplus
47159 typedef int foo_t;
47160 static $ac_kw foo_t static_foo (void) {return 0; }
47161 $ac_kw foo_t foo (void) {return 0; }
47162 #endif
47163
47164 _ACEOF
47165 if ac_fn_c_try_compile "$LINENO"
47166 then :
47167   ac_cv_c_inline=$ac_kw
47168 fi
47169 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47170   test "$ac_cv_c_inline" != no && break
47171 done
47172  ;;
47173 esac
47174 fi
47175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
47176 printf "%s\n" "$ac_cv_c_inline" >&6; }
47177
47178 case $ac_cv_c_inline in
47179   inline | yes) ;;
47180   *)
47181     case $ac_cv_c_inline in
47182       no) ac_val=;;
47183       *) ac_val=$ac_cv_c_inline;;
47184     esac
47185     cat >>confdefs.h <<_ACEOF
47186 #ifndef __cplusplus
47187 #define inline $ac_val
47188 #endif
47189 _ACEOF
47190     ;;
47191 esac
47192
47193
47194
47195 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
47196
47197
47198 # Extract the first word of "pr", so it can be a program name with args.
47199 set dummy pr; ac_word=$2
47200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47201 printf %s "checking for $ac_word... " >&6; }
47202 if test ${ac_cv_path_PR_PROGRAM+y}
47203 then :
47204   printf %s "(cached) " >&6
47205 else case e in #(
47206   e) case $PR_PROGRAM in
47207   [\\/]* | ?:[\\/]*)
47208   ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
47209   ;;
47210   *)
47211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47212 for as_dir in $PATH
47213 do
47214   IFS=$as_save_IFS
47215   case $as_dir in #(((
47216     '') as_dir=./ ;;
47217     */) ;;
47218     *) as_dir=$as_dir/ ;;
47219   esac
47220     for ac_exec_ext in '' $ac_executable_extensions; do
47221   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47222     ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
47223     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47224     break 2
47225   fi
47226 done
47227   done
47228 IFS=$as_save_IFS
47229
47230   test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
47231   ;;
47232 esac ;;
47233 esac
47234 fi
47235 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
47236 if test -n "$PR_PROGRAM"; then
47237   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
47238 printf "%s\n" "$PR_PROGRAM" >&6; }
47239 else
47240   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47241 printf "%s\n" "no" >&6; }
47242 fi
47243
47244
47245
47246 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
47247
47248
47249 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
47250 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
47251 then :
47252
47253 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
47254
47255
47256 fi
47257
47258 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
47259 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
47260 then :
47261
47262 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
47263
47264
47265 fi
47266
47267 ac_header_dirent=no
47268 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
47269   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
47270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
47271 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
47272 if eval test \${$as_ac_Header+y}
47273 then :
47274   printf %s "(cached) " >&6
47275 else case e in #(
47276   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47277 /* end confdefs.h.  */
47278 #include <sys/types.h>
47279 #include <$ac_hdr>
47280
47281 int
47282 main (void)
47283 {
47284 if ((DIR *) 0)
47285 return 0;
47286   ;
47287   return 0;
47288 }
47289 _ACEOF
47290 if ac_fn_c_try_compile "$LINENO"
47291 then :
47292   eval "$as_ac_Header=yes"
47293 else case e in #(
47294   e) eval "$as_ac_Header=no" ;;
47295 esac
47296 fi
47297 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47298 esac
47299 fi
47300 eval ac_res=\$$as_ac_Header
47301                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47302 printf "%s\n" "$ac_res" >&6; }
47303 if eval test \"x\$"$as_ac_Header"\" = x"yes"
47304 then :
47305   cat >>confdefs.h <<_ACEOF
47306 #define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
47307 _ACEOF
47308
47309 ac_header_dirent=$ac_hdr; break
47310 fi
47311
47312 done
47313 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
47314 if test $ac_header_dirent = dirent.h; then
47315   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
47316 printf %s "checking for library containing opendir... " >&6; }
47317 if test ${ac_cv_search_opendir+y}
47318 then :
47319   printf %s "(cached) " >&6
47320 else case e in #(
47321   e) ac_func_search_save_LIBS=$LIBS
47322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47323 /* end confdefs.h.  */
47324
47325 /* Override any GCC internal prototype to avoid an error.
47326    Use char because int might match the return type of a GCC
47327    builtin and then its argument prototype would still apply.
47328    The 'extern "C"' is for builds by C++ compilers;
47329    although this is not generally supported in C code supporting it here
47330    has little cost and some practical benefit (sr 110532).  */
47331 #ifdef __cplusplus
47332 extern "C"
47333 #endif
47334 char opendir (void);
47335 int
47336 main (void)
47337 {
47338 return opendir ();
47339   ;
47340   return 0;
47341 }
47342 _ACEOF
47343 for ac_lib in '' dir
47344 do
47345   if test -z "$ac_lib"; then
47346     ac_res="none required"
47347   else
47348     ac_res=-l$ac_lib
47349     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
47350   fi
47351   if ac_fn_c_try_link "$LINENO"
47352 then :
47353   ac_cv_search_opendir=$ac_res
47354 fi
47355 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47356     conftest$ac_exeext
47357   if test ${ac_cv_search_opendir+y}
47358 then :
47359   break
47360 fi
47361 done
47362 if test ${ac_cv_search_opendir+y}
47363 then :
47364
47365 else case e in #(
47366   e) ac_cv_search_opendir=no ;;
47367 esac
47368 fi
47369 rm conftest.$ac_ext
47370 LIBS=$ac_func_search_save_LIBS ;;
47371 esac
47372 fi
47373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
47374 printf "%s\n" "$ac_cv_search_opendir" >&6; }
47375 ac_res=$ac_cv_search_opendir
47376 if test "$ac_res" != no
47377 then :
47378   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47379
47380 fi
47381
47382 else
47383   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
47384 printf %s "checking for library containing opendir... " >&6; }
47385 if test ${ac_cv_search_opendir+y}
47386 then :
47387   printf %s "(cached) " >&6
47388 else case e in #(
47389   e) ac_func_search_save_LIBS=$LIBS
47390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47391 /* end confdefs.h.  */
47392
47393 /* Override any GCC internal prototype to avoid an error.
47394    Use char because int might match the return type of a GCC
47395    builtin and then its argument prototype would still apply.
47396    The 'extern "C"' is for builds by C++ compilers;
47397    although this is not generally supported in C code supporting it here
47398    has little cost and some practical benefit (sr 110532).  */
47399 #ifdef __cplusplus
47400 extern "C"
47401 #endif
47402 char opendir (void);
47403 int
47404 main (void)
47405 {
47406 return opendir ();
47407   ;
47408   return 0;
47409 }
47410 _ACEOF
47411 for ac_lib in '' x
47412 do
47413   if test -z "$ac_lib"; then
47414     ac_res="none required"
47415   else
47416     ac_res=-l$ac_lib
47417     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
47418   fi
47419   if ac_fn_c_try_link "$LINENO"
47420 then :
47421   ac_cv_search_opendir=$ac_res
47422 fi
47423 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47424     conftest$ac_exeext
47425   if test ${ac_cv_search_opendir+y}
47426 then :
47427   break
47428 fi
47429 done
47430 if test ${ac_cv_search_opendir+y}
47431 then :
47432
47433 else case e in #(
47434   e) ac_cv_search_opendir=no ;;
47435 esac
47436 fi
47437 rm conftest.$ac_ext
47438 LIBS=$ac_func_search_save_LIBS ;;
47439 esac
47440 fi
47441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
47442 printf "%s\n" "$ac_cv_search_opendir" >&6; }
47443 ac_res=$ac_cv_search_opendir
47444 if test "$ac_res" != no
47445 then :
47446   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47447
47448 fi
47449
47450 fi
47451
47452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
47453 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
47454 if test ${ac_cv_header_sys_wait_h+y}
47455 then :
47456   printf %s "(cached) " >&6
47457 else case e in #(
47458   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47459 /* end confdefs.h.  */
47460 #include <sys/types.h>
47461 #include <sys/wait.h>
47462 #ifndef WEXITSTATUS
47463 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
47464 #endif
47465 #ifndef WIFEXITED
47466 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
47467 #endif
47468
47469 int
47470 main (void)
47471 {
47472   int s;
47473   wait (&s);
47474   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
47475   ;
47476   return 0;
47477 }
47478 _ACEOF
47479 if ac_fn_c_try_compile "$LINENO"
47480 then :
47481   ac_cv_header_sys_wait_h=yes
47482 else case e in #(
47483   e) ac_cv_header_sys_wait_h=no ;;
47484 esac
47485 fi
47486 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47487 esac
47488 fi
47489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
47490 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
47491 if test $ac_cv_header_sys_wait_h = yes; then
47492
47493 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
47494
47495 fi
47496
47497
47498   ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
47499 "
47500 if test "x$ac_cv_type_pid_t" = xyes
47501 then :
47502
47503 else case e in #(
47504   e)                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47505 /* end confdefs.h.  */
47506
47507           #if defined _WIN64 && !defined __CYGWIN__
47508           LLP64
47509           #endif
47510
47511 int
47512 main (void)
47513 {
47514
47515   ;
47516   return 0;
47517 }
47518
47519 _ACEOF
47520 if ac_fn_c_try_compile "$LINENO"
47521 then :
47522   ac_pid_type='int'
47523 else case e in #(
47524   e) ac_pid_type='__int64' ;;
47525 esac
47526 fi
47527 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47528
47529 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
47530
47531      ;;
47532 esac
47533 fi
47534
47535
47536
47537
47538
47539
47540
47541
47542 if test $ac_cv_func_sigprocmask = no; then
47543   ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
47544 if test "x$ac_cv_func_sigblock" = xyes
47545 then :
47546   printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
47547
47548 fi
47549
47550 fi
47551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
47552 printf %s "checking whether closedir returns void... " >&6; }
47553 if test ${ac_cv_func_closedir_void+y}
47554 then :
47555   printf %s "(cached) " >&6
47556 else case e in #(
47557   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47558 /* end confdefs.h.  */
47559
47560 #include <$ac_header_dirent>
47561
47562 int
47563 main (void)
47564 {
47565
47566   return closedir(0);
47567
47568   ;
47569   return 0;
47570 }
47571 _ACEOF
47572 if ac_fn_c_try_compile "$LINENO"
47573 then :
47574   ac_cv_func_closedir_void=no
47575 else case e in #(
47576   e) ac_cv_func_closedir_void=yes ;;
47577 esac
47578 fi
47579 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47580 esac
47581 fi
47582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
47583 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
47584 if test $ac_cv_func_closedir_void = yes; then
47585
47586 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
47587
47588 fi
47589
47590
47591
47592
47593
47594
47595 if test "x$ac_cv_func_fork" = xyes; then
47596   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
47597 printf %s "checking for working fork... " >&6; }
47598 if test ${ac_cv_func_fork_works+y}
47599 then :
47600   printf %s "(cached) " >&6
47601 else case e in #(
47602   e) if test "$cross_compiling" = yes
47603 then :
47604   ac_cv_func_fork_works=cross
47605 else case e in #(
47606   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47607 /* end confdefs.h.  */
47608 $ac_includes_default
47609 int
47610 main (void)
47611 {
47612
47613           /* By R. Kuhlmann. */
47614           return fork () < 0;
47615
47616   ;
47617   return 0;
47618 }
47619 _ACEOF
47620 if ac_fn_c_try_run "$LINENO"
47621 then :
47622   ac_cv_func_fork_works=yes
47623 else case e in #(
47624   e) ac_cv_func_fork_works=no ;;
47625 esac
47626 fi
47627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47628   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47629 esac
47630 fi
47631  ;;
47632 esac
47633 fi
47634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
47635 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
47636
47637 else
47638   ac_cv_func_fork_works=$ac_cv_func_fork
47639 fi
47640 if test "x$ac_cv_func_fork_works" = xcross; then
47641   case $host in
47642     *-*-amigaos* | *-*-msdosdjgpp*)
47643       # Override, as these systems have only a dummy fork() stub
47644       ac_cv_func_fork_works=no
47645       ;;
47646     *)
47647       ac_cv_func_fork_works=yes
47648       ;;
47649   esac
47650   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
47651 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
47652 fi
47653 ac_cv_func_vfork_works=$ac_cv_func_vfork
47654 if test "x$ac_cv_func_vfork" = xyes; then
47655   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
47656 printf %s "checking for working vfork... " >&6; }
47657 if test ${ac_cv_func_vfork_works+y}
47658 then :
47659   printf %s "(cached) " >&6
47660 else case e in #(
47661   e) if test "$cross_compiling" = yes
47662 then :
47663   ac_cv_func_vfork_works=cross
47664 else case e in #(
47665   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47666 /* end confdefs.h.  */
47667 /* Thanks to Paul Eggert for this test.  */
47668 $ac_includes_default
47669 #include <signal.h>
47670 #include <sys/wait.h>
47671 #ifdef HAVE_VFORK_H
47672 # include <vfork.h>
47673 #endif
47674
47675 static void
47676 do_nothing (int sig)
47677 {
47678   (void) sig;
47679 }
47680
47681 /* On some sparc systems, changes by the child to local and incoming
47682    argument registers are propagated back to the parent.  The compiler
47683    is told about this with #include <vfork.h>, but some compilers
47684    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
47685    static variable whose address is put into a register that is
47686    clobbered by the vfork.  */
47687 static void
47688 sparc_address_test (int arg)
47689 {
47690   static pid_t child;
47691   if (!child) {
47692     child = vfork ();
47693     if (child < 0) {
47694       perror ("vfork");
47695       _exit(2);
47696     }
47697     if (!child) {
47698       arg = getpid();
47699       write(-1, "", 0);
47700       _exit (arg);
47701     }
47702   }
47703 }
47704
47705 int
47706 main (void)
47707 {
47708   pid_t parent = getpid ();
47709   pid_t child;
47710
47711   sparc_address_test (0);
47712
47713   /* On Solaris 2.4, changes by the child to the signal handler
47714      also munge signal handlers in the parent.  To detect this,
47715      start by putting the parent's handler in a known state.  */
47716   signal (SIGTERM, SIG_DFL);
47717
47718   child = vfork ();
47719
47720   if (child == 0) {
47721     /* Here is another test for sparc vfork register problems.  This
47722        test uses lots of local variables, at least as many local
47723        variables as main has allocated so far including compiler
47724        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
47725        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
47726        reuse the register of parent for one of the local variables,
47727        since it will think that parent can't possibly be used any more
47728        in this routine.  Assigning to the local variable will thus
47729        munge parent in the parent process.  */
47730     pid_t
47731       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
47732       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
47733     /* Convince the compiler that p..p7 are live; otherwise, it might
47734        use the same hardware register for all 8 local variables.  */
47735     if (p != p1 || p != p2 || p != p3 || p != p4
47736         || p != p5 || p != p6 || p != p7)
47737       _exit(1);
47738
47739     /* Alter the child's signal handler.  */
47740     if (signal (SIGTERM, do_nothing) != SIG_DFL)
47741       _exit(1);
47742
47743     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
47744        from child file descriptors.  If the child closes a descriptor
47745        before it execs or exits, this munges the parent's descriptor
47746        as well.  Test for this by closing stdout in the child.  */
47747     _exit(close(fileno(stdout)) != 0);
47748   } else {
47749     int status;
47750     struct stat st;
47751
47752     while (wait(&status) != child)
47753       ;
47754     return (
47755          /* Was there some problem with vforking?  */
47756          child < 0
47757
47758          /* Did the child munge the parent's signal handler?  */
47759          || signal (SIGTERM, SIG_DFL) != SIG_DFL
47760
47761          /* Did the child fail?  (This shouldn't happen.)  */
47762          || status
47763
47764          /* Did the vfork/compiler bug occur?  */
47765          || parent != getpid()
47766
47767          /* Did the file descriptor bug occur?  */
47768          || fstat(fileno(stdout), &st) != 0
47769          );
47770   }
47771 }
47772 _ACEOF
47773 if ac_fn_c_try_run "$LINENO"
47774 then :
47775   ac_cv_func_vfork_works=yes
47776 else case e in #(
47777   e) ac_cv_func_vfork_works=no ;;
47778 esac
47779 fi
47780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47781   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47782 esac
47783 fi
47784  ;;
47785 esac
47786 fi
47787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
47788 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
47789
47790 fi;
47791 if test "x$ac_cv_func_fork_works" = xcross; then
47792   ac_cv_func_vfork_works=$ac_cv_func_vfork
47793   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
47794 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
47795 fi
47796
47797 if test "x$ac_cv_func_vfork_works" = xyes; then
47798
47799 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
47800
47801 else
47802
47803 printf "%s\n" "#define vfork fork" >>confdefs.h
47804
47805 fi
47806 if test "x$ac_cv_func_fork_works" = xyes; then
47807
47808 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
47809
47810 fi
47811
47812
47813 # When .tarball-version exists, we're building from a tarball
47814 # and must not make man/*.1 files depend on the generated src/version.c,
47815 # because that would induce a requirement to run the help2man perl script.
47816 # We are not yet prepared to make perl a build-from-tarball requirement.
47817 # Hence, here we detect .tarball-version existence.  When not present,
47818 # we define a variable to be used in man/Makefile.am to induce the
47819 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
47820 # but not when built from a tarball.
47821
47822 test -f $srcdir/.tarball-version \
47823   && SRC_VERSION_C= \
47824   || SRC_VERSION_C=../src/version.c
47825
47826
47827   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
47828 printf %s "checking whether NLS is requested... " >&6; }
47829     # Check whether --enable-nls was given.
47830 if test ${enable_nls+y}
47831 then :
47832   enableval=$enable_nls; USE_NLS=$enableval
47833 else case e in #(
47834   e) USE_NLS=yes ;;
47835 esac
47836 fi
47837
47838   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
47839 printf "%s\n" "$USE_NLS" >&6; }
47840
47841
47842
47843
47844       GETTEXT_MACRO_VERSION=0.19
47845
47846
47847
47848
47849 # Prepare PATH_SEPARATOR.
47850 # The user is always right.
47851 if test "${PATH_SEPARATOR+set}" != set; then
47852   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47853   # contains only /bin. Note that ksh looks also at the FPATH variable,
47854   # so we have to set that as well for the test.
47855   PATH_SEPARATOR=:
47856   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47857     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47858            || PATH_SEPARATOR=';'
47859        }
47860 fi
47861
47862 # Find out how to test for executable files. Don't use a zero-byte file,
47863 # as systems may use methods other than mode bits to determine executability.
47864 cat >conf$$.file <<_ASEOF
47865 #! /bin/sh
47866 exit 0
47867 _ASEOF
47868 chmod +x conf$$.file
47869 if test -x conf$$.file >/dev/null 2>&1; then
47870   ac_executable_p="test -x"
47871 else
47872   ac_executable_p="test -f"
47873 fi
47874 rm -f conf$$.file
47875
47876 # Extract the first word of "msgfmt", so it can be a program name with args.
47877 set dummy msgfmt; ac_word=$2
47878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47879 printf %s "checking for $ac_word... " >&6; }
47880 if test ${ac_cv_path_MSGFMT+y}
47881 then :
47882   printf %s "(cached) " >&6
47883 else case e in #(
47884   e) case "$MSGFMT" in
47885   [\\/]* | ?:[\\/]*)
47886     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
47887     ;;
47888   *)
47889     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47890     for ac_dir in $PATH; do
47891       IFS="$ac_save_IFS"
47892       test -z "$ac_dir" && ac_dir=.
47893       for ac_exec_ext in '' $ac_executable_extensions; do
47894         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47895           echo "$as_me: trying $ac_dir/$ac_word..." >&5
47896           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
47897      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
47898             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
47899             break 2
47900           fi
47901         fi
47902       done
47903     done
47904     IFS="$ac_save_IFS"
47905   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
47906     ;;
47907 esac ;;
47908 esac
47909 fi
47910 MSGFMT="$ac_cv_path_MSGFMT"
47911 if test "$MSGFMT" != ":"; then
47912   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
47913 printf "%s\n" "$MSGFMT" >&6; }
47914 else
47915   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47916 printf "%s\n" "no" >&6; }
47917 fi
47918
47919   # Extract the first word of "gmsgfmt", so it can be a program name with args.
47920 set dummy gmsgfmt; ac_word=$2
47921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47922 printf %s "checking for $ac_word... " >&6; }
47923 if test ${ac_cv_path_GMSGFMT+y}
47924 then :
47925   printf %s "(cached) " >&6
47926 else case e in #(
47927   e) case $GMSGFMT in
47928   [\\/]* | ?:[\\/]*)
47929   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
47930   ;;
47931   *)
47932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47933 for as_dir in $PATH
47934 do
47935   IFS=$as_save_IFS
47936   case $as_dir in #(((
47937     '') as_dir=./ ;;
47938     */) ;;
47939     *) as_dir=$as_dir/ ;;
47940   esac
47941     for ac_exec_ext in '' $ac_executable_extensions; do
47942   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47943     ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
47944     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47945     break 2
47946   fi
47947 done
47948   done
47949 IFS=$as_save_IFS
47950
47951   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
47952   ;;
47953 esac ;;
47954 esac
47955 fi
47956 GMSGFMT=$ac_cv_path_GMSGFMT
47957 if test -n "$GMSGFMT"; then
47958   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
47959 printf "%s\n" "$GMSGFMT" >&6; }
47960 else
47961   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47962 printf "%s\n" "no" >&6; }
47963 fi
47964
47965
47966
47967     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47968     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
47969     *) MSGFMT_015=$MSGFMT ;;
47970   esac
47971
47972   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47973     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
47974     *) GMSGFMT_015=$GMSGFMT ;;
47975   esac
47976
47977
47978
47979 # Prepare PATH_SEPARATOR.
47980 # The user is always right.
47981 if test "${PATH_SEPARATOR+set}" != set; then
47982   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47983   # contains only /bin. Note that ksh looks also at the FPATH variable,
47984   # so we have to set that as well for the test.
47985   PATH_SEPARATOR=:
47986   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47987     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47988            || PATH_SEPARATOR=';'
47989        }
47990 fi
47991
47992 # Find out how to test for executable files. Don't use a zero-byte file,
47993 # as systems may use methods other than mode bits to determine executability.
47994 cat >conf$$.file <<_ASEOF
47995 #! /bin/sh
47996 exit 0
47997 _ASEOF
47998 chmod +x conf$$.file
47999 if test -x conf$$.file >/dev/null 2>&1; then
48000   ac_executable_p="test -x"
48001 else
48002   ac_executable_p="test -f"
48003 fi
48004 rm -f conf$$.file
48005
48006 # Extract the first word of "xgettext", so it can be a program name with args.
48007 set dummy xgettext; ac_word=$2
48008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48009 printf %s "checking for $ac_word... " >&6; }
48010 if test ${ac_cv_path_XGETTEXT+y}
48011 then :
48012   printf %s "(cached) " >&6
48013 else case e in #(
48014   e) case "$XGETTEXT" in
48015   [\\/]* | ?:[\\/]*)
48016     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
48017     ;;
48018   *)
48019     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
48020     for ac_dir in $PATH; do
48021       IFS="$ac_save_IFS"
48022       test -z "$ac_dir" && ac_dir=.
48023       for ac_exec_ext in '' $ac_executable_extensions; do
48024         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
48025           echo "$as_me: trying $ac_dir/$ac_word..." >&5
48026           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
48027      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
48028             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
48029             break 2
48030           fi
48031         fi
48032       done
48033     done
48034     IFS="$ac_save_IFS"
48035   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
48036     ;;
48037 esac ;;
48038 esac
48039 fi
48040 XGETTEXT="$ac_cv_path_XGETTEXT"
48041 if test "$XGETTEXT" != ":"; then
48042   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
48043 printf "%s\n" "$XGETTEXT" >&6; }
48044 else
48045   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48046 printf "%s\n" "no" >&6; }
48047 fi
48048
48049     rm -f messages.po
48050
48051     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
48052     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
48053     *) XGETTEXT_015=$XGETTEXT ;;
48054   esac
48055
48056
48057
48058 # Prepare PATH_SEPARATOR.
48059 # The user is always right.
48060 if test "${PATH_SEPARATOR+set}" != set; then
48061   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
48062   # contains only /bin. Note that ksh looks also at the FPATH variable,
48063   # so we have to set that as well for the test.
48064   PATH_SEPARATOR=:
48065   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
48066     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
48067            || PATH_SEPARATOR=';'
48068        }
48069 fi
48070
48071 # Find out how to test for executable files. Don't use a zero-byte file,
48072 # as systems may use methods other than mode bits to determine executability.
48073 cat >conf$$.file <<_ASEOF
48074 #! /bin/sh
48075 exit 0
48076 _ASEOF
48077 chmod +x conf$$.file
48078 if test -x conf$$.file >/dev/null 2>&1; then
48079   ac_executable_p="test -x"
48080 else
48081   ac_executable_p="test -f"
48082 fi
48083 rm -f conf$$.file
48084
48085 # Extract the first word of "msgmerge", so it can be a program name with args.
48086 set dummy msgmerge; ac_word=$2
48087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48088 printf %s "checking for $ac_word... " >&6; }
48089 if test ${ac_cv_path_MSGMERGE+y}
48090 then :
48091   printf %s "(cached) " >&6
48092 else case e in #(
48093   e) case "$MSGMERGE" in
48094   [\\/]* | ?:[\\/]*)
48095     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
48096     ;;
48097   *)
48098     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
48099     for ac_dir in $PATH; do
48100       IFS="$ac_save_IFS"
48101       test -z "$ac_dir" && ac_dir=.
48102       for ac_exec_ext in '' $ac_executable_extensions; do
48103         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
48104           echo "$as_me: trying $ac_dir/$ac_word..." >&5
48105           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
48106             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
48107             break 2
48108           fi
48109         fi
48110       done
48111     done
48112     IFS="$ac_save_IFS"
48113   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
48114     ;;
48115 esac ;;
48116 esac
48117 fi
48118 MSGMERGE="$ac_cv_path_MSGMERGE"
48119 if test "$MSGMERGE" != ":"; then
48120   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
48121 printf "%s\n" "$MSGMERGE" >&6; }
48122 else
48123   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48124 printf "%s\n" "no" >&6; }
48125 fi
48126
48127
48128         test -n "$localedir" || localedir='${datadir}/locale'
48129
48130
48131     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
48132
48133
48134   ac_config_commands="$ac_config_commands po-directories"
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
48162 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
48163 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
48164 then :
48165   printf %s "(cached) " >&6
48166 else case e in #(
48167   e) gt_save_LIBS="$LIBS"
48168      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
48169      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48170 /* end confdefs.h.  */
48171 #include <CoreFoundation/CFPreferences.h>
48172 int
48173 main (void)
48174 {
48175 CFPreferencesCopyAppValue(NULL, NULL)
48176   ;
48177   return 0;
48178 }
48179 _ACEOF
48180 if ac_fn_c_try_link "$LINENO"
48181 then :
48182   gt_cv_func_CFPreferencesCopyAppValue=yes
48183 else case e in #(
48184   e) gt_cv_func_CFPreferencesCopyAppValue=no ;;
48185 esac
48186 fi
48187 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48188     conftest$ac_exeext conftest.$ac_ext
48189      LIBS="$gt_save_LIBS" ;;
48190 esac
48191 fi
48192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
48193 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
48194   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
48195
48196 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
48197
48198   fi
48199     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
48200 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
48201 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
48202 then :
48203   printf %s "(cached) " >&6
48204 else case e in #(
48205   e) gt_save_LIBS="$LIBS"
48206      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
48207      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48208 /* end confdefs.h.  */
48209 #include <CoreFoundation/CFLocale.h>
48210 int
48211 main (void)
48212 {
48213 CFLocaleCopyCurrent();
48214   ;
48215   return 0;
48216 }
48217 _ACEOF
48218 if ac_fn_c_try_link "$LINENO"
48219 then :
48220   gt_cv_func_CFLocaleCopyCurrent=yes
48221 else case e in #(
48222   e) gt_cv_func_CFLocaleCopyCurrent=no ;;
48223 esac
48224 fi
48225 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48226     conftest$ac_exeext conftest.$ac_ext
48227      LIBS="$gt_save_LIBS" ;;
48228 esac
48229 fi
48230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
48231 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
48232   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
48233
48234 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
48235
48236   fi
48237   INTL_MACOSX_LIBS=
48238   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
48239     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
48240   fi
48241
48242
48243
48244
48245
48246
48247   LIBINTL=
48248   LTLIBINTL=
48249   POSUB=
48250
48251     case " $gt_needs " in
48252     *" need-formatstring-macros "*) gt_api_version=3 ;;
48253     *" need-ngettext "*) gt_api_version=2 ;;
48254     *) gt_api_version=1 ;;
48255   esac
48256   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
48257   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
48258
48259     if test "$USE_NLS" = "yes"; then
48260     gt_use_preinstalled_gnugettext=no
48261
48262
48263         if test $gt_api_version -ge 3; then
48264           gt_revision_test_code='
48265 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
48266 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
48267 #endif
48268 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
48269 '
48270         else
48271           gt_revision_test_code=
48272         fi
48273         if test $gt_api_version -ge 2; then
48274           gt_expression_test_code=' + * ngettext ("", "", 0)'
48275         else
48276           gt_expression_test_code=
48277         fi
48278
48279         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
48280 printf %s "checking for GNU gettext in libc... " >&6; }
48281 if eval test \${$gt_func_gnugettext_libc+y}
48282 then :
48283   printf %s "(cached) " >&6
48284 else case e in #(
48285   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48286 /* end confdefs.h.  */
48287
48288 #include <libintl.h>
48289 $gt_revision_test_code
48290 extern int _nl_msg_cat_cntr;
48291 extern int *_nl_domain_bindings;
48292
48293 int
48294 main (void)
48295 {
48296
48297 bindtextdomain ("", "");
48298 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
48299
48300   ;
48301   return 0;
48302 }
48303 _ACEOF
48304 if ac_fn_c_try_link "$LINENO"
48305 then :
48306   eval "$gt_func_gnugettext_libc=yes"
48307 else case e in #(
48308   e) eval "$gt_func_gnugettext_libc=no" ;;
48309 esac
48310 fi
48311 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48312     conftest$ac_exeext conftest.$ac_ext ;;
48313 esac
48314 fi
48315 eval ac_res=\$$gt_func_gnugettext_libc
48316                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48317 printf "%s\n" "$ac_res" >&6; }
48318
48319         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
48320
48321
48322
48323
48324
48325           am_save_CPPFLAGS="$CPPFLAGS"
48326
48327   for element in $INCICONV; do
48328     haveit=
48329     for x in $CPPFLAGS; do
48330
48331   acl_save_prefix="$prefix"
48332   prefix="$acl_final_prefix"
48333   acl_save_exec_prefix="$exec_prefix"
48334   exec_prefix="$acl_final_exec_prefix"
48335   eval x=\"$x\"
48336   exec_prefix="$acl_save_exec_prefix"
48337   prefix="$acl_save_prefix"
48338
48339       if test "X$x" = "X$element"; then
48340         haveit=yes
48341         break
48342       fi
48343     done
48344     if test -z "$haveit"; then
48345       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
48346     fi
48347   done
48348
48349
48350   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
48351 printf %s "checking for iconv... " >&6; }
48352 if test ${am_cv_func_iconv+y}
48353 then :
48354   printf %s "(cached) " >&6
48355 else case e in #(
48356   e)
48357     am_cv_func_iconv="no, consider installing GNU libiconv"
48358     am_cv_lib_iconv=no
48359     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48360 /* end confdefs.h.  */
48361
48362 #include <stdlib.h>
48363 #include <iconv.h>
48364
48365 int
48366 main (void)
48367 {
48368 iconv_t cd = iconv_open("","");
48369            iconv(cd,NULL,NULL,NULL,NULL);
48370            iconv_close(cd);
48371   ;
48372   return 0;
48373 }
48374 _ACEOF
48375 if ac_fn_c_try_link "$LINENO"
48376 then :
48377   am_cv_func_iconv=yes
48378 fi
48379 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48380     conftest$ac_exeext conftest.$ac_ext
48381     if test "$am_cv_func_iconv" != yes; then
48382       am_save_LIBS="$LIBS"
48383       LIBS="$LIBS $LIBICONV"
48384       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48385 /* end confdefs.h.  */
48386
48387 #include <stdlib.h>
48388 #include <iconv.h>
48389
48390 int
48391 main (void)
48392 {
48393 iconv_t cd = iconv_open("","");
48394              iconv(cd,NULL,NULL,NULL,NULL);
48395              iconv_close(cd);
48396   ;
48397   return 0;
48398 }
48399 _ACEOF
48400 if ac_fn_c_try_link "$LINENO"
48401 then :
48402   am_cv_lib_iconv=yes
48403         am_cv_func_iconv=yes
48404 fi
48405 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48406     conftest$ac_exeext conftest.$ac_ext
48407       LIBS="$am_save_LIBS"
48408     fi
48409    ;;
48410 esac
48411 fi
48412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
48413 printf "%s\n" "$am_cv_func_iconv" >&6; }
48414   if test "$am_cv_func_iconv" = yes; then
48415     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
48416 printf %s "checking for working iconv... " >&6; }
48417 if test ${am_cv_func_iconv_works+y}
48418 then :
48419   printf %s "(cached) " >&6
48420 else case e in #(
48421   e)
48422                   am_save_LIBS="$LIBS"
48423       if test $am_cv_lib_iconv = yes; then
48424         LIBS="$LIBS $LIBICONV"
48425       fi
48426       am_cv_func_iconv_works=no
48427       for ac_iconv_const in '' 'const'; do
48428         if test "$cross_compiling" = yes
48429 then :
48430   case "$host_os" in
48431              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
48432              *)            am_cv_func_iconv_works="guessing yes" ;;
48433            esac
48434 else case e in #(
48435   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48436 /* end confdefs.h.  */
48437
48438 #include <iconv.h>
48439 #include <string.h>
48440
48441 #ifndef ICONV_CONST
48442 # define ICONV_CONST $ac_iconv_const
48443 #endif
48444
48445 int
48446 main (void)
48447 {
48448 int result = 0;
48449   /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
48450      successful returns.  This is even documented in
48451      <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
48452   {
48453     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
48454     if (cd_utf8_to_88591 != (iconv_t)(-1))
48455       {
48456         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
48457         char buf[10];
48458         ICONV_CONST char *inptr = input;
48459         size_t inbytesleft = strlen (input);
48460         char *outptr = buf;
48461         size_t outbytesleft = sizeof (buf);
48462         size_t res = iconv (cd_utf8_to_88591,
48463                             &inptr, &inbytesleft,
48464                             &outptr, &outbytesleft);
48465         if (res == 0)
48466           result |= 1;
48467         iconv_close (cd_utf8_to_88591);
48468       }
48469   }
48470   /* Test against Solaris 10 bug: Failures are not distinguishable from
48471      successful returns.  */
48472   {
48473     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
48474     if (cd_ascii_to_88591 != (iconv_t)(-1))
48475       {
48476         static ICONV_CONST char input[] = "\263";
48477         char buf[10];
48478         ICONV_CONST char *inptr = input;
48479         size_t inbytesleft = strlen (input);
48480         char *outptr = buf;
48481         size_t outbytesleft = sizeof (buf);
48482         size_t res = iconv (cd_ascii_to_88591,
48483                             &inptr, &inbytesleft,
48484                             &outptr, &outbytesleft);
48485         if (res == 0)
48486           result |= 2;
48487         iconv_close (cd_ascii_to_88591);
48488       }
48489   }
48490   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
48491   {
48492     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
48493     if (cd_88591_to_utf8 != (iconv_t)(-1))
48494       {
48495         static ICONV_CONST char input[] = "\304";
48496         static char buf[2] = { (char)0xDE, (char)0xAD };
48497         ICONV_CONST char *inptr = input;
48498         size_t inbytesleft = 1;
48499         char *outptr = buf;
48500         size_t outbytesleft = 1;
48501         size_t res = iconv (cd_88591_to_utf8,
48502                             &inptr, &inbytesleft,
48503                             &outptr, &outbytesleft);
48504         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
48505           result |= 4;
48506         iconv_close (cd_88591_to_utf8);
48507       }
48508   }
48509 #if 0 /* This bug could be worked around by the caller.  */
48510   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
48511   {
48512     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
48513     if (cd_88591_to_utf8 != (iconv_t)(-1))
48514       {
48515         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
48516         char buf[50];
48517         ICONV_CONST char *inptr = input;
48518         size_t inbytesleft = strlen (input);
48519         char *outptr = buf;
48520         size_t outbytesleft = sizeof (buf);
48521         size_t res = iconv (cd_88591_to_utf8,
48522                             &inptr, &inbytesleft,
48523                             &outptr, &outbytesleft);
48524         if ((int)res > 0)
48525           result |= 8;
48526         iconv_close (cd_88591_to_utf8);
48527       }
48528   }
48529 #endif
48530   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
48531      provided.  */
48532   {
48533     /* Try standardized names.  */
48534     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
48535     /* Try IRIX, OSF/1 names.  */
48536     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
48537     /* Try AIX names.  */
48538     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
48539     /* Try HP-UX names.  */
48540     iconv_t cd4 = iconv_open ("utf8", "eucJP");
48541     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
48542         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
48543       result |= 16;
48544     if (cd1 != (iconv_t)(-1))
48545       iconv_close (cd1);
48546     if (cd2 != (iconv_t)(-1))
48547       iconv_close (cd2);
48548     if (cd3 != (iconv_t)(-1))
48549       iconv_close (cd3);
48550     if (cd4 != (iconv_t)(-1))
48551       iconv_close (cd4);
48552   }
48553   return result;
48554
48555   ;
48556   return 0;
48557 }
48558 _ACEOF
48559 if ac_fn_c_try_run "$LINENO"
48560 then :
48561   am_cv_func_iconv_works=yes
48562 fi
48563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48564   conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
48565 esac
48566 fi
48567
48568         test "$am_cv_func_iconv_works" = no || break
48569       done
48570       LIBS="$am_save_LIBS"
48571      ;;
48572 esac
48573 fi
48574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
48575 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
48576     case "$am_cv_func_iconv_works" in
48577       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
48578       *)   am_func_iconv=yes ;;
48579     esac
48580   else
48581     am_func_iconv=no am_cv_lib_iconv=no
48582   fi
48583   if test "$am_func_iconv" = yes; then
48584
48585 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
48586
48587   fi
48588   if test "$am_cv_lib_iconv" = yes; then
48589     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
48590 printf %s "checking how to link with libiconv... " >&6; }
48591     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
48592 printf "%s\n" "$LIBICONV" >&6; }
48593   else
48594             CPPFLAGS="$am_save_CPPFLAGS"
48595     LIBICONV=
48596     LTLIBICONV=
48597   fi
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608     use_additional=yes
48609
48610   acl_save_prefix="$prefix"
48611   prefix="$acl_final_prefix"
48612   acl_save_exec_prefix="$exec_prefix"
48613   exec_prefix="$acl_final_exec_prefix"
48614
48615     eval additional_includedir=\"$includedir\"
48616     eval additional_libdir=\"$libdir\"
48617     eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
48618     eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
48619
48620   exec_prefix="$acl_save_exec_prefix"
48621   prefix="$acl_save_prefix"
48622
48623
48624 # Check whether --with-libintl-prefix was given.
48625 if test ${with_libintl_prefix+y}
48626 then :
48627   withval=$with_libintl_prefix;
48628     if test "X$withval" = "Xno"; then
48629       use_additional=no
48630     else
48631       if test "X$withval" = "X"; then
48632
48633   acl_save_prefix="$prefix"
48634   prefix="$acl_final_prefix"
48635   acl_save_exec_prefix="$exec_prefix"
48636   exec_prefix="$acl_final_exec_prefix"
48637
48638           eval additional_includedir=\"$includedir\"
48639           eval additional_libdir=\"$libdir\"
48640           eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
48641           eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
48642
48643   exec_prefix="$acl_save_exec_prefix"
48644   prefix="$acl_save_prefix"
48645
48646       else
48647         additional_includedir="$withval/include"
48648         additional_libdir="$withval/$acl_libdirstem"
48649         additional_libdir2="$withval/$acl_libdirstem2"
48650         additional_libdir3="$withval/$acl_libdirstem3"
48651       fi
48652     fi
48653
48654 fi
48655
48656   if test "X$additional_libdir2" = "X$additional_libdir"; then
48657     additional_libdir2=
48658   fi
48659   if test "X$additional_libdir3" = "X$additional_libdir"; then
48660     additional_libdir3=
48661   fi
48662       LIBINTL=
48663   LTLIBINTL=
48664   INCINTL=
48665   LIBINTL_PREFIX=
48666       HAVE_LIBINTL=
48667   rpathdirs=
48668   ltrpathdirs=
48669   names_already_handled=
48670   names_next_round='intl '
48671   while test -n "$names_next_round"; do
48672     names_this_round="$names_next_round"
48673     names_next_round=
48674     for name in $names_this_round; do
48675       already_handled=
48676       for n in $names_already_handled; do
48677         if test "$n" = "$name"; then
48678           already_handled=yes
48679           break
48680         fi
48681       done
48682       if test -z "$already_handled"; then
48683         names_already_handled="$names_already_handled $name"
48684                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
48685         eval value=\"\$HAVE_LIB$uppername\"
48686         if test -n "$value"; then
48687           if test "$value" = yes; then
48688             eval value=\"\$LIB$uppername\"
48689             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
48690             eval value=\"\$LTLIB$uppername\"
48691             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
48692           else
48693                                     :
48694           fi
48695         else
48696                               found_dir=
48697           found_la=
48698           found_so=
48699           found_a=
48700           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
48701           if test -n "$acl_shlibext"; then
48702             shrext=".$acl_shlibext"             # typically: shrext=.so
48703           else
48704             shrext=
48705           fi
48706           if test $use_additional = yes; then
48707             for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
48708               if test "X$found_dir" = "X"; then
48709                 eval dir=\$$additional_libdir_variable
48710                 if test -n "$dir"; then
48711                                                       if test -n "$acl_shlibext"; then
48712                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
48713                       found_dir="$dir"
48714                       found_so="$dir/$libname$shrext"
48715                     else
48716                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
48717                         ver=`(cd "$dir" && \
48718                               for f in "$libname$shrext".*; do echo "$f"; done \
48719                               | sed -e "s,^$libname$shrext\\\\.,," \
48720                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
48721                               | sed 1q ) 2>/dev/null`
48722                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
48723                           found_dir="$dir"
48724                           found_so="$dir/$libname$shrext.$ver"
48725                         fi
48726                       else
48727                         eval library_names=\"$acl_library_names_spec\"
48728                         for f in $library_names; do
48729                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
48730                             found_dir="$dir"
48731                             found_so="$dir/$f"
48732                             break
48733                           fi
48734                         done
48735                       fi
48736                     fi
48737                   fi
48738                                     if test "X$found_dir" = "X"; then
48739                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
48740                       found_dir="$dir"
48741                       found_a="$dir/$libname.$acl_libext"
48742                     fi
48743                   fi
48744                   if test "X$found_dir" != "X"; then
48745                     if test -f "$dir/$libname.la"; then
48746                       found_la="$dir/$libname.la"
48747                     fi
48748                   fi
48749                 fi
48750               fi
48751             done
48752           fi
48753           if test "X$found_dir" = "X"; then
48754             for x in $LDFLAGS $LTLIBINTL; do
48755
48756   acl_save_prefix="$prefix"
48757   prefix="$acl_final_prefix"
48758   acl_save_exec_prefix="$exec_prefix"
48759   exec_prefix="$acl_final_exec_prefix"
48760   eval x=\"$x\"
48761   exec_prefix="$acl_save_exec_prefix"
48762   prefix="$acl_save_prefix"
48763
48764               case "$x" in
48765                 -L*)
48766                   dir=`echo "X$x" | sed -e 's/^X-L//'`
48767                                     if test -n "$acl_shlibext"; then
48768                     if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
48769                       found_dir="$dir"
48770                       found_so="$dir/$libname$shrext"
48771                     else
48772                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
48773                         ver=`(cd "$dir" && \
48774                               for f in "$libname$shrext".*; do echo "$f"; done \
48775                               | sed -e "s,^$libname$shrext\\\\.,," \
48776                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
48777                               | sed 1q ) 2>/dev/null`
48778                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
48779                           found_dir="$dir"
48780                           found_so="$dir/$libname$shrext.$ver"
48781                         fi
48782                       else
48783                         eval library_names=\"$acl_library_names_spec\"
48784                         for f in $library_names; do
48785                           if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
48786                             found_dir="$dir"
48787                             found_so="$dir/$f"
48788                             break
48789                           fi
48790                         done
48791                       fi
48792                     fi
48793                   fi
48794                                     if test "X$found_dir" = "X"; then
48795                     if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
48796                       found_dir="$dir"
48797                       found_a="$dir/$libname.$acl_libext"
48798                     fi
48799                   fi
48800                   if test "X$found_dir" != "X"; then
48801                     if test -f "$dir/$libname.la"; then
48802                       found_la="$dir/$libname.la"
48803                     fi
48804                   fi
48805                   ;;
48806               esac
48807               if test "X$found_dir" != "X"; then
48808                 break
48809               fi
48810             done
48811           fi
48812           if test "X$found_dir" != "X"; then
48813                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
48814             if test "X$found_so" != "X"; then
48815                                                         if test "$enable_rpath" = no \
48816                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
48817                  || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
48818                  || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
48819                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48820               else
48821                                                                                 haveit=
48822                 for x in $ltrpathdirs; do
48823                   if test "X$x" = "X$found_dir"; then
48824                     haveit=yes
48825                     break
48826                   fi
48827                 done
48828                 if test -z "$haveit"; then
48829                   ltrpathdirs="$ltrpathdirs $found_dir"
48830                 fi
48831                                 if test "$acl_hardcode_direct" = yes; then
48832                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48833                 else
48834                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
48835                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48836                                                             haveit=
48837                     for x in $rpathdirs; do
48838                       if test "X$x" = "X$found_dir"; then
48839                         haveit=yes
48840                         break
48841                       fi
48842                     done
48843                     if test -z "$haveit"; then
48844                       rpathdirs="$rpathdirs $found_dir"
48845                     fi
48846                   else
48847                                                                                 haveit=
48848                     for x in $LDFLAGS $LIBINTL; do
48849
48850   acl_save_prefix="$prefix"
48851   prefix="$acl_final_prefix"
48852   acl_save_exec_prefix="$exec_prefix"
48853   exec_prefix="$acl_final_exec_prefix"
48854   eval x=\"$x\"
48855   exec_prefix="$acl_save_exec_prefix"
48856   prefix="$acl_save_prefix"
48857
48858                       if test "X$x" = "X-L$found_dir"; then
48859                         haveit=yes
48860                         break
48861                       fi
48862                     done
48863                     if test -z "$haveit"; then
48864                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
48865                     fi
48866                     if test "$acl_hardcode_minus_L" != no; then
48867                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48868                     else
48869                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
48870                     fi
48871                   fi
48872                 fi
48873               fi
48874             else
48875               if test "X$found_a" != "X"; then
48876                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
48877               else
48878                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
48879               fi
48880             fi
48881                         additional_includedir=
48882             case "$found_dir" in
48883               */$acl_libdirstem | */$acl_libdirstem/)
48884                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
48885                 if test "$name" = 'intl'; then
48886                   LIBINTL_PREFIX="$basedir"
48887                 fi
48888                 additional_includedir="$basedir/include"
48889                 ;;
48890               */$acl_libdirstem2 | */$acl_libdirstem2/)
48891                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
48892                 if test "$name" = 'intl'; then
48893                   LIBINTL_PREFIX="$basedir"
48894                 fi
48895                 additional_includedir="$basedir/include"
48896                 ;;
48897               */$acl_libdirstem3 | */$acl_libdirstem3/)
48898                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
48899                 if test "$name" = 'intl'; then
48900                   LIBINTL_PREFIX="$basedir"
48901                 fi
48902                 additional_includedir="$basedir/include"
48903                 ;;
48904             esac
48905             if test "X$additional_includedir" != "X"; then
48906                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
48907                 haveit=
48908                 if test "X$additional_includedir" = "X/usr/local/include"; then
48909                   if test -n "$GCC"; then
48910                     case $host_os in
48911                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
48912                     esac
48913                   fi
48914                 fi
48915                 if test -z "$haveit"; then
48916                   for x in $CPPFLAGS $INCINTL; do
48917
48918   acl_save_prefix="$prefix"
48919   prefix="$acl_final_prefix"
48920   acl_save_exec_prefix="$exec_prefix"
48921   exec_prefix="$acl_final_exec_prefix"
48922   eval x=\"$x\"
48923   exec_prefix="$acl_save_exec_prefix"
48924   prefix="$acl_save_prefix"
48925
48926                     if test "X$x" = "X-I$additional_includedir"; then
48927                       haveit=yes
48928                       break
48929                     fi
48930                   done
48931                   if test -z "$haveit"; then
48932                     if test -d "$additional_includedir"; then
48933                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
48934                     fi
48935                   fi
48936                 fi
48937               fi
48938             fi
48939                         if test -n "$found_la"; then
48940                                                         save_libdir="$libdir"
48941               case "$found_la" in
48942                 */* | *\\*) . "$found_la" ;;
48943                 *) . "./$found_la" ;;
48944               esac
48945               libdir="$save_libdir"
48946                             for dep in $dependency_libs; do
48947                 case "$dep" in
48948                   -L*)
48949                     dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
48950                                                                                                                                                                 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
48951                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
48952                        && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
48953                       haveit=
48954                       if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
48955                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
48956                          || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
48957                         if test -n "$GCC"; then
48958                           case $host_os in
48959                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
48960                           esac
48961                         fi
48962                       fi
48963                       if test -z "$haveit"; then
48964                         haveit=
48965                         for x in $LDFLAGS $LIBINTL; do
48966
48967   acl_save_prefix="$prefix"
48968   prefix="$acl_final_prefix"
48969   acl_save_exec_prefix="$exec_prefix"
48970   exec_prefix="$acl_final_exec_prefix"
48971   eval x=\"$x\"
48972   exec_prefix="$acl_save_exec_prefix"
48973   prefix="$acl_save_prefix"
48974
48975                           if test "X$x" = "X-L$dependency_libdir"; then
48976                             haveit=yes
48977                             break
48978                           fi
48979                         done
48980                         if test -z "$haveit"; then
48981                           if test -d "$dependency_libdir"; then
48982                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
48983                           fi
48984                         fi
48985                         haveit=
48986                         for x in $LDFLAGS $LTLIBINTL; do
48987
48988   acl_save_prefix="$prefix"
48989   prefix="$acl_final_prefix"
48990   acl_save_exec_prefix="$exec_prefix"
48991   exec_prefix="$acl_final_exec_prefix"
48992   eval x=\"$x\"
48993   exec_prefix="$acl_save_exec_prefix"
48994   prefix="$acl_save_prefix"
48995
48996                           if test "X$x" = "X-L$dependency_libdir"; then
48997                             haveit=yes
48998                             break
48999                           fi
49000                         done
49001                         if test -z "$haveit"; then
49002                           if test -d "$dependency_libdir"; then
49003                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
49004                           fi
49005                         fi
49006                       fi
49007                     fi
49008                     ;;
49009                   -R*)
49010                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
49011                     if test "$enable_rpath" != no; then
49012                                                                   haveit=
49013                       for x in $rpathdirs; do
49014                         if test "X$x" = "X$dir"; then
49015                           haveit=yes
49016                           break
49017                         fi
49018                       done
49019                       if test -z "$haveit"; then
49020                         rpathdirs="$rpathdirs $dir"
49021                       fi
49022                                                                   haveit=
49023                       for x in $ltrpathdirs; do
49024                         if test "X$x" = "X$dir"; then
49025                           haveit=yes
49026                           break
49027                         fi
49028                       done
49029                       if test -z "$haveit"; then
49030                         ltrpathdirs="$ltrpathdirs $dir"
49031                       fi
49032                     fi
49033                     ;;
49034                   -l*)
49035                                                                                                                                                                 dep=`echo "X$dep" | sed -e 's/^X-l//'`
49036                     if test "X$dep" != Xc \
49037                        || case $host_os in
49038                             linux* | gnu* | k*bsd*-gnu) false ;;
49039                             *)                          true ;;
49040                           esac; then
49041                       names_next_round="$names_next_round $dep"
49042                     fi
49043                     ;;
49044                   *.la)
49045                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
49046                     ;;
49047                   *)
49048                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
49049                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
49050                     ;;
49051                 esac
49052               done
49053             fi
49054           else
49055                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
49056             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
49057           fi
49058         fi
49059       fi
49060     done
49061   done
49062   if test "X$rpathdirs" != "X"; then
49063     if test -n "$acl_hardcode_libdir_separator"; then
49064                         alldirs=
49065       for found_dir in $rpathdirs; do
49066         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
49067       done
49068             acl_save_libdir="$libdir"
49069       libdir="$alldirs"
49070       eval flag=\"$acl_hardcode_libdir_flag_spec\"
49071       libdir="$acl_save_libdir"
49072       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
49073     else
49074             for found_dir in $rpathdirs; do
49075         acl_save_libdir="$libdir"
49076         libdir="$found_dir"
49077         eval flag=\"$acl_hardcode_libdir_flag_spec\"
49078         libdir="$acl_save_libdir"
49079         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
49080       done
49081     fi
49082   fi
49083   if test "X$ltrpathdirs" != "X"; then
49084             for found_dir in $ltrpathdirs; do
49085       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
49086     done
49087   fi
49088
49089
49090
49091
49092
49093           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
49094 printf %s "checking for GNU gettext in libintl... " >&6; }
49095 if eval test \${$gt_func_gnugettext_libintl+y}
49096 then :
49097   printf %s "(cached) " >&6
49098 else case e in #(
49099   e) gt_save_CPPFLAGS="$CPPFLAGS"
49100             CPPFLAGS="$CPPFLAGS $INCINTL"
49101             gt_save_LIBS="$LIBS"
49102             LIBS="$LIBS $LIBINTL"
49103                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49104 /* end confdefs.h.  */
49105
49106 #include <libintl.h>
49107 $gt_revision_test_code
49108 extern int _nl_msg_cat_cntr;
49109 extern
49110 #ifdef __cplusplus
49111 "C"
49112 #endif
49113 const char *_nl_expand_alias (const char *);
49114
49115 int
49116 main (void)
49117 {
49118
49119 bindtextdomain ("", "");
49120 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
49121
49122   ;
49123   return 0;
49124 }
49125 _ACEOF
49126 if ac_fn_c_try_link "$LINENO"
49127 then :
49128   eval "$gt_func_gnugettext_libintl=yes"
49129 else case e in #(
49130   e) eval "$gt_func_gnugettext_libintl=no" ;;
49131 esac
49132 fi
49133 rm -f core conftest.err conftest.$ac_objext conftest.beam \
49134     conftest$ac_exeext conftest.$ac_ext
49135                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
49136               LIBS="$LIBS $LIBICONV"
49137               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49138 /* end confdefs.h.  */
49139
49140 #include <libintl.h>
49141 $gt_revision_test_code
49142 extern int _nl_msg_cat_cntr;
49143 extern
49144 #ifdef __cplusplus
49145 "C"
49146 #endif
49147 const char *_nl_expand_alias (const char *);
49148
49149 int
49150 main (void)
49151 {
49152
49153 bindtextdomain ("", "");
49154 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
49155
49156   ;
49157   return 0;
49158 }
49159 _ACEOF
49160 if ac_fn_c_try_link "$LINENO"
49161 then :
49162   LIBINTL="$LIBINTL $LIBICONV"
49163                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
49164                  eval "$gt_func_gnugettext_libintl=yes"
49165
49166 fi
49167 rm -f core conftest.err conftest.$ac_objext conftest.beam \
49168     conftest$ac_exeext conftest.$ac_ext
49169             fi
49170             CPPFLAGS="$gt_save_CPPFLAGS"
49171             LIBS="$gt_save_LIBS" ;;
49172 esac
49173 fi
49174 eval ac_res=\$$gt_func_gnugettext_libintl
49175                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49176 printf "%s\n" "$ac_res" >&6; }
49177         fi
49178
49179                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
49180            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
49181                 && test "$PACKAGE" != gettext-runtime \
49182                 && test "$PACKAGE" != gettext-tools; }; then
49183           gt_use_preinstalled_gnugettext=yes
49184         else
49185                     LIBINTL=
49186           LTLIBINTL=
49187           INCINTL=
49188         fi
49189
49190
49191
49192     if test -n "$INTL_MACOSX_LIBS"; then
49193       if test "$gt_use_preinstalled_gnugettext" = "yes" \
49194          || test "$nls_cv_use_gnu_gettext" = "yes"; then
49195                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
49196         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
49197       fi
49198     fi
49199
49200     if test "$gt_use_preinstalled_gnugettext" = "yes" \
49201        || test "$nls_cv_use_gnu_gettext" = "yes"; then
49202
49203 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
49204
49205     else
49206       USE_NLS=no
49207     fi
49208   fi
49209
49210   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
49211 printf %s "checking whether to use NLS... " >&6; }
49212   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
49213 printf "%s\n" "$USE_NLS" >&6; }
49214   if test "$USE_NLS" = "yes"; then
49215     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
49216 printf %s "checking where the gettext function comes from... " >&6; }
49217     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
49218       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
49219         gt_source="external libintl"
49220       else
49221         gt_source="libc"
49222       fi
49223     else
49224       gt_source="included intl directory"
49225     fi
49226     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
49227 printf "%s\n" "$gt_source" >&6; }
49228   fi
49229
49230   if test "$USE_NLS" = "yes"; then
49231
49232     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
49233       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
49234         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
49235 printf %s "checking how to link with libintl... " >&6; }
49236         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
49237 printf "%s\n" "$LIBINTL" >&6; }
49238
49239   for element in $INCINTL; do
49240     haveit=
49241     for x in $CPPFLAGS; do
49242
49243   acl_save_prefix="$prefix"
49244   prefix="$acl_final_prefix"
49245   acl_save_exec_prefix="$exec_prefix"
49246   exec_prefix="$acl_final_exec_prefix"
49247   eval x=\"$x\"
49248   exec_prefix="$acl_save_exec_prefix"
49249   prefix="$acl_save_prefix"
49250
49251       if test "X$x" = "X$element"; then
49252         haveit=yes
49253         break
49254       fi
49255     done
49256     if test -z "$haveit"; then
49257       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
49258     fi
49259   done
49260
49261       fi
49262
49263
49264 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
49265
49266
49267 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
49268
49269     fi
49270
49271         POSUB=po
49272   fi
49273
49274
49275
49276     INTLLIBS="$LIBINTL"
49277
49278
49279
49280
49281
49282
49283
49284 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
49285
49286 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
49287
49288 cat >confcache <<\_ACEOF
49289 # This file is a shell script that caches the results of configure
49290 # tests run on this system so they can be shared between configure
49291 # scripts and configure runs, see configure's option --config-cache.
49292 # It is not useful on other systems.  If it contains results you don't
49293 # want to keep, you may remove or edit it.
49294 #
49295 # config.status only pays attention to the cache file if you give it
49296 # the --recheck option to rerun configure.
49297 #
49298 # 'ac_cv_env_foo' variables (set or unset) will be overridden when
49299 # loading this file, other *unset* 'ac_cv_foo' will be assigned the
49300 # following values.
49301
49302 _ACEOF
49303
49304 # The following way of writing the cache mishandles newlines in values,
49305 # but we know of no workaround that is simple, portable, and efficient.
49306 # So, we kill variables containing newlines.
49307 # Ultrix sh set writes to stderr and can't be redirected directly,
49308 # and sets the high bit in the cache file unless we assign to the vars.
49309 (
49310   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49311     eval ac_val=\$$ac_var
49312     case $ac_val in #(
49313     *${as_nl}*)
49314       case $ac_var in #(
49315       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49316 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49317       esac
49318       case $ac_var in #(
49319       _ | IFS | as_nl) ;; #(
49320       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49321       *) { eval $ac_var=; unset $ac_var;} ;;
49322       esac ;;
49323     esac
49324   done
49325
49326   (set) 2>&1 |
49327     case $as_nl`(ac_space=' '; set) 2>&1` in #(
49328     *${as_nl}ac_space=\ *)
49329       # 'set' does not quote correctly, so add quotes: double-quote
49330       # substitution turns \\\\ into \\, and sed turns \\ into \.
49331       sed -n \
49332         "s/'/'\\\\''/g;
49333           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49334       ;; #(
49335     *)
49336       # 'set' quotes correctly as required by POSIX, so do not add quotes.
49337       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49338       ;;
49339     esac |
49340     sort
49341 ) |
49342   sed '
49343      /^ac_cv_env_/b end
49344      t clear
49345      :clear
49346      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
49347      t end
49348      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49349      :end' >>confcache
49350 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49351   if test -w "$cache_file"; then
49352     if test "x$cache_file" != "x/dev/null"; then
49353       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49354 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
49355       if test ! -f "$cache_file" || test -h "$cache_file"; then
49356         cat confcache >"$cache_file"
49357       else
49358         case $cache_file in #(
49359         */* | ?:*)
49360           mv -f confcache "$cache_file"$$ &&
49361           mv -f "$cache_file"$$ "$cache_file" ;; #(
49362         *)
49363           mv -f confcache "$cache_file" ;;
49364         esac
49365       fi
49366     fi
49367   else
49368     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49369 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
49370   fi
49371 fi
49372 rm -f confcache
49373
49374 test "x$prefix" = xNONE && prefix=$ac_default_prefix
49375 # Let make expand exec_prefix.
49376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49377
49378 DEFS=-DHAVE_CONFIG_H
49379
49380 ac_libobjs=
49381 ac_ltlibobjs=
49382 U=
49383 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49384   # 1. Remove the extension, and $U if already installed.
49385   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49386   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
49387   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49388   #    will be set to the directory where LIBOBJS objects are built.
49389   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49390   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49391 done
49392 LIBOBJS=$ac_libobjs
49393
49394 LTLIBOBJS=$ac_ltlibobjs
49395
49396
49397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
49398 printf %s "checking that generated files are newer than configure... " >&6; }
49399    if test -n "$am_sleep_pid"; then
49400      # Hide warnings about reused PIDs.
49401      wait $am_sleep_pid 2>/dev/null
49402    fi
49403    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
49404 printf "%s\n" "done" >&6; }
49405 case $enable_silent_rules in # (((
49406   yes) AM_DEFAULT_VERBOSITY=0;;
49407    no) AM_DEFAULT_VERBOSITY=1;;
49408 esac
49409 if test $am_cv_make_support_nested_variables = yes; then
49410     AM_V='$(V)'
49411   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
49412 else
49413   AM_V=$AM_DEFAULT_VERBOSITY
49414   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
49415 fi
49416
49417  if test -n "$EXEEXT"; then
49418   am__EXEEXT_TRUE=
49419   am__EXEEXT_FALSE='#'
49420 else
49421   am__EXEEXT_TRUE='#'
49422   am__EXEEXT_FALSE=
49423 fi
49424
49425 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
49426   as_fn_error $? "conditional \"AMDEP\" was never defined.
49427 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49428 fi
49429 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
49430   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
49431 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49432 fi
49433 # Check whether --enable-year2038 was given.
49434 if test ${enable_year2038+y}
49435 then :
49436   enableval=$enable_year2038;
49437 fi
49438
49439 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
49440   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
49441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49442 fi
49443 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
49444 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
49445   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
49446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49447 fi
49448 CONFIG_INCLUDE=lib/config.h
49449
49450
49451     gl_libobjs=
49452     gl_ltlibobjs=
49453     gl_libobjdeps=
49454     if test -n "$gl_LIBOBJS"; then
49455       # Remove the extension.
49456       sed_drop_objext='s/\.o$//;s/\.obj$//'
49457       sed_dirname1='s,//*,/,g'
49458       sed_dirname2='s,\(.\)/$,\1,'
49459       sed_dirname3='s,^[^/]*$,.,'
49460       sed_dirname4='s,\(.\)/[^/]*$,\1,'
49461       sed_basename1='s,.*/,,'
49462       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
49463         gl_libobjs="$gl_libobjs $i.$ac_objext"
49464         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
49465         i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
49466         i_base=`echo "$i" | sed -e "$sed_basename1"`
49467         gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
49468       done
49469     fi
49470     gl_LIBOBJS=$gl_libobjs
49471
49472     gl_LTLIBOBJS=$gl_ltlibobjs
49473
49474     gl_LIBOBJDEPS=$gl_libobjdeps
49475
49476
49477
49478
49479
49480     gltests_libobjs=
49481     gltests_ltlibobjs=
49482     gltests_libobjdeps=
49483     if test -n "$gltests_LIBOBJS"; then
49484       # Remove the extension.
49485       sed_drop_objext='s/\.o$//;s/\.obj$//'
49486       sed_dirname1='s,//*,/,g'
49487       sed_dirname2='s,\(.\)/$,\1,'
49488       sed_dirname3='s,^[^/]*$,.,'
49489       sed_dirname4='s,\(.\)/[^/]*$,\1,'
49490       sed_basename1='s,.*/,,'
49491       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
49492         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
49493         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
49494         i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
49495         i_base=`echo "$i" | sed -e "$sed_basename1"`
49496         gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
49497       done
49498     fi
49499     gltests_LIBOBJS=$gltests_libobjs
49500
49501     gltests_LTLIBOBJS=$gltests_ltlibobjs
49502
49503     gltests_LIBOBJDEPS=$gltests_libobjdeps
49504
49505
49506
49507 : "${CONFIG_STATUS=./config.status}"
49508 ac_write_fail=0
49509 ac_clean_files_save=$ac_clean_files
49510 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49512 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
49513 as_write_fail=0
49514 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49515 #! $SHELL
49516 # Generated by $as_me.
49517 # Run this file to recreate the current configuration.
49518 # Compiler output produced by configure, useful for debugging
49519 # configure, is in config.log if it exists.
49520
49521 debug=false
49522 ac_cs_recheck=false
49523 ac_cs_silent=false
49524
49525 SHELL=\${CONFIG_SHELL-$SHELL}
49526 export SHELL
49527 _ASEOF
49528 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49529 ## -------------------- ##
49530 ## M4sh Initialization. ##
49531 ## -------------------- ##
49532
49533 # Be more Bourne compatible
49534 DUALCASE=1; export DUALCASE # for MKS sh
49535 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
49536 then :
49537   emulate sh
49538   NULLCMD=:
49539   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49540   # is contrary to our usage.  Disable this feature.
49541   alias -g '${1+"$@"}'='"$@"'
49542   setopt NO_GLOB_SUBST
49543 else case e in #(
49544   e) case `(set -o) 2>/dev/null` in #(
49545   *posix*) :
49546     set -o posix ;; #(
49547   *) :
49548      ;;
49549 esac ;;
49550 esac
49551 fi
49552
49553
49554
49555 # Reset variables that may have inherited troublesome values from
49556 # the environment.
49557
49558 # IFS needs to be set, to space, tab, and newline, in precisely that order.
49559 # (If _AS_PATH_WALK were called with IFS unset, it would have the
49560 # side effect of setting IFS to empty, thus disabling word splitting.)
49561 # Quoting is to prevent editors from complaining about space-tab.
49562 as_nl='
49563 '
49564 export as_nl
49565 IFS=" ""        $as_nl"
49566
49567 PS1='$ '
49568 PS2='> '
49569 PS4='+ '
49570
49571 # Ensure predictable behavior from utilities with locale-dependent output.
49572 LC_ALL=C
49573 export LC_ALL
49574 LANGUAGE=C
49575 export LANGUAGE
49576
49577 # We cannot yet rely on "unset" to work, but we need these variables
49578 # to be unset--not just set to an empty or harmless value--now, to
49579 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
49580 # also avoids known problems related to "unset" and subshell syntax
49581 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
49582 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
49583 do eval test \${$as_var+y} \
49584   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49585 done
49586
49587 # Ensure that fds 0, 1, and 2 are open.
49588 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
49589 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
49590 if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
49591
49592 # The user is always right.
49593 if ${PATH_SEPARATOR+false} :; then
49594   PATH_SEPARATOR=:
49595   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49596     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49597       PATH_SEPARATOR=';'
49598   }
49599 fi
49600
49601
49602 # Find who we are.  Look in the path if we contain no directory separator.
49603 as_myself=
49604 case $0 in #((
49605   *[\\/]* ) as_myself=$0 ;;
49606   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49607 for as_dir in $PATH
49608 do
49609   IFS=$as_save_IFS
49610   case $as_dir in #(((
49611     '') as_dir=./ ;;
49612     */) ;;
49613     *) as_dir=$as_dir/ ;;
49614   esac
49615     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
49616   done
49617 IFS=$as_save_IFS
49618
49619      ;;
49620 esac
49621 # We did not find ourselves, most probably we were run as 'sh COMMAND'
49622 # in which case we are not to be found in the path.
49623 if test "x$as_myself" = x; then
49624   as_myself=$0
49625 fi
49626 if test ! -f "$as_myself"; then
49627   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49628   exit 1
49629 fi
49630
49631
49632
49633 # as_fn_error STATUS ERROR [LINENO LOG_FD]
49634 # ----------------------------------------
49635 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49636 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49637 # script with STATUS, using 1 if that was 0.
49638 as_fn_error ()
49639 {
49640   as_status=$1; test $as_status -eq 0 && as_status=1
49641   if test "$4"; then
49642     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49643     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49644   fi
49645   printf "%s\n" "$as_me: error: $2" >&2
49646   as_fn_exit $as_status
49647 } # as_fn_error
49648
49649
49650 # as_fn_set_status STATUS
49651 # -----------------------
49652 # Set $? to STATUS, without forking.
49653 as_fn_set_status ()
49654 {
49655   return $1
49656 } # as_fn_set_status
49657
49658 # as_fn_exit STATUS
49659 # -----------------
49660 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49661 as_fn_exit ()
49662 {
49663   set +e
49664   as_fn_set_status $1
49665   exit $1
49666 } # as_fn_exit
49667
49668 # as_fn_unset VAR
49669 # ---------------
49670 # Portably unset VAR.
49671 as_fn_unset ()
49672 {
49673   { eval $1=; unset $1;}
49674 }
49675 as_unset=as_fn_unset
49676
49677 # as_fn_append VAR VALUE
49678 # ----------------------
49679 # Append the text in VALUE to the end of the definition contained in VAR. Take
49680 # advantage of any shell optimizations that allow amortized linear growth over
49681 # repeated appends, instead of the typical quadratic growth present in naive
49682 # implementations.
49683 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
49684 then :
49685   eval 'as_fn_append ()
49686   {
49687     eval $1+=\$2
49688   }'
49689 else case e in #(
49690   e) as_fn_append ()
49691   {
49692     eval $1=\$$1\$2
49693   } ;;
49694 esac
49695 fi # as_fn_append
49696
49697 # as_fn_arith ARG...
49698 # ------------------
49699 # Perform arithmetic evaluation on the ARGs, and store the result in the
49700 # global $as_val. Take advantage of shells that can avoid forks. The arguments
49701 # must be portable across $(()) and expr.
49702 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
49703 then :
49704   eval 'as_fn_arith ()
49705   {
49706     as_val=$(( $* ))
49707   }'
49708 else case e in #(
49709   e) as_fn_arith ()
49710   {
49711     as_val=`expr "$@" || test $? -eq 1`
49712   } ;;
49713 esac
49714 fi # as_fn_arith
49715
49716
49717 if expr a : '\(a\)' >/dev/null 2>&1 &&
49718    test "X`expr 00001 : '.*\(...\)'`" = X001; then
49719   as_expr=expr
49720 else
49721   as_expr=false
49722 fi
49723
49724 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49725   as_basename=basename
49726 else
49727   as_basename=false
49728 fi
49729
49730 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49731   as_dirname=dirname
49732 else
49733   as_dirname=false
49734 fi
49735
49736 as_me=`$as_basename -- "$0" ||
49737 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49738          X"$0" : 'X\(//\)$' \| \
49739          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49740 printf "%s\n" X/"$0" |
49741     sed '/^.*\/\([^/][^/]*\)\/*$/{
49742             s//\1/
49743             q
49744           }
49745           /^X\/\(\/\/\)$/{
49746             s//\1/
49747             q
49748           }
49749           /^X\/\(\/\).*/{
49750             s//\1/
49751             q
49752           }
49753           s/.*/./; q'`
49754
49755 # Avoid depending upon Character Ranges.
49756 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49757 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49758 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49759 as_cr_digits='0123456789'
49760 as_cr_alnum=$as_cr_Letters$as_cr_digits
49761
49762
49763 # Determine whether it's possible to make 'echo' print without a newline.
49764 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
49765 # for compatibility with existing Makefiles.
49766 ECHO_C= ECHO_N= ECHO_T=
49767 case `echo -n x` in #(((((
49768 -n*)
49769   case `echo 'xy\c'` in
49770   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
49771   xy)  ECHO_C='\c';;
49772   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49773        ECHO_T=' ';;
49774   esac;;
49775 *)
49776   ECHO_N='-n';;
49777 esac
49778
49779 # For backward compatibility with old third-party macros, we provide
49780 # the shell variables $as_echo and $as_echo_n.  New code should use
49781 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
49782 as_echo='printf %s\n'
49783 as_echo_n='printf %s'
49784
49785 rm -f conf$$ conf$$.exe conf$$.file
49786 if test -d conf$$.dir; then
49787   rm -f conf$$.dir/conf$$.file
49788 else
49789   rm -f conf$$.dir
49790   mkdir conf$$.dir 2>/dev/null
49791 fi
49792 if (echo >conf$$.file) 2>/dev/null; then
49793   if ln -s conf$$.file conf$$ 2>/dev/null; then
49794     as_ln_s='ln -s'
49795     # ... but there are two gotchas:
49796     # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
49797     # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
49798     # In both cases, we have to default to 'cp -pR'.
49799     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49800       as_ln_s='cp -pR'
49801   elif ln conf$$.file conf$$ 2>/dev/null; then
49802     as_ln_s=ln
49803   else
49804     as_ln_s='cp -pR'
49805   fi
49806 else
49807   as_ln_s='cp -pR'
49808 fi
49809 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49810 rmdir conf$$.dir 2>/dev/null
49811
49812
49813 # as_fn_mkdir_p
49814 # -------------
49815 # Create "$as_dir" as a directory, including parents if necessary.
49816 as_fn_mkdir_p ()
49817 {
49818
49819   case $as_dir in #(
49820   -*) as_dir=./$as_dir;;
49821   esac
49822   test -d "$as_dir" || eval $as_mkdir_p || {
49823     as_dirs=
49824     while :; do
49825       case $as_dir in #(
49826       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49827       *) as_qdir=$as_dir;;
49828       esac
49829       as_dirs="'$as_qdir' $as_dirs"
49830       as_dir=`$as_dirname -- "$as_dir" ||
49831 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49832          X"$as_dir" : 'X\(//\)[^/]' \| \
49833          X"$as_dir" : 'X\(//\)$' \| \
49834          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49835 printf "%s\n" X"$as_dir" |
49836     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49837             s//\1/
49838             q
49839           }
49840           /^X\(\/\/\)[^/].*/{
49841             s//\1/
49842             q
49843           }
49844           /^X\(\/\/\)$/{
49845             s//\1/
49846             q
49847           }
49848           /^X\(\/\).*/{
49849             s//\1/
49850             q
49851           }
49852           s/.*/./; q'`
49853       test -d "$as_dir" && break
49854     done
49855     test -z "$as_dirs" || eval "mkdir $as_dirs"
49856   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49857
49858
49859 } # as_fn_mkdir_p
49860 if mkdir -p . 2>/dev/null; then
49861   as_mkdir_p='mkdir -p "$as_dir"'
49862 else
49863   test -d ./-p && rmdir ./-p
49864   as_mkdir_p=false
49865 fi
49866
49867
49868 # as_fn_executable_p FILE
49869 # -----------------------
49870 # Test if FILE is an executable regular file.
49871 as_fn_executable_p ()
49872 {
49873   test -f "$1" && test -x "$1"
49874 } # as_fn_executable_p
49875 as_test_x='test -x'
49876 as_executable_p=as_fn_executable_p
49877
49878 # Sed expression to map a string onto a valid CPP name.
49879 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
49880 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
49881
49882 # Sed expression to map a string onto a valid variable name.
49883 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
49884 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
49885
49886
49887 exec 6>&1
49888 ## ----------------------------------- ##
49889 ## Main body of $CONFIG_STATUS script. ##
49890 ## ----------------------------------- ##
49891 _ASEOF
49892 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49893
49894 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49895 # Save the log message, to keep $0 and so on meaningful, and to
49896 # report actual input values of CONFIG_FILES etc. instead of their
49897 # values after options handling.
49898 ac_log="
49899 This file was extended by GNU diffutils $as_me 3.10, which was
49900 generated by GNU Autoconf 2.72c.20-9c018.  Invocation command line was
49901
49902   CONFIG_FILES    = $CONFIG_FILES
49903   CONFIG_HEADERS  = $CONFIG_HEADERS
49904   CONFIG_LINKS    = $CONFIG_LINKS
49905   CONFIG_COMMANDS = $CONFIG_COMMANDS
49906   $ $0 $@
49907
49908 on `(hostname || uname -n) 2>/dev/null | sed 1q`
49909 "
49910
49911 _ACEOF
49912
49913 case $ac_config_files in *"
49914 "*) set x $ac_config_files; shift; ac_config_files=$*;;
49915 esac
49916
49917 case $ac_config_headers in *"
49918 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49919 esac
49920
49921
49922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49923 # Files that config.status was made for.
49924 config_files="$ac_config_files"
49925 config_headers="$ac_config_headers"
49926 config_links="$ac_config_links"
49927 config_commands="$ac_config_commands"
49928
49929 _ACEOF
49930
49931 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49932 ac_cs_usage="\
49933 '$as_me' instantiates files and other configuration actions
49934 from templates according to the current configuration.  Unless the files
49935 and actions are specified as TAGs, all are instantiated by default.
49936
49937 Usage: $0 [OPTION]... [TAG]...
49938
49939   -h, --help       print this help, then exit
49940   -V, --version    print version number and configuration settings, then exit
49941       --config     print configuration, then exit
49942   -q, --quiet, --silent
49943                    do not print progress messages
49944   -d, --debug      don't remove temporary files
49945       --recheck    update $as_me by reconfiguring in the same conditions
49946       --file=FILE[:TEMPLATE]
49947                    instantiate the configuration file FILE
49948       --header=FILE[:TEMPLATE]
49949                    instantiate the configuration header FILE
49950
49951 Configuration files:
49952 $config_files
49953
49954 Configuration headers:
49955 $config_headers
49956
49957 Configuration links:
49958 $config_links
49959
49960 Configuration commands:
49961 $config_commands
49962
49963 Report bugs to <bug-diffutils@gnu.org>.
49964 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
49965 General help using GNU software: <https://www.gnu.org/gethelp/>."
49966
49967 _ACEOF
49968 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
49969 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
49970 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49971 ac_cs_config='$ac_cs_config_escaped'
49972 ac_cs_version="\\
49973 GNU diffutils config.status 3.10
49974 configured by $0, generated by GNU Autoconf 2.72c.20-9c018,
49975   with options \\"\$ac_cs_config\\"
49976
49977 Copyright (C) 2023 Free Software Foundation, Inc.
49978 This config.status script is free software; the Free Software Foundation
49979 gives unlimited permission to copy, distribute and modify it."
49980
49981 ac_pwd='$ac_pwd'
49982 srcdir='$srcdir'
49983 INSTALL='$INSTALL'
49984 MKDIR_P='$MKDIR_P'
49985 AWK='$AWK'
49986 test -n "\$AWK" || AWK=awk
49987 _ACEOF
49988
49989 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49990 # The default lists apply if the user does not specify any file.
49991 ac_need_defaults=:
49992 while test $# != 0
49993 do
49994   case $1 in
49995   --*=?*)
49996     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49997     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49998     ac_shift=:
49999     ;;
50000   --*=)
50001     ac_option=`expr "X$1" : 'X\([^=]*\)='`
50002     ac_optarg=
50003     ac_shift=:
50004     ;;
50005   *)
50006     ac_option=$1
50007     ac_optarg=$2
50008     ac_shift=shift
50009     ;;
50010   esac
50011
50012   case $ac_option in
50013   # Handling of the options.
50014   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50015     ac_cs_recheck=: ;;
50016   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50017     printf "%s\n" "$ac_cs_version"; exit ;;
50018   --config | --confi | --conf | --con | --co | --c )
50019     printf "%s\n" "$ac_cs_config"; exit ;;
50020   --debug | --debu | --deb | --de | --d | -d )
50021     debug=: ;;
50022   --file | --fil | --fi | --f )
50023     $ac_shift
50024     case $ac_optarg in
50025     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50026     '') as_fn_error $? "missing file argument" ;;
50027     esac
50028     as_fn_append CONFIG_FILES " '$ac_optarg'"
50029     ac_need_defaults=false;;
50030   --header | --heade | --head | --hea )
50031     $ac_shift
50032     case $ac_optarg in
50033     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50034     esac
50035     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50036     ac_need_defaults=false;;
50037   --he | --h)
50038     # Conflict between --help and --header
50039     as_fn_error $? "ambiguous option: '$1'
50040 Try '$0 --help' for more information.";;
50041   --help | --hel | -h )
50042     printf "%s\n" "$ac_cs_usage"; exit ;;
50043   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50044   | -silent | --silent | --silen | --sile | --sil | --si | --s)
50045     ac_cs_silent=: ;;
50046
50047   # This is an error.
50048   -*) as_fn_error $? "unrecognized option: '$1'
50049 Try '$0 --help' for more information." ;;
50050
50051   *) as_fn_append ac_config_targets " $1"
50052      ac_need_defaults=false ;;
50053
50054   esac
50055   shift
50056 done
50057
50058 ac_configure_extra_args=
50059
50060 if $ac_cs_silent; then
50061   exec 6>/dev/null
50062   ac_configure_extra_args="$ac_configure_extra_args --silent"
50063 fi
50064
50065 _ACEOF
50066 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50067 if \$ac_cs_recheck; then
50068   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50069   shift
50070   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
50071   CONFIG_SHELL='$SHELL'
50072   export CONFIG_SHELL
50073   exec "\$@"
50074 fi
50075
50076 _ACEOF
50077 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50078 exec 5>>config.log
50079 {
50080   echo
50081   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50082 ## Running $as_me. ##
50083 _ASBOX
50084   printf "%s\n" "$ac_log"
50085 } >&5
50086
50087 _ACEOF
50088 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50089 #
50090 # INIT-COMMANDS
50091 #
50092 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
50093 GNUmakefile=$GNUmakefile
50094 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
50095     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
50096     # from automake < 1.5.
50097     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
50098     # Capture the value of LINGUAS because we need it to compute CATALOGS.
50099     LINGUAS="${LINGUAS-%UNSET%}"
50100
50101
50102 _ACEOF
50103
50104 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50105
50106 # Handling of arguments.
50107 for ac_config_target in $ac_config_targets
50108 do
50109   case $ac_config_target in
50110     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
50111     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
50112     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
50113     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
50114     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
50115     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
50116     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
50117     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
50118     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
50119     "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
50120     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
50121     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
50122
50123   *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
50124   esac
50125 done
50126
50127
50128 # If the user did not use the arguments to specify the items to instantiate,
50129 # then the envvar interface is used.  Set only those that are not.
50130 # We use the long form for the default assignment because of an extremely
50131 # bizarre bug on SunOS 4.1.3.
50132 if $ac_need_defaults; then
50133   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
50134   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
50135   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
50136   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
50137 fi
50138
50139 # Have a temporary directory for convenience.  Make it in the build tree
50140 # simply because there is no reason against having it here, and in addition,
50141 # creating and moving files from /tmp can sometimes cause problems.
50142 # Hook for its removal unless debugging.
50143 # Note that there is a small window in which the directory will not be cleaned:
50144 # after its creation but before its name has been assigned to '$tmp'.
50145 $debug ||
50146 {
50147   tmp= ac_tmp=
50148   trap 'exit_status=$?
50149   : "${ac_tmp:=$tmp}"
50150   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50151 ' 0
50152   trap 'as_fn_exit 1' 1 2 13 15
50153 }
50154 # Create a (secure) tmp directory for tmp files.
50155
50156 {
50157   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50158   test -d "$tmp"
50159 }  ||
50160 {
50161   tmp=./conf$$-$RANDOM
50162   (umask 077 && mkdir "$tmp")
50163 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50164 ac_tmp=$tmp
50165
50166 # Set up the scripts for CONFIG_FILES section.
50167 # No need to generate them if there are no CONFIG_FILES.
50168 # This happens for instance with './config.status config.h'.
50169 if test -n "$CONFIG_FILES"; then
50170
50171
50172 ac_cr=`echo X | tr X '\015'`
50173 # On cygwin, bash can eat \r inside `` if the user requested igncr.
50174 # But we know of no other shell where ac_cr would be empty at this
50175 # point, so we can use a bashism as a fallback.
50176 if test "x$ac_cr" = x; then
50177   eval ac_cr=\$\'\\r\'
50178 fi
50179 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50180 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50181   ac_cs_awk_cr='\\r'
50182 else
50183   ac_cs_awk_cr=$ac_cr
50184 fi
50185
50186 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50187 _ACEOF
50188
50189
50190 {
50191   echo "cat >conf$$subs.awk <<_ACEOF" &&
50192   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50193   echo "_ACEOF"
50194 } >conf$$subs.sh ||
50195   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50196 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50197 ac_delim='%!_!# '
50198 for ac_last_try in false false false false false :; do
50199   . ./conf$$subs.sh ||
50200     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50201
50202   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50203   if test $ac_delim_n = $ac_delim_num; then
50204     break
50205   elif $ac_last_try; then
50206     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50207   else
50208     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50209   fi
50210 done
50211 rm -f conf$$subs.sh
50212
50213 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50214 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50215 _ACEOF
50216 sed -n '
50217 h
50218 s/^/S["/; s/!.*/"]=/
50219 p
50220 g
50221 s/^[^!]*!//
50222 :repl
50223 t repl
50224 s/'"$ac_delim"'$//
50225 t delim
50226 :nl
50227 h
50228 s/\(.\{148\}\)..*/\1/
50229 t more1
50230 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50231 p
50232 n
50233 b repl
50234 :more1
50235 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50236 p
50237 g
50238 s/.\{148\}//
50239 t nl
50240 :delim
50241 h
50242 s/\(.\{148\}\)..*/\1/
50243 t more2
50244 s/["\\]/\\&/g; s/^/"/; s/$/"/
50245 p
50246 b
50247 :more2
50248 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50249 p
50250 g
50251 s/.\{148\}//
50252 t delim
50253 ' <conf$$subs.awk | sed '
50254 /^[^""]/{
50255   N
50256   s/\n//
50257 }
50258 ' >>$CONFIG_STATUS || ac_write_fail=1
50259 rm -f conf$$subs.awk
50260 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50261 _ACAWK
50262 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50263   for (key in S) S_is_set[key] = 1
50264   FS = "\a"
50265
50266 }
50267 {
50268   line = $ 0
50269   nfields = split(line, field, "@")
50270   substed = 0
50271   len = length(field[1])
50272   for (i = 2; i < nfields; i++) {
50273     key = field[i]
50274     keylen = length(key)
50275     if (S_is_set[key]) {
50276       value = S[key]
50277       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50278       len += length(value) + length(field[++i])
50279       substed = 1
50280     } else
50281       len += 1 + keylen
50282   }
50283
50284   print line
50285 }
50286
50287 _ACAWK
50288 _ACEOF
50289 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50290 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50291   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50292 else
50293   cat
50294 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50295   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50296 _ACEOF
50297
50298 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50299 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50300 # trailing colons and then remove the whole line if VPATH becomes empty
50301 # (actually we leave an empty line to preserve line numbers).
50302 if test "x$srcdir" = x.; then
50303   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
50304 h
50305 s///
50306 s/^/:/
50307 s/[      ]*$/:/
50308 s/:\$(srcdir):/:/g
50309 s/:\${srcdir}:/:/g
50310 s/:@srcdir@:/:/g
50311 s/^:*//
50312 s/:*$//
50313 x
50314 s/\(=[   ]*\).*/\1/
50315 G
50316 s/\n//
50317 s/^[^=]*=[       ]*$//
50318 }'
50319 fi
50320
50321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50322 fi # test -n "$CONFIG_FILES"
50323
50324 # Set up the scripts for CONFIG_HEADERS section.
50325 # No need to generate them if there are no CONFIG_HEADERS.
50326 # This happens for instance with './config.status Makefile'.
50327 if test -n "$CONFIG_HEADERS"; then
50328 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50329 BEGIN {
50330 _ACEOF
50331
50332 # Transform confdefs.h into an awk script 'defines.awk', embedded as
50333 # here-document in config.status, that substitutes the proper values into
50334 # config.h.in to produce config.h.
50335
50336 # Create a delimiter string that does not exist in confdefs.h, to ease
50337 # handling of long lines.
50338 ac_delim='%!_!# '
50339 for ac_last_try in false false :; do
50340   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50341   if test -z "$ac_tt"; then
50342     break
50343   elif $ac_last_try; then
50344     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50345   else
50346     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50347   fi
50348 done
50349
50350 # For the awk script, D is an array of macro values keyed by name,
50351 # likewise P contains macro parameters if any.  Preserve backslash
50352 # newline sequences.
50353
50354 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50355 sed -n '
50356 s/.\{148\}/&'"$ac_delim"'/g
50357 t rset
50358 :rset
50359 s/^[     ]*#[    ]*define[       ][      ]*/ /
50360 t def
50361 d
50362 :def
50363 s/\\$//
50364 t bsnl
50365 s/["\\]/\\&/g
50366 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
50367 D["\1"]=" \3"/p
50368 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
50369 d
50370 :bsnl
50371 s/["\\]/\\&/g
50372 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
50373 D["\1"]=" \3\\\\\\n"\\/p
50374 t cont
50375 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50376 t cont
50377 d
50378 :cont
50379 n
50380 s/.\{148\}/&'"$ac_delim"'/g
50381 t clear
50382 :clear
50383 s/\\$//
50384 t bsnlc
50385 s/["\\]/\\&/g; s/^/"/; s/$/"/p
50386 d
50387 :bsnlc
50388 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50389 b cont
50390 ' <confdefs.h | sed '
50391 s/'"$ac_delim"'/"\\\
50392 "/g' >>$CONFIG_STATUS || ac_write_fail=1
50393
50394 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50395   for (key in D) D_is_set[key] = 1
50396   FS = "\a"
50397 }
50398 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50399   line = \$ 0
50400   split(line, arg, " ")
50401   if (arg[1] == "#") {
50402     defundef = arg[2]
50403     mac1 = arg[3]
50404   } else {
50405     defundef = substr(arg[1], 2)
50406     mac1 = arg[2]
50407   }
50408   split(mac1, mac2, "(") #)
50409   macro = mac2[1]
50410   prefix = substr(line, 1, index(line, defundef) - 1)
50411   if (D_is_set[macro]) {
50412     # Preserve the white space surrounding the "#".
50413     print prefix "define", macro P[macro] D[macro]
50414     next
50415   } else {
50416     # Replace #undef with comments.  This is necessary, for example,
50417     # in the case of _POSIX_SOURCE, which is predefined and required
50418     # on some systems where configure will not decide to define it.
50419     if (defundef == "undef") {
50420       print "/*", prefix defundef, macro, "*/"
50421       next
50422     }
50423   }
50424 }
50425 { print }
50426 _ACAWK
50427 _ACEOF
50428 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50429   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50430 fi # test -n "$CONFIG_HEADERS"
50431
50432
50433 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
50434 shift
50435 for ac_tag
50436 do
50437   case $ac_tag in
50438   :[FHLC]) ac_mode=$ac_tag; continue;;
50439   esac
50440   case $ac_mode$ac_tag in
50441   :[FHL]*:*);;
50442   :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
50443   :[FH]-) ac_tag=-:-;;
50444   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50445   esac
50446   ac_save_IFS=$IFS
50447   IFS=:
50448   set x $ac_tag
50449   IFS=$ac_save_IFS
50450   shift
50451   ac_file=$1
50452   shift
50453
50454   case $ac_mode in
50455   :L) ac_source=$1;;
50456   :[FH])
50457     ac_file_inputs=
50458     for ac_f
50459     do
50460       case $ac_f in
50461       -) ac_f="$ac_tmp/stdin";;
50462       *) # Look for the file first in the build tree, then in the source tree
50463          # (if the path is not absolute).  The absolute path cannot be DOS-style,
50464          # because $ac_f cannot contain ':'.
50465          test -f "$ac_f" ||
50466            case $ac_f in
50467            [\\/$]*) false;;
50468            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50469            esac ||
50470            as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
50471       esac
50472       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50473       as_fn_append ac_file_inputs " '$ac_f'"
50474     done
50475
50476     # Let's still pretend it is 'configure' which instantiates (i.e., don't
50477     # use $as_me), people would be surprised to read:
50478     #    /* config.h.  Generated by config.status.  */
50479     configure_input='Generated from '`
50480           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50481         `' by configure.'
50482     if test x"$ac_file" != x-; then
50483       configure_input="$ac_file.  $configure_input"
50484       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50485 printf "%s\n" "$as_me: creating $ac_file" >&6;}
50486     fi
50487     # Neutralize special characters interpreted by sed in replacement strings.
50488     case $configure_input in #(
50489     *\&* | *\|* | *\\* )
50490        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
50491        sed 's/[\\\\&|]/\\\\&/g'`;; #(
50492     *) ac_sed_conf_input=$configure_input;;
50493     esac
50494
50495     case $ac_tag in
50496     *:-:* | *:-) cat >"$ac_tmp/stdin" \
50497       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50498     esac
50499     ;;
50500   esac
50501
50502   ac_dir=`$as_dirname -- "$ac_file" ||
50503 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50504          X"$ac_file" : 'X\(//\)[^/]' \| \
50505          X"$ac_file" : 'X\(//\)$' \| \
50506          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50507 printf "%s\n" X"$ac_file" |
50508     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50509             s//\1/
50510             q
50511           }
50512           /^X\(\/\/\)[^/].*/{
50513             s//\1/
50514             q
50515           }
50516           /^X\(\/\/\)$/{
50517             s//\1/
50518             q
50519           }
50520           /^X\(\/\).*/{
50521             s//\1/
50522             q
50523           }
50524           s/.*/./; q'`
50525   as_dir="$ac_dir"; as_fn_mkdir_p
50526   ac_builddir=.
50527
50528 case "$ac_dir" in
50529 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50530 *)
50531   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
50532   # A ".." for each directory in $ac_dir_suffix.
50533   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50534   case $ac_top_builddir_sub in
50535   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50536   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50537   esac ;;
50538 esac
50539 ac_abs_top_builddir=$ac_pwd
50540 ac_abs_builddir=$ac_pwd$ac_dir_suffix
50541 # for backward compatibility:
50542 ac_top_builddir=$ac_top_build_prefix
50543
50544 case $srcdir in
50545   .)  # We are building in place.
50546     ac_srcdir=.
50547     ac_top_srcdir=$ac_top_builddir_sub
50548     ac_abs_top_srcdir=$ac_pwd ;;
50549   [\\/]* | ?:[\\/]* )  # Absolute name.
50550     ac_srcdir=$srcdir$ac_dir_suffix;
50551     ac_top_srcdir=$srcdir
50552     ac_abs_top_srcdir=$srcdir ;;
50553   *) # Relative name.
50554     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50555     ac_top_srcdir=$ac_top_build_prefix$srcdir
50556     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50557 esac
50558 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50559
50560
50561   case $ac_mode in
50562   :F)
50563   #
50564   # CONFIG_FILE
50565   #
50566
50567   case $INSTALL in
50568   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
50569   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
50570   esac
50571   ac_MKDIR_P=$MKDIR_P
50572   case $MKDIR_P in
50573   [\\/$]* | ?:[\\/]* ) ;;
50574   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
50575   esac
50576 _ACEOF
50577
50578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50579 # If the template does not know about datarootdir, expand it.
50580 # FIXME: This hack should be removed a few years after 2.60.
50581 ac_datarootdir_hack=; ac_datarootdir_seen=
50582 ac_sed_dataroot='
50583 /datarootdir/ {
50584   p
50585   q
50586 }
50587 /@datadir@/p
50588 /@docdir@/p
50589 /@infodir@/p
50590 /@localedir@/p
50591 /@mandir@/p'
50592 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50593 *datarootdir*) ac_datarootdir_seen=yes;;
50594 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50595   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50596 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50597 _ACEOF
50598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50599   ac_datarootdir_hack='
50600   s&@datadir@&$datadir&g
50601   s&@docdir@&$docdir&g
50602   s&@infodir@&$infodir&g
50603   s&@localedir@&$localedir&g
50604   s&@mandir@&$mandir&g
50605   s&\\\${datarootdir}&$datarootdir&g' ;;
50606 esac
50607 _ACEOF
50608
50609 # Neutralize VPATH when '$srcdir' = '.'.
50610 # Shell code in configure.ac might set extrasub.
50611 # FIXME: do we really want to maintain this feature?
50612 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50613 ac_sed_extra="$ac_vpsub
50614 $extrasub
50615 _ACEOF
50616 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50617 :t
50618 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50619 s|@configure_input@|$ac_sed_conf_input|;t t
50620 s&@top_builddir@&$ac_top_builddir_sub&;t t
50621 s&@top_build_prefix@&$ac_top_build_prefix&;t t
50622 s&@srcdir@&$ac_srcdir&;t t
50623 s&@abs_srcdir@&$ac_abs_srcdir&;t t
50624 s&@top_srcdir@&$ac_top_srcdir&;t t
50625 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50626 s&@builddir@&$ac_builddir&;t t
50627 s&@abs_builddir@&$ac_abs_builddir&;t t
50628 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50629 s&@INSTALL@&$ac_INSTALL&;t t
50630 s&@MKDIR_P@&$ac_MKDIR_P&;t t
50631 $ac_datarootdir_hack
50632 "
50633 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50634   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50635
50636 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50637   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50638   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
50639       "$ac_tmp/out"`; test -z "$ac_out"; } &&
50640   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
50641 which seems to be undefined.  Please make sure it is defined" >&5
50642 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
50643 which seems to be undefined.  Please make sure it is defined" >&2;}
50644
50645   rm -f "$ac_tmp/stdin"
50646   case $ac_file in
50647   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50648   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50649   esac \
50650   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50651  ;;
50652   :H)
50653   #
50654   # CONFIG_HEADER
50655   #
50656   if test x"$ac_file" != x-; then
50657     {
50658       printf "%s\n" "/* $configure_input  */" >&1 \
50659       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50660     } >"$ac_tmp/config.h" \
50661       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50662     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50663       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50664 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
50665     else
50666       rm -f "$ac_file"
50667       mv "$ac_tmp/config.h" "$ac_file" \
50668         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50669     fi
50670   else
50671     printf "%s\n" "/* $configure_input  */" >&1 \
50672       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50673       || as_fn_error $? "could not create -" "$LINENO" 5
50674   fi
50675 # Compute "$ac_file"'s index in $config_headers.
50676 _am_arg="$ac_file"
50677 _am_stamp_count=1
50678 for _am_header in $config_headers :; do
50679   case $_am_header in
50680     $_am_arg | $_am_arg:* )
50681       break ;;
50682     * )
50683       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
50684   esac
50685 done
50686 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
50687 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50688          X"$_am_arg" : 'X\(//\)[^/]' \| \
50689          X"$_am_arg" : 'X\(//\)$' \| \
50690          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
50691 printf "%s\n" X"$_am_arg" |
50692     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50693             s//\1/
50694             q
50695           }
50696           /^X\(\/\/\)[^/].*/{
50697             s//\1/
50698             q
50699           }
50700           /^X\(\/\/\)$/{
50701             s//\1/
50702             q
50703           }
50704           /^X\(\/\).*/{
50705             s//\1/
50706             q
50707           }
50708           s/.*/./; q'`/stamp-h$_am_stamp_count
50709  ;;
50710   :L)
50711   #
50712   # CONFIG_LINK
50713   #
50714
50715   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
50716     :
50717   else
50718     # Prefer the file from the source tree if names are identical.
50719     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
50720       ac_source=$srcdir/$ac_source
50721     fi
50722
50723     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
50724 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
50725
50726     if test ! -r "$ac_source"; then
50727       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
50728     fi
50729     rm -f "$ac_file"
50730
50731     # Try a relative symlink, then a hard link, then a copy.
50732     case $ac_source in
50733     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
50734         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
50735     esac
50736     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
50737       ln "$ac_source" "$ac_file" 2>/dev/null ||
50738       cp -p "$ac_source" "$ac_file" ||
50739       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
50740   fi
50741  ;;
50742   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
50743 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
50744  ;;
50745   esac
50746
50747
50748   case $ac_file$ac_mode in
50749     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
50750   # Older Autoconf quotes --file arguments for eval, but not when files
50751   # are listed without --file.  Let's play safe and only enable the eval
50752   # if we detect the quoting.
50753   # TODO: see whether this extra hack can be removed once we start
50754   # requiring Autoconf 2.70 or later.
50755   case $CONFIG_FILES in #(
50756   *\'*) :
50757     eval set x "$CONFIG_FILES" ;; #(
50758   *) :
50759     set x $CONFIG_FILES ;; #(
50760   *) :
50761      ;;
50762 esac
50763   shift
50764   # Used to flag and report bootstrapping failures.
50765   am_rc=0
50766   for am_mf
50767   do
50768     # Strip MF so we end up with the name of the file.
50769     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
50770     # Check whether this is an Automake generated Makefile which includes
50771     # dependency-tracking related rules and includes.
50772     # Grep'ing the whole file directly is not great: AIX grep has a line
50773     # limit of 2048, but all sed's we know have understand at least 4000.
50774     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
50775       || continue
50776     am_dirpart=`$as_dirname -- "$am_mf" ||
50777 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50778          X"$am_mf" : 'X\(//\)[^/]' \| \
50779          X"$am_mf" : 'X\(//\)$' \| \
50780          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
50781 printf "%s\n" X"$am_mf" |
50782     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50783             s//\1/
50784             q
50785           }
50786           /^X\(\/\/\)[^/].*/{
50787             s//\1/
50788             q
50789           }
50790           /^X\(\/\/\)$/{
50791             s//\1/
50792             q
50793           }
50794           /^X\(\/\).*/{
50795             s//\1/
50796             q
50797           }
50798           s/.*/./; q'`
50799     am_filepart=`$as_basename -- "$am_mf" ||
50800 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
50801          X"$am_mf" : 'X\(//\)$' \| \
50802          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
50803 printf "%s\n" X/"$am_mf" |
50804     sed '/^.*\/\([^/][^/]*\)\/*$/{
50805             s//\1/
50806             q
50807           }
50808           /^X\/\(\/\/\)$/{
50809             s//\1/
50810             q
50811           }
50812           /^X\/\(\/\).*/{
50813             s//\1/
50814             q
50815           }
50816           s/.*/./; q'`
50817     { echo "$as_me:$LINENO: cd "$am_dirpart" \
50818       && sed -e '/# am--include-marker/d' "$am_filepart" \
50819         | $MAKE -f - am--depfiles" >&5
50820    (cd "$am_dirpart" \
50821       && sed -e '/# am--include-marker/d' "$am_filepart" \
50822         | $MAKE -f - am--depfiles) >&5 2>&5
50823    ac_status=$?
50824    echo "$as_me:$LINENO: \$? = $ac_status" >&5
50825    (exit $ac_status); } || am_rc=$?
50826   done
50827   if test $am_rc -ne 0; then
50828     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
50829 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
50830 as_fn_error $? "Something went wrong bootstrapping makefile fragments
50831     for automatic dependency tracking.  If GNU make was not used, consider
50832     re-running the configure script with MAKE=\"gmake\" (or whatever is
50833     necessary).  You can also try re-running configure with the
50834     '--disable-dependency-tracking' option to at least be able to build
50835     the package (albeit without support for automatic dependency tracking).
50836 See 'config.log' for more details" "$LINENO" 5; }
50837   fi
50838   { am_dirpart=; unset am_dirpart;}
50839   { am_filepart=; unset am_filepart;}
50840   { am_mf=; unset am_mf;}
50841   { am_rc=; unset am_rc;}
50842   rm -f conftest-deps.mk
50843 }
50844  ;;
50845     "po-directories":C)
50846     for ac_file in $CONFIG_FILES; do
50847       # Support "outfile[:infile[:infile...]]"
50848       case "$ac_file" in
50849         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
50850       esac
50851       # PO directories have a Makefile.in generated from Makefile.in.in.
50852       case "$ac_file" in */Makefile.in)
50853         # Adjust a relative srcdir.
50854         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
50855         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
50856         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
50857         # In autoconf-2.13 it is called $ac_given_srcdir.
50858         # In autoconf-2.50 it is called $srcdir.
50859         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
50860         case "$ac_given_srcdir" in
50861           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
50862           /*) top_srcdir="$ac_given_srcdir" ;;
50863           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
50864         esac
50865         # Treat a directory as a PO directory if and only if it has a
50866         # POTFILES.in file. This allows packages to have multiple PO
50867         # directories under different names or in different locations.
50868         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
50869           rm -f "$ac_dir/POTFILES"
50870           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
50871           gt_tab=`printf '\t'`
50872           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
50873           POMAKEFILEDEPS="POTFILES.in"
50874           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
50875           # on $ac_dir but don't depend on user-specified configuration
50876           # parameters.
50877           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
50878             # The LINGUAS file contains the set of available languages.
50879             if test -n "$OBSOLETE_ALL_LINGUAS"; then
50880               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
50881             fi
50882             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
50883             # Hide the ALL_LINGUAS assignment from automake < 1.5.
50884             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
50885             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
50886           else
50887             # The set of available languages was given in configure.in.
50888             # Hide the ALL_LINGUAS assignment from automake < 1.5.
50889             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
50890           fi
50891           # Compute POFILES
50892           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
50893           # Compute UPDATEPOFILES
50894           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
50895           # Compute DUMMYPOFILES
50896           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
50897           # Compute GMOFILES
50898           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
50899           case "$ac_given_srcdir" in
50900             .) srcdirpre= ;;
50901             *) srcdirpre='$(srcdir)/' ;;
50902           esac
50903           POFILES=
50904           UPDATEPOFILES=
50905           DUMMYPOFILES=
50906           GMOFILES=
50907           for lang in $ALL_LINGUAS; do
50908             POFILES="$POFILES $srcdirpre$lang.po"
50909             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
50910             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
50911             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
50912           done
50913           # CATALOGS depends on both $ac_dir and the user's LINGUAS
50914           # environment variable.
50915           INST_LINGUAS=
50916           if test -n "$ALL_LINGUAS"; then
50917             for presentlang in $ALL_LINGUAS; do
50918               useit=no
50919               if test "%UNSET%" != "$LINGUAS"; then
50920                 desiredlanguages="$LINGUAS"
50921               else
50922                 desiredlanguages="$ALL_LINGUAS"
50923               fi
50924               for desiredlang in $desiredlanguages; do
50925                 # Use the presentlang catalog if desiredlang is
50926                 #   a. equal to presentlang, or
50927                 #   b. a variant of presentlang (because in this case,
50928                 #      presentlang can be used as a fallback for messages
50929                 #      which are not translated in the desiredlang catalog).
50930                 case "$desiredlang" in
50931                   "$presentlang"*) useit=yes;;
50932                 esac
50933               done
50934               if test $useit = yes; then
50935                 INST_LINGUAS="$INST_LINGUAS $presentlang"
50936               fi
50937             done
50938           fi
50939           CATALOGS=
50940           if test -n "$INST_LINGUAS"; then
50941             for lang in $INST_LINGUAS; do
50942               CATALOGS="$CATALOGS $lang.gmo"
50943             done
50944           fi
50945           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
50946           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
50947           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
50948             if test -f "$f"; then
50949               case "$f" in
50950                 *.orig | *.bak | *~) ;;
50951                 *) cat "$f" >> "$ac_dir/Makefile" ;;
50952               esac
50953             fi
50954           done
50955         fi
50956         ;;
50957       esac
50958     done ;;
50959
50960   esac
50961 done # for ac_tag
50962
50963
50964 as_fn_exit 0
50965 _ACEOF
50966 ac_clean_files=$ac_clean_files_save
50967
50968 test $ac_write_fail = 0 ||
50969   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50970
50971
50972 # configure is writing to config.log, and then calls config.status.
50973 # config.status does its own redirection, appending to config.log.
50974 # Unfortunately, on DOS this fails, as config.log is still kept open
50975 # by configure, so config.status won't be able to write to it; its
50976 # output is simply discarded.  So we exec the FD to /dev/null,
50977 # effectively closing config.log, so it can be properly (re)opened and
50978 # appended to by config.status.  When coming back to configure, we
50979 # need to make the FD available again.
50980 if test "$no_create" != yes; then
50981   ac_cs_success=:
50982   ac_config_status_args=
50983   test "$silent" = yes &&
50984     ac_config_status_args="$ac_config_status_args --quiet"
50985   exec 5>/dev/null
50986   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50987   exec 5>>config.log
50988   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50989   # would make configure fail if this is the last instruction.
50990   $ac_cs_success || as_fn_exit 1
50991 fi
50992 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50993   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50994 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50995 fi
50996
50997