a76b88182d10f9bcbde26161cdb29423bd5c4950
[platform/upstream/diffutils.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.197-b8fd7 for GNU diffutils 3.7.
4 #
5 # Report bugs to <bug-diffutils@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20 then :
21   emulate sh
22   NULLCMD=:
23   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24   # is contrary to our usage.  Disable this feature.
25   alias -g '${1+"$@"}'='"$@"'
26   setopt NO_GLOB_SUBST
27 else
28   case `(set -o) 2>/dev/null` in #(
29   *posix*) :
30     set -o posix ;; #(
31   *) :
32      ;;
33 esac
34 fi
35
36
37 # The user is always right.
38 if ${PATH_SEPARATOR+false} :; then
39   PATH_SEPARATOR=:
40   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
42       PATH_SEPARATOR=';'
43   }
44 fi
45
46
47 # IFS
48 # We need space, tab and new line, in precisely that order.  Quoting is
49 # there to prevent editors from complaining about space-tab.
50 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51 # splitting by setting IFS to empty value.)
52 as_nl='
53 '
54 export as_nl
55 IFS=" ""        $as_nl"
56
57 # Find who we are.  Look in the path if we contain no directory separator.
58 as_myself=
59 case $0 in #((
60   *[\\/]* ) as_myself=$0 ;;
61   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62 for as_dir in $PATH
63 do
64   IFS=$as_save_IFS
65   case $as_dir in #(((
66     '') as_dir=./ ;;
67     */) ;;
68     *) as_dir=$as_dir/ ;;
69   esac
70     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
71   done
72 IFS=$as_save_IFS
73
74      ;;
75 esac
76 # We did not find ourselves, most probably we were run as `sh COMMAND'
77 # in which case we are not to be found in the path.
78 if test "x$as_myself" = x; then
79   as_myself=$0
80 fi
81 if test ! -f "$as_myself"; then
82   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
83   exit 1
84 fi
85
86 # Unset variables that we do not need and which cause bugs (e.g. in
87 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
88 # suppresses any "Segmentation fault" message there.  '((' could
89 # trigger a bug in pdksh 5.2.14.
90 for as_var in BASH_ENV ENV MAIL MAILPATH
91 do eval test \${$as_var+y} \
92   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
93 done
94 PS1='$ '
95 PS2='> '
96 PS4='+ '
97
98 # NLS nuisances.
99 LC_ALL=C
100 export LC_ALL
101 LANGUAGE=C
102 export LANGUAGE
103
104 # CDPATH.
105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
106
107 # Use a proper internal environment variable to ensure we don't fall
108   # into an infinite loop, continuously re-executing ourselves.
109   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
110     _as_can_reexec=no; export _as_can_reexec;
111     # We cannot yet assume a decent shell, so we have to provide a
112 # neutralization value for shells without unset; and this also
113 # works around shells that cannot unset nonexistent variables.
114 # Preserve -v and -x to the replacement shell.
115 BASH_ENV=/dev/null
116 ENV=/dev/null
117 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
118 case $- in # ((((
119   *v*x* | *x*v* ) as_opts=-vx ;;
120   *v* ) as_opts=-v ;;
121   *x* ) as_opts=-x ;;
122   * ) as_opts= ;;
123 esac
124 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
125 # Admittedly, this is quite paranoid, since all the known shells bail
126 # out after a failed `exec'.
127 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
128 as_fn_exit 255
129   fi
130   # We don't want this to propagate to other subprocesses.
131           { _as_can_reexec=; unset _as_can_reexec;}
132 if test "x$CONFIG_SHELL" = x; then
133   as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
134 then :
135   emulate sh
136   NULLCMD=:
137   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
138   # is contrary to our usage.  Disable this feature.
139   alias -g '\${1+\"\$@\"}'='\"\$@\"'
140   setopt NO_GLOB_SUBST
141 else
142   case \`(set -o) 2>/dev/null\` in #(
143   *posix*) :
144     set -o posix ;; #(
145   *) :
146      ;;
147 esac
148 fi
149 "
150   as_required="as_fn_return () { (exit \$1); }
151 as_fn_success () { as_fn_return 0; }
152 as_fn_failure () { as_fn_return 1; }
153 as_fn_ret_success () { return 0; }
154 as_fn_ret_failure () { return 1; }
155
156 exitcode=0
157 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
158 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
159 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
160 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
161 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
162 then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1
168 test -x / || exit 1"
169   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174   if (eval "$as_required") 2>/dev/null
175 then :
176   as_have_required=yes
177 else
178   as_have_required=no
179 fi
180   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
181 then :
182
183 else
184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
185 as_found=false
186 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
187 do
188   IFS=$as_save_IFS
189   case $as_dir in #(((
190     '') as_dir=./ ;;
191     */) ;;
192     *) as_dir=$as_dir/ ;;
193   esac
194   as_found=:
195   case $as_dir in #(
196          /*)
197            for as_base in sh bash ksh sh5; do
198              # Try only shells that exist, to save several forks.
199              as_shell=$as_dir$as_base
200              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
201                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
202 then :
203   CONFIG_SHELL=$as_shell as_have_required=yes
204                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
205 then :
206   break 2
207 fi
208 fi
209            done;;
210        esac
211   as_found=false
212 done
213 IFS=$as_save_IFS
214 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
215               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
216 then :
217   CONFIG_SHELL=$SHELL as_have_required=yes
218 fi; }
219
220
221       if test "x$CONFIG_SHELL" != x
222 then :
223   export CONFIG_SHELL
224              # We cannot yet assume a decent shell, so we have to provide a
225 # neutralization value for shells without unset; and this also
226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
228 BASH_ENV=/dev/null
229 ENV=/dev/null
230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
231 case $- in # ((((
232   *v*x* | *x*v* ) as_opts=-vx ;;
233   *v* ) as_opts=-v ;;
234   *x* ) as_opts=-x ;;
235   * ) as_opts= ;;
236 esac
237 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
238 # Admittedly, this is quite paranoid, since all the known shells bail
239 # out after a failed `exec'.
240 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
241 exit 255
242 fi
243
244     if test x$as_have_required = xno
245 then :
246   printf "%s\n" "$0: This script requires a shell more modern than all"
247   printf "%s\n" "$0: the shells that I found on your system."
248   if test ${ZSH_VERSION+y} ; then
249     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
250     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
251   else
252     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
253 $0: bug-diffutils@gnu.org about your system, including any
254 $0: error possibly output before this message. Then install
255 $0: a modern shell, or manually run the script under such a
256 $0: shell if you do have one."
257   fi
258   exit 1
259 fi
260 fi
261 fi
262 SHELL=${CONFIG_SHELL-/bin/sh}
263 export SHELL
264 # Unset more variables known to interfere with behavior of common tools.
265 CLICOLOR_FORCE= GREP_OPTIONS=
266 unset CLICOLOR_FORCE GREP_OPTIONS
267
268 ## --------------------- ##
269 ## M4sh Shell Functions. ##
270 ## --------------------- ##
271 # as_fn_unset VAR
272 # ---------------
273 # Portably unset VAR.
274 as_fn_unset ()
275 {
276   { eval $1=; unset $1;}
277 }
278 as_unset=as_fn_unset
279
280 # as_fn_set_status STATUS
281 # -----------------------
282 # Set $? to STATUS, without forking.
283 as_fn_set_status ()
284 {
285   return $1
286 } # as_fn_set_status
287
288 # as_fn_exit STATUS
289 # -----------------
290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
291 as_fn_exit ()
292 {
293   set +e
294   as_fn_set_status $1
295   exit $1
296 } # as_fn_exit
297
298 # as_fn_mkdir_p
299 # -------------
300 # Create "$as_dir" as a directory, including parents if necessary.
301 as_fn_mkdir_p ()
302 {
303
304   case $as_dir in #(
305   -*) as_dir=./$as_dir;;
306   esac
307   test -d "$as_dir" || eval $as_mkdir_p || {
308     as_dirs=
309     while :; do
310       case $as_dir in #(
311       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
312       *) as_qdir=$as_dir;;
313       esac
314       as_dirs="'$as_qdir' $as_dirs"
315       as_dir=`$as_dirname -- "$as_dir" ||
316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
317          X"$as_dir" : 'X\(//\)[^/]' \| \
318          X"$as_dir" : 'X\(//\)$' \| \
319          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
320 printf "%s\n" X"$as_dir" |
321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
322             s//\1/
323             q
324           }
325           /^X\(\/\/\)[^/].*/{
326             s//\1/
327             q
328           }
329           /^X\(\/\/\)$/{
330             s//\1/
331             q
332           }
333           /^X\(\/\).*/{
334             s//\1/
335             q
336           }
337           s/.*/./; q'`
338       test -d "$as_dir" && break
339     done
340     test -z "$as_dirs" || eval "mkdir $as_dirs"
341   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
342
343
344 } # as_fn_mkdir_p
345
346 # as_fn_executable_p FILE
347 # -----------------------
348 # Test if FILE is an executable regular file.
349 as_fn_executable_p ()
350 {
351   test -f "$1" && test -x "$1"
352 } # as_fn_executable_p
353 # as_fn_append VAR VALUE
354 # ----------------------
355 # Append the text in VALUE to the end of the definition contained in VAR. Take
356 # advantage of any shell optimizations that allow amortized linear growth over
357 # repeated appends, instead of the typical quadratic growth present in naive
358 # implementations.
359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
360 then :
361   eval 'as_fn_append ()
362   {
363     eval $1+=\$2
364   }'
365 else
366   as_fn_append ()
367   {
368     eval $1=\$$1\$2
369   }
370 fi # as_fn_append
371
372 # as_fn_arith ARG...
373 # ------------------
374 # Perform arithmetic evaluation on the ARGs, and store the result in the
375 # global $as_val. Take advantage of shells that can avoid forks. The arguments
376 # must be portable across $(()) and expr.
377 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
378 then :
379   eval 'as_fn_arith ()
380   {
381     as_val=$(( $* ))
382   }'
383 else
384   as_fn_arith ()
385   {
386     as_val=`expr "$@" || test $? -eq 1`
387   }
388 fi # as_fn_arith
389
390
391 # as_fn_error STATUS ERROR [LINENO LOG_FD]
392 # ----------------------------------------
393 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
394 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
395 # script with STATUS, using 1 if that was 0.
396 as_fn_error ()
397 {
398   as_status=$1; test $as_status -eq 0 && as_status=1
399   if test "$4"; then
400     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
401     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
402   fi
403   printf "%s\n" "$as_me: error: $2" >&2
404   as_fn_exit $as_status
405 } # as_fn_error
406
407 if expr a : '\(a\)' >/dev/null 2>&1 &&
408    test "X`expr 00001 : '.*\(...\)'`" = X001; then
409   as_expr=expr
410 else
411   as_expr=false
412 fi
413
414 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
415   as_basename=basename
416 else
417   as_basename=false
418 fi
419
420 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
421   as_dirname=dirname
422 else
423   as_dirname=false
424 fi
425
426 as_me=`$as_basename -- "$0" ||
427 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
428          X"$0" : 'X\(//\)$' \| \
429          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
430 printf "%s\n" X/"$0" |
431     sed '/^.*\/\([^/][^/]*\)\/*$/{
432             s//\1/
433             q
434           }
435           /^X\/\(\/\/\)$/{
436             s//\1/
437             q
438           }
439           /^X\/\(\/\).*/{
440             s//\1/
441             q
442           }
443           s/.*/./; q'`
444
445 # Avoid depending upon Character Ranges.
446 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
447 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
448 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
449 as_cr_digits='0123456789'
450 as_cr_alnum=$as_cr_Letters$as_cr_digits
451
452
453   as_lineno_1=$LINENO as_lineno_1a=$LINENO
454   as_lineno_2=$LINENO as_lineno_2a=$LINENO
455   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
456   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
457   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
458   sed -n '
459     p
460     /[$]LINENO/=
461   ' <$as_myself |
462     sed '
463       s/[$]LINENO.*/&-/
464       t lineno
465       b
466       :lineno
467       N
468       :loop
469       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470       t loop
471       s/-\n.*//
472     ' >$as_me.lineno &&
473   chmod +x "$as_me.lineno" ||
474     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
475
476   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
477   # already done that, so ensure we don't try to do so again and fall
478   # in an infinite loop.  This has already happened in practice.
479   _as_can_reexec=no; export _as_can_reexec
480   # Don't try to exec as it changes $[0], causing all sort of problems
481   # (the dirname of $[0] is not the place where we might find the
482   # original and so on.  Autoconf is especially sensitive to this).
483   . "./$as_me.lineno"
484   # Exit status is that of the last command.
485   exit
486 }
487
488 ECHO_C= ECHO_N= ECHO_T=
489 case `echo -n x` in #(((((
490 -n*)
491   case `echo 'xy\c'` in
492   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
493   xy)  ECHO_C='\c';;
494   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
495        ECHO_T=' ';;
496   esac;;
497 *)
498   ECHO_N='-n';;
499 esac
500
501 rm -f conf$$ conf$$.exe conf$$.file
502 if test -d conf$$.dir; then
503   rm -f conf$$.dir/conf$$.file
504 else
505   rm -f conf$$.dir
506   mkdir conf$$.dir 2>/dev/null
507 fi
508 if (echo >conf$$.file) 2>/dev/null; then
509   if ln -s conf$$.file conf$$ 2>/dev/null; then
510     as_ln_s='ln -s'
511     # ... but there are two gotchas:
512     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
513     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
514     # In both cases, we have to default to `cp -pR'.
515     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
516       as_ln_s='cp -pR'
517   elif ln conf$$.file conf$$ 2>/dev/null; then
518     as_ln_s=ln
519   else
520     as_ln_s='cp -pR'
521   fi
522 else
523   as_ln_s='cp -pR'
524 fi
525 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
526 rmdir conf$$.dir 2>/dev/null
527
528 if mkdir -p . 2>/dev/null; then
529   as_mkdir_p='mkdir -p "$as_dir"'
530 else
531   test -d ./-p && rmdir ./-p
532   as_mkdir_p=false
533 fi
534
535 as_test_x='test -x'
536 as_executable_p=as_fn_executable_p
537
538 # Sed expression to map a string onto a valid CPP name.
539 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
540
541 # Sed expression to map a string onto a valid variable name.
542 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
543
544
545 test -n "$DJDIR" || exec 7<&0 </dev/null
546 exec 6>&1
547
548 # Name of the host.
549 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
550 # so uname gets run too.
551 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
552
553 #
554 # Initializations.
555 #
556 ac_default_prefix=/usr/local
557 ac_clean_files=
558 ac_config_libobj_dir=.
559 LIBOBJS=
560 cross_compiling=no
561 subdirs=
562 MFLAGS=
563 MAKEFLAGS=
564
565 # Identity of this package.
566 PACKAGE_NAME='GNU diffutils'
567 PACKAGE_TARNAME='diffutils'
568 PACKAGE_VERSION='3.7'
569 PACKAGE_STRING='GNU diffutils 3.7'
570 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
571 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
572
573 ac_unique_file="src/diff.c"
574 # Factoring default headers for most tests.
575 ac_includes_default="\
576 #include <stddef.h>
577 #include <stdio.h>
578 #include <stdlib.h>
579 #include <string.h>
580 #ifdef HAVE_SYS_TYPES_H
581 # include <sys/types.h>
582 #endif
583 #ifdef HAVE_SYS_STAT_H
584 # include <sys/stat.h>
585 #endif
586 #ifdef HAVE_STRINGS_H
587 # include <strings.h>
588 #endif
589 #ifdef HAVE_INTTYPES_H
590 # include <inttypes.h>
591 #endif
592 #ifdef HAVE_STDINT_H
593 # include <stdint.h>
594 #endif
595 #ifdef HAVE_UNISTD_H
596 # include <unistd.h>
597 #endif"
598
599 ac_header_c_list=
600 ac_func_c_list=
601 gl_fnmatch_required=POSIX
602 gl_getopt_required=POSIX
603 gt_needs=
604 ac_subst_vars='gltests_LTLIBOBJS
605 gltests_LIBOBJS
606 gl_LTLIBOBJS
607 gl_LIBOBJS
608 CONFIG_INCLUDE
609 am__EXEEXT_FALSE
610 am__EXEEXT_TRUE
611 LTLIBOBJS
612 LIBOBJS
613 POSUB
614 INTLLIBS
615 INTL_MACOSX_LIBS
616 XGETTEXT_EXTRA_OPTIONS
617 MSGMERGE
618 XGETTEXT_015
619 XGETTEXT
620 GMSGFMT_015
621 MSGFMT_015
622 GMSGFMT
623 MSGFMT
624 GETTEXT_MACRO_VERSION
625 USE_NLS
626 SRC_VERSION_C
627 PR_PROGRAM
628 GNULIB_WARN_CFLAGS
629 WARN_CFLAGS
630 WERROR_CFLAGS
631 LIBTESTS_LIBDEPS
632 LIBDIFFUTILS_LTLIBDEPS
633 LIBDIFFUTILS_LIBDEPS
634 abs_aux_dir
635 HAVE_SYS_UIO_H
636 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
637 NEXT_SYS_UIO_H
638 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
639 NEXT_SYS_IOCTL_H
640 HAVE_SYS_IOCTL_H
641 GL_GENERATE_STDALIGN_H_FALSE
642 GL_GENERATE_STDALIGN_H_TRUE
643 STDALIGN_H
644 GL_GENERATE_NETINET_IN_H_FALSE
645 GL_GENERATE_NETINET_IN_H_TRUE
646 NETINET_IN_H
647 HAVE_NETINET_IN_H
648 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
649 NEXT_NETINET_IN_H
650 LIB_NANOSLEEP
651 LIB_SELECT
652 LIBSOCKET
653 HAVE_SYS_SELECT_H
654 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
655 NEXT_SYS_SELECT_H
656 REPLACE_SELECT
657 REPLACE_PSELECT
658 HAVE_PSELECT
659 GNULIB_SELECT
660 GNULIB_PSELECT
661 INET_PTON_LIB
662 LOCALE_TR_UTF8
663 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
664 NEXT_ARPA_INET_H
665 HAVE_ARPA_INET_H
666 REPLACE_INET_PTON
667 REPLACE_INET_NTOP
668 HAVE_DECL_INET_PTON
669 HAVE_DECL_INET_NTOP
670 GNULIB_INET_PTON
671 GNULIB_INET_NTOP
672 HAVE_WS2TCPIP_H
673 HAVE_SYS_SOCKET_H
674 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
675 NEXT_SYS_SOCKET_H
676 HAVE_ACCEPT4
677 HAVE_SA_FAMILY_T
678 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
679 HAVE_STRUCT_SOCKADDR_STORAGE
680 GNULIB_ACCEPT4
681 GNULIB_SHUTDOWN
682 GNULIB_SETSOCKOPT
683 GNULIB_SENDTO
684 GNULIB_RECVFROM
685 GNULIB_SEND
686 GNULIB_RECV
687 GNULIB_LISTEN
688 GNULIB_GETSOCKOPT
689 GNULIB_GETSOCKNAME
690 GNULIB_GETPEERNAME
691 GNULIB_BIND
692 GNULIB_ACCEPT
693 GNULIB_CONNECT
694 GNULIB_SOCKET
695 gltests_WITNESS
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697 NEXT_WCHAR_H
698 HAVE_FEATURES_H
699 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
700 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
701 LIBUNISTRING_UNIWIDTH_H
702 LIBUNISTRING_UNITYPES_H
703 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
704 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
705 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
706 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
707 LIBUNISTRING_UNISTR_H
708 HAVE_UNISTD_H
709 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
710 NEXT_UNISTD_H
711 UNISTD_H_DEFINES_STRUCT_TIMESPEC
712 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
713 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
714 TIME_H_DEFINES_STRUCT_TIMESPEC
715 NEXT_AS_FIRST_DIRECTIVE_TIME_H
716 NEXT_TIME_H
717 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
718 NEXT_SYS_WAIT_H
719 GNULIB_WAITPID
720 WINDOWS_STAT_INODES
721 WINDOWS_64_BIT_OFF_T
722 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
723 NEXT_SYS_TYPES_H
724 HAVE_STRINGS_H
725 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
726 NEXT_STRINGS_H
727 NEXT_AS_FIRST_DIRECTIVE_STRING_H
728 NEXT_STRING_H
729 HAVE_DECL_STRNCASECMP
730 HAVE_STRCASECMP
731 HAVE_FFS
732 GNULIB_FFS
733 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
734 NEXT_STDLIB_H
735 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
736 NEXT_STDIO_H
737 HAVE__BOOL
738 GL_GENERATE_STDBOOL_H_FALSE
739 GL_GENERATE_STDBOOL_H_TRUE
740 STDBOOL_H
741 GL_GENERATE_STDARG_H_FALSE
742 GL_GENERATE_STDARG_H_TRUE
743 STDARG_H
744 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
745 NEXT_STDARG_H
746 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
747 NEXT_SIGNAL_H
748 GLIBC21
749 REPLACE_RAISE
750 REPLACE_PTHREAD_SIGMASK
751 HAVE_SIGHANDLER_T
752 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
753 HAVE_STRUCT_SIGACTION_SA_SIGACTION
754 HAVE_SIGACTION
755 HAVE_SIGINFO_T
756 HAVE_SIGSET_T
757 HAVE_RAISE
758 HAVE_PTHREAD_SIGMASK
759 HAVE_POSIX_SIGNALBLOCKING
760 GNULIB_SIGACTION
761 GNULIB_SIGPROCMASK
762 GNULIB_SIGNAL_H_SIGPIPE
763 GNULIB_RAISE
764 GNULIB_PTHREAD_SIGMASK
765 UNDEFINE_STRTOK_R
766 REPLACE_STRSIGNAL
767 REPLACE_STRERROR_R
768 REPLACE_STRERROR
769 REPLACE_STRTOK_R
770 REPLACE_STRCASESTR
771 REPLACE_STRSTR
772 REPLACE_STRNLEN
773 REPLACE_STRNDUP
774 REPLACE_STRNCAT
775 REPLACE_STRDUP
776 REPLACE_STRCHRNUL
777 REPLACE_STPNCPY
778 REPLACE_MEMMEM
779 REPLACE_MEMCHR
780 HAVE_STRVERSCMP
781 HAVE_DECL_STRSIGNAL
782 HAVE_DECL_STRERROR_R
783 HAVE_DECL_STRTOK_R
784 HAVE_STRCASESTR
785 HAVE_STRSEP
786 HAVE_STRPBRK
787 HAVE_DECL_STRNLEN
788 HAVE_DECL_STRNDUP
789 HAVE_DECL_STRDUP
790 HAVE_STRCHRNUL
791 HAVE_STPNCPY
792 HAVE_STPCPY
793 HAVE_RAWMEMCHR
794 HAVE_DECL_MEMRCHR
795 HAVE_MEMPCPY
796 HAVE_DECL_MEMMEM
797 HAVE_MEMCHR
798 HAVE_FFSLL
799 HAVE_FFSL
800 HAVE_EXPLICIT_BZERO
801 HAVE_MBSLEN
802 GNULIB_STRVERSCMP
803 GNULIB_STRSIGNAL
804 GNULIB_STRERROR_R
805 GNULIB_STRERROR
806 GNULIB_MBSTOK_R
807 GNULIB_MBSSEP
808 GNULIB_MBSSPN
809 GNULIB_MBSPBRK
810 GNULIB_MBSCSPN
811 GNULIB_MBSCASESTR
812 GNULIB_MBSPCASECMP
813 GNULIB_MBSNCASECMP
814 GNULIB_MBSCASECMP
815 GNULIB_MBSSTR
816 GNULIB_MBSRCHR
817 GNULIB_MBSCHR
818 GNULIB_MBSNLEN
819 GNULIB_MBSLEN
820 GNULIB_STRTOK_R
821 GNULIB_STRCASESTR
822 GNULIB_STRSTR
823 GNULIB_STRSEP
824 GNULIB_STRPBRK
825 GNULIB_STRNLEN
826 GNULIB_STRNDUP
827 GNULIB_STRNCAT
828 GNULIB_STRDUP
829 GNULIB_STRCHRNUL
830 GNULIB_STPNCPY
831 GNULIB_STPCPY
832 GNULIB_RAWMEMCHR
833 GNULIB_MEMRCHR
834 GNULIB_MEMPCPY
835 GNULIB_MEMMEM
836 GNULIB_MEMCHR
837 GNULIB_FFSLL
838 GNULIB_FFSL
839 GNULIB_EXPLICIT_BZERO
840 LOCALE_FR_UTF8
841 LOCALE_ZH_CN
842 LOCALE_JA
843 REPLACE_WCTOMB
844 REPLACE_UNSETENV
845 REPLACE_STRTOD
846 REPLACE_SETENV
847 REPLACE_REALPATH
848 REPLACE_REALLOC
849 REPLACE_RANDOM_R
850 REPLACE_QSORT_R
851 REPLACE_PUTENV
852 REPLACE_PTSNAME_R
853 REPLACE_PTSNAME
854 REPLACE_MKSTEMP
855 REPLACE_MBTOWC
856 REPLACE_MALLOC
857 REPLACE_CANONICALIZE_FILE_NAME
858 REPLACE_CALLOC
859 HAVE_DECL_UNSETENV
860 HAVE_UNLOCKPT
861 HAVE_SYS_LOADAVG_H
862 HAVE_STRUCT_RANDOM_DATA
863 HAVE_STRTOULL
864 HAVE_STRTOLL
865 HAVE_STRTOD
866 HAVE_DECL_SETSTATE
867 HAVE_DECL_SETENV
868 HAVE_SETENV
869 HAVE_SECURE_GETENV
870 HAVE_RPMATCH
871 HAVE_REALPATH
872 HAVE_REALLOCARRAY
873 HAVE_RANDOM_R
874 HAVE_RANDOM_H
875 HAVE_RANDOM
876 HAVE_QSORT_R
877 HAVE_PTSNAME_R
878 HAVE_PTSNAME
879 HAVE_POSIX_OPENPT
880 HAVE_MKSTEMPS
881 HAVE_MKSTEMP
882 HAVE_MKOSTEMPS
883 HAVE_MKOSTEMP
884 HAVE_MKDTEMP
885 HAVE_DECL_INITSTATE
886 HAVE_GRANTPT
887 HAVE_GETSUBOPT
888 HAVE_DECL_GETLOADAVG
889 HAVE_CANONICALIZE_FILE_NAME
890 HAVE_ATOLL
891 HAVE__EXIT
892 GNULIB_WCTOMB
893 GNULIB_UNSETENV
894 GNULIB_UNLOCKPT
895 GNULIB_SYSTEM_POSIX
896 GNULIB_STRTOULL
897 GNULIB_STRTOLL
898 GNULIB_STRTOD
899 GNULIB_SETENV
900 GNULIB_SECURE_GETENV
901 GNULIB_RPMATCH
902 GNULIB_REALPATH
903 GNULIB_REALLOC_POSIX
904 GNULIB_REALLOCARRAY
905 GNULIB_RANDOM_R
906 GNULIB_RANDOM
907 GNULIB_QSORT_R
908 GNULIB_PUTENV
909 GNULIB_PTSNAME_R
910 GNULIB_PTSNAME
911 GNULIB_POSIX_OPENPT
912 GNULIB_MKSTEMPS
913 GNULIB_MKSTEMP
914 GNULIB_MKOSTEMPS
915 GNULIB_MKOSTEMP
916 GNULIB_MKDTEMP
917 GNULIB_MBTOWC
918 GNULIB_MALLOC_POSIX
919 GNULIB_GRANTPT
920 GNULIB_GETSUBOPT
921 GNULIB_GETLOADAVG
922 GNULIB_CANONICALIZE_FILE_NAME
923 GNULIB_CALLOC_POSIX
924 GNULIB_ATOLL
925 GNULIB__EXIT
926 SED
927 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
928 NEXT_LOCALE_H
929 HAVE_XLOCALE_H
930 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
931 NEXT_STDDEF_H
932 GL_GENERATE_STDDEF_H_FALSE
933 GL_GENERATE_STDDEF_H_TRUE
934 STDDEF_H
935 HAVE_WCHAR_T
936 HAVE_MAX_ALIGN_T
937 REPLACE_NULL
938 REPLACE_STRUCT_LCONV
939 REPLACE_FREELOCALE
940 REPLACE_DUPLOCALE
941 REPLACE_NEWLOCALE
942 REPLACE_SETLOCALE
943 REPLACE_LOCALECONV
944 HAVE_FREELOCALE
945 HAVE_DUPLOCALE
946 HAVE_NEWLOCALE
947 GNULIB_LOCALENAME
948 GNULIB_DUPLOCALE
949 GNULIB_SETLOCALE
950 GNULIB_LOCALECONV
951 LOCALCHARSET_TESTS_ENVIRONMENT
952 HAVE_LANGINFO_YESEXPR
953 HAVE_LANGINFO_ERA
954 HAVE_LANGINFO_ALTMON
955 HAVE_LANGINFO_T_FMT_AMPM
956 HAVE_LANGINFO_CODESET
957 HAVE_LANGINFO_H
958 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
959 NEXT_LANGINFO_H
960 REPLACE_NL_LANGINFO
961 HAVE_NL_LANGINFO
962 GNULIB_NL_LANGINFO
963 REPLACE_TOWLOWER
964 REPLACE_ISWCNTRL
965 HAVE_WCTYPE_H
966 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
967 NEXT_WCTYPE_H
968 HAVE_CRTDEFS_H
969 HAVE_WINT_T
970 HAVE_ISWCNTRL
971 REPLACE_ISWBLANK
972 HAVE_WCTRANS_T
973 HAVE_WCTYPE_T
974 HAVE_ISWBLANK
975 GNULIB_TOWCTRANS
976 GNULIB_WCTRANS
977 GNULIB_ISWCTYPE
978 GNULIB_WCTYPE
979 GNULIB_ISWBLANK
980 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
981 NEXT_INTTYPES_H
982 UINT64_MAX_EQ_ULONG_MAX
983 UINT32_MAX_LT_UINTMAX_MAX
984 PRIPTR_PREFIX
985 PRI_MACROS_BROKEN
986 INT64_MAX_EQ_LONG_MAX
987 INT32_MAX_LT_INTMAX_MAX
988 REPLACE_STRTOUMAX
989 REPLACE_STRTOIMAX
990 HAVE_IMAXDIV_T
991 HAVE_DECL_STRTOUMAX
992 HAVE_DECL_STRTOIMAX
993 HAVE_DECL_IMAXDIV
994 HAVE_DECL_IMAXABS
995 GNULIB_STRTOUMAX
996 GNULIB_STRTOIMAX
997 GNULIB_IMAXDIV
998 GNULIB_IMAXABS
999 GL_GENERATE_STDINT_H_FALSE
1000 GL_GENERATE_STDINT_H_TRUE
1001 STDINT_H
1002 HAVE_SYS_INTTYPES_H
1003 HAVE_SYS_BITYPES_H
1004 HAVE_C99_STDINT_H
1005 WINT_T_SUFFIX
1006 WCHAR_T_SUFFIX
1007 SIG_ATOMIC_T_SUFFIX
1008 SIZE_T_SUFFIX
1009 PTRDIFF_T_SUFFIX
1010 HAVE_SIGNED_WINT_T
1011 HAVE_SIGNED_WCHAR_T
1012 HAVE_SIGNED_SIG_ATOMIC_T
1013 BITSIZEOF_WINT_T
1014 BITSIZEOF_WCHAR_T
1015 BITSIZEOF_SIG_ATOMIC_T
1016 BITSIZEOF_SIZE_T
1017 BITSIZEOF_PTRDIFF_T
1018 APPLE_UNIVERSAL_BUILD
1019 HAVE_STDINT_H
1020 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1021 NEXT_STDINT_H
1022 HAVE_SYS_TYPES_H
1023 HAVE_INTTYPES_H
1024 HAVE_WCHAR_H
1025 HAVE_UNSIGNED_LONG_LONG_INT
1026 HAVE_LONG_LONG_INT
1027 GNULIB_OVERRIDES_WINT_T
1028 GL_GENERATE_LIMITS_H_FALSE
1029 GL_GENERATE_LIMITS_H_TRUE
1030 LIMITS_H
1031 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1032 NEXT_LIMITS_H
1033 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1034 NEXT_ICONV_H
1035 GL_GENERATE_ICONV_H_FALSE
1036 GL_GENERATE_ICONV_H_TRUE
1037 ICONV_H
1038 REPLACE_ICONV_UTF
1039 REPLACE_ICONV_OPEN
1040 REPLACE_ICONV
1041 ICONV_CONST
1042 GNULIB_ICONV
1043 LTLIBICONV
1044 LIBICONV
1045 GNU_MAKE_FALSE
1046 GNU_MAKE_TRUE
1047 REPLACE_LOCALTIME
1048 REPLACE_GMTIME
1049 REPLACE_TZSET
1050 REPLACE_TIMEGM
1051 REPLACE_STRFTIME
1052 REPLACE_NANOSLEEP
1053 REPLACE_MKTIME
1054 REPLACE_LOCALTIME_R
1055 REPLACE_CTIME
1056 HAVE_TIMEZONE_T
1057 HAVE_TZSET
1058 HAVE_TIMEGM
1059 HAVE_STRPTIME
1060 HAVE_NANOSLEEP
1061 HAVE_DECL_LOCALTIME_R
1062 GNULIB_TZSET
1063 GNULIB_TIME_RZ
1064 GNULIB_TIME_R
1065 GNULIB_TIMEGM
1066 GNULIB_STRPTIME
1067 GNULIB_STRFTIME
1068 GNULIB_NANOSLEEP
1069 GNULIB_LOCALTIME
1070 GNULIB_MKTIME
1071 GNULIB_CTIME
1072 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1073 NEXT_SYS_TIME_H
1074 REPLACE_STRUCT_TIMEVAL
1075 REPLACE_GETTIMEOFDAY
1076 HAVE_SYS_TIME_H
1077 HAVE_STRUCT_TIMEVAL
1078 HAVE_GETTIMEOFDAY
1079 GNULIB_GETTIMEOFDAY
1080 LTLIBINTL
1081 LIBINTL
1082 GNULIB_GL_UNISTD_H_GETOPT
1083 GETOPT_CDEFS_H
1084 GETOPT_H
1085 HAVE_SYS_CDEFS_H
1086 HAVE_GETOPT_H
1087 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1088 NEXT_GETOPT_H
1089 WINDOWS_64_BIT_ST_SIZE
1090 WINDOWS_STAT_TIMESPEC
1091 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1092 NEXT_SYS_STAT_H
1093 REPLACE_UTIMENSAT
1094 REPLACE_STAT
1095 REPLACE_MKNOD
1096 REPLACE_MKFIFO
1097 REPLACE_MKDIR
1098 REPLACE_LSTAT
1099 REPLACE_FUTIMENS
1100 REPLACE_FSTATAT
1101 REPLACE_FSTAT
1102 HAVE_UTIMENSAT
1103 HAVE_MKNODAT
1104 HAVE_MKNOD
1105 HAVE_MKFIFOAT
1106 HAVE_MKFIFO
1107 HAVE_MKDIRAT
1108 HAVE_LSTAT
1109 HAVE_LCHMOD
1110 HAVE_FUTIMENS
1111 HAVE_FSTATAT
1112 HAVE_FCHMODAT
1113 GNULIB_OVERRIDES_STRUCT_STAT
1114 GNULIB_UTIMENSAT
1115 GNULIB_STAT
1116 GNULIB_MKNODAT
1117 GNULIB_MKNOD
1118 GNULIB_MKFIFOAT
1119 GNULIB_MKFIFO
1120 GNULIB_MKDIRAT
1121 GNULIB_LSTAT
1122 GNULIB_LCHMOD
1123 GNULIB_FUTIMENS
1124 GNULIB_FSTATAT
1125 GNULIB_FSTAT
1126 GNULIB_FCHMODAT
1127 REPLACE_VSPRINTF
1128 REPLACE_VSNPRINTF
1129 REPLACE_VPRINTF
1130 REPLACE_VFPRINTF
1131 REPLACE_VDPRINTF
1132 REPLACE_VASPRINTF
1133 REPLACE_TMPFILE
1134 REPLACE_STDIO_WRITE_FUNCS
1135 REPLACE_STDIO_READ_FUNCS
1136 REPLACE_SPRINTF
1137 REPLACE_SNPRINTF
1138 REPLACE_RENAMEAT
1139 REPLACE_RENAME
1140 REPLACE_REMOVE
1141 REPLACE_PRINTF
1142 REPLACE_POPEN
1143 REPLACE_PERROR
1144 REPLACE_OBSTACK_PRINTF
1145 REPLACE_GETLINE
1146 REPLACE_GETDELIM
1147 REPLACE_FTELLO
1148 REPLACE_FTELL
1149 REPLACE_FSEEKO
1150 REPLACE_FSEEK
1151 REPLACE_FREOPEN
1152 REPLACE_FPURGE
1153 REPLACE_FPRINTF
1154 REPLACE_FOPEN
1155 REPLACE_FFLUSH
1156 REPLACE_FDOPEN
1157 REPLACE_FCLOSE
1158 REPLACE_DPRINTF
1159 HAVE_VDPRINTF
1160 HAVE_VASPRINTF
1161 HAVE_RENAMEAT
1162 HAVE_POPEN
1163 HAVE_PCLOSE
1164 HAVE_FTELLO
1165 HAVE_FSEEKO
1166 HAVE_DPRINTF
1167 HAVE_DECL_VSNPRINTF
1168 HAVE_DECL_SNPRINTF
1169 HAVE_DECL_OBSTACK_PRINTF
1170 HAVE_DECL_GETLINE
1171 HAVE_DECL_GETDELIM
1172 HAVE_DECL_FTELLO
1173 HAVE_DECL_FSEEKO
1174 HAVE_DECL_FPURGE
1175 GNULIB_VSPRINTF_POSIX
1176 GNULIB_VSNPRINTF
1177 GNULIB_VPRINTF_POSIX
1178 GNULIB_VPRINTF
1179 GNULIB_VFPRINTF_POSIX
1180 GNULIB_VFPRINTF
1181 GNULIB_VDPRINTF
1182 GNULIB_VSCANF
1183 GNULIB_VFSCANF
1184 GNULIB_VASPRINTF
1185 GNULIB_TMPFILE
1186 GNULIB_STDIO_H_SIGPIPE
1187 GNULIB_STDIO_H_NONBLOCKING
1188 GNULIB_SPRINTF_POSIX
1189 GNULIB_SNPRINTF
1190 GNULIB_SCANF
1191 GNULIB_RENAMEAT
1192 GNULIB_RENAME
1193 GNULIB_REMOVE
1194 GNULIB_PUTS
1195 GNULIB_PUTCHAR
1196 GNULIB_PUTC
1197 GNULIB_PRINTF_POSIX
1198 GNULIB_PRINTF
1199 GNULIB_POPEN
1200 GNULIB_PERROR
1201 GNULIB_PCLOSE
1202 GNULIB_OBSTACK_PRINTF_POSIX
1203 GNULIB_OBSTACK_PRINTF
1204 GNULIB_GETLINE
1205 GNULIB_GETDELIM
1206 GNULIB_GETCHAR
1207 GNULIB_GETC
1208 GNULIB_FWRITE
1209 GNULIB_FTELLO
1210 GNULIB_FTELL
1211 GNULIB_FSEEKO
1212 GNULIB_FSEEK
1213 GNULIB_FSCANF
1214 GNULIB_FREOPEN
1215 GNULIB_FREAD
1216 GNULIB_FPUTS
1217 GNULIB_FPUTC
1218 GNULIB_FPURGE
1219 GNULIB_FPRINTF_POSIX
1220 GNULIB_FPRINTF
1221 GNULIB_FOPEN
1222 GNULIB_FGETS
1223 GNULIB_FGETC
1224 GNULIB_FFLUSH
1225 GNULIB_FDOPEN
1226 GNULIB_FCLOSE
1227 GNULIB_DPRINTF
1228 GL_GENERATE_FNMATCH_H_FALSE
1229 GL_GENERATE_FNMATCH_H_TRUE
1230 FNMATCH_H
1231 HAVE_FNMATCH_H
1232 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1233 NEXT_FNMATCH_H
1234 REPLACE_FNMATCH
1235 HAVE_FNMATCH
1236 GNULIB_FNMATCH
1237 REPLACE_ITOLD
1238 GL_GENERATE_FLOAT_H_FALSE
1239 GL_GENERATE_FLOAT_H_TRUE
1240 FLOAT_H
1241 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1242 NEXT_FLOAT_H
1243 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1244 NEXT_FCNTL_H
1245 REPLACE_OPENAT
1246 REPLACE_OPEN
1247 REPLACE_FCNTL
1248 HAVE_OPENAT
1249 HAVE_FCNTL
1250 GNULIB_OPENAT
1251 GNULIB_OPEN
1252 GNULIB_NONBLOCKING
1253 GNULIB_FCNTL
1254 EOVERFLOW_VALUE
1255 EOVERFLOW_HIDDEN
1256 ENOLINK_VALUE
1257 ENOLINK_HIDDEN
1258 EMULTIHOP_VALUE
1259 EMULTIHOP_HIDDEN
1260 GL_GENERATE_ERRNO_H_FALSE
1261 GL_GENERATE_ERRNO_H_TRUE
1262 ERRNO_H
1263 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1264 NEXT_ERRNO_H
1265 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1266 NEXT_CTYPE_H
1267 PRAGMA_COLUMNS
1268 PRAGMA_SYSTEM_HEADER
1269 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1270 INCLUDE_NEXT
1271 HAVE_ISBLANK
1272 GNULIB_ISBLANK
1273 HAVE_WINSOCK2_H
1274 REPLACE_IOCTL
1275 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1276 SYS_IOCTL_H_HAVE_WINSOCK2_H
1277 GNULIB_IOCTL
1278 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1279 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1280 UNISTD_H_HAVE_WINSOCK2_H
1281 REPLACE_WRITE
1282 REPLACE_USLEEP
1283 REPLACE_UNLINKAT
1284 REPLACE_UNLINK
1285 REPLACE_TTYNAME_R
1286 REPLACE_TRUNCATE
1287 REPLACE_SYMLINKAT
1288 REPLACE_SYMLINK
1289 REPLACE_SLEEP
1290 REPLACE_RMDIR
1291 REPLACE_READLINKAT
1292 REPLACE_READLINK
1293 REPLACE_READ
1294 REPLACE_PWRITE
1295 REPLACE_PREAD
1296 REPLACE_LSEEK
1297 REPLACE_LINKAT
1298 REPLACE_LINK
1299 REPLACE_LCHOWN
1300 REPLACE_ISATTY
1301 REPLACE_GETPASS
1302 REPLACE_GETPAGESIZE
1303 REPLACE_GETGROUPS
1304 REPLACE_GETLOGIN_R
1305 REPLACE_GETDTABLESIZE
1306 REPLACE_GETDOMAINNAME
1307 REPLACE_GETCWD
1308 REPLACE_FTRUNCATE
1309 REPLACE_FCHOWNAT
1310 REPLACE_FACCESSAT
1311 REPLACE_DUP2
1312 REPLACE_DUP
1313 REPLACE_CLOSE
1314 REPLACE_CHOWN
1315 HAVE_SYS_PARAM_H
1316 HAVE_OS_H
1317 HAVE_DECL_TTYNAME_R
1318 HAVE_DECL_TRUNCATE
1319 HAVE_DECL_SETHOSTNAME
1320 HAVE_DECL_GETUSERSHELL
1321 HAVE_DECL_GETPAGESIZE
1322 HAVE_DECL_GETLOGIN_R
1323 HAVE_DECL_GETLOGIN
1324 HAVE_DECL_GETDOMAINNAME
1325 HAVE_DECL_FDATASYNC
1326 HAVE_DECL_FCHDIR
1327 HAVE_DECL_ENVIRON
1328 HAVE_USLEEP
1329 HAVE_UNLINKAT
1330 HAVE_SYMLINKAT
1331 HAVE_SYMLINK
1332 HAVE_SLEEP
1333 HAVE_SETHOSTNAME
1334 HAVE_READLINKAT
1335 HAVE_READLINK
1336 HAVE_PWRITE
1337 HAVE_PREAD
1338 HAVE_PIPE2
1339 HAVE_PIPE
1340 HAVE_LINKAT
1341 HAVE_LINK
1342 HAVE_LCHOWN
1343 HAVE_GROUP_MEMBER
1344 HAVE_GETPASS
1345 HAVE_GETPAGESIZE
1346 HAVE_GETLOGIN
1347 HAVE_GETHOSTNAME
1348 HAVE_GETGROUPS
1349 HAVE_GETDTABLESIZE
1350 HAVE_FTRUNCATE
1351 HAVE_FSYNC
1352 HAVE_FDATASYNC
1353 HAVE_FCHOWNAT
1354 HAVE_FCHDIR
1355 HAVE_FACCESSAT
1356 HAVE_EUIDACCESS
1357 HAVE_DUP3
1358 HAVE_DUP2
1359 HAVE_CHOWN
1360 GNULIB_WRITE
1361 GNULIB_USLEEP
1362 GNULIB_UNLINKAT
1363 GNULIB_UNLINK
1364 GNULIB_UNISTD_H_SIGPIPE
1365 GNULIB_UNISTD_H_NONBLOCKING
1366 GNULIB_TTYNAME_R
1367 GNULIB_TRUNCATE
1368 GNULIB_SYMLINKAT
1369 GNULIB_SYMLINK
1370 GNULIB_SLEEP
1371 GNULIB_SETHOSTNAME
1372 GNULIB_RMDIR
1373 GNULIB_READLINKAT
1374 GNULIB_READLINK
1375 GNULIB_READ
1376 GNULIB_PWRITE
1377 GNULIB_PREAD
1378 GNULIB_PIPE2
1379 GNULIB_PIPE
1380 GNULIB_LSEEK
1381 GNULIB_LINKAT
1382 GNULIB_LINK
1383 GNULIB_LCHOWN
1384 GNULIB_ISATTY
1385 GNULIB_GROUP_MEMBER
1386 GNULIB_GETUSERSHELL
1387 GNULIB_GETPASS
1388 GNULIB_GETPAGESIZE
1389 GNULIB_GETLOGIN_R
1390 GNULIB_GETLOGIN
1391 GNULIB_GETHOSTNAME
1392 GNULIB_GETGROUPS
1393 GNULIB_GETDTABLESIZE
1394 GNULIB_GETDOMAINNAME
1395 GNULIB_GETCWD
1396 GNULIB_FTRUNCATE
1397 GNULIB_FSYNC
1398 GNULIB_FDATASYNC
1399 GNULIB_FCHOWNAT
1400 GNULIB_FCHDIR
1401 GNULIB_FACCESSAT
1402 GNULIB_EUIDACCESS
1403 GNULIB_ENVIRON
1404 GNULIB_DUP3
1405 GNULIB_DUP2
1406 GNULIB_DUP
1407 GNULIB_CLOSE
1408 GNULIB_CHOWN
1409 GNULIB_CHDIR
1410 LIB_CLOCK_GETTIME
1411 LTLIBCSTACK
1412 LIBCSTACK
1413 LIBSIGSEGV_PREFIX
1414 LTLIBSIGSEGV
1415 LIBSIGSEGV
1416 HAVE_LIBSIGSEGV
1417 LOCALE_FR
1418 REPLACE_WCSFTIME
1419 REPLACE_WCSWIDTH
1420 REPLACE_WCWIDTH
1421 REPLACE_WCSNRTOMBS
1422 REPLACE_WCSRTOMBS
1423 REPLACE_WCRTOMB
1424 REPLACE_MBSNRTOWCS
1425 REPLACE_MBSRTOWCS
1426 REPLACE_MBRLEN
1427 REPLACE_MBRTOWC
1428 REPLACE_MBSINIT
1429 REPLACE_WCTOB
1430 REPLACE_BTOWC
1431 REPLACE_MBSTATE_T
1432 HAVE_DECL_WCWIDTH
1433 HAVE_DECL_WCTOB
1434 HAVE_WCSFTIME
1435 HAVE_WCSWIDTH
1436 HAVE_WCSTOK
1437 HAVE_WCSSTR
1438 HAVE_WCSPBRK
1439 HAVE_WCSSPN
1440 HAVE_WCSCSPN
1441 HAVE_WCSRCHR
1442 HAVE_WCSCHR
1443 HAVE_WCSDUP
1444 HAVE_WCSXFRM
1445 HAVE_WCSCOLL
1446 HAVE_WCSNCASECMP
1447 HAVE_WCSCASECMP
1448 HAVE_WCSNCMP
1449 HAVE_WCSCMP
1450 HAVE_WCSNCAT
1451 HAVE_WCSCAT
1452 HAVE_WCPNCPY
1453 HAVE_WCSNCPY
1454 HAVE_WCPCPY
1455 HAVE_WCSCPY
1456 HAVE_WCSNLEN
1457 HAVE_WCSLEN
1458 HAVE_WMEMSET
1459 HAVE_WMEMMOVE
1460 HAVE_WMEMCPY
1461 HAVE_WMEMCMP
1462 HAVE_WMEMCHR
1463 HAVE_WCSNRTOMBS
1464 HAVE_WCSRTOMBS
1465 HAVE_WCRTOMB
1466 HAVE_MBSNRTOWCS
1467 HAVE_MBSRTOWCS
1468 HAVE_MBRLEN
1469 HAVE_MBRTOWC
1470 HAVE_MBSINIT
1471 HAVE_BTOWC
1472 GNULIB_WCSFTIME
1473 GNULIB_WCSWIDTH
1474 GNULIB_WCSTOK
1475 GNULIB_WCSSTR
1476 GNULIB_WCSPBRK
1477 GNULIB_WCSSPN
1478 GNULIB_WCSCSPN
1479 GNULIB_WCSRCHR
1480 GNULIB_WCSCHR
1481 GNULIB_WCSDUP
1482 GNULIB_WCSXFRM
1483 GNULIB_WCSCOLL
1484 GNULIB_WCSNCASECMP
1485 GNULIB_WCSCASECMP
1486 GNULIB_WCSNCMP
1487 GNULIB_WCSCMP
1488 GNULIB_WCSNCAT
1489 GNULIB_WCSCAT
1490 GNULIB_WCPNCPY
1491 GNULIB_WCSNCPY
1492 GNULIB_WCPCPY
1493 GNULIB_WCSCPY
1494 GNULIB_WCSNLEN
1495 GNULIB_WCSLEN
1496 GNULIB_WMEMSET
1497 GNULIB_WMEMMOVE
1498 GNULIB_WMEMCPY
1499 GNULIB_WMEMCMP
1500 GNULIB_WMEMCHR
1501 GNULIB_WCWIDTH
1502 GNULIB_WCSNRTOMBS
1503 GNULIB_WCSRTOMBS
1504 GNULIB_WCRTOMB
1505 GNULIB_MBSNRTOWCS
1506 GNULIB_MBSRTOWCS
1507 GNULIB_MBRLEN
1508 GNULIB_MBRTOWC
1509 GNULIB_MBSINIT
1510 GNULIB_WCTOB
1511 GNULIB_BTOWC
1512 GL_GENERATE_ALLOCA_H_FALSE
1513 GL_GENERATE_ALLOCA_H_TRUE
1514 ALLOCA_H
1515 ALLOCA
1516 GL_COND_LIBTOOL_FALSE
1517 GL_COND_LIBTOOL_TRUE
1518 host_os
1519 host_vendor
1520 host_cpu
1521 host
1522 build_os
1523 build_vendor
1524 build_cpu
1525 build
1526 ARFLAGS
1527 AR
1528 EGREP
1529 GREP
1530 CPP
1531 RANLIB
1532 HELP2MAN
1533 am__fastdepCC_FALSE
1534 am__fastdepCC_TRUE
1535 CCDEPMODE
1536 am__nodep
1537 AMDEPBACKSLASH
1538 AMDEP_FALSE
1539 AMDEP_TRUE
1540 am__include
1541 DEPDIR
1542 OBJEXT
1543 EXEEXT
1544 ac_ct_CC
1545 CPPFLAGS
1546 LDFLAGS
1547 CFLAGS
1548 CC
1549 AM_BACKSLASH
1550 AM_DEFAULT_VERBOSITY
1551 AM_DEFAULT_V
1552 AM_V
1553 am__untar
1554 am__tar
1555 AMTAR
1556 am__leading_dot
1557 SET_MAKE
1558 AWK
1559 mkdir_p
1560 MKDIR_P
1561 INSTALL_STRIP_PROGRAM
1562 STRIP
1563 install_sh
1564 MAKEINFO
1565 AUTOHEADER
1566 AUTOMAKE
1567 AUTOCONF
1568 ACLOCAL
1569 VERSION
1570 PACKAGE
1571 CYGPATH_W
1572 am__isrc
1573 INSTALL_DATA
1574 INSTALL_SCRIPT
1575 INSTALL_PROGRAM
1576 target_alias
1577 host_alias
1578 build_alias
1579 LIBS
1580 ECHO_T
1581 ECHO_N
1582 ECHO_C
1583 DEFS
1584 mandir
1585 localedir
1586 libdir
1587 psdir
1588 pdfdir
1589 dvidir
1590 htmldir
1591 infodir
1592 docdir
1593 oldincludedir
1594 includedir
1595 runstatedir
1596 localstatedir
1597 sharedstatedir
1598 sysconfdir
1599 datadir
1600 datarootdir
1601 libexecdir
1602 sbindir
1603 bindir
1604 program_transform_name
1605 prefix
1606 exec_prefix
1607 PACKAGE_URL
1608 PACKAGE_BUGREPORT
1609 PACKAGE_STRING
1610 PACKAGE_VERSION
1611 PACKAGE_TARNAME
1612 PACKAGE_NAME
1613 PATH_SEPARATOR
1614 SHELL
1615 am__quote'
1616 ac_subst_files=''
1617 ac_user_opts='
1618 enable_option_checking
1619 enable_silent_rules
1620 enable_dependency_tracking
1621 enable_largefile
1622 with_gnu_ld
1623 enable_rpath
1624 with_libsigsegv_prefix
1625 with_libiconv_prefix
1626 with_included_regex
1627 with_packager
1628 with_packager_version
1629 with_packager_bug_reports
1630 enable_gcc_warnings
1631 enable_nls
1632 with_libintl_prefix
1633 '
1634       ac_precious_vars='build_alias
1635 host_alias
1636 target_alias
1637 CC
1638 CFLAGS
1639 LDFLAGS
1640 LIBS
1641 CPPFLAGS
1642 CPP'
1643
1644
1645 # Initialize some variables set by options.
1646 ac_init_help=
1647 ac_init_version=false
1648 ac_unrecognized_opts=
1649 ac_unrecognized_sep=
1650 # The variables have the same names as the options, with
1651 # dashes changed to underlines.
1652 cache_file=/dev/null
1653 exec_prefix=NONE
1654 no_create=
1655 no_recursion=
1656 prefix=NONE
1657 program_prefix=NONE
1658 program_suffix=NONE
1659 program_transform_name=s,x,x,
1660 silent=
1661 site=
1662 srcdir=
1663 verbose=
1664 x_includes=NONE
1665 x_libraries=NONE
1666
1667 # Installation directory options.
1668 # These are left unexpanded so users can "make install exec_prefix=/foo"
1669 # and all the variables that are supposed to be based on exec_prefix
1670 # by default will actually change.
1671 # Use braces instead of parens because sh, perl, etc. also accept them.
1672 # (The list follows the same order as the GNU Coding Standards.)
1673 bindir='${exec_prefix}/bin'
1674 sbindir='${exec_prefix}/sbin'
1675 libexecdir='${exec_prefix}/libexec'
1676 datarootdir='${prefix}/share'
1677 datadir='${datarootdir}'
1678 sysconfdir='${prefix}/etc'
1679 sharedstatedir='${prefix}/com'
1680 localstatedir='${prefix}/var'
1681 runstatedir='${localstatedir}/run'
1682 includedir='${prefix}/include'
1683 oldincludedir='/usr/include'
1684 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1685 infodir='${datarootdir}/info'
1686 htmldir='${docdir}'
1687 dvidir='${docdir}'
1688 pdfdir='${docdir}'
1689 psdir='${docdir}'
1690 libdir='${exec_prefix}/lib'
1691 localedir='${datarootdir}/locale'
1692 mandir='${datarootdir}/man'
1693
1694 ac_prev=
1695 ac_dashdash=
1696 for ac_option
1697 do
1698   # If the previous option needs an argument, assign it.
1699   if test -n "$ac_prev"; then
1700     eval $ac_prev=\$ac_option
1701     ac_prev=
1702     continue
1703   fi
1704
1705   case $ac_option in
1706   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1707   *=)   ac_optarg= ;;
1708   *)    ac_optarg=yes ;;
1709   esac
1710
1711   # Accept the important Cygnus configure options, so we can diagnose typos.
1712
1713   case $ac_dashdash$ac_option in
1714   --)
1715     ac_dashdash=yes ;;
1716
1717   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1718     ac_prev=bindir ;;
1719   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1720     bindir=$ac_optarg ;;
1721
1722   -build | --build | --buil | --bui | --bu)
1723     ac_prev=build_alias ;;
1724   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1725     build_alias=$ac_optarg ;;
1726
1727   -cache-file | --cache-file | --cache-fil | --cache-fi \
1728   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1729     ac_prev=cache_file ;;
1730   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1731   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1732     cache_file=$ac_optarg ;;
1733
1734   --config-cache | -C)
1735     cache_file=config.cache ;;
1736
1737   -datadir | --datadir | --datadi | --datad)
1738     ac_prev=datadir ;;
1739   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1740     datadir=$ac_optarg ;;
1741
1742   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1743   | --dataroo | --dataro | --datar)
1744     ac_prev=datarootdir ;;
1745   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1746   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1747     datarootdir=$ac_optarg ;;
1748
1749   -disable-* | --disable-*)
1750     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1751     # Reject names that are not valid shell variable names.
1752     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1753       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1754     ac_useropt_orig=$ac_useropt
1755     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1756     case $ac_user_opts in
1757       *"
1758 "enable_$ac_useropt"
1759 "*) ;;
1760       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1761          ac_unrecognized_sep=', ';;
1762     esac
1763     eval enable_$ac_useropt=no ;;
1764
1765   -docdir | --docdir | --docdi | --doc | --do)
1766     ac_prev=docdir ;;
1767   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1768     docdir=$ac_optarg ;;
1769
1770   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1771     ac_prev=dvidir ;;
1772   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1773     dvidir=$ac_optarg ;;
1774
1775   -enable-* | --enable-*)
1776     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1777     # Reject names that are not valid shell variable names.
1778     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1779       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1780     ac_useropt_orig=$ac_useropt
1781     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1782     case $ac_user_opts in
1783       *"
1784 "enable_$ac_useropt"
1785 "*) ;;
1786       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1787          ac_unrecognized_sep=', ';;
1788     esac
1789     eval enable_$ac_useropt=\$ac_optarg ;;
1790
1791   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1792   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1793   | --exec | --exe | --ex)
1794     ac_prev=exec_prefix ;;
1795   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1796   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1797   | --exec=* | --exe=* | --ex=*)
1798     exec_prefix=$ac_optarg ;;
1799
1800   -gas | --gas | --ga | --g)
1801     # Obsolete; use --with-gas.
1802     with_gas=yes ;;
1803
1804   -help | --help | --hel | --he | -h)
1805     ac_init_help=long ;;
1806   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1807     ac_init_help=recursive ;;
1808   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1809     ac_init_help=short ;;
1810
1811   -host | --host | --hos | --ho)
1812     ac_prev=host_alias ;;
1813   -host=* | --host=* | --hos=* | --ho=*)
1814     host_alias=$ac_optarg ;;
1815
1816   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1817     ac_prev=htmldir ;;
1818   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1819   | --ht=*)
1820     htmldir=$ac_optarg ;;
1821
1822   -includedir | --includedir | --includedi | --included | --include \
1823   | --includ | --inclu | --incl | --inc)
1824     ac_prev=includedir ;;
1825   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1826   | --includ=* | --inclu=* | --incl=* | --inc=*)
1827     includedir=$ac_optarg ;;
1828
1829   -infodir | --infodir | --infodi | --infod | --info | --inf)
1830     ac_prev=infodir ;;
1831   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1832     infodir=$ac_optarg ;;
1833
1834   -libdir | --libdir | --libdi | --libd)
1835     ac_prev=libdir ;;
1836   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1837     libdir=$ac_optarg ;;
1838
1839   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1840   | --libexe | --libex | --libe)
1841     ac_prev=libexecdir ;;
1842   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1843   | --libexe=* | --libex=* | --libe=*)
1844     libexecdir=$ac_optarg ;;
1845
1846   -localedir | --localedir | --localedi | --localed | --locale)
1847     ac_prev=localedir ;;
1848   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1849     localedir=$ac_optarg ;;
1850
1851   -localstatedir | --localstatedir | --localstatedi | --localstated \
1852   | --localstate | --localstat | --localsta | --localst | --locals)
1853     ac_prev=localstatedir ;;
1854   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1855   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1856     localstatedir=$ac_optarg ;;
1857
1858   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1859     ac_prev=mandir ;;
1860   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1861     mandir=$ac_optarg ;;
1862
1863   -nfp | --nfp | --nf)
1864     # Obsolete; use --without-fp.
1865     with_fp=no ;;
1866
1867   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1868   | --no-cr | --no-c | -n)
1869     no_create=yes ;;
1870
1871   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1872   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1873     no_recursion=yes ;;
1874
1875   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1876   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1877   | --oldin | --oldi | --old | --ol | --o)
1878     ac_prev=oldincludedir ;;
1879   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1880   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1881   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1882     oldincludedir=$ac_optarg ;;
1883
1884   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1885     ac_prev=prefix ;;
1886   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1887     prefix=$ac_optarg ;;
1888
1889   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1890   | --program-pre | --program-pr | --program-p)
1891     ac_prev=program_prefix ;;
1892   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1893   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1894     program_prefix=$ac_optarg ;;
1895
1896   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1897   | --program-suf | --program-su | --program-s)
1898     ac_prev=program_suffix ;;
1899   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1900   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1901     program_suffix=$ac_optarg ;;
1902
1903   -program-transform-name | --program-transform-name \
1904   | --program-transform-nam | --program-transform-na \
1905   | --program-transform-n | --program-transform- \
1906   | --program-transform | --program-transfor \
1907   | --program-transfo | --program-transf \
1908   | --program-trans | --program-tran \
1909   | --progr-tra | --program-tr | --program-t)
1910     ac_prev=program_transform_name ;;
1911   -program-transform-name=* | --program-transform-name=* \
1912   | --program-transform-nam=* | --program-transform-na=* \
1913   | --program-transform-n=* | --program-transform-=* \
1914   | --program-transform=* | --program-transfor=* \
1915   | --program-transfo=* | --program-transf=* \
1916   | --program-trans=* | --program-tran=* \
1917   | --progr-tra=* | --program-tr=* | --program-t=*)
1918     program_transform_name=$ac_optarg ;;
1919
1920   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1921     ac_prev=pdfdir ;;
1922   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1923     pdfdir=$ac_optarg ;;
1924
1925   -psdir | --psdir | --psdi | --psd | --ps)
1926     ac_prev=psdir ;;
1927   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1928     psdir=$ac_optarg ;;
1929
1930   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1931   | -silent | --silent | --silen | --sile | --sil)
1932     silent=yes ;;
1933
1934   -runstatedir | --runstatedir | --runstatedi | --runstated \
1935   | --runstate | --runstat | --runsta | --runst | --runs \
1936   | --run | --ru | --r)
1937     ac_prev=runstatedir ;;
1938   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1939   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1940   | --run=* | --ru=* | --r=*)
1941     runstatedir=$ac_optarg ;;
1942
1943   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1944     ac_prev=sbindir ;;
1945   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1946   | --sbi=* | --sb=*)
1947     sbindir=$ac_optarg ;;
1948
1949   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1950   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1951   | --sharedst | --shareds | --shared | --share | --shar \
1952   | --sha | --sh)
1953     ac_prev=sharedstatedir ;;
1954   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1955   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1956   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1957   | --sha=* | --sh=*)
1958     sharedstatedir=$ac_optarg ;;
1959
1960   -site | --site | --sit)
1961     ac_prev=site ;;
1962   -site=* | --site=* | --sit=*)
1963     site=$ac_optarg ;;
1964
1965   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1966     ac_prev=srcdir ;;
1967   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1968     srcdir=$ac_optarg ;;
1969
1970   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1971   | --syscon | --sysco | --sysc | --sys | --sy)
1972     ac_prev=sysconfdir ;;
1973   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1974   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1975     sysconfdir=$ac_optarg ;;
1976
1977   -target | --target | --targe | --targ | --tar | --ta | --t)
1978     ac_prev=target_alias ;;
1979   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1980     target_alias=$ac_optarg ;;
1981
1982   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1983     verbose=yes ;;
1984
1985   -version | --version | --versio | --versi | --vers | -V)
1986     ac_init_version=: ;;
1987
1988   -with-* | --with-*)
1989     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1990     # Reject names that are not valid shell variable names.
1991     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1992       as_fn_error $? "invalid package name: \`$ac_useropt'"
1993     ac_useropt_orig=$ac_useropt
1994     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1995     case $ac_user_opts in
1996       *"
1997 "with_$ac_useropt"
1998 "*) ;;
1999       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2000          ac_unrecognized_sep=', ';;
2001     esac
2002     eval with_$ac_useropt=\$ac_optarg ;;
2003
2004   -without-* | --without-*)
2005     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2006     # Reject names that are not valid shell variable names.
2007     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2008       as_fn_error $? "invalid package name: \`$ac_useropt'"
2009     ac_useropt_orig=$ac_useropt
2010     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2011     case $ac_user_opts in
2012       *"
2013 "with_$ac_useropt"
2014 "*) ;;
2015       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2016          ac_unrecognized_sep=', ';;
2017     esac
2018     eval with_$ac_useropt=no ;;
2019
2020   --x)
2021     # Obsolete; use --with-x.
2022     with_x=yes ;;
2023
2024   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2025   | --x-incl | --x-inc | --x-in | --x-i)
2026     ac_prev=x_includes ;;
2027   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2028   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2029     x_includes=$ac_optarg ;;
2030
2031   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2032   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2033     ac_prev=x_libraries ;;
2034   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2035   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2036     x_libraries=$ac_optarg ;;
2037
2038   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2039 Try \`$0 --help' for more information"
2040     ;;
2041
2042   *=*)
2043     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2044     # Reject names that are not valid shell variable names.
2045     case $ac_envvar in #(
2046       '' | [0-9]* | *[!_$as_cr_alnum]* )
2047       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2048     esac
2049     eval $ac_envvar=\$ac_optarg
2050     export $ac_envvar ;;
2051
2052   *)
2053     # FIXME: should be removed in autoconf 3.0.
2054     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2055     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2056       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2057     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2058     ;;
2059
2060   esac
2061 done
2062
2063 if test -n "$ac_prev"; then
2064   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2065   as_fn_error $? "missing argument to $ac_option"
2066 fi
2067
2068 if test -n "$ac_unrecognized_opts"; then
2069   case $enable_option_checking in
2070     no) ;;
2071     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2072     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2073   esac
2074 fi
2075
2076 # Check all directory arguments for consistency.
2077 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2078                 datadir sysconfdir sharedstatedir localstatedir includedir \
2079                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2080                 libdir localedir mandir runstatedir
2081 do
2082   eval ac_val=\$$ac_var
2083   # Remove trailing slashes.
2084   case $ac_val in
2085     */ )
2086       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2087       eval $ac_var=\$ac_val;;
2088   esac
2089   # Be sure to have absolute directory names.
2090   case $ac_val in
2091     [\\/$]* | ?:[\\/]* )  continue;;
2092     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2093   esac
2094   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2095 done
2096
2097 # There might be people who depend on the old broken behavior: `$host'
2098 # used to hold the argument of --host etc.
2099 # FIXME: To remove some day.
2100 build=$build_alias
2101 host=$host_alias
2102 target=$target_alias
2103
2104 # FIXME: To remove some day.
2105 if test "x$host_alias" != x; then
2106   if test "x$build_alias" = x; then
2107     cross_compiling=maybe
2108   elif test "x$build_alias" != "x$host_alias"; then
2109     cross_compiling=yes
2110   fi
2111 fi
2112
2113 ac_tool_prefix=
2114 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2115
2116 test "$silent" = yes && exec 6>/dev/null
2117
2118
2119 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2120 ac_ls_di=`ls -di .` &&
2121 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2122   as_fn_error $? "working directory cannot be determined"
2123 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2124   as_fn_error $? "pwd does not report name of working directory"
2125
2126
2127 # Find the source files, if location was not specified.
2128 if test -z "$srcdir"; then
2129   ac_srcdir_defaulted=yes
2130   # Try the directory containing this script, then the parent directory.
2131   ac_confdir=`$as_dirname -- "$as_myself" ||
2132 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2133          X"$as_myself" : 'X\(//\)[^/]' \| \
2134          X"$as_myself" : 'X\(//\)$' \| \
2135          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2136 printf "%s\n" X"$as_myself" |
2137     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2138             s//\1/
2139             q
2140           }
2141           /^X\(\/\/\)[^/].*/{
2142             s//\1/
2143             q
2144           }
2145           /^X\(\/\/\)$/{
2146             s//\1/
2147             q
2148           }
2149           /^X\(\/\).*/{
2150             s//\1/
2151             q
2152           }
2153           s/.*/./; q'`
2154   srcdir=$ac_confdir
2155   if test ! -r "$srcdir/$ac_unique_file"; then
2156     srcdir=..
2157   fi
2158 else
2159   ac_srcdir_defaulted=no
2160 fi
2161 if test ! -r "$srcdir/$ac_unique_file"; then
2162   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2163   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2164 fi
2165 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2166 ac_abs_confdir=`(
2167         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2168         pwd)`
2169 # When building in place, set srcdir=.
2170 if test "$ac_abs_confdir" = "$ac_pwd"; then
2171   srcdir=.
2172 fi
2173 # Remove unnecessary trailing slashes from srcdir.
2174 # Double slashes in file names in object file debugging info
2175 # mess up M-x gdb in Emacs.
2176 case $srcdir in
2177 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2178 esac
2179 for ac_var in $ac_precious_vars; do
2180   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2181   eval ac_env_${ac_var}_value=\$${ac_var}
2182   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2183   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2184 done
2185
2186 #
2187 # Report the --help message.
2188 #
2189 if test "$ac_init_help" = "long"; then
2190   # Omit some internal or obsolete options to make the list less imposing.
2191   # This message is too long to be a string in the A/UX 3.1 sh.
2192   cat <<_ACEOF
2193 \`configure' configures GNU diffutils 3.7 to adapt to many kinds of systems.
2194
2195 Usage: $0 [OPTION]... [VAR=VALUE]...
2196
2197 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2198 VAR=VALUE.  See below for descriptions of some of the useful variables.
2199
2200 Defaults for the options are specified in brackets.
2201
2202 Configuration:
2203   -h, --help              display this help and exit
2204       --help=short        display options specific to this package
2205       --help=recursive    display the short help of all the included packages
2206   -V, --version           display version information and exit
2207   -q, --quiet, --silent   do not print \`checking ...' messages
2208       --cache-file=FILE   cache test results in FILE [disabled]
2209   -C, --config-cache      alias for \`--cache-file=config.cache'
2210   -n, --no-create         do not create output files
2211       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2212
2213 Installation directories:
2214   --prefix=PREFIX         install architecture-independent files in PREFIX
2215                           [$ac_default_prefix]
2216   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2217                           [PREFIX]
2218
2219 By default, \`make install' will install all the files in
2220 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2221 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2222 for instance \`--prefix=\$HOME'.
2223
2224 For better control, use the options below.
2225
2226 Fine tuning of the installation directories:
2227   --bindir=DIR            user executables [EPREFIX/bin]
2228   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2229   --libexecdir=DIR        program executables [EPREFIX/libexec]
2230   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2231   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2232   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2233   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2234   --libdir=DIR            object code libraries [EPREFIX/lib]
2235   --includedir=DIR        C header files [PREFIX/include]
2236   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2237   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2238   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2239   --infodir=DIR           info documentation [DATAROOTDIR/info]
2240   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2241   --mandir=DIR            man documentation [DATAROOTDIR/man]
2242   --docdir=DIR            documentation root [DATAROOTDIR/doc/diffutils]
2243   --htmldir=DIR           html documentation [DOCDIR]
2244   --dvidir=DIR            dvi documentation [DOCDIR]
2245   --pdfdir=DIR            pdf documentation [DOCDIR]
2246   --psdir=DIR             ps documentation [DOCDIR]
2247 _ACEOF
2248
2249   cat <<\_ACEOF
2250
2251 Program names:
2252   --program-prefix=PREFIX            prepend PREFIX to installed program names
2253   --program-suffix=SUFFIX            append SUFFIX to installed program names
2254   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2255
2256 System types:
2257   --build=BUILD     configure for building on BUILD [guessed]
2258   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2259 _ACEOF
2260 fi
2261
2262 if test -n "$ac_init_help"; then
2263   case $ac_init_help in
2264      short | recursive ) echo "Configuration of GNU diffutils 3.7:";;
2265    esac
2266   cat <<\_ACEOF
2267
2268 Optional Features:
2269   --disable-option-checking  ignore unrecognized --enable/--with options
2270   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2271   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2272   --enable-silent-rules   less verbose build output (undo: "make V=1")
2273   --disable-silent-rules  verbose build output (undo: "make V=0")
2274   --enable-dependency-tracking
2275                           do not reject slow dependency extractors
2276   --disable-dependency-tracking
2277                           speeds up one-time build
2278   --disable-largefile     omit support for large files
2279   --disable-rpath         do not hardcode runtime library paths
2280   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2281   --disable-nls           do not use Native Language Support
2282
2283 Optional Packages:
2284   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2285   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2286   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2287   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2288   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2289   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2290   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2291   --without-included-regex
2292                           don't compile regex; this is the default on systems
2293                           with recent-enough versions of the GNU C Library
2294                           (use with caution on other systems).
2295   --with-packager         String identifying the packager of this software
2296   --with-packager-version Packager-specific version information
2297   --with-packager-bug-reports
2298                           Packager info for bug reports (URL/e-mail/...)
2299   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2300   --without-libintl-prefix     don't search for libintl in includedir and libdir
2301
2302 Some influential environment variables:
2303   CC          C compiler command
2304   CFLAGS      C compiler flags
2305   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2306               nonstandard directory <lib dir>
2307   LIBS        libraries to pass to the linker, e.g. -l<library>
2308   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2309               you have headers in a nonstandard directory <include dir>
2310   CPP         C preprocessor
2311
2312 Use these variables to override the choices made by `configure' or to help
2313 it to find libraries and programs with nonstandard names/locations.
2314
2315 Report bugs to <bug-diffutils@gnu.org>.
2316 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2317 General help using GNU software: <https://www.gnu.org/gethelp/>.
2318 _ACEOF
2319 ac_status=$?
2320 fi
2321
2322 if test "$ac_init_help" = "recursive"; then
2323   # If there are subdirs, report their specific --help.
2324   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2325     test -d "$ac_dir" ||
2326       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2327       continue
2328     ac_builddir=.
2329
2330 case "$ac_dir" in
2331 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2332 *)
2333   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2334   # A ".." for each directory in $ac_dir_suffix.
2335   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2336   case $ac_top_builddir_sub in
2337   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2338   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2339   esac ;;
2340 esac
2341 ac_abs_top_builddir=$ac_pwd
2342 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2343 # for backward compatibility:
2344 ac_top_builddir=$ac_top_build_prefix
2345
2346 case $srcdir in
2347   .)  # We are building in place.
2348     ac_srcdir=.
2349     ac_top_srcdir=$ac_top_builddir_sub
2350     ac_abs_top_srcdir=$ac_pwd ;;
2351   [\\/]* | ?:[\\/]* )  # Absolute name.
2352     ac_srcdir=$srcdir$ac_dir_suffix;
2353     ac_top_srcdir=$srcdir
2354     ac_abs_top_srcdir=$srcdir ;;
2355   *) # Relative name.
2356     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2357     ac_top_srcdir=$ac_top_build_prefix$srcdir
2358     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2359 esac
2360 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2361
2362     cd "$ac_dir" || { ac_status=$?; continue; }
2363     # Check for guested configure.
2364     if test -f "$ac_srcdir/configure.gnu"; then
2365       echo &&
2366       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2367     elif test -f "$ac_srcdir/configure"; then
2368       echo &&
2369       $SHELL "$ac_srcdir/configure" --help=recursive
2370     else
2371       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2372     fi || ac_status=$?
2373     cd "$ac_pwd" || { ac_status=$?; break; }
2374   done
2375 fi
2376
2377 test -n "$ac_init_help" && exit $ac_status
2378 if $ac_init_version; then
2379   cat <<\_ACEOF
2380 GNU diffutils configure 3.7
2381 generated by GNU Autoconf 2.69.197-b8fd7
2382
2383 Copyright (C) 2017 Free Software Foundation, Inc.
2384 This configure script is free software; the Free Software Foundation
2385 gives unlimited permission to copy, distribute and modify it.
2386 _ACEOF
2387   exit
2388 fi
2389
2390 ## ------------------------ ##
2391 ## Autoconf initialization. ##
2392 ## ------------------------ ##
2393
2394 # ac_fn_c_try_compile LINENO
2395 # --------------------------
2396 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2397 ac_fn_c_try_compile ()
2398 {
2399   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400   rm -f conftest.$ac_objext
2401   if { { ac_try="$ac_compile"
2402 case "(($ac_try" in
2403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404   *) ac_try_echo=$ac_try;;
2405 esac
2406 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407 printf "%s\n" "$ac_try_echo"; } >&5
2408   (eval "$ac_compile") 2>conftest.err
2409   ac_status=$?
2410   if test -s conftest.err; then
2411     grep -v '^ *+' conftest.err >conftest.er1
2412     cat conftest.er1 >&5
2413     mv -f conftest.er1 conftest.err
2414   fi
2415   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416   test $ac_status = 0; } && {
2417          test -z "$ac_c_werror_flag" ||
2418          test ! -s conftest.err
2419        } && test -s conftest.$ac_objext
2420 then :
2421   ac_retval=0
2422 else
2423   printf "%s\n" "$as_me: failed program was:" >&5
2424 sed 's/^/| /' conftest.$ac_ext >&5
2425
2426         ac_retval=1
2427 fi
2428   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429   as_fn_set_status $ac_retval
2430
2431 } # ac_fn_c_try_compile
2432
2433 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2434 # -------------------------------------------------------
2435 # Tests whether HEADER exists and can be compiled using the include files in
2436 # INCLUDES, setting the cache variable VAR accordingly.
2437 ac_fn_c_check_header_compile ()
2438 {
2439   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2440   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2441 printf %s "checking for $2... " >&6; }
2442 if eval test \${$3+y}
2443 then :
2444   printf %s "(cached) " >&6
2445 else
2446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447 /* end confdefs.h.  */
2448 $4
2449 #include <$2>
2450 _ACEOF
2451 if ac_fn_c_try_compile "$LINENO"
2452 then :
2453   eval "$3=yes"
2454 else
2455   eval "$3=no"
2456 fi
2457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2458 fi
2459 eval ac_res=\$$3
2460                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2461 printf "%s\n" "$ac_res" >&6; }
2462   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463
2464 } # ac_fn_c_check_header_compile
2465
2466 # ac_fn_c_try_cpp LINENO
2467 # ----------------------
2468 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2469 ac_fn_c_try_cpp ()
2470 {
2471   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472   if { { ac_try="$ac_cpp conftest.$ac_ext"
2473 case "(($ac_try" in
2474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475   *) ac_try_echo=$ac_try;;
2476 esac
2477 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478 printf "%s\n" "$ac_try_echo"; } >&5
2479   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2480   ac_status=$?
2481   if test -s conftest.err; then
2482     grep -v '^ *+' conftest.err >conftest.er1
2483     cat conftest.er1 >&5
2484     mv -f conftest.er1 conftest.err
2485   fi
2486   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487   test $ac_status = 0; } > conftest.i && {
2488          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2489          test ! -s conftest.err
2490        }
2491 then :
2492   ac_retval=0
2493 else
2494   printf "%s\n" "$as_me: failed program was:" >&5
2495 sed 's/^/| /' conftest.$ac_ext >&5
2496
2497     ac_retval=1
2498 fi
2499   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500   as_fn_set_status $ac_retval
2501
2502 } # ac_fn_c_try_cpp
2503
2504 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2505 # -------------------------------------------
2506 # Tests whether TYPE exists after having included INCLUDES, setting cache
2507 # variable VAR accordingly.
2508 ac_fn_c_check_type ()
2509 {
2510   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2511   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2512 printf %s "checking for $2... " >&6; }
2513 if eval test \${$3+y}
2514 then :
2515   printf %s "(cached) " >&6
2516 else
2517   eval "$3=no"
2518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519 /* end confdefs.h.  */
2520 $4
2521 int
2522 main (void)
2523 {
2524 if (sizeof ($2))
2525          return 0;
2526   ;
2527   return 0;
2528 }
2529 _ACEOF
2530 if ac_fn_c_try_compile "$LINENO"
2531 then :
2532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533 /* end confdefs.h.  */
2534 $4
2535 int
2536 main (void)
2537 {
2538 if (sizeof (($2)))
2539             return 0;
2540   ;
2541   return 0;
2542 }
2543 _ACEOF
2544 if ac_fn_c_try_compile "$LINENO"
2545 then :
2546
2547 else
2548   eval "$3=yes"
2549 fi
2550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2551 fi
2552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2553 fi
2554 eval ac_res=\$$3
2555                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556 printf "%s\n" "$ac_res" >&6; }
2557   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2558
2559 } # ac_fn_c_check_type
2560
2561 # ac_fn_c_try_link LINENO
2562 # -----------------------
2563 # Try to link conftest.$ac_ext, and return whether this succeeded.
2564 ac_fn_c_try_link ()
2565 {
2566   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567   rm -f conftest.$ac_objext conftest$ac_exeext
2568   if { { ac_try="$ac_link"
2569 case "(($ac_try" in
2570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2571   *) ac_try_echo=$ac_try;;
2572 esac
2573 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2574 printf "%s\n" "$ac_try_echo"; } >&5
2575   (eval "$ac_link") 2>conftest.err
2576   ac_status=$?
2577   if test -s conftest.err; then
2578     grep -v '^ *+' conftest.err >conftest.er1
2579     cat conftest.er1 >&5
2580     mv -f conftest.er1 conftest.err
2581   fi
2582   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2583   test $ac_status = 0; } && {
2584          test -z "$ac_c_werror_flag" ||
2585          test ! -s conftest.err
2586        } && test -s conftest$ac_exeext && {
2587          test "$cross_compiling" = yes ||
2588          test -x conftest$ac_exeext
2589        }
2590 then :
2591   ac_retval=0
2592 else
2593   printf "%s\n" "$as_me: failed program was:" >&5
2594 sed 's/^/| /' conftest.$ac_ext >&5
2595
2596         ac_retval=1
2597 fi
2598   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2599   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2600   # interfere with the next link command; also delete a directory that is
2601   # left behind by Apple's compiler.  We do this before executing the actions.
2602   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2603   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2604   as_fn_set_status $ac_retval
2605
2606 } # ac_fn_c_try_link
2607
2608 # ac_fn_c_check_func LINENO FUNC VAR
2609 # ----------------------------------
2610 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2611 ac_fn_c_check_func ()
2612 {
2613   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2614   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615 printf %s "checking for $2... " >&6; }
2616 if eval test \${$3+y}
2617 then :
2618   printf %s "(cached) " >&6
2619 else
2620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621 /* end confdefs.h.  */
2622 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2623    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2624 #define $2 innocuous_$2
2625
2626 /* System header to define __stub macros and hopefully few prototypes,
2627    which can conflict with char $2 (); below.  */
2628
2629 #include <limits.h>
2630 #undef $2
2631
2632 /* Override any GCC internal prototype to avoid an error.
2633    Use char because int might match the return type of a GCC
2634    builtin and then its argument prototype would still apply.  */
2635 #ifdef __cplusplus
2636 extern "C"
2637 #endif
2638 char $2 ();
2639 /* The GNU C library defines this for functions which it implements
2640     to always fail with ENOSYS.  Some functions are actually named
2641     something starting with __ and the normal name is an alias.  */
2642 #if defined __stub_$2 || defined __stub___$2
2643 choke me
2644 #endif
2645
2646 int
2647 main (void)
2648 {
2649 return $2 ();
2650   ;
2651   return 0;
2652 }
2653 _ACEOF
2654 if ac_fn_c_try_link "$LINENO"
2655 then :
2656   eval "$3=yes"
2657 else
2658   eval "$3=no"
2659 fi
2660 rm -f core conftest.err conftest.$ac_objext \
2661     conftest$ac_exeext conftest.$ac_ext
2662 fi
2663 eval ac_res=\$$3
2664                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2665 printf "%s\n" "$ac_res" >&6; }
2666   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2667
2668 } # ac_fn_c_check_func
2669
2670 # ac_fn_c_try_run LINENO
2671 # ----------------------
2672 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2673 # executables *can* be run.
2674 ac_fn_c_try_run ()
2675 {
2676   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2677   if { { ac_try="$ac_link"
2678 case "(($ac_try" in
2679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2680   *) ac_try_echo=$ac_try;;
2681 esac
2682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2683 printf "%s\n" "$ac_try_echo"; } >&5
2684   (eval "$ac_link") 2>&5
2685   ac_status=$?
2686   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2687   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2688   { { case "(($ac_try" in
2689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690   *) ac_try_echo=$ac_try;;
2691 esac
2692 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693 printf "%s\n" "$ac_try_echo"; } >&5
2694   (eval "$ac_try") 2>&5
2695   ac_status=$?
2696   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697   test $ac_status = 0; }; }
2698 then :
2699   ac_retval=0
2700 else
2701   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2702        printf "%s\n" "$as_me: failed program was:" >&5
2703 sed 's/^/| /' conftest.$ac_ext >&5
2704
2705        ac_retval=$ac_status
2706 fi
2707   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2708   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2709   as_fn_set_status $ac_retval
2710
2711 } # ac_fn_c_try_run
2712
2713 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2714 # ---------------------------------------------
2715 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2716 # accordingly.
2717 ac_fn_c_check_decl ()
2718 {
2719   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2720   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2721       as_decl_name=`echo $2|sed 's/ *(.*//'`
2722   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2723   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2724 printf %s "checking whether $as_decl_name is declared... " >&6; }
2725 if eval test \${$3+y}
2726 then :
2727   printf %s "(cached) " >&6
2728 else
2729   ac_save_werror_flag=$ac_c_werror_flag
2730   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2732 /* end confdefs.h.  */
2733 $4
2734 int
2735 main (void)
2736 {
2737 #ifndef $as_decl_name
2738 #ifdef __cplusplus
2739   (void) $as_decl_use;
2740 #else
2741   (void) $as_decl_name;
2742 #endif
2743 #endif
2744
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 if ac_fn_c_try_compile "$LINENO"
2750 then :
2751   eval "$3=yes"
2752 else
2753   eval "$3=no"
2754 fi
2755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2756   ac_c_werror_flag=$ac_save_werror_flag
2757 fi
2758 eval ac_res=\$$3
2759                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760 printf "%s\n" "$ac_res" >&6; }
2761   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762
2763 } # ac_fn_c_check_decl
2764
2765 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2766 # --------------------------------------------
2767 # Tries to find the compile-time value of EXPR in a program that includes
2768 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2769 # computed
2770 ac_fn_c_compute_int ()
2771 {
2772   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2773   if test "$cross_compiling" = yes; then
2774     # Depending upon the size, compute the lo and hi bounds.
2775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776 /* end confdefs.h.  */
2777 $4
2778 int
2779 main (void)
2780 {
2781 static int test_array [1 - 2 * !(($2) >= 0)];
2782 test_array [0] = 0;
2783 return test_array [0];
2784
2785   ;
2786   return 0;
2787 }
2788 _ACEOF
2789 if ac_fn_c_try_compile "$LINENO"
2790 then :
2791   ac_lo=0 ac_mid=0
2792   while :; do
2793     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h.  */
2795 $4
2796 int
2797 main (void)
2798 {
2799 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2800 test_array [0] = 0;
2801 return test_array [0];
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 if ac_fn_c_try_compile "$LINENO"
2808 then :
2809   ac_hi=$ac_mid; break
2810 else
2811   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2812                         if test $ac_lo -le $ac_mid; then
2813                           ac_lo= ac_hi=
2814                           break
2815                         fi
2816                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2817 fi
2818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2819   done
2820 else
2821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822 /* end confdefs.h.  */
2823 $4
2824 int
2825 main (void)
2826 {
2827 static int test_array [1 - 2 * !(($2) < 0)];
2828 test_array [0] = 0;
2829 return test_array [0];
2830
2831   ;
2832   return 0;
2833 }
2834 _ACEOF
2835 if ac_fn_c_try_compile "$LINENO"
2836 then :
2837   ac_hi=-1 ac_mid=-1
2838   while :; do
2839     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h.  */
2841 $4
2842 int
2843 main (void)
2844 {
2845 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2846 test_array [0] = 0;
2847 return test_array [0];
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 if ac_fn_c_try_compile "$LINENO"
2854 then :
2855   ac_lo=$ac_mid; break
2856 else
2857   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858                         if test $ac_mid -le $ac_hi; then
2859                           ac_lo= ac_hi=
2860                           break
2861                         fi
2862                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863 fi
2864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865   done
2866 else
2867   ac_lo= ac_hi=
2868 fi
2869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870 fi
2871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872 # Binary search between lo and hi bounds.
2873 while test "x$ac_lo" != "x$ac_hi"; do
2874   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h.  */
2877 $4
2878 int
2879 main (void)
2880 {
2881 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882 test_array [0] = 0;
2883 return test_array [0];
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 if ac_fn_c_try_compile "$LINENO"
2890 then :
2891   ac_hi=$ac_mid
2892 else
2893   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2894 fi
2895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2896 done
2897 case $ac_lo in #((
2898 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2899 '') ac_retval=1 ;;
2900 esac
2901   else
2902     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h.  */
2904 $4
2905 static long int longval () { return $2; }
2906 static unsigned long int ulongval () { return $2; }
2907 #include <stdio.h>
2908 #include <stdlib.h>
2909 int
2910 main (void)
2911 {
2912
2913   FILE *f = fopen ("conftest.val", "w");
2914   if (! f)
2915     return 1;
2916   if (($2) < 0)
2917     {
2918       long int i = longval ();
2919       if (i != ($2))
2920         return 1;
2921       fprintf (f, "%ld", i);
2922     }
2923   else
2924     {
2925       unsigned long int i = ulongval ();
2926       if (i != ($2))
2927         return 1;
2928       fprintf (f, "%lu", i);
2929     }
2930   /* Do not output a trailing newline, as this causes \r\n confusion
2931      on some platforms.  */
2932   return ferror (f) || fclose (f) != 0;
2933
2934   ;
2935   return 0;
2936 }
2937 _ACEOF
2938 if ac_fn_c_try_run "$LINENO"
2939 then :
2940   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2941 else
2942   ac_retval=1
2943 fi
2944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2945   conftest.$ac_objext conftest.beam conftest.$ac_ext
2946 rm -f conftest.val
2947
2948   fi
2949   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2950   as_fn_set_status $ac_retval
2951
2952 } # ac_fn_c_compute_int
2953
2954 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2955 # ----------------------------------------------------
2956 # Tries to find if the field MEMBER exists in type AGGR, after including
2957 # INCLUDES, setting cache variable VAR accordingly.
2958 ac_fn_c_check_member ()
2959 {
2960   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2961   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2962 printf %s "checking for $2.$3... " >&6; }
2963 if eval test \${$4+y}
2964 then :
2965   printf %s "(cached) " >&6
2966 else
2967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2968 /* end confdefs.h.  */
2969 $5
2970 int
2971 main (void)
2972 {
2973 static $2 ac_aggr;
2974 if (ac_aggr.$3)
2975 return 0;
2976   ;
2977   return 0;
2978 }
2979 _ACEOF
2980 if ac_fn_c_try_compile "$LINENO"
2981 then :
2982   eval "$4=yes"
2983 else
2984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985 /* end confdefs.h.  */
2986 $5
2987 int
2988 main (void)
2989 {
2990 static $2 ac_aggr;
2991 if (sizeof ac_aggr.$3)
2992 return 0;
2993   ;
2994   return 0;
2995 }
2996 _ACEOF
2997 if ac_fn_c_try_compile "$LINENO"
2998 then :
2999   eval "$4=yes"
3000 else
3001   eval "$4=no"
3002 fi
3003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3004 fi
3005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006 fi
3007 eval ac_res=\$$4
3008                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3009 printf "%s\n" "$ac_res" >&6; }
3010   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3011
3012 } # ac_fn_c_check_member
3013 ac_configure_args_raw=
3014 for ac_arg
3015 do
3016   case $ac_arg in
3017   *\'*)
3018     ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3019   esac
3020   as_fn_append ac_configure_args_raw " '$ac_arg'"
3021 done
3022
3023 case $ac_configure_args_raw in
3024   *$as_nl*)
3025     ac_safe_unquote= ;;
3026   *)
3027     ac_unsafe_z='|&;<>()$`\\"*?[ ''     ' # This string ends in space, tab.
3028     ac_unsafe_a="$ac_unsafe_z#~"
3029     ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3030     ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3031 esac
3032
3033 cat >config.log <<_ACEOF
3034 This file contains any messages produced by compilers while
3035 running configure, to aid debugging if configure makes a mistake.
3036
3037 It was created by GNU diffutils $as_me 3.7, which was
3038 generated by GNU Autoconf 2.69.197-b8fd7.  Invocation command line was
3039
3040   $ $0$ac_configure_args_raw
3041
3042 _ACEOF
3043 exec 5>>config.log
3044 {
3045 cat <<_ASUNAME
3046 ## --------- ##
3047 ## Platform. ##
3048 ## --------- ##
3049
3050 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3051 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3052 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3053 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3054 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3055
3056 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3057 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3058
3059 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3060 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3061 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3062 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3063 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3064 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3065 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3066
3067 _ASUNAME
3068
3069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3070 for as_dir in $PATH
3071 do
3072   IFS=$as_save_IFS
3073   case $as_dir in #(((
3074     '') as_dir=./ ;;
3075     */) ;;
3076     *) as_dir=$as_dir/ ;;
3077   esac
3078     printf "%s\n" "PATH: $as_dir"
3079   done
3080 IFS=$as_save_IFS
3081
3082 } >&5
3083
3084 cat >&5 <<_ACEOF
3085
3086
3087 ## ----------- ##
3088 ## Core tests. ##
3089 ## ----------- ##
3090
3091 _ACEOF
3092
3093
3094 # Keep a trace of the command line.
3095 # Strip out --no-create and --no-recursion so they do not pile up.
3096 # Strip out --silent because we don't want to record it for future runs.
3097 # Also quote any args containing shell meta-characters.
3098 # Make two passes to allow for proper duplicate-argument suppression.
3099 ac_configure_args=
3100 ac_configure_args0=
3101 ac_configure_args1=
3102 ac_must_keep_next=false
3103 for ac_pass in 1 2
3104 do
3105   for ac_arg
3106   do
3107     case $ac_arg in
3108     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3109     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3110     | -silent | --silent | --silen | --sile | --sil)
3111       continue ;;
3112     *\'*)
3113       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3114     esac
3115     case $ac_pass in
3116     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3117     2)
3118       as_fn_append ac_configure_args1 " '$ac_arg'"
3119       if test $ac_must_keep_next = true; then
3120         ac_must_keep_next=false # Got value, back to normal.
3121       else
3122         case $ac_arg in
3123           *=* | --config-cache | -C | -disable-* | --disable-* \
3124           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3125           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3126           | -with-* | --with-* | -without-* | --without-* | --x)
3127             case "$ac_configure_args0 " in
3128               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3129             esac
3130             ;;
3131           -* ) ac_must_keep_next=true ;;
3132         esac
3133       fi
3134       as_fn_append ac_configure_args " '$ac_arg'"
3135       ;;
3136     esac
3137   done
3138 done
3139 { ac_configure_args0=; unset ac_configure_args0;}
3140 { ac_configure_args1=; unset ac_configure_args1;}
3141
3142 # When interrupted or exit'd, cleanup temporary files, and complete
3143 # config.log.  We remove comments because anyway the quotes in there
3144 # would cause problems or look ugly.
3145 # WARNING: Use '\'' to represent an apostrophe within the trap.
3146 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3147 trap 'exit_status=$?
3148   # Sanitize IFS.
3149   IFS=" ""      $as_nl"
3150   # Save into config.log some information that might help in debugging.
3151   {
3152     echo
3153
3154     printf "%s\n" "## ---------------- ##
3155 ## Cache variables. ##
3156 ## ---------------- ##"
3157     echo
3158     # The following way of writing the cache mishandles newlines in values,
3159 (
3160   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3161     eval ac_val=\$$ac_var
3162     case $ac_val in #(
3163     *${as_nl}*)
3164       case $ac_var in #(
3165       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3166 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3167       esac
3168       case $ac_var in #(
3169       _ | IFS | as_nl) ;; #(
3170       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3171       *) { eval $ac_var=; unset $ac_var;} ;;
3172       esac ;;
3173     esac
3174   done
3175   (set) 2>&1 |
3176     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3177     *${as_nl}ac_space=\ *)
3178       sed -n \
3179         "s/'\''/'\''\\\\'\'''\''/g;
3180           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3181       ;; #(
3182     *)
3183       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3184       ;;
3185     esac |
3186     sort
3187 )
3188     echo
3189
3190     printf "%s\n" "## ----------------- ##
3191 ## Output variables. ##
3192 ## ----------------- ##"
3193     echo
3194     for ac_var in $ac_subst_vars
3195     do
3196       eval ac_val=\$$ac_var
3197       case $ac_val in
3198       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3199       esac
3200       printf "%s\n" "$ac_var='\''$ac_val'\''"
3201     done | sort
3202     echo
3203
3204     if test -n "$ac_subst_files"; then
3205       printf "%s\n" "## ------------------- ##
3206 ## File substitutions. ##
3207 ## ------------------- ##"
3208       echo
3209       for ac_var in $ac_subst_files
3210       do
3211         eval ac_val=\$$ac_var
3212         case $ac_val in
3213         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3214         esac
3215         printf "%s\n" "$ac_var='\''$ac_val'\''"
3216       done | sort
3217       echo
3218     fi
3219
3220     if test -s confdefs.h; then
3221       printf "%s\n" "## ----------- ##
3222 ## confdefs.h. ##
3223 ## ----------- ##"
3224       echo
3225       cat confdefs.h
3226       echo
3227     fi
3228     test "$ac_signal" != 0 &&
3229       printf "%s\n" "$as_me: caught signal $ac_signal"
3230     printf "%s\n" "$as_me: exit $exit_status"
3231   } >&5
3232   rm -f core *.core core.conftest.* &&
3233     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3234     exit $exit_status
3235 ' 0
3236 for ac_signal in 1 2 13 15; do
3237   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3238 done
3239 ac_signal=0
3240
3241 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3242 rm -f -r conftest* confdefs.h
3243
3244 printf "%s\n" "/* confdefs.h */" > confdefs.h
3245
3246 # Predefined preprocessor variables.
3247
3248 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3249
3250 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3251
3252 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3253
3254 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3255
3256 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3257
3258 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3259
3260
3261 # Let the site file select an alternate cache file if it wants to.
3262 # Prefer an explicitly selected file to automatically selected ones.
3263 ac_site_file1=NONE
3264 ac_site_file2=NONE
3265 if test -n "$CONFIG_SITE"; then
3266   # We do not want a PATH search for config.site.
3267   case $CONFIG_SITE in #((
3268     -*)  ac_site_file1=./$CONFIG_SITE;;
3269     */*) ac_site_file1=$CONFIG_SITE;;
3270     *)   ac_site_file1=./$CONFIG_SITE;;
3271   esac
3272 elif test "x$prefix" != xNONE; then
3273   ac_site_file1=$prefix/share/config.site
3274   ac_site_file2=$prefix/etc/config.site
3275 else
3276   ac_site_file1=$ac_default_prefix/share/config.site
3277   ac_site_file2=$ac_default_prefix/etc/config.site
3278 fi
3279 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3280 do
3281   test "x$ac_site_file" = xNONE && continue
3282   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3283     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3284 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3285     sed 's/^/| /' "$ac_site_file" >&5
3286     . "$ac_site_file" \
3287       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3288 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3289 as_fn_error $? "failed to load site script $ac_site_file
3290 See \`config.log' for more details" "$LINENO" 5; }
3291   fi
3292 done
3293
3294 if test -r "$cache_file"; then
3295   # Some versions of bash will fail to source /dev/null (special files
3296   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3297   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3298     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3299 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3300     case $cache_file in
3301       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3302       *)                      . "./$cache_file";;
3303     esac
3304   fi
3305 else
3306   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3307 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3308   >$cache_file
3309 fi
3310
3311 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3312 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3313 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3314 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3315 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3316 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3317 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
3318 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
3319 as_fn_append ac_header_c_list " ucontext.h ucontext_h HAVE_UCONTEXT_H"
3320 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
3321 as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT"
3322 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3323 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3324 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
3325 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3326 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3327 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3328 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
3329 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
3330 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
3331 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
3332 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
3333 as_fn_append ac_func_c_list " wmemchr HAVE_WMEMCHR"
3334 as_fn_append ac_func_c_list " wmemcpy HAVE_WMEMCPY"
3335 as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
3336 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
3337 gl_fnmatch_required=GNU
3338 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3339 gl_getopt_required=GNU
3340 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3341 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3342 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3343 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3344 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3345 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3346 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
3347 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3348 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3349 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
3350 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
3351 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
3352 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
3353 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
3354 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
3355 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
3356 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
3357 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
3358 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
3359 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
3360 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
3361 as_fn_append ac_func_c_list " tzset HAVE_TZSET"
3362 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
3363 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
3364 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
3365 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
3366 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
3367 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
3368 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
3369 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
3370 as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
3371 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
3372 as_fn_append ac_func_c_list " strtoumax HAVE_STRTOUMAX"
3373 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
3374 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
3375 as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
3376 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
3377 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
3378 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3379 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
3380 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
3381 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
3382 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
3383 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
3384 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
3385 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
3386 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
3387 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
3388 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
3389 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
3390 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
3391 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
3392 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
3393 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
3394 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
3395 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
3396 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
3397 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3398 as_fn_append ac_func_c_list " fork HAVE_FORK"
3399 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3400 gt_needs="$gt_needs need-ngettext"
3401 # Check that the precious variables saved in the cache have kept the same
3402 # value.
3403 ac_cache_corrupted=false
3404 for ac_var in $ac_precious_vars; do
3405   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3406   eval ac_new_set=\$ac_env_${ac_var}_set
3407   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3408   eval ac_new_val=\$ac_env_${ac_var}_value
3409   case $ac_old_set,$ac_new_set in
3410     set,)
3411       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3412 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3413       ac_cache_corrupted=: ;;
3414     ,set)
3415       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3416 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3417       ac_cache_corrupted=: ;;
3418     ,);;
3419     *)
3420       if test "x$ac_old_val" != "x$ac_new_val"; then
3421         # differences in whitespace do not lead to failure.
3422         ac_old_val_w=`echo x $ac_old_val`
3423         ac_new_val_w=`echo x $ac_new_val`
3424         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3425           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3426 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3427           ac_cache_corrupted=:
3428         else
3429           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3430 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3431           eval $ac_var=\$ac_old_val
3432         fi
3433         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3434 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3435         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3436 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3437       fi;;
3438   esac
3439   # Pass precious variables to config.status.
3440   if test "$ac_new_set" = set; then
3441     case $ac_new_val in
3442     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3443     *) ac_arg=$ac_var=$ac_new_val ;;
3444     esac
3445     case " $ac_configure_args " in
3446       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3447       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3448     esac
3449   fi
3450 done
3451 if $ac_cache_corrupted; then
3452   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3453 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3454   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3455 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3456   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3457 fi
3458 ## -------------------- ##
3459 ## Main body of script. ##
3460 ## -------------------- ##
3461
3462 ac_ext=c
3463 ac_cpp='$CPP $CPPFLAGS'
3464 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3465 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3466 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3467
3468
3469
3470
3471 ac_aux_dir=
3472 for ac_dir in build-aux "$srcdir"/build-aux
3473 do
3474   if test -f "$ac_dir/install-sh"; then
3475     ac_aux_dir=$ac_dir
3476     ac_install_sh="$ac_aux_dir/install-sh -c"
3477     break
3478   elif test -f "$ac_dir/install.sh"; then
3479     ac_aux_dir=$ac_dir
3480     ac_install_sh="$ac_aux_dir/install.sh -c"
3481     break
3482   elif test -f "$ac_dir/shtool"; then
3483     ac_aux_dir=$ac_dir
3484     ac_install_sh="$ac_aux_dir/shtool install -c"
3485     break
3486   fi
3487 done
3488 if test -z "$ac_aux_dir"; then
3489   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3490 fi
3491
3492 # These three variables are undocumented and unsupported,
3493 # and are intended to be withdrawn in a future Autoconf release.
3494 # They can cause serious problems if a builder's source tree is in a directory
3495 # whose full name contains unusual characters.
3496 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3497 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3498 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3499
3500
3501
3502
3503 am__api_version='1.16'
3504
3505 # Find a good install program.  We prefer a C program (faster),
3506 # so one script is as good as another.  But avoid the broken or
3507 # incompatible versions:
3508 # SysV /etc/install, /usr/sbin/install
3509 # SunOS /usr/etc/install
3510 # IRIX /sbin/install
3511 # AIX /bin/install
3512 # AmigaOS /C/install, which installs bootblocks on floppy discs
3513 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3514 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3515 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3516 # OS/2's system install, which has a completely different semantic
3517 # ./install, which can be erroneously created by make from ./install.sh.
3518 # Reject install programs that cannot install multiple files.
3519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3520 printf %s "checking for a BSD-compatible install... " >&6; }
3521 if test -z "$INSTALL"; then
3522 if test ${ac_cv_path_install+y}
3523 then :
3524   printf %s "(cached) " >&6
3525 else
3526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3527 for as_dir in $PATH
3528 do
3529   IFS=$as_save_IFS
3530   case $as_dir in #(((
3531     '') as_dir=./ ;;
3532     */) ;;
3533     *) as_dir=$as_dir/ ;;
3534   esac
3535     # Account for fact that we put trailing slashes in our PATH walk.
3536 case $as_dir in #((
3537   ./ | /[cC]/* | \
3538   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3539   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3540   /usr/ucb/* ) ;;
3541   *)
3542     # OSF1 and SCO ODT 3.0 have their own names for install.
3543     # Don't use installbsd from OSF since it installs stuff as root
3544     # by default.
3545     for ac_prog in ginstall scoinst install; do
3546       for ac_exec_ext in '' $ac_executable_extensions; do
3547         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3548           if test $ac_prog = install &&
3549             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3550             # AIX install.  It has an incompatible calling convention.
3551             :
3552           elif test $ac_prog = install &&
3553             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3554             # program-specific install script used by HP pwplus--don't use.
3555             :
3556           else
3557             rm -rf conftest.one conftest.two conftest.dir
3558             echo one > conftest.one
3559             echo two > conftest.two
3560             mkdir conftest.dir
3561             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3562               test -s conftest.one && test -s conftest.two &&
3563               test -s conftest.dir/conftest.one &&
3564               test -s conftest.dir/conftest.two
3565             then
3566               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3567               break 3
3568             fi
3569           fi
3570         fi
3571       done
3572     done
3573     ;;
3574 esac
3575
3576   done
3577 IFS=$as_save_IFS
3578
3579 rm -rf conftest.one conftest.two conftest.dir
3580
3581 fi
3582   if test ${ac_cv_path_install+y}; then
3583     INSTALL=$ac_cv_path_install
3584   else
3585     # As a last resort, use the slow shell script.  Don't cache a
3586     # value for INSTALL within a source directory, because that will
3587     # break other packages using the cache if that directory is
3588     # removed, or if the value is a relative name.
3589     INSTALL=$ac_install_sh
3590   fi
3591 fi
3592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3593 printf "%s\n" "$INSTALL" >&6; }
3594
3595 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3596 # It thinks the first close brace ends the variable substitution.
3597 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3598
3599 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3600
3601 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3602
3603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3604 printf %s "checking whether build environment is sane... " >&6; }
3605 # Reject unsafe characters in $srcdir or the absolute working directory
3606 # name.  Accept space and tab only in the latter.
3607 am_lf='
3608 '
3609 case `pwd` in
3610   *[\\\"\#\$\&\'\`$am_lf]*)
3611     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3612 esac
3613 case $srcdir in
3614   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3615     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3616 esac
3617
3618 # Do 'set' in a subshell so we don't clobber the current shell's
3619 # arguments.  Must try -L first in case configure is actually a
3620 # symlink; some systems play weird games with the mod time of symlinks
3621 # (eg FreeBSD returns the mod time of the symlink's containing
3622 # directory).
3623 if (
3624    am_has_slept=no
3625    for am_try in 1 2; do
3626      echo "timestamp, slept: $am_has_slept" > conftest.file
3627      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3628      if test "$*" = "X"; then
3629         # -L didn't work.
3630         set X `ls -t "$srcdir/configure" conftest.file`
3631      fi
3632      if test "$*" != "X $srcdir/configure conftest.file" \
3633         && test "$*" != "X conftest.file $srcdir/configure"; then
3634
3635         # If neither matched, then we have a broken ls.  This can happen
3636         # if, for instance, CONFIG_SHELL is bash and it inherits a
3637         # broken ls alias from the environment.  This has actually
3638         # happened.  Such a system could not be considered "sane".
3639         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3640   alias in your environment" "$LINENO" 5
3641      fi
3642      if test "$2" = conftest.file || test $am_try -eq 2; then
3643        break
3644      fi
3645      # Just in case.
3646      sleep 1
3647      am_has_slept=yes
3648    done
3649    test "$2" = conftest.file
3650    )
3651 then
3652    # Ok.
3653    :
3654 else
3655    as_fn_error $? "newly created file is older than distributed files!
3656 Check your system clock" "$LINENO" 5
3657 fi
3658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3659 printf "%s\n" "yes" >&6; }
3660 # If we didn't sleep, we still need to ensure time stamps of config.status and
3661 # generated files are strictly newer.
3662 am_sleep_pid=
3663 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3664   ( sleep 1 ) &
3665   am_sleep_pid=$!
3666 fi
3667
3668 rm -f conftest.file
3669
3670 test "$program_prefix" != NONE &&
3671   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3672 # Use a double $ so make ignores it.
3673 test "$program_suffix" != NONE &&
3674   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3675 # Double any \ or $.
3676 # By default was `s,x,x', remove it if useless.
3677 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3678 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3679
3680 # Expand $ac_aux_dir to an absolute path.
3681 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3682
3683 if test x"${MISSING+set}" != xset; then
3684   case $am_aux_dir in
3685   *\ * | *\     *)
3686     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3687   *)
3688     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3689   esac
3690 fi
3691 # Use eval to expand $SHELL
3692 if eval "$MISSING --is-lightweight"; then
3693   am_missing_run="$MISSING "
3694 else
3695   am_missing_run=
3696   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3697 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3698 fi
3699
3700 if test x"${install_sh+set}" != xset; then
3701   case $am_aux_dir in
3702   *\ * | *\     *)
3703     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3704   *)
3705     install_sh="\${SHELL} $am_aux_dir/install-sh"
3706   esac
3707 fi
3708
3709 # Installed binaries are usually stripped using 'strip' when the user
3710 # run "make install-strip".  However 'strip' might not be the right
3711 # tool to use in cross-compilation environments, therefore Automake
3712 # will honor the 'STRIP' environment variable to overrule this program.
3713 if test "$cross_compiling" != no; then
3714   if test -n "$ac_tool_prefix"; then
3715   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3716 set dummy ${ac_tool_prefix}strip; ac_word=$2
3717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718 printf %s "checking for $ac_word... " >&6; }
3719 if test ${ac_cv_prog_STRIP+y}
3720 then :
3721   printf %s "(cached) " >&6
3722 else
3723   if test -n "$STRIP"; then
3724   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3725 else
3726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727 for as_dir in $PATH
3728 do
3729   IFS=$as_save_IFS
3730   case $as_dir in #(((
3731     '') as_dir=./ ;;
3732     */) ;;
3733     *) as_dir=$as_dir/ ;;
3734   esac
3735     for ac_exec_ext in '' $ac_executable_extensions; do
3736   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3737     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3738     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3739     break 2
3740   fi
3741 done
3742   done
3743 IFS=$as_save_IFS
3744
3745 fi
3746 fi
3747 STRIP=$ac_cv_prog_STRIP
3748 if test -n "$STRIP"; then
3749   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3750 printf "%s\n" "$STRIP" >&6; }
3751 else
3752   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753 printf "%s\n" "no" >&6; }
3754 fi
3755
3756
3757 fi
3758 if test -z "$ac_cv_prog_STRIP"; then
3759   ac_ct_STRIP=$STRIP
3760   # Extract the first word of "strip", so it can be a program name with args.
3761 set dummy strip; ac_word=$2
3762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763 printf %s "checking for $ac_word... " >&6; }
3764 if test ${ac_cv_prog_ac_ct_STRIP+y}
3765 then :
3766   printf %s "(cached) " >&6
3767 else
3768   if test -n "$ac_ct_STRIP"; then
3769   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3770 else
3771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3772 for as_dir in $PATH
3773 do
3774   IFS=$as_save_IFS
3775   case $as_dir in #(((
3776     '') as_dir=./ ;;
3777     */) ;;
3778     *) as_dir=$as_dir/ ;;
3779   esac
3780     for ac_exec_ext in '' $ac_executable_extensions; do
3781   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3782     ac_cv_prog_ac_ct_STRIP="strip"
3783     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3784     break 2
3785   fi
3786 done
3787   done
3788 IFS=$as_save_IFS
3789
3790 fi
3791 fi
3792 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3793 if test -n "$ac_ct_STRIP"; then
3794   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3795 printf "%s\n" "$ac_ct_STRIP" >&6; }
3796 else
3797   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798 printf "%s\n" "no" >&6; }
3799 fi
3800
3801   if test "x$ac_ct_STRIP" = x; then
3802     STRIP=":"
3803   else
3804     case $cross_compiling:$ac_tool_warned in
3805 yes:)
3806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3807 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3808 ac_tool_warned=yes ;;
3809 esac
3810     STRIP=$ac_ct_STRIP
3811   fi
3812 else
3813   STRIP="$ac_cv_prog_STRIP"
3814 fi
3815
3816 fi
3817 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3818
3819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3820 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3821 if test -z "$MKDIR_P"; then
3822   if test ${ac_cv_path_mkdir+y}
3823 then :
3824   printf %s "(cached) " >&6
3825 else
3826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3828 do
3829   IFS=$as_save_IFS
3830   case $as_dir in #(((
3831     '') as_dir=./ ;;
3832     */) ;;
3833     *) as_dir=$as_dir/ ;;
3834   esac
3835     for ac_prog in mkdir gmkdir; do
3836          for ac_exec_ext in '' $ac_executable_extensions; do
3837            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3838            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3839              'mkdir ('*'coreutils) '* | \
3840              'BusyBox '* | \
3841              'mkdir (fileutils) '4.1*)
3842                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3843                break 3;;
3844            esac
3845          done
3846        done
3847   done
3848 IFS=$as_save_IFS
3849
3850 fi
3851
3852   test -d ./--version && rmdir ./--version
3853   if test ${ac_cv_path_mkdir+y}; then
3854     MKDIR_P="$ac_cv_path_mkdir -p"
3855   else
3856     # As a last resort, use the slow shell script.  Don't cache a
3857     # value for MKDIR_P within a source directory, because that will
3858     # break other packages using the cache if that directory is
3859     # removed, or if the value is a relative name.
3860     MKDIR_P="$ac_install_sh -d"
3861   fi
3862 fi
3863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3864 printf "%s\n" "$MKDIR_P" >&6; }
3865
3866 for ac_prog in gawk mawk nawk awk
3867 do
3868   # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 printf %s "checking for $ac_word... " >&6; }
3872 if test ${ac_cv_prog_AWK+y}
3873 then :
3874   printf %s "(cached) " >&6
3875 else
3876   if test -n "$AWK"; then
3877   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3878 else
3879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3880 for as_dir in $PATH
3881 do
3882   IFS=$as_save_IFS
3883   case $as_dir in #(((
3884     '') as_dir=./ ;;
3885     */) ;;
3886     *) as_dir=$as_dir/ ;;
3887   esac
3888     for ac_exec_ext in '' $ac_executable_extensions; do
3889   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3890     ac_cv_prog_AWK="$ac_prog"
3891     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3892     break 2
3893   fi
3894 done
3895   done
3896 IFS=$as_save_IFS
3897
3898 fi
3899 fi
3900 AWK=$ac_cv_prog_AWK
3901 if test -n "$AWK"; then
3902   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3903 printf "%s\n" "$AWK" >&6; }
3904 else
3905   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906 printf "%s\n" "no" >&6; }
3907 fi
3908
3909
3910   test -n "$AWK" && break
3911 done
3912
3913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3914 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3915 set x ${MAKE-make}
3916 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3917 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3918 then :
3919   printf %s "(cached) " >&6
3920 else
3921   cat >conftest.make <<\_ACEOF
3922 SHELL = /bin/sh
3923 all:
3924         @echo '@@@%%%=$(MAKE)=@@@%%%'
3925 _ACEOF
3926 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3927 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3928   *@@@%%%=?*=@@@%%%*)
3929     eval ac_cv_prog_make_${ac_make}_set=yes;;
3930   *)
3931     eval ac_cv_prog_make_${ac_make}_set=no;;
3932 esac
3933 rm -f conftest.make
3934 fi
3935 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3936   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3937 printf "%s\n" "yes" >&6; }
3938   SET_MAKE=
3939 else
3940   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 printf "%s\n" "no" >&6; }
3942   SET_MAKE="MAKE=${MAKE-make}"
3943 fi
3944
3945 rm -rf .tst 2>/dev/null
3946 mkdir .tst 2>/dev/null
3947 if test -d .tst; then
3948   am__leading_dot=.
3949 else
3950   am__leading_dot=_
3951 fi
3952 rmdir .tst 2>/dev/null
3953
3954 # Check whether --enable-silent-rules was given.
3955 if test ${enable_silent_rules+y}
3956 then :
3957   enableval=$enable_silent_rules;
3958 fi
3959
3960 case $enable_silent_rules in # (((
3961   yes) AM_DEFAULT_VERBOSITY=0;;
3962    no) AM_DEFAULT_VERBOSITY=1;;
3963     *) AM_DEFAULT_VERBOSITY=1;;
3964 esac
3965 am_make=${MAKE-make}
3966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3967 printf %s "checking whether $am_make supports nested variables... " >&6; }
3968 if test ${am_cv_make_support_nested_variables+y}
3969 then :
3970   printf %s "(cached) " >&6
3971 else
3972   if printf "%s\n" 'TRUE=$(BAR$(V))
3973 BAR0=false
3974 BAR1=true
3975 V=1
3976 am__doit:
3977         @$(TRUE)
3978 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3979   am_cv_make_support_nested_variables=yes
3980 else
3981   am_cv_make_support_nested_variables=no
3982 fi
3983 fi
3984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3985 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3986 if test $am_cv_make_support_nested_variables = yes; then
3987     AM_V='$(V)'
3988   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3989 else
3990   AM_V=$AM_DEFAULT_VERBOSITY
3991   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3992 fi
3993 AM_BACKSLASH='\'
3994
3995 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3996   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3997   # is not polluted with repeated "-I."
3998   am__isrc=' -I$(srcdir)'
3999   # test to see if srcdir already configured
4000   if test -f $srcdir/config.status; then
4001     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4002   fi
4003 fi
4004
4005 # test whether we have cygpath
4006 if test -z "$CYGPATH_W"; then
4007   if (cygpath --version) >/dev/null 2>/dev/null; then
4008     CYGPATH_W='cygpath -w'
4009   else
4010     CYGPATH_W=echo
4011   fi
4012 fi
4013
4014
4015 # Define the identity of the package.
4016  PACKAGE='diffutils'
4017  VERSION='3.7'
4018
4019
4020 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4021
4022
4023 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4024
4025 # Some tools Automake needs.
4026
4027 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4028
4029
4030 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4031
4032
4033 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4034
4035
4036 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4037
4038
4039 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4040
4041 # For better backward compatibility.  To be removed once Automake 1.9.x
4042 # dies out for good.  For more background, see:
4043 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4044 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4045 mkdir_p='$(MKDIR_P)'
4046
4047 # We need awk for the "check" target (and possibly the TAP driver).  The
4048 # system "awk" is bad on some platforms.
4049 # Always define AMTAR for backward compatibility.  Yes, it's still used
4050 # in the wild :-(  We should find a proper way to deprecate it ...
4051 AMTAR='$${TAR-tar}'
4052
4053
4054 # We'll loop over all known methods to create a tar archive until one works.
4055 _am_tools='gnutar  pax cpio none'
4056
4057 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4058
4059
4060
4061
4062
4063
4064 # POSIX will say in a future version that running "rm -f" with no argument
4065 # is OK; and we want to be able to make that assumption in our Makefile
4066 # recipes.  So use an aggressive probe to check that the usage we want is
4067 # actually supported "in the wild" to an acceptable degree.
4068 # See automake bug#10828.
4069 # To make any issue more visible, cause the running configure to be aborted
4070 # by default if the 'rm' program in use doesn't match our expectations; the
4071 # user can still override this though.
4072 if rm -f && rm -fr && rm -rf; then : OK; else
4073   cat >&2 <<'END'
4074 Oops!
4075
4076 Your 'rm' program seems unable to run without file operands specified
4077 on the command line, even when the '-f' option is present.  This is contrary
4078 to the behaviour of most rm programs out there, and not conforming with
4079 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4080
4081 Please tell bug-automake@gnu.org about your system, including the value
4082 of your $PATH and any error possibly output before this message.  This
4083 can help us improve future automake versions.
4084
4085 END
4086   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4087     echo 'Configuration will proceed anyway, since you have set the' >&2
4088     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4089     echo >&2
4090   else
4091     cat >&2 <<'END'
4092 Aborting the configuration process, to ensure you take notice of the issue.
4093
4094 You can download and install GNU coreutils to get an 'rm' implementation
4095 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4096
4097 If you want to complete the configuration process using your problematic
4098 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4099 to "yes", and re-run configure.
4100
4101 END
4102     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4103   fi
4104 fi
4105
4106 # Check whether --enable-silent-rules was given.
4107 if test ${enable_silent_rules+y}
4108 then :
4109   enableval=$enable_silent_rules;
4110 fi
4111
4112 case $enable_silent_rules in # (((
4113   yes) AM_DEFAULT_VERBOSITY=0;;
4114    no) AM_DEFAULT_VERBOSITY=1;;
4115     *) AM_DEFAULT_VERBOSITY=0;;
4116 esac
4117 am_make=${MAKE-make}
4118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4119 printf %s "checking whether $am_make supports nested variables... " >&6; }
4120 if test ${am_cv_make_support_nested_variables+y}
4121 then :
4122   printf %s "(cached) " >&6
4123 else
4124   if printf "%s\n" 'TRUE=$(BAR$(V))
4125 BAR0=false
4126 BAR1=true
4127 V=1
4128 am__doit:
4129         @$(TRUE)
4130 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4131   am_cv_make_support_nested_variables=yes
4132 else
4133   am_cv_make_support_nested_variables=no
4134 fi
4135 fi
4136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4137 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4138 if test $am_cv_make_support_nested_variables = yes; then
4139     AM_V='$(V)'
4140   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4141 else
4142   AM_V=$AM_DEFAULT_VERBOSITY
4143   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4144 fi
4145 AM_BACKSLASH='\'
4146  # make --enable-silent-rules the default.
4147
4148 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4149
4150
4151 for ac_prog in gawk mawk nawk awk
4152 do
4153   # Extract the first word of "$ac_prog", so it can be a program name with args.
4154 set dummy $ac_prog; ac_word=$2
4155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4156 printf %s "checking for $ac_word... " >&6; }
4157 if test ${ac_cv_prog_AWK+y}
4158 then :
4159   printf %s "(cached) " >&6
4160 else
4161   if test -n "$AWK"; then
4162   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4163 else
4164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4165 for as_dir in $PATH
4166 do
4167   IFS=$as_save_IFS
4168   case $as_dir in #(((
4169     '') as_dir=./ ;;
4170     */) ;;
4171     *) as_dir=$as_dir/ ;;
4172   esac
4173     for ac_exec_ext in '' $ac_executable_extensions; do
4174   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4175     ac_cv_prog_AWK="$ac_prog"
4176     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4177     break 2
4178   fi
4179 done
4180   done
4181 IFS=$as_save_IFS
4182
4183 fi
4184 fi
4185 AWK=$ac_cv_prog_AWK
4186 if test -n "$AWK"; then
4187   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4188 printf "%s\n" "$AWK" >&6; }
4189 else
4190   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4191 printf "%s\n" "no" >&6; }
4192 fi
4193
4194
4195   test -n "$AWK" && break
4196 done
4197
4198 ac_ext=c
4199 ac_cpp='$CPP $CPPFLAGS'
4200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4203 if test -n "$ac_tool_prefix"; then
4204   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4205 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4207 printf %s "checking for $ac_word... " >&6; }
4208 if test ${ac_cv_prog_CC+y}
4209 then :
4210   printf %s "(cached) " >&6
4211 else
4212   if test -n "$CC"; then
4213   ac_cv_prog_CC="$CC" # Let the user override the test.
4214 else
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216 for as_dir in $PATH
4217 do
4218   IFS=$as_save_IFS
4219   case $as_dir in #(((
4220     '') as_dir=./ ;;
4221     */) ;;
4222     *) as_dir=$as_dir/ ;;
4223   esac
4224     for ac_exec_ext in '' $ac_executable_extensions; do
4225   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4226     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4227     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4228     break 2
4229   fi
4230 done
4231   done
4232 IFS=$as_save_IFS
4233
4234 fi
4235 fi
4236 CC=$ac_cv_prog_CC
4237 if test -n "$CC"; then
4238   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4239 printf "%s\n" "$CC" >&6; }
4240 else
4241   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242 printf "%s\n" "no" >&6; }
4243 fi
4244
4245
4246 fi
4247 if test -z "$ac_cv_prog_CC"; then
4248   ac_ct_CC=$CC
4249   # Extract the first word of "gcc", so it can be a program name with args.
4250 set dummy gcc; ac_word=$2
4251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 printf %s "checking for $ac_word... " >&6; }
4253 if test ${ac_cv_prog_ac_ct_CC+y}
4254 then :
4255   printf %s "(cached) " >&6
4256 else
4257   if test -n "$ac_ct_CC"; then
4258   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4259 else
4260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261 for as_dir in $PATH
4262 do
4263   IFS=$as_save_IFS
4264   case $as_dir in #(((
4265     '') as_dir=./ ;;
4266     */) ;;
4267     *) as_dir=$as_dir/ ;;
4268   esac
4269     for ac_exec_ext in '' $ac_executable_extensions; do
4270   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4271     ac_cv_prog_ac_ct_CC="gcc"
4272     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4273     break 2
4274   fi
4275 done
4276   done
4277 IFS=$as_save_IFS
4278
4279 fi
4280 fi
4281 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4282 if test -n "$ac_ct_CC"; then
4283   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4284 printf "%s\n" "$ac_ct_CC" >&6; }
4285 else
4286   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4287 printf "%s\n" "no" >&6; }
4288 fi
4289
4290   if test "x$ac_ct_CC" = x; then
4291     CC=""
4292   else
4293     case $cross_compiling:$ac_tool_warned in
4294 yes:)
4295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4296 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4297 ac_tool_warned=yes ;;
4298 esac
4299     CC=$ac_ct_CC
4300   fi
4301 else
4302   CC="$ac_cv_prog_CC"
4303 fi
4304
4305 if test -z "$CC"; then
4306           if test -n "$ac_tool_prefix"; then
4307     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4308 set dummy ${ac_tool_prefix}cc; ac_word=$2
4309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4310 printf %s "checking for $ac_word... " >&6; }
4311 if test ${ac_cv_prog_CC+y}
4312 then :
4313   printf %s "(cached) " >&6
4314 else
4315   if test -n "$CC"; then
4316   ac_cv_prog_CC="$CC" # Let the user override the test.
4317 else
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319 for as_dir in $PATH
4320 do
4321   IFS=$as_save_IFS
4322   case $as_dir in #(((
4323     '') as_dir=./ ;;
4324     */) ;;
4325     *) as_dir=$as_dir/ ;;
4326   esac
4327     for ac_exec_ext in '' $ac_executable_extensions; do
4328   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4329     ac_cv_prog_CC="${ac_tool_prefix}cc"
4330     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4331     break 2
4332   fi
4333 done
4334   done
4335 IFS=$as_save_IFS
4336
4337 fi
4338 fi
4339 CC=$ac_cv_prog_CC
4340 if test -n "$CC"; then
4341   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4342 printf "%s\n" "$CC" >&6; }
4343 else
4344   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4345 printf "%s\n" "no" >&6; }
4346 fi
4347
4348
4349   fi
4350 fi
4351 if test -z "$CC"; then
4352   # Extract the first word of "cc", so it can be a program name with args.
4353 set dummy cc; ac_word=$2
4354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355 printf %s "checking for $ac_word... " >&6; }
4356 if test ${ac_cv_prog_CC+y}
4357 then :
4358   printf %s "(cached) " >&6
4359 else
4360   if test -n "$CC"; then
4361   ac_cv_prog_CC="$CC" # Let the user override the test.
4362 else
4363   ac_prog_rejected=no
4364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365 for as_dir in $PATH
4366 do
4367   IFS=$as_save_IFS
4368   case $as_dir in #(((
4369     '') as_dir=./ ;;
4370     */) ;;
4371     *) as_dir=$as_dir/ ;;
4372   esac
4373     for ac_exec_ext in '' $ac_executable_extensions; do
4374   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4375     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4376        ac_prog_rejected=yes
4377        continue
4378      fi
4379     ac_cv_prog_CC="cc"
4380     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4381     break 2
4382   fi
4383 done
4384   done
4385 IFS=$as_save_IFS
4386
4387 if test $ac_prog_rejected = yes; then
4388   # We found a bogon in the path, so make sure we never use it.
4389   set dummy $ac_cv_prog_CC
4390   shift
4391   if test $# != 0; then
4392     # We chose a different compiler from the bogus one.
4393     # However, it has the same basename, so the bogon will be chosen
4394     # first if we set CC to just the basename; use the full file name.
4395     shift
4396     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4397   fi
4398 fi
4399 fi
4400 fi
4401 CC=$ac_cv_prog_CC
4402 if test -n "$CC"; then
4403   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4404 printf "%s\n" "$CC" >&6; }
4405 else
4406   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407 printf "%s\n" "no" >&6; }
4408 fi
4409
4410
4411 fi
4412 if test -z "$CC"; then
4413   if test -n "$ac_tool_prefix"; then
4414   for ac_prog in cl.exe
4415   do
4416     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4417 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4419 printf %s "checking for $ac_word... " >&6; }
4420 if test ${ac_cv_prog_CC+y}
4421 then :
4422   printf %s "(cached) " >&6
4423 else
4424   if test -n "$CC"; then
4425   ac_cv_prog_CC="$CC" # Let the user override the test.
4426 else
4427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4428 for as_dir in $PATH
4429 do
4430   IFS=$as_save_IFS
4431   case $as_dir in #(((
4432     '') as_dir=./ ;;
4433     */) ;;
4434     *) as_dir=$as_dir/ ;;
4435   esac
4436     for ac_exec_ext in '' $ac_executable_extensions; do
4437   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4438     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4439     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4440     break 2
4441   fi
4442 done
4443   done
4444 IFS=$as_save_IFS
4445
4446 fi
4447 fi
4448 CC=$ac_cv_prog_CC
4449 if test -n "$CC"; then
4450   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4451 printf "%s\n" "$CC" >&6; }
4452 else
4453   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4454 printf "%s\n" "no" >&6; }
4455 fi
4456
4457
4458     test -n "$CC" && break
4459   done
4460 fi
4461 if test -z "$CC"; then
4462   ac_ct_CC=$CC
4463   for ac_prog in cl.exe
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468 printf %s "checking for $ac_word... " >&6; }
4469 if test ${ac_cv_prog_ac_ct_CC+y}
4470 then :
4471   printf %s "(cached) " >&6
4472 else
4473   if test -n "$ac_ct_CC"; then
4474   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4475 else
4476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4477 for as_dir in $PATH
4478 do
4479   IFS=$as_save_IFS
4480   case $as_dir in #(((
4481     '') as_dir=./ ;;
4482     */) ;;
4483     *) as_dir=$as_dir/ ;;
4484   esac
4485     for ac_exec_ext in '' $ac_executable_extensions; do
4486   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4487     ac_cv_prog_ac_ct_CC="$ac_prog"
4488     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4489     break 2
4490   fi
4491 done
4492   done
4493 IFS=$as_save_IFS
4494
4495 fi
4496 fi
4497 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4498 if test -n "$ac_ct_CC"; then
4499   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4500 printf "%s\n" "$ac_ct_CC" >&6; }
4501 else
4502   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4503 printf "%s\n" "no" >&6; }
4504 fi
4505
4506
4507   test -n "$ac_ct_CC" && break
4508 done
4509
4510   if test "x$ac_ct_CC" = x; then
4511     CC=""
4512   else
4513     case $cross_compiling:$ac_tool_warned in
4514 yes:)
4515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4516 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4517 ac_tool_warned=yes ;;
4518 esac
4519     CC=$ac_ct_CC
4520   fi
4521 fi
4522
4523 fi
4524 if test -z "$CC"; then
4525   if test -n "$ac_tool_prefix"; then
4526   # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4527 set dummy ${ac_tool_prefix}clang; ac_word=$2
4528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529 printf %s "checking for $ac_word... " >&6; }
4530 if test ${ac_cv_prog_CC+y}
4531 then :
4532   printf %s "(cached) " >&6
4533 else
4534   if test -n "$CC"; then
4535   ac_cv_prog_CC="$CC" # Let the user override the test.
4536 else
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538 for as_dir in $PATH
4539 do
4540   IFS=$as_save_IFS
4541   case $as_dir in #(((
4542     '') as_dir=./ ;;
4543     */) ;;
4544     *) as_dir=$as_dir/ ;;
4545   esac
4546     for ac_exec_ext in '' $ac_executable_extensions; do
4547   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4548     ac_cv_prog_CC="${ac_tool_prefix}clang"
4549     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4550     break 2
4551   fi
4552 done
4553   done
4554 IFS=$as_save_IFS
4555
4556 fi
4557 fi
4558 CC=$ac_cv_prog_CC
4559 if test -n "$CC"; then
4560   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4561 printf "%s\n" "$CC" >&6; }
4562 else
4563   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564 printf "%s\n" "no" >&6; }
4565 fi
4566
4567
4568 fi
4569 if test -z "$ac_cv_prog_CC"; then
4570   ac_ct_CC=$CC
4571   # Extract the first word of "clang", so it can be a program name with args.
4572 set dummy clang; ac_word=$2
4573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4574 printf %s "checking for $ac_word... " >&6; }
4575 if test ${ac_cv_prog_ac_ct_CC+y}
4576 then :
4577   printf %s "(cached) " >&6
4578 else
4579   if test -n "$ac_ct_CC"; then
4580   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4581 else
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583 for as_dir in $PATH
4584 do
4585   IFS=$as_save_IFS
4586   case $as_dir in #(((
4587     '') as_dir=./ ;;
4588     */) ;;
4589     *) as_dir=$as_dir/ ;;
4590   esac
4591     for ac_exec_ext in '' $ac_executable_extensions; do
4592   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4593     ac_cv_prog_ac_ct_CC="clang"
4594     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4595     break 2
4596   fi
4597 done
4598   done
4599 IFS=$as_save_IFS
4600
4601 fi
4602 fi
4603 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4604 if test -n "$ac_ct_CC"; then
4605   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4606 printf "%s\n" "$ac_ct_CC" >&6; }
4607 else
4608   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609 printf "%s\n" "no" >&6; }
4610 fi
4611
4612   if test "x$ac_ct_CC" = x; then
4613     CC=""
4614   else
4615     case $cross_compiling:$ac_tool_warned in
4616 yes:)
4617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4618 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4619 ac_tool_warned=yes ;;
4620 esac
4621     CC=$ac_ct_CC
4622   fi
4623 else
4624   CC="$ac_cv_prog_CC"
4625 fi
4626
4627 fi
4628
4629
4630 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4631 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4632 as_fn_error $? "no acceptable C compiler found in \$PATH
4633 See \`config.log' for more details" "$LINENO" 5; }
4634
4635 # Provide some information about the compiler.
4636 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4637 set X $ac_compile
4638 ac_compiler=$2
4639 for ac_option in --version -v -V -qversion -version; do
4640   { { ac_try="$ac_compiler $ac_option >&5"
4641 case "(($ac_try" in
4642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643   *) ac_try_echo=$ac_try;;
4644 esac
4645 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4646 printf "%s\n" "$ac_try_echo"; } >&5
4647   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4648   ac_status=$?
4649   if test -s conftest.err; then
4650     sed '10a\
4651 ... rest of stderr output deleted ...
4652          10q' conftest.err >conftest.er1
4653     cat conftest.er1 >&5
4654   fi
4655   rm -f conftest.er1 conftest.err
4656   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4657   test $ac_status = 0; }
4658 done
4659
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661 /* end confdefs.h.  */
4662
4663 int
4664 main (void)
4665 {
4666
4667   ;
4668   return 0;
4669 }
4670 _ACEOF
4671 ac_clean_files_save=$ac_clean_files
4672 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4673 # Try to create an executable without -o first, disregard a.out.
4674 # It will help us diagnose broken compilers, and finding out an intuition
4675 # of exeext.
4676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4677 printf %s "checking whether the C compiler works... " >&6; }
4678 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4679
4680 # The possible output files:
4681 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4682
4683 ac_rmfiles=
4684 for ac_file in $ac_files
4685 do
4686   case $ac_file in
4687     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4688     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4689   esac
4690 done
4691 rm -f $ac_rmfiles
4692
4693 if { { ac_try="$ac_link_default"
4694 case "(($ac_try" in
4695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4696   *) ac_try_echo=$ac_try;;
4697 esac
4698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4699 printf "%s\n" "$ac_try_echo"; } >&5
4700   (eval "$ac_link_default") 2>&5
4701   ac_status=$?
4702   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4703   test $ac_status = 0; }
4704 then :
4705   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4706 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4707 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4708 # so that the user can short-circuit this test for compilers unknown to
4709 # Autoconf.
4710 for ac_file in $ac_files ''
4711 do
4712   test -f "$ac_file" || continue
4713   case $ac_file in
4714     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4715         ;;
4716     [ab].out )
4717         # We found the default executable, but exeext='' is most
4718         # certainly right.
4719         break;;
4720     *.* )
4721         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4722         then :; else
4723            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4724         fi
4725         # We set ac_cv_exeext here because the later test for it is not
4726         # safe: cross compilers may not add the suffix if given an `-o'
4727         # argument, so we may need to know it at that point already.
4728         # Even if this section looks crufty: it has the advantage of
4729         # actually working.
4730         break;;
4731     * )
4732         break;;
4733   esac
4734 done
4735 test "$ac_cv_exeext" = no && ac_cv_exeext=
4736
4737 else
4738   ac_file=''
4739 fi
4740 if test -z "$ac_file"
4741 then :
4742   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743 printf "%s\n" "no" >&6; }
4744 printf "%s\n" "$as_me: failed program was:" >&5
4745 sed 's/^/| /' conftest.$ac_ext >&5
4746
4747 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4748 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4749 as_fn_error 77 "C compiler cannot create executables
4750 See \`config.log' for more details" "$LINENO" 5; }
4751 else
4752   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4753 printf "%s\n" "yes" >&6; }
4754 fi
4755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4756 printf %s "checking for C compiler default output file name... " >&6; }
4757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4758 printf "%s\n" "$ac_file" >&6; }
4759 ac_exeext=$ac_cv_exeext
4760
4761 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4762 ac_clean_files=$ac_clean_files_save
4763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4764 printf %s "checking for suffix of executables... " >&6; }
4765 if { { ac_try="$ac_link"
4766 case "(($ac_try" in
4767   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768   *) ac_try_echo=$ac_try;;
4769 esac
4770 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4771 printf "%s\n" "$ac_try_echo"; } >&5
4772   (eval "$ac_link") 2>&5
4773   ac_status=$?
4774   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4775   test $ac_status = 0; }
4776 then :
4777   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4778 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4779 # work properly (i.e., refer to `conftest.exe'), while it won't with
4780 # `rm'.
4781 for ac_file in conftest.exe conftest conftest.*; do
4782   test -f "$ac_file" || continue
4783   case $ac_file in
4784     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4785     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4786           break;;
4787     * ) break;;
4788   esac
4789 done
4790 else
4791   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4792 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4793 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4794 See \`config.log' for more details" "$LINENO" 5; }
4795 fi
4796 rm -f conftest conftest$ac_cv_exeext
4797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4798 printf "%s\n" "$ac_cv_exeext" >&6; }
4799
4800 rm -f conftest.$ac_ext
4801 EXEEXT=$ac_cv_exeext
4802 ac_exeext=$EXEEXT
4803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4804 /* end confdefs.h.  */
4805 #include <stdio.h>
4806 int
4807 main (void)
4808 {
4809 FILE *f = fopen ("conftest.out", "w");
4810  return ferror (f) || fclose (f) != 0;
4811
4812   ;
4813   return 0;
4814 }
4815 _ACEOF
4816 ac_clean_files="$ac_clean_files conftest.out"
4817 # Check that the compiler produces executables we can run.  If not, either
4818 # the compiler is broken, or we cross compile.
4819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4820 printf %s "checking whether we are cross compiling... " >&6; }
4821 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4822   cross_compiling=yes
4823 elif test "$cross_compiling" != yes; then
4824   { { ac_try="$ac_link"
4825 case "(($ac_try" in
4826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827   *) ac_try_echo=$ac_try;;
4828 esac
4829 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4830 printf "%s\n" "$ac_try_echo"; } >&5
4831   (eval "$ac_link") 2>&5
4832   ac_status=$?
4833   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4834   test $ac_status = 0; }
4835   if { ac_try='./conftest$ac_cv_exeext'
4836   { { case "(($ac_try" in
4837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838   *) ac_try_echo=$ac_try;;
4839 esac
4840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4841 printf "%s\n" "$ac_try_echo"; } >&5
4842   (eval "$ac_try") 2>&5
4843   ac_status=$?
4844   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4845   test $ac_status = 0; }; }; then
4846     cross_compiling=no
4847   else
4848     if test "$cross_compiling" = maybe; then
4849         cross_compiling=yes
4850     else
4851         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4852 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4853 as_fn_error $? "cannot run C compiled programs.
4854 If you meant to cross compile, use \`--host'.
4855 See \`config.log' for more details" "$LINENO" 5; }
4856     fi
4857   fi
4858 fi
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4860 printf "%s\n" "$cross_compiling" >&6; }
4861
4862 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4863 ac_clean_files=$ac_clean_files_save
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4865 printf %s "checking for suffix of object files... " >&6; }
4866 if test ${ac_cv_objext+y}
4867 then :
4868   printf %s "(cached) " >&6
4869 else
4870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871 /* end confdefs.h.  */
4872
4873 int
4874 main (void)
4875 {
4876
4877   ;
4878   return 0;
4879 }
4880 _ACEOF
4881 rm -f conftest.o conftest.obj
4882 if { { ac_try="$ac_compile"
4883 case "(($ac_try" in
4884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4885   *) ac_try_echo=$ac_try;;
4886 esac
4887 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4888 printf "%s\n" "$ac_try_echo"; } >&5
4889   (eval "$ac_compile") 2>&5
4890   ac_status=$?
4891   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4892   test $ac_status = 0; }
4893 then :
4894   for ac_file in conftest.o conftest.obj conftest.*; do
4895   test -f "$ac_file" || continue;
4896   case $ac_file in
4897     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4898     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4899        break;;
4900   esac
4901 done
4902 else
4903   printf "%s\n" "$as_me: failed program was:" >&5
4904 sed 's/^/| /' conftest.$ac_ext >&5
4905
4906 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4907 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4908 as_fn_error $? "cannot compute suffix of object files: cannot compile
4909 See \`config.log' for more details" "$LINENO" 5; }
4910 fi
4911 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4912 fi
4913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4914 printf "%s\n" "$ac_cv_objext" >&6; }
4915 OBJEXT=$ac_cv_objext
4916 ac_objext=$OBJEXT
4917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4918 printf %s "checking whether the compiler supports GNU C... " >&6; }
4919 if test ${ac_cv_c_compiler_gnu+y}
4920 then :
4921   printf %s "(cached) " >&6
4922 else
4923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924 /* end confdefs.h.  */
4925
4926 int
4927 main (void)
4928 {
4929 #ifndef __GNUC__
4930        choke me
4931 #endif
4932
4933   ;
4934   return 0;
4935 }
4936 _ACEOF
4937 if ac_fn_c_try_compile "$LINENO"
4938 then :
4939   ac_compiler_gnu=yes
4940 else
4941   ac_compiler_gnu=no
4942 fi
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4944 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4945
4946 fi
4947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4948 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4949 if test $ac_compiler_gnu = yes; then
4950   GCC=yes
4951 else
4952   GCC=
4953 fi
4954 ac_test_CFLAGS=${CFLAGS+y}
4955 ac_save_CFLAGS=$CFLAGS
4956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4957 printf %s "checking whether $CC accepts -g... " >&6; }
4958 if test ${ac_cv_prog_cc_g+y}
4959 then :
4960   printf %s "(cached) " >&6
4961 else
4962   ac_save_c_werror_flag=$ac_c_werror_flag
4963    ac_c_werror_flag=yes
4964    ac_cv_prog_cc_g=no
4965    CFLAGS="-g"
4966    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4967 /* end confdefs.h.  */
4968
4969 int
4970 main (void)
4971 {
4972
4973   ;
4974   return 0;
4975 }
4976 _ACEOF
4977 if ac_fn_c_try_compile "$LINENO"
4978 then :
4979   ac_cv_prog_cc_g=yes
4980 else
4981   CFLAGS=""
4982       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983 /* end confdefs.h.  */
4984
4985 int
4986 main (void)
4987 {
4988
4989   ;
4990   return 0;
4991 }
4992 _ACEOF
4993 if ac_fn_c_try_compile "$LINENO"
4994 then :
4995
4996 else
4997   ac_c_werror_flag=$ac_save_c_werror_flag
4998          CFLAGS="-g"
4999          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000 /* end confdefs.h.  */
5001
5002 int
5003 main (void)
5004 {
5005
5006   ;
5007   return 0;
5008 }
5009 _ACEOF
5010 if ac_fn_c_try_compile "$LINENO"
5011 then :
5012   ac_cv_prog_cc_g=yes
5013 fi
5014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5015 fi
5016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5017 fi
5018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5019    ac_c_werror_flag=$ac_save_c_werror_flag
5020 fi
5021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5022 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5023 if test $ac_test_CFLAGS; then
5024   CFLAGS=$ac_save_CFLAGS
5025 elif test $ac_cv_prog_cc_g = yes; then
5026   if test "$GCC" = yes; then
5027     CFLAGS="-g -O2"
5028   else
5029     CFLAGS="-g"
5030   fi
5031 else
5032   if test "$GCC" = yes; then
5033     CFLAGS="-O2"
5034   else
5035     CFLAGS=
5036   fi
5037 fi
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5039 printf %s "checking for $CC option to enable C11 features... " >&6; }
5040 if test ${ac_cv_prog_cc_c11+y}
5041 then :
5042   printf %s "(cached) " >&6
5043 else
5044   ac_cv_prog_cc_c11=no
5045 ac_save_CC=$CC
5046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5047 /* end confdefs.h.  */
5048 #include <stdarg.h>
5049 #include <stdbool.h>
5050 #include <stddef.h>
5051 #include <stdlib.h>
5052 #include <wchar.h>
5053 #include <stdio.h>
5054
5055 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5056 #define debug(...) fprintf (stderr, __VA_ARGS__)
5057 #define showlist(...) puts (#__VA_ARGS__)
5058 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5059 static void
5060 test_varargs_macros (void)
5061 {
5062   int x = 1234;
5063   int y = 5678;
5064   debug ("Flag");
5065   debug ("X = %d\n", x);
5066   showlist (The first, second, and third items.);
5067   report (x>y, "x is %d but y is %d", x, y);
5068 }
5069
5070 // Check long long types.
5071 #define BIG64 18446744073709551615ull
5072 #define BIG32 4294967295ul
5073 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5074 #if !BIG_OK
5075   your preprocessor is broken;
5076 #endif
5077 #if BIG_OK
5078 #else
5079   your preprocessor is broken;
5080 #endif
5081 static long long int bignum = -9223372036854775807LL;
5082 static unsigned long long int ubignum = BIG64;
5083
5084 struct incomplete_array
5085 {
5086   int datasize;
5087   double data[];
5088 };
5089
5090 struct named_init {
5091   int number;
5092   const wchar_t *name;
5093   double average;
5094 };
5095
5096 typedef const char *ccp;
5097
5098 static inline int
5099 test_restrict (ccp restrict text)
5100 {
5101   // See if C++-style comments work.
5102   // Iterate through items via the restricted pointer.
5103   // Also check for declarations in for loops.
5104   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5105     continue;
5106   return 0;
5107 }
5108
5109 // Check varargs and va_copy.
5110 static bool
5111 test_varargs (const char *format, ...)
5112 {
5113   va_list args;
5114   va_start (args, format);
5115   va_list args_copy;
5116   va_copy (args_copy, args);
5117
5118   const char *str = "";
5119   int number = 0;
5120   float fnumber = 0;
5121
5122   while (*format)
5123     {
5124       switch (*format++)
5125         {
5126         case 's': // string
5127           str = va_arg (args_copy, const char *);
5128           break;
5129         case 'd': // int
5130           number = va_arg (args_copy, int);
5131           break;
5132         case 'f': // float
5133           fnumber = va_arg (args_copy, double);
5134           break;
5135         default:
5136           break;
5137         }
5138     }
5139   va_end (args_copy);
5140   va_end (args);
5141
5142   return *str && number && fnumber;
5143 }
5144 // Check _Alignas.
5145 char _Alignas (double) aligned_as_double;
5146 char _Alignas (0) no_special_alignment;
5147 extern char aligned_as_int;
5148 char _Alignas (0) _Alignas (int) aligned_as_int;
5149
5150 // Check _Alignof.
5151 enum
5152 {
5153   int_alignment = _Alignof (int),
5154   int_array_alignment = _Alignof (int[100]),
5155   char_alignment = _Alignof (char)
5156 };
5157 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5158
5159 // Check _Noreturn.
5160 int _Noreturn does_not_return (void) { for (;;) continue; }
5161
5162 // Check _Static_assert.
5163 struct test_static_assert
5164 {
5165   int x;
5166   _Static_assert (sizeof (int) <= sizeof (long int),
5167                   "_Static_assert does not work in struct");
5168   long int y;
5169 };
5170
5171 // Check UTF-8 literals.
5172 #define u8 syntax error!
5173 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5174
5175 // Check duplicate typedefs.
5176 typedef long *long_ptr;
5177 typedef long int *long_ptr;
5178 typedef long_ptr long_ptr;
5179
5180 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5181 struct anonymous
5182 {
5183   union {
5184     struct { int i; int j; };
5185     struct { int k; long int l; } w;
5186   };
5187   int m;
5188 } v1;
5189
5190 int
5191 main (void)
5192 {
5193
5194   // Check bool.
5195   _Bool success = false;
5196
5197   // Check restrict.
5198   if (test_restrict ("String literal") == 0)
5199     success = true;
5200   char *restrict newvar = "Another string";
5201
5202   // Check varargs.
5203   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5204   test_varargs_macros ();
5205
5206   // Check flexible array members.
5207   struct incomplete_array *ia =
5208     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5209   ia->datasize = 10;
5210   for (int i = 0; i < ia->datasize; ++i)
5211     ia->data[i] = i * 1.234;
5212
5213   // Check named initializers.
5214   struct named_init ni = {
5215     .number = 34,
5216     .name = L"Test wide string",
5217     .average = 543.34343,
5218   };
5219
5220   ni.number = 58;
5221
5222   int dynamic_array[ni.number];
5223   dynamic_array[ni.number - 1] = 543;
5224
5225   // work around unused variable warnings
5226   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5227           || dynamic_array[ni.number - 1] != 543);
5228
5229   v1.i = 2;
5230   v1.w.k = 5;
5231   _Static_assert ((offsetof (struct anonymous, i)
5232                    == offsetof (struct anonymous, w.k)),
5233                   "Anonymous union alignment botch");
5234
5235   ;
5236   return 0;
5237 }
5238 _ACEOF
5239 for ac_arg in '' -std=gnu11
5240 do
5241   CC="$ac_save_CC $ac_arg"
5242   if ac_fn_c_try_compile "$LINENO"
5243 then :
5244   ac_cv_prog_cc_c11=$ac_arg
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext
5247   test "x$ac_cv_prog_cc_c11" != "xno" && break
5248 done
5249 rm -f conftest.$ac_ext
5250 CC=$ac_save_CC
5251
5252 fi
5253 # AC_CACHE_VAL
5254 ac_prog_cc_stdc_options=
5255 case "x$ac_cv_prog_cc_c11" in
5256   x)
5257     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5258 printf "%s\n" "none needed" >&6; } ;;
5259   xno)
5260     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5261 printf "%s\n" "unsupported" >&6; } ;;
5262   *)
5263     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5264     CC=$CC$ac_prog_cc_stdc_options
5265     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5266 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5267 esac
5268 if test "x$ac_cv_prog_cc_c11" != xno
5269 then :
5270   ac_prog_cc_stdc=c11
5271                  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5272 else
5273   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5274 printf %s "checking for $CC option to enable C99 features... " >&6; }
5275 if test ${ac_cv_prog_cc_c99+y}
5276 then :
5277   printf %s "(cached) " >&6
5278 else
5279   ac_cv_prog_cc_c99=no
5280 ac_save_CC=$CC
5281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5282 /* end confdefs.h.  */
5283 #include <stdarg.h>
5284 #include <stdbool.h>
5285 #include <stddef.h>
5286 #include <stdlib.h>
5287 #include <wchar.h>
5288 #include <stdio.h>
5289
5290 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5291 #define debug(...) fprintf (stderr, __VA_ARGS__)
5292 #define showlist(...) puts (#__VA_ARGS__)
5293 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5294 static void
5295 test_varargs_macros (void)
5296 {
5297   int x = 1234;
5298   int y = 5678;
5299   debug ("Flag");
5300   debug ("X = %d\n", x);
5301   showlist (The first, second, and third items.);
5302   report (x>y, "x is %d but y is %d", x, y);
5303 }
5304
5305 // Check long long types.
5306 #define BIG64 18446744073709551615ull
5307 #define BIG32 4294967295ul
5308 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5309 #if !BIG_OK
5310   your preprocessor is broken;
5311 #endif
5312 #if BIG_OK
5313 #else
5314   your preprocessor is broken;
5315 #endif
5316 static long long int bignum = -9223372036854775807LL;
5317 static unsigned long long int ubignum = BIG64;
5318
5319 struct incomplete_array
5320 {
5321   int datasize;
5322   double data[];
5323 };
5324
5325 struct named_init {
5326   int number;
5327   const wchar_t *name;
5328   double average;
5329 };
5330
5331 typedef const char *ccp;
5332
5333 static inline int
5334 test_restrict (ccp restrict text)
5335 {
5336   // See if C++-style comments work.
5337   // Iterate through items via the restricted pointer.
5338   // Also check for declarations in for loops.
5339   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5340     continue;
5341   return 0;
5342 }
5343
5344 // Check varargs and va_copy.
5345 static bool
5346 test_varargs (const char *format, ...)
5347 {
5348   va_list args;
5349   va_start (args, format);
5350   va_list args_copy;
5351   va_copy (args_copy, args);
5352
5353   const char *str = "";
5354   int number = 0;
5355   float fnumber = 0;
5356
5357   while (*format)
5358     {
5359       switch (*format++)
5360         {
5361         case 's': // string
5362           str = va_arg (args_copy, const char *);
5363           break;
5364         case 'd': // int
5365           number = va_arg (args_copy, int);
5366           break;
5367         case 'f': // float
5368           fnumber = va_arg (args_copy, double);
5369           break;
5370         default:
5371           break;
5372         }
5373     }
5374   va_end (args_copy);
5375   va_end (args);
5376
5377   return *str && number && fnumber;
5378 }
5379 int
5380 main (void)
5381 {
5382
5383   // Check bool.
5384   _Bool success = false;
5385
5386   // Check restrict.
5387   if (test_restrict ("String literal") == 0)
5388     success = true;
5389   char *restrict newvar = "Another string";
5390
5391   // Check varargs.
5392   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5393   test_varargs_macros ();
5394
5395   // Check flexible array members.
5396   struct incomplete_array *ia =
5397     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5398   ia->datasize = 10;
5399   for (int i = 0; i < ia->datasize; ++i)
5400     ia->data[i] = i * 1.234;
5401
5402   // Check named initializers.
5403   struct named_init ni = {
5404     .number = 34,
5405     .name = L"Test wide string",
5406     .average = 543.34343,
5407   };
5408
5409   ni.number = 58;
5410
5411   int dynamic_array[ni.number];
5412   dynamic_array[ni.number - 1] = 543;
5413
5414   // work around unused variable warnings
5415   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5416           || dynamic_array[ni.number - 1] != 543);
5417
5418   ;
5419   return 0;
5420 }
5421 _ACEOF
5422 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5423 do
5424   CC="$ac_save_CC $ac_arg"
5425   if ac_fn_c_try_compile "$LINENO"
5426 then :
5427   ac_cv_prog_cc_c99=$ac_arg
5428 fi
5429 rm -f core conftest.err conftest.$ac_objext
5430   test "x$ac_cv_prog_cc_c99" != "xno" && break
5431 done
5432 rm -f conftest.$ac_ext
5433 CC=$ac_save_CC
5434
5435 fi
5436 # AC_CACHE_VAL
5437 ac_prog_cc_stdc_options=
5438 case "x$ac_cv_prog_cc_c99" in
5439   x)
5440     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5441 printf "%s\n" "none needed" >&6; } ;;
5442   xno)
5443     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5444 printf "%s\n" "unsupported" >&6; } ;;
5445   *)
5446     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5447     CC=$CC$ac_prog_cc_stdc_options
5448     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5449 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5450 esac
5451 if test "x$ac_cv_prog_cc_c99" != xno
5452 then :
5453   ac_prog_cc_stdc=c99
5454                     ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5455 else
5456   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5457 printf %s "checking for $CC option to enable C89 features... " >&6; }
5458 if test ${ac_cv_prog_cc_c89+y}
5459 then :
5460   printf %s "(cached) " >&6
5461 else
5462   ac_cv_prog_cc_c89=no
5463 ac_save_CC=$CC
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465 /* end confdefs.h.  */
5466 #include <stdarg.h>
5467 #include <stdio.h>
5468 struct stat;
5469 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5470 struct buf { int x; };
5471 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5472 static char *e (p, i)
5473      char **p;
5474      int i;
5475 {
5476   return p[i];
5477 }
5478 static char *f (char * (*g) (char **, int), char **p, ...)
5479 {
5480   char *s;
5481   va_list v;
5482   va_start (v,p);
5483   s = g (p, va_arg (v,int));
5484   va_end (v);
5485   return s;
5486 }
5487
5488 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5489    function prototypes and stuff, but not '\xHH' hex character constants.
5490    These don't provoke an error unfortunately, instead are silently treated
5491    as 'x'.  The following induces an error, until -std is added to get
5492    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5493    array size at least.  It's necessary to write '\x00'==0 to get something
5494    that's true only with -std.  */
5495 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5496
5497 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5498    inside strings and character constants.  */
5499 #define FOO(x) 'x'
5500 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5501
5502 int test (int i, double x);
5503 struct s1 {int (*f) (int a);};
5504 struct s2 {int (*f) (double a);};
5505 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5506 int argc;
5507 char **argv;
5508 int
5509 main (void)
5510 {
5511 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5512   ;
5513   return 0;
5514 }
5515 _ACEOF
5516 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5517         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5518 do
5519   CC="$ac_save_CC $ac_arg"
5520   if ac_fn_c_try_compile "$LINENO"
5521 then :
5522   ac_cv_prog_cc_c89=$ac_arg
5523 fi
5524 rm -f core conftest.err conftest.$ac_objext
5525   test "x$ac_cv_prog_cc_c89" != "xno" && break
5526 done
5527 rm -f conftest.$ac_ext
5528 CC=$ac_save_CC
5529
5530 fi
5531 # AC_CACHE_VAL
5532 ac_prog_cc_stdc_options=
5533 case "x$ac_cv_prog_cc_c89" in
5534   x)
5535     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5536 printf "%s\n" "none needed" >&6; } ;;
5537   xno)
5538     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5539 printf "%s\n" "unsupported" >&6; } ;;
5540   *)
5541     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5542     CC=$CC$ac_prog_cc_stdc_options
5543     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5544 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5545 esac
5546 if test "x$ac_cv_prog_cc_c89" != xno
5547 then :
5548   ac_prog_cc_stdc=c89
5549                        ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5550 else
5551   ac_prog_cc_stdc=no
5552                        ac_cv_prog_cc_stdc=no
5553 fi
5554
5555 fi
5556
5557 fi
5558
5559 ac_ext=c
5560 ac_cpp='$CPP $CPPFLAGS'
5561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5564
5565 ac_ext=c
5566 ac_cpp='$CPP $CPPFLAGS'
5567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5571 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5572 if test ${am_cv_prog_cc_c_o+y}
5573 then :
5574   printf %s "(cached) " >&6
5575 else
5576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577 /* end confdefs.h.  */
5578
5579 int
5580 main (void)
5581 {
5582
5583   ;
5584   return 0;
5585 }
5586 _ACEOF
5587   # Make sure it works both with $CC and with simple cc.
5588   # Following AC_PROG_CC_C_O, we do the test twice because some
5589   # compilers refuse to overwrite an existing .o file with -o,
5590   # though they will create one.
5591   am_cv_prog_cc_c_o=yes
5592   for am_i in 1 2; do
5593     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5594    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5595    ac_status=$?
5596    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597    (exit $ac_status); } \
5598          && test -f conftest2.$ac_objext; then
5599       : OK
5600     else
5601       am_cv_prog_cc_c_o=no
5602       break
5603     fi
5604   done
5605   rm -f core conftest*
5606   unset am_i
5607 fi
5608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5609 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5610 if test "$am_cv_prog_cc_c_o" != yes; then
5611    # Losing compiler, so override with the script.
5612    # FIXME: It is wrong to rewrite CC.
5613    # But if we don't then we get into trouble of one sort or another.
5614    # A longer-term fix would be to have automake use am__CC in this case,
5615    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5616    CC="$am_aux_dir/compile $CC"
5617 fi
5618 ac_ext=c
5619 ac_cpp='$CPP $CPPFLAGS'
5620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5623
5624 DEPDIR="${am__leading_dot}deps"
5625
5626 ac_config_commands="$ac_config_commands depfiles"
5627
5628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
5629 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
5630 cat > confinc.mk << 'END'
5631 am__doit:
5632         @echo this is the am__doit target >confinc.out
5633 .PHONY: am__doit
5634 END
5635 am__include="#"
5636 am__quote=
5637 # BSD make does it like this.
5638 echo '.include "confinc.mk" # ignored' > confmf.BSD
5639 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
5640 echo 'include confinc.mk # ignored' > confmf.GNU
5641 _am_result=no
5642 for s in GNU BSD; do
5643   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
5644    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
5645    ac_status=$?
5646    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647    (exit $ac_status); }
5648   case $?:`cat confinc.out 2>/dev/null` in #(
5649   '0:this is the am__doit target') :
5650     case $s in #(
5651   BSD) :
5652     am__include='.include' am__quote='"' ;; #(
5653   *) :
5654     am__include='include' am__quote='' ;;
5655 esac ;; #(
5656   *) :
5657      ;;
5658 esac
5659   if test "$am__include" != "#"; then
5660     _am_result="yes ($s style)"
5661     break
5662   fi
5663 done
5664 rm -f confinc.* confmf.*
5665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
5666 printf "%s\n" "${_am_result}" >&6; }
5667
5668 # Check whether --enable-dependency-tracking was given.
5669 if test ${enable_dependency_tracking+y}
5670 then :
5671   enableval=$enable_dependency_tracking;
5672 fi
5673
5674 if test "x$enable_dependency_tracking" != xno; then
5675   am_depcomp="$ac_aux_dir/depcomp"
5676   AMDEPBACKSLASH='\'
5677   am__nodep='_no'
5678 fi
5679  if test "x$enable_dependency_tracking" != xno; then
5680   AMDEP_TRUE=
5681   AMDEP_FALSE='#'
5682 else
5683   AMDEP_TRUE='#'
5684   AMDEP_FALSE=
5685 fi
5686
5687
5688
5689 depcc="$CC"   am_compiler_list=
5690
5691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5692 printf %s "checking dependency style of $depcc... " >&6; }
5693 if test ${am_cv_CC_dependencies_compiler_type+y}
5694 then :
5695   printf %s "(cached) " >&6
5696 else
5697   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5698   # We make a subdir and do the tests there.  Otherwise we can end up
5699   # making bogus files that we don't know about and never remove.  For
5700   # instance it was reported that on HP-UX the gcc test will end up
5701   # making a dummy file named 'D' -- because '-MD' means "put the output
5702   # in D".
5703   rm -rf conftest.dir
5704   mkdir conftest.dir
5705   # Copy depcomp to subdir because otherwise we won't find it if we're
5706   # using a relative directory.
5707   cp "$am_depcomp" conftest.dir
5708   cd conftest.dir
5709   # We will build objects and dependencies in a subdirectory because
5710   # it helps to detect inapplicable dependency modes.  For instance
5711   # both Tru64's cc and ICC support -MD to output dependencies as a
5712   # side effect of compilation, but ICC will put the dependencies in
5713   # the current directory while Tru64 will put them in the object
5714   # directory.
5715   mkdir sub
5716
5717   am_cv_CC_dependencies_compiler_type=none
5718   if test "$am_compiler_list" = ""; then
5719      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5720   fi
5721   am__universal=false
5722   case " $depcc " in #(
5723      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5724      esac
5725
5726   for depmode in $am_compiler_list; do
5727     # Setup a source with many dependencies, because some compilers
5728     # like to wrap large dependency lists on column 80 (with \), and
5729     # we should not choose a depcomp mode which is confused by this.
5730     #
5731     # We need to recreate these files for each test, as the compiler may
5732     # overwrite some of them when testing with obscure command lines.
5733     # This happens at least with the AIX C compiler.
5734     : > sub/conftest.c
5735     for i in 1 2 3 4 5 6; do
5736       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5737       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5738       # Solaris 10 /bin/sh.
5739       echo '/* dummy */' > sub/conftst$i.h
5740     done
5741     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5742
5743     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5744     # mode.  It turns out that the SunPro C++ compiler does not properly
5745     # handle '-M -o', and we need to detect this.  Also, some Intel
5746     # versions had trouble with output in subdirs.
5747     am__obj=sub/conftest.${OBJEXT-o}
5748     am__minus_obj="-o $am__obj"
5749     case $depmode in
5750     gcc)
5751       # This depmode causes a compiler race in universal mode.
5752       test "$am__universal" = false || continue
5753       ;;
5754     nosideeffect)
5755       # After this tag, mechanisms are not by side-effect, so they'll
5756       # only be used when explicitly requested.
5757       if test "x$enable_dependency_tracking" = xyes; then
5758         continue
5759       else
5760         break
5761       fi
5762       ;;
5763     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5764       # This compiler won't grok '-c -o', but also, the minuso test has
5765       # not run yet.  These depmodes are late enough in the game, and
5766       # so weak that their functioning should not be impacted.
5767       am__obj=conftest.${OBJEXT-o}
5768       am__minus_obj=
5769       ;;
5770     none) break ;;
5771     esac
5772     if depmode=$depmode \
5773        source=sub/conftest.c object=$am__obj \
5774        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5775        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5776          >/dev/null 2>conftest.err &&
5777        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5778        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5779        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5780        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5781       # icc doesn't choke on unknown options, it will just issue warnings
5782       # or remarks (even with -Werror).  So we grep stderr for any message
5783       # that says an option was ignored or not supported.
5784       # When given -MP, icc 7.0 and 7.1 complain thusly:
5785       #   icc: Command line warning: ignoring option '-M'; no argument required
5786       # The diagnosis changed in icc 8.0:
5787       #   icc: Command line remark: option '-MP' not supported
5788       if (grep 'ignoring option' conftest.err ||
5789           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5790         am_cv_CC_dependencies_compiler_type=$depmode
5791         break
5792       fi
5793     fi
5794   done
5795
5796   cd ..
5797   rm -rf conftest.dir
5798 else
5799   am_cv_CC_dependencies_compiler_type=none
5800 fi
5801
5802 fi
5803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5804 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5805 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5806
5807  if
5808   test "x$enable_dependency_tracking" != xno \
5809   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5810   am__fastdepCC_TRUE=
5811   am__fastdepCC_FALSE='#'
5812 else
5813   am__fastdepCC_TRUE='#'
5814   am__fastdepCC_FALSE=
5815 fi
5816
5817
5818
5819
5820 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
5821
5822 if test -n "$ac_tool_prefix"; then
5823   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5824 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826 printf %s "checking for $ac_word... " >&6; }
5827 if test ${ac_cv_prog_RANLIB+y}
5828 then :
5829   printf %s "(cached) " >&6
5830 else
5831   if test -n "$RANLIB"; then
5832   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5833 else
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835 for as_dir in $PATH
5836 do
5837   IFS=$as_save_IFS
5838   case $as_dir in #(((
5839     '') as_dir=./ ;;
5840     */) ;;
5841     *) as_dir=$as_dir/ ;;
5842   esac
5843     for ac_exec_ext in '' $ac_executable_extensions; do
5844   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5845     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5846     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5847     break 2
5848   fi
5849 done
5850   done
5851 IFS=$as_save_IFS
5852
5853 fi
5854 fi
5855 RANLIB=$ac_cv_prog_RANLIB
5856 if test -n "$RANLIB"; then
5857   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5858 printf "%s\n" "$RANLIB" >&6; }
5859 else
5860   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 printf "%s\n" "no" >&6; }
5862 fi
5863
5864
5865 fi
5866 if test -z "$ac_cv_prog_RANLIB"; then
5867   ac_ct_RANLIB=$RANLIB
5868   # Extract the first word of "ranlib", so it can be a program name with args.
5869 set dummy ranlib; ac_word=$2
5870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871 printf %s "checking for $ac_word... " >&6; }
5872 if test ${ac_cv_prog_ac_ct_RANLIB+y}
5873 then :
5874   printf %s "(cached) " >&6
5875 else
5876   if test -n "$ac_ct_RANLIB"; then
5877   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5878 else
5879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5880 for as_dir in $PATH
5881 do
5882   IFS=$as_save_IFS
5883   case $as_dir in #(((
5884     '') as_dir=./ ;;
5885     */) ;;
5886     *) as_dir=$as_dir/ ;;
5887   esac
5888     for ac_exec_ext in '' $ac_executable_extensions; do
5889   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5890     ac_cv_prog_ac_ct_RANLIB="ranlib"
5891     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5892     break 2
5893   fi
5894 done
5895   done
5896 IFS=$as_save_IFS
5897
5898 fi
5899 fi
5900 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5901 if test -n "$ac_ct_RANLIB"; then
5902   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5903 printf "%s\n" "$ac_ct_RANLIB" >&6; }
5904 else
5905   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906 printf "%s\n" "no" >&6; }
5907 fi
5908
5909   if test "x$ac_ct_RANLIB" = x; then
5910     RANLIB=":"
5911   else
5912     case $cross_compiling:$ac_tool_warned in
5913 yes:)
5914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5915 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5916 ac_tool_warned=yes ;;
5917 esac
5918     RANLIB=$ac_ct_RANLIB
5919   fi
5920 else
5921   RANLIB="$ac_cv_prog_RANLIB"
5922 fi
5923
5924
5925 ac_header= ac_cache=
5926 for ac_item in $ac_header_c_list
5927 do
5928   if test $ac_cache; then
5929     ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5930     if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5931       printf "%s\n" "#define $ac_item 1" >> confdefs.h
5932     fi
5933     ac_header= ac_cache=
5934   elif test $ac_header; then
5935     ac_cache=$ac_item
5936   else
5937     ac_header=$ac_item
5938   fi
5939 done
5940
5941
5942
5943
5944
5945
5946 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
5947
5948 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
5949
5950 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5951
5952
5953   ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5954 if test "x$ac_cv_header_minix_config_h" = xyes
5955 then :
5956   MINIX=yes
5957 else
5958   MINIX=
5959 fi
5960
5961   if test "$MINIX" = yes; then
5962
5963 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
5964
5965
5966 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
5967
5968
5969 printf "%s\n" "#define _MINIX 1" >>confdefs.h
5970
5971
5972 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5973
5974   fi
5975
5976
5977   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5978 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5979 if test ${ac_cv_safe_to_define___extensions__+y}
5980 then :
5981   printf %s "(cached) " >&6
5982 else
5983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5984 /* end confdefs.h.  */
5985
5986 #         define __EXTENSIONS__ 1
5987           $ac_includes_default
5988 int
5989 main (void)
5990 {
5991
5992   ;
5993   return 0;
5994 }
5995 _ACEOF
5996 if ac_fn_c_try_compile "$LINENO"
5997 then :
5998   ac_cv_safe_to_define___extensions__=yes
5999 else
6000   ac_cv_safe_to_define___extensions__=no
6001 fi
6002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6003 fi
6004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6005 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6006   test $ac_cv_safe_to_define___extensions__ = yes &&
6007     printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6008
6009   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6010
6011   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6012
6013   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6014
6015   printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6016
6017   printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6018
6019   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6020
6021   printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6022
6023   printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6024
6025   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6026
6027   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6028
6029   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6030
6031   printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6032
6033   printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6034
6035   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6036
6037   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6038 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6039 if test ${ac_cv_should_define__xopen_source+y}
6040 then :
6041   printf %s "(cached) " >&6
6042 else
6043   ac_cv_should_define__xopen_source=no
6044      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045 /* end confdefs.h.  */
6046
6047           #include <wchar.h>
6048           mbstate_t x;
6049 int
6050 main (void)
6051 {
6052
6053   ;
6054   return 0;
6055 }
6056 _ACEOF
6057 if ac_fn_c_try_compile "$LINENO"
6058 then :
6059
6060 else
6061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h.  */
6063
6064              #define _XOPEN_SOURCE 500
6065              #include <wchar.h>
6066              mbstate_t x;
6067 int
6068 main (void)
6069 {
6070
6071   ;
6072   return 0;
6073 }
6074 _ACEOF
6075 if ac_fn_c_try_compile "$LINENO"
6076 then :
6077   ac_cv_should_define__xopen_source=yes
6078 fi
6079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6080 fi
6081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082 fi
6083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6084 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6085   test $ac_cv_should_define__xopen_source = yes &&
6086     printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6087
6088   printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6089
6090
6091
6092
6093
6094
6095
6096
6097 ac_ext=c
6098 ac_cpp='$CPP $CPPFLAGS'
6099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6103 printf %s "checking how to run the C preprocessor... " >&6; }
6104 # On Suns, sometimes $CPP names a directory.
6105 if test -n "$CPP" && test -d "$CPP"; then
6106   CPP=
6107 fi
6108 if test -z "$CPP"; then
6109   if test ${ac_cv_prog_CPP+y}
6110 then :
6111   printf %s "(cached) " >&6
6112 else
6113       # Double quotes because CPP needs to be expanded
6114     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6115     do
6116       ac_preproc_ok=false
6117 for ac_c_preproc_warn_flag in '' yes
6118 do
6119   # Use a header file that comes with gcc, so configuring glibc
6120   # with a fresh cross-compiler works.
6121   # On the NeXT, cc -E runs the code through the compiler's parser,
6122   # not just through cpp. "Syntax error" is here to catch this case.
6123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6124 /* end confdefs.h.  */
6125 #include <limits.h>
6126                      Syntax error
6127 _ACEOF
6128 if ac_fn_c_try_cpp "$LINENO"
6129 then :
6130
6131 else
6132   # Broken: fails on valid input.
6133 continue
6134 fi
6135 rm -f conftest.err conftest.i conftest.$ac_ext
6136
6137   # OK, works on sane cases.  Now check whether nonexistent headers
6138   # can be detected and how.
6139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6140 /* end confdefs.h.  */
6141 #include <ac_nonexistent.h>
6142 _ACEOF
6143 if ac_fn_c_try_cpp "$LINENO"
6144 then :
6145   # Broken: success on invalid input.
6146 continue
6147 else
6148   # Passes both tests.
6149 ac_preproc_ok=:
6150 break
6151 fi
6152 rm -f conftest.err conftest.i conftest.$ac_ext
6153
6154 done
6155 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6156 rm -f conftest.i conftest.err conftest.$ac_ext
6157 if $ac_preproc_ok
6158 then :
6159   break
6160 fi
6161
6162     done
6163     ac_cv_prog_CPP=$CPP
6164
6165 fi
6166   CPP=$ac_cv_prog_CPP
6167 else
6168   ac_cv_prog_CPP=$CPP
6169 fi
6170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6171 printf "%s\n" "$CPP" >&6; }
6172 ac_preproc_ok=false
6173 for ac_c_preproc_warn_flag in '' yes
6174 do
6175   # Use a header file that comes with gcc, so configuring glibc
6176   # with a fresh cross-compiler works.
6177   # On the NeXT, cc -E runs the code through the compiler's parser,
6178   # not just through cpp. "Syntax error" is here to catch this case.
6179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h.  */
6181 #include <limits.h>
6182                      Syntax error
6183 _ACEOF
6184 if ac_fn_c_try_cpp "$LINENO"
6185 then :
6186
6187 else
6188   # Broken: fails on valid input.
6189 continue
6190 fi
6191 rm -f conftest.err conftest.i conftest.$ac_ext
6192
6193   # OK, works on sane cases.  Now check whether nonexistent headers
6194   # can be detected and how.
6195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6196 /* end confdefs.h.  */
6197 #include <ac_nonexistent.h>
6198 _ACEOF
6199 if ac_fn_c_try_cpp "$LINENO"
6200 then :
6201   # Broken: success on invalid input.
6202 continue
6203 else
6204   # Passes both tests.
6205 ac_preproc_ok=:
6206 break
6207 fi
6208 rm -f conftest.err conftest.i conftest.$ac_ext
6209
6210 done
6211 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6212 rm -f conftest.i conftest.err conftest.$ac_ext
6213 if $ac_preproc_ok
6214 then :
6215
6216 else
6217   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6218 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6219 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6220 See \`config.log' for more details" "$LINENO" 5; }
6221 fi
6222
6223 ac_ext=c
6224 ac_cpp='$CPP $CPPFLAGS'
6225 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6226 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6227 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6228
6229
6230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6231 printf %s "checking for grep that handles long lines and -e... " >&6; }
6232 if test ${ac_cv_path_GREP+y}
6233 then :
6234   printf %s "(cached) " >&6
6235 else
6236   if test -z "$GREP"; then
6237   ac_path_GREP_found=false
6238   # Loop through the user's path and test for each of PROGNAME-LIST
6239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6241 do
6242   IFS=$as_save_IFS
6243   case $as_dir in #(((
6244     '') as_dir=./ ;;
6245     */) ;;
6246     *) as_dir=$as_dir/ ;;
6247   esac
6248     for ac_prog in grep ggrep
6249    do
6250     for ac_exec_ext in '' $ac_executable_extensions; do
6251       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6252       as_fn_executable_p "$ac_path_GREP" || continue
6253 # Check for GNU ac_path_GREP and select it if it is found.
6254   # Check for GNU $ac_path_GREP
6255 case `"$ac_path_GREP" --version 2>&1` in
6256 *GNU*)
6257   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6258 *)
6259   ac_count=0
6260   printf %s 0123456789 >"conftest.in"
6261   while :
6262   do
6263     cat "conftest.in" "conftest.in" >"conftest.tmp"
6264     mv "conftest.tmp" "conftest.in"
6265     cp "conftest.in" "conftest.nl"
6266     printf "%s\n" 'GREP' >> "conftest.nl"
6267     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269     as_fn_arith $ac_count + 1 && ac_count=$as_val
6270     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6271       # Best one so far, save it but keep looking for a better one
6272       ac_cv_path_GREP="$ac_path_GREP"
6273       ac_path_GREP_max=$ac_count
6274     fi
6275     # 10*(2^10) chars as input seems more than enough
6276     test $ac_count -gt 10 && break
6277   done
6278   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279 esac
6280
6281       $ac_path_GREP_found && break 3
6282     done
6283   done
6284   done
6285 IFS=$as_save_IFS
6286   if test -z "$ac_cv_path_GREP"; then
6287     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6288   fi
6289 else
6290   ac_cv_path_GREP=$GREP
6291 fi
6292
6293 fi
6294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6295 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6296  GREP="$ac_cv_path_GREP"
6297
6298
6299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6300 printf %s "checking for egrep... " >&6; }
6301 if test ${ac_cv_path_EGREP+y}
6302 then :
6303   printf %s "(cached) " >&6
6304 else
6305   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6306    then ac_cv_path_EGREP="$GREP -E"
6307    else
6308      if test -z "$EGREP"; then
6309   ac_path_EGREP_found=false
6310   # Loop through the user's path and test for each of PROGNAME-LIST
6311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6313 do
6314   IFS=$as_save_IFS
6315   case $as_dir in #(((
6316     '') as_dir=./ ;;
6317     */) ;;
6318     *) as_dir=$as_dir/ ;;
6319   esac
6320     for ac_prog in egrep
6321    do
6322     for ac_exec_ext in '' $ac_executable_extensions; do
6323       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6324       as_fn_executable_p "$ac_path_EGREP" || continue
6325 # Check for GNU ac_path_EGREP and select it if it is found.
6326   # Check for GNU $ac_path_EGREP
6327 case `"$ac_path_EGREP" --version 2>&1` in
6328 *GNU*)
6329   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6330 *)
6331   ac_count=0
6332   printf %s 0123456789 >"conftest.in"
6333   while :
6334   do
6335     cat "conftest.in" "conftest.in" >"conftest.tmp"
6336     mv "conftest.tmp" "conftest.in"
6337     cp "conftest.in" "conftest.nl"
6338     printf "%s\n" 'EGREP' >> "conftest.nl"
6339     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6340     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6341     as_fn_arith $ac_count + 1 && ac_count=$as_val
6342     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6343       # Best one so far, save it but keep looking for a better one
6344       ac_cv_path_EGREP="$ac_path_EGREP"
6345       ac_path_EGREP_max=$ac_count
6346     fi
6347     # 10*(2^10) chars as input seems more than enough
6348     test $ac_count -gt 10 && break
6349   done
6350   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6351 esac
6352
6353       $ac_path_EGREP_found && break 3
6354     done
6355   done
6356   done
6357 IFS=$as_save_IFS
6358   if test -z "$ac_cv_path_EGREP"; then
6359     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6360   fi
6361 else
6362   ac_cv_path_EGREP=$EGREP
6363 fi
6364
6365    fi
6366 fi
6367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6368 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6369  EGREP="$ac_cv_path_EGREP"
6370
6371
6372
6373
6374
6375   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6376 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6377 if test ${gl_cv_c_amsterdam_compiler+y}
6378 then :
6379   printf %s "(cached) " >&6
6380 else
6381
6382       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383 /* end confdefs.h.  */
6384
6385 #ifdef __ACK__
6386 Amsterdam
6387 #endif
6388
6389 _ACEOF
6390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6391   $EGREP "Amsterdam" >/dev/null 2>&1
6392 then :
6393   gl_cv_c_amsterdam_compiler=yes
6394 else
6395   gl_cv_c_amsterdam_compiler=no
6396 fi
6397 rm -rf conftest*
6398
6399
6400 fi
6401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6402 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6403
6404       if test $gl_cv_c_amsterdam_compiler = yes; then
6405     if test -z "$AR"; then
6406       AR='cc -c.a'
6407     fi
6408     if test -z "$ARFLAGS"; then
6409       ARFLAGS='-o'
6410     fi
6411   else
6412                                                 :
6413   fi
6414
6415         if test -n "$ac_tool_prefix"; then
6416   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6417 set dummy ${ac_tool_prefix}ar; ac_word=$2
6418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419 printf %s "checking for $ac_word... " >&6; }
6420 if test ${ac_cv_prog_AR+y}
6421 then :
6422   printf %s "(cached) " >&6
6423 else
6424   if test -n "$AR"; then
6425   ac_cv_prog_AR="$AR" # Let the user override the test.
6426 else
6427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428 for as_dir in $PATH
6429 do
6430   IFS=$as_save_IFS
6431   case $as_dir in #(((
6432     '') as_dir=./ ;;
6433     */) ;;
6434     *) as_dir=$as_dir/ ;;
6435   esac
6436     for ac_exec_ext in '' $ac_executable_extensions; do
6437   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6438     ac_cv_prog_AR="${ac_tool_prefix}ar"
6439     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6440     break 2
6441   fi
6442 done
6443   done
6444 IFS=$as_save_IFS
6445
6446 fi
6447 fi
6448 AR=$ac_cv_prog_AR
6449 if test -n "$AR"; then
6450   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6451 printf "%s\n" "$AR" >&6; }
6452 else
6453   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454 printf "%s\n" "no" >&6; }
6455 fi
6456
6457
6458 fi
6459 if test -z "$ac_cv_prog_AR"; then
6460   ac_ct_AR=$AR
6461   # Extract the first word of "ar", so it can be a program name with args.
6462 set dummy ar; ac_word=$2
6463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464 printf %s "checking for $ac_word... " >&6; }
6465 if test ${ac_cv_prog_ac_ct_AR+y}
6466 then :
6467   printf %s "(cached) " >&6
6468 else
6469   if test -n "$ac_ct_AR"; then
6470   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6471 else
6472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473 for as_dir in $PATH
6474 do
6475   IFS=$as_save_IFS
6476   case $as_dir in #(((
6477     '') as_dir=./ ;;
6478     */) ;;
6479     *) as_dir=$as_dir/ ;;
6480   esac
6481     for ac_exec_ext in '' $ac_executable_extensions; do
6482   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6483     ac_cv_prog_ac_ct_AR="ar"
6484     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6485     break 2
6486   fi
6487 done
6488   done
6489 IFS=$as_save_IFS
6490
6491 fi
6492 fi
6493 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6494 if test -n "$ac_ct_AR"; then
6495   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6496 printf "%s\n" "$ac_ct_AR" >&6; }
6497 else
6498   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 printf "%s\n" "no" >&6; }
6500 fi
6501
6502   if test "x$ac_ct_AR" = x; then
6503     AR="ar"
6504   else
6505     case $cross_compiling:$ac_tool_warned in
6506 yes:)
6507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6508 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6509 ac_tool_warned=yes ;;
6510 esac
6511     AR=$ac_ct_AR
6512   fi
6513 else
6514   AR="$ac_cv_prog_AR"
6515 fi
6516
6517   if test -z "$ARFLAGS"; then
6518     ARFLAGS='cr'
6519   fi
6520
6521
6522
6523   if test -z "$RANLIB"; then
6524     if test $gl_cv_c_amsterdam_compiler = yes; then
6525       RANLIB=':'
6526     else
6527             if test -n "$ac_tool_prefix"; then
6528   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6529 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531 printf %s "checking for $ac_word... " >&6; }
6532 if test ${ac_cv_prog_RANLIB+y}
6533 then :
6534   printf %s "(cached) " >&6
6535 else
6536   if test -n "$RANLIB"; then
6537   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6538 else
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540 for as_dir in $PATH
6541 do
6542   IFS=$as_save_IFS
6543   case $as_dir in #(((
6544     '') as_dir=./ ;;
6545     */) ;;
6546     *) as_dir=$as_dir/ ;;
6547   esac
6548     for ac_exec_ext in '' $ac_executable_extensions; do
6549   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6550     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6551     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6552     break 2
6553   fi
6554 done
6555   done
6556 IFS=$as_save_IFS
6557
6558 fi
6559 fi
6560 RANLIB=$ac_cv_prog_RANLIB
6561 if test -n "$RANLIB"; then
6562   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6563 printf "%s\n" "$RANLIB" >&6; }
6564 else
6565   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566 printf "%s\n" "no" >&6; }
6567 fi
6568
6569
6570 fi
6571 if test -z "$ac_cv_prog_RANLIB"; then
6572   ac_ct_RANLIB=$RANLIB
6573   # Extract the first word of "ranlib", so it can be a program name with args.
6574 set dummy ranlib; ac_word=$2
6575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576 printf %s "checking for $ac_word... " >&6; }
6577 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6578 then :
6579   printf %s "(cached) " >&6
6580 else
6581   if test -n "$ac_ct_RANLIB"; then
6582   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6583 else
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585 for as_dir in $PATH
6586 do
6587   IFS=$as_save_IFS
6588   case $as_dir in #(((
6589     '') as_dir=./ ;;
6590     */) ;;
6591     *) as_dir=$as_dir/ ;;
6592   esac
6593     for ac_exec_ext in '' $ac_executable_extensions; do
6594   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6595     ac_cv_prog_ac_ct_RANLIB="ranlib"
6596     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6597     break 2
6598   fi
6599 done
6600   done
6601 IFS=$as_save_IFS
6602
6603 fi
6604 fi
6605 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6606 if test -n "$ac_ct_RANLIB"; then
6607   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6608 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6609 else
6610   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611 printf "%s\n" "no" >&6; }
6612 fi
6613
6614   if test "x$ac_ct_RANLIB" = x; then
6615     RANLIB=":"
6616   else
6617     case $cross_compiling:$ac_tool_warned in
6618 yes:)
6619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6620 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6621 ac_tool_warned=yes ;;
6622 esac
6623     RANLIB=$ac_ct_RANLIB
6624   fi
6625 else
6626   RANLIB="$ac_cv_prog_RANLIB"
6627 fi
6628
6629     fi
6630   fi
6631
6632
6633 # Make sure we can run config.sub.
6634 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6635   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6636
6637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6638 printf %s "checking build system type... " >&6; }
6639 if test ${ac_cv_build+y}
6640 then :
6641   printf %s "(cached) " >&6
6642 else
6643   ac_build_alias=$build_alias
6644 test "x$ac_build_alias" = x &&
6645   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6646 test "x$ac_build_alias" = x &&
6647   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6648 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6649   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6650
6651 fi
6652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6653 printf "%s\n" "$ac_cv_build" >&6; }
6654 case $ac_cv_build in
6655 *-*-*) ;;
6656 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6657 esac
6658 build=$ac_cv_build
6659 ac_save_IFS=$IFS; IFS='-'
6660 set x $ac_cv_build
6661 shift
6662 build_cpu=$1
6663 build_vendor=$2
6664 shift; shift
6665 # Remember, the first character of IFS is used to create $*,
6666 # except with old shells:
6667 build_os=$*
6668 IFS=$ac_save_IFS
6669 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6670
6671
6672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6673 printf %s "checking host system type... " >&6; }
6674 if test ${ac_cv_host+y}
6675 then :
6676   printf %s "(cached) " >&6
6677 else
6678   if test "x$host_alias" = x; then
6679   ac_cv_host=$ac_cv_build
6680 else
6681   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6682     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6683 fi
6684
6685 fi
6686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6687 printf "%s\n" "$ac_cv_host" >&6; }
6688 case $ac_cv_host in
6689 *-*-*) ;;
6690 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6691 esac
6692 host=$ac_cv_host
6693 ac_save_IFS=$IFS; IFS='-'
6694 set x $ac_cv_host
6695 shift
6696 host_cpu=$1
6697 host_vendor=$2
6698 shift; shift
6699 # Remember, the first character of IFS is used to create $*,
6700 # except with old shells:
6701 host_os=$*
6702 IFS=$ac_save_IFS
6703 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6704
6705
6706
6707
6708
6709   # IEEE behaviour is the default on all CPUs except Alpha and SH
6710   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6711   # and the GCC 4.1.2 manual).
6712   case "$host_cpu" in
6713     alpha*)
6714       # On Alpha systems, a compiler option provides the behaviour.
6715       # See the ieee(3) manual page, also available at
6716       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6717       if test -n "$GCC"; then
6718         # GCC has the option -mieee.
6719         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6720         CPPFLAGS="$CPPFLAGS -mieee"
6721       else
6722         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6723         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6724         CPPFLAGS="$CPPFLAGS -ieee"
6725       fi
6726       ;;
6727     sh*)
6728       if test -n "$GCC"; then
6729         # GCC has the option -mieee.
6730         CPPFLAGS="$CPPFLAGS -mieee"
6731       fi
6732       ;;
6733   esac
6734
6735 # Check whether --enable-largefile was given.
6736 if test ${enable_largefile+y}
6737 then :
6738   enableval=$enable_largefile;
6739 fi
6740
6741 if test "$enable_largefile" != no; then
6742
6743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6744 printf %s "checking for special C compiler options needed for large files... " >&6; }
6745 if test ${ac_cv_sys_largefile_CC+y}
6746 then :
6747   printf %s "(cached) " >&6
6748 else
6749   ac_cv_sys_largefile_CC=no
6750      if test "$GCC" != yes; then
6751        ac_save_CC=$CC
6752        while :; do
6753          # IRIX 6.2 and later do not support large files by default,
6754          # so use the C compiler's -n32 option if that helps.
6755          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756 /* end confdefs.h.  */
6757 #include <sys/types.h>
6758  /* Check that off_t can represent 2**63 - 1 correctly.
6759     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6760     since some C++ compilers masquerading as C compilers
6761     incorrectly reject 9223372036854775807.  */
6762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6763   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6764                        && LARGE_OFF_T % 2147483647 == 1)
6765                       ? 1 : -1];
6766 int
6767 main (void)
6768 {
6769
6770   ;
6771   return 0;
6772 }
6773 _ACEOF
6774          if ac_fn_c_try_compile "$LINENO"
6775 then :
6776   break
6777 fi
6778 rm -f core conftest.err conftest.$ac_objext
6779          CC="$CC -n32"
6780          if ac_fn_c_try_compile "$LINENO"
6781 then :
6782   ac_cv_sys_largefile_CC=' -n32'; break
6783 fi
6784 rm -f core conftest.err conftest.$ac_objext
6785          break
6786        done
6787        CC=$ac_save_CC
6788        rm -f conftest.$ac_ext
6789     fi
6790 fi
6791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6792 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
6793   if test "$ac_cv_sys_largefile_CC" != no; then
6794     CC=$CC$ac_cv_sys_largefile_CC
6795   fi
6796
6797   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6798 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6799 if test ${ac_cv_sys_file_offset_bits+y}
6800 then :
6801   printf %s "(cached) " >&6
6802 else
6803   while :; do
6804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805 /* end confdefs.h.  */
6806 #include <sys/types.h>
6807  /* Check that off_t can represent 2**63 - 1 correctly.
6808     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6809     since some C++ compilers masquerading as C compilers
6810     incorrectly reject 9223372036854775807.  */
6811 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6812   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6813                        && LARGE_OFF_T % 2147483647 == 1)
6814                       ? 1 : -1];
6815 int
6816 main (void)
6817 {
6818
6819   ;
6820   return 0;
6821 }
6822 _ACEOF
6823 if ac_fn_c_try_compile "$LINENO"
6824 then :
6825   ac_cv_sys_file_offset_bits=no; break
6826 fi
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h.  */
6830 #define _FILE_OFFSET_BITS 64
6831 #include <sys/types.h>
6832  /* Check that off_t can represent 2**63 - 1 correctly.
6833     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6834     since some C++ compilers masquerading as C compilers
6835     incorrectly reject 9223372036854775807.  */
6836 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6837   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6838                        && LARGE_OFF_T % 2147483647 == 1)
6839                       ? 1 : -1];
6840 int
6841 main (void)
6842 {
6843
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 if ac_fn_c_try_compile "$LINENO"
6849 then :
6850   ac_cv_sys_file_offset_bits=64; break
6851 fi
6852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6853   ac_cv_sys_file_offset_bits=unknown
6854   break
6855 done
6856 fi
6857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6858 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
6859 case $ac_cv_sys_file_offset_bits in #(
6860   no | unknown) ;;
6861   *)
6862 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
6863 ;;
6864 esac
6865 rm -rf conftest*
6866   if test $ac_cv_sys_file_offset_bits = unknown; then
6867     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6868 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
6869 if test ${ac_cv_sys_large_files+y}
6870 then :
6871   printf %s "(cached) " >&6
6872 else
6873   while :; do
6874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h.  */
6876 #include <sys/types.h>
6877  /* Check that off_t can represent 2**63 - 1 correctly.
6878     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6879     since some C++ compilers masquerading as C compilers
6880     incorrectly reject 9223372036854775807.  */
6881 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6882   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6883                        && LARGE_OFF_T % 2147483647 == 1)
6884                       ? 1 : -1];
6885 int
6886 main (void)
6887 {
6888
6889   ;
6890   return 0;
6891 }
6892 _ACEOF
6893 if ac_fn_c_try_compile "$LINENO"
6894 then :
6895   ac_cv_sys_large_files=no; break
6896 fi
6897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899 /* end confdefs.h.  */
6900 #define _LARGE_FILES 1
6901 #include <sys/types.h>
6902  /* Check that off_t can represent 2**63 - 1 correctly.
6903     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6904     since some C++ compilers masquerading as C compilers
6905     incorrectly reject 9223372036854775807.  */
6906 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6907   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6908                        && LARGE_OFF_T % 2147483647 == 1)
6909                       ? 1 : -1];
6910 int
6911 main (void)
6912 {
6913
6914   ;
6915   return 0;
6916 }
6917 _ACEOF
6918 if ac_fn_c_try_compile "$LINENO"
6919 then :
6920   ac_cv_sys_large_files=1; break
6921 fi
6922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923   ac_cv_sys_large_files=unknown
6924   break
6925 done
6926 fi
6927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6928 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
6929 case $ac_cv_sys_large_files in #(
6930   no | unknown) ;;
6931   *)
6932 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
6933 ;;
6934 esac
6935 rm -rf conftest*
6936   fi
6937
6938
6939 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6940
6941 fi
6942
6943
6944
6945
6946   # Pre-early section.
6947
6948
6949
6950
6951   # Code from module absolute-header:
6952   # Code from module accept:
6953   # Code from module accept-tests:
6954   # Code from module alloca:
6955   # Code from module alloca-opt:
6956   # Code from module alloca-opt-tests:
6957   # Code from module allocator:
6958   # Code from module announce-gen:
6959   # Code from module areadlink:
6960   # Code from module areadlink-tests:
6961   # Code from module argmatch:
6962   # Code from module argmatch-tests:
6963   # Code from module arpa_inet:
6964   # Code from module arpa_inet-tests:
6965   # Code from module assure:
6966   # Code from module binary-io:
6967   # Code from module binary-io-tests:
6968   # Code from module bind:
6969   # Code from module bind-tests:
6970   # Code from module bitrotate:
6971   # Code from module bitrotate-tests:
6972   # Code from module btowc:
6973   # Code from module btowc-tests:
6974   # Code from module builtin-expect:
6975   # Code from module c-ctype:
6976   # Code from module c-ctype-tests:
6977   # Code from module c-stack:
6978   # Code from module c-stack-tests:
6979   # Code from module c-strcase:
6980   # Code from module c-strcase-tests:
6981   # Code from module c-strcaseeq:
6982   # Code from module careadlinkat:
6983   # Code from module clock-time:
6984   # Code from module cloexec:
6985   # Code from module cloexec-tests:
6986   # Code from module close:
6987   # Code from module close-tests:
6988   # Code from module config-h:
6989   # Code from module connect:
6990   # Code from module connect-tests:
6991   # Code from module ctype:
6992   # Code from module ctype-tests:
6993   # Code from module diffseq:
6994   # Code from module dirname:
6995   # Code from module dirname-lgpl:
6996   # Code from module dirname-tests:
6997   # Code from module do-release-commit-and-tag:
6998   # Code from module dosname:
6999   # Code from module double-slash-root:
7000   # Code from module dtotimespec:
7001   # Code from module dup2:
7002   # Code from module dup2-tests:
7003   # Code from module environ:
7004   # Code from module environ-tests:
7005   # Code from module errno:
7006   # Code from module errno-tests:
7007   # Code from module error:
7008   # Code from module exclude:
7009   # Code from module exclude-tests:
7010   # Code from module exitfail:
7011   # Code from module extensions:
7012   # Code from module extern-inline:
7013   # Code from module fcntl:
7014   # Code from module fcntl-h:
7015   # Code from module fcntl-h-tests:
7016   # Code from module fcntl-tests:
7017   # Code from module fd-hook:
7018   # Code from module fdl:
7019   # Code from module fdopen:
7020   # Code from module fdopen-tests:
7021   # Code from module fgetc-tests:
7022   # Code from module file-type:
7023   # Code from module filename:
7024   # Code from module filenamecat:
7025   # Code from module filenamecat-lgpl:
7026   # Code from module filenamecat-tests:
7027   # Code from module flexmember:
7028   # Code from module float:
7029   # Code from module float-tests:
7030   # Code from module fnmatch:
7031   # Code from module fnmatch-gnu:
7032   # Code from module fnmatch-h:
7033   # Code from module fnmatch-h-tests:
7034   # Code from module fnmatch-tests:
7035   # Code from module fpieee:
7036
7037   # Code from module fpucw:
7038   # Code from module fputc-tests:
7039   # Code from module fread-tests:
7040   # Code from module freopen:
7041   # Code from module freopen-safer:
7042   # Code from module freopen-safer-tests:
7043   # Code from module freopen-tests:
7044   # Code from module fstat:
7045   # Code from module fstat-tests:
7046   # Code from module ftruncate:
7047   # Code from module ftruncate-tests:
7048   # Code from module fwrite-tests:
7049   # Code from module gendocs:
7050   # Code from module getcwd-lgpl:
7051   # Code from module getcwd-lgpl-tests:
7052   # Code from module getdtablesize:
7053   # Code from module getdtablesize-tests:
7054   # Code from module getopt:
7055   # Code from module getopt-gnu:
7056   # Code from module getopt-gnu-tests:
7057   # Code from module getopt-posix:
7058   # Code from module getopt-posix-tests:
7059   # Code from module getpagesize:
7060   # Code from module getprogname:
7061   # Code from module getprogname-tests:
7062   # Code from module gettext-h:
7063   # Code from module gettime:
7064   # Code from module gettimeofday:
7065   # Code from module gettimeofday-tests:
7066   # Code from module git-version-gen:
7067   # Code from module gitlog-to-changelog:
7068   # Code from module gnu-make:
7069   # Code from module gnu-web-doc-update:
7070   # Code from module gnumakefile:
7071   # Code from module gnupload:
7072   # Code from module gperf:
7073   # Code from module hard-locale:
7074   # Code from module hash:
7075   # Code from module hash-pjw:
7076   # Code from module hash-tests:
7077   # Code from module havelib:
7078   # Code from module iconv:
7079   # Code from module iconv-h:
7080   # Code from module iconv-h-tests:
7081   # Code from module iconv-tests:
7082   # Code from module iconv_open:
7083   # Code from module ignore-value:
7084   # Code from module ignore-value-tests:
7085   # Code from module include_next:
7086   # Code from module inet_pton:
7087   # Code from module inet_pton-tests:
7088   # Code from module inline:
7089   # Code from module intprops:
7090   # Code from module intprops-tests:
7091   # Code from module inttostr:
7092   # Code from module inttostr-tests:
7093   # Code from module inttypes:
7094   # Code from module inttypes-incomplete:
7095   # Code from module inttypes-tests:
7096   # Code from module ioctl:
7097   # Code from module ioctl-tests:
7098   # Code from module isblank:
7099   # Code from module isblank-tests:
7100   # Code from module iswblank:
7101   # Code from module iswblank-tests:
7102   # Code from module langinfo:
7103   # Code from module langinfo-tests:
7104   # Code from module largefile:
7105
7106   # Code from module libc-config:
7107   # Code from module libsigsegv:
7108   # Code from module limits-h:
7109   # Code from module limits-h-tests:
7110   # Code from module listen:
7111   # Code from module listen-tests:
7112   # Code from module localcharset:
7113   # Code from module localcharset-tests:
7114   # Code from module locale:
7115   # Code from module locale-tests:
7116   # Code from module localeconv:
7117   # Code from module localeconv-tests:
7118   # Code from module localtime-buffer:
7119   # Code from module lstat:
7120   # Code from module lstat-tests:
7121   # Code from module maintainer-makefile:
7122   # Code from module malloc-posix:
7123   # Code from module malloca:
7124   # Code from module malloca-tests:
7125   # Code from module manywarnings:
7126   # Code from module mbchar:
7127   # Code from module mbiter:
7128   # Code from module mbrtowc:
7129   # Code from module mbrtowc-tests:
7130   # Code from module mbscasecmp:
7131   # Code from module mbscasecmp-tests:
7132   # Code from module mbsinit:
7133   # Code from module mbsinit-tests:
7134   # Code from module mbslen:
7135   # Code from module mbsrtowcs:
7136   # Code from module mbsrtowcs-tests:
7137   # Code from module mbsstr:
7138   # Code from module mbsstr-tests:
7139   # Code from module mbtowc:
7140   # Code from module mbuiter:
7141   # Code from module memchr:
7142   # Code from module memchr-tests:
7143   # Code from module minmax:
7144   # Code from module mkdir:
7145   # Code from module mkdir-tests:
7146   # Code from module mkstemp:
7147   # Code from module mktime:
7148   # Code from module mktime-internal:
7149   # Code from module msvc-inval:
7150   # Code from module msvc-nothrow:
7151   # Code from module multiarch:
7152   # Code from module nanosleep:
7153   # Code from module nanosleep-tests:
7154   # Code from module netinet_in:
7155   # Code from module netinet_in-tests:
7156   # Code from module nl_langinfo:
7157   # Code from module nl_langinfo-tests:
7158   # Code from module nocrash:
7159   # Code from module nstrftime:
7160   # Code from module nstrftime-tests:
7161   # Code from module open:
7162   # Code from module open-tests:
7163   # Code from module pathmax:
7164   # Code from module pathmax-tests:
7165   # Code from module perror:
7166   # Code from module perror-tests:
7167   # Code from module pipe-posix:
7168   # Code from module pipe-posix-tests:
7169   # Code from module progname:
7170   # Code from module propername:
7171   # Code from module putenv:
7172   # Code from module quote:
7173   # Code from module quotearg:
7174   # Code from module quotearg-simple:
7175   # Code from module quotearg-simple-tests:
7176   # Code from module raise:
7177   # Code from module raise-tests:
7178   # Code from module rawmemchr:
7179   # Code from module rawmemchr-tests:
7180   # Code from module readlink:
7181   # Code from module readlink-tests:
7182   # Code from module readme-release:
7183   # Code from module regex:
7184   # Code from module regex-tests:
7185   # Code from module same-inode:
7186   # Code from module select:
7187   # Code from module select-tests:
7188   # Code from module setenv:
7189   # Code from module setenv-tests:
7190   # Code from module setlocale:
7191   # Code from module setlocale-tests:
7192   # Code from module setsockopt:
7193   # Code from module setsockopt-tests:
7194   # Code from module sh-quote:
7195   # Code from module sh-quote-tests:
7196   # Code from module sigaction:
7197   # Code from module sigaction-tests:
7198   # Code from module signal:
7199   # Code from module signal-h:
7200   # Code from module signal-h-tests:
7201   # Code from module sigprocmask:
7202   # Code from module sigprocmask-tests:
7203   # Code from module size_max:
7204   # Code from module sleep:
7205   # Code from module sleep-tests:
7206   # Code from module snippet/_Noreturn:
7207   # Code from module snippet/arg-nonnull:
7208   # Code from module snippet/c++defs:
7209   # Code from module snippet/unused-parameter:
7210   # Code from module snippet/warn-on-use:
7211   # Code from module snprintf:
7212   # Code from module snprintf-tests:
7213   # Code from module socket:
7214   # Code from module socketlib:
7215   # Code from module sockets:
7216   # Code from module sockets-tests:
7217   # Code from module socklen:
7218   # Code from module ssize_t:
7219   # Code from module stat:
7220   # Code from module stat-macros:
7221   # Code from module stat-tests:
7222   # Code from module stat-time:
7223   # Code from module stat-time-tests:
7224   # Code from module stdalign:
7225   # Code from module stdalign-tests:
7226   # Code from module stdarg:
7227
7228
7229
7230   # Code from module stdbool:
7231   # Code from module stdbool-tests:
7232   # Code from module stddef:
7233   # Code from module stddef-tests:
7234   # Code from module stdint:
7235   # Code from module stdint-tests:
7236   # Code from module stdio:
7237   # Code from module stdio-tests:
7238   # Code from module stdlib:
7239   # Code from module stdlib-tests:
7240   # Code from module strcase:
7241   # Code from module streq:
7242   # Code from module strerror:
7243   # Code from module strerror-override:
7244   # Code from module strerror-tests:
7245   # Code from module strerror_r-posix:
7246   # Code from module strerror_r-posix-tests:
7247   # Code from module strftime:
7248   # Code from module striconv:
7249   # Code from module striconv-tests:
7250   # Code from module string:
7251   # Code from module string-tests:
7252   # Code from module strings:
7253   # Code from module strings-tests:
7254   # Code from module strndup:
7255   # Code from module strnlen:
7256   # Code from module strnlen-tests:
7257   # Code from module strnlen1:
7258   # Code from module strptime:
7259   # Code from module strtoull:
7260   # Code from module strtoull-tests:
7261   # Code from module strtoumax:
7262   # Code from module strtoumax-tests:
7263   # Code from module symlink:
7264   # Code from module symlink-tests:
7265   # Code from module sys_ioctl:
7266   # Code from module sys_ioctl-tests:
7267   # Code from module sys_select:
7268   # Code from module sys_select-tests:
7269   # Code from module sys_socket:
7270   # Code from module sys_socket-tests:
7271   # Code from module sys_stat:
7272   # Code from module sys_stat-tests:
7273   # Code from module sys_time:
7274   # Code from module sys_time-tests:
7275   # Code from module sys_types:
7276   # Code from module sys_types-tests:
7277   # Code from module sys_uio:
7278   # Code from module sys_uio-tests:
7279   # Code from module sys_wait:
7280   # Code from module sys_wait-tests:
7281   # Code from module system-quote:
7282   # Code from module tempname:
7283   # Code from module test-framework-sh:
7284   # Code from module test-framework-sh-tests:
7285   # Code from module time:
7286   # Code from module time-tests:
7287   # Code from module time_r:
7288   # Code from module time_rz:
7289   # Code from module timegm:
7290   # Code from module timespec:
7291   # Code from module timespec-add:
7292   # Code from module timespec-sub:
7293   # Code from module timespec-tests:
7294   # Code from module trim:
7295   # Code from module tzset:
7296   # Code from module unistd:
7297   # Code from module unistd-tests:
7298   # Code from module unistr/base:
7299   # Code from module unistr/u8-mbtoucr:
7300   # Code from module unistr/u8-mbtoucr-tests:
7301   # Code from module unistr/u8-uctomb:
7302   # Code from module unistr/u8-uctomb-tests:
7303   # Code from module unitypes:
7304   # Code from module uniwidth/base:
7305   # Code from module uniwidth/width:
7306   # Code from module uniwidth/width-tests:
7307   # Code from module unlocked-io:
7308   # Code from module unsetenv:
7309   # Code from module unsetenv-tests:
7310   # Code from module update-copyright:
7311   # Code from module update-copyright-tests:
7312   # Code from module useless-if-before-free:
7313   # Code from module vararrays:
7314   # Code from module vasnprintf:
7315   # Code from module vasnprintf-tests:
7316   # Code from module vasprintf:
7317   # Code from module vasprintf-tests:
7318   # Code from module vc-list-files:
7319   # Code from module vc-list-files-tests:
7320   # Code from module verify:
7321   # Code from module verify-tests:
7322   # Code from module version-etc:
7323   # Code from module version-etc-fsf:
7324   # Code from module version-etc-tests:
7325   # Code from module warnings:
7326   # Code from module wchar:
7327   # Code from module wchar-tests:
7328   # Code from module wcrtomb:
7329   # Code from module wcrtomb-tests:
7330   # Code from module wctob:
7331   # Code from module wctomb:
7332   # Code from module wctype-h:
7333   # Code from module wctype-h-tests:
7334   # Code from module wcwidth:
7335   # Code from module wcwidth-tests:
7336   # Code from module xalloc:
7337   # Code from module xalloc-die:
7338   # Code from module xalloc-die-tests:
7339   # Code from module xalloc-oversized:
7340   # Code from module xfreopen:
7341   # Code from module xreadlink:
7342   # Code from module xsize:
7343   # Code from module xstriconv:
7344   # Code from module xstrndup:
7345   # Code from module xstrtol:
7346   # Code from module xstrtol-tests:
7347   # Code from module xstrtoumax:
7348   # Code from module xstrtoumax-tests:
7349   # Code from module xvasprintf:
7350   # Code from module xvasprintf-tests:
7351
7352
7353
7354
7355
7356
7357
7358           LIBC_FATAL_STDERR_=1
7359   export LIBC_FATAL_STDERR_
7360
7361 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7362 if test "x$ac_cv_type_size_t" = xyes
7363 then :
7364
7365 else
7366
7367 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7368
7369 fi
7370
7371 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7372 # for constant arguments.  Useless!
7373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7374 printf %s "checking for working alloca.h... " >&6; }
7375 if test ${ac_cv_working_alloca_h+y}
7376 then :
7377   printf %s "(cached) " >&6
7378 else
7379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7380 /* end confdefs.h.  */
7381 #include <alloca.h>
7382 int
7383 main (void)
7384 {
7385 char *p = (char *) alloca (2 * sizeof (int));
7386                           if (p) return 0;
7387   ;
7388   return 0;
7389 }
7390 _ACEOF
7391 if ac_fn_c_try_link "$LINENO"
7392 then :
7393   ac_cv_working_alloca_h=yes
7394 else
7395   ac_cv_working_alloca_h=no
7396 fi
7397 rm -f core conftest.err conftest.$ac_objext \
7398     conftest$ac_exeext conftest.$ac_ext
7399 fi
7400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7401 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7402 if test $ac_cv_working_alloca_h = yes; then
7403
7404 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7405
7406 fi
7407
7408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7409 printf %s "checking for alloca... " >&6; }
7410 if test ${ac_cv_func_alloca_works+y}
7411 then :
7412   printf %s "(cached) " >&6
7413 else
7414   if test $ac_cv_working_alloca_h = yes; then
7415   ac_cv_func_alloca_works=yes
7416 else
7417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418 /* end confdefs.h.  */
7419 #include <stdlib.h>
7420 #include <stddef.h>
7421 #ifndef alloca
7422 # ifdef __GNUC__
7423 #  define alloca __builtin_alloca
7424 # elif defined _MSC_VER
7425 #  include <malloc.h>
7426 #  define alloca _alloca
7427 # else
7428 #  ifdef  __cplusplus
7429 extern "C"
7430 #  endif
7431 void *alloca (size_t);
7432 # endif
7433 #endif
7434
7435 int
7436 main (void)
7437 {
7438 char *p = (char *) alloca (1);
7439                                     if (p) return 0;
7440   ;
7441   return 0;
7442 }
7443 _ACEOF
7444 if ac_fn_c_try_link "$LINENO"
7445 then :
7446   ac_cv_func_alloca_works=yes
7447 else
7448   ac_cv_func_alloca_works=no
7449 fi
7450 rm -f core conftest.err conftest.$ac_objext \
7451     conftest$ac_exeext conftest.$ac_ext
7452 fi
7453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7454 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7455 fi
7456
7457 if test $ac_cv_func_alloca_works = yes; then
7458
7459 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7460
7461 else
7462   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7463 # that cause trouble.  Some versions do not even contain alloca or
7464 # contain a buggy version.  If you still want to use their alloca,
7465 # use ar to extract alloca.o from them instead of compiling alloca.c.
7466
7467
7468
7469
7470
7471 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7472
7473 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7474
7475
7476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7477 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7478 if test ${ac_cv_os_cray+y}
7479 then :
7480   printf %s "(cached) " >&6
7481 else
7482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7483 /* end confdefs.h.  */
7484 #if defined CRAY && ! defined CRAY2
7485 webecray
7486 #else
7487 wenotbecray
7488 #endif
7489
7490 _ACEOF
7491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7492   $EGREP "webecray" >/dev/null 2>&1
7493 then :
7494   ac_cv_os_cray=yes
7495 else
7496   ac_cv_os_cray=no
7497 fi
7498 rm -rf conftest*
7499
7500 fi
7501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7502 printf "%s\n" "$ac_cv_os_cray" >&6; }
7503 if test $ac_cv_os_cray = yes; then
7504   for ac_func in _getb67 GETB67 getb67; do
7505     as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7506 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7507 if eval test \"x\$"$as_ac_var"\" = x"yes"
7508 then :
7509
7510 printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
7511
7512     break
7513 fi
7514
7515   done
7516 fi
7517
7518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7519 printf %s "checking stack direction for C alloca... " >&6; }
7520 if test ${ac_cv_c_stack_direction+y}
7521 then :
7522   printf %s "(cached) " >&6
7523 else
7524   if test "$cross_compiling" = yes
7525 then :
7526   ac_cv_c_stack_direction=0
7527 else
7528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7529 /* end confdefs.h.  */
7530 $ac_includes_default
7531 int
7532 find_stack_direction (int *addr, int depth)
7533 {
7534   int dir, dummy = 0;
7535   if (! addr)
7536     addr = &dummy;
7537   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7538   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7539   return dir + dummy;
7540 }
7541
7542 int
7543 main (int argc, char **argv)
7544 {
7545   return find_stack_direction (0, argc + !argv + 20) < 0;
7546 }
7547 _ACEOF
7548 if ac_fn_c_try_run "$LINENO"
7549 then :
7550   ac_cv_c_stack_direction=1
7551 else
7552   ac_cv_c_stack_direction=-1
7553 fi
7554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7555   conftest.$ac_objext conftest.beam conftest.$ac_ext
7556 fi
7557
7558 fi
7559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7560 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7561 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
7562
7563
7564 fi
7565
7566
7567   GNULIB_BTOWC=0;
7568   GNULIB_WCTOB=0;
7569   GNULIB_MBSINIT=0;
7570   GNULIB_MBRTOWC=0;
7571   GNULIB_MBRLEN=0;
7572   GNULIB_MBSRTOWCS=0;
7573   GNULIB_MBSNRTOWCS=0;
7574   GNULIB_WCRTOMB=0;
7575   GNULIB_WCSRTOMBS=0;
7576   GNULIB_WCSNRTOMBS=0;
7577   GNULIB_WCWIDTH=0;
7578   GNULIB_WMEMCHR=0;
7579   GNULIB_WMEMCMP=0;
7580   GNULIB_WMEMCPY=0;
7581   GNULIB_WMEMMOVE=0;
7582   GNULIB_WMEMSET=0;
7583   GNULIB_WCSLEN=0;
7584   GNULIB_WCSNLEN=0;
7585   GNULIB_WCSCPY=0;
7586   GNULIB_WCPCPY=0;
7587   GNULIB_WCSNCPY=0;
7588   GNULIB_WCPNCPY=0;
7589   GNULIB_WCSCAT=0;
7590   GNULIB_WCSNCAT=0;
7591   GNULIB_WCSCMP=0;
7592   GNULIB_WCSNCMP=0;
7593   GNULIB_WCSCASECMP=0;
7594   GNULIB_WCSNCASECMP=0;
7595   GNULIB_WCSCOLL=0;
7596   GNULIB_WCSXFRM=0;
7597   GNULIB_WCSDUP=0;
7598   GNULIB_WCSCHR=0;
7599   GNULIB_WCSRCHR=0;
7600   GNULIB_WCSCSPN=0;
7601   GNULIB_WCSSPN=0;
7602   GNULIB_WCSPBRK=0;
7603   GNULIB_WCSSTR=0;
7604   GNULIB_WCSTOK=0;
7605   GNULIB_WCSWIDTH=0;
7606   GNULIB_WCSFTIME=0;
7607     HAVE_BTOWC=1;
7608   HAVE_MBSINIT=1;
7609   HAVE_MBRTOWC=1;
7610   HAVE_MBRLEN=1;
7611   HAVE_MBSRTOWCS=1;
7612   HAVE_MBSNRTOWCS=1;
7613   HAVE_WCRTOMB=1;
7614   HAVE_WCSRTOMBS=1;
7615   HAVE_WCSNRTOMBS=1;
7616   HAVE_WMEMCHR=1;
7617   HAVE_WMEMCMP=1;
7618   HAVE_WMEMCPY=1;
7619   HAVE_WMEMMOVE=1;
7620   HAVE_WMEMSET=1;
7621   HAVE_WCSLEN=1;
7622   HAVE_WCSNLEN=1;
7623   HAVE_WCSCPY=1;
7624   HAVE_WCPCPY=1;
7625   HAVE_WCSNCPY=1;
7626   HAVE_WCPNCPY=1;
7627   HAVE_WCSCAT=1;
7628   HAVE_WCSNCAT=1;
7629   HAVE_WCSCMP=1;
7630   HAVE_WCSNCMP=1;
7631   HAVE_WCSCASECMP=1;
7632   HAVE_WCSNCASECMP=1;
7633   HAVE_WCSCOLL=1;
7634   HAVE_WCSXFRM=1;
7635   HAVE_WCSDUP=1;
7636   HAVE_WCSCHR=1;
7637   HAVE_WCSRCHR=1;
7638   HAVE_WCSCSPN=1;
7639   HAVE_WCSSPN=1;
7640   HAVE_WCSPBRK=1;
7641   HAVE_WCSSTR=1;
7642   HAVE_WCSTOK=1;
7643   HAVE_WCSWIDTH=1;
7644   HAVE_WCSFTIME=1;
7645   HAVE_DECL_WCTOB=1;
7646   HAVE_DECL_WCWIDTH=1;
7647   REPLACE_MBSTATE_T=0;
7648   REPLACE_BTOWC=0;
7649   REPLACE_WCTOB=0;
7650   REPLACE_MBSINIT=0;
7651   REPLACE_MBRTOWC=0;
7652   REPLACE_MBRLEN=0;
7653   REPLACE_MBSRTOWCS=0;
7654   REPLACE_MBSNRTOWCS=0;
7655   REPLACE_WCRTOMB=0;
7656   REPLACE_WCSRTOMBS=0;
7657   REPLACE_WCSNRTOMBS=0;
7658   REPLACE_WCWIDTH=0;
7659   REPLACE_WCSWIDTH=0;
7660   REPLACE_WCSFTIME=0;
7661
7662
7663             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7664 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7665 if test ${gl_cv_header_wchar_h_correct_inline+y}
7666 then :
7667   printf %s "(cached) " >&6
7668 else
7669   gl_cv_header_wchar_h_correct_inline=yes
7670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h.  */
7672
7673        #define wcstod renamed_wcstod
7674 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7675    <wchar.h>.
7676    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7677    included before <wchar.h>.  */
7678 #include <stddef.h>
7679 #include <stdio.h>
7680 #include <time.h>
7681 #include <wchar.h>
7682 extern int zero (void);
7683 int main () { return zero(); }
7684
7685 _ACEOF
7686                               save_ac_compile="$ac_compile"
7687      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7688      if echo '#include "conftest.c"' >conftest1.c &&
7689         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7690   (eval $ac_compile) 2>&5
7691   ac_status=$?
7692   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7693   test $ac_status = 0; }; then
7694        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695 /* end confdefs.h.  */
7696
7697          #define wcstod renamed_wcstod
7698 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7699    <wchar.h>.
7700    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7701    included before <wchar.h>.  */
7702 #include <stddef.h>
7703 #include <stdio.h>
7704 #include <time.h>
7705 #include <wchar.h>
7706 int zero (void) { return 0; }
7707
7708 _ACEOF
7709               ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7710        if echo '#include "conftest.c"' >conftest2.c &&
7711           { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7712   (eval $ac_compile) 2>&5
7713   ac_status=$?
7714   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7715   test $ac_status = 0; }; then
7716          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7717            :
7718          else
7719            gl_cv_header_wchar_h_correct_inline=no
7720          fi
7721        fi
7722      fi
7723      ac_compile="$save_ac_compile"
7724      rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7725
7726 fi
7727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7728 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
7729   if test $gl_cv_header_wchar_h_correct_inline = no; then
7730     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7731 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7732 C99 mode. You have four options:
7733   - Add the flag -fgnu89-inline to CC and reconfigure, or
7734   - Fix your include files, using parts of
7735     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7736   - Use a gcc version older than 4.3, or
7737   - Don't use the flags -std=c99 or -std=gnu99.
7738 Configuration aborted." "$LINENO" 5
7739   fi
7740
7741 ac_func=
7742 for ac_item in $ac_func_c_list
7743 do
7744   if test $ac_func; then
7745     ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
7746     if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
7747       echo "#define $ac_item 1" >> confdefs.h
7748     fi
7749     ac_func=
7750   else
7751     ac_func=$ac_item
7752   fi
7753 done
7754
7755   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7756 printf %s "checking for nl_langinfo and CODESET... " >&6; }
7757 if test ${am_cv_langinfo_codeset+y}
7758 then :
7759   printf %s "(cached) " >&6
7760 else
7761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7762 /* end confdefs.h.  */
7763 #include <langinfo.h>
7764 int
7765 main (void)
7766 {
7767 char* cs = nl_langinfo(CODESET); return !cs;
7768   ;
7769   return 0;
7770 }
7771 _ACEOF
7772 if ac_fn_c_try_link "$LINENO"
7773 then :
7774   am_cv_langinfo_codeset=yes
7775 else
7776   am_cv_langinfo_codeset=no
7777 fi
7778 rm -f core conftest.err conftest.$ac_objext \
7779     conftest$ac_exeext conftest.$ac_ext
7780
7781 fi
7782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7783 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
7784   if test $am_cv_langinfo_codeset = yes; then
7785
7786 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7787
7788   fi
7789
7790
7791
7792
7793   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7794 printf %s "checking for a traditional french locale... " >&6; }
7795 if test ${gt_cv_locale_fr+y}
7796 then :
7797   printf %s "(cached) " >&6
7798 else
7799
7800     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801 /* end confdefs.h.  */
7802
7803 #include <locale.h>
7804 #include <time.h>
7805 #if HAVE_LANGINFO_CODESET
7806 # include <langinfo.h>
7807 #endif
7808 #include <stdlib.h>
7809 #include <string.h>
7810 struct tm t;
7811 char buf[16];
7812 int main () {
7813   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
7814      imitates locale dependent behaviour by looking at the environment
7815      variables, and all locales use the UTF-8 encoding.  */
7816 #if defined __BEOS__ || defined __HAIKU__
7817   return 1;
7818 #else
7819   /* Check whether the given locale name is recognized by the system.  */
7820 # if defined _WIN32 && !defined __CYGWIN__
7821   /* On native Windows, setlocale(category, "") looks at the system settings,
7822      not at the environment variables.  Also, when an encoding suffix such
7823      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7824      category of the locale to "C".  */
7825   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7826       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7827     return 1;
7828 # else
7829   if (setlocale (LC_ALL, "") == NULL) return 1;
7830 # endif
7831   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7832      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7833      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7834      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7835      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7836      some unit tests fail.
7837      On MirBSD 10, when an unsupported locale is specified, setlocale()
7838      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
7839 # if HAVE_LANGINFO_CODESET
7840   {
7841     const char *cs = nl_langinfo (CODESET);
7842     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7843         || strcmp (cs, "UTF-8") == 0)
7844       return 1;
7845   }
7846 # endif
7847 # ifdef __CYGWIN__
7848   /* On Cygwin, avoid locale names without encoding suffix, because the
7849      locale_charset() function relies on the encoding suffix.  Note that
7850      LC_ALL is set on the command line.  */
7851   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7852 # endif
7853   /* Check whether in the abbreviation of the second month, the second
7854      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7855      one byte long. This excludes the UTF-8 encoding.  */
7856   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7857   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7858 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
7859   /* Check whether the decimal separator is a comma.
7860      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7861      are nl_langinfo(RADIXCHAR) are both ".".  */
7862   if (localeconv () ->decimal_point[0] != ',') return 1;
7863 # endif
7864   return 0;
7865 #endif
7866 }
7867
7868 _ACEOF
7869     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7870   (eval $ac_link) 2>&5
7871   ac_status=$?
7872   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7873   test $ac_status = 0; } && test -s conftest$ac_exeext; then
7874       case "$host_os" in
7875         # Handle native Windows specially, because there setlocale() interprets
7876         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7877         # "fr" or "fra" as "French" or "French_France.1252",
7878         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7879         # "ja" as "Japanese" or "Japanese_Japan.932",
7880         # and similar.
7881         mingw*)
7882           # Test for the native Windows locale name.
7883           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7884             gt_cv_locale_fr=French_France.1252
7885           else
7886             # None found.
7887             gt_cv_locale_fr=none
7888           fi
7889           ;;
7890         *)
7891           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7892           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7893           # configure script would override the LC_ALL setting. Likewise for
7894           # LC_CTYPE, which is also set at the beginning of the configure script.
7895           # Test for the usual locale name.
7896           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7897             gt_cv_locale_fr=fr_FR
7898           else
7899             # Test for the locale name with explicit encoding suffix.
7900             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7901               gt_cv_locale_fr=fr_FR.ISO-8859-1
7902             else
7903               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7904               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7905                 gt_cv_locale_fr=fr_FR.ISO8859-1
7906               else
7907                 # Test for the HP-UX locale name.
7908                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7909                   gt_cv_locale_fr=fr_FR.iso88591
7910                 else
7911                   # Test for the Solaris 7 locale name.
7912                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7913                     gt_cv_locale_fr=fr
7914                   else
7915                     # None found.
7916                     gt_cv_locale_fr=none
7917                   fi
7918                 fi
7919               fi
7920             fi
7921           fi
7922           ;;
7923       esac
7924     fi
7925     rm -fr conftest*
7926
7927 fi
7928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7929 printf "%s\n" "$gt_cv_locale_fr" >&6; }
7930   LOCALE_FR=$gt_cv_locale_fr
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940             case "$host_os" in
7941      sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
7942        FAULT_YIELDS_SIGBUS=1 ;;
7943      hpux*) # HP-UX
7944        FAULT_YIELDS_SIGBUS=1 ;;
7945      macos* | darwin*) # Mac OS X
7946        FAULT_YIELDS_SIGBUS=1 ;;
7947      gnu*) # Hurd
7948        FAULT_YIELDS_SIGBUS=1 ;;
7949      *)
7950        FAULT_YIELDS_SIGBUS=0 ;;
7951    esac
7952
7953 printf "%s\n" "#define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS" >>confdefs.h
7954
7955
7956    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
7957 printf %s "checking for working C stack overflow detection... " >&6; }
7958 if test ${ac_cv_sys_stack_overflow_works+y}
7959 then :
7960   printf %s "(cached) " >&6
7961 else
7962   if test "$cross_compiling" = yes
7963 then :
7964   case "$host_os" in
7965                    # Guess no on native Windows.
7966            mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
7967            *)      ac_cv_sys_stack_overflow_works=cross-compiling ;;
7968          esac
7969
7970 else
7971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7972 /* end confdefs.h.  */
7973
7974             #include <unistd.h>
7975             #include <signal.h>
7976             #if HAVE_SETRLIMIT
7977             # include <sys/types.h>
7978             # include <sys/time.h>
7979             # include <sys/resource.h>
7980             #endif
7981             #ifndef SIGSTKSZ
7982             # define SIGSTKSZ 16384
7983             #endif
7984
7985             static union
7986             {
7987               char buffer[2 * SIGSTKSZ];
7988               long double ld;
7989               long u;
7990               void *p;
7991             } alternate_signal_stack;
7992
7993             static void
7994             segv_handler (int signo)
7995             {
7996               _exit (0);
7997             }
7998
7999             static int
8000             c_stack_action ()
8001             {
8002               stack_t st;
8003               struct sigaction act;
8004               int r;
8005
8006               st.ss_flags = 0;
8007               /* Use the midpoint to avoid Irix sigaltstack bug.  */
8008               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8009               st.ss_size = SIGSTKSZ;
8010               r = sigaltstack (&st, 0);
8011               if (r != 0)
8012                 return 1;
8013
8014               sigemptyset (&act.sa_mask);
8015               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
8016               act.sa_handler = segv_handler;
8017               #if FAULT_YIELDS_SIGBUS
8018               if (sigaction (SIGBUS, &act, 0) < 0)
8019                 return 2;
8020               #endif
8021               if (sigaction (SIGSEGV, &act, 0) < 0)
8022                 return 3;
8023               return 0;
8024             }
8025             static volatile int *
8026             recurse_1 (volatile int n, volatile int *p)
8027             {
8028               if (n >= 0)
8029                 *recurse_1 (n + 1, p) += n;
8030               return p;
8031             }
8032             static int
8033             recurse (volatile int n)
8034             {
8035               int sum = 0;
8036               return *recurse_1 (n, &sum);
8037             }
8038             int
8039             main ()
8040             {
8041               int result;
8042               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8043               /* Before starting the endless recursion, try to be friendly
8044                  to the user's machine.  On some Linux 2.2.x systems, there
8045                  is no stack limit for user processes at all.  We don't want
8046                  to kill such systems.  */
8047               struct rlimit rl;
8048               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8049               setrlimit (RLIMIT_STACK, &rl);
8050               #endif
8051
8052               result = c_stack_action ();
8053               if (result != 0)
8054                 return result;
8055               return recurse (0);
8056             }
8057
8058 _ACEOF
8059 if ac_fn_c_try_run "$LINENO"
8060 then :
8061   ac_cv_sys_stack_overflow_works=yes
8062 else
8063   ac_cv_sys_stack_overflow_works=no
8064 fi
8065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8066   conftest.$ac_objext conftest.beam conftest.$ac_ext
8067 fi
8068
8069
8070 fi
8071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
8072 printf "%s\n" "$ac_cv_sys_stack_overflow_works" >&6; }
8073
8074   if test "$ac_cv_sys_stack_overflow_works" = yes; then
8075
8076 printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
8077
8078
8079                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
8080 printf %s "checking for correct stack_t interpretation... " >&6; }
8081 if test ${gl_cv_sigaltstack_low_base+y}
8082 then :
8083   printf %s "(cached) " >&6
8084 else
8085
8086       if test "$cross_compiling" = yes
8087 then :
8088   gl_cv_sigaltstack_low_base=cross-compiling
8089 else
8090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8091 /* end confdefs.h.  */
8092
8093
8094 #include <stdlib.h>
8095 #include <signal.h>
8096 #if HAVE_SYS_SIGNAL_H
8097 # include <sys/signal.h>
8098 #endif
8099 #ifndef SIGSTKSZ
8100 # define SIGSTKSZ 16384
8101 #endif
8102 volatile char *stack_lower_bound;
8103 volatile char *stack_upper_bound;
8104 static void check_stack_location (volatile char *addr)
8105 {
8106   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
8107     exit (0);
8108   else
8109     exit (1);
8110 }
8111 static void stackoverflow_handler (int sig)
8112 {
8113   char dummy;
8114   check_stack_location (&dummy);
8115 }
8116 int main ()
8117 {
8118   char mystack[2 * SIGSTKSZ];
8119   stack_t altstack;
8120   struct sigaction action;
8121   /* Install the alternate stack.  */
8122   altstack.ss_sp = mystack + SIGSTKSZ;
8123   altstack.ss_size = SIGSTKSZ;
8124   stack_lower_bound = (char *) altstack.ss_sp;
8125   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
8126   altstack.ss_flags = 0; /* no SS_DISABLE */
8127   if (sigaltstack (&altstack, NULL) < 0)
8128     exit (2);
8129   /* Install the SIGSEGV handler.  */
8130   sigemptyset (&action.sa_mask);
8131   action.sa_handler = &stackoverflow_handler;
8132   action.sa_flags = SA_ONSTACK;
8133   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
8134     exit(3);
8135   /* Provoke a SIGSEGV.  */
8136   raise (SIGSEGV);
8137   exit (4);
8138 }
8139 _ACEOF
8140 if ac_fn_c_try_run "$LINENO"
8141 then :
8142   gl_cv_sigaltstack_low_base=yes
8143 else
8144   gl_cv_sigaltstack_low_base=no
8145 fi
8146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8147   conftest.$ac_objext conftest.beam conftest.$ac_ext
8148 fi
8149
8150 fi
8151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
8152 printf "%s\n" "$gl_cv_sigaltstack_low_base" >&6; }
8153    if test "$gl_cv_sigaltstack_low_base" = no; then
8154
8155 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
8156
8157     fi
8158
8159    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
8160 printf %s "checking for precise C stack overflow detection... " >&6; }
8161 if test ${ac_cv_sys_xsi_stack_overflow_heuristic+y}
8162 then :
8163   printf %s "(cached) " >&6
8164 else
8165                           case "${host_os}--${host_cpu}" in
8166         linux*--sparc*)
8167           ac_cv_sys_xsi_stack_overflow_heuristic=no
8168           ;;
8169         *)
8170           if test "$cross_compiling" = yes
8171 then :
8172   ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
8173 else
8174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8175 /* end confdefs.h.  */
8176
8177                 #include <unistd.h>
8178                 #include <signal.h>
8179                 #if HAVE_UCONTEXT_H
8180                 # include <ucontext.h>
8181                 #endif
8182                 #if HAVE_SETRLIMIT
8183                 # include <sys/types.h>
8184                 # include <sys/time.h>
8185                 # include <sys/resource.h>
8186                 #endif
8187                 #ifndef SIGSTKSZ
8188                 # define SIGSTKSZ 16384
8189                 #endif
8190
8191                 static union
8192                 {
8193                   char buffer[2 * SIGSTKSZ];
8194                   long double ld;
8195                   long u;
8196                   void *p;
8197                 } alternate_signal_stack;
8198
8199                 #if STACK_DIRECTION
8200                 # define find_stack_direction(ptr) STACK_DIRECTION
8201                 #else
8202                 static int
8203                 find_stack_direction (char const *addr)
8204                 {
8205                   char dummy;
8206                   return (! addr ? find_stack_direction (&dummy)
8207                           : addr < &dummy ? 1 : -1);
8208                 }
8209                 #endif
8210
8211                 static void
8212                 segv_handler (int signo, siginfo_t *info, void *context)
8213                 {
8214                   if (0 < info->si_code)
8215                     {
8216                       /* For XSI heuristics to work, we need uc_stack to
8217                          describe the interrupted stack (as on Solaris), and
8218                          not the currently executing stack (as on Linux).  */
8219                       ucontext_t const *user_context = context;
8220                       char const *stack_min = user_context->uc_stack.ss_sp;
8221                       size_t stack_size = user_context->uc_stack.ss_size;
8222                       char const *faulting_address = info->si_addr;
8223                       size_t s = faulting_address - stack_min;
8224                       size_t page_size = sysconf (_SC_PAGESIZE);
8225                       if (find_stack_direction (0) < 0)
8226                         s += page_size;
8227                       if (s < stack_size + page_size)
8228                         _exit (0);
8229                       _exit (4);
8230                     }
8231                   _exit (5);
8232                 }
8233
8234                 static int
8235                 c_stack_action ()
8236                 {
8237                   stack_t st;
8238                   struct sigaction act;
8239                   int r;
8240
8241                   st.ss_flags = 0;
8242                   /* Use the midpoint to avoid Irix sigaltstack bug.  */
8243                   st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8244                   st.ss_size = SIGSTKSZ;
8245                   r = sigaltstack (&st, 0);
8246                   if (r != 0)
8247                     return 1;
8248
8249                   sigemptyset (&act.sa_mask);
8250                   act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
8251                   act.sa_sigaction = segv_handler;
8252                   #if FAULT_YIELDS_SIGBUS
8253                   if (sigaction (SIGBUS, &act, 0) < 0)
8254                     return 2;
8255                   #endif
8256                   if (sigaction (SIGSEGV, &act, 0) < 0)
8257                     return 3;
8258                   return 0;
8259                 }
8260                 static volatile int *
8261                 recurse_1 (volatile int n, volatile int *p)
8262                 {
8263                   if (n >= 0)
8264                     *recurse_1 (n + 1, p) += n;
8265                   return p;
8266                 }
8267                 static int
8268                 recurse (volatile int n)
8269                 {
8270                   int sum = 0;
8271                   return *recurse_1 (n, &sum);
8272                 }
8273                 int
8274                 main ()
8275                 {
8276                   int result;
8277                   #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8278                   /* Before starting the endless recursion, try to be friendly
8279                      to the user's machine.  On some Linux 2.2.x systems, there
8280                      is no stack limit for user processes at all.  We don't want
8281                      to kill such systems.  */
8282                   struct rlimit rl;
8283                   rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8284                   setrlimit (RLIMIT_STACK, &rl);
8285                   #endif
8286
8287                   result = c_stack_action ();
8288                   if (result != 0)
8289                     return result;
8290                   return recurse (0);
8291                 }
8292
8293 _ACEOF
8294 if ac_fn_c_try_run "$LINENO"
8295 then :
8296   ac_cv_sys_xsi_stack_overflow_heuristic=yes
8297 else
8298   ac_cv_sys_xsi_stack_overflow_heuristic=no
8299 fi
8300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8301   conftest.$ac_objext conftest.beam conftest.$ac_ext
8302 fi
8303
8304           ;;
8305       esac
8306
8307 fi
8308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
8309 printf "%s\n" "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
8310
8311    if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
8312
8313 printf "%s\n" "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
8314
8315    fi
8316   fi
8317
8318       if test "X$prefix" = "XNONE"; then
8319     acl_final_prefix="$ac_default_prefix"
8320   else
8321     acl_final_prefix="$prefix"
8322   fi
8323   if test "X$exec_prefix" = "XNONE"; then
8324     acl_final_exec_prefix='${prefix}'
8325   else
8326     acl_final_exec_prefix="$exec_prefix"
8327   fi
8328   acl_save_prefix="$prefix"
8329   prefix="$acl_final_prefix"
8330   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8331   prefix="$acl_save_prefix"
8332
8333
8334
8335 # Check whether --with-gnu-ld was given.
8336 if test ${with_gnu_ld+y}
8337 then :
8338   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8339 else
8340   with_gnu_ld=no
8341 fi
8342
8343 # Prepare PATH_SEPARATOR.
8344 # The user is always right.
8345 if test "${PATH_SEPARATOR+set}" != set; then
8346   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
8347   # contains only /bin. Note that ksh looks also at the FPATH variable,
8348   # so we have to set that as well for the test.
8349   PATH_SEPARATOR=:
8350   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8351     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8352            || PATH_SEPARATOR=';'
8353        }
8354 fi
8355
8356 if test -n "$LD"; then
8357   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
8358 printf %s "checking for ld... " >&6; }
8359 elif test "$GCC" = yes; then
8360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8361 printf %s "checking for ld used by $CC... " >&6; }
8362 elif test "$with_gnu_ld" = yes; then
8363   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8364 printf %s "checking for GNU ld... " >&6; }
8365 else
8366   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8367 printf %s "checking for non-GNU ld... " >&6; }
8368 fi
8369 if test -n "$LD"; then
8370   # Let the user override the test with a path.
8371   :
8372 else
8373   if test ${acl_cv_path_LD+y}
8374 then :
8375   printf %s "(cached) " >&6
8376 else
8377
8378     acl_cv_path_LD= # Final result of this test
8379     ac_prog=ld # Program to search in $PATH
8380     if test "$GCC" = yes; then
8381       # Check if gcc -print-prog-name=ld gives a path.
8382       case $host in
8383         *-*-mingw*)
8384           # gcc leaves a trailing carriage return which upsets mingw
8385           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8386         *)
8387           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
8388       esac
8389       case $acl_output in
8390         # Accept absolute paths.
8391         [\\/]* | ?:[\\/]*)
8392           re_direlt='/[^/][^/]*/\.\./'
8393           # Canonicalize the pathname of ld
8394           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
8395           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
8396             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
8397           done
8398           # Got the pathname. No search in PATH is needed.
8399           acl_cv_path_LD="$acl_output"
8400           ac_prog=
8401           ;;
8402         "")
8403           # If it fails, then pretend we aren't using GCC.
8404           ;;
8405         *)
8406           # If it is relative, then search for the first ld in PATH.
8407           with_gnu_ld=unknown
8408           ;;
8409       esac
8410     fi
8411     if test -n "$ac_prog"; then
8412       # Search for $ac_prog in $PATH.
8413       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8414       for ac_dir in $PATH; do
8415         IFS="$acl_save_ifs"
8416         test -z "$ac_dir" && ac_dir=.
8417         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8418           acl_cv_path_LD="$ac_dir/$ac_prog"
8419           # Check to see if the program is GNU ld.  I'd rather use --version,
8420           # but apparently some variants of GNU ld only accept -v.
8421           # Break only if it was the GNU/non-GNU ld that we prefer.
8422           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
8423             *GNU* | *'with BFD'*)
8424               test "$with_gnu_ld" != no && break
8425               ;;
8426             *)
8427               test "$with_gnu_ld" != yes && break
8428               ;;
8429           esac
8430         fi
8431       done
8432       IFS="$acl_save_ifs"
8433     fi
8434     case $host in
8435       *-*-aix*)
8436         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8437 /* end confdefs.h.  */
8438 #if defined __powerpc64__ || defined _ARCH_PPC64
8439                 int ok;
8440                #else
8441                 error fail
8442                #endif
8443
8444 _ACEOF
8445 if ac_fn_c_try_compile "$LINENO"
8446 then :
8447   # The compiler produces 64-bit code. Add option '-b64' so that the
8448            # linker groks 64-bit object files.
8449            case "$acl_cv_path_LD " in
8450              *" -b64 "*) ;;
8451              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
8452            esac
8453
8454 fi
8455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8456         ;;
8457       sparc64-*-netbsd*)
8458         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459 /* end confdefs.h.  */
8460 #if defined __sparcv9 || defined __arch64__
8461                 int ok;
8462                #else
8463                 error fail
8464                #endif
8465
8466 _ACEOF
8467 if ac_fn_c_try_compile "$LINENO"
8468 then :
8469
8470 else
8471   # The compiler produces 32-bit code. Add option '-m elf32_sparc'
8472            # so that the linker groks 32-bit object files.
8473            case "$acl_cv_path_LD " in
8474              *" -m elf32_sparc "*) ;;
8475              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
8476            esac
8477
8478 fi
8479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8480         ;;
8481     esac
8482
8483 fi
8484
8485   LD="$acl_cv_path_LD"
8486 fi
8487 if test -n "$LD"; then
8488   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8489 printf "%s\n" "$LD" >&6; }
8490 else
8491   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 printf "%s\n" "no" >&6; }
8493   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8494 fi
8495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8496 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8497 if test ${acl_cv_prog_gnu_ld+y}
8498 then :
8499   printf %s "(cached) " >&6
8500 else
8501   # I'd rather use --version here, but apparently some GNU lds only accept -v.
8502 case `$LD -v 2>&1 </dev/null` in
8503 *GNU* | *'with BFD'*)
8504   acl_cv_prog_gnu_ld=yes
8505   ;;
8506 *)
8507   acl_cv_prog_gnu_ld=no
8508   ;;
8509 esac
8510 fi
8511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8512 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
8513 with_gnu_ld=$acl_cv_prog_gnu_ld
8514
8515
8516
8517
8518                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8519 printf %s "checking for shared library run path origin... " >&6; }
8520 if test ${acl_cv_rpath+y}
8521 then :
8522   printf %s "(cached) " >&6
8523 else
8524
8525     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8526     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8527     . ./conftest.sh
8528     rm -f ./conftest.sh
8529     acl_cv_rpath=done
8530
8531 fi
8532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8533 printf "%s\n" "$acl_cv_rpath" >&6; }
8534   wl="$acl_cv_wl"
8535   acl_libext="$acl_cv_libext"
8536   acl_shlibext="$acl_cv_shlibext"
8537   acl_libname_spec="$acl_cv_libname_spec"
8538   acl_library_names_spec="$acl_cv_library_names_spec"
8539   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8540   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8541   acl_hardcode_direct="$acl_cv_hardcode_direct"
8542   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
8543     # Check whether --enable-rpath was given.
8544 if test ${enable_rpath+y}
8545 then :
8546   enableval=$enable_rpath; :
8547 else
8548   enable_rpath=yes
8549 fi
8550
8551
8552
8553
8554   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
8555 printf %s "checking 32-bit host C ABI... " >&6; }
8556 if test ${gl_cv_host_cpu_c_abi_32bit+y}
8557 then :
8558   printf %s "(cached) " >&6
8559 else
8560   if test -n "$gl_cv_host_cpu_c_abi"; then
8561        case "$gl_cv_host_cpu_c_abi" in
8562          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
8563            gl_cv_host_cpu_c_abi_32bit=yes ;;
8564          *)
8565            gl_cv_host_cpu_c_abi_32bit=no ;;
8566        esac
8567      else
8568        case "$host_cpu" in
8569
8570          i[4567]86 )
8571            gl_cv_host_cpu_c_abi_32bit=yes
8572            ;;
8573
8574          x86_64 )
8575            # On x86_64 systems, the C compiler may be generating code in one of
8576            # these ABIs:
8577            # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
8578            # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
8579            #   with native Windows (mingw, MSVC).
8580            # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
8581            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
8582            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8583 /* end confdefs.h.  */
8584 #if (defined __x86_64__ || defined __amd64__ \
8585                        || defined _M_X64 || defined _M_AMD64) \
8586                       && !(defined __ILP32__ || defined _ILP32)
8587                    int ok;
8588                   #else
8589                    error fail
8590                   #endif
8591
8592 _ACEOF
8593 if ac_fn_c_try_compile "$LINENO"
8594 then :
8595   gl_cv_host_cpu_c_abi_32bit=no
8596 else
8597   gl_cv_host_cpu_c_abi_32bit=yes
8598 fi
8599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8600            ;;
8601
8602          arm* | aarch64 )
8603            # Assume arm with EABI.
8604            # On arm64 systems, the C compiler may be generating code in one of
8605            # these ABIs:
8606            # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
8607            # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
8608            # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
8609            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8610 /* end confdefs.h.  */
8611 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
8612                    int ok;
8613                   #else
8614                    error fail
8615                   #endif
8616
8617 _ACEOF
8618 if ac_fn_c_try_compile "$LINENO"
8619 then :
8620   gl_cv_host_cpu_c_abi_32bit=no
8621 else
8622   gl_cv_host_cpu_c_abi_32bit=yes
8623 fi
8624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8625            ;;
8626
8627          hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
8628            # On hppa, the C compiler may be generating 32-bit code or 64-bit
8629            # code. In the latter case, it defines _LP64 and __LP64__.
8630            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8631 /* end confdefs.h.  */
8632 #ifdef __LP64__
8633                    int ok;
8634                   #else
8635                    error fail
8636                   #endif
8637
8638 _ACEOF
8639 if ac_fn_c_try_compile "$LINENO"
8640 then :
8641   gl_cv_host_cpu_c_abi_32bit=no
8642 else
8643   gl_cv_host_cpu_c_abi_32bit=yes
8644 fi
8645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8646            ;;
8647
8648          ia64* )
8649            # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
8650            # 32-bit code. In the latter case, it defines _ILP32.
8651            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652 /* end confdefs.h.  */
8653 #ifdef _ILP32
8654                    int ok;
8655                   #else
8656                    error fail
8657                   #endif
8658
8659 _ACEOF
8660 if ac_fn_c_try_compile "$LINENO"
8661 then :
8662   gl_cv_host_cpu_c_abi_32bit=yes
8663 else
8664   gl_cv_host_cpu_c_abi_32bit=no
8665 fi
8666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8667            ;;
8668
8669          mips* )
8670            # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
8671            # at 32.
8672            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8673 /* end confdefs.h.  */
8674 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
8675                    int ok;
8676                   #else
8677                    error fail
8678                   #endif
8679
8680 _ACEOF
8681 if ac_fn_c_try_compile "$LINENO"
8682 then :
8683   gl_cv_host_cpu_c_abi_32bit=no
8684 else
8685   gl_cv_host_cpu_c_abi_32bit=yes
8686 fi
8687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8688            ;;
8689
8690          powerpc* )
8691            # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
8692            # No need to distinguish them here; the caller may distinguish
8693            # them based on the OS.
8694            # On powerpc64 systems, the C compiler may still be generating
8695            # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
8696            # be generating 64-bit code.
8697            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8698 /* end confdefs.h.  */
8699 #if defined __powerpc64__ || defined _ARCH_PPC64
8700                    int ok;
8701                   #else
8702                    error fail
8703                   #endif
8704
8705 _ACEOF
8706 if ac_fn_c_try_compile "$LINENO"
8707 then :
8708   gl_cv_host_cpu_c_abi_32bit=no
8709 else
8710   gl_cv_host_cpu_c_abi_32bit=yes
8711 fi
8712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8713            ;;
8714
8715          rs6000 )
8716            gl_cv_host_cpu_c_abi_32bit=yes
8717            ;;
8718
8719          riscv32 | riscv64 )
8720            # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
8721            # Size of 'long' and 'void *':
8722            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h.  */
8724 #if defined __LP64__
8725                     int ok;
8726                   #else
8727                     error fail
8728                   #endif
8729
8730 _ACEOF
8731 if ac_fn_c_try_compile "$LINENO"
8732 then :
8733   gl_cv_host_cpu_c_abi_32bit=no
8734 else
8735   gl_cv_host_cpu_c_abi_32bit=yes
8736 fi
8737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8738            ;;
8739
8740          s390* )
8741            # On s390x, the C compiler may be generating 64-bit (= s390x) code
8742            # or 31-bit (= s390) code.
8743            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744 /* end confdefs.h.  */
8745 #if defined __LP64__ || defined __s390x__
8746                     int ok;
8747                   #else
8748                     error fail
8749                   #endif
8750
8751 _ACEOF
8752 if ac_fn_c_try_compile "$LINENO"
8753 then :
8754   gl_cv_host_cpu_c_abi_32bit=no
8755 else
8756   gl_cv_host_cpu_c_abi_32bit=yes
8757 fi
8758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8759            ;;
8760
8761          sparc | sparc64 )
8762            # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
8763            # C compiler still generates 32-bit code.
8764            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8765 /* end confdefs.h.  */
8766 #if defined __sparcv9 || defined __arch64__
8767                    int ok;
8768                   #else
8769                    error fail
8770                   #endif
8771
8772 _ACEOF
8773 if ac_fn_c_try_compile "$LINENO"
8774 then :
8775   gl_cv_host_cpu_c_abi_32bit=no
8776 else
8777   gl_cv_host_cpu_c_abi_32bit=yes
8778 fi
8779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8780            ;;
8781
8782          *)
8783            gl_cv_host_cpu_c_abi_32bit=no
8784            ;;
8785        esac
8786      fi
8787
8788 fi
8789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
8790 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
8791
8792   HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
8793
8794
8795
8796
8797
8798   case "$host_os" in
8799     solaris*)
8800       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8801 printf %s "checking for 64-bit host... " >&6; }
8802 if test ${gl_cv_solaris_64bit+y}
8803 then :
8804   printf %s "(cached) " >&6
8805 else
8806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8807 /* end confdefs.h.  */
8808 #ifdef _LP64
8809                  int ok;
8810                 #else
8811                  error fail
8812                 #endif
8813
8814 _ACEOF
8815 if ac_fn_c_try_compile "$LINENO"
8816 then :
8817   gl_cv_solaris_64bit=yes
8818 else
8819   gl_cv_solaris_64bit=no
8820 fi
8821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8822
8823 fi
8824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8825 printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
8826   esac
8827
8828     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
8829 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
8830 if test ${acl_cv_libdirstems+y}
8831 then :
8832   printf %s "(cached) " >&6
8833 else
8834   acl_libdirstem=lib
8835      acl_libdirstem2=
8836      case "$host_os" in
8837        solaris*)
8838                                                       if test $gl_cv_solaris_64bit = yes; then
8839            acl_libdirstem=lib/64
8840            case "$host_cpu" in
8841              sparc*)        acl_libdirstem2=lib/sparcv9 ;;
8842              i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8843            esac
8844          fi
8845          ;;
8846        *)
8847                            if test "$HOST_CPU_C_ABI_32BIT" != yes; then
8848                                             searchpath=`(if test -f /usr/bin/gcc \
8849                            && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
8850                           LC_ALL=C /usr/bin/gcc -print-search-dirs; \
8851                         else \
8852                           LC_ALL=C $CC -print-search-dirs; \
8853                         fi) 2>/dev/null \
8854                        | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8855            if test -n "$searchpath"; then
8856              acl_save_IFS="${IFS=       }"; IFS=":"
8857              for searchdir in $searchpath; do
8858                if test -d "$searchdir"; then
8859                  case "$searchdir" in
8860                    */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8861                    */../ | */.. )
8862                      # Better ignore directories of this form. They are misleading.
8863                      ;;
8864                    *) searchdir=`cd "$searchdir" && pwd`
8865                       case "$searchdir" in
8866                         */lib64 ) acl_libdirstem=lib64 ;;
8867                       esac ;;
8868                  esac
8869                fi
8870              done
8871              IFS="$acl_save_IFS"
8872            fi
8873          fi
8874          ;;
8875      esac
8876      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8877      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
8878
8879 fi
8880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
8881 printf "%s\n" "$acl_cv_libdirstems" >&6; }
8882   # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
8883   acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
8884   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899     use_additional=yes
8900
8901   acl_save_prefix="$prefix"
8902   prefix="$acl_final_prefix"
8903   acl_save_exec_prefix="$exec_prefix"
8904   exec_prefix="$acl_final_exec_prefix"
8905
8906     eval additional_includedir=\"$includedir\"
8907     eval additional_libdir=\"$libdir\"
8908
8909   exec_prefix="$acl_save_exec_prefix"
8910   prefix="$acl_save_prefix"
8911
8912
8913 # Check whether --with-libsigsegv-prefix was given.
8914 if test ${with_libsigsegv_prefix+y}
8915 then :
8916   withval=$with_libsigsegv_prefix;
8917     if test "X$withval" = "Xno"; then
8918       use_additional=no
8919     else
8920       if test "X$withval" = "X"; then
8921
8922   acl_save_prefix="$prefix"
8923   prefix="$acl_final_prefix"
8924   acl_save_exec_prefix="$exec_prefix"
8925   exec_prefix="$acl_final_exec_prefix"
8926
8927           eval additional_includedir=\"$includedir\"
8928           eval additional_libdir=\"$libdir\"
8929
8930   exec_prefix="$acl_save_exec_prefix"
8931   prefix="$acl_save_prefix"
8932
8933       else
8934         additional_includedir="$withval/include"
8935         additional_libdir="$withval/$acl_libdirstem"
8936         if test "$acl_libdirstem2" != "$acl_libdirstem" \
8937            && test ! -d "$withval/$acl_libdirstem"; then
8938           additional_libdir="$withval/$acl_libdirstem2"
8939         fi
8940       fi
8941     fi
8942
8943 fi
8944
8945       LIBSIGSEGV=
8946   LTLIBSIGSEGV=
8947   INCSIGSEGV=
8948   LIBSIGSEGV_PREFIX=
8949       HAVE_LIBSIGSEGV=
8950   rpathdirs=
8951   ltrpathdirs=
8952   names_already_handled=
8953   names_next_round='sigsegv '
8954   while test -n "$names_next_round"; do
8955     names_this_round="$names_next_round"
8956     names_next_round=
8957     for name in $names_this_round; do
8958       already_handled=
8959       for n in $names_already_handled; do
8960         if test "$n" = "$name"; then
8961           already_handled=yes
8962           break
8963         fi
8964       done
8965       if test -z "$already_handled"; then
8966         names_already_handled="$names_already_handled $name"
8967                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
8968         eval value=\"\$HAVE_LIB$uppername\"
8969         if test -n "$value"; then
8970           if test "$value" = yes; then
8971             eval value=\"\$LIB$uppername\"
8972             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
8973             eval value=\"\$LTLIB$uppername\"
8974             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
8975           else
8976                                     :
8977           fi
8978         else
8979                               found_dir=
8980           found_la=
8981           found_so=
8982           found_a=
8983           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
8984           if test -n "$acl_shlibext"; then
8985             shrext=".$acl_shlibext"             # typically: shrext=.so
8986           else
8987             shrext=
8988           fi
8989           if test $use_additional = yes; then
8990             dir="$additional_libdir"
8991                                     if test -n "$acl_shlibext"; then
8992               if test -f "$dir/$libname$shrext"; then
8993                 found_dir="$dir"
8994                 found_so="$dir/$libname$shrext"
8995               else
8996                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8997                   ver=`(cd "$dir" && \
8998                         for f in "$libname$shrext".*; do echo "$f"; done \
8999                         | sed -e "s,^$libname$shrext\\\\.,," \
9000                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9001                         | sed 1q ) 2>/dev/null`
9002                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9003                     found_dir="$dir"
9004                     found_so="$dir/$libname$shrext.$ver"
9005                   fi
9006                 else
9007                   eval library_names=\"$acl_library_names_spec\"
9008                   for f in $library_names; do
9009                     if test -f "$dir/$f"; then
9010                       found_dir="$dir"
9011                       found_so="$dir/$f"
9012                       break
9013                     fi
9014                   done
9015                 fi
9016               fi
9017             fi
9018                         if test "X$found_dir" = "X"; then
9019               if test -f "$dir/$libname.$acl_libext"; then
9020                 found_dir="$dir"
9021                 found_a="$dir/$libname.$acl_libext"
9022               fi
9023             fi
9024             if test "X$found_dir" != "X"; then
9025               if test -f "$dir/$libname.la"; then
9026                 found_la="$dir/$libname.la"
9027               fi
9028             fi
9029           fi
9030           if test "X$found_dir" = "X"; then
9031             for x in $LDFLAGS $LTLIBSIGSEGV; do
9032
9033   acl_save_prefix="$prefix"
9034   prefix="$acl_final_prefix"
9035   acl_save_exec_prefix="$exec_prefix"
9036   exec_prefix="$acl_final_exec_prefix"
9037   eval x=\"$x\"
9038   exec_prefix="$acl_save_exec_prefix"
9039   prefix="$acl_save_prefix"
9040
9041               case "$x" in
9042                 -L*)
9043                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9044                                     if test -n "$acl_shlibext"; then
9045                     if test -f "$dir/$libname$shrext"; then
9046                       found_dir="$dir"
9047                       found_so="$dir/$libname$shrext"
9048                     else
9049                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9050                         ver=`(cd "$dir" && \
9051                               for f in "$libname$shrext".*; do echo "$f"; done \
9052                               | sed -e "s,^$libname$shrext\\\\.,," \
9053                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9054                               | sed 1q ) 2>/dev/null`
9055                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9056                           found_dir="$dir"
9057                           found_so="$dir/$libname$shrext.$ver"
9058                         fi
9059                       else
9060                         eval library_names=\"$acl_library_names_spec\"
9061                         for f in $library_names; do
9062                           if test -f "$dir/$f"; then
9063                             found_dir="$dir"
9064                             found_so="$dir/$f"
9065                             break
9066                           fi
9067                         done
9068                       fi
9069                     fi
9070                   fi
9071                                     if test "X$found_dir" = "X"; then
9072                     if test -f "$dir/$libname.$acl_libext"; then
9073                       found_dir="$dir"
9074                       found_a="$dir/$libname.$acl_libext"
9075                     fi
9076                   fi
9077                   if test "X$found_dir" != "X"; then
9078                     if test -f "$dir/$libname.la"; then
9079                       found_la="$dir/$libname.la"
9080                     fi
9081                   fi
9082                   ;;
9083               esac
9084               if test "X$found_dir" != "X"; then
9085                 break
9086               fi
9087             done
9088           fi
9089           if test "X$found_dir" != "X"; then
9090                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
9091             if test "X$found_so" != "X"; then
9092                                                         if test "$enable_rpath" = no \
9093                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9094                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9095                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9096               else
9097                                                                                 haveit=
9098                 for x in $ltrpathdirs; do
9099                   if test "X$x" = "X$found_dir"; then
9100                     haveit=yes
9101                     break
9102                   fi
9103                 done
9104                 if test -z "$haveit"; then
9105                   ltrpathdirs="$ltrpathdirs $found_dir"
9106                 fi
9107                                 if test "$acl_hardcode_direct" = yes; then
9108                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9109                 else
9110                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9111                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9112                                                             haveit=
9113                     for x in $rpathdirs; do
9114                       if test "X$x" = "X$found_dir"; then
9115                         haveit=yes
9116                         break
9117                       fi
9118                     done
9119                     if test -z "$haveit"; then
9120                       rpathdirs="$rpathdirs $found_dir"
9121                     fi
9122                   else
9123                                                                                 haveit=
9124                     for x in $LDFLAGS $LIBSIGSEGV; do
9125
9126   acl_save_prefix="$prefix"
9127   prefix="$acl_final_prefix"
9128   acl_save_exec_prefix="$exec_prefix"
9129   exec_prefix="$acl_final_exec_prefix"
9130   eval x=\"$x\"
9131   exec_prefix="$acl_save_exec_prefix"
9132   prefix="$acl_save_prefix"
9133
9134                       if test "X$x" = "X-L$found_dir"; then
9135                         haveit=yes
9136                         break
9137                       fi
9138                     done
9139                     if test -z "$haveit"; then
9140                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
9141                     fi
9142                     if test "$acl_hardcode_minus_L" != no; then
9143                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9144                     else
9145                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9146                     fi
9147                   fi
9148                 fi
9149               fi
9150             else
9151               if test "X$found_a" != "X"; then
9152                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
9153               else
9154                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
9155               fi
9156             fi
9157                         additional_includedir=
9158             case "$found_dir" in
9159               */$acl_libdirstem | */$acl_libdirstem/)
9160                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9161                 if test "$name" = 'sigsegv'; then
9162                   LIBSIGSEGV_PREFIX="$basedir"
9163                 fi
9164                 additional_includedir="$basedir/include"
9165                 ;;
9166               */$acl_libdirstem2 | */$acl_libdirstem2/)
9167                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9168                 if test "$name" = 'sigsegv'; then
9169                   LIBSIGSEGV_PREFIX="$basedir"
9170                 fi
9171                 additional_includedir="$basedir/include"
9172                 ;;
9173             esac
9174             if test "X$additional_includedir" != "X"; then
9175                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9176                 haveit=
9177                 if test "X$additional_includedir" = "X/usr/local/include"; then
9178                   if test -n "$GCC"; then
9179                     case $host_os in
9180                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9181                     esac
9182                   fi
9183                 fi
9184                 if test -z "$haveit"; then
9185                   for x in $CPPFLAGS $INCSIGSEGV; do
9186
9187   acl_save_prefix="$prefix"
9188   prefix="$acl_final_prefix"
9189   acl_save_exec_prefix="$exec_prefix"
9190   exec_prefix="$acl_final_exec_prefix"
9191   eval x=\"$x\"
9192   exec_prefix="$acl_save_exec_prefix"
9193   prefix="$acl_save_prefix"
9194
9195                     if test "X$x" = "X-I$additional_includedir"; then
9196                       haveit=yes
9197                       break
9198                     fi
9199                   done
9200                   if test -z "$haveit"; then
9201                     if test -d "$additional_includedir"; then
9202                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
9203                     fi
9204                   fi
9205                 fi
9206               fi
9207             fi
9208                         if test -n "$found_la"; then
9209                                                         save_libdir="$libdir"
9210               case "$found_la" in
9211                 */* | *\\*) . "$found_la" ;;
9212                 *) . "./$found_la" ;;
9213               esac
9214               libdir="$save_libdir"
9215                             for dep in $dependency_libs; do
9216                 case "$dep" in
9217                   -L*)
9218                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9219                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
9220                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
9221                       haveit=
9222                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
9223                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
9224                         if test -n "$GCC"; then
9225                           case $host_os in
9226                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9227                           esac
9228                         fi
9229                       fi
9230                       if test -z "$haveit"; then
9231                         haveit=
9232                         for x in $LDFLAGS $LIBSIGSEGV; do
9233
9234   acl_save_prefix="$prefix"
9235   prefix="$acl_final_prefix"
9236   acl_save_exec_prefix="$exec_prefix"
9237   exec_prefix="$acl_final_exec_prefix"
9238   eval x=\"$x\"
9239   exec_prefix="$acl_save_exec_prefix"
9240   prefix="$acl_save_prefix"
9241
9242                           if test "X$x" = "X-L$additional_libdir"; then
9243                             haveit=yes
9244                             break
9245                           fi
9246                         done
9247                         if test -z "$haveit"; then
9248                           if test -d "$additional_libdir"; then
9249                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
9250                           fi
9251                         fi
9252                         haveit=
9253                         for x in $LDFLAGS $LTLIBSIGSEGV; do
9254
9255   acl_save_prefix="$prefix"
9256   prefix="$acl_final_prefix"
9257   acl_save_exec_prefix="$exec_prefix"
9258   exec_prefix="$acl_final_exec_prefix"
9259   eval x=\"$x\"
9260   exec_prefix="$acl_save_exec_prefix"
9261   prefix="$acl_save_prefix"
9262
9263                           if test "X$x" = "X-L$additional_libdir"; then
9264                             haveit=yes
9265                             break
9266                           fi
9267                         done
9268                         if test -z "$haveit"; then
9269                           if test -d "$additional_libdir"; then
9270                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
9271                           fi
9272                         fi
9273                       fi
9274                     fi
9275                     ;;
9276                   -R*)
9277                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9278                     if test "$enable_rpath" != no; then
9279                                                                   haveit=
9280                       for x in $rpathdirs; do
9281                         if test "X$x" = "X$dir"; then
9282                           haveit=yes
9283                           break
9284                         fi
9285                       done
9286                       if test -z "$haveit"; then
9287                         rpathdirs="$rpathdirs $dir"
9288                       fi
9289                                                                   haveit=
9290                       for x in $ltrpathdirs; do
9291                         if test "X$x" = "X$dir"; then
9292                           haveit=yes
9293                           break
9294                         fi
9295                       done
9296                       if test -z "$haveit"; then
9297                         ltrpathdirs="$ltrpathdirs $dir"
9298                       fi
9299                     fi
9300                     ;;
9301                   -l*)
9302                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9303                     ;;
9304                   *.la)
9305                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9306                     ;;
9307                   *)
9308                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
9309                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
9310                     ;;
9311                 esac
9312               done
9313             fi
9314           else
9315                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9316             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
9317           fi
9318         fi
9319       fi
9320     done
9321   done
9322   if test "X$rpathdirs" != "X"; then
9323     if test -n "$acl_hardcode_libdir_separator"; then
9324                         alldirs=
9325       for found_dir in $rpathdirs; do
9326         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
9327       done
9328             acl_save_libdir="$libdir"
9329       libdir="$alldirs"
9330       eval flag=\"$acl_hardcode_libdir_flag_spec\"
9331       libdir="$acl_save_libdir"
9332       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9333     else
9334             for found_dir in $rpathdirs; do
9335         acl_save_libdir="$libdir"
9336         libdir="$found_dir"
9337         eval flag=\"$acl_hardcode_libdir_flag_spec\"
9338         libdir="$acl_save_libdir"
9339         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9340       done
9341     fi
9342   fi
9343   if test "X$ltrpathdirs" != "X"; then
9344             for found_dir in $ltrpathdirs; do
9345       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
9346     done
9347   fi
9348
9349
9350
9351
9352
9353
9354         ac_save_CPPFLAGS="$CPPFLAGS"
9355
9356   for element in $INCSIGSEGV; do
9357     haveit=
9358     for x in $CPPFLAGS; do
9359
9360   acl_save_prefix="$prefix"
9361   prefix="$acl_final_prefix"
9362   acl_save_exec_prefix="$exec_prefix"
9363   exec_prefix="$acl_final_exec_prefix"
9364   eval x=\"$x\"
9365   exec_prefix="$acl_save_exec_prefix"
9366   prefix="$acl_save_prefix"
9367
9368       if test "X$x" = "X$element"; then
9369         haveit=yes
9370         break
9371       fi
9372     done
9373     if test -z "$haveit"; then
9374       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9375     fi
9376   done
9377
9378
9379   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
9380 printf %s "checking for libsigsegv... " >&6; }
9381 if test ${ac_cv_libsigsegv+y}
9382 then :
9383   printf %s "(cached) " >&6
9384 else
9385
9386     ac_save_LIBS="$LIBS"
9387                                 case " $LIBSIGSEGV" in
9388       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
9389       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
9390     esac
9391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392 /* end confdefs.h.  */
9393 #include <sigsegv.h>
9394 int
9395 main (void)
9396 {
9397 sigsegv_deinstall_handler();
9398   ;
9399   return 0;
9400 }
9401 _ACEOF
9402 if ac_fn_c_try_link "$LINENO"
9403 then :
9404   ac_cv_libsigsegv=yes
9405 else
9406   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
9407 fi
9408 rm -f core conftest.err conftest.$ac_objext \
9409     conftest$ac_exeext conftest.$ac_ext
9410     LIBS="$ac_save_LIBS"
9411
9412 fi
9413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
9414 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
9415   if test "$ac_cv_libsigsegv" = yes; then
9416     HAVE_LIBSIGSEGV=yes
9417
9418 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
9419
9420     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
9421 printf %s "checking how to link with libsigsegv... " >&6; }
9422     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
9423 printf "%s\n" "$LIBSIGSEGV" >&6; }
9424   else
9425     HAVE_LIBSIGSEGV=no
9426             CPPFLAGS="$ac_save_CPPFLAGS"
9427     LIBSIGSEGV=
9428     LTLIBSIGSEGV=
9429     LIBSIGSEGV_PREFIX=
9430   fi
9431
9432
9433
9434
9435
9436
9437
9438     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
9439
9440
9441 # The Clang compiler raises a warning for an undeclared identifier that matches
9442 # a compiler builtin function.  All extant Clang versions are affected, as of
9443 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
9444 # C and Objective C languages, but Clang does report an error under C++ and
9445 # Objective C++.
9446 #
9447 # Passing -fno-builtin to the compiler would suppress this problem.  That
9448 # strategy would have the advantage of being insensitive to stray warnings, but
9449 # it would make tests less realistic.
9450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
9451 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
9452 if test ${ac_cv_c_decl_report+y}
9453 then :
9454   printf %s "(cached) " >&6
9455 else
9456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9457 /* end confdefs.h.  */
9458
9459 int
9460 main (void)
9461 {
9462 (void) strchr;
9463   ;
9464   return 0;
9465 }
9466 _ACEOF
9467 if ac_fn_c_try_compile "$LINENO"
9468 then :
9469   if test -s conftest.err
9470 then :
9471       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
9472     # valid AC_CHECK_DECL input.  No library function is consistently available
9473     # on freestanding implementations, so test against a dummy declaration.
9474     # Include always-available headers on the off chance that they somehow
9475     # elicit warnings.
9476     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9477 /* end confdefs.h.  */
9478 #include <float.h>
9479 #include <limits.h>
9480 #include <stdarg.h>
9481 #include <stddef.h>
9482 extern void ac_decl (int, char *);
9483 int
9484 main (void)
9485 {
9486 #ifdef __cplusplus
9487   (void) ac_decl ((int) 0, (char *) 0);
9488   (void) ac_decl;
9489 #else
9490   (void) ac_decl;
9491 #endif
9492
9493   ;
9494   return 0;
9495 }
9496 _ACEOF
9497 if ac_fn_c_try_compile "$LINENO"
9498 then :
9499   if test -s conftest.err
9500 then :
9501   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9502 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9503 as_fn_error $? "cannot detect from compiler exit status or warnings
9504 See \`config.log' for more details" "$LINENO" 5; }
9505 else
9506   ac_cv_c_decl_report=warning
9507 fi
9508 else
9509   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9510 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9511 as_fn_error $? "cannot compile a simple declaration test
9512 See \`config.log' for more details" "$LINENO" 5; }
9513 fi
9514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9515 else
9516   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9517 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9518 as_fn_error $? "compiler does not report undeclared identifiers
9519 See \`config.log' for more details" "$LINENO" 5; }
9520 fi
9521 else
9522   ac_cv_c_decl_report=error
9523 fi
9524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9525 fi
9526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
9527 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
9528
9529 case $ac_cv_c_decl_report in
9530   warning) ac_c_decl_warn_flag=yes ;;
9531   *) ac_c_decl_warn_flag= ;;
9532 esac
9533
9534
9535
9536   GNULIB_CHDIR=0;
9537   GNULIB_CHOWN=0;
9538   GNULIB_CLOSE=0;
9539   GNULIB_DUP=0;
9540   GNULIB_DUP2=0;
9541   GNULIB_DUP3=0;
9542   GNULIB_ENVIRON=0;
9543   GNULIB_EUIDACCESS=0;
9544   GNULIB_FACCESSAT=0;
9545   GNULIB_FCHDIR=0;
9546   GNULIB_FCHOWNAT=0;
9547   GNULIB_FDATASYNC=0;
9548   GNULIB_FSYNC=0;
9549   GNULIB_FTRUNCATE=0;
9550   GNULIB_GETCWD=0;
9551   GNULIB_GETDOMAINNAME=0;
9552   GNULIB_GETDTABLESIZE=0;
9553   GNULIB_GETGROUPS=0;
9554   GNULIB_GETHOSTNAME=0;
9555   GNULIB_GETLOGIN=0;
9556   GNULIB_GETLOGIN_R=0;
9557   GNULIB_GETPAGESIZE=0;
9558   GNULIB_GETPASS=0;
9559   GNULIB_GETUSERSHELL=0;
9560   GNULIB_GROUP_MEMBER=0;
9561   GNULIB_ISATTY=0;
9562   GNULIB_LCHOWN=0;
9563   GNULIB_LINK=0;
9564   GNULIB_LINKAT=0;
9565   GNULIB_LSEEK=0;
9566   GNULIB_PIPE=0;
9567   GNULIB_PIPE2=0;
9568   GNULIB_PREAD=0;
9569   GNULIB_PWRITE=0;
9570   GNULIB_READ=0;
9571   GNULIB_READLINK=0;
9572   GNULIB_READLINKAT=0;
9573   GNULIB_RMDIR=0;
9574   GNULIB_SETHOSTNAME=0;
9575   GNULIB_SLEEP=0;
9576   GNULIB_SYMLINK=0;
9577   GNULIB_SYMLINKAT=0;
9578   GNULIB_TRUNCATE=0;
9579   GNULIB_TTYNAME_R=0;
9580   GNULIB_UNISTD_H_NONBLOCKING=0;
9581   GNULIB_UNISTD_H_SIGPIPE=0;
9582   GNULIB_UNLINK=0;
9583   GNULIB_UNLINKAT=0;
9584   GNULIB_USLEEP=0;
9585   GNULIB_WRITE=0;
9586     HAVE_CHOWN=1;
9587   HAVE_DUP2=1;
9588   HAVE_DUP3=1;
9589   HAVE_EUIDACCESS=1;
9590   HAVE_FACCESSAT=1;
9591   HAVE_FCHDIR=1;
9592   HAVE_FCHOWNAT=1;
9593   HAVE_FDATASYNC=1;
9594   HAVE_FSYNC=1;
9595   HAVE_FTRUNCATE=1;
9596   HAVE_GETDTABLESIZE=1;
9597   HAVE_GETGROUPS=1;
9598   HAVE_GETHOSTNAME=1;
9599   HAVE_GETLOGIN=1;
9600   HAVE_GETPAGESIZE=1;
9601   HAVE_GETPASS=1;
9602   HAVE_GROUP_MEMBER=1;
9603   HAVE_LCHOWN=1;
9604   HAVE_LINK=1;
9605   HAVE_LINKAT=1;
9606   HAVE_PIPE=1;
9607   HAVE_PIPE2=1;
9608   HAVE_PREAD=1;
9609   HAVE_PWRITE=1;
9610   HAVE_READLINK=1;
9611   HAVE_READLINKAT=1;
9612   HAVE_SETHOSTNAME=1;
9613   HAVE_SLEEP=1;
9614   HAVE_SYMLINK=1;
9615   HAVE_SYMLINKAT=1;
9616   HAVE_UNLINKAT=1;
9617   HAVE_USLEEP=1;
9618   HAVE_DECL_ENVIRON=1;
9619   HAVE_DECL_FCHDIR=1;
9620   HAVE_DECL_FDATASYNC=1;
9621   HAVE_DECL_GETDOMAINNAME=1;
9622   HAVE_DECL_GETLOGIN=1;
9623   HAVE_DECL_GETLOGIN_R=1;
9624   HAVE_DECL_GETPAGESIZE=1;
9625   HAVE_DECL_GETUSERSHELL=1;
9626   HAVE_DECL_SETHOSTNAME=1;
9627   HAVE_DECL_TRUNCATE=1;
9628   HAVE_DECL_TTYNAME_R=1;
9629   HAVE_OS_H=0;
9630   HAVE_SYS_PARAM_H=0;
9631   REPLACE_CHOWN=0;
9632   REPLACE_CLOSE=0;
9633   REPLACE_DUP=0;
9634   REPLACE_DUP2=0;
9635   REPLACE_FACCESSAT=0;
9636   REPLACE_FCHOWNAT=0;
9637   REPLACE_FTRUNCATE=0;
9638   REPLACE_GETCWD=0;
9639   REPLACE_GETDOMAINNAME=0;
9640   REPLACE_GETDTABLESIZE=0;
9641   REPLACE_GETLOGIN_R=0;
9642   REPLACE_GETGROUPS=0;
9643   REPLACE_GETPAGESIZE=0;
9644   REPLACE_GETPASS=0;
9645   REPLACE_ISATTY=0;
9646   REPLACE_LCHOWN=0;
9647   REPLACE_LINK=0;
9648   REPLACE_LINKAT=0;
9649   REPLACE_LSEEK=0;
9650   REPLACE_PREAD=0;
9651   REPLACE_PWRITE=0;
9652   REPLACE_READ=0;
9653   REPLACE_READLINK=0;
9654   REPLACE_READLINKAT=0;
9655   REPLACE_RMDIR=0;
9656   REPLACE_SLEEP=0;
9657   REPLACE_SYMLINK=0;
9658   REPLACE_SYMLINKAT=0;
9659   REPLACE_TRUNCATE=0;
9660   REPLACE_TTYNAME_R=0;
9661   REPLACE_UNLINK=0;
9662   REPLACE_UNLINKAT=0;
9663   REPLACE_USLEEP=0;
9664   REPLACE_WRITE=0;
9665   UNISTD_H_HAVE_WINSOCK2_H=0;
9666   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9667
9668
9669
9670
9671
9672   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9673     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9674
9675 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9676
9677   else
9678     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9679   fi
9680
9681
9682
9683   GNULIB_IOCTL=0;
9684     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9685   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9686
9687   REPLACE_IOCTL=0;
9688
9689
9690
9691   GNULIB_ISBLANK=0;
9692     HAVE_ISBLANK=1;
9693
9694
9695
9696   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9697 printf %s "checking whether the preprocessor supports include_next... " >&6; }
9698 if test ${gl_cv_have_include_next+y}
9699 then :
9700   printf %s "(cached) " >&6
9701 else
9702   rm -rf conftestd1a conftestd1b conftestd2
9703      mkdir conftestd1a conftestd1b conftestd2
9704                                                   cat <<EOF > conftestd1a/conftest.h
9705 #define DEFINED_IN_CONFTESTD1
9706 #include_next <conftest.h>
9707 #ifdef DEFINED_IN_CONFTESTD2
9708 int foo;
9709 #else
9710 #error "include_next doesn't work"
9711 #endif
9712 EOF
9713      cat <<EOF > conftestd1b/conftest.h
9714 #define DEFINED_IN_CONFTESTD1
9715 #include <stdio.h>
9716 #include_next <conftest.h>
9717 #ifdef DEFINED_IN_CONFTESTD2
9718 int foo;
9719 #else
9720 #error "include_next doesn't work"
9721 #endif
9722 EOF
9723      cat <<EOF > conftestd2/conftest.h
9724 #ifndef DEFINED_IN_CONFTESTD1
9725 #error "include_next test doesn't work"
9726 #endif
9727 #define DEFINED_IN_CONFTESTD2
9728 EOF
9729      gl_save_CPPFLAGS="$CPPFLAGS"
9730      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9731      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9732 /* end confdefs.h.  */
9733 #include <conftest.h>
9734 _ACEOF
9735 if ac_fn_c_try_compile "$LINENO"
9736 then :
9737   gl_cv_have_include_next=yes
9738 else
9739   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9740         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741 /* end confdefs.h.  */
9742 #include <conftest.h>
9743 _ACEOF
9744 if ac_fn_c_try_compile "$LINENO"
9745 then :
9746   gl_cv_have_include_next=buggy
9747 else
9748   gl_cv_have_include_next=no
9749 fi
9750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9751
9752 fi
9753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9754      CPPFLAGS="$gl_save_CPPFLAGS"
9755      rm -rf conftestd1a conftestd1b conftestd2
9756
9757 fi
9758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9759 printf "%s\n" "$gl_cv_have_include_next" >&6; }
9760   PRAGMA_SYSTEM_HEADER=
9761   if test $gl_cv_have_include_next = yes; then
9762     INCLUDE_NEXT=include_next
9763     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9764     if test -n "$GCC"; then
9765       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9766     fi
9767   else
9768     if test $gl_cv_have_include_next = buggy; then
9769       INCLUDE_NEXT=include
9770       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9771     else
9772       INCLUDE_NEXT=include
9773       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9774     fi
9775   fi
9776
9777
9778
9779   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9780 printf %s "checking whether system header files limit the line length... " >&6; }
9781 if test ${gl_cv_pragma_columns+y}
9782 then :
9783   printf %s "(cached) " >&6
9784 else
9785        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786 /* end confdefs.h.  */
9787
9788 #ifdef __TANDEM
9789 choke me
9790 #endif
9791
9792 _ACEOF
9793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9794   $EGREP "choke me" >/dev/null 2>&1
9795 then :
9796   gl_cv_pragma_columns=yes
9797 else
9798   gl_cv_pragma_columns=no
9799 fi
9800 rm -rf conftest*
9801
9802
9803 fi
9804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9805 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
9806   if test $gl_cv_pragma_columns = yes; then
9807     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9808   else
9809     PRAGMA_COLUMNS=
9810   fi
9811
9812
9813
9814
9815   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9816 printf %s "checking whether // is distinct from /... " >&6; }
9817 if test ${gl_cv_double_slash_root+y}
9818 then :
9819   printf %s "(cached) " >&6
9820 else
9821    if test x"$cross_compiling" = xyes ; then
9822         # When cross-compiling, there is no way to tell whether // is special
9823         # short of a list of hosts.  However, the only known hosts to date
9824         # that have a distinct // are Apollo DomainOS (too old to port to),
9825         # Cygwin, and z/OS.  If anyone knows of another system for which // has
9826         # special semantics and is distinct from /, please report it to
9827         # <bug-gnulib@gnu.org>.
9828         case $host in
9829           *-cygwin | i370-ibm-openedition)
9830             gl_cv_double_slash_root=yes ;;
9831           *)
9832             # Be optimistic and assume that / and // are the same when we
9833             # don't know.
9834             gl_cv_double_slash_root='unknown, assuming no' ;;
9835         esac
9836       else
9837         set x `ls -di / // 2>/dev/null`
9838         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9839           gl_cv_double_slash_root=no
9840         else
9841           gl_cv_double_slash_root=yes
9842         fi
9843       fi
9844 fi
9845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9846 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
9847   if test "$gl_cv_double_slash_root" = yes; then
9848
9849 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9850
9851   fi
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9865 printf %s "checking if environ is properly declared... " >&6; }
9866 if test ${gt_cv_var_environ_declaration+y}
9867 then :
9868   printf %s "(cached) " >&6
9869 else
9870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9871 /* end confdefs.h.  */
9872 #if HAVE_UNISTD_H
9873      #include <unistd.h>
9874      #endif
9875      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9876      #include <stdlib.h>
9877
9878             extern struct { int foo; } environ;
9879 int
9880 main (void)
9881 {
9882 environ.foo = 1;
9883   ;
9884   return 0;
9885 }
9886 _ACEOF
9887 if ac_fn_c_try_compile "$LINENO"
9888 then :
9889   gt_cv_var_environ_declaration=no
9890 else
9891   gt_cv_var_environ_declaration=yes
9892 fi
9893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9894 fi
9895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9896 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
9897   if test $gt_cv_var_environ_declaration = yes; then
9898
9899 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9900
9901   fi
9902
9903
9904   if test $gt_cv_var_environ_declaration != yes; then
9905     HAVE_DECL_ENVIRON=0
9906   fi
9907
9908
9909
9910   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9911 printf %s "checking for complete errno.h... " >&6; }
9912 if test ${gl_cv_header_errno_h_complete+y}
9913 then :
9914   printf %s "(cached) " >&6
9915 else
9916
9917     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9918 /* end confdefs.h.  */
9919
9920 #include <errno.h>
9921 #if !defined ETXTBSY
9922 booboo
9923 #endif
9924 #if !defined ENOMSG
9925 booboo
9926 #endif
9927 #if !defined EIDRM
9928 booboo
9929 #endif
9930 #if !defined ENOLINK
9931 booboo
9932 #endif
9933 #if !defined EPROTO
9934 booboo
9935 #endif
9936 #if !defined EMULTIHOP
9937 booboo
9938 #endif
9939 #if !defined EBADMSG
9940 booboo
9941 #endif
9942 #if !defined EOVERFLOW
9943 booboo
9944 #endif
9945 #if !defined ENOTSUP
9946 booboo
9947 #endif
9948 #if !defined ENETRESET
9949 booboo
9950 #endif
9951 #if !defined ECONNABORTED
9952 booboo
9953 #endif
9954 #if !defined ESTALE
9955 booboo
9956 #endif
9957 #if !defined EDQUOT
9958 booboo
9959 #endif
9960 #if !defined ECANCELED
9961 booboo
9962 #endif
9963 #if !defined EOWNERDEAD
9964 booboo
9965 #endif
9966 #if !defined ENOTRECOVERABLE
9967 booboo
9968 #endif
9969 #if !defined EILSEQ
9970 booboo
9971 #endif
9972
9973 _ACEOF
9974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9975   $EGREP "booboo" >/dev/null 2>&1
9976 then :
9977   gl_cv_header_errno_h_complete=no
9978 else
9979   gl_cv_header_errno_h_complete=yes
9980 fi
9981 rm -rf conftest*
9982
9983
9984 fi
9985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9986 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
9987   if test $gl_cv_header_errno_h_complete = yes; then
9988     ERRNO_H=''
9989   else
9990
9991
9992
9993
9994
9995
9996
9997
9998      if test $gl_cv_have_include_next = yes; then
9999        gl_cv_next_errno_h='<'errno.h'>'
10000      else
10001        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10002 printf %s "checking absolute name of <errno.h>... " >&6; }
10003 if test ${gl_cv_next_errno_h+y}
10004 then :
10005   printf %s "(cached) " >&6
10006 else
10007
10008
10009
10010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10011 /* end confdefs.h.  */
10012 #include <errno.h>
10013 _ACEOF
10014                 case "$host_os" in
10015     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10016     *)    gl_absname_cpp="$ac_cpp" ;;
10017   esac
10018
10019   case "$host_os" in
10020     mingw*)
10021                                           gl_dirsep_regex='[/\\]'
10022       ;;
10023     *)
10024       gl_dirsep_regex='\/'
10025       ;;
10026   esac
10027       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10028   gl_header_literal_regex=`echo 'errno.h' \
10029                            | sed -e "$gl_make_literal_regex_sed"`
10030   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10031       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10032       s|^/[^/]|//&|
10033       p
10034       q
10035     }'
10036
10037         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10038   sed -n "$gl_absolute_header_sed"`
10039
10040            gl_header=$gl_cv_absolute_errno_h
10041            gl_cv_next_errno_h='"'$gl_header'"'
10042
10043
10044 fi
10045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10046 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
10047      fi
10048      NEXT_ERRNO_H=$gl_cv_next_errno_h
10049
10050      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10051        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10052        gl_next_as_first_directive='<'errno.h'>'
10053      else
10054        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10055        gl_next_as_first_directive=$gl_cv_next_errno_h
10056      fi
10057      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10058
10059
10060
10061
10062     ERRNO_H='errno.h'
10063   fi
10064
10065    if test -n "$ERRNO_H"; then
10066   GL_GENERATE_ERRNO_H_TRUE=
10067   GL_GENERATE_ERRNO_H_FALSE='#'
10068 else
10069   GL_GENERATE_ERRNO_H_TRUE='#'
10070   GL_GENERATE_ERRNO_H_FALSE=
10071 fi
10072
10073
10074   if test -n "$ERRNO_H"; then
10075     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10076 printf %s "checking for EMULTIHOP value... " >&6; }
10077 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
10078 then :
10079   printf %s "(cached) " >&6
10080 else
10081
10082       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083 /* end confdefs.h.  */
10084
10085 #include <errno.h>
10086 #ifdef EMULTIHOP
10087 yes
10088 #endif
10089
10090 _ACEOF
10091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10092   $EGREP "yes" >/dev/null 2>&1
10093 then :
10094   gl_cv_header_errno_h_EMULTIHOP=yes
10095 else
10096   gl_cv_header_errno_h_EMULTIHOP=no
10097 fi
10098 rm -rf conftest*
10099
10100       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10101         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10102 /* end confdefs.h.  */
10103
10104 #define _XOPEN_SOURCE_EXTENDED 1
10105 #include <errno.h>
10106 #ifdef EMULTIHOP
10107 yes
10108 #endif
10109
10110 _ACEOF
10111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10112   $EGREP "yes" >/dev/null 2>&1
10113 then :
10114   gl_cv_header_errno_h_EMULTIHOP=hidden
10115 fi
10116 rm -rf conftest*
10117
10118         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10119                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10120 #define _XOPEN_SOURCE_EXTENDED 1
10121 #include <errno.h>
10122 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10123 #include <stdio.h>
10124 #include <stdlib.h>
10125 "
10126 then :
10127
10128 fi
10129
10130         fi
10131       fi
10132
10133 fi
10134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10135 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10136     case $gl_cv_header_errno_h_EMULTIHOP in
10137       yes | no)
10138         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10139         ;;
10140       *)
10141         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10142         ;;
10143     esac
10144
10145
10146   fi
10147
10148
10149   if test -n "$ERRNO_H"; then
10150     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10151 printf %s "checking for ENOLINK value... " >&6; }
10152 if test ${gl_cv_header_errno_h_ENOLINK+y}
10153 then :
10154   printf %s "(cached) " >&6
10155 else
10156
10157       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10158 /* end confdefs.h.  */
10159
10160 #include <errno.h>
10161 #ifdef ENOLINK
10162 yes
10163 #endif
10164
10165 _ACEOF
10166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10167   $EGREP "yes" >/dev/null 2>&1
10168 then :
10169   gl_cv_header_errno_h_ENOLINK=yes
10170 else
10171   gl_cv_header_errno_h_ENOLINK=no
10172 fi
10173 rm -rf conftest*
10174
10175       if test $gl_cv_header_errno_h_ENOLINK = no; then
10176         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177 /* end confdefs.h.  */
10178
10179 #define _XOPEN_SOURCE_EXTENDED 1
10180 #include <errno.h>
10181 #ifdef ENOLINK
10182 yes
10183 #endif
10184
10185 _ACEOF
10186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10187   $EGREP "yes" >/dev/null 2>&1
10188 then :
10189   gl_cv_header_errno_h_ENOLINK=hidden
10190 fi
10191 rm -rf conftest*
10192
10193         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10194                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10195 #define _XOPEN_SOURCE_EXTENDED 1
10196 #include <errno.h>
10197 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10198 #include <stdio.h>
10199 #include <stdlib.h>
10200 "
10201 then :
10202
10203 fi
10204
10205         fi
10206       fi
10207
10208 fi
10209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10210 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
10211     case $gl_cv_header_errno_h_ENOLINK in
10212       yes | no)
10213         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10214         ;;
10215       *)
10216         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10217         ;;
10218     esac
10219
10220
10221   fi
10222
10223
10224   if test -n "$ERRNO_H"; then
10225     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10226 printf %s "checking for EOVERFLOW value... " >&6; }
10227 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
10228 then :
10229   printf %s "(cached) " >&6
10230 else
10231
10232       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233 /* end confdefs.h.  */
10234
10235 #include <errno.h>
10236 #ifdef EOVERFLOW
10237 yes
10238 #endif
10239
10240 _ACEOF
10241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10242   $EGREP "yes" >/dev/null 2>&1
10243 then :
10244   gl_cv_header_errno_h_EOVERFLOW=yes
10245 else
10246   gl_cv_header_errno_h_EOVERFLOW=no
10247 fi
10248 rm -rf conftest*
10249
10250       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10251         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252 /* end confdefs.h.  */
10253
10254 #define _XOPEN_SOURCE_EXTENDED 1
10255 #include <errno.h>
10256 #ifdef EOVERFLOW
10257 yes
10258 #endif
10259
10260 _ACEOF
10261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10262   $EGREP "yes" >/dev/null 2>&1
10263 then :
10264   gl_cv_header_errno_h_EOVERFLOW=hidden
10265 fi
10266 rm -rf conftest*
10267
10268         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10269                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10270 #define _XOPEN_SOURCE_EXTENDED 1
10271 #include <errno.h>
10272 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10273 #include <stdio.h>
10274 #include <stdlib.h>
10275 "
10276 then :
10277
10278 fi
10279
10280         fi
10281       fi
10282
10283 fi
10284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10285 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10286     case $gl_cv_header_errno_h_EOVERFLOW in
10287       yes | no)
10288         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10289         ;;
10290       *)
10291         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10292         ;;
10293     esac
10294
10295
10296   fi
10297
10298
10299 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10300 if test "x$ac_cv_have_decl_strerror_r" = xyes
10301 then :
10302   ac_have_decl=1
10303 else
10304   ac_have_decl=0
10305 fi
10306
10307 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
10308
10309
10310
10311
10312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10313 printf %s "checking whether strerror_r returns char *... " >&6; }
10314 if test ${ac_cv_func_strerror_r_char_p+y}
10315 then :
10316   printf %s "(cached) " >&6
10317 else
10318
10319     ac_cv_func_strerror_r_char_p=no
10320     if test $ac_cv_have_decl_strerror_r = yes; then
10321       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10322 /* end confdefs.h.  */
10323 $ac_includes_default
10324 int
10325 main (void)
10326 {
10327
10328           char buf[100];
10329           char x = *strerror_r (0, buf, sizeof buf);
10330           char *p = strerror_r (0, buf, sizeof buf);
10331           return !p || x;
10332
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 if ac_fn_c_try_compile "$LINENO"
10338 then :
10339   ac_cv_func_strerror_r_char_p=yes
10340 fi
10341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10342     else
10343       # strerror_r is not declared.  Choose between
10344       # systems that have relatively inaccessible declarations for the
10345       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10346       # former has a strerror_r that returns char*, while the latter
10347       # has a strerror_r that returns `int'.
10348       # This test should segfault on the DEC system.
10349       if test "$cross_compiling" = yes
10350 then :
10351   :
10352 else
10353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h.  */
10355 $ac_includes_default
10356         extern char *strerror_r ();
10357 int
10358 main (void)
10359 {
10360 char buf[100];
10361           char x = *strerror_r (0, buf, sizeof buf);
10362           return ! isalpha (x);
10363   ;
10364   return 0;
10365 }
10366 _ACEOF
10367 if ac_fn_c_try_run "$LINENO"
10368 then :
10369   ac_cv_func_strerror_r_char_p=yes
10370 fi
10371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10372   conftest.$ac_objext conftest.beam conftest.$ac_ext
10373 fi
10374
10375     fi
10376
10377 fi
10378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10379 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
10380 if test $ac_cv_func_strerror_r_char_p = yes; then
10381
10382 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10383
10384 fi
10385
10386
10387   XGETTEXT_EXTRA_OPTIONS=
10388
10389
10390
10391
10392
10393   GNULIB_FCNTL=0;
10394   GNULIB_NONBLOCKING=0;
10395   GNULIB_OPEN=0;
10396   GNULIB_OPENAT=0;
10397     HAVE_FCNTL=1;
10398   HAVE_OPENAT=1;
10399   REPLACE_FCNTL=0;
10400   REPLACE_OPEN=0;
10401   REPLACE_OPENAT=0;
10402
10403
10404
10405
10406
10407
10408
10409
10410   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10411 printf %s "checking for working fcntl.h... " >&6; }
10412 if test ${gl_cv_header_working_fcntl_h+y}
10413 then :
10414   printf %s "(cached) " >&6
10415 else
10416   if test "$cross_compiling" = yes
10417 then :
10418   case "$host_os" in
10419                   # Guess 'no' on native Windows.
10420           mingw*) gl_cv_header_working_fcntl_h='no' ;;
10421           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
10422         esac
10423
10424 else
10425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10426 /* end confdefs.h.  */
10427 #include <sys/types.h>
10428            #include <sys/stat.h>
10429            #if HAVE_UNISTD_H
10430            # include <unistd.h>
10431            #else /* on Windows with MSVC */
10432            # include <io.h>
10433            # include <stdlib.h>
10434            # defined sleep(n) _sleep ((n) * 1000)
10435            #endif
10436            #include <fcntl.h>
10437            #ifndef O_NOATIME
10438             #define O_NOATIME 0
10439            #endif
10440            #ifndef O_NOFOLLOW
10441             #define O_NOFOLLOW 0
10442            #endif
10443            static int const constants[] =
10444             {
10445               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10446               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10447             };
10448
10449 int
10450 main (void)
10451 {
10452
10453             int result = !constants;
10454             #if HAVE_SYMLINK
10455             {
10456               static char const sym[] = "conftest.sym";
10457               if (symlink ("/dev/null", sym) != 0)
10458                 result |= 2;
10459               else
10460                 {
10461                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10462                   if (fd >= 0)
10463                     {
10464                       close (fd);
10465                       result |= 4;
10466                     }
10467                 }
10468               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10469                 result |= 2;
10470               else
10471                 {
10472                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10473                   if (fd >= 0)
10474                     {
10475                       close (fd);
10476                       result |= 4;
10477                     }
10478                 }
10479               unlink (sym);
10480             }
10481             #endif
10482             {
10483               static char const file[] = "confdefs.h";
10484               int fd = open (file, O_RDONLY | O_NOATIME);
10485               if (fd < 0)
10486                 result |= 8;
10487               else
10488                 {
10489                   struct stat st0;
10490                   if (fstat (fd, &st0) != 0)
10491                     result |= 16;
10492                   else
10493                     {
10494                       char c;
10495                       sleep (1);
10496                       if (read (fd, &c, 1) != 1)
10497                         result |= 24;
10498                       else
10499                         {
10500                           if (close (fd) != 0)
10501                             result |= 32;
10502                           else
10503                             {
10504                               struct stat st1;
10505                               if (stat (file, &st1) != 0)
10506                                 result |= 40;
10507                               else
10508                                 if (st0.st_atime != st1.st_atime)
10509                                   result |= 64;
10510                             }
10511                         }
10512                     }
10513                 }
10514             }
10515             return result;
10516   ;
10517   return 0;
10518 }
10519 _ACEOF
10520 if ac_fn_c_try_run "$LINENO"
10521 then :
10522   gl_cv_header_working_fcntl_h=yes
10523 else
10524   case $? in #(
10525         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10526         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10527         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10528          *) gl_cv_header_working_fcntl_h='no';;
10529         esac
10530 fi
10531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10532   conftest.$ac_objext conftest.beam conftest.$ac_ext
10533 fi
10534
10535
10536 fi
10537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10538 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
10539
10540   case $gl_cv_header_working_fcntl_h in #(
10541   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10542   *) ac_val=1;;
10543   esac
10544
10545 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
10546
10547
10548   case $gl_cv_header_working_fcntl_h in #(
10549   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10550   *) ac_val=1;;
10551   esac
10552
10553 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
10554
10555
10556 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10557 if test "x$ac_cv_type_pid_t" = xyes
10558 then :
10559
10560 else
10561
10562 printf "%s\n" "#define pid_t int" >>confdefs.h
10563
10564 fi
10565
10566 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10567 if test "x$ac_cv_type_mode_t" = xyes
10568 then :
10569
10570 else
10571
10572 printf "%s\n" "#define mode_t int" >>confdefs.h
10573
10574 fi
10575
10576
10577
10578
10579
10580
10581   GNULIB_FNMATCH=0;
10582     HAVE_FNMATCH=1;
10583   REPLACE_FNMATCH=0;
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599      if test $gl_cv_have_include_next = yes; then
10600        gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10601      else
10602        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
10603 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
10604 if test ${gl_cv_next_fnmatch_h+y}
10605 then :
10606   printf %s "(cached) " >&6
10607 else
10608
10609              if test $ac_cv_header_fnmatch_h = yes; then
10610
10611
10612
10613
10614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h.  */
10616 #include <fnmatch.h>
10617 _ACEOF
10618                 case "$host_os" in
10619     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10620     *)    gl_absname_cpp="$ac_cpp" ;;
10621   esac
10622
10623   case "$host_os" in
10624     mingw*)
10625                                           gl_dirsep_regex='[/\\]'
10626       ;;
10627     *)
10628       gl_dirsep_regex='\/'
10629       ;;
10630   esac
10631       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10632   gl_header_literal_regex=`echo 'fnmatch.h' \
10633                            | sed -e "$gl_make_literal_regex_sed"`
10634   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10635       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10636       s|^/[^/]|//&|
10637       p
10638       q
10639     }'
10640
10641         gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10642   sed -n "$gl_absolute_header_sed"`
10643
10644            gl_header=$gl_cv_absolute_fnmatch_h
10645            gl_cv_next_fnmatch_h='"'$gl_header'"'
10646           else
10647                gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10648              fi
10649
10650
10651 fi
10652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
10653 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
10654      fi
10655      NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
10656
10657      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10658        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10659        gl_next_as_first_directive='<'fnmatch.h'>'
10660      else
10661        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10662        gl_next_as_first_directive=$gl_cv_next_fnmatch_h
10663      fi
10664      NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
10665
10666
10667
10668
10669
10670
10671
10672   if test $ac_cv_header_fnmatch_h = yes; then
10673     HAVE_FNMATCH_H=1
10674   else
10675     HAVE_FNMATCH_H=0
10676   fi
10677
10678
10679   FNMATCH_H=''
10680      if false; then
10681               FNMATCH_H=fnmatch.h
10682      else
10683        if test $ac_cv_header_fnmatch_h != yes; then
10684                   FNMATCH_H=fnmatch.h
10685        fi
10686      fi
10687
10688
10689    if test -n "$FNMATCH_H"; then
10690   GL_GENERATE_FNMATCH_H_TRUE=
10691   GL_GENERATE_FNMATCH_H_FALSE='#'
10692 else
10693   GL_GENERATE_FNMATCH_H_TRUE='#'
10694   GL_GENERATE_FNMATCH_H_FALSE=
10695 fi
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10706 printf %s "checking for mbstate_t... " >&6; }
10707 if test ${ac_cv_type_mbstate_t+y}
10708 then :
10709   printf %s "(cached) " >&6
10710 else
10711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10712 /* end confdefs.h.  */
10713 $ac_includes_default
10714 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10715    <wchar.h>.
10716    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10717    included before <wchar.h>.  */
10718 #include <stddef.h>
10719 #include <stdio.h>
10720 #include <time.h>
10721 #include <wchar.h>
10722 int
10723 main (void)
10724 {
10725 mbstate_t x; return sizeof x;
10726   ;
10727   return 0;
10728 }
10729 _ACEOF
10730 if ac_fn_c_try_compile "$LINENO"
10731 then :
10732   ac_cv_type_mbstate_t=yes
10733 else
10734   ac_cv_type_mbstate_t=no
10735 fi
10736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10737 fi
10738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10739 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
10740    if test $ac_cv_type_mbstate_t = yes; then
10741
10742 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
10743
10744    else
10745
10746 printf "%s\n" "#define mbstate_t int" >>confdefs.h
10747
10748    fi
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758   GNULIB_DPRINTF=0;
10759   GNULIB_FCLOSE=0;
10760   GNULIB_FDOPEN=0;
10761   GNULIB_FFLUSH=0;
10762   GNULIB_FGETC=0;
10763   GNULIB_FGETS=0;
10764   GNULIB_FOPEN=0;
10765   GNULIB_FPRINTF=0;
10766   GNULIB_FPRINTF_POSIX=0;
10767   GNULIB_FPURGE=0;
10768   GNULIB_FPUTC=0;
10769   GNULIB_FPUTS=0;
10770   GNULIB_FREAD=0;
10771   GNULIB_FREOPEN=0;
10772   GNULIB_FSCANF=0;
10773   GNULIB_FSEEK=0;
10774   GNULIB_FSEEKO=0;
10775   GNULIB_FTELL=0;
10776   GNULIB_FTELLO=0;
10777   GNULIB_FWRITE=0;
10778   GNULIB_GETC=0;
10779   GNULIB_GETCHAR=0;
10780   GNULIB_GETDELIM=0;
10781   GNULIB_GETLINE=0;
10782   GNULIB_OBSTACK_PRINTF=0;
10783   GNULIB_OBSTACK_PRINTF_POSIX=0;
10784   GNULIB_PCLOSE=0;
10785   GNULIB_PERROR=0;
10786   GNULIB_POPEN=0;
10787   GNULIB_PRINTF=0;
10788   GNULIB_PRINTF_POSIX=0;
10789   GNULIB_PUTC=0;
10790   GNULIB_PUTCHAR=0;
10791   GNULIB_PUTS=0;
10792   GNULIB_REMOVE=0;
10793   GNULIB_RENAME=0;
10794   GNULIB_RENAMEAT=0;
10795   GNULIB_SCANF=0;
10796   GNULIB_SNPRINTF=0;
10797   GNULIB_SPRINTF_POSIX=0;
10798   GNULIB_STDIO_H_NONBLOCKING=0;
10799   GNULIB_STDIO_H_SIGPIPE=0;
10800   GNULIB_TMPFILE=0;
10801   GNULIB_VASPRINTF=0;
10802   GNULIB_VFSCANF=0;
10803   GNULIB_VSCANF=0;
10804   GNULIB_VDPRINTF=0;
10805   GNULIB_VFPRINTF=0;
10806   GNULIB_VFPRINTF_POSIX=0;
10807   GNULIB_VPRINTF=0;
10808   GNULIB_VPRINTF_POSIX=0;
10809   GNULIB_VSNPRINTF=0;
10810   GNULIB_VSPRINTF_POSIX=0;
10811     HAVE_DECL_FPURGE=1;
10812   HAVE_DECL_FSEEKO=1;
10813   HAVE_DECL_FTELLO=1;
10814   HAVE_DECL_GETDELIM=1;
10815   HAVE_DECL_GETLINE=1;
10816   HAVE_DECL_OBSTACK_PRINTF=1;
10817   HAVE_DECL_SNPRINTF=1;
10818   HAVE_DECL_VSNPRINTF=1;
10819   HAVE_DPRINTF=1;
10820   HAVE_FSEEKO=1;
10821   HAVE_FTELLO=1;
10822   HAVE_PCLOSE=1;
10823   HAVE_POPEN=1;
10824   HAVE_RENAMEAT=1;
10825   HAVE_VASPRINTF=1;
10826   HAVE_VDPRINTF=1;
10827   REPLACE_DPRINTF=0;
10828   REPLACE_FCLOSE=0;
10829   REPLACE_FDOPEN=0;
10830   REPLACE_FFLUSH=0;
10831   REPLACE_FOPEN=0;
10832   REPLACE_FPRINTF=0;
10833   REPLACE_FPURGE=0;
10834   REPLACE_FREOPEN=0;
10835   REPLACE_FSEEK=0;
10836   REPLACE_FSEEKO=0;
10837   REPLACE_FTELL=0;
10838   REPLACE_FTELLO=0;
10839   REPLACE_GETDELIM=0;
10840   REPLACE_GETLINE=0;
10841   REPLACE_OBSTACK_PRINTF=0;
10842   REPLACE_PERROR=0;
10843   REPLACE_POPEN=0;
10844   REPLACE_PRINTF=0;
10845   REPLACE_REMOVE=0;
10846   REPLACE_RENAME=0;
10847   REPLACE_RENAMEAT=0;
10848   REPLACE_SNPRINTF=0;
10849   REPLACE_SPRINTF=0;
10850   REPLACE_STDIO_READ_FUNCS=0;
10851   REPLACE_STDIO_WRITE_FUNCS=0;
10852   REPLACE_TMPFILE=0;
10853   REPLACE_VASPRINTF=0;
10854   REPLACE_VDPRINTF=0;
10855   REPLACE_VFPRINTF=0;
10856   REPLACE_VPRINTF=0;
10857   REPLACE_VSNPRINTF=0;
10858   REPLACE_VSPRINTF=0;
10859
10860
10861      GNULIB_FCHMODAT=0;
10862   GNULIB_FSTAT=0;
10863   GNULIB_FSTATAT=0;
10864   GNULIB_FUTIMENS=0;
10865   GNULIB_LCHMOD=0;
10866   GNULIB_LSTAT=0;
10867   GNULIB_MKDIRAT=0;
10868   GNULIB_MKFIFO=0;
10869   GNULIB_MKFIFOAT=0;
10870   GNULIB_MKNOD=0;
10871   GNULIB_MKNODAT=0;
10872   GNULIB_STAT=0;
10873   GNULIB_UTIMENSAT=0;
10874   GNULIB_OVERRIDES_STRUCT_STAT=0;
10875     HAVE_FCHMODAT=1;
10876   HAVE_FSTATAT=1;
10877   HAVE_FUTIMENS=1;
10878   HAVE_LCHMOD=1;
10879   HAVE_LSTAT=1;
10880   HAVE_MKDIRAT=1;
10881   HAVE_MKFIFO=1;
10882   HAVE_MKFIFOAT=1;
10883   HAVE_MKNOD=1;
10884   HAVE_MKNODAT=1;
10885   HAVE_UTIMENSAT=1;
10886   REPLACE_FSTAT=0;
10887   REPLACE_FSTATAT=0;
10888   REPLACE_FUTIMENS=0;
10889   REPLACE_LSTAT=0;
10890   REPLACE_MKDIR=0;
10891   REPLACE_MKFIFO=0;
10892   REPLACE_MKNOD=0;
10893   REPLACE_STAT=0;
10894   REPLACE_UTIMENSAT=0;
10895
10896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10897 printf %s "checking whether stat file-mode macros are broken... " >&6; }
10898 if test ${ac_cv_header_stat_broken+y}
10899 then :
10900   printf %s "(cached) " >&6
10901 else
10902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903 /* end confdefs.h.  */
10904 #include <sys/types.h>
10905 #include <sys/stat.h>
10906
10907 #if defined S_ISBLK && defined S_IFDIR
10908 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10909 #endif
10910
10911 #if defined S_ISBLK && defined S_IFCHR
10912 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10913 #endif
10914
10915 #if defined S_ISLNK && defined S_IFREG
10916 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10917 #endif
10918
10919 #if defined S_ISSOCK && defined S_IFREG
10920 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10921 #endif
10922
10923 _ACEOF
10924 if ac_fn_c_try_compile "$LINENO"
10925 then :
10926   ac_cv_header_stat_broken=no
10927 else
10928   ac_cv_header_stat_broken=yes
10929 fi
10930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931 fi
10932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10933 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
10934 if test $ac_cv_header_stat_broken = yes; then
10935
10936 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10937
10938 fi
10939
10940
10941
10942   case "$host_os" in
10943     mingw*)
10944                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10945 printf %s "checking for 64-bit off_t... " >&6; }
10946 if test ${gl_cv_type_off_t_64+y}
10947 then :
10948   printf %s "(cached) " >&6
10949 else
10950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h.  */
10952 #include <sys/types.h>
10953                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10954
10955 int
10956 main (void)
10957 {
10958
10959   ;
10960   return 0;
10961 }
10962 _ACEOF
10963 if ac_fn_c_try_compile "$LINENO"
10964 then :
10965   gl_cv_type_off_t_64=yes
10966 else
10967   gl_cv_type_off_t_64=no
10968 fi
10969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10970
10971 fi
10972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10973 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
10974       if test $gl_cv_type_off_t_64 = no; then
10975         WINDOWS_64_BIT_OFF_T=1
10976       else
10977         WINDOWS_64_BIT_OFF_T=0
10978       fi
10979                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10980 printf %s "checking for 64-bit st_size... " >&6; }
10981 if test ${gl_cv_member_st_size_64+y}
10982 then :
10983   printf %s "(cached) " >&6
10984 else
10985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10986 /* end confdefs.h.  */
10987 #include <sys/types.h>
10988                 struct stat buf;
10989                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10990
10991 int
10992 main (void)
10993 {
10994
10995   ;
10996   return 0;
10997 }
10998 _ACEOF
10999 if ac_fn_c_try_compile "$LINENO"
11000 then :
11001   gl_cv_member_st_size_64=yes
11002 else
11003   gl_cv_member_st_size_64=no
11004 fi
11005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006
11007 fi
11008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11009 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
11010       if test $gl_cv_member_st_size_64 = no; then
11011         WINDOWS_64_BIT_ST_SIZE=1
11012       else
11013         WINDOWS_64_BIT_ST_SIZE=0
11014       fi
11015       ;;
11016     *)
11017                                                       WINDOWS_64_BIT_OFF_T=0
11018       WINDOWS_64_BIT_ST_SIZE=0
11019       ;;
11020   esac
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036      if test $gl_cv_have_include_next = yes; then
11037        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11038      else
11039        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11040 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
11041 if test ${gl_cv_next_sys_stat_h+y}
11042 then :
11043   printf %s "(cached) " >&6
11044 else
11045
11046              if test $ac_cv_header_sys_stat_h = yes; then
11047
11048
11049
11050
11051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h.  */
11053 #include <sys/stat.h>
11054 _ACEOF
11055                 case "$host_os" in
11056     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11057     *)    gl_absname_cpp="$ac_cpp" ;;
11058   esac
11059
11060   case "$host_os" in
11061     mingw*)
11062                                           gl_dirsep_regex='[/\\]'
11063       ;;
11064     *)
11065       gl_dirsep_regex='\/'
11066       ;;
11067   esac
11068       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11069   gl_header_literal_regex=`echo 'sys/stat.h' \
11070                            | sed -e "$gl_make_literal_regex_sed"`
11071   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11072       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11073       s|^/[^/]|//&|
11074       p
11075       q
11076     }'
11077
11078         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11079   sed -n "$gl_absolute_header_sed"`
11080
11081            gl_header=$gl_cv_absolute_sys_stat_h
11082            gl_cv_next_sys_stat_h='"'$gl_header'"'
11083           else
11084                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11085              fi
11086
11087
11088 fi
11089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11090 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
11091      fi
11092      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11093
11094      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11095        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11096        gl_next_as_first_directive='<'sys/stat.h'>'
11097      else
11098        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11099        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11100      fi
11101      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11102
11103
11104
11105
11106
11107
11108
11109
11110     WINDOWS_STAT_TIMESPEC=0
11111
11112
11113
11114
11115
11116
11117
11118
11119       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11120      #include <sys/stat.h>
11121 "
11122 if test "x$ac_cv_type_nlink_t" = xyes
11123 then :
11124
11125 else
11126
11127 printf "%s\n" "#define nlink_t int" >>confdefs.h
11128
11129 fi
11130
11131
11132
11133
11134
11135
11136
11137 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11138 if test "x$ac_cv_have_decl_getdtablesize" = xyes
11139 then :
11140   ac_have_decl=1
11141 else
11142   ac_have_decl=0
11143 fi
11144
11145 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161      if test $gl_cv_have_include_next = yes; then
11162        gl_cv_next_getopt_h='<'getopt.h'>'
11163      else
11164        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11165 printf %s "checking absolute name of <getopt.h>... " >&6; }
11166 if test ${gl_cv_next_getopt_h+y}
11167 then :
11168   printf %s "(cached) " >&6
11169 else
11170
11171              if test $ac_cv_header_getopt_h = yes; then
11172
11173
11174
11175
11176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11177 /* end confdefs.h.  */
11178 #include <getopt.h>
11179 _ACEOF
11180                 case "$host_os" in
11181     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11182     *)    gl_absname_cpp="$ac_cpp" ;;
11183   esac
11184
11185   case "$host_os" in
11186     mingw*)
11187                                           gl_dirsep_regex='[/\\]'
11188       ;;
11189     *)
11190       gl_dirsep_regex='\/'
11191       ;;
11192   esac
11193       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11194   gl_header_literal_regex=`echo 'getopt.h' \
11195                            | sed -e "$gl_make_literal_regex_sed"`
11196   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11197       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11198       s|^/[^/]|//&|
11199       p
11200       q
11201     }'
11202
11203         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11204   sed -n "$gl_absolute_header_sed"`
11205
11206            gl_header=$gl_cv_absolute_getopt_h
11207            gl_cv_next_getopt_h='"'$gl_header'"'
11208           else
11209                gl_cv_next_getopt_h='<'getopt.h'>'
11210              fi
11211
11212
11213 fi
11214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11215 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
11216      fi
11217      NEXT_GETOPT_H=$gl_cv_next_getopt_h
11218
11219      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11220        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11221        gl_next_as_first_directive='<'getopt.h'>'
11222      else
11223        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11224        gl_next_as_first_directive=$gl_cv_next_getopt_h
11225      fi
11226      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11227
11228
11229
11230
11231   if test $ac_cv_header_getopt_h = yes; then
11232     HAVE_GETOPT_H=1
11233   else
11234     HAVE_GETOPT_H=0
11235   fi
11236
11237
11238   gl_replace_getopt=
11239
11240     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11241     for ac_header in getopt.h
11242 do :
11243   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11244 if test "x$ac_cv_header_getopt_h" = xyes
11245 then :
11246   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
11247
11248 else
11249   gl_replace_getopt=yes
11250 fi
11251
11252 done
11253   fi
11254
11255     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11256     for ac_func in getopt_long_only
11257 do :
11258   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11259 if test "x$ac_cv_func_getopt_long_only" = xyes
11260 then :
11261   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
11262
11263 else
11264   gl_replace_getopt=yes
11265 fi
11266
11267 done
11268   fi
11269
11270           if test -z "$gl_replace_getopt"; then
11271     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11272 printf %s "checking whether getopt is POSIX compatible... " >&6; }
11273 if test ${gl_cv_func_getopt_posix+y}
11274 then :
11275   printf %s "(cached) " >&6
11276 else
11277
11278                                                 if test $cross_compiling = no; then
11279                               if test "$cross_compiling" = yes
11280 then :
11281   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11282 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11283 as_fn_error $? "cannot run test program while cross compiling
11284 See \`config.log' for more details" "$LINENO" 5; }
11285 else
11286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287 /* end confdefs.h.  */
11288
11289 #include <unistd.h>
11290 #include <stdlib.h>
11291 #include <string.h>
11292
11293 int
11294 main ()
11295 {
11296   static char program[] = "program";
11297   static char a[] = "-a";
11298   static char foo[] = "foo";
11299   static char bar[] = "bar";
11300   char *argv[] = { program, a, foo, bar, NULL };
11301   int c;
11302
11303   c = getopt (4, argv, "ab");
11304   if (!(c == 'a'))
11305     return 1;
11306   c = getopt (4, argv, "ab");
11307   if (!(c == -1))
11308     return 2;
11309   if (!(optind == 2))
11310     return 3;
11311   return 0;
11312 }
11313
11314 _ACEOF
11315 if ac_fn_c_try_run "$LINENO"
11316 then :
11317   gl_cv_func_getopt_posix=maybe
11318 else
11319   gl_cv_func_getopt_posix=no
11320 fi
11321 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11322   conftest.$ac_objext conftest.beam conftest.$ac_ext
11323 fi
11324
11325           if test $gl_cv_func_getopt_posix = maybe; then
11326                                     if test "$cross_compiling" = yes
11327 then :
11328   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11329 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11330 as_fn_error $? "cannot run test program while cross compiling
11331 See \`config.log' for more details" "$LINENO" 5; }
11332 else
11333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334 /* end confdefs.h.  */
11335
11336 #include <unistd.h>
11337 #include <stdlib.h>
11338 #include <string.h>
11339
11340 int
11341 main ()
11342 {
11343   static char program[] = "program";
11344   static char donald[] = "donald";
11345   static char p[] = "-p";
11346   static char billy[] = "billy";
11347   static char duck[] = "duck";
11348   static char a[] = "-a";
11349   static char bar[] = "bar";
11350   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11351   int c;
11352
11353   c = getopt (7, argv, "+abp:q:");
11354   if (!(c == -1))
11355     return 4;
11356   if (!(strcmp (argv[0], "program") == 0))
11357     return 5;
11358   if (!(strcmp (argv[1], "donald") == 0))
11359     return 6;
11360   if (!(strcmp (argv[2], "-p") == 0))
11361     return 7;
11362   if (!(strcmp (argv[3], "billy") == 0))
11363     return 8;
11364   if (!(strcmp (argv[4], "duck") == 0))
11365     return 9;
11366   if (!(strcmp (argv[5], "-a") == 0))
11367     return 10;
11368   if (!(strcmp (argv[6], "bar") == 0))
11369     return 11;
11370   if (!(optind == 1))
11371     return 12;
11372   return 0;
11373 }
11374
11375 _ACEOF
11376 if ac_fn_c_try_run "$LINENO"
11377 then :
11378   gl_cv_func_getopt_posix=maybe
11379 else
11380   gl_cv_func_getopt_posix=no
11381 fi
11382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11383   conftest.$ac_objext conftest.beam conftest.$ac_ext
11384 fi
11385
11386           fi
11387           if test $gl_cv_func_getopt_posix = maybe; then
11388                         if test "$cross_compiling" = yes
11389 then :
11390   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11391 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11392 as_fn_error $? "cannot run test program while cross compiling
11393 See \`config.log' for more details" "$LINENO" 5; }
11394 else
11395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396 /* end confdefs.h.  */
11397
11398 #include <unistd.h>
11399 #include <stdlib.h>
11400 #include <string.h>
11401
11402 int
11403 main ()
11404 {
11405   static char program[] = "program";
11406   static char ab[] = "-ab";
11407   char *argv[3] = { program, ab, NULL };
11408   if (getopt (2, argv, "ab:") != 'a')
11409     return 13;
11410   if (getopt (2, argv, "ab:") != '?')
11411     return 14;
11412   if (optopt != 'b')
11413     return 15;
11414   if (optind != 2)
11415     return 16;
11416   return 0;
11417 }
11418
11419 _ACEOF
11420 if ac_fn_c_try_run "$LINENO"
11421 then :
11422   gl_cv_func_getopt_posix=yes
11423 else
11424   gl_cv_func_getopt_posix=no
11425 fi
11426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11427   conftest.$ac_objext conftest.beam conftest.$ac_ext
11428 fi
11429
11430           fi
11431         else
11432           case "$host_os" in
11433             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11434             *)                       gl_cv_func_getopt_posix="guessing yes";;
11435           esac
11436         fi
11437
11438 fi
11439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11440 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
11441     case "$gl_cv_func_getopt_posix" in
11442       *no) gl_replace_getopt=yes ;;
11443     esac
11444   fi
11445
11446   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11447     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11448 printf %s "checking for working GNU getopt function... " >&6; }
11449 if test ${gl_cv_func_getopt_gnu+y}
11450 then :
11451   printf %s "(cached) " >&6
11452 else
11453   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11454        # optstring is necessary for programs like m4 that have POSIX-mandated
11455        # semantics for supporting options interspersed with files.
11456        # Also, since getopt_long is a GNU extension, we require optind=0.
11457        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11458        # so take care to revert to the correct (non-)export state.
11459        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11460        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11461          xx) gl_had_POSIXLY_CORRECT=exported ;;
11462          x)  gl_had_POSIXLY_CORRECT=yes      ;;
11463          *)  gl_had_POSIXLY_CORRECT=         ;;
11464        esac
11465        POSIXLY_CORRECT=1
11466        export POSIXLY_CORRECT
11467        if test "$cross_compiling" = yes
11468 then :
11469            gl_cv_func_getopt_gnu="guessing no"
11470
11471 else
11472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473 /* end confdefs.h.  */
11474 #include <getopt.h>
11475                            #include <stddef.h>
11476                            #include <string.h>
11477
11478 #include <stdlib.h>
11479 #if defined __MACH__ && defined __APPLE__
11480 /* Avoid a crash on Mac OS X.  */
11481 #include <mach/mach.h>
11482 #include <mach/mach_error.h>
11483 #include <mach/thread_status.h>
11484 #include <mach/exception.h>
11485 #include <mach/task.h>
11486 #include <pthread.h>
11487 /* The exception port on which our thread listens.  */
11488 static mach_port_t our_exception_port;
11489 /* The main function of the thread listening for exceptions of type
11490    EXC_BAD_ACCESS.  */
11491 static void *
11492 mach_exception_thread (void *arg)
11493 {
11494   /* Buffer for a message to be received.  */
11495   struct {
11496     mach_msg_header_t head;
11497     mach_msg_body_t msgh_body;
11498     char data[1024];
11499   } msg;
11500   mach_msg_return_t retval;
11501   /* Wait for a message on the exception port.  */
11502   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11503                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11504   if (retval != MACH_MSG_SUCCESS)
11505     abort ();
11506   exit (1);
11507 }
11508 static void
11509 nocrash_init (void)
11510 {
11511   mach_port_t self = mach_task_self ();
11512   /* Allocate a port on which the thread shall listen for exceptions.  */
11513   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11514       == KERN_SUCCESS) {
11515     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11516     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11517                                 MACH_MSG_TYPE_MAKE_SEND)
11518         == KERN_SUCCESS) {
11519       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11520          for us.  */
11521       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11522       /* Create the thread listening on the exception port.  */
11523       pthread_attr_t attr;
11524       pthread_t thread;
11525       if (pthread_attr_init (&attr) == 0
11526           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11527           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11528         pthread_attr_destroy (&attr);
11529         /* Replace the exception port info for these exceptions with our own.
11530            Note that we replace the exception port for the entire task, not only
11531            for a particular thread.  This has the effect that when our exception
11532            port gets the message, the thread specific exception port has already
11533            been asked, and we don't need to bother about it.
11534            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11535         task_set_exception_ports (self, mask, our_exception_port,
11536                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11537       }
11538     }
11539   }
11540 }
11541 #elif defined _WIN32 && ! defined __CYGWIN__
11542 /* Avoid a crash on native Windows.  */
11543 #define WIN32_LEAN_AND_MEAN
11544 #include <windows.h>
11545 #include <winerror.h>
11546 static LONG WINAPI
11547 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11548 {
11549   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11550     {
11551     case EXCEPTION_ACCESS_VIOLATION:
11552     case EXCEPTION_IN_PAGE_ERROR:
11553     case EXCEPTION_STACK_OVERFLOW:
11554     case EXCEPTION_GUARD_PAGE:
11555     case EXCEPTION_PRIV_INSTRUCTION:
11556     case EXCEPTION_ILLEGAL_INSTRUCTION:
11557     case EXCEPTION_DATATYPE_MISALIGNMENT:
11558     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11559     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11560       exit (1);
11561     }
11562   return EXCEPTION_CONTINUE_SEARCH;
11563 }
11564 static void
11565 nocrash_init (void)
11566 {
11567   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11568 }
11569 #else
11570 /* Avoid a crash on POSIX systems.  */
11571 #include <signal.h>
11572 #include <unistd.h>
11573 /* A POSIX signal handler.  */
11574 static void
11575 exception_handler (int sig)
11576 {
11577   _exit (1);
11578 }
11579 static void
11580 nocrash_init (void)
11581 {
11582 #ifdef SIGSEGV
11583   signal (SIGSEGV, exception_handler);
11584 #endif
11585 #ifdef SIGBUS
11586   signal (SIGBUS, exception_handler);
11587 #endif
11588 }
11589 #endif
11590
11591
11592 int
11593 main (void)
11594 {
11595
11596              int result = 0;
11597
11598              nocrash_init();
11599
11600              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11601                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11602                 OSF/1 5.1, Solaris 10.  */
11603              {
11604                static char conftest[] = "conftest";
11605                static char plus[] = "-+";
11606                char *argv[3] = { conftest, plus, NULL };
11607                opterr = 0;
11608                if (getopt (2, argv, "+a") != '?')
11609                  result |= 1;
11610              }
11611              /* This code succeeds on glibc 2.8, mingw,
11612                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11613                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11614              {
11615                static char program[] = "program";
11616                static char p[] = "-p";
11617                static char foo[] = "foo";
11618                static char bar[] = "bar";
11619                char *argv[] = { program, p, foo, bar, NULL };
11620
11621                optind = 1;
11622                if (getopt (4, argv, "p::") != 'p')
11623                  result |= 2;
11624                else if (optarg != NULL)
11625                  result |= 4;
11626                else if (getopt (4, argv, "p::") != -1)
11627                  result |= 6;
11628                else if (optind != 2)
11629                  result |= 8;
11630              }
11631              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11632              {
11633                static char program[] = "program";
11634                static char foo[] = "foo";
11635                static char p[] = "-p";
11636                char *argv[] = { program, foo, p, NULL };
11637                optind = 0;
11638                if (getopt (3, argv, "-p") != 1)
11639                  result |= 16;
11640                else if (getopt (3, argv, "-p") != 'p')
11641                  result |= 16;
11642              }
11643              /* This code fails on glibc 2.11.  */
11644              {
11645                static char program[] = "program";
11646                static char b[] = "-b";
11647                static char a[] = "-a";
11648                char *argv[] = { program, b, a, NULL };
11649                optind = opterr = 0;
11650                if (getopt (3, argv, "+:a:b") != 'b')
11651                  result |= 32;
11652                else if (getopt (3, argv, "+:a:b") != ':')
11653                  result |= 32;
11654              }
11655              /* This code dumps core on glibc 2.14.  */
11656              {
11657                static char program[] = "program";
11658                static char w[] = "-W";
11659                static char dummy[] = "dummy";
11660                char *argv[] = { program, w, dummy, NULL };
11661                optind = opterr = 1;
11662                if (getopt (3, argv, "W;") != 'W')
11663                  result |= 64;
11664              }
11665              return result;
11666
11667   ;
11668   return 0;
11669 }
11670 _ACEOF
11671 if ac_fn_c_try_run "$LINENO"
11672 then :
11673   gl_cv_func_getopt_gnu=yes
11674 else
11675   gl_cv_func_getopt_gnu=no
11676 fi
11677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678   conftest.$ac_objext conftest.beam conftest.$ac_ext
11679 fi
11680
11681        case $gl_had_POSIXLY_CORRECT in
11682          exported) ;;
11683          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11684          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11685        esac
11686
11687 fi
11688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11689 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
11690     if test "$gl_cv_func_getopt_gnu" != yes; then
11691       gl_replace_getopt=yes
11692     else
11693       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11694 printf %s "checking for working GNU getopt_long function... " >&6; }
11695 if test ${gl_cv_func_getopt_long_gnu+y}
11696 then :
11697   printf %s "(cached) " >&6
11698 else
11699   if test "$cross_compiling" = yes
11700 then :
11701               case "$host_os" in
11702               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11703               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11704             esac
11705
11706 else
11707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708 /* end confdefs.h.  */
11709 #include <getopt.h>
11710                 #include <stddef.h>
11711                 #include <string.h>
11712
11713 int
11714 main (void)
11715 {
11716 static const struct option long_options[] =
11717                   {
11718                     { "xtremely-",no_argument,       NULL, 1003 },
11719                     { "xtra",     no_argument,       NULL, 1001 },
11720                     { "xtreme",   no_argument,       NULL, 1002 },
11721                     { "xtremely", no_argument,       NULL, 1003 },
11722                     { NULL,       0,                 NULL, 0 }
11723                   };
11724                 /* This code fails on OpenBSD 5.0.  */
11725                 {
11726                   static char program[] = "program";
11727                   static char xtremel[] = "--xtremel";
11728                   char *argv[] = { program, xtremel, NULL };
11729                   int option_index;
11730                   optind = 1; opterr = 0;
11731                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11732                     return 1;
11733                 }
11734                 return 0;
11735
11736   ;
11737   return 0;
11738 }
11739 _ACEOF
11740 if ac_fn_c_try_run "$LINENO"
11741 then :
11742   gl_cv_func_getopt_long_gnu=yes
11743 else
11744   gl_cv_func_getopt_long_gnu=no
11745 fi
11746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747   conftest.$ac_objext conftest.beam conftest.$ac_ext
11748 fi
11749
11750
11751 fi
11752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11753 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
11754       case "$gl_cv_func_getopt_long_gnu" in
11755         *yes) ;;
11756         *) gl_replace_getopt=yes ;;
11757       esac
11758     fi
11759   fi
11760
11761
11762
11763
11764 :
11765
11766
11767   GNULIB_GETTIMEOFDAY=0;
11768     HAVE_GETTIMEOFDAY=1;
11769   HAVE_STRUCT_TIMEVAL=1;
11770   HAVE_SYS_TIME_H=1;
11771   REPLACE_GETTIMEOFDAY=0;
11772   REPLACE_STRUCT_TIMEVAL=0;
11773
11774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
11775 printf %s "checking for C/C++ restrict keyword... " >&6; }
11776 if test ${ac_cv_c_restrict+y}
11777 then :
11778   printf %s "(cached) " >&6
11779 else
11780   ac_cv_c_restrict=no
11781    # The order here caters to the fact that C++ does not require restrict.
11782    for ac_kw in __restrict __restrict__ _Restrict restrict; do
11783      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h.  */
11785 typedef int *int_ptr;
11786            int foo (int_ptr $ac_kw ip) { return ip[0]; }
11787            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
11788            int bar (int ip[$ac_kw]) { return ip[0]; }
11789
11790 int
11791 main (void)
11792 {
11793 int s[1];
11794            int *$ac_kw t = s;
11795            t[0] = 0;
11796            return foo (t) + bar (t);
11797
11798   ;
11799   return 0;
11800 }
11801 _ACEOF
11802 if ac_fn_c_try_compile "$LINENO"
11803 then :
11804   ac_cv_c_restrict=$ac_kw
11805 fi
11806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807      test "$ac_cv_c_restrict" != no && break
11808    done
11809
11810 fi
11811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
11812 printf "%s\n" "$ac_cv_c_restrict" >&6; }
11813
11814  case $ac_cv_c_restrict in
11815    restrict) ;;
11816    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
11817  ;;
11818    *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
11819  ;;
11820  esac
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836      if test $gl_cv_have_include_next = yes; then
11837        gl_cv_next_sys_time_h='<'sys/time.h'>'
11838      else
11839        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11840 printf %s "checking absolute name of <sys/time.h>... " >&6; }
11841 if test ${gl_cv_next_sys_time_h+y}
11842 then :
11843   printf %s "(cached) " >&6
11844 else
11845
11846              if test $ac_cv_header_sys_time_h = yes; then
11847
11848
11849
11850
11851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852 /* end confdefs.h.  */
11853 #include <sys/time.h>
11854 _ACEOF
11855                 case "$host_os" in
11856     aix*) gl_absname_cpp="$ac_cpp -C" ;;
11857     *)    gl_absname_cpp="$ac_cpp" ;;
11858   esac
11859
11860   case "$host_os" in
11861     mingw*)
11862                                           gl_dirsep_regex='[/\\]'
11863       ;;
11864     *)
11865       gl_dirsep_regex='\/'
11866       ;;
11867   esac
11868       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11869   gl_header_literal_regex=`echo 'sys/time.h' \
11870                            | sed -e "$gl_make_literal_regex_sed"`
11871   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11872       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11873       s|^/[^/]|//&|
11874       p
11875       q
11876     }'
11877
11878         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11879   sed -n "$gl_absolute_header_sed"`
11880
11881            gl_header=$gl_cv_absolute_sys_time_h
11882            gl_cv_next_sys_time_h='"'$gl_header'"'
11883           else
11884                gl_cv_next_sys_time_h='<'sys/time.h'>'
11885              fi
11886
11887
11888 fi
11889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11890 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
11891      fi
11892      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11893
11894      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11895        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11896        gl_next_as_first_directive='<'sys/time.h'>'
11897      else
11898        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11899        gl_next_as_first_directive=$gl_cv_next_sys_time_h
11900      fi
11901      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11902
11903
11904
11905
11906
11907   if test $ac_cv_header_sys_time_h != yes; then
11908     HAVE_SYS_TIME_H=0
11909   fi
11910
11911
11912
11913
11914
11915   if test $ac_cv_header_sys_socket_h != yes; then
11916                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11917 if test "x$ac_cv_header_winsock2_h" = xyes
11918 then :
11919   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
11920
11921 fi
11922
11923   fi
11924   if test "$ac_cv_header_winsock2_h" = yes; then
11925     HAVE_WINSOCK2_H=1
11926     UNISTD_H_HAVE_WINSOCK2_H=1
11927     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11928   else
11929     HAVE_WINSOCK2_H=0
11930   fi
11931
11932
11933   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11934 printf %s "checking for struct timeval... " >&6; }
11935 if test ${gl_cv_sys_struct_timeval+y}
11936 then :
11937   printf %s "(cached) " >&6
11938 else
11939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940 /* end confdefs.h.  */
11941 #if HAVE_SYS_TIME_H
11942              #include <sys/time.h>
11943             #endif
11944             #include <time.h>
11945             #if HAVE_WINSOCK2_H
11946             # include <winsock2.h>
11947             #endif
11948
11949 int
11950 main (void)
11951 {
11952 static struct timeval x; x.tv_sec = x.tv_usec;
11953   ;
11954   return 0;
11955 }
11956 _ACEOF
11957 if ac_fn_c_try_compile "$LINENO"
11958 then :
11959   gl_cv_sys_struct_timeval=yes
11960 else
11961   gl_cv_sys_struct_timeval=no
11962 fi
11963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11964
11965 fi
11966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11967 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
11968   if test $gl_cv_sys_struct_timeval != yes; then
11969     HAVE_STRUCT_TIMEVAL=0
11970   else
11971                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11972 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11973 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
11974 then :
11975   printf %s "(cached) " >&6
11976 else
11977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11978 /* end confdefs.h.  */
11979 #if HAVE_SYS_TIME_H
11980                #include <sys/time.h>
11981               #endif
11982               #include <time.h>
11983               #if HAVE_WINSOCK2_H
11984               # include <winsock2.h>
11985               #endif
11986
11987 int
11988 main (void)
11989 {
11990 static struct timeval x;
11991               typedef int verify_tv_sec_type[
11992                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11993               ];
11994
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 if ac_fn_c_try_compile "$LINENO"
12000 then :
12001   gl_cv_sys_struct_timeval_tv_sec=yes
12002 else
12003   gl_cv_sys_struct_timeval_tv_sec=no
12004 fi
12005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12006
12007 fi
12008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12009 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12010     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12011       REPLACE_STRUCT_TIMEVAL=1
12012     fi
12013   fi
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023   NEED_LOCALTIME_BUFFER=0
12024
12025
12026   GNULIB_CTIME=0;
12027   GNULIB_MKTIME=0;
12028   GNULIB_LOCALTIME=0;
12029   GNULIB_NANOSLEEP=0;
12030   GNULIB_STRFTIME=0;
12031   GNULIB_STRPTIME=0;
12032   GNULIB_TIMEGM=0;
12033   GNULIB_TIME_R=0;
12034   GNULIB_TIME_RZ=0;
12035   GNULIB_TZSET=0;
12036     HAVE_DECL_LOCALTIME_R=1;
12037   HAVE_NANOSLEEP=1;
12038   HAVE_STRPTIME=1;
12039   HAVE_TIMEGM=1;
12040   HAVE_TZSET=1;
12041     HAVE_TIMEZONE_T=0;
12042         REPLACE_CTIME=GNULIB_PORTCHECK;
12043   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12044   REPLACE_MKTIME=GNULIB_PORTCHECK;
12045   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12046   REPLACE_STRFTIME=GNULIB_PORTCHECK;
12047   REPLACE_TIMEGM=GNULIB_PORTCHECK;
12048   REPLACE_TZSET=GNULIB_PORTCHECK;
12049
12050       : ${GNULIB_GETTIMEOFDAY=0};
12051         REPLACE_GMTIME=0;
12052   REPLACE_LOCALTIME=0;
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064     use_additional=yes
12065
12066   acl_save_prefix="$prefix"
12067   prefix="$acl_final_prefix"
12068   acl_save_exec_prefix="$exec_prefix"
12069   exec_prefix="$acl_final_exec_prefix"
12070
12071     eval additional_includedir=\"$includedir\"
12072     eval additional_libdir=\"$libdir\"
12073
12074   exec_prefix="$acl_save_exec_prefix"
12075   prefix="$acl_save_prefix"
12076
12077
12078 # Check whether --with-libiconv-prefix was given.
12079 if test ${with_libiconv_prefix+y}
12080 then :
12081   withval=$with_libiconv_prefix;
12082     if test "X$withval" = "Xno"; then
12083       use_additional=no
12084     else
12085       if test "X$withval" = "X"; then
12086
12087   acl_save_prefix="$prefix"
12088   prefix="$acl_final_prefix"
12089   acl_save_exec_prefix="$exec_prefix"
12090   exec_prefix="$acl_final_exec_prefix"
12091
12092           eval additional_includedir=\"$includedir\"
12093           eval additional_libdir=\"$libdir\"
12094
12095   exec_prefix="$acl_save_exec_prefix"
12096   prefix="$acl_save_prefix"
12097
12098       else
12099         additional_includedir="$withval/include"
12100         additional_libdir="$withval/$acl_libdirstem"
12101         if test "$acl_libdirstem2" != "$acl_libdirstem" \
12102            && test ! -d "$withval/$acl_libdirstem"; then
12103           additional_libdir="$withval/$acl_libdirstem2"
12104         fi
12105       fi
12106     fi
12107
12108 fi
12109
12110       LIBICONV=
12111   LTLIBICONV=
12112   INCICONV=
12113   LIBICONV_PREFIX=
12114       HAVE_LIBICONV=
12115   rpathdirs=
12116   ltrpathdirs=
12117   names_already_handled=
12118   names_next_round='iconv '
12119   while test -n "$names_next_round"; do
12120     names_this_round="$names_next_round"
12121     names_next_round=
12122     for name in $names_this_round; do
12123       already_handled=
12124       for n in $names_already_handled; do
12125         if test "$n" = "$name"; then
12126           already_handled=yes
12127           break
12128         fi
12129       done
12130       if test -z "$already_handled"; then
12131         names_already_handled="$names_already_handled $name"
12132                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
12133         eval value=\"\$HAVE_LIB$uppername\"
12134         if test -n "$value"; then
12135           if test "$value" = yes; then
12136             eval value=\"\$LIB$uppername\"
12137             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
12138             eval value=\"\$LTLIB$uppername\"
12139             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
12140           else
12141                                     :
12142           fi
12143         else
12144                               found_dir=
12145           found_la=
12146           found_so=
12147           found_a=
12148           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
12149           if test -n "$acl_shlibext"; then
12150             shrext=".$acl_shlibext"             # typically: shrext=.so
12151           else
12152             shrext=
12153           fi
12154           if test $use_additional = yes; then
12155             dir="$additional_libdir"
12156                                     if test -n "$acl_shlibext"; then
12157               if test -f "$dir/$libname$shrext"; then
12158                 found_dir="$dir"
12159                 found_so="$dir/$libname$shrext"
12160               else
12161                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12162                   ver=`(cd "$dir" && \
12163                         for f in "$libname$shrext".*; do echo "$f"; done \
12164                         | sed -e "s,^$libname$shrext\\\\.,," \
12165                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12166                         | sed 1q ) 2>/dev/null`
12167                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12168                     found_dir="$dir"
12169                     found_so="$dir/$libname$shrext.$ver"
12170                   fi
12171                 else
12172                   eval library_names=\"$acl_library_names_spec\"
12173                   for f in $library_names; do
12174                     if test -f "$dir/$f"; then
12175                       found_dir="$dir"
12176                       found_so="$dir/$f"
12177                       break
12178                     fi
12179                   done
12180                 fi
12181               fi
12182             fi
12183                         if test "X$found_dir" = "X"; then
12184               if test -f "$dir/$libname.$acl_libext"; then
12185                 found_dir="$dir"
12186                 found_a="$dir/$libname.$acl_libext"
12187               fi
12188             fi
12189             if test "X$found_dir" != "X"; then
12190               if test -f "$dir/$libname.la"; then
12191                 found_la="$dir/$libname.la"
12192               fi
12193             fi
12194           fi
12195           if test "X$found_dir" = "X"; then
12196             for x in $LDFLAGS $LTLIBICONV; do
12197
12198   acl_save_prefix="$prefix"
12199   prefix="$acl_final_prefix"
12200   acl_save_exec_prefix="$exec_prefix"
12201   exec_prefix="$acl_final_exec_prefix"
12202   eval x=\"$x\"
12203   exec_prefix="$acl_save_exec_prefix"
12204   prefix="$acl_save_prefix"
12205
12206               case "$x" in
12207                 -L*)
12208                   dir=`echo "X$x" | sed -e 's/^X-L//'`
12209                                     if test -n "$acl_shlibext"; then
12210                     if test -f "$dir/$libname$shrext"; then
12211                       found_dir="$dir"
12212                       found_so="$dir/$libname$shrext"
12213                     else
12214                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12215                         ver=`(cd "$dir" && \
12216                               for f in "$libname$shrext".*; do echo "$f"; done \
12217                               | sed -e "s,^$libname$shrext\\\\.,," \
12218                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12219                               | sed 1q ) 2>/dev/null`
12220                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12221                           found_dir="$dir"
12222                           found_so="$dir/$libname$shrext.$ver"
12223                         fi
12224                       else
12225                         eval library_names=\"$acl_library_names_spec\"
12226                         for f in $library_names; do
12227                           if test -f "$dir/$f"; then
12228                             found_dir="$dir"
12229                             found_so="$dir/$f"
12230                             break
12231                           fi
12232                         done
12233                       fi
12234                     fi
12235                   fi
12236                                     if test "X$found_dir" = "X"; then
12237                     if test -f "$dir/$libname.$acl_libext"; then
12238                       found_dir="$dir"
12239                       found_a="$dir/$libname.$acl_libext"
12240                     fi
12241                   fi
12242                   if test "X$found_dir" != "X"; then
12243                     if test -f "$dir/$libname.la"; then
12244                       found_la="$dir/$libname.la"
12245                     fi
12246                   fi
12247                   ;;
12248               esac
12249               if test "X$found_dir" != "X"; then
12250                 break
12251               fi
12252             done
12253           fi
12254           if test "X$found_dir" != "X"; then
12255                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
12256             if test "X$found_so" != "X"; then
12257                                                         if test "$enable_rpath" = no \
12258                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12259                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
12260                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12261               else
12262                                                                                 haveit=
12263                 for x in $ltrpathdirs; do
12264                   if test "X$x" = "X$found_dir"; then
12265                     haveit=yes
12266                     break
12267                   fi
12268                 done
12269                 if test -z "$haveit"; then
12270                   ltrpathdirs="$ltrpathdirs $found_dir"
12271                 fi
12272                                 if test "$acl_hardcode_direct" = yes; then
12273                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12274                 else
12275                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
12276                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12277                                                             haveit=
12278                     for x in $rpathdirs; do
12279                       if test "X$x" = "X$found_dir"; then
12280                         haveit=yes
12281                         break
12282                       fi
12283                     done
12284                     if test -z "$haveit"; then
12285                       rpathdirs="$rpathdirs $found_dir"
12286                     fi
12287                   else
12288                                                                                 haveit=
12289                     for x in $LDFLAGS $LIBICONV; do
12290
12291   acl_save_prefix="$prefix"
12292   prefix="$acl_final_prefix"
12293   acl_save_exec_prefix="$exec_prefix"
12294   exec_prefix="$acl_final_exec_prefix"
12295   eval x=\"$x\"
12296   exec_prefix="$acl_save_exec_prefix"
12297   prefix="$acl_save_prefix"
12298
12299                       if test "X$x" = "X-L$found_dir"; then
12300                         haveit=yes
12301                         break
12302                       fi
12303                     done
12304                     if test -z "$haveit"; then
12305                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
12306                     fi
12307                     if test "$acl_hardcode_minus_L" != no; then
12308                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12309                     else
12310                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12311                     fi
12312                   fi
12313                 fi
12314               fi
12315             else
12316               if test "X$found_a" != "X"; then
12317                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
12318               else
12319                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
12320               fi
12321             fi
12322                         additional_includedir=
12323             case "$found_dir" in
12324               */$acl_libdirstem | */$acl_libdirstem/)
12325                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
12326                 if test "$name" = 'iconv'; then
12327                   LIBICONV_PREFIX="$basedir"
12328                 fi
12329                 additional_includedir="$basedir/include"
12330                 ;;
12331               */$acl_libdirstem2 | */$acl_libdirstem2/)
12332                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
12333                 if test "$name" = 'iconv'; then
12334                   LIBICONV_PREFIX="$basedir"
12335                 fi
12336                 additional_includedir="$basedir/include"
12337                 ;;
12338             esac
12339             if test "X$additional_includedir" != "X"; then
12340                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
12341                 haveit=
12342                 if test "X$additional_includedir" = "X/usr/local/include"; then
12343                   if test -n "$GCC"; then
12344                     case $host_os in
12345                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12346                     esac
12347                   fi
12348                 fi
12349                 if test -z "$haveit"; then
12350                   for x in $CPPFLAGS $INCICONV; do
12351
12352   acl_save_prefix="$prefix"
12353   prefix="$acl_final_prefix"
12354   acl_save_exec_prefix="$exec_prefix"
12355   exec_prefix="$acl_final_exec_prefix"
12356   eval x=\"$x\"
12357   exec_prefix="$acl_save_exec_prefix"
12358   prefix="$acl_save_prefix"
12359
12360                     if test "X$x" = "X-I$additional_includedir"; then
12361                       haveit=yes
12362                       break
12363                     fi
12364                   done
12365                   if test -z "$haveit"; then
12366                     if test -d "$additional_includedir"; then
12367                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
12368                     fi
12369                   fi
12370                 fi
12371               fi
12372             fi
12373                         if test -n "$found_la"; then
12374                                                         save_libdir="$libdir"
12375               case "$found_la" in
12376                 */* | *\\*) . "$found_la" ;;
12377                 *) . "./$found_la" ;;
12378               esac
12379               libdir="$save_libdir"
12380                             for dep in $dependency_libs; do
12381                 case "$dep" in
12382                   -L*)
12383                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12384                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
12385                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
12386                       haveit=
12387                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
12388                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
12389                         if test -n "$GCC"; then
12390                           case $host_os in
12391                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12392                           esac
12393                         fi
12394                       fi
12395                       if test -z "$haveit"; then
12396                         haveit=
12397                         for x in $LDFLAGS $LIBICONV; do
12398
12399   acl_save_prefix="$prefix"
12400   prefix="$acl_final_prefix"
12401   acl_save_exec_prefix="$exec_prefix"
12402   exec_prefix="$acl_final_exec_prefix"
12403   eval x=\"$x\"
12404   exec_prefix="$acl_save_exec_prefix"
12405   prefix="$acl_save_prefix"
12406
12407                           if test "X$x" = "X-L$additional_libdir"; then
12408                             haveit=yes
12409                             break
12410                           fi
12411                         done
12412                         if test -z "$haveit"; then
12413                           if test -d "$additional_libdir"; then
12414                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
12415                           fi
12416                         fi
12417                         haveit=
12418                         for x in $LDFLAGS $LTLIBICONV; do
12419
12420   acl_save_prefix="$prefix"
12421   prefix="$acl_final_prefix"
12422   acl_save_exec_prefix="$exec_prefix"
12423   exec_prefix="$acl_final_exec_prefix"
12424   eval x=\"$x\"
12425   exec_prefix="$acl_save_exec_prefix"
12426   prefix="$acl_save_prefix"
12427
12428                           if test "X$x" = "X-L$additional_libdir"; then
12429                             haveit=yes
12430                             break
12431                           fi
12432                         done
12433                         if test -z "$haveit"; then
12434                           if test -d "$additional_libdir"; then
12435                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
12436                           fi
12437                         fi
12438                       fi
12439                     fi
12440                     ;;
12441                   -R*)
12442                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
12443                     if test "$enable_rpath" != no; then
12444                                                                   haveit=
12445                       for x in $rpathdirs; do
12446                         if test "X$x" = "X$dir"; then
12447                           haveit=yes
12448                           break
12449                         fi
12450                       done
12451                       if test -z "$haveit"; then
12452                         rpathdirs="$rpathdirs $dir"
12453                       fi
12454                                                                   haveit=
12455                       for x in $ltrpathdirs; do
12456                         if test "X$x" = "X$dir"; then
12457                           haveit=yes
12458                           break
12459                         fi
12460                       done
12461                       if test -z "$haveit"; then
12462                         ltrpathdirs="$ltrpathdirs $dir"
12463                       fi
12464                     fi
12465                     ;;
12466                   -l*)
12467                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12468                     ;;
12469                   *.la)
12470                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12471                     ;;
12472                   *)
12473                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
12474                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
12475                     ;;
12476                 esac
12477               done
12478             fi
12479           else
12480                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12481             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
12482           fi
12483         fi
12484       fi
12485     done
12486   done
12487   if test "X$rpathdirs" != "X"; then
12488     if test -n "$acl_hardcode_libdir_separator"; then
12489                         alldirs=
12490       for found_dir in $rpathdirs; do
12491         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12492       done
12493             acl_save_libdir="$libdir"
12494       libdir="$alldirs"
12495       eval flag=\"$acl_hardcode_libdir_flag_spec\"
12496       libdir="$acl_save_libdir"
12497       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12498     else
12499             for found_dir in $rpathdirs; do
12500         acl_save_libdir="$libdir"
12501         libdir="$found_dir"
12502         eval flag=\"$acl_hardcode_libdir_flag_spec\"
12503         libdir="$acl_save_libdir"
12504         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12505       done
12506     fi
12507   fi
12508   if test "X$ltrpathdirs" != "X"; then
12509             for found_dir in $ltrpathdirs; do
12510       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
12511     done
12512   fi
12513
12514
12515
12516
12517
12518
12519
12520
12521   GNULIB_ICONV=0;
12522     ICONV_CONST=;
12523   REPLACE_ICONV=0;
12524   REPLACE_ICONV_OPEN=0;
12525   REPLACE_ICONV_UTF=0;
12526   ICONV_H='';
12527   if false; then
12528               ICONV_H='iconv.h'
12529      fi
12530
12531    if test -n "$ICONV_H"; then
12532   GL_GENERATE_ICONV_H_TRUE=
12533   GL_GENERATE_ICONV_H_FALSE='#'
12534 else
12535   GL_GENERATE_ICONV_H_TRUE='#'
12536   GL_GENERATE_ICONV_H_FALSE=
12537 fi
12538
12539
12540
12541
12542
12543
12544
12545           am_save_CPPFLAGS="$CPPFLAGS"
12546
12547   for element in $INCICONV; do
12548     haveit=
12549     for x in $CPPFLAGS; do
12550
12551   acl_save_prefix="$prefix"
12552   prefix="$acl_final_prefix"
12553   acl_save_exec_prefix="$exec_prefix"
12554   exec_prefix="$acl_final_exec_prefix"
12555   eval x=\"$x\"
12556   exec_prefix="$acl_save_exec_prefix"
12557   prefix="$acl_save_prefix"
12558
12559       if test "X$x" = "X$element"; then
12560         haveit=yes
12561         break
12562       fi
12563     done
12564     if test -z "$haveit"; then
12565       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12566     fi
12567   done
12568
12569
12570   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12571 printf %s "checking for iconv... " >&6; }
12572 if test ${am_cv_func_iconv+y}
12573 then :
12574   printf %s "(cached) " >&6
12575 else
12576
12577     am_cv_func_iconv="no, consider installing GNU libiconv"
12578     am_cv_lib_iconv=no
12579     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580 /* end confdefs.h.  */
12581
12582 #include <stdlib.h>
12583 #include <iconv.h>
12584
12585 int
12586 main (void)
12587 {
12588 iconv_t cd = iconv_open("","");
12589            iconv(cd,NULL,NULL,NULL,NULL);
12590            iconv_close(cd);
12591   ;
12592   return 0;
12593 }
12594 _ACEOF
12595 if ac_fn_c_try_link "$LINENO"
12596 then :
12597   am_cv_func_iconv=yes
12598 fi
12599 rm -f core conftest.err conftest.$ac_objext \
12600     conftest$ac_exeext conftest.$ac_ext
12601     if test "$am_cv_func_iconv" != yes; then
12602       am_save_LIBS="$LIBS"
12603       LIBS="$LIBS $LIBICONV"
12604       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12605 /* end confdefs.h.  */
12606
12607 #include <stdlib.h>
12608 #include <iconv.h>
12609
12610 int
12611 main (void)
12612 {
12613 iconv_t cd = iconv_open("","");
12614              iconv(cd,NULL,NULL,NULL,NULL);
12615              iconv_close(cd);
12616   ;
12617   return 0;
12618 }
12619 _ACEOF
12620 if ac_fn_c_try_link "$LINENO"
12621 then :
12622   am_cv_lib_iconv=yes
12623         am_cv_func_iconv=yes
12624 fi
12625 rm -f core conftest.err conftest.$ac_objext \
12626     conftest$ac_exeext conftest.$ac_ext
12627       LIBS="$am_save_LIBS"
12628     fi
12629
12630 fi
12631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12632 printf "%s\n" "$am_cv_func_iconv" >&6; }
12633   if test "$am_cv_func_iconv" = yes; then
12634     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12635 printf %s "checking for working iconv... " >&6; }
12636 if test ${am_cv_func_iconv_works+y}
12637 then :
12638   printf %s "(cached) " >&6
12639 else
12640
12641                   am_save_LIBS="$LIBS"
12642       if test $am_cv_lib_iconv = yes; then
12643         LIBS="$LIBS $LIBICONV"
12644       fi
12645       am_cv_func_iconv_works=no
12646       for ac_iconv_const in '' 'const'; do
12647         if test "$cross_compiling" = yes
12648 then :
12649   case "$host_os" in
12650              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12651              *)            am_cv_func_iconv_works="guessing yes" ;;
12652            esac
12653 else
12654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12655 /* end confdefs.h.  */
12656
12657 #include <iconv.h>
12658 #include <string.h>
12659
12660 #ifndef ICONV_CONST
12661 # define ICONV_CONST $ac_iconv_const
12662 #endif
12663
12664 int
12665 main (void)
12666 {
12667 int result = 0;
12668   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
12669      returns.  */
12670   {
12671     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12672     if (cd_utf8_to_88591 != (iconv_t)(-1))
12673       {
12674         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12675         char buf[10];
12676         ICONV_CONST char *inptr = input;
12677         size_t inbytesleft = strlen (input);
12678         char *outptr = buf;
12679         size_t outbytesleft = sizeof (buf);
12680         size_t res = iconv (cd_utf8_to_88591,
12681                             &inptr, &inbytesleft,
12682                             &outptr, &outbytesleft);
12683         if (res == 0)
12684           result |= 1;
12685         iconv_close (cd_utf8_to_88591);
12686       }
12687   }
12688   /* Test against Solaris 10 bug: Failures are not distinguishable from
12689      successful returns.  */
12690   {
12691     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12692     if (cd_ascii_to_88591 != (iconv_t)(-1))
12693       {
12694         static ICONV_CONST char input[] = "\263";
12695         char buf[10];
12696         ICONV_CONST char *inptr = input;
12697         size_t inbytesleft = strlen (input);
12698         char *outptr = buf;
12699         size_t outbytesleft = sizeof (buf);
12700         size_t res = iconv (cd_ascii_to_88591,
12701                             &inptr, &inbytesleft,
12702                             &outptr, &outbytesleft);
12703         if (res == 0)
12704           result |= 2;
12705         iconv_close (cd_ascii_to_88591);
12706       }
12707   }
12708   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
12709   {
12710     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12711     if (cd_88591_to_utf8 != (iconv_t)(-1))
12712       {
12713         static ICONV_CONST char input[] = "\304";
12714         static char buf[2] = { (char)0xDE, (char)0xAD };
12715         ICONV_CONST char *inptr = input;
12716         size_t inbytesleft = 1;
12717         char *outptr = buf;
12718         size_t outbytesleft = 1;
12719         size_t res = iconv (cd_88591_to_utf8,
12720                             &inptr, &inbytesleft,
12721                             &outptr, &outbytesleft);
12722         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12723           result |= 4;
12724         iconv_close (cd_88591_to_utf8);
12725       }
12726   }
12727 #if 0 /* This bug could be worked around by the caller.  */
12728   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
12729   {
12730     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12731     if (cd_88591_to_utf8 != (iconv_t)(-1))
12732       {
12733         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12734         char buf[50];
12735         ICONV_CONST char *inptr = input;
12736         size_t inbytesleft = strlen (input);
12737         char *outptr = buf;
12738         size_t outbytesleft = sizeof (buf);
12739         size_t res = iconv (cd_88591_to_utf8,
12740                             &inptr, &inbytesleft,
12741                             &outptr, &outbytesleft);
12742         if ((int)res > 0)
12743           result |= 8;
12744         iconv_close (cd_88591_to_utf8);
12745       }
12746   }
12747 #endif
12748   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12749      provided.  */
12750   {
12751     /* Try standardized names.  */
12752     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12753     /* Try IRIX, OSF/1 names.  */
12754     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12755     /* Try AIX names.  */
12756     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12757     /* Try HP-UX names.  */
12758     iconv_t cd4 = iconv_open ("utf8", "eucJP");
12759     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12760         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12761       result |= 16;
12762     if (cd1 != (iconv_t)(-1))
12763       iconv_close (cd1);
12764     if (cd2 != (iconv_t)(-1))
12765       iconv_close (cd2);
12766     if (cd3 != (iconv_t)(-1))
12767       iconv_close (cd3);
12768     if (cd4 != (iconv_t)(-1))
12769       iconv_close (cd4);
12770   }
12771   return result;
12772
12773   ;
12774   return 0;
12775 }
12776 _ACEOF
12777 if ac_fn_c_try_run "$LINENO"
12778 then :
12779   am_cv_func_iconv_works=yes
12780 fi
12781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12782   conftest.$ac_objext conftest.beam conftest.$ac_ext
12783 fi
12784
12785         test "$am_cv_func_iconv_works" = no || break
12786       done
12787       LIBS="$am_save_LIBS"
12788
12789 fi
12790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12791 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
12792     case "$am_cv_func_iconv_works" in
12793       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12794       *)   am_func_iconv=yes ;;
12795     esac
12796   else
12797     am_func_iconv=no am_cv_lib_iconv=no
12798   fi
12799   if test "$am_func_iconv" = yes; then
12800
12801 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
12802
12803   fi
12804   if test "$am_cv_lib_iconv" = yes; then
12805     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12806 printf %s "checking how to link with libiconv... " >&6; }
12807     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12808 printf "%s\n" "$LIBICONV" >&6; }
12809   else
12810             CPPFLAGS="$am_save_CPPFLAGS"
12811     LIBICONV=
12812     LTLIBICONV=
12813   fi
12814
12815
12816
12817   if test "$am_cv_func_iconv" = yes; then
12818     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
12819 printf %s "checking for iconv declaration... " >&6; }
12820     if test ${am_cv_proto_iconv+y}
12821 then :
12822   printf %s "(cached) " >&6
12823 else
12824
12825       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12826 /* end confdefs.h.  */
12827
12828 #include <stdlib.h>
12829 #include <iconv.h>
12830 extern
12831 #ifdef __cplusplus
12832 "C"
12833 #endif
12834 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
12835 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
12836 #else
12837 size_t iconv();
12838 #endif
12839
12840 int
12841 main (void)
12842 {
12843
12844   ;
12845   return 0;
12846 }
12847 _ACEOF
12848 if ac_fn_c_try_compile "$LINENO"
12849 then :
12850   am_cv_proto_iconv_arg1=""
12851 else
12852   am_cv_proto_iconv_arg1="const"
12853 fi
12854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12855       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
12856 fi
12857
12858     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
12859     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
12860          $am_cv_proto_iconv" >&5
12861 printf "%s\n" "
12862          $am_cv_proto_iconv" >&6; }
12863   else
12864             am_cv_proto_iconv_arg1=""
12865   fi
12866
12867 printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
12868
12869
12870      if test -n "$am_cv_proto_iconv_arg1"; then
12871        ICONV_CONST="const"
12872      fi
12873
12874
12875
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12877 printf %s "checking for inline... " >&6; }
12878 if test ${ac_cv_c_inline+y}
12879 then :
12880   printf %s "(cached) " >&6
12881 else
12882   ac_cv_c_inline=no
12883 for ac_kw in inline __inline__ __inline; do
12884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885 /* end confdefs.h.  */
12886 #ifndef __cplusplus
12887 typedef int foo_t;
12888 static $ac_kw foo_t static_foo () {return 0; }
12889 $ac_kw foo_t foo () {return 0; }
12890 #endif
12891
12892 _ACEOF
12893 if ac_fn_c_try_compile "$LINENO"
12894 then :
12895   ac_cv_c_inline=$ac_kw
12896 fi
12897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12898   test "$ac_cv_c_inline" != no && break
12899 done
12900
12901 fi
12902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12903 printf "%s\n" "$ac_cv_c_inline" >&6; }
12904
12905 case $ac_cv_c_inline in
12906   inline | yes) ;;
12907   *)
12908     case $ac_cv_c_inline in
12909       no) ac_val=;;
12910       *) ac_val=$ac_cv_c_inline;;
12911     esac
12912     cat >>confdefs.h <<_ACEOF
12913 #ifndef __cplusplus
12914 #define inline $ac_val
12915 #endif
12916 _ACEOF
12917     ;;
12918 esac
12919
12920 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
12921 if test "x$ac_cv_type_off_t" = xyes
12922 then :
12923
12924 else
12925
12926 printf "%s\n" "#define off_t long int" >>confdefs.h
12927
12928 fi
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941      if test $gl_cv_have_include_next = yes; then
12942        gl_cv_next_limits_h='<'limits.h'>'
12943      else
12944        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12945 printf %s "checking absolute name of <limits.h>... " >&6; }
12946 if test ${gl_cv_next_limits_h+y}
12947 then :
12948   printf %s "(cached) " >&6
12949 else
12950
12951              if test $ac_cv_header_limits_h = yes; then
12952
12953
12954
12955
12956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12957 /* end confdefs.h.  */
12958 #include <limits.h>
12959 _ACEOF
12960                 case "$host_os" in
12961     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12962     *)    gl_absname_cpp="$ac_cpp" ;;
12963   esac
12964
12965   case "$host_os" in
12966     mingw*)
12967                                           gl_dirsep_regex='[/\\]'
12968       ;;
12969     *)
12970       gl_dirsep_regex='\/'
12971       ;;
12972   esac
12973       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12974   gl_header_literal_regex=`echo 'limits.h' \
12975                            | sed -e "$gl_make_literal_regex_sed"`
12976   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12977       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12978       s|^/[^/]|//&|
12979       p
12980       q
12981     }'
12982
12983         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12984   sed -n "$gl_absolute_header_sed"`
12985
12986            gl_header=$gl_cv_absolute_limits_h
12987            gl_cv_next_limits_h='"'$gl_header'"'
12988           else
12989                gl_cv_next_limits_h='<'limits.h'>'
12990              fi
12991
12992
12993 fi
12994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12995 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
12996      fi
12997      NEXT_LIMITS_H=$gl_cv_next_limits_h
12998
12999      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13000        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13001        gl_next_as_first_directive='<'limits.h'>'
13002      else
13003        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13004        gl_next_as_first_directive=$gl_cv_next_limits_h
13005      fi
13006      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
13007
13008
13009
13010
13011
13012   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
13013 printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
13014 if test ${gl_cv_header_limits_width+y}
13015 then :
13016   printf %s "(cached) " >&6
13017 else
13018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019 /* end confdefs.h.  */
13020 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13021              #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13022             #endif
13023             #include <limits.h>
13024             long long llm = LLONG_MAX;
13025             int wb = WORD_BIT;
13026             int ullw = ULLONG_WIDTH;
13027
13028 int
13029 main (void)
13030 {
13031
13032   ;
13033   return 0;
13034 }
13035 _ACEOF
13036 if ac_fn_c_try_compile "$LINENO"
13037 then :
13038   gl_cv_header_limits_width=yes
13039 else
13040   gl_cv_header_limits_width=no
13041 fi
13042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043 fi
13044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
13045 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
13046   if test "$gl_cv_header_limits_width" = yes; then
13047     LIMITS_H=
13048   else
13049     LIMITS_H=limits.h
13050   fi
13051
13052    if test -n "$LIMITS_H"; then
13053   GL_GENERATE_LIMITS_H_TRUE=
13054   GL_GENERATE_LIMITS_H_FALSE='#'
13055 else
13056   GL_GENERATE_LIMITS_H_TRUE='#'
13057   GL_GENERATE_LIMITS_H_FALSE=
13058 fi
13059
13060
13061
13062   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13063 printf %s "checking for wint_t... " >&6; }
13064 if test ${gt_cv_c_wint_t+y}
13065 then :
13066   printf %s "(cached) " >&6
13067 else
13068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069 /* end confdefs.h.  */
13070
13071 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13072    <wchar.h>.
13073    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13074    before <wchar.h>.  */
13075 #include <stddef.h>
13076 #include <stdio.h>
13077 #include <time.h>
13078 #include <wchar.h>
13079             wint_t foo = (wchar_t)'\0';
13080 int
13081 main (void)
13082 {
13083
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 if ac_fn_c_try_compile "$LINENO"
13089 then :
13090   gt_cv_c_wint_t=yes
13091 else
13092   gt_cv_c_wint_t=no
13093 fi
13094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095 fi
13096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13097 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
13098   if test $gt_cv_c_wint_t = yes; then
13099
13100 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
13101
13102
13103             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
13104 printf %s "checking whether wint_t is too small... " >&6; }
13105 if test ${gl_cv_type_wint_t_too_small+y}
13106 then :
13107   printf %s "(cached) " >&6
13108 else
13109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110 /* end confdefs.h.  */
13111
13112 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13113    <wchar.h>.
13114    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13115    included before <wchar.h>.  */
13116 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13117 # include <stddef.h>
13118 # include <stdio.h>
13119 # include <time.h>
13120 #endif
13121 #include <wchar.h>
13122               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
13123
13124 int
13125 main (void)
13126 {
13127
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 if ac_fn_c_try_compile "$LINENO"
13133 then :
13134   gl_cv_type_wint_t_too_small=no
13135 else
13136   gl_cv_type_wint_t_too_small=yes
13137 fi
13138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13139 fi
13140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
13141 printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
13142     if test $gl_cv_type_wint_t_too_small = yes; then
13143       GNULIB_OVERRIDES_WINT_T=1
13144     else
13145       GNULIB_OVERRIDES_WINT_T=0
13146     fi
13147   else
13148     GNULIB_OVERRIDES_WINT_T=0
13149   fi
13150
13151
13152
13153   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
13154 printf %s "checking for unsigned long long int... " >&6; }
13155 if test ${ac_cv_type_unsigned_long_long_int+y}
13156 then :
13157   printf %s "(cached) " >&6
13158 else
13159   ac_cv_type_unsigned_long_long_int=yes
13160      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
13161        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162 /* end confdefs.h.  */
13163
13164   /* For now, do not test the preprocessor; as of 2007 there are too many
13165          implementations with broken preprocessors.  Perhaps this can
13166          be revisited in 2012.  In the meantime, code should not expect
13167          #if to work with literals wider than 32 bits.  */
13168       /* Test literals.  */
13169       long long int ll = 9223372036854775807ll;
13170       long long int nll = -9223372036854775807LL;
13171       unsigned long long int ull = 18446744073709551615ULL;
13172       /* Test constant expressions.   */
13173       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
13174                      ? 1 : -1)];
13175       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
13176                      ? 1 : -1)];
13177       int i = 63;
13178 int
13179 main (void)
13180 {
13181 /* Test availability of runtime routines for shift and division.  */
13182       long long int llmax = 9223372036854775807ll;
13183       unsigned long long int ullmax = 18446744073709551615ull;
13184       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
13185               | (llmax / ll) | (llmax % ll)
13186               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
13187               | (ullmax / ull) | (ullmax % ull));
13188   ;
13189   return 0;
13190 }
13191
13192 _ACEOF
13193 if ac_fn_c_try_link "$LINENO"
13194 then :
13195
13196 else
13197   ac_cv_type_unsigned_long_long_int=no
13198 fi
13199 rm -f core conftest.err conftest.$ac_objext \
13200     conftest$ac_exeext conftest.$ac_ext
13201      fi
13202 fi
13203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
13204 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
13205   if test $ac_cv_type_unsigned_long_long_int = yes; then
13206
13207 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
13208
13209   fi
13210
13211
13212
13213   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
13214 printf %s "checking for long long int... " >&6; }
13215 if test ${ac_cv_type_long_long_int+y}
13216 then :
13217   printf %s "(cached) " >&6
13218 else
13219   ac_cv_type_long_long_int=yes
13220       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
13221         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
13222         if test $ac_cv_type_long_long_int = yes; then
13223                                         if test "$cross_compiling" = yes
13224 then :
13225   :
13226 else
13227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13228 /* end confdefs.h.  */
13229 #include <limits.h>
13230                  #ifndef LLONG_MAX
13231                  # define HALF \
13232                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
13233                  # define LLONG_MAX (HALF - 1 + HALF)
13234                  #endif
13235 int
13236 main (void)
13237 {
13238 long long int n = 1;
13239                  int i;
13240                  for (i = 0; ; i++)
13241                    {
13242                      long long int m = n << i;
13243                      if (m >> i != n)
13244                        return 1;
13245                      if (LLONG_MAX / 2 < m)
13246                        break;
13247                    }
13248                  return 0;
13249   ;
13250   return 0;
13251 }
13252 _ACEOF
13253 if ac_fn_c_try_run "$LINENO"
13254 then :
13255
13256 else
13257   ac_cv_type_long_long_int=no
13258 fi
13259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13260   conftest.$ac_objext conftest.beam conftest.$ac_ext
13261 fi
13262
13263         fi
13264       fi
13265 fi
13266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
13267 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
13268   if test $ac_cv_type_long_long_int = yes; then
13269
13270 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
13271
13272   fi
13273
13274
13275
13276     gl_cv_c_multiarch=no
13277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279 #ifndef __APPLE_CC__
13280          not a universal capable compiler
13281         #endif
13282         typedef int dummy;
13283
13284 _ACEOF
13285 if ac_fn_c_try_compile "$LINENO"
13286 then :
13287
13288                arch=
13289      prev=
13290      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13291        if test -n "$prev"; then
13292          case $word in
13293            i?86 | x86_64 | ppc | ppc64)
13294              if test -z "$arch" || test "$arch" = "$word"; then
13295                arch="$word"
13296              else
13297                gl_cv_c_multiarch=yes
13298              fi
13299              ;;
13300          esac
13301          prev=
13302        else
13303          if test "x$word" = "x-arch"; then
13304            prev=arch
13305          fi
13306        fi
13307      done
13308
13309 fi
13310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13311   if test $gl_cv_c_multiarch = yes; then
13312     APPLE_UNIVERSAL_BUILD=1
13313   else
13314     APPLE_UNIVERSAL_BUILD=0
13315   fi
13316
13317
13318
13319
13320
13321
13322
13323
13324   if test $ac_cv_type_long_long_int = yes; then
13325     HAVE_LONG_LONG_INT=1
13326   else
13327     HAVE_LONG_LONG_INT=0
13328   fi
13329
13330
13331   if test $ac_cv_type_unsigned_long_long_int = yes; then
13332     HAVE_UNSIGNED_LONG_LONG_INT=1
13333   else
13334     HAVE_UNSIGNED_LONG_LONG_INT=0
13335   fi
13336
13337
13338
13339   if test $ac_cv_header_wchar_h = yes; then
13340     HAVE_WCHAR_H=1
13341   else
13342     HAVE_WCHAR_H=0
13343   fi
13344
13345
13346       if test $ac_cv_header_inttypes_h = yes; then
13347     HAVE_INTTYPES_H=1
13348   else
13349     HAVE_INTTYPES_H=0
13350   fi
13351
13352
13353       if test $ac_cv_header_sys_types_h = yes; then
13354     HAVE_SYS_TYPES_H=1
13355   else
13356     HAVE_SYS_TYPES_H=0
13357   fi
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369      if test $gl_cv_have_include_next = yes; then
13370        gl_cv_next_stdint_h='<'stdint.h'>'
13371      else
13372        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
13373 printf %s "checking absolute name of <stdint.h>... " >&6; }
13374 if test ${gl_cv_next_stdint_h+y}
13375 then :
13376   printf %s "(cached) " >&6
13377 else
13378
13379              if test $ac_cv_header_stdint_h = yes; then
13380
13381
13382
13383
13384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385 /* end confdefs.h.  */
13386 #include <stdint.h>
13387 _ACEOF
13388                 case "$host_os" in
13389     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13390     *)    gl_absname_cpp="$ac_cpp" ;;
13391   esac
13392
13393   case "$host_os" in
13394     mingw*)
13395                                           gl_dirsep_regex='[/\\]'
13396       ;;
13397     *)
13398       gl_dirsep_regex='\/'
13399       ;;
13400   esac
13401       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13402   gl_header_literal_regex=`echo 'stdint.h' \
13403                            | sed -e "$gl_make_literal_regex_sed"`
13404   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13405       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13406       s|^/[^/]|//&|
13407       p
13408       q
13409     }'
13410
13411         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13412   sed -n "$gl_absolute_header_sed"`
13413
13414            gl_header=$gl_cv_absolute_stdint_h
13415            gl_cv_next_stdint_h='"'$gl_header'"'
13416           else
13417                gl_cv_next_stdint_h='<'stdint.h'>'
13418              fi
13419
13420
13421 fi
13422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
13423 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
13424      fi
13425      NEXT_STDINT_H=$gl_cv_next_stdint_h
13426
13427      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13428        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13429        gl_next_as_first_directive='<'stdint.h'>'
13430      else
13431        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13432        gl_next_as_first_directive=$gl_cv_next_stdint_h
13433      fi
13434      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
13435
13436
13437
13438
13439   if test $ac_cv_header_stdint_h = yes; then
13440     HAVE_STDINT_H=1
13441   else
13442     HAVE_STDINT_H=0
13443   fi
13444
13445
13446     if test $ac_cv_header_stdint_h = yes; then
13447     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
13448 printf %s "checking whether stdint.h conforms to C99... " >&6; }
13449 if test ${gl_cv_header_working_stdint_h+y}
13450 then :
13451   printf %s "(cached) " >&6
13452 else
13453   gl_cv_header_working_stdint_h=no
13454        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13455 /* end confdefs.h.  */
13456
13457
13458 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13459 #define __STDC_CONSTANT_MACROS 1
13460 #define __STDC_LIMIT_MACROS 1
13461 #include <stdint.h>
13462 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
13463 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
13464 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
13465 #endif
13466
13467
13468   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13469      included before <wchar.h>.  */
13470   #include <stddef.h>
13471   #include <signal.h>
13472   #if HAVE_WCHAR_H
13473   # include <stdio.h>
13474   # include <time.h>
13475   # include <wchar.h>
13476   #endif
13477
13478
13479 #ifdef INT8_MAX
13480 int8_t a1 = INT8_MAX;
13481 int8_t a1min = INT8_MIN;
13482 #endif
13483 #ifdef INT16_MAX
13484 int16_t a2 = INT16_MAX;
13485 int16_t a2min = INT16_MIN;
13486 #endif
13487 #ifdef INT32_MAX
13488 int32_t a3 = INT32_MAX;
13489 int32_t a3min = INT32_MIN;
13490 #endif
13491 #ifdef INT64_MAX
13492 int64_t a4 = INT64_MAX;
13493 int64_t a4min = INT64_MIN;
13494 #endif
13495 #ifdef UINT8_MAX
13496 uint8_t b1 = UINT8_MAX;
13497 #else
13498 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
13499 #endif
13500 #ifdef UINT16_MAX
13501 uint16_t b2 = UINT16_MAX;
13502 #endif
13503 #ifdef UINT32_MAX
13504 uint32_t b3 = UINT32_MAX;
13505 #endif
13506 #ifdef UINT64_MAX
13507 uint64_t b4 = UINT64_MAX;
13508 #endif
13509 int_least8_t c1 = INT8_C (0x7f);
13510 int_least8_t c1max = INT_LEAST8_MAX;
13511 int_least8_t c1min = INT_LEAST8_MIN;
13512 int_least16_t c2 = INT16_C (0x7fff);
13513 int_least16_t c2max = INT_LEAST16_MAX;
13514 int_least16_t c2min = INT_LEAST16_MIN;
13515 int_least32_t c3 = INT32_C (0x7fffffff);
13516 int_least32_t c3max = INT_LEAST32_MAX;
13517 int_least32_t c3min = INT_LEAST32_MIN;
13518 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
13519 int_least64_t c4max = INT_LEAST64_MAX;
13520 int_least64_t c4min = INT_LEAST64_MIN;
13521 uint_least8_t d1 = UINT8_C (0xff);
13522 uint_least8_t d1max = UINT_LEAST8_MAX;
13523 uint_least16_t d2 = UINT16_C (0xffff);
13524 uint_least16_t d2max = UINT_LEAST16_MAX;
13525 uint_least32_t d3 = UINT32_C (0xffffffff);
13526 uint_least32_t d3max = UINT_LEAST32_MAX;
13527 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
13528 uint_least64_t d4max = UINT_LEAST64_MAX;
13529 int_fast8_t e1 = INT_FAST8_MAX;
13530 int_fast8_t e1min = INT_FAST8_MIN;
13531 int_fast16_t e2 = INT_FAST16_MAX;
13532 int_fast16_t e2min = INT_FAST16_MIN;
13533 int_fast32_t e3 = INT_FAST32_MAX;
13534 int_fast32_t e3min = INT_FAST32_MIN;
13535 int_fast64_t e4 = INT_FAST64_MAX;
13536 int_fast64_t e4min = INT_FAST64_MIN;
13537 uint_fast8_t f1 = UINT_FAST8_MAX;
13538 uint_fast16_t f2 = UINT_FAST16_MAX;
13539 uint_fast32_t f3 = UINT_FAST32_MAX;
13540 uint_fast64_t f4 = UINT_FAST64_MAX;
13541 #ifdef INTPTR_MAX
13542 intptr_t g = INTPTR_MAX;
13543 intptr_t gmin = INTPTR_MIN;
13544 #endif
13545 #ifdef UINTPTR_MAX
13546 uintptr_t h = UINTPTR_MAX;
13547 #endif
13548 intmax_t i = INTMAX_MAX;
13549 uintmax_t j = UINTMAX_MAX;
13550
13551 /* Check that SIZE_MAX has the correct type, if possible.  */
13552 #if 201112 <= __STDC_VERSION__
13553 int k = _Generic (SIZE_MAX, size_t: 0);
13554 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
13555        || (0x5110 <= __SUNPRO_C && !__STDC__))
13556 extern size_t k;
13557 extern __typeof__ (SIZE_MAX) k;
13558 #endif
13559
13560 #include <limits.h> /* for CHAR_BIT */
13561 #define TYPE_MINIMUM(t) \
13562   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
13563 #define TYPE_MAXIMUM(t) \
13564   ((t) ((t) 0 < (t) -1 \
13565         ? (t) -1 \
13566         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
13567 struct s {
13568   int check_PTRDIFF:
13569       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
13570       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
13571       ? 1 : -1;
13572   /* Detect bug in FreeBSD 6.0 / ia64.  */
13573   int check_SIG_ATOMIC:
13574       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
13575       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
13576       ? 1 : -1;
13577   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
13578   int check_WCHAR:
13579       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
13580       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
13581       ? 1 : -1;
13582   /* Detect bug in mingw.  */
13583   int check_WINT:
13584       WINT_MIN == TYPE_MINIMUM (wint_t)
13585       && WINT_MAX == TYPE_MAXIMUM (wint_t)
13586       ? 1 : -1;
13587
13588   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
13589   int check_UINT8_C:
13590         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
13591   int check_UINT16_C:
13592         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
13593
13594   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
13595 #ifdef UINT8_MAX
13596   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
13597 #endif
13598 #ifdef UINT16_MAX
13599   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
13600 #endif
13601 #ifdef UINT32_MAX
13602   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
13603 #endif
13604 #ifdef UINT64_MAX
13605   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
13606 #endif
13607   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
13608   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
13609   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
13610   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
13611   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
13612   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
13613   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
13614   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
13615   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
13616   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
13617   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
13618 };
13619
13620 int
13621 main (void)
13622 {
13623
13624   ;
13625   return 0;
13626 }
13627 _ACEOF
13628 if ac_fn_c_try_compile "$LINENO"
13629 then :
13630                                                     if test "$cross_compiling" = yes
13631 then :
13632   case "$host_os" in
13633                          # Guess yes on native Windows.
13634                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
13635                          # In general, assume it works.
13636                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
13637                esac
13638
13639 else
13640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641 /* end confdefs.h.  */
13642
13643
13644 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13645 #define __STDC_CONSTANT_MACROS 1
13646 #define __STDC_LIMIT_MACROS 1
13647 #include <stdint.h>
13648
13649
13650   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13651      included before <wchar.h>.  */
13652   #include <stddef.h>
13653   #include <signal.h>
13654   #if HAVE_WCHAR_H
13655   # include <stdio.h>
13656   # include <time.h>
13657   # include <wchar.h>
13658   #endif
13659
13660
13661 #include <stdio.h>
13662 #include <string.h>
13663 #define MVAL(macro) MVAL1(macro)
13664 #define MVAL1(expression) #expression
13665 static const char *macro_values[] =
13666   {
13667 #ifdef INT8_MAX
13668     MVAL (INT8_MAX),
13669 #endif
13670 #ifdef INT16_MAX
13671     MVAL (INT16_MAX),
13672 #endif
13673 #ifdef INT32_MAX
13674     MVAL (INT32_MAX),
13675 #endif
13676 #ifdef INT64_MAX
13677     MVAL (INT64_MAX),
13678 #endif
13679 #ifdef UINT8_MAX
13680     MVAL (UINT8_MAX),
13681 #endif
13682 #ifdef UINT16_MAX
13683     MVAL (UINT16_MAX),
13684 #endif
13685 #ifdef UINT32_MAX
13686     MVAL (UINT32_MAX),
13687 #endif
13688 #ifdef UINT64_MAX
13689     MVAL (UINT64_MAX),
13690 #endif
13691     NULL
13692   };
13693
13694 int
13695 main (void)
13696 {
13697
13698   const char **mv;
13699   for (mv = macro_values; *mv != NULL; mv++)
13700     {
13701       const char *value = *mv;
13702       /* Test whether it looks like a cast expression.  */
13703       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13704           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13705           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13706           || strncmp (value, "((int)"/*)*/, 6) == 0
13707           || strncmp (value, "((signed short)"/*)*/, 15) == 0
13708           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13709         return mv - macro_values + 1;
13710     }
13711   return 0;
13712
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 if ac_fn_c_try_run "$LINENO"
13718 then :
13719   gl_cv_header_working_stdint_h=yes
13720 fi
13721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13722   conftest.$ac_objext conftest.beam conftest.$ac_ext
13723 fi
13724
13725
13726 fi
13727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13728
13729 fi
13730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13731 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
13732   fi
13733
13734   HAVE_C99_STDINT_H=0
13735   HAVE_SYS_BITYPES_H=0
13736   HAVE_SYS_INTTYPES_H=0
13737   STDINT_H=stdint.h
13738   case "$gl_cv_header_working_stdint_h" in
13739     *yes)
13740       HAVE_C99_STDINT_H=1
13741                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
13742 printf %s "checking whether stdint.h predates C++11... " >&6; }
13743 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
13744 then :
13745   printf %s "(cached) " >&6
13746 else
13747   gl_cv_header_stdint_predates_cxx11_h=yes
13748          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13749 /* end confdefs.h.  */
13750
13751
13752 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13753 #include <stdint.h>
13754
13755
13756   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13757      included before <wchar.h>.  */
13758   #include <stddef.h>
13759   #include <signal.h>
13760   #if HAVE_WCHAR_H
13761   # include <stdio.h>
13762   # include <time.h>
13763   # include <wchar.h>
13764   #endif
13765
13766
13767 intmax_t im = INTMAX_MAX;
13768 int32_t i32 = INT32_C (0x7fffffff);
13769
13770 int
13771 main (void)
13772 {
13773
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 if ac_fn_c_try_compile "$LINENO"
13779 then :
13780   gl_cv_header_stdint_predates_cxx11_h=no
13781 fi
13782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783 fi
13784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
13785 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
13786
13787       if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
13788
13789 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13790
13791
13792 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13793
13794       fi
13795       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13796 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13797 if test ${gl_cv_header_stdint_width+y}
13798 then :
13799   printf %s "(cached) " >&6
13800 else
13801   gl_cv_header_stdint_width=no
13802          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803 /* end confdefs.h.  */
13804
13805               /* Work if build is not clean.  */
13806               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13807               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13808                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13809               #endif
13810               #include <stdint.h>
13811
13812   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13813      included before <wchar.h>.  */
13814   #include <stddef.h>
13815   #include <signal.h>
13816   #if HAVE_WCHAR_H
13817   # include <stdio.h>
13818   # include <time.h>
13819   # include <wchar.h>
13820   #endif
13821
13822               int iw = UINTMAX_WIDTH;
13823
13824 int
13825 main (void)
13826 {
13827
13828   ;
13829   return 0;
13830 }
13831 _ACEOF
13832 if ac_fn_c_try_compile "$LINENO"
13833 then :
13834   gl_cv_header_stdint_width=yes
13835 fi
13836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13837 fi
13838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13839 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
13840       if test "$gl_cv_header_stdint_width" = yes; then
13841         STDINT_H=
13842       fi
13843       ;;
13844     *)
13845                   ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
13846 if test "x$ac_cv_header_sys_inttypes_h" = xyes
13847 then :
13848   printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
13849
13850 fi
13851 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
13852 if test "x$ac_cv_header_sys_bitypes_h" = xyes
13853 then :
13854   printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
13855
13856 fi
13857
13858       if test $ac_cv_header_sys_inttypes_h = yes; then
13859         HAVE_SYS_INTTYPES_H=1
13860       fi
13861       if test $ac_cv_header_sys_bitypes_h = yes; then
13862         HAVE_SYS_BITYPES_H=1
13863       fi
13864
13865
13866   if test $APPLE_UNIVERSAL_BUILD = 0; then
13867
13868
13869   for gltype in ptrdiff_t size_t ; do
13870     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13871 printf %s "checking for bit size of $gltype... " >&6; }
13872 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13873 then :
13874   printf %s "(cached) " >&6
13875 else
13876   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13877   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13878      included before <wchar.h>.  */
13879   #include <stddef.h>
13880   #include <signal.h>
13881   #if HAVE_WCHAR_H
13882   # include <stdio.h>
13883   # include <time.h>
13884   # include <wchar.h>
13885   #endif
13886
13887 #include <limits.h>"
13888 then :
13889
13890 else
13891   result=unknown
13892 fi
13893
13894        eval gl_cv_bitsizeof_${gltype}=\$result
13895
13896 fi
13897 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13898                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13899 printf "%s\n" "$ac_res" >&6; }
13900     eval result=\$gl_cv_bitsizeof_${gltype}
13901     if test $result = unknown; then
13902                                                 result=0
13903     fi
13904     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13905     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13906
13907     eval BITSIZEOF_${GLTYPE}=\$result
13908   done
13909
13910
13911   fi
13912
13913
13914   for gltype in sig_atomic_t wchar_t wint_t ; do
13915     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13916 printf %s "checking for bit size of $gltype... " >&6; }
13917 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13918 then :
13919   printf %s "(cached) " >&6
13920 else
13921   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
13922   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13923      included before <wchar.h>.  */
13924   #include <stddef.h>
13925   #include <signal.h>
13926   #if HAVE_WCHAR_H
13927   # include <stdio.h>
13928   # include <time.h>
13929   # include <wchar.h>
13930   #endif
13931
13932 #include <limits.h>"
13933 then :
13934
13935 else
13936   result=unknown
13937 fi
13938
13939        eval gl_cv_bitsizeof_${gltype}=\$result
13940
13941 fi
13942 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13943                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13944 printf "%s\n" "$ac_res" >&6; }
13945     eval result=\$gl_cv_bitsizeof_${gltype}
13946     if test $result = unknown; then
13947                                                 result=0
13948     fi
13949     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13950     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13951
13952     eval BITSIZEOF_${GLTYPE}=\$result
13953   done
13954
13955
13956
13957
13958   for gltype in sig_atomic_t wchar_t wint_t ; do
13959     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13960 printf %s "checking whether $gltype is signed... " >&6; }
13961 if eval test \${gl_cv_type_${gltype}_signed+y}
13962 then :
13963   printf %s "(cached) " >&6
13964 else
13965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966 /* end confdefs.h.  */
13967
13968   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13969      included before <wchar.h>.  */
13970   #include <stddef.h>
13971   #include <signal.h>
13972   #if HAVE_WCHAR_H
13973   # include <stdio.h>
13974   # include <time.h>
13975   # include <wchar.h>
13976   #endif
13977
13978             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13979 int
13980 main (void)
13981 {
13982
13983   ;
13984   return 0;
13985 }
13986 _ACEOF
13987 if ac_fn_c_try_compile "$LINENO"
13988 then :
13989   result=yes
13990 else
13991   result=no
13992 fi
13993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13994        eval gl_cv_type_${gltype}_signed=\$result
13995
13996 fi
13997 eval ac_res=\$gl_cv_type_${gltype}_signed
13998                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13999 printf "%s\n" "$ac_res" >&6; }
14000     eval result=\$gl_cv_type_${gltype}_signed
14001     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14002     if test "$result" = yes; then
14003       printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
14004
14005       eval HAVE_SIGNED_${GLTYPE}=1
14006     else
14007       eval HAVE_SIGNED_${GLTYPE}=0
14008     fi
14009   done
14010
14011
14012   gl_cv_type_ptrdiff_t_signed=yes
14013   gl_cv_type_size_t_signed=no
14014   if test $APPLE_UNIVERSAL_BUILD = 0; then
14015
14016
14017   for gltype in ptrdiff_t size_t ; do
14018     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14019 printf %s "checking for $gltype integer literal suffix... " >&6; }
14020 if eval test \${gl_cv_type_${gltype}_suffix+y}
14021 then :
14022   printf %s "(cached) " >&6
14023 else
14024   eval gl_cv_type_${gltype}_suffix=no
14025        eval result=\$gl_cv_type_${gltype}_signed
14026        if test "$result" = yes; then
14027          glsufu=
14028        else
14029          glsufu=u
14030        fi
14031        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14032          case $glsuf in
14033            '')  gltype1='int';;
14034            l)   gltype1='long int';;
14035            ll)  gltype1='long long int';;
14036            i64) gltype1='__int64';;
14037            u)   gltype1='unsigned int';;
14038            ul)  gltype1='unsigned long int';;
14039            ull) gltype1='unsigned long long int';;
14040            ui64)gltype1='unsigned __int64';;
14041          esac
14042          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h.  */
14044
14045   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14046      included before <wchar.h>.  */
14047   #include <stddef.h>
14048   #include <signal.h>
14049   #if HAVE_WCHAR_H
14050   # include <stdio.h>
14051   # include <time.h>
14052   # include <wchar.h>
14053   #endif
14054
14055               extern $gltype foo;
14056               extern $gltype1 foo;
14057 int
14058 main (void)
14059 {
14060
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 if ac_fn_c_try_compile "$LINENO"
14066 then :
14067   eval gl_cv_type_${gltype}_suffix=\$glsuf
14068 fi
14069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14070          eval result=\$gl_cv_type_${gltype}_suffix
14071          test "$result" != no && break
14072        done
14073 fi
14074 eval ac_res=\$gl_cv_type_${gltype}_suffix
14075                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14076 printf "%s\n" "$ac_res" >&6; }
14077     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14078     eval result=\$gl_cv_type_${gltype}_suffix
14079     test "$result" = no && result=
14080     eval ${GLTYPE}_SUFFIX=\$result
14081     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
14082
14083   done
14084
14085
14086   fi
14087
14088
14089   for gltype in sig_atomic_t wchar_t wint_t ; do
14090     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14091 printf %s "checking for $gltype integer literal suffix... " >&6; }
14092 if eval test \${gl_cv_type_${gltype}_suffix+y}
14093 then :
14094   printf %s "(cached) " >&6
14095 else
14096   eval gl_cv_type_${gltype}_suffix=no
14097        eval result=\$gl_cv_type_${gltype}_signed
14098        if test "$result" = yes; then
14099          glsufu=
14100        else
14101          glsufu=u
14102        fi
14103        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14104          case $glsuf in
14105            '')  gltype1='int';;
14106            l)   gltype1='long int';;
14107            ll)  gltype1='long long int';;
14108            i64) gltype1='__int64';;
14109            u)   gltype1='unsigned int';;
14110            ul)  gltype1='unsigned long int';;
14111            ull) gltype1='unsigned long long int';;
14112            ui64)gltype1='unsigned __int64';;
14113          esac
14114          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14115 /* end confdefs.h.  */
14116
14117   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14118      included before <wchar.h>.  */
14119   #include <stddef.h>
14120   #include <signal.h>
14121   #if HAVE_WCHAR_H
14122   # include <stdio.h>
14123   # include <time.h>
14124   # include <wchar.h>
14125   #endif
14126
14127               extern $gltype foo;
14128               extern $gltype1 foo;
14129 int
14130 main (void)
14131 {
14132
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 if ac_fn_c_try_compile "$LINENO"
14138 then :
14139   eval gl_cv_type_${gltype}_suffix=\$glsuf
14140 fi
14141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142          eval result=\$gl_cv_type_${gltype}_suffix
14143          test "$result" != no && break
14144        done
14145 fi
14146 eval ac_res=\$gl_cv_type_${gltype}_suffix
14147                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14148 printf "%s\n" "$ac_res" >&6; }
14149     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14150     eval result=\$gl_cv_type_${gltype}_suffix
14151     test "$result" = no && result=
14152     eval ${GLTYPE}_SUFFIX=\$result
14153     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
14154
14155   done
14156
14157
14158
14159           if test $GNULIB_OVERRIDES_WINT_T = 1; then
14160     BITSIZEOF_WINT_T=32
14161   fi
14162
14163       ;;
14164   esac
14165
14166
14167
14168   LIMITS_H='limits.h'
14169    if test -n "$LIMITS_H"; then
14170   GL_GENERATE_LIMITS_H_TRUE=
14171   GL_GENERATE_LIMITS_H_FALSE='#'
14172 else
14173   GL_GENERATE_LIMITS_H_TRUE='#'
14174   GL_GENERATE_LIMITS_H_FALSE=
14175 fi
14176
14177
14178
14179
14180
14181
14182
14183    if test -n "$STDINT_H"; then
14184   GL_GENERATE_STDINT_H_TRUE=
14185   GL_GENERATE_STDINT_H_FALSE='#'
14186 else
14187   GL_GENERATE_STDINT_H_TRUE='#'
14188   GL_GENERATE_STDINT_H_FALSE=
14189 fi
14190
14191
14192
14193   GNULIB_IMAXABS=0;
14194   GNULIB_IMAXDIV=0;
14195   GNULIB_STRTOIMAX=0;
14196   GNULIB_STRTOUMAX=0;
14197     HAVE_DECL_IMAXABS=1;
14198   HAVE_DECL_IMAXDIV=1;
14199   HAVE_DECL_STRTOIMAX=1;
14200   HAVE_DECL_STRTOUMAX=1;
14201   HAVE_IMAXDIV_T=1;
14202   REPLACE_STRTOIMAX=0;
14203   REPLACE_STRTOUMAX=0;
14204   INT32_MAX_LT_INTMAX_MAX=1;
14205   INT64_MAX_EQ_LONG_MAX='defined _LP64';
14206   PRI_MACROS_BROKEN=0;
14207   PRIPTR_PREFIX=__PRIPTR_PREFIX;
14208   UINT32_MAX_LT_UINTMAX_MAX=1;
14209   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225      if test $gl_cv_have_include_next = yes; then
14226        gl_cv_next_inttypes_h='<'inttypes.h'>'
14227      else
14228        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
14229 printf %s "checking absolute name of <inttypes.h>... " >&6; }
14230 if test ${gl_cv_next_inttypes_h+y}
14231 then :
14232   printf %s "(cached) " >&6
14233 else
14234
14235              if test $ac_cv_header_inttypes_h = yes; then
14236
14237
14238
14239
14240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h.  */
14242 #include <inttypes.h>
14243 _ACEOF
14244                 case "$host_os" in
14245     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14246     *)    gl_absname_cpp="$ac_cpp" ;;
14247   esac
14248
14249   case "$host_os" in
14250     mingw*)
14251                                           gl_dirsep_regex='[/\\]'
14252       ;;
14253     *)
14254       gl_dirsep_regex='\/'
14255       ;;
14256   esac
14257       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14258   gl_header_literal_regex=`echo 'inttypes.h' \
14259                            | sed -e "$gl_make_literal_regex_sed"`
14260   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14261       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14262       s|^/[^/]|//&|
14263       p
14264       q
14265     }'
14266
14267         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14268   sed -n "$gl_absolute_header_sed"`
14269
14270            gl_header=$gl_cv_absolute_inttypes_h
14271            gl_cv_next_inttypes_h='"'$gl_header'"'
14272           else
14273                gl_cv_next_inttypes_h='<'inttypes.h'>'
14274              fi
14275
14276
14277 fi
14278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
14279 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
14280      fi
14281      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
14282
14283      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14284        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14285        gl_next_as_first_directive='<'inttypes.h'>'
14286      else
14287        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14288        gl_next_as_first_directive=$gl_cv_next_inttypes_h
14289      fi
14290      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303   ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
14304 if test "x$ac_cv_header_inttypes_h" = xyes
14305 then :
14306   printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
14307
14308 fi
14309
14310   if test $ac_cv_header_inttypes_h = yes; then
14311     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
14312 printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
14313 if test ${gt_cv_inttypes_pri_broken+y}
14314 then :
14315   printf %s "(cached) " >&6
14316 else
14317
14318         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h.  */
14320
14321 #include <inttypes.h>
14322 #ifdef PRId32
14323 char *p = PRId32;
14324 #endif
14325
14326 int
14327 main (void)
14328 {
14329
14330   ;
14331   return 0;
14332 }
14333 _ACEOF
14334 if ac_fn_c_try_compile "$LINENO"
14335 then :
14336   gt_cv_inttypes_pri_broken=no
14337 else
14338   gt_cv_inttypes_pri_broken=yes
14339 fi
14340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14341
14342 fi
14343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
14344 printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
14345   fi
14346   if test "$gt_cv_inttypes_pri_broken" = yes; then
14347
14348 printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
14349
14350     PRI_MACROS_BROKEN=1
14351   else
14352     PRI_MACROS_BROKEN=0
14353   fi
14354
14355
14356
14357   GNULIB_ISWBLANK=0;
14358   GNULIB_WCTYPE=0;
14359   GNULIB_ISWCTYPE=0;
14360   GNULIB_WCTRANS=0;
14361   GNULIB_TOWCTRANS=0;
14362     HAVE_ISWBLANK=1;
14363   HAVE_WCTYPE_T=1;
14364   HAVE_WCTRANS_T=1;
14365   REPLACE_ISWBLANK=0;
14366
14367
14368
14369
14370
14371   if test $ac_cv_header_crtdefs_h = yes; then
14372     HAVE_CRTDEFS_H=1
14373   else
14374     HAVE_CRTDEFS_H=0
14375   fi
14376
14377
14378
14379
14380
14381
14382
14383   if test $ac_cv_func_iswcntrl = yes; then
14384     HAVE_ISWCNTRL=1
14385   else
14386     HAVE_ISWCNTRL=0
14387   fi
14388
14389
14390
14391   if test $gt_cv_c_wint_t = yes; then
14392     HAVE_WINT_T=1
14393   else
14394     HAVE_WINT_T=0
14395   fi
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409      if test $gl_cv_have_include_next = yes; then
14410        gl_cv_next_wctype_h='<'wctype.h'>'
14411      else
14412        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
14413 printf %s "checking absolute name of <wctype.h>... " >&6; }
14414 if test ${gl_cv_next_wctype_h+y}
14415 then :
14416   printf %s "(cached) " >&6
14417 else
14418
14419              if test $ac_cv_header_wctype_h = yes; then
14420
14421
14422
14423
14424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14425 /* end confdefs.h.  */
14426 #include <wctype.h>
14427 _ACEOF
14428                 case "$host_os" in
14429     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14430     *)    gl_absname_cpp="$ac_cpp" ;;
14431   esac
14432
14433   case "$host_os" in
14434     mingw*)
14435                                           gl_dirsep_regex='[/\\]'
14436       ;;
14437     *)
14438       gl_dirsep_regex='\/'
14439       ;;
14440   esac
14441       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14442   gl_header_literal_regex=`echo 'wctype.h' \
14443                            | sed -e "$gl_make_literal_regex_sed"`
14444   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14445       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14446       s|^/[^/]|//&|
14447       p
14448       q
14449     }'
14450
14451         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14452   sed -n "$gl_absolute_header_sed"`
14453
14454            gl_header=$gl_cv_absolute_wctype_h
14455            gl_cv_next_wctype_h='"'$gl_header'"'
14456           else
14457                gl_cv_next_wctype_h='<'wctype.h'>'
14458              fi
14459
14460
14461 fi
14462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
14463 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
14464      fi
14465      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
14466
14467      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14468        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14469        gl_next_as_first_directive='<'wctype.h'>'
14470      else
14471        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14472        gl_next_as_first_directive=$gl_cv_next_wctype_h
14473      fi
14474      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
14475
14476
14477
14478
14479   if test $ac_cv_header_wctype_h = yes; then
14480     if test $ac_cv_func_iswcntrl = yes; then
14481                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
14482 printf %s "checking whether iswcntrl works... " >&6; }
14483 if test ${gl_cv_func_iswcntrl_works+y}
14484 then :
14485   printf %s "(cached) " >&6
14486 else
14487
14488           if test "$cross_compiling" = yes
14489 then :
14490                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h.  */
14492 #include <stdlib.h>
14493                           #if __GNU_LIBRARY__ == 1
14494                           Linux libc5 i18n is broken.
14495                           #endif
14496 int
14497 main (void)
14498 {
14499
14500   ;
14501   return 0;
14502 }
14503 _ACEOF
14504 if ac_fn_c_try_compile "$LINENO"
14505 then :
14506   gl_cv_func_iswcntrl_works="guessing yes"
14507 else
14508   gl_cv_func_iswcntrl_works="guessing no"
14509 fi
14510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511
14512 else
14513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14514 /* end confdefs.h.  */
14515
14516                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14517                   included before <wchar.h>.
14518                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14519                   must be included before <wchar.h>.  */
14520                #include <stddef.h>
14521                #include <stdio.h>
14522                #include <time.h>
14523                #include <wchar.h>
14524                #include <wctype.h>
14525                int main () { return iswprint ('x') == 0; }
14526
14527 _ACEOF
14528 if ac_fn_c_try_run "$LINENO"
14529 then :
14530   gl_cv_func_iswcntrl_works=yes
14531 else
14532   gl_cv_func_iswcntrl_works=no
14533 fi
14534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14535   conftest.$ac_objext conftest.beam conftest.$ac_ext
14536 fi
14537
14538
14539 fi
14540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
14541 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
14542     fi
14543     HAVE_WCTYPE_H=1
14544   else
14545     HAVE_WCTYPE_H=0
14546   fi
14547
14548
14549   case "$gl_cv_func_iswcntrl_works" in
14550     *yes) REPLACE_ISWCNTRL=0 ;;
14551     *)    REPLACE_ISWCNTRL=1 ;;
14552   esac
14553
14554
14555   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
14556         :
14557   fi
14558
14559   if test $REPLACE_ISWCNTRL = 1; then
14560     REPLACE_TOWLOWER=1
14561   else
14562     ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14563 if test "x$ac_cv_func_towlower" = xyes
14564 then :
14565   printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14566
14567 fi
14568
14569     if test $ac_cv_func_towlower = yes; then
14570       REPLACE_TOWLOWER=0
14571     else
14572       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14573              included before <wchar.h>.
14574              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14575              must be included before <wchar.h>.  */
14576           #include <stddef.h>
14577           #include <stdio.h>
14578           #include <time.h>
14579           #include <wchar.h>
14580           #if HAVE_WCTYPE_H
14581           # include <wctype.h>
14582           #endif
14583
14584 "
14585 if test "x$ac_cv_have_decl_towlower" = xyes
14586 then :
14587   ac_have_decl=1
14588 else
14589   ac_have_decl=0
14590 fi
14591
14592 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
14593
14594       if test $ac_cv_have_decl_towlower = yes; then
14595                                 REPLACE_TOWLOWER=1
14596       else
14597         REPLACE_TOWLOWER=0
14598       fi
14599     fi
14600   fi
14601
14602
14603   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
14604         :
14605   fi
14606
14607           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
14608 printf %s "checking for wctype_t... " >&6; }
14609 if test ${gl_cv_type_wctype_t+y}
14610 then :
14611   printf %s "(cached) " >&6
14612 else
14613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14614 /* end confdefs.h.  */
14615 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14616                included before <wchar.h>.
14617                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14618                must be included before <wchar.h>.  */
14619             #include <stddef.h>
14620             #include <stdio.h>
14621             #include <time.h>
14622             #include <wchar.h>
14623             #if HAVE_WCTYPE_H
14624             # include <wctype.h>
14625             #endif
14626             wctype_t a;
14627
14628 int
14629 main (void)
14630 {
14631
14632   ;
14633   return 0;
14634 }
14635 _ACEOF
14636 if ac_fn_c_try_compile "$LINENO"
14637 then :
14638   gl_cv_type_wctype_t=yes
14639 else
14640   gl_cv_type_wctype_t=no
14641 fi
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14643
14644 fi
14645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
14646 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
14647   if test $gl_cv_type_wctype_t = no; then
14648     HAVE_WCTYPE_T=0
14649   fi
14650
14651       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
14652 printf %s "checking for wctrans_t... " >&6; }
14653 if test ${gl_cv_type_wctrans_t+y}
14654 then :
14655   printf %s "(cached) " >&6
14656 else
14657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14658 /* end confdefs.h.  */
14659 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14660                included before <wchar.h>.
14661                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14662                must be included before <wchar.h>.  */
14663             #include <stddef.h>
14664             #include <stdio.h>
14665             #include <time.h>
14666             #include <wchar.h>
14667             #include <wctype.h>
14668             wctrans_t a;
14669
14670 int
14671 main (void)
14672 {
14673
14674   ;
14675   return 0;
14676 }
14677 _ACEOF
14678 if ac_fn_c_try_compile "$LINENO"
14679 then :
14680   gl_cv_type_wctrans_t=yes
14681 else
14682   gl_cv_type_wctrans_t=no
14683 fi
14684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685
14686 fi
14687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
14688 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
14689   if test $gl_cv_type_wctrans_t = no; then
14690     HAVE_WCTRANS_T=0
14691   fi
14692
14693
14694
14695
14696
14697
14698
14699   GNULIB_NL_LANGINFO=0;
14700     HAVE_NL_LANGINFO=1;
14701   REPLACE_NL_LANGINFO=0;
14702
14703
14704
14705   GNULIB_LOCALECONV=0;
14706   GNULIB_SETLOCALE=0;
14707   GNULIB_DUPLOCALE=0;
14708   GNULIB_LOCALENAME=0;
14709     HAVE_NEWLOCALE=1;
14710   HAVE_DUPLOCALE=1;
14711   HAVE_FREELOCALE=1;
14712   REPLACE_LOCALECONV=0;
14713   REPLACE_SETLOCALE=0;
14714   REPLACE_NEWLOCALE=0;
14715   REPLACE_DUPLOCALE=0;
14716   REPLACE_FREELOCALE=0;
14717   REPLACE_STRUCT_LCONV=0;
14718
14719
14720     REPLACE_NULL=0;
14721   HAVE_MAX_ALIGN_T=1;
14722   HAVE_WCHAR_T=1;
14723
14724
14725   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14726 printf %s "checking for wchar_t... " >&6; }
14727 if test ${gt_cv_c_wchar_t+y}
14728 then :
14729   printf %s "(cached) " >&6
14730 else
14731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h.  */
14733 #include <stddef.h>
14734             wchar_t foo = (wchar_t)'\0';
14735 int
14736 main (void)
14737 {
14738
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 if ac_fn_c_try_compile "$LINENO"
14744 then :
14745   gt_cv_c_wchar_t=yes
14746 else
14747   gt_cv_c_wchar_t=no
14748 fi
14749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750 fi
14751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14752 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
14753   if test $gt_cv_c_wchar_t = yes; then
14754
14755 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
14756
14757   fi
14758
14759
14760
14761
14762   STDDEF_H=
14763
14764       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14765 printf %s "checking for good max_align_t... " >&6; }
14766 if test ${gl_cv_type_max_align_t+y}
14767 then :
14768   printf %s "(cached) " >&6
14769 else
14770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h.  */
14772 #include <stddef.h>
14773             unsigned int s = sizeof (max_align_t);
14774             #if defined __GNUC__ || defined __IBM__ALIGNOF__
14775             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14776             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14777             #endif
14778
14779 int
14780 main (void)
14781 {
14782
14783   ;
14784   return 0;
14785 }
14786 _ACEOF
14787 if ac_fn_c_try_compile "$LINENO"
14788 then :
14789   gl_cv_type_max_align_t=yes
14790 else
14791   gl_cv_type_max_align_t=no
14792 fi
14793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14794
14795 fi
14796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14797 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
14798   if test $gl_cv_type_max_align_t = no; then
14799     HAVE_MAX_ALIGN_T=0
14800     STDDEF_H=stddef.h
14801   fi
14802
14803   if test $gt_cv_c_wchar_t = no; then
14804     HAVE_WCHAR_T=0
14805     STDDEF_H=stddef.h
14806   fi
14807
14808   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14809 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
14810 if test ${gl_cv_decl_null_works+y}
14811 then :
14812   printf %s "(cached) " >&6
14813 else
14814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14815 /* end confdefs.h.  */
14816 #include <stddef.h>
14817       int test[2 * (sizeof NULL == sizeof (void *)) -1];
14818
14819 int
14820 main (void)
14821 {
14822
14823   ;
14824   return 0;
14825 }
14826 _ACEOF
14827 if ac_fn_c_try_compile "$LINENO"
14828 then :
14829   gl_cv_decl_null_works=yes
14830 else
14831   gl_cv_decl_null_works=no
14832 fi
14833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14834 fi
14835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14836 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
14837   if test $gl_cv_decl_null_works = no; then
14838     REPLACE_NULL=1
14839     STDDEF_H=stddef.h
14840   fi
14841
14842
14843    if test -n "$STDDEF_H"; then
14844   GL_GENERATE_STDDEF_H_TRUE=
14845   GL_GENERATE_STDDEF_H_FALSE='#'
14846 else
14847   GL_GENERATE_STDDEF_H_TRUE='#'
14848   GL_GENERATE_STDDEF_H_FALSE=
14849 fi
14850
14851   if test -n "$STDDEF_H"; then
14852
14853
14854
14855
14856
14857
14858
14859
14860      if test $gl_cv_have_include_next = yes; then
14861        gl_cv_next_stddef_h='<'stddef.h'>'
14862      else
14863        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14864 printf %s "checking absolute name of <stddef.h>... " >&6; }
14865 if test ${gl_cv_next_stddef_h+y}
14866 then :
14867   printf %s "(cached) " >&6
14868 else
14869
14870
14871
14872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h.  */
14874 #include <stddef.h>
14875 _ACEOF
14876                 case "$host_os" in
14877     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14878     *)    gl_absname_cpp="$ac_cpp" ;;
14879   esac
14880
14881   case "$host_os" in
14882     mingw*)
14883                                           gl_dirsep_regex='[/\\]'
14884       ;;
14885     *)
14886       gl_dirsep_regex='\/'
14887       ;;
14888   esac
14889       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14890   gl_header_literal_regex=`echo 'stddef.h' \
14891                            | sed -e "$gl_make_literal_regex_sed"`
14892   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14893       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14894       s|^/[^/]|//&|
14895       p
14896       q
14897     }'
14898
14899         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14900   sed -n "$gl_absolute_header_sed"`
14901
14902            gl_header=$gl_cv_absolute_stddef_h
14903            gl_cv_next_stddef_h='"'$gl_header'"'
14904
14905
14906 fi
14907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14908 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
14909      fi
14910      NEXT_STDDEF_H=$gl_cv_next_stddef_h
14911
14912      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14913        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14914        gl_next_as_first_directive='<'stddef.h'>'
14915      else
14916        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14917        gl_next_as_first_directive=$gl_cv_next_stddef_h
14918      fi
14919      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14920
14921
14922
14923
14924   fi
14925
14926
14927
14928
14929          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14930 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
14931 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
14932 then :
14933   printf %s "(cached) " >&6
14934 else
14935   rm -f conftest.sym conftest.file
14936      echo >conftest.file
14937      if test "$cross_compiling" = yes
14938 then :
14939   case "$host_os" in
14940           linux-* | linux)
14941             # Guess yes on Linux systems.
14942             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14943           *-gnu* | gnu*)
14944             # Guess yes on glibc systems.
14945             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14946           mingw*)
14947             # Guess no on native Windows.
14948             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14949           *)
14950             # If we don't know, assume the worst.
14951             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14952         esac
14953
14954 else
14955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956 /* end confdefs.h.  */
14957 $ac_includes_default
14958 int
14959 main (void)
14960 {
14961 struct stat sbuf;
14962             if (symlink ("conftest.file", "conftest.sym") != 0)
14963               return 1;
14964             /* Linux will dereference the symlink and fail, as required by
14965                POSIX.  That is better in the sense that it means we will not
14966                have to compile and use the lstat wrapper.  */
14967             return lstat ("conftest.sym/", &sbuf) == 0;
14968
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 if ac_fn_c_try_run "$LINENO"
14974 then :
14975   gl_cv_func_lstat_dereferences_slashed_symlink=yes
14976 else
14977   gl_cv_func_lstat_dereferences_slashed_symlink=no
14978 fi
14979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14980   conftest.$ac_objext conftest.beam conftest.$ac_ext
14981 fi
14982
14983      rm -f conftest.sym conftest.file
14984
14985 fi
14986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14987 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14988   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14989     *yes)
14990
14991 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
14992
14993       ;;
14994   esac
14995
14996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14997 printf %s "checking for a sed that does not truncate output... " >&6; }
14998 if test ${ac_cv_path_SED+y}
14999 then :
15000   printf %s "(cached) " >&6
15001 else
15002             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15003      for ac_i in 1 2 3 4 5 6 7; do
15004        ac_script="$ac_script$as_nl$ac_script"
15005      done
15006      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15007      { ac_script=; unset ac_script;}
15008      if test -z "$SED"; then
15009   ac_path_SED_found=false
15010   # Loop through the user's path and test for each of PROGNAME-LIST
15011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15012 for as_dir in $PATH
15013 do
15014   IFS=$as_save_IFS
15015   case $as_dir in #(((
15016     '') as_dir=./ ;;
15017     */) ;;
15018     *) as_dir=$as_dir/ ;;
15019   esac
15020     for ac_prog in sed gsed
15021    do
15022     for ac_exec_ext in '' $ac_executable_extensions; do
15023       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15024       as_fn_executable_p "$ac_path_SED" || continue
15025 # Check for GNU ac_path_SED and select it if it is found.
15026   # Check for GNU $ac_path_SED
15027 case `"$ac_path_SED" --version 2>&1` in
15028 *GNU*)
15029   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15030 *)
15031   ac_count=0
15032   printf %s 0123456789 >"conftest.in"
15033   while :
15034   do
15035     cat "conftest.in" "conftest.in" >"conftest.tmp"
15036     mv "conftest.tmp" "conftest.in"
15037     cp "conftest.in" "conftest.nl"
15038     printf "%s\n" '' >> "conftest.nl"
15039     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15040     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15041     as_fn_arith $ac_count + 1 && ac_count=$as_val
15042     if test $ac_count -gt ${ac_path_SED_max-0}; then
15043       # Best one so far, save it but keep looking for a better one
15044       ac_cv_path_SED="$ac_path_SED"
15045       ac_path_SED_max=$ac_count
15046     fi
15047     # 10*(2^10) chars as input seems more than enough
15048     test $ac_count -gt 10 && break
15049   done
15050   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15051 esac
15052
15053       $ac_path_SED_found && break 3
15054     done
15055   done
15056   done
15057 IFS=$as_save_IFS
15058   if test -z "$ac_cv_path_SED"; then
15059     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15060   fi
15061 else
15062   ac_cv_path_SED=$SED
15063 fi
15064
15065 fi
15066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15067 printf "%s\n" "$ac_cv_path_SED" >&6; }
15068  SED="$ac_cv_path_SED"
15069   rm -f conftest.sed
15070
15071
15072   GNULIB__EXIT=0;
15073   GNULIB_ATOLL=0;
15074   GNULIB_CALLOC_POSIX=0;
15075   GNULIB_CANONICALIZE_FILE_NAME=0;
15076   GNULIB_GETLOADAVG=0;
15077   GNULIB_GETSUBOPT=0;
15078   GNULIB_GRANTPT=0;
15079   GNULIB_MALLOC_POSIX=0;
15080   GNULIB_MBTOWC=0;
15081   GNULIB_MKDTEMP=0;
15082   GNULIB_MKOSTEMP=0;
15083   GNULIB_MKOSTEMPS=0;
15084   GNULIB_MKSTEMP=0;
15085   GNULIB_MKSTEMPS=0;
15086   GNULIB_POSIX_OPENPT=0;
15087   GNULIB_PTSNAME=0;
15088   GNULIB_PTSNAME_R=0;
15089   GNULIB_PUTENV=0;
15090   GNULIB_QSORT_R=0;
15091   GNULIB_RANDOM=0;
15092   GNULIB_RANDOM_R=0;
15093   GNULIB_REALLOCARRAY=0;
15094   GNULIB_REALLOC_POSIX=0;
15095   GNULIB_REALPATH=0;
15096   GNULIB_RPMATCH=0;
15097   GNULIB_SECURE_GETENV=0;
15098   GNULIB_SETENV=0;
15099   GNULIB_STRTOD=0;
15100   GNULIB_STRTOLL=0;
15101   GNULIB_STRTOULL=0;
15102   GNULIB_SYSTEM_POSIX=0;
15103   GNULIB_UNLOCKPT=0;
15104   GNULIB_UNSETENV=0;
15105   GNULIB_WCTOMB=0;
15106     HAVE__EXIT=1;
15107   HAVE_ATOLL=1;
15108   HAVE_CANONICALIZE_FILE_NAME=1;
15109   HAVE_DECL_GETLOADAVG=1;
15110   HAVE_GETSUBOPT=1;
15111   HAVE_GRANTPT=1;
15112   HAVE_DECL_INITSTATE=1;
15113   HAVE_MKDTEMP=1;
15114   HAVE_MKOSTEMP=1;
15115   HAVE_MKOSTEMPS=1;
15116   HAVE_MKSTEMP=1;
15117   HAVE_MKSTEMPS=1;
15118   HAVE_POSIX_OPENPT=1;
15119   HAVE_PTSNAME=1;
15120   HAVE_PTSNAME_R=1;
15121   HAVE_QSORT_R=1;
15122   HAVE_RANDOM=1;
15123   HAVE_RANDOM_H=1;
15124   HAVE_RANDOM_R=1;
15125   HAVE_REALLOCARRAY=1;
15126   HAVE_REALPATH=1;
15127   HAVE_RPMATCH=1;
15128   HAVE_SECURE_GETENV=1;
15129   HAVE_SETENV=1;
15130   HAVE_DECL_SETENV=1;
15131   HAVE_DECL_SETSTATE=1;
15132   HAVE_STRTOD=1;
15133   HAVE_STRTOLL=1;
15134   HAVE_STRTOULL=1;
15135   HAVE_STRUCT_RANDOM_DATA=1;
15136   HAVE_SYS_LOADAVG_H=0;
15137   HAVE_UNLOCKPT=1;
15138   HAVE_DECL_UNSETENV=1;
15139   REPLACE_CALLOC=0;
15140   REPLACE_CANONICALIZE_FILE_NAME=0;
15141   REPLACE_MALLOC=0;
15142   REPLACE_MBTOWC=0;
15143   REPLACE_MKSTEMP=0;
15144   REPLACE_PTSNAME=0;
15145   REPLACE_PTSNAME_R=0;
15146   REPLACE_PUTENV=0;
15147   REPLACE_QSORT_R=0;
15148   REPLACE_RANDOM_R=0;
15149   REPLACE_REALLOC=0;
15150   REPLACE_REALPATH=0;
15151   REPLACE_SETENV=0;
15152   REPLACE_STRTOD=0;
15153   REPLACE_UNSETENV=0;
15154   REPLACE_WCTOMB=0;
15155
15156
15157   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15158 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15159 if test ${gl_cv_func_malloc_posix+y}
15160 then :
15161   printf %s "(cached) " >&6
15162 else
15163
15164                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165 /* end confdefs.h.  */
15166
15167 int
15168 main (void)
15169 {
15170 #if defined _WIN32 && ! defined __CYGWIN__
15171              choke me
15172              #endif
15173
15174   ;
15175   return 0;
15176 }
15177 _ACEOF
15178 if ac_fn_c_try_compile "$LINENO"
15179 then :
15180   gl_cv_func_malloc_posix=yes
15181 else
15182   gl_cv_func_malloc_posix=no
15183 fi
15184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15185
15186 fi
15187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15188 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
15189
15190 # Autoupdate added the following line to ensure that your configure
15191 # script's behavior did not change.  It is probably safe to remove.
15192
15193
15194
15195       ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15196 if test "x$ac_cv_header_stdlib_h" = xyes
15197 then :
15198   printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
15199
15200 fi
15201
15202   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15203 printf %s "checking for GNU libc compatible malloc... " >&6; }
15204 if test ${ac_cv_func_malloc_0_nonnull+y}
15205 then :
15206   printf %s "(cached) " >&6
15207 else
15208   if test "$cross_compiling" = yes
15209 then :
15210   case "$host_os" in
15211           # Guess yes on platforms where we know the result.
15212           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
15213           | hpux* | solaris* | cygwin* | mingw*)
15214             ac_cv_func_malloc_0_nonnull=yes ;;
15215           # If we don't know, assume the worst.
15216           *) ac_cv_func_malloc_0_nonnull=no ;;
15217         esac
15218
15219 else
15220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221 /* end confdefs.h.  */
15222 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15223             # include <stdlib.h>
15224             #else
15225             char *malloc ();
15226             #endif
15227
15228 int
15229 main (void)
15230 {
15231 char *p = malloc (0);
15232             int result = !p;
15233             free (p);
15234             return result;
15235   ;
15236   return 0;
15237 }
15238
15239 _ACEOF
15240 if ac_fn_c_try_run "$LINENO"
15241 then :
15242   ac_cv_func_malloc_0_nonnull=yes
15243 else
15244   ac_cv_func_malloc_0_nonnull=no
15245 fi
15246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15247   conftest.$ac_objext conftest.beam conftest.$ac_ext
15248 fi
15249
15250
15251 fi
15252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15253 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
15254   if test $ac_cv_func_malloc_0_nonnull = yes
15255 then :
15256   gl_cv_func_malloc_0_nonnull=1
15257 else
15258   gl_cv_func_malloc_0_nonnull=0
15259 fi
15260
15261
15262 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
15263
15264
15265
15266
15267
15268
15269
15270   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15271 printf %s "checking for a traditional japanese locale... " >&6; }
15272 if test ${gt_cv_locale_ja+y}
15273 then :
15274   printf %s "(cached) " >&6
15275 else
15276
15277     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15278 /* end confdefs.h.  */
15279
15280 #include <locale.h>
15281 #include <time.h>
15282 #if HAVE_LANGINFO_CODESET
15283 # include <langinfo.h>
15284 #endif
15285 #include <stdlib.h>
15286 #include <string.h>
15287 struct tm t;
15288 char buf[16];
15289 int main ()
15290 {
15291   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15292      imitates locale dependent behaviour by looking at the environment
15293      variables, and all locales use the UTF-8 encoding.  */
15294 #if defined __BEOS__ || defined __HAIKU__
15295   return 1;
15296 #else
15297   /* Check whether the given locale name is recognized by the system.  */
15298 # if defined _WIN32 && !defined __CYGWIN__
15299   /* On native Windows, setlocale(category, "") looks at the system settings,
15300      not at the environment variables.  Also, when an encoding suffix such
15301      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15302      category of the locale to "C".  */
15303   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15304       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15305     return 1;
15306 # else
15307   if (setlocale (LC_ALL, "") == NULL) return 1;
15308 # endif
15309   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15310      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15311      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15312      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15313      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15314      some unit tests fail.
15315      On MirBSD 10, when an unsupported locale is specified, setlocale()
15316      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15317 # if HAVE_LANGINFO_CODESET
15318   {
15319     const char *cs = nl_langinfo (CODESET);
15320     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15321         || strcmp (cs, "UTF-8") == 0)
15322       return 1;
15323   }
15324 # endif
15325 # ifdef __CYGWIN__
15326   /* On Cygwin, avoid locale names without encoding suffix, because the
15327      locale_charset() function relies on the encoding suffix.  Note that
15328      LC_ALL is set on the command line.  */
15329   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15330 # endif
15331   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
15332      on Cygwin 1.5.x.  */
15333   if (MB_CUR_MAX == 1)
15334     return 1;
15335   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15336      This excludes the UTF-8 encoding (except on MirBSD).  */
15337   {
15338     const char *p;
15339     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15340     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15341     for (p = buf; *p != '\0'; p++)
15342       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15343         return 1;
15344   }
15345   return 0;
15346 #endif
15347 }
15348
15349 _ACEOF
15350     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15351   (eval $ac_link) 2>&5
15352   ac_status=$?
15353   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15354   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15355       case "$host_os" in
15356         # Handle native Windows specially, because there setlocale() interprets
15357         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15358         # "fr" or "fra" as "French" or "French_France.1252",
15359         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15360         # "ja" as "Japanese" or "Japanese_Japan.932",
15361         # and similar.
15362         mingw*)
15363           # Note that on native Windows, the Japanese locale is
15364           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15365           # cannot use it here.
15366           gt_cv_locale_ja=none
15367           ;;
15368         *)
15369           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15370           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15371           # configure script would override the LC_ALL setting. Likewise for
15372           # LC_CTYPE, which is also set at the beginning of the configure script.
15373           # Test for the AIX locale name.
15374           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15375             gt_cv_locale_ja=ja_JP
15376           else
15377             # Test for the locale name with explicit encoding suffix.
15378             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15379               gt_cv_locale_ja=ja_JP.EUC-JP
15380             else
15381               # Test for the HP-UX, OSF/1, NetBSD locale name.
15382               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15383                 gt_cv_locale_ja=ja_JP.eucJP
15384               else
15385                 # Test for the IRIX, FreeBSD locale name.
15386                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15387                   gt_cv_locale_ja=ja_JP.EUC
15388                 else
15389                   # Test for the Solaris 7 locale name.
15390                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15391                     gt_cv_locale_ja=ja
15392                   else
15393                     # Special test for NetBSD 1.6.
15394                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15395                       gt_cv_locale_ja=ja_JP.eucJP
15396                     else
15397                       # None found.
15398                       gt_cv_locale_ja=none
15399                     fi
15400                   fi
15401                 fi
15402               fi
15403             fi
15404           fi
15405           ;;
15406       esac
15407     fi
15408     rm -fr conftest*
15409
15410 fi
15411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15412 printf "%s\n" "$gt_cv_locale_ja" >&6; }
15413   LOCALE_JA=$gt_cv_locale_ja
15414
15415
15416
15417
15418
15419   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15420 printf %s "checking for a transitional chinese locale... " >&6; }
15421 if test ${gt_cv_locale_zh_CN+y}
15422 then :
15423   printf %s "(cached) " >&6
15424 else
15425
15426     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427 /* end confdefs.h.  */
15428
15429 #include <locale.h>
15430 #include <stdlib.h>
15431 #include <time.h>
15432 #if HAVE_LANGINFO_CODESET
15433 # include <langinfo.h>
15434 #endif
15435 #include <stdlib.h>
15436 #include <string.h>
15437 struct tm t;
15438 char buf[16];
15439 int main ()
15440 {
15441   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15442      imitates locale dependent behaviour by looking at the environment
15443      variables, and all locales use the UTF-8 encoding.  */
15444 #if defined __BEOS__ || defined __HAIKU__
15445   return 1;
15446 #else
15447   /* Check whether the given locale name is recognized by the system.  */
15448 # if defined _WIN32 && !defined __CYGWIN__
15449   /* On native Windows, setlocale(category, "") looks at the system settings,
15450      not at the environment variables.  Also, when an encoding suffix such
15451      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15452      category of the locale to "C".  */
15453   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15454       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15455     return 1;
15456 # else
15457   if (setlocale (LC_ALL, "") == NULL) return 1;
15458 # endif
15459   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15460      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15461      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15462      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15463      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15464      some unit tests fail.
15465      On MirBSD 10, when an unsupported locale is specified, setlocale()
15466      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15467 # if HAVE_LANGINFO_CODESET
15468   {
15469     const char *cs = nl_langinfo (CODESET);
15470     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15471         || strcmp (cs, "UTF-8") == 0)
15472       return 1;
15473   }
15474 # endif
15475 # ifdef __CYGWIN__
15476   /* On Cygwin, avoid locale names without encoding suffix, because the
15477      locale_charset() function relies on the encoding suffix.  Note that
15478      LC_ALL is set on the command line.  */
15479   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15480 # endif
15481   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15482      This excludes the UTF-8 encoding (except on MirBSD).  */
15483   {
15484     const char *p;
15485     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15486     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15487     for (p = buf; *p != '\0'; p++)
15488       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15489         return 1;
15490   }
15491   /* Check whether a typical GB18030 multibyte sequence is recognized as a
15492      single wide character.  This excludes the GB2312 and GBK encodings.  */
15493   if (mblen ("\203\062\332\066", 5) != 4)
15494     return 1;
15495   return 0;
15496 #endif
15497 }
15498
15499 _ACEOF
15500     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15501   (eval $ac_link) 2>&5
15502   ac_status=$?
15503   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15504   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15505       case "$host_os" in
15506         # Handle native Windows specially, because there setlocale() interprets
15507         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15508         # "fr" or "fra" as "French" or "French_France.1252",
15509         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15510         # "ja" as "Japanese" or "Japanese_Japan.932",
15511         # and similar.
15512         mingw*)
15513           # Test for the hypothetical native Windows locale name.
15514           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15515             gt_cv_locale_zh_CN=Chinese_China.54936
15516           else
15517             # None found.
15518             gt_cv_locale_zh_CN=none
15519           fi
15520           ;;
15521         solaris2.8)
15522           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15523           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15524           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15525           gt_cv_locale_zh_CN=none
15526           ;;
15527         *)
15528           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15529           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15530           # configure script would override the LC_ALL setting. Likewise for
15531           # LC_CTYPE, which is also set at the beginning of the configure script.
15532           # Test for the locale name without encoding suffix.
15533           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15534             gt_cv_locale_zh_CN=zh_CN
15535           else
15536             # Test for the locale name with explicit encoding suffix.
15537             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15538               gt_cv_locale_zh_CN=zh_CN.GB18030
15539             else
15540               # None found.
15541               gt_cv_locale_zh_CN=none
15542             fi
15543           fi
15544           ;;
15545       esac
15546     else
15547       # If there was a link error, due to mblen(), the system is so old that
15548       # it certainly doesn't have a chinese locale.
15549       gt_cv_locale_zh_CN=none
15550     fi
15551     rm -fr conftest*
15552
15553 fi
15554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15555 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
15556   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15557
15558
15559
15560
15561   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15562 printf %s "checking for a french Unicode locale... " >&6; }
15563 if test ${gt_cv_locale_fr_utf8+y}
15564 then :
15565   printf %s "(cached) " >&6
15566 else
15567
15568     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15569 /* end confdefs.h.  */
15570
15571 #include <locale.h>
15572 #include <time.h>
15573 #if HAVE_LANGINFO_CODESET
15574 # include <langinfo.h>
15575 #endif
15576 #include <stdlib.h>
15577 #include <string.h>
15578 struct tm t;
15579 char buf[16];
15580 int main () {
15581   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15582      imitates locale dependent behaviour by looking at the environment
15583      variables, and all locales use the UTF-8 encoding.  */
15584 #if !(defined __BEOS__ || defined __HAIKU__)
15585   /* Check whether the given locale name is recognized by the system.  */
15586 # if defined _WIN32 && !defined __CYGWIN__
15587   /* On native Windows, setlocale(category, "") looks at the system settings,
15588      not at the environment variables.  Also, when an encoding suffix such
15589      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15590      category of the locale to "C".  */
15591   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15592       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15593     return 1;
15594 # else
15595   if (setlocale (LC_ALL, "") == NULL) return 1;
15596 # endif
15597   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15598      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15599      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15600      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15601      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15602      some unit tests fail.  */
15603 # if HAVE_LANGINFO_CODESET
15604   {
15605     const char *cs = nl_langinfo (CODESET);
15606     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15607       return 1;
15608   }
15609 # endif
15610 # ifdef __CYGWIN__
15611   /* On Cygwin, avoid locale names without encoding suffix, because the
15612      locale_charset() function relies on the encoding suffix.  Note that
15613      LC_ALL is set on the command line.  */
15614   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15615 # endif
15616   /* Check whether in the abbreviation of the second month, the second
15617      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15618      two bytes long, with UTF-8 encoding.  */
15619   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15620   if (strftime (buf, sizeof (buf), "%b", &t) < 4
15621       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15622     return 1;
15623 #endif
15624 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
15625   /* Check whether the decimal separator is a comma.
15626      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15627      are nl_langinfo(RADIXCHAR) are both ".".  */
15628   if (localeconv () ->decimal_point[0] != ',') return 1;
15629 #endif
15630   return 0;
15631 }
15632
15633 _ACEOF
15634     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15635   (eval $ac_link) 2>&5
15636   ac_status=$?
15637   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15638   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15639       case "$host_os" in
15640         # Handle native Windows specially, because there setlocale() interprets
15641         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15642         # "fr" or "fra" as "French" or "French_France.1252",
15643         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15644         # "ja" as "Japanese" or "Japanese_Japan.932",
15645         # and similar.
15646         mingw*)
15647           # Test for the hypothetical native Windows locale name.
15648           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15649             gt_cv_locale_fr_utf8=French_France.65001
15650           else
15651             # None found.
15652             gt_cv_locale_fr_utf8=none
15653           fi
15654           ;;
15655         *)
15656           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15657           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15658           # configure script would override the LC_ALL setting. Likewise for
15659           # LC_CTYPE, which is also set at the beginning of the configure script.
15660           # Test for the usual locale name.
15661           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15662             gt_cv_locale_fr_utf8=fr_FR
15663           else
15664             # Test for the locale name with explicit encoding suffix.
15665             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15666               gt_cv_locale_fr_utf8=fr_FR.UTF-8
15667             else
15668               # Test for the Solaris 7 locale name.
15669               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15670                 gt_cv_locale_fr_utf8=fr.UTF-8
15671               else
15672                 # None found.
15673                 gt_cv_locale_fr_utf8=none
15674               fi
15675             fi
15676           fi
15677           ;;
15678       esac
15679     fi
15680     rm -fr conftest*
15681
15682 fi
15683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15684 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
15685   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15686
15687
15688
15689   GNULIB_EXPLICIT_BZERO=0;
15690   GNULIB_FFSL=0;
15691   GNULIB_FFSLL=0;
15692   GNULIB_MEMCHR=0;
15693   GNULIB_MEMMEM=0;
15694   GNULIB_MEMPCPY=0;
15695   GNULIB_MEMRCHR=0;
15696   GNULIB_RAWMEMCHR=0;
15697   GNULIB_STPCPY=0;
15698   GNULIB_STPNCPY=0;
15699   GNULIB_STRCHRNUL=0;
15700   GNULIB_STRDUP=0;
15701   GNULIB_STRNCAT=0;
15702   GNULIB_STRNDUP=0;
15703   GNULIB_STRNLEN=0;
15704   GNULIB_STRPBRK=0;
15705   GNULIB_STRSEP=0;
15706   GNULIB_STRSTR=0;
15707   GNULIB_STRCASESTR=0;
15708   GNULIB_STRTOK_R=0;
15709   GNULIB_MBSLEN=0;
15710   GNULIB_MBSNLEN=0;
15711   GNULIB_MBSCHR=0;
15712   GNULIB_MBSRCHR=0;
15713   GNULIB_MBSSTR=0;
15714   GNULIB_MBSCASECMP=0;
15715   GNULIB_MBSNCASECMP=0;
15716   GNULIB_MBSPCASECMP=0;
15717   GNULIB_MBSCASESTR=0;
15718   GNULIB_MBSCSPN=0;
15719   GNULIB_MBSPBRK=0;
15720   GNULIB_MBSSPN=0;
15721   GNULIB_MBSSEP=0;
15722   GNULIB_MBSTOK_R=0;
15723   GNULIB_STRERROR=0;
15724   GNULIB_STRERROR_R=0;
15725   GNULIB_STRSIGNAL=0;
15726   GNULIB_STRVERSCMP=0;
15727   HAVE_MBSLEN=0;
15728     HAVE_EXPLICIT_BZERO=1;
15729   HAVE_FFSL=1;
15730   HAVE_FFSLL=1;
15731   HAVE_MEMCHR=1;
15732   HAVE_DECL_MEMMEM=1;
15733   HAVE_MEMPCPY=1;
15734   HAVE_DECL_MEMRCHR=1;
15735   HAVE_RAWMEMCHR=1;
15736   HAVE_STPCPY=1;
15737   HAVE_STPNCPY=1;
15738   HAVE_STRCHRNUL=1;
15739   HAVE_DECL_STRDUP=1;
15740   HAVE_DECL_STRNDUP=1;
15741   HAVE_DECL_STRNLEN=1;
15742   HAVE_STRPBRK=1;
15743   HAVE_STRSEP=1;
15744   HAVE_STRCASESTR=1;
15745   HAVE_DECL_STRTOK_R=1;
15746   HAVE_DECL_STRERROR_R=1;
15747   HAVE_DECL_STRSIGNAL=1;
15748   HAVE_STRVERSCMP=1;
15749   REPLACE_MEMCHR=0;
15750   REPLACE_MEMMEM=0;
15751   REPLACE_STPNCPY=0;
15752   REPLACE_STRCHRNUL=0;
15753   REPLACE_STRDUP=0;
15754   REPLACE_STRNCAT=0;
15755   REPLACE_STRNDUP=0;
15756   REPLACE_STRNLEN=0;
15757   REPLACE_STRSTR=0;
15758   REPLACE_STRCASESTR=0;
15759   REPLACE_STRTOK_R=0;
15760   REPLACE_STRERROR=0;
15761   REPLACE_STRERROR_R=0;
15762   REPLACE_STRSIGNAL=0;
15763   UNDEFINE_STRTOK_R=0;
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15774   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15775   # irrelevant for anonymous mappings.
15776   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15777 if test "x$ac_cv_func_mmap" = xyes
15778 then :
15779   gl_have_mmap=yes
15780 else
15781   gl_have_mmap=no
15782 fi
15783
15784
15785   # Try to allow MAP_ANONYMOUS.
15786   gl_have_mmap_anonymous=no
15787   if test $gl_have_mmap = yes; then
15788     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15789 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15790     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791 /* end confdefs.h.  */
15792
15793 #include <sys/mman.h>
15794 #ifdef MAP_ANONYMOUS
15795     I cannot identify this map
15796 #endif
15797
15798 _ACEOF
15799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15800   $EGREP "I cannot identify this map" >/dev/null 2>&1
15801 then :
15802   gl_have_mmap_anonymous=yes
15803 fi
15804 rm -rf conftest*
15805
15806     if test $gl_have_mmap_anonymous != yes; then
15807       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15808 /* end confdefs.h.  */
15809
15810 #include <sys/mman.h>
15811 #ifdef MAP_ANON
15812     I cannot identify this map
15813 #endif
15814
15815 _ACEOF
15816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15817   $EGREP "I cannot identify this map" >/dev/null 2>&1
15818 then :
15819
15820 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15821
15822          gl_have_mmap_anonymous=yes
15823 fi
15824 rm -rf conftest*
15825
15826     fi
15827     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15828 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15829     if test $gl_have_mmap_anonymous = yes; then
15830
15831 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15832
15833     fi
15834   fi
15835
15836
15837
15838
15839
15840
15841   if test $HAVE_MEMCHR = 1; then
15842     # Detect platform-specific bugs in some versions of glibc:
15843     # memchr should not dereference anything with length 0
15844     #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
15845     # memchr should not dereference overestimated length after a match
15846     #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15847     #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
15848     # Assume that memchr works on platforms that lack mprotect.
15849     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15850 printf %s "checking whether memchr works... " >&6; }
15851 if test ${gl_cv_func_memchr_works+y}
15852 then :
15853   printf %s "(cached) " >&6
15854 else
15855   if test "$cross_compiling" = yes
15856 then :
15857   case "$host_os" in
15858                     # Guess yes on native Windows.
15859             mingw*) gl_cv_func_memchr_works="guessing yes" ;;
15860                     # Be pessimistic for now.
15861             *)      gl_cv_func_memchr_works="guessing no" ;;
15862           esac
15863
15864 else
15865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h.  */
15867
15868 #include <string.h>
15869 #if HAVE_SYS_MMAN_H
15870 # include <fcntl.h>
15871 # include <unistd.h>
15872 # include <sys/types.h>
15873 # include <sys/mman.h>
15874 # ifndef MAP_FILE
15875 #  define MAP_FILE 0
15876 # endif
15877 #endif
15878
15879 int
15880 main (void)
15881 {
15882
15883   int result = 0;
15884   char *fence = NULL;
15885 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15886 # if HAVE_MAP_ANONYMOUS
15887   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15888   const int fd = -1;
15889 # else /* !HAVE_MAP_ANONYMOUS */
15890   const int flags = MAP_FILE | MAP_PRIVATE;
15891   int fd = open ("/dev/zero", O_RDONLY, 0666);
15892   if (fd >= 0)
15893 # endif
15894     {
15895       int pagesize = getpagesize ();
15896       char *two_pages =
15897         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15898                        flags, fd, 0);
15899       if (two_pages != (char *)(-1)
15900           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15901         fence = two_pages + pagesize;
15902     }
15903 #endif
15904   if (fence)
15905     {
15906       if (memchr (fence, 0, 0))
15907         result |= 1;
15908       strcpy (fence - 9, "12345678");
15909       if (memchr (fence - 9, 0, 79) != fence - 1)
15910         result |= 2;
15911       if (memchr (fence - 1, 0, 3) != fence - 1)
15912         result |= 4;
15913     }
15914   return result;
15915
15916   ;
15917   return 0;
15918 }
15919 _ACEOF
15920 if ac_fn_c_try_run "$LINENO"
15921 then :
15922   gl_cv_func_memchr_works=yes
15923 else
15924   gl_cv_func_memchr_works=no
15925 fi
15926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15927   conftest.$ac_objext conftest.beam conftest.$ac_ext
15928 fi
15929
15930
15931 fi
15932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15933 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15934     case "$gl_cv_func_memchr_works" in
15935       *yes) ;;
15936       *) REPLACE_MEMCHR=1 ;;
15937     esac
15938   fi
15939
15940
15941
15942
15943
15944   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
15945 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
15946 if test ${gl_cv_minmax_in_limits_h+y}
15947 then :
15948   printf %s "(cached) " >&6
15949 else
15950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h.  */
15952 #include <limits.h>
15953             int x = MIN (42, 17);
15954 int
15955 main (void)
15956 {
15957
15958   ;
15959   return 0;
15960 }
15961 _ACEOF
15962 if ac_fn_c_try_compile "$LINENO"
15963 then :
15964   gl_cv_minmax_in_limits_h=yes
15965 else
15966   gl_cv_minmax_in_limits_h=no
15967 fi
15968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15969 fi
15970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
15971 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
15972   if test $gl_cv_minmax_in_limits_h = yes; then
15973
15974 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
15975
15976   fi
15977
15978
15979
15980
15981
15982
15983   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
15984 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
15985 if test ${gl_cv_minmax_in_sys_param_h+y}
15986 then :
15987   printf %s "(cached) " >&6
15988 else
15989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990 /* end confdefs.h.  */
15991 #include <sys/param.h>
15992             int x = MIN (42, 17);
15993 int
15994 main (void)
15995 {
15996
15997   ;
15998   return 0;
15999 }
16000 _ACEOF
16001 if ac_fn_c_try_compile "$LINENO"
16002 then :
16003   gl_cv_minmax_in_sys_param_h=yes
16004 else
16005   gl_cv_minmax_in_sys_param_h=no
16006 fi
16007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16008 fi
16009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16010 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
16011   if test $gl_cv_minmax_in_sys_param_h = yes; then
16012
16013 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16014
16015   fi
16016
16017
16018
16019
16020
16021
16022   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
16023 printf %s "checking whether time_t is signed... " >&6; }
16024 if test ${gl_cv_time_t_is_signed+y}
16025 then :
16026   printf %s "(cached) " >&6
16027 else
16028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16029 /* end confdefs.h.  */
16030 #include <time.h>
16031                           char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
16032 int
16033 main (void)
16034 {
16035
16036   ;
16037   return 0;
16038 }
16039 _ACEOF
16040 if ac_fn_c_try_compile "$LINENO"
16041 then :
16042   gl_cv_time_t_is_signed=yes
16043 else
16044   gl_cv_time_t_is_signed=no
16045 fi
16046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16047 fi
16048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
16049 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
16050   if test $gl_cv_time_t_is_signed = yes; then
16051
16052 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
16053
16054   fi
16055
16056 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
16057 if test "x$ac_cv_have_decl_alarm" = xyes
16058 then :
16059   ac_have_decl=1
16060 else
16061   ac_have_decl=0
16062 fi
16063
16064 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074   if test $APPLE_UNIVERSAL_BUILD = 1; then
16075     # A universal build on Apple Mac OS X platforms.
16076     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
16077     # But we need a configuration result that is valid in both modes.
16078     gl_cv_func_working_mktime=no
16079   fi
16080   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
16081 printf %s "checking for working mktime... " >&6; }
16082 if test ${gl_cv_func_working_mktime+y}
16083 then :
16084   printf %s "(cached) " >&6
16085 else
16086   if test "$cross_compiling" = yes
16087 then :
16088   case "$host_os" in
16089                   # Guess no on native Windows.
16090           mingw*) gl_cv_func_working_mktime="guessing no" ;;
16091           *)      gl_cv_func_working_mktime="guessing no" ;;
16092         esac
16093
16094 else
16095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096 /* end confdefs.h.  */
16097 /* Test program from Paul Eggert and Tony Leneis.  */
16098 #include <limits.h>
16099 #include <stdlib.h>
16100 #include <time.h>
16101
16102 #ifdef HAVE_UNISTD_H
16103 # include <unistd.h>
16104 #endif
16105
16106 #if HAVE_DECL_ALARM
16107 # include <signal.h>
16108 #endif
16109
16110 #ifndef TIME_T_IS_SIGNED
16111 # define TIME_T_IS_SIGNED 0
16112 #endif
16113
16114 /* Work around redefinition to rpl_putenv by other config tests.  */
16115 #undef putenv
16116
16117 static time_t time_t_max;
16118 static time_t time_t_min;
16119
16120 /* Values we'll use to set the TZ environment variable.  */
16121 static char *tz_strings[] = {
16122   (char *) 0, "TZ=GMT0", "TZ=JST-9",
16123   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16124 };
16125 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
16126
16127 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
16128    Based on a problem report from Andreas Jaeger.  */
16129 static int
16130 spring_forward_gap ()
16131 {
16132   /* glibc (up to about 1998-10-07) failed this test. */
16133   struct tm tm;
16134
16135   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16136      instead of "TZ=America/Vancouver" in order to detect the bug even
16137      on systems that don't support the Olson extension, or don't have the
16138      full zoneinfo tables installed.  */
16139   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16140
16141   tm.tm_year = 98;
16142   tm.tm_mon = 3;
16143   tm.tm_mday = 5;
16144   tm.tm_hour = 2;
16145   tm.tm_min = 0;
16146   tm.tm_sec = 0;
16147   tm.tm_isdst = -1;
16148   return mktime (&tm) != (time_t) -1;
16149 }
16150
16151 static int
16152 mktime_test1 (time_t now)
16153 {
16154   struct tm *lt;
16155   return ! (lt = localtime (&now)) || mktime (lt) == now;
16156 }
16157
16158 static int
16159 mktime_test (time_t now)
16160 {
16161   return (mktime_test1 (now)
16162           && mktime_test1 ((time_t) (time_t_max - now))
16163           && mktime_test1 ((time_t) (time_t_min + now)));
16164 }
16165
16166 static int
16167 irix_6_4_bug ()
16168 {
16169   /* Based on code from Ariel Faigon.  */
16170   struct tm tm;
16171   tm.tm_year = 96;
16172   tm.tm_mon = 3;
16173   tm.tm_mday = 0;
16174   tm.tm_hour = 0;
16175   tm.tm_min = 0;
16176   tm.tm_sec = 0;
16177   tm.tm_isdst = -1;
16178   mktime (&tm);
16179   return tm.tm_mon == 2 && tm.tm_mday == 31;
16180 }
16181
16182 static int
16183 bigtime_test (int j)
16184 {
16185   struct tm tm;
16186   time_t now;
16187   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16188   now = mktime (&tm);
16189   if (now != (time_t) -1)
16190     {
16191       struct tm *lt = localtime (&now);
16192       if (! (lt
16193              && lt->tm_year == tm.tm_year
16194              && lt->tm_mon == tm.tm_mon
16195              && lt->tm_mday == tm.tm_mday
16196              && lt->tm_hour == tm.tm_hour
16197              && lt->tm_min == tm.tm_min
16198              && lt->tm_sec == tm.tm_sec
16199              && lt->tm_yday == tm.tm_yday
16200              && lt->tm_wday == tm.tm_wday
16201              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16202                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
16203         return 0;
16204     }
16205   return 1;
16206 }
16207
16208 static int
16209 year_2050_test ()
16210 {
16211   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16212      ignoring leap seconds.  */
16213   unsigned long int answer = 2527315200UL;
16214
16215   struct tm tm;
16216   time_t t;
16217   tm.tm_year = 2050 - 1900;
16218   tm.tm_mon = 2 - 1;
16219   tm.tm_mday = 1;
16220   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16221   tm.tm_isdst = -1;
16222
16223   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16224      instead of "TZ=America/Vancouver" in order to detect the bug even
16225      on systems that don't support the Olson extension, or don't have the
16226      full zoneinfo tables installed.  */
16227   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16228
16229   t = mktime (&tm);
16230
16231   /* Check that the result is either a failure, or close enough
16232      to the correct answer that we can assume the discrepancy is
16233      due to leap seconds.  */
16234   return (t == (time_t) -1
16235           || (0 < t && answer - 120 <= t && t <= answer + 120));
16236 }
16237
16238 int
16239 main ()
16240 {
16241   int result = 0;
16242   time_t t, delta;
16243   int i, j;
16244   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
16245
16246 #if HAVE_DECL_ALARM
16247   /* This test makes some buggy mktime implementations loop.
16248      Give up after 60 seconds; a mktime slower than that
16249      isn't worth using anyway.  */
16250   signal (SIGALRM, SIG_DFL);
16251   alarm (60);
16252 #endif
16253
16254   time_t_max = (! TIME_T_IS_SIGNED
16255                 ? (time_t) -1
16256                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
16257                    * 2 + 1));
16258   time_t_min = (! TIME_T_IS_SIGNED
16259                 ? (time_t) 0
16260                 : time_t_signed_magnitude
16261                 ? ~ (time_t) 0
16262                 : ~ time_t_max);
16263
16264   delta = time_t_max / 997; /* a suitable prime number */
16265   for (i = 0; i < N_STRINGS; i++)
16266     {
16267       if (tz_strings[i])
16268         putenv (tz_strings[i]);
16269
16270       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
16271         if (! mktime_test (t))
16272           result |= 1;
16273       if ((result & 2) == 0
16274           && ! (mktime_test ((time_t) 1)
16275                 && mktime_test ((time_t) (60 * 60))
16276                 && mktime_test ((time_t) (60 * 60 * 24))))
16277         result |= 2;
16278
16279       for (j = 1; (result & 4) == 0; j <<= 1)
16280         {
16281           if (! bigtime_test (j))
16282             result |= 4;
16283           if (INT_MAX / 2 < j)
16284             break;
16285         }
16286       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
16287         result |= 8;
16288     }
16289   if (! irix_6_4_bug ())
16290     result |= 16;
16291   if (! spring_forward_gap ())
16292     result |= 32;
16293   if (! year_2050_test ())
16294     result |= 64;
16295   return result;
16296 }
16297 _ACEOF
16298 if ac_fn_c_try_run "$LINENO"
16299 then :
16300   gl_cv_func_working_mktime=yes
16301 else
16302   gl_cv_func_working_mktime=no
16303 fi
16304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16305   conftest.$ac_objext conftest.beam conftest.$ac_ext
16306 fi
16307
16308
16309 fi
16310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
16311 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
16312
16313
16314
16315
16316
16317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
16318 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
16319 if test ${ac_cv_struct_tm+y}
16320 then :
16321   printf %s "(cached) " >&6
16322 else
16323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324 /* end confdefs.h.  */
16325 #include <sys/types.h>
16326 #include <time.h>
16327
16328 int
16329 main (void)
16330 {
16331 struct tm tm;
16332                                      int *p = &tm.tm_sec;
16333                                      return !p;
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 if ac_fn_c_try_compile "$LINENO"
16339 then :
16340   ac_cv_struct_tm=time.h
16341 else
16342   ac_cv_struct_tm=sys/time.h
16343 fi
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16345 fi
16346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
16347 printf "%s\n" "$ac_cv_struct_tm" >&6; }
16348 if test $ac_cv_struct_tm = sys/time.h; then
16349
16350 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
16351
16352 fi
16353
16354 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
16355 #include <$ac_cv_struct_tm>
16356
16357 "
16358 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
16359 then :
16360
16361 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
16362
16363
16364 fi
16365
16366 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16367
16368 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
16369
16370 else
16371   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
16372 "
16373 if test "x$ac_cv_have_decl_tzname" = xyes
16374 then :
16375   ac_have_decl=1
16376 else
16377   ac_have_decl=0
16378 fi
16379
16380 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
16381
16382   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
16383 printf %s "checking for tzname... " >&6; }
16384 if test ${ac_cv_var_tzname+y}
16385 then :
16386   printf %s "(cached) " >&6
16387 else
16388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16389 /* end confdefs.h.  */
16390 #include <time.h>
16391 #if !HAVE_DECL_TZNAME
16392 extern char *tzname[];
16393 #endif
16394
16395 int
16396 main (void)
16397 {
16398 return tzname[0][0];
16399   ;
16400   return 0;
16401 }
16402 _ACEOF
16403 if ac_fn_c_try_link "$LINENO"
16404 then :
16405   ac_cv_var_tzname=yes
16406 else
16407   ac_cv_var_tzname=no
16408 fi
16409 rm -f core conftest.err conftest.$ac_objext \
16410     conftest$ac_exeext conftest.$ac_ext
16411 fi
16412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
16413 printf "%s\n" "$ac_cv_var_tzname" >&6; }
16414   if test $ac_cv_var_tzname = yes; then
16415
16416 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
16417
16418   fi
16419 fi
16420
16421
16422  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
16423 "
16424 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
16425 then :
16426
16427 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
16428
16429 fi
16430
16431
16432
16433   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16434 printf %s "checking for O_CLOEXEC... " >&6; }
16435 if test ${gl_cv_macro_O_CLOEXEC+y}
16436 then :
16437   printf %s "(cached) " >&6
16438 else
16439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440 /* end confdefs.h.  */
16441 #include <fcntl.h>
16442                           #ifndef O_CLOEXEC
16443                             choke me;
16444                           #endif
16445
16446 int
16447 main (void)
16448 {
16449 return O_CLOEXEC;
16450   ;
16451   return 0;
16452 }
16453 _ACEOF
16454 if ac_fn_c_try_compile "$LINENO"
16455 then :
16456   gl_cv_macro_O_CLOEXEC=yes
16457 else
16458   gl_cv_macro_O_CLOEXEC=no
16459 fi
16460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16461 fi
16462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16463 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
16464
16465
16466
16467   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16468 printf %s "checking for promoted mode_t type... " >&6; }
16469 if test ${gl_cv_promoted_mode_t+y}
16470 then :
16471   printf %s "(cached) " >&6
16472 else
16473
16474                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16475 /* end confdefs.h.  */
16476 #include <sys/types.h>
16477 int
16478 main (void)
16479 {
16480 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16481   ;
16482   return 0;
16483 }
16484 _ACEOF
16485 if ac_fn_c_try_compile "$LINENO"
16486 then :
16487   gl_cv_promoted_mode_t='int'
16488 else
16489   gl_cv_promoted_mode_t='mode_t'
16490 fi
16491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16492
16493 fi
16494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16495 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
16496
16497 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
16498
16499
16500
16501
16502   GNULIB_PTHREAD_SIGMASK=0;
16503   GNULIB_RAISE=0;
16504   GNULIB_SIGNAL_H_SIGPIPE=0;
16505   GNULIB_SIGPROCMASK=0;
16506   GNULIB_SIGACTION=0;
16507     HAVE_POSIX_SIGNALBLOCKING=1;
16508   HAVE_PTHREAD_SIGMASK=1;
16509   HAVE_RAISE=1;
16510   HAVE_SIGSET_T=1;
16511   HAVE_SIGINFO_T=1;
16512   HAVE_SIGACTION=1;
16513   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16514
16515   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16516
16517   HAVE_SIGHANDLER_T=1;
16518   REPLACE_PTHREAD_SIGMASK=0;
16519   REPLACE_RAISE=0;
16520
16521
16522   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16523       #include <signal.h>
16524       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
16525       #include <sys/types.h>
16526
16527 "
16528 if test "x$ac_cv_type_sigset_t" = xyes
16529 then :
16530
16531 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
16532
16533 gl_cv_type_sigset_t=yes
16534 else
16535   gl_cv_type_sigset_t=no
16536 fi
16537
16538   if test $gl_cv_type_sigset_t != yes; then
16539     HAVE_SIGSET_T=0
16540   fi
16541
16542
16543
16544
16545     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
16546 printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
16547 if test ${ac_cv_gnu_library_2_1+y}
16548 then :
16549   printf %s "(cached) " >&6
16550 else
16551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16552 /* end confdefs.h.  */
16553
16554 #include <features.h>
16555 #ifdef __GNU_LIBRARY__
16556  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
16557   Lucky GNU user
16558  #endif
16559 #endif
16560 #ifdef __UCLIBC__
16561  Lucky user
16562 #endif
16563
16564 _ACEOF
16565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16566   $EGREP "Lucky" >/dev/null 2>&1
16567 then :
16568   ac_cv_gnu_library_2_1=yes
16569 else
16570   ac_cv_gnu_library_2_1=no
16571 fi
16572 rm -rf conftest*
16573
16574
16575
16576 fi
16577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
16578 printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
16579
16580     GLIBC21="$ac_cv_gnu_library_2_1"
16581
16582
16583 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16584 if test "x$ac_cv_have_decl_setenv" = xyes
16585 then :
16586   ac_have_decl=1
16587 else
16588   ac_have_decl=0
16589 fi
16590
16591 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
16592
16593
16594
16595
16596
16597   if test $ac_cv_have_decl_setenv = no; then
16598     HAVE_DECL_SETENV=0
16599   fi
16600
16601
16602
16603
16604
16605   ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16606 if test "x$ac_cv_header_search_h" = xyes
16607 then :
16608   printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
16609
16610 fi
16611
16612   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16613 if test "x$ac_cv_func_tsearch" = xyes
16614 then :
16615   printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
16616
16617 fi
16618
16619
16620
16621
16622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16623 printf %s "checking for uid_t in sys/types.h... " >&6; }
16624 if test ${ac_cv_type_uid_t+y}
16625 then :
16626   printf %s "(cached) " >&6
16627 else
16628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629 /* end confdefs.h.  */
16630 #include <sys/types.h>
16631
16632 _ACEOF
16633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16634   $EGREP "uid_t" >/dev/null 2>&1
16635 then :
16636   ac_cv_type_uid_t=yes
16637 else
16638   ac_cv_type_uid_t=no
16639 fi
16640 rm -rf conftest*
16641
16642 fi
16643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16644 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16645 if test $ac_cv_type_uid_t = no; then
16646
16647 printf "%s\n" "#define uid_t int" >>confdefs.h
16648
16649
16650 printf "%s\n" "#define gid_t int" >>confdefs.h
16651
16652 fi
16653
16654 :
16655
16656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16657 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16658 if test ${ac_cv_header_stdbool_h+y}
16659 then :
16660   printf %s "(cached) " >&6
16661 else
16662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16663 /* end confdefs.h.  */
16664
16665              #include <stdbool.h>
16666
16667              #ifdef __cplusplus
16668               typedef bool Bool;
16669              #else
16670               typedef _Bool Bool;
16671               #ifndef bool
16672                "error: bool is not defined"
16673               #endif
16674               #ifndef false
16675                "error: false is not defined"
16676               #endif
16677               #if false
16678                "error: false is not 0"
16679               #endif
16680               #ifndef true
16681                "error: true is not defined"
16682               #endif
16683               #if true != 1
16684                "error: true is not 1"
16685               #endif
16686              #endif
16687
16688              #ifndef __bool_true_false_are_defined
16689               "error: __bool_true_false_are_defined is not defined"
16690              #endif
16691
16692              struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16693
16694              char a[true == 1 ? 1 : -1];
16695              char b[false == 0 ? 1 : -1];
16696              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16697              char d[(bool) 0.5 == true ? 1 : -1];
16698              /* See body of main program for 'e'.  */
16699              char f[(Bool) 0.0 == false ? 1 : -1];
16700              char g[true];
16701              char h[sizeof (Bool)];
16702              char i[sizeof s.t];
16703              enum { j = false, k = true, l = false * true, m = true * 256 };
16704              /* The following fails for
16705                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16706              Bool n[m];
16707              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16708              char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16709              /* Catch a bug in an HP-UX C compiler.  See
16710                 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16711                 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16712               */
16713              Bool q = true;
16714              Bool *pq = &q;
16715              bool *qq = &q;
16716
16717 int
16718 main (void)
16719 {
16720
16721              bool e = &s;
16722              *pq |= q; *pq |= ! q;
16723              *qq |= q; *qq |= ! q;
16724              /* Refer to every declared value, to avoid compiler optimizations.  */
16725              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16726                      + !m + !n + !o + !p + !q + !pq + !qq);
16727
16728   ;
16729   return 0;
16730 }
16731 _ACEOF
16732 if ac_fn_c_try_compile "$LINENO"
16733 then :
16734   ac_cv_header_stdbool_h=yes
16735 else
16736   ac_cv_header_stdbool_h=no
16737 fi
16738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16739 fi
16740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16741 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16742    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16743 if test "x$ac_cv_type__Bool" = xyes
16744 then :
16745
16746 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
16747
16748
16749 fi
16750
16751
16752
16753   GNULIB_FFS=0;
16754     HAVE_FFS=1;
16755   HAVE_STRCASECMP=1;
16756   HAVE_DECL_STRNCASECMP=1;
16757
16758
16759      REPLACE_STRERROR_0=0
16760   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16761 printf %s "checking whether strerror(0) succeeds... " >&6; }
16762 if test ${gl_cv_func_strerror_0_works+y}
16763 then :
16764   printf %s "(cached) " >&6
16765 else
16766   if test "$cross_compiling" = yes
16767 then :
16768   case "$host_os" in
16769                         # Guess yes on glibc systems.
16770          *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16771                         # Guess yes on native Windows.
16772          mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
16773                         # If we don't know, assume the worst.
16774          *)             gl_cv_func_strerror_0_works="guessing no" ;;
16775        esac
16776
16777 else
16778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16779 /* end confdefs.h.  */
16780 #include <string.h>
16781            #include <errno.h>
16782
16783 int
16784 main (void)
16785 {
16786 int result = 0;
16787            char *str;
16788            errno = 0;
16789            str = strerror (0);
16790            if (!*str) result |= 1;
16791            if (errno) result |= 2;
16792            if (strstr (str, "nknown") || strstr (str, "ndefined"))
16793              result |= 4;
16794            return result;
16795   ;
16796   return 0;
16797 }
16798 _ACEOF
16799 if ac_fn_c_try_run "$LINENO"
16800 then :
16801   gl_cv_func_strerror_0_works=yes
16802 else
16803   gl_cv_func_strerror_0_works=no
16804 fi
16805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16806   conftest.$ac_objext conftest.beam conftest.$ac_ext
16807 fi
16808
16809
16810 fi
16811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16812 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
16813   case "$gl_cv_func_strerror_0_works" in
16814     *yes) ;;
16815     *)
16816       REPLACE_STRERROR_0=1
16817
16818 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
16819
16820       ;;
16821   esac
16822
16823
16824
16825
16826
16827
16828
16829   if test $ac_cv_func_strerror_r = yes; then
16830     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16831                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16832 printf %s "checking for strerror_r with POSIX signature... " >&6; }
16833 if test ${gl_cv_func_strerror_r_posix_signature+y}
16834 then :
16835   printf %s "(cached) " >&6
16836 else
16837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16838 /* end confdefs.h.  */
16839 #include <string.h>
16840                 int strerror_r (int, char *, size_t);
16841
16842 int
16843 main (void)
16844 {
16845
16846   ;
16847   return 0;
16848 }
16849 _ACEOF
16850 if ac_fn_c_try_compile "$LINENO"
16851 then :
16852   gl_cv_func_strerror_r_posix_signature=yes
16853 else
16854   gl_cv_func_strerror_r_posix_signature=no
16855 fi
16856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16857
16858 fi
16859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16860 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
16861       if test $gl_cv_func_strerror_r_posix_signature = yes; then
16862                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16863 printf %s "checking whether strerror_r works... " >&6; }
16864 if test ${gl_cv_func_strerror_r_works+y}
16865 then :
16866   printf %s "(cached) " >&6
16867 else
16868   if test "$cross_compiling" = yes
16869 then :
16870
16871               case "$host_os" in
16872                        # Guess no on AIX.
16873                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
16874                        # Guess no on HP-UX.
16875                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16876                        # Guess no on BSD variants.
16877                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
16878                        # Guess yes otherwise.
16879                 *)     gl_cv_func_strerror_r_works="guessing yes";;
16880               esac
16881
16882 else
16883   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16884 /* end confdefs.h.  */
16885 #include <errno.h>
16886                   #include <string.h>
16887
16888 int
16889 main (void)
16890 {
16891 int result = 0;
16892                   char buf[79];
16893                   if (strerror_r (EACCES, buf, 0) < 0)
16894                     result |= 1;
16895                   errno = 0;
16896                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
16897                     result |= 2;
16898                   strcpy (buf, "Unknown");
16899                   if (strerror_r (0, buf, sizeof buf) != 0)
16900                     result |= 4;
16901                   if (errno)
16902                     result |= 8;
16903                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16904                     result |= 0x10;
16905                   errno = 0;
16906                   *buf = 0;
16907                   if (strerror_r (-3, buf, sizeof buf) < 0)
16908                     result |= 0x20;
16909                   if (errno)
16910                     result |= 0x40;
16911                   if (!*buf)
16912                     result |= 0x80;
16913                   return result;
16914
16915   ;
16916   return 0;
16917 }
16918 _ACEOF
16919 if ac_fn_c_try_run "$LINENO"
16920 then :
16921   gl_cv_func_strerror_r_works=yes
16922 else
16923   gl_cv_func_strerror_r_works=no
16924 fi
16925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16926   conftest.$ac_objext conftest.beam conftest.$ac_ext
16927 fi
16928
16929
16930 fi
16931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16932 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16933       else
16934
16935                         if test $ac_cv_func___xpg_strerror_r = yes; then
16936           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16937 printf %s "checking whether __xpg_strerror_r works... " >&6; }
16938 if test ${gl_cv_func_strerror_r_works+y}
16939 then :
16940   printf %s "(cached) " >&6
16941 else
16942   if test "$cross_compiling" = yes
16943 then :
16944                                   gl_cv_func_strerror_r_works="guessing no"
16945
16946 else
16947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16948 /* end confdefs.h.  */
16949 #include <errno.h>
16950                     #include <string.h>
16951                     extern
16952                     #ifdef __cplusplus
16953                     "C"
16954                     #endif
16955                     int __xpg_strerror_r(int, char *, size_t);
16956
16957 int
16958 main (void)
16959 {
16960 int result = 0;
16961                     char buf[256] = "^";
16962                     char copy[256];
16963                     char *str = strerror (-1);
16964                     strcpy (copy, str);
16965                     if (__xpg_strerror_r (-2, buf, 1) == 0)
16966                       result |= 1;
16967                     if (*buf)
16968                       result |= 2;
16969                     __xpg_strerror_r (-2, buf, 256);
16970                     if (strcmp (str, copy))
16971                       result |= 4;
16972                     return result;
16973
16974   ;
16975   return 0;
16976 }
16977 _ACEOF
16978 if ac_fn_c_try_run "$LINENO"
16979 then :
16980   gl_cv_func_strerror_r_works=yes
16981 else
16982   gl_cv_func_strerror_r_works=no
16983 fi
16984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16985   conftest.$ac_objext conftest.beam conftest.$ac_ext
16986 fi
16987
16988
16989 fi
16990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16991 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16992         fi
16993       fi
16994     fi
16995   fi
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008      if test $gl_cv_have_include_next = yes; then
17009        gl_cv_next_string_h='<'string.h'>'
17010      else
17011        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17012 printf %s "checking absolute name of <string.h>... " >&6; }
17013 if test ${gl_cv_next_string_h+y}
17014 then :
17015   printf %s "(cached) " >&6
17016 else
17017
17018
17019
17020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17021 /* end confdefs.h.  */
17022 #include <string.h>
17023 _ACEOF
17024                 case "$host_os" in
17025     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17026     *)    gl_absname_cpp="$ac_cpp" ;;
17027   esac
17028
17029   case "$host_os" in
17030     mingw*)
17031                                           gl_dirsep_regex='[/\\]'
17032       ;;
17033     *)
17034       gl_dirsep_regex='\/'
17035       ;;
17036   esac
17037       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17038   gl_header_literal_regex=`echo 'string.h' \
17039                            | sed -e "$gl_make_literal_regex_sed"`
17040   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17041       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17042       s|^/[^/]|//&|
17043       p
17044       q
17045     }'
17046
17047         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17048   sed -n "$gl_absolute_header_sed"`
17049
17050            gl_header=$gl_cv_absolute_string_h
17051            gl_cv_next_string_h='"'$gl_header'"'
17052
17053
17054 fi
17055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17056 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17057      fi
17058      NEXT_STRING_H=$gl_cv_next_string_h
17059
17060      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17061        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17062        gl_next_as_first_directive='<'string.h'>'
17063      else
17064        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17065        gl_next_as_first_directive=$gl_cv_next_string_h
17066      fi
17067      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089      if test $gl_cv_have_include_next = yes; then
17090        gl_cv_next_strings_h='<'strings.h'>'
17091      else
17092        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17093 printf %s "checking absolute name of <strings.h>... " >&6; }
17094 if test ${gl_cv_next_strings_h+y}
17095 then :
17096   printf %s "(cached) " >&6
17097 else
17098
17099              if test $ac_cv_header_strings_h = yes; then
17100
17101
17102
17103
17104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105 /* end confdefs.h.  */
17106 #include <strings.h>
17107 _ACEOF
17108                 case "$host_os" in
17109     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17110     *)    gl_absname_cpp="$ac_cpp" ;;
17111   esac
17112
17113   case "$host_os" in
17114     mingw*)
17115                                           gl_dirsep_regex='[/\\]'
17116       ;;
17117     *)
17118       gl_dirsep_regex='\/'
17119       ;;
17120   esac
17121       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17122   gl_header_literal_regex=`echo 'strings.h' \
17123                            | sed -e "$gl_make_literal_regex_sed"`
17124   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17125       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17126       s|^/[^/]|//&|
17127       p
17128       q
17129     }'
17130
17131         gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17132   sed -n "$gl_absolute_header_sed"`
17133
17134            gl_header=$gl_cv_absolute_strings_h
17135            gl_cv_next_strings_h='"'$gl_header'"'
17136           else
17137                gl_cv_next_strings_h='<'strings.h'>'
17138              fi
17139
17140
17141 fi
17142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17143 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
17144      fi
17145      NEXT_STRINGS_H=$gl_cv_next_strings_h
17146
17147      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17148        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17149        gl_next_as_first_directive='<'strings.h'>'
17150      else
17151        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17152        gl_next_as_first_directive=$gl_cv_next_strings_h
17153      fi
17154      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17155
17156
17157
17158
17159   if test $ac_cv_header_strings_h = yes; then
17160     HAVE_STRINGS_H=1
17161   else
17162     HAVE_STRINGS_H=0
17163   fi
17164
17165
17166
17167
17168
17169
17170 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
17171 if test "x$ac_cv_have_decl_strndup" = xyes
17172 then :
17173   ac_have_decl=1
17174 else
17175   ac_have_decl=0
17176 fi
17177
17178 printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
17179
17180
17181 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17182 if test "x$ac_cv_have_decl_strnlen" = xyes
17183 then :
17184   ac_have_decl=1
17185 else
17186   ac_have_decl=0
17187 fi
17188
17189 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
17190
17191
17192
17193 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
17194 if test "x$ac_cv_have_decl_strtoumax" = xyes
17195 then :
17196   ac_have_decl=1
17197 else
17198   ac_have_decl=0
17199 fi
17200
17201 printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225      if test $gl_cv_have_include_next = yes; then
17226        gl_cv_next_sys_types_h='<'sys/types.h'>'
17227      else
17228        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17229 printf %s "checking absolute name of <sys/types.h>... " >&6; }
17230 if test ${gl_cv_next_sys_types_h+y}
17231 then :
17232   printf %s "(cached) " >&6
17233 else
17234
17235
17236
17237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238 /* end confdefs.h.  */
17239 #include <sys/types.h>
17240 _ACEOF
17241                 case "$host_os" in
17242     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17243     *)    gl_absname_cpp="$ac_cpp" ;;
17244   esac
17245
17246   case "$host_os" in
17247     mingw*)
17248                                           gl_dirsep_regex='[/\\]'
17249       ;;
17250     *)
17251       gl_dirsep_regex='\/'
17252       ;;
17253   esac
17254       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17255   gl_header_literal_regex=`echo 'sys/types.h' \
17256                            | sed -e "$gl_make_literal_regex_sed"`
17257   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17258       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17259       s|^/[^/]|//&|
17260       p
17261       q
17262     }'
17263
17264         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17265   sed -n "$gl_absolute_header_sed"`
17266
17267            gl_header=$gl_cv_absolute_sys_types_h
17268            gl_cv_next_sys_types_h='"'$gl_header'"'
17269
17270
17271 fi
17272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17273 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
17274      fi
17275      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17276
17277      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17278        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17279        gl_next_as_first_directive='<'sys/types.h'>'
17280      else
17281        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17282        gl_next_as_first_directive=$gl_cv_next_sys_types_h
17283      fi
17284      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297     WINDOWS_STAT_INODES=0
17298
17299
17300
17301
17302   GNULIB_WAITPID=0;
17303
17304
17305
17306
17307   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17308 printf %s "checking for struct timespec in <time.h>... " >&6; }
17309 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17310 then :
17311   printf %s "(cached) " >&6
17312 else
17313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17314 /* end confdefs.h.  */
17315 #include <time.h>
17316
17317 int
17318 main (void)
17319 {
17320 static struct timespec x; x.tv_sec = x.tv_nsec;
17321   ;
17322   return 0;
17323 }
17324 _ACEOF
17325 if ac_fn_c_try_compile "$LINENO"
17326 then :
17327   gl_cv_sys_struct_timespec_in_time_h=yes
17328 else
17329   gl_cv_sys_struct_timespec_in_time_h=no
17330 fi
17331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17332 fi
17333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17334 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17335
17336   TIME_H_DEFINES_STRUCT_TIMESPEC=0
17337   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17338   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17339   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17340   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17341     TIME_H_DEFINES_STRUCT_TIMESPEC=1
17342   else
17343     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17344 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17345 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
17346 then :
17347   printf %s "(cached) " >&6
17348 else
17349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17350 /* end confdefs.h.  */
17351 #include <sys/time.h>
17352
17353 int
17354 main (void)
17355 {
17356 static struct timespec x; x.tv_sec = x.tv_nsec;
17357   ;
17358   return 0;
17359 }
17360 _ACEOF
17361 if ac_fn_c_try_compile "$LINENO"
17362 then :
17363   gl_cv_sys_struct_timespec_in_sys_time_h=yes
17364 else
17365   gl_cv_sys_struct_timespec_in_sys_time_h=no
17366 fi
17367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17368 fi
17369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17370 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17371     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17372       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17373     else
17374       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17375 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17376 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
17377 then :
17378   printf %s "(cached) " >&6
17379 else
17380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17381 /* end confdefs.h.  */
17382 #include <pthread.h>
17383
17384 int
17385 main (void)
17386 {
17387 static struct timespec x; x.tv_sec = x.tv_nsec;
17388   ;
17389   return 0;
17390 }
17391 _ACEOF
17392 if ac_fn_c_try_compile "$LINENO"
17393 then :
17394   gl_cv_sys_struct_timespec_in_pthread_h=yes
17395 else
17396   gl_cv_sys_struct_timespec_in_pthread_h=no
17397 fi
17398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17399 fi
17400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17401 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17402       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17403         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17404       else
17405         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17406 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
17407 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
17408 then :
17409   printf %s "(cached) " >&6
17410 else
17411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17412 /* end confdefs.h.  */
17413 #include <unistd.h>
17414
17415 int
17416 main (void)
17417 {
17418 static struct timespec x; x.tv_sec = x.tv_nsec;
17419   ;
17420   return 0;
17421 }
17422 _ACEOF
17423 if ac_fn_c_try_compile "$LINENO"
17424 then :
17425   gl_cv_sys_struct_timespec_in_unistd_h=yes
17426 else
17427   gl_cv_sys_struct_timespec_in_unistd_h=no
17428 fi
17429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17430 fi
17431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17432 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17433         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17434           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17435         fi
17436       fi
17437     fi
17438   fi
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455      if test $gl_cv_have_include_next = yes; then
17456        gl_cv_next_time_h='<'time.h'>'
17457      else
17458        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17459 printf %s "checking absolute name of <time.h>... " >&6; }
17460 if test ${gl_cv_next_time_h+y}
17461 then :
17462   printf %s "(cached) " >&6
17463 else
17464
17465
17466
17467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h.  */
17469 #include <time.h>
17470 _ACEOF
17471                 case "$host_os" in
17472     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17473     *)    gl_absname_cpp="$ac_cpp" ;;
17474   esac
17475
17476   case "$host_os" in
17477     mingw*)
17478                                           gl_dirsep_regex='[/\\]'
17479       ;;
17480     *)
17481       gl_dirsep_regex='\/'
17482       ;;
17483   esac
17484       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17485   gl_header_literal_regex=`echo 'time.h' \
17486                            | sed -e "$gl_make_literal_regex_sed"`
17487   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17488       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17489       s|^/[^/]|//&|
17490       p
17491       q
17492     }'
17493
17494         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17495   sed -n "$gl_absolute_header_sed"`
17496
17497            gl_header=$gl_cv_absolute_time_h
17498            gl_cv_next_time_h='"'$gl_header'"'
17499
17500
17501 fi
17502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17503 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17504      fi
17505      NEXT_TIME_H=$gl_cv_next_time_h
17506
17507      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17508        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17509        gl_next_as_first_directive='<'time.h'>'
17510      else
17511        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17512        gl_next_as_first_directive=$gl_cv_next_time_h
17513      fi
17514      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
17530 i\
17531 0
17532 q
17533 '
17534 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
17535 i\
17536 0
17537 q
17538 '
17539 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;}
17540 i\
17541 0
17542 q
17543 '
17544
17545
17546   if test "$HAVE_LIBUNISTRING" = yes; then
17547     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
17548     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
17549     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
17550   fi
17551
17552 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
17553 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
17554 then :
17555   ac_have_decl=1
17556 else
17557   ac_have_decl=0
17558 fi
17559
17560 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
17561
17562 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
17563 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
17564 then :
17565   ac_have_decl=1
17566 else
17567   ac_have_decl=0
17568 fi
17569
17570 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
17571
17572 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
17573 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
17574 then :
17575   ac_have_decl=1
17576 else
17577   ac_have_decl=0
17578 fi
17579
17580 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
17581
17582 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
17583 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
17584 then :
17585   ac_have_decl=1
17586 else
17587   ac_have_decl=0
17588 fi
17589
17590 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
17591
17592 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
17593 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
17594 then :
17595   ac_have_decl=1
17596 else
17597   ac_have_decl=0
17598 fi
17599
17600 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
17601
17602 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
17603 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
17604 then :
17605   ac_have_decl=1
17606 else
17607   ac_have_decl=0
17608 fi
17609
17610 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
17611
17612 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
17613 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
17614 then :
17615   ac_have_decl=1
17616 else
17617   ac_have_decl=0
17618 fi
17619
17620 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
17621
17622 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
17623 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
17624 then :
17625   ac_have_decl=1
17626 else
17627   ac_have_decl=0
17628 fi
17629
17630 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
17631
17632 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
17633 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
17634 then :
17635   ac_have_decl=1
17636 else
17637   ac_have_decl=0
17638 fi
17639
17640 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
17641
17642 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
17643 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
17644 then :
17645   ac_have_decl=1
17646 else
17647   ac_have_decl=0
17648 fi
17649
17650 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
17651
17652 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
17653 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
17654 then :
17655   ac_have_decl=1
17656 else
17657   ac_have_decl=0
17658 fi
17659
17660 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
17661
17662 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
17663 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
17664 then :
17665   ac_have_decl=1
17666 else
17667   ac_have_decl=0
17668 fi
17669
17670 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
17671
17672 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
17673 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
17674 then :
17675   ac_have_decl=1
17676 else
17677   ac_have_decl=0
17678 fi
17679
17680 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
17681
17682 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17683 if test "x$ac_cv_have_decl_unsetenv" = xyes
17684 then :
17685   ac_have_decl=1
17686 else
17687   ac_have_decl=0
17688 fi
17689
17690 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
17691
17692
17693
17694
17695
17696   if test $ac_cv_header_features_h = yes; then
17697     HAVE_FEATURES_H=1
17698   else
17699     HAVE_FEATURES_H=0
17700   fi
17701
17702
17703
17704   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
17705 printf %s "checking for inttypes.h... " >&6; }
17706 if test ${gl_cv_header_inttypes_h+y}
17707 then :
17708   printf %s "(cached) " >&6
17709 else
17710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711 /* end confdefs.h.  */
17712
17713 #include <sys/types.h>
17714 #include <inttypes.h>
17715
17716 int
17717 main (void)
17718 {
17719 uintmax_t i = (uintmax_t) -1; return !i;
17720   ;
17721   return 0;
17722 }
17723 _ACEOF
17724 if ac_fn_c_try_compile "$LINENO"
17725 then :
17726   gl_cv_header_inttypes_h=yes
17727 else
17728   gl_cv_header_inttypes_h=no
17729 fi
17730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17731 fi
17732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
17733 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
17734   if test $gl_cv_header_inttypes_h = yes; then
17735
17736 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
17737
17738   fi
17739
17740
17741   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
17742 printf %s "checking for stdint.h... " >&6; }
17743 if test ${gl_cv_header_stdint_h+y}
17744 then :
17745   printf %s "(cached) " >&6
17746 else
17747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17748 /* end confdefs.h.  */
17749 #include <sys/types.h>
17750             #include <stdint.h>
17751 int
17752 main (void)
17753 {
17754 uintmax_t i = (uintmax_t) -1; return !i;
17755   ;
17756   return 0;
17757 }
17758 _ACEOF
17759 if ac_fn_c_try_compile "$LINENO"
17760 then :
17761   gl_cv_header_stdint_h=yes
17762 else
17763   gl_cv_header_stdint_h=no
17764 fi
17765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17766 fi
17767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
17768 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
17769   if test $gl_cv_header_stdint_h = yes; then
17770
17771 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
17772
17773   fi
17774
17775
17776
17777
17778   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
17779 printf %s "checking for intmax_t... " >&6; }
17780 if test ${gt_cv_c_intmax_t+y}
17781 then :
17782   printf %s "(cached) " >&6
17783 else
17784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17785 /* end confdefs.h.  */
17786
17787 #include <stddef.h>
17788 #include <stdlib.h>
17789 #if HAVE_STDINT_H_WITH_UINTMAX
17790 #include <stdint.h>
17791 #endif
17792 #if HAVE_INTTYPES_H_WITH_UINTMAX
17793 #include <inttypes.h>
17794 #endif
17795
17796 int
17797 main (void)
17798 {
17799 intmax_t x = -1; return !x;
17800   ;
17801   return 0;
17802 }
17803 _ACEOF
17804 if ac_fn_c_try_compile "$LINENO"
17805 then :
17806   gt_cv_c_intmax_t=yes
17807 else
17808   gt_cv_c_intmax_t=no
17809 fi
17810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17811 fi
17812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
17813 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
17814   if test $gt_cv_c_intmax_t = yes; then
17815
17816 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
17817
17818   else
17819
17820     test $ac_cv_type_long_long_int = yes \
17821       && ac_type='long long' \
17822       || ac_type='long'
17823
17824 printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
17825
17826   fi
17827
17828
17829   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
17830 printf %s "checking where to find the exponent in a 'double'... " >&6; }
17831 if test ${gl_cv_cc_double_expbit0+y}
17832 then :
17833   printf %s "(cached) " >&6
17834 else
17835
17836       if test "$cross_compiling" = yes
17837 then :
17838
17839                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17840 /* end confdefs.h.  */
17841
17842 #if defined arm || defined __arm || defined __arm__
17843   mixed_endianness
17844 #endif
17845
17846 _ACEOF
17847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17848   $EGREP "mixed_endianness" >/dev/null 2>&1
17849 then :
17850   gl_cv_cc_double_expbit0="unknown"
17851 else
17852
17853                                                          :
17854 if test ${ac_cv_c_bigendian+y}
17855 then :
17856   printf %s "(cached) " >&6
17857 else
17858   ac_cv_c_bigendian=unknown
17859     # See if we're dealing with a universal compiler.
17860     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861 /* end confdefs.h.  */
17862 #ifndef __APPLE_CC__
17863                not a universal capable compiler
17864              #endif
17865              typedef int dummy;
17866
17867 _ACEOF
17868 if ac_fn_c_try_compile "$LINENO"
17869 then :
17870
17871         # Check for potential -arch flags.  It is not universal unless
17872         # there are at least two -arch flags with different values.
17873         ac_arch=
17874         ac_prev=
17875         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17876          if test -n "$ac_prev"; then
17877            case $ac_word in
17878              i?86 | x86_64 | ppc | ppc64)
17879                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17880                  ac_arch=$ac_word
17881                else
17882                  ac_cv_c_bigendian=universal
17883                  break
17884                fi
17885                ;;
17886            esac
17887            ac_prev=
17888          elif test "x$ac_word" = "x-arch"; then
17889            ac_prev=arch
17890          fi
17891        done
17892 fi
17893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17894     if test $ac_cv_c_bigendian = unknown; then
17895       # See if sys/param.h defines the BYTE_ORDER macro.
17896       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17897 /* end confdefs.h.  */
17898 #include <sys/types.h>
17899              #include <sys/param.h>
17900
17901 int
17902 main (void)
17903 {
17904 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17905                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17906                      && LITTLE_ENDIAN)
17907               bogus endian macros
17908              #endif
17909
17910   ;
17911   return 0;
17912 }
17913 _ACEOF
17914 if ac_fn_c_try_compile "$LINENO"
17915 then :
17916   # It does; now see whether it defined to BIG_ENDIAN or not.
17917          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17918 /* end confdefs.h.  */
17919 #include <sys/types.h>
17920                 #include <sys/param.h>
17921
17922 int
17923 main (void)
17924 {
17925 #if BYTE_ORDER != BIG_ENDIAN
17926                  not big endian
17927                 #endif
17928
17929   ;
17930   return 0;
17931 }
17932 _ACEOF
17933 if ac_fn_c_try_compile "$LINENO"
17934 then :
17935   ac_cv_c_bigendian=yes
17936 else
17937   ac_cv_c_bigendian=no
17938 fi
17939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17940 fi
17941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17942     fi
17943     if test $ac_cv_c_bigendian = unknown; then
17944       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17945       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17946 /* end confdefs.h.  */
17947 #include <limits.h>
17948
17949 int
17950 main (void)
17951 {
17952 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17953               bogus endian macros
17954              #endif
17955
17956   ;
17957   return 0;
17958 }
17959 _ACEOF
17960 if ac_fn_c_try_compile "$LINENO"
17961 then :
17962   # It does; now see whether it defined to _BIG_ENDIAN or not.
17963          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964 /* end confdefs.h.  */
17965 #include <limits.h>
17966
17967 int
17968 main (void)
17969 {
17970 #ifndef _BIG_ENDIAN
17971                  not big endian
17972                 #endif
17973
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 if ac_fn_c_try_compile "$LINENO"
17979 then :
17980   ac_cv_c_bigendian=yes
17981 else
17982   ac_cv_c_bigendian=no
17983 fi
17984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17985 fi
17986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17987     fi
17988     if test $ac_cv_c_bigendian = unknown; then
17989       # Compile a test program.
17990       if test "$cross_compiling" = yes
17991 then :
17992   # Try to guess by grepping values from an object file.
17993          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17994 /* end confdefs.h.  */
17995 short int ascii_mm[] =
17996                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17997                 short int ascii_ii[] =
17998                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17999                 int use_ascii (int i) {
18000                   return ascii_mm[i] + ascii_ii[i];
18001                 }
18002                 short int ebcdic_ii[] =
18003                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18004                 short int ebcdic_mm[] =
18005                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18006                 int use_ebcdic (int i) {
18007                   return ebcdic_mm[i] + ebcdic_ii[i];
18008                 }
18009                 extern int foo;
18010
18011 int
18012 main (void)
18013 {
18014 return use_ascii (foo) == use_ebcdic (foo);
18015   ;
18016   return 0;
18017 }
18018 _ACEOF
18019 if ac_fn_c_try_compile "$LINENO"
18020 then :
18021   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18022               ac_cv_c_bigendian=yes
18023             fi
18024             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18025               if test "$ac_cv_c_bigendian" = unknown; then
18026                 ac_cv_c_bigendian=no
18027               else
18028                 # finding both strings is unlikely to happen, but who knows?
18029                 ac_cv_c_bigendian=unknown
18030               fi
18031             fi
18032 fi
18033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18034 else
18035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18036 /* end confdefs.h.  */
18037 $ac_includes_default
18038 int
18039 main (void)
18040 {
18041
18042              /* Are we little or big endian?  From Harbison&Steele.  */
18043              union
18044              {
18045                long int l;
18046                char c[sizeof (long int)];
18047              } u;
18048              u.l = 1;
18049              return u.c[sizeof (long int) - 1] == 1;
18050
18051   ;
18052   return 0;
18053 }
18054 _ACEOF
18055 if ac_fn_c_try_run "$LINENO"
18056 then :
18057   ac_cv_c_bigendian=no
18058 else
18059   ac_cv_c_bigendian=yes
18060 fi
18061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18062   conftest.$ac_objext conftest.beam conftest.$ac_ext
18063 fi
18064
18065     fi
18066 fi
18067 :
18068  case $ac_cv_c_bigendian in #(
18069    yes)
18070      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
18071    no)
18072      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
18073    universal)
18074
18075 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
18076
18077      ;; #(
18078    *)
18079      gl_cv_cc_double_expbit0="unknown" ;;
18080  esac
18081
18082
18083 fi
18084 rm -rf conftest*
18085
18086
18087 else
18088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18089 /* end confdefs.h.  */
18090
18091 #include <float.h>
18092 #include <stddef.h>
18093 #include <stdio.h>
18094 #include <string.h>
18095 #define NWORDS \
18096   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18097 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
18098 static unsigned int ored_words[NWORDS];
18099 static unsigned int anded_words[NWORDS];
18100 static void add_to_ored_words (double x)
18101 {
18102   memory_double m;
18103   size_t i;
18104   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
18105   memset (&m, 0, sizeof (memory_double));
18106   m.value = x;
18107   for (i = 0; i < NWORDS; i++)
18108     {
18109       ored_words[i] |= m.word[i];
18110       anded_words[i] &= m.word[i];
18111     }
18112 }
18113 int main ()
18114 {
18115   size_t j;
18116   FILE *fp = fopen ("conftest.out", "w");
18117   if (fp == NULL)
18118     return 1;
18119   for (j = 0; j < NWORDS; j++)
18120     anded_words[j] = ~ (unsigned int) 0;
18121   add_to_ored_words (0.25);
18122   add_to_ored_words (0.5);
18123   add_to_ored_words (1.0);
18124   add_to_ored_words (2.0);
18125   add_to_ored_words (4.0);
18126   /* Remove bits that are common (e.g. if representation of the first mantissa
18127      bit is explicit).  */
18128   for (j = 0; j < NWORDS; j++)
18129     ored_words[j] &= ~anded_words[j];
18130   /* Now find the nonzero word.  */
18131   for (j = 0; j < NWORDS; j++)
18132     if (ored_words[j] != 0)
18133       break;
18134   if (j < NWORDS)
18135     {
18136       size_t i;
18137       for (i = j + 1; i < NWORDS; i++)
18138         if (ored_words[i] != 0)
18139           {
18140             fprintf (fp, "unknown");
18141             return (fclose (fp) != 0);
18142           }
18143       for (i = 0; ; i++)
18144         if ((ored_words[j] >> i) & 1)
18145           {
18146             fprintf (fp, "word %d bit %d", (int) j, (int) i);
18147             return (fclose (fp) != 0);
18148           }
18149     }
18150   fprintf (fp, "unknown");
18151   return (fclose (fp) != 0);
18152 }
18153
18154 _ACEOF
18155 if ac_fn_c_try_run "$LINENO"
18156 then :
18157   gl_cv_cc_double_expbit0=`cat conftest.out`
18158 else
18159   gl_cv_cc_double_expbit0="unknown"
18160 fi
18161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18162   conftest.$ac_objext conftest.beam conftest.$ac_ext
18163 fi
18164
18165       rm -f conftest.out
18166
18167 fi
18168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
18169 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
18170   case "$gl_cv_cc_double_expbit0" in
18171     word*bit*)
18172       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18173       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
18174
18175 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
18176
18177
18178 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
18179
18180       ;;
18181   esac
18182
18183
18184
18185
18186
18187
18188
18189
18190   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
18191 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
18192 if test ${gl_cv_func_snprintf_retval_c99+y}
18193 then :
18194   printf %s "(cached) " >&6
18195 else
18196
18197       if test "$cross_compiling" = yes
18198 then :
18199   case "$host_os" in
18200                                  # Guess yes on glibc systems.
18201            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
18202                                  # Guess yes on FreeBSD >= 5.
18203            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
18204            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18205                                  # Guess yes on Mac OS X >= 10.3.
18206            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
18207            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
18208                                  # Guess yes on OpenBSD >= 3.9.
18209            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18210                                  gl_cv_func_snprintf_retval_c99="guessing no";;
18211            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
18212                                  # Guess yes on Solaris >= 2.10.
18213            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18214            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
18215                                  # Guess yes on AIX >= 4.
18216            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
18217            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
18218                                  # Guess yes on NetBSD >= 3.
18219            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18220                                  gl_cv_func_snprintf_retval_c99="guessing no";;
18221            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
18222                                  # Guess yes on BeOS.
18223            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
18224                                  # Guess yes on MSVC, no on mingw.
18225            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18226 /* end confdefs.h.  */
18227
18228 #ifdef _MSC_VER
18229  Known
18230 #endif
18231
18232 _ACEOF
18233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18234   $EGREP "Known" >/dev/null 2>&1
18235 then :
18236   gl_cv_func_snprintf_retval_c99="guessing yes"
18237 else
18238   gl_cv_func_snprintf_retval_c99="guessing no"
18239 fi
18240 rm -rf conftest*
18241
18242                                  ;;
18243                                  # If we don't know, assume the worst.
18244            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
18245          esac
18246
18247 else
18248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18249 /* end confdefs.h.  */
18250
18251 #include <stdio.h>
18252 #include <string.h>
18253 #if HAVE_SNPRINTF
18254 # define my_snprintf snprintf
18255 #else
18256 # include <stdarg.h>
18257 static int my_snprintf (char *buf, int size, const char *format, ...)
18258 {
18259   va_list args;
18260   int ret;
18261   va_start (args, format);
18262   ret = vsnprintf (buf, size, format, args);
18263   va_end (args);
18264   return ret;
18265 }
18266 #endif
18267 static char buf[100];
18268 int main ()
18269 {
18270   strcpy (buf, "ABCDEF");
18271   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
18272     return 1;
18273   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
18274     return 2;
18275   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
18276     return 3;
18277   return 0;
18278 }
18279 _ACEOF
18280 if ac_fn_c_try_run "$LINENO"
18281 then :
18282   gl_cv_func_snprintf_retval_c99=yes
18283 else
18284   gl_cv_func_snprintf_retval_c99=no
18285 fi
18286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18287   conftest.$ac_objext conftest.beam conftest.$ac_ext
18288 fi
18289
18290
18291 fi
18292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
18293 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
18294
18295
18296
18297
18298
18299
18300   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18301 if test "x$ac_cv_func_snprintf" = xyes
18302 then :
18303   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
18304
18305 fi
18306 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
18307 if test "x$ac_cv_func_strnlen" = xyes
18308 then :
18309   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
18310
18311 fi
18312 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
18313 if test "x$ac_cv_func_wcslen" = xyes
18314 then :
18315   printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
18316
18317 fi
18318 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
18319 if test "x$ac_cv_func_wcsnlen" = xyes
18320 then :
18321   printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
18322
18323 fi
18324 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
18325 if test "x$ac_cv_func_mbrtowc" = xyes
18326 then :
18327   printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
18328
18329 fi
18330 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
18331 if test "x$ac_cv_func_wcrtomb" = xyes
18332 then :
18333   printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
18334
18335 fi
18336
18337       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
18338 "
18339 if test "x$ac_cv_have_decl__snprintf" = xyes
18340 then :
18341   ac_have_decl=1
18342 else
18343   ac_have_decl=0
18344 fi
18345
18346 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
18347
18348
18349
18350   case "$gl_cv_func_snprintf_retval_c99" in
18351     *yes)
18352
18353 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
18354
18355       ;;
18356   esac
18357
18358
18359
18360
18361   GNULIB_SOCKET=0;
18362   GNULIB_CONNECT=0;
18363   GNULIB_ACCEPT=0;
18364   GNULIB_BIND=0;
18365   GNULIB_GETPEERNAME=0;
18366   GNULIB_GETSOCKNAME=0;
18367   GNULIB_GETSOCKOPT=0;
18368   GNULIB_LISTEN=0;
18369   GNULIB_RECV=0;
18370   GNULIB_SEND=0;
18371   GNULIB_RECVFROM=0;
18372   GNULIB_SENDTO=0;
18373   GNULIB_SETSOCKOPT=0;
18374   GNULIB_SHUTDOWN=0;
18375   GNULIB_ACCEPT4=0;
18376   HAVE_STRUCT_SOCKADDR_STORAGE=1;
18377   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
18378
18379   HAVE_SA_FAMILY_T=1;
18380   HAVE_ACCEPT4=1;
18381
18382
18383    if test $ac_cv_header_sys_socket_h = no; then
18384                          ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18385 if test "x$ac_cv_header_ws2tcpip_h" = xyes
18386 then :
18387   printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
18388
18389 fi
18390
18391    fi
18392
18393
18394
18395
18396
18397         case "$host_os" in
18398     osf*)
18399
18400 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
18401
18402       ;;
18403   esac
18404
18405   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
18406 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
18407 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
18408 then :
18409   printf %s "(cached) " >&6
18410 else
18411
18412       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18413 /* end confdefs.h.  */
18414 #include <sys/socket.h>
18415 int
18416 main (void)
18417 {
18418
18419   ;
18420   return 0;
18421 }
18422 _ACEOF
18423 if ac_fn_c_try_compile "$LINENO"
18424 then :
18425   gl_cv_header_sys_socket_h_selfcontained=yes
18426 else
18427   gl_cv_header_sys_socket_h_selfcontained=no
18428 fi
18429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18430
18431 fi
18432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
18433 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
18434   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
18435             ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
18436 if test "x$ac_cv_func_shutdown" = xyes
18437 then :
18438   printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
18439
18440 fi
18441
18442     if test $ac_cv_func_shutdown = yes; then
18443       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
18444 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
18445 if test ${gl_cv_header_sys_socket_h_shut+y}
18446 then :
18447   printf %s "(cached) " >&6
18448 else
18449
18450           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18451 /* end confdefs.h.  */
18452 #include <sys/socket.h>
18453 int
18454 main (void)
18455 {
18456 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
18457   ;
18458   return 0;
18459 }
18460 _ACEOF
18461 if ac_fn_c_try_compile "$LINENO"
18462 then :
18463   gl_cv_header_sys_socket_h_shut=yes
18464 else
18465   gl_cv_header_sys_socket_h_shut=no
18466 fi
18467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18468
18469 fi
18470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
18471 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
18472       if test $gl_cv_header_sys_socket_h_shut = no; then
18473         SYS_SOCKET_H='sys/socket.h'
18474       fi
18475     fi
18476   fi
18477   # We need to check for ws2tcpip.h now.
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489      if test $gl_cv_have_include_next = yes; then
18490        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
18491      else
18492        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
18493 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
18494 if test ${gl_cv_next_sys_socket_h+y}
18495 then :
18496   printf %s "(cached) " >&6
18497 else
18498
18499              if test $ac_cv_header_sys_socket_h = yes; then
18500
18501
18502
18503
18504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18505 /* end confdefs.h.  */
18506 #include <sys/socket.h>
18507 _ACEOF
18508                 case "$host_os" in
18509     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18510     *)    gl_absname_cpp="$ac_cpp" ;;
18511   esac
18512
18513   case "$host_os" in
18514     mingw*)
18515                                           gl_dirsep_regex='[/\\]'
18516       ;;
18517     *)
18518       gl_dirsep_regex='\/'
18519       ;;
18520   esac
18521       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18522   gl_header_literal_regex=`echo 'sys/socket.h' \
18523                            | sed -e "$gl_make_literal_regex_sed"`
18524   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18525       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18526       s|^/[^/]|//&|
18527       p
18528       q
18529     }'
18530
18531         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18532   sed -n "$gl_absolute_header_sed"`
18533
18534            gl_header=$gl_cv_absolute_sys_socket_h
18535            gl_cv_next_sys_socket_h='"'$gl_header'"'
18536           else
18537                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
18538              fi
18539
18540
18541 fi
18542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
18543 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
18544      fi
18545      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
18546
18547      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18548        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18549        gl_next_as_first_directive='<'sys/socket.h'>'
18550      else
18551        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18552        gl_next_as_first_directive=$gl_cv_next_sys_socket_h
18553      fi
18554      NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
18555
18556
18557
18558
18559   if test $ac_cv_header_sys_socket_h = yes; then
18560     HAVE_SYS_SOCKET_H=1
18561     HAVE_WS2TCPIP_H=0
18562   else
18563     HAVE_SYS_SOCKET_H=0
18564     if test $ac_cv_header_ws2tcpip_h = yes; then
18565       HAVE_WS2TCPIP_H=1
18566     else
18567       HAVE_WS2TCPIP_H=0
18568     fi
18569   fi
18570
18571
18572
18573   ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
18574   /* sys/types.h is not needed according to POSIX, but the
18575      sys/socket.h in i386-unknown-freebsd4.10 and
18576      powerpc-apple-darwin5.5 required it. */
18577 #include <sys/types.h>
18578 #ifdef HAVE_SYS_SOCKET_H
18579 #include <sys/socket.h>
18580 #endif
18581 #ifdef HAVE_WS2TCPIP_H
18582 #include <ws2tcpip.h>
18583 #endif
18584
18585 "
18586 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
18587 then :
18588
18589 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
18590
18591
18592 fi
18593 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
18594   /* sys/types.h is not needed according to POSIX, but the
18595      sys/socket.h in i386-unknown-freebsd4.10 and
18596      powerpc-apple-darwin5.5 required it. */
18597 #include <sys/types.h>
18598 #ifdef HAVE_SYS_SOCKET_H
18599 #include <sys/socket.h>
18600 #endif
18601 #ifdef HAVE_WS2TCPIP_H
18602 #include <ws2tcpip.h>
18603 #endif
18604
18605 "
18606 if test "x$ac_cv_type_sa_family_t" = xyes
18607 then :
18608
18609 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
18610
18611
18612 fi
18613
18614   if test $ac_cv_type_struct_sockaddr_storage = no; then
18615     HAVE_STRUCT_SOCKADDR_STORAGE=0
18616   fi
18617   if test $ac_cv_type_sa_family_t = no; then
18618     HAVE_SA_FAMILY_T=0
18619   fi
18620   if test $ac_cv_type_struct_sockaddr_storage != no; then
18621     ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
18622        #ifdef HAVE_SYS_SOCKET_H
18623        #include <sys/socket.h>
18624        #endif
18625        #ifdef HAVE_WS2TCPIP_H
18626        #include <ws2tcpip.h>
18627        #endif
18628
18629 "
18630 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
18631 then :
18632
18633 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
18634
18635
18636 else
18637   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
18638 fi
18639
18640   fi
18641   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
18642      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
18643     SYS_SOCKET_H='sys/socket.h'
18644   fi
18645
18646
18647
18648
18649   if test $ac_cv_header_sys_socket_h != yes; then
18650                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18651 if test "x$ac_cv_header_winsock2_h" = xyes
18652 then :
18653   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
18654
18655 fi
18656
18657   fi
18658   if test "$ac_cv_header_winsock2_h" = yes; then
18659     HAVE_WINSOCK2_H=1
18660     UNISTD_H_HAVE_WINSOCK2_H=1
18661     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18662   else
18663     HAVE_WINSOCK2_H=0
18664   fi
18665
18666
18667
18668
18669
18670
18671
18672
18673   GNULIB_INET_NTOP=0;
18674   GNULIB_INET_PTON=0;
18675     HAVE_DECL_INET_NTOP=1;
18676   HAVE_DECL_INET_PTON=1;
18677   REPLACE_INET_NTOP=0;
18678   REPLACE_INET_PTON=0;
18679
18680
18681
18682
18683
18684    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
18685 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
18686 if test ${gl_cv_func_getcwd_null+y}
18687 then :
18688   printf %s "(cached) " >&6
18689 else
18690   if test "$cross_compiling" = yes
18691 then :
18692   case "$host_os" in
18693                            # Guess yes on glibc systems.
18694             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
18695                            # Guess yes on Cygwin.
18696             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
18697                            # If we don't know, assume the worst.
18698             *)             gl_cv_func_getcwd_null="guessing no";;
18699           esac
18700
18701 else
18702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18703 /* end confdefs.h.  */
18704
18705 #        include <stdlib.h>
18706 #        if HAVE_UNISTD_H
18707 #         include <unistd.h>
18708 #        else /* on Windows with MSVC */
18709 #         include <direct.h>
18710 #        endif
18711 #        ifndef getcwd
18712          char *getcwd ();
18713 #        endif
18714
18715 int
18716 main (void)
18717 {
18718
18719 #if defined _WIN32 && ! defined __CYGWIN__
18720 /* mingw cwd does not start with '/', but getcwd does allocate.
18721    However, mingw fails to honor non-zero size.  */
18722 #else
18723            if (chdir ("/") != 0)
18724              return 1;
18725            else
18726              {
18727                char *f = getcwd (NULL, 0);
18728                if (! f)
18729                  return 2;
18730                if (f[0] != '/')
18731                  { free (f); return 3; }
18732                if (f[1] != '\0')
18733                  { free (f); return 4; }
18734                free (f);
18735                return 0;
18736              }
18737 #endif
18738
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 if ac_fn_c_try_run "$LINENO"
18744 then :
18745   gl_cv_func_getcwd_null=yes
18746 else
18747   gl_cv_func_getcwd_null=no
18748 fi
18749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18750   conftest.$ac_objext conftest.beam conftest.$ac_ext
18751 fi
18752
18753 fi
18754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
18755 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
18756
18757
18758   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
18759 printf %s "checking for getcwd with POSIX signature... " >&6; }
18760 if test ${gl_cv_func_getcwd_posix_signature+y}
18761 then :
18762   printf %s "(cached) " >&6
18763 else
18764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18765 /* end confdefs.h.  */
18766 #include <unistd.h>
18767 int
18768 main (void)
18769 {
18770 extern
18771            #ifdef __cplusplus
18772            "C"
18773            #endif
18774            char *getcwd (char *, size_t);
18775
18776   ;
18777   return 0;
18778 }
18779
18780 _ACEOF
18781 if ac_fn_c_try_compile "$LINENO"
18782 then :
18783   gl_cv_func_getcwd_posix_signature=yes
18784 else
18785   gl_cv_func_getcwd_posix_signature=no
18786 fi
18787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18788
18789 fi
18790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
18791 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
18792
18793
18794
18795
18796
18797
18798
18799   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
18800 printf %s "checking for IPv4 sockets... " >&6; }
18801 if test ${gl_cv_socket_ipv4+y}
18802 then :
18803   printf %s "(cached) " >&6
18804 else
18805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18806 /* end confdefs.h.  */
18807 #include <sys/types.h>
18808 #ifdef HAVE_SYS_SOCKET_H
18809 #include <sys/socket.h>
18810 #endif
18811 #ifdef HAVE_NETINET_IN_H
18812 #include <netinet/in.h>
18813 #endif
18814 #ifdef HAVE_WINSOCK2_H
18815 #include <winsock2.h>
18816 #endif
18817 int
18818 main (void)
18819 {
18820 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
18821  if (&x && &y && &z) return 0;
18822   ;
18823   return 0;
18824 }
18825 _ACEOF
18826 if ac_fn_c_try_compile "$LINENO"
18827 then :
18828   gl_cv_socket_ipv4=yes
18829 else
18830   gl_cv_socket_ipv4=no
18831 fi
18832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18833 fi
18834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
18835 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
18836   if test $gl_cv_socket_ipv4 = yes; then
18837
18838 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
18839
18840   fi
18841
18842   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
18843 printf %s "checking for IPv6 sockets... " >&6; }
18844 if test ${gl_cv_socket_ipv6+y}
18845 then :
18846   printf %s "(cached) " >&6
18847 else
18848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18849 /* end confdefs.h.  */
18850 #include <sys/types.h>
18851 #ifdef HAVE_SYS_SOCKET_H
18852 #include <sys/socket.h>
18853 #endif
18854 #ifdef HAVE_NETINET_IN_H
18855 #include <netinet/in.h>
18856 #endif
18857 #ifdef HAVE_WINSOCK2_H
18858 #include <winsock2.h>
18859 #endif
18860 #ifdef HAVE_WS2TCPIP_H
18861 #include <ws2tcpip.h>
18862 #endif
18863 int
18864 main (void)
18865 {
18866 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
18867  if (&x && &y && &z) return 0;
18868   ;
18869   return 0;
18870 }
18871 _ACEOF
18872 if ac_fn_c_try_compile "$LINENO"
18873 then :
18874   gl_cv_socket_ipv6=yes
18875 else
18876   gl_cv_socket_ipv6=no
18877 fi
18878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18879 fi
18880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
18881 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
18882   if test $gl_cv_socket_ipv6 = yes; then
18883
18884 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
18885
18886   fi
18887
18888
18889
18890   GNULIB_PSELECT=0;
18891   GNULIB_SELECT=0;
18892     HAVE_PSELECT=1;
18893   REPLACE_PSELECT=0;
18894   REPLACE_SELECT=0;
18895
18896
18897
18898
18899
18900   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
18901 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
18902 if test ${gl_cv_header_sys_select_h_selfcontained+y}
18903 then :
18904   printf %s "(cached) " >&6
18905 else
18906
18907                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18908 /* end confdefs.h.  */
18909 #include <sys/select.h>
18910 int
18911 main (void)
18912 {
18913 struct timeval b;
18914   ;
18915   return 0;
18916 }
18917 _ACEOF
18918 if ac_fn_c_try_compile "$LINENO"
18919 then :
18920   gl_cv_header_sys_select_h_selfcontained=yes
18921 else
18922   gl_cv_header_sys_select_h_selfcontained=no
18923 fi
18924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18925                         if test $gl_cv_header_sys_select_h_selfcontained = yes; then
18926         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18927 /* end confdefs.h.  */
18928 #include <sys/select.h>
18929 int
18930 main (void)
18931 {
18932 int memset; int bzero;
18933   ;
18934   return 0;
18935 }
18936
18937 _ACEOF
18938 if ac_fn_c_try_compile "$LINENO"
18939 then :
18940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18941 /* end confdefs.h.  */
18942 #include <sys/select.h>
18943 int
18944 main (void)
18945 {
18946
18947                   #undef memset
18948                   #define memset nonexistent_memset
18949                   extern
18950                   #ifdef __cplusplus
18951                   "C"
18952                   #endif
18953                   void *memset (void *, int, unsigned long);
18954                   #undef bzero
18955                   #define bzero nonexistent_bzero
18956                   extern
18957                   #ifdef __cplusplus
18958                   "C"
18959                   #endif
18960                   void bzero (void *, unsigned long);
18961                   fd_set fds;
18962                   FD_ZERO (&fds);
18963
18964   ;
18965   return 0;
18966 }
18967
18968 _ACEOF
18969 if ac_fn_c_try_link "$LINENO"
18970 then :
18971
18972 else
18973   gl_cv_header_sys_select_h_selfcontained=no
18974 fi
18975 rm -f core conftest.err conftest.$ac_objext \
18976     conftest$ac_exeext conftest.$ac_ext
18977
18978 fi
18979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18980       fi
18981
18982 fi
18983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
18984 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994      if test $gl_cv_have_include_next = yes; then
18995        gl_cv_next_sys_select_h='<'sys/select.h'>'
18996      else
18997        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
18998 printf %s "checking absolute name of <sys/select.h>... " >&6; }
18999 if test ${gl_cv_next_sys_select_h+y}
19000 then :
19001   printf %s "(cached) " >&6
19002 else
19003
19004              if test $ac_cv_header_sys_select_h = yes; then
19005
19006
19007
19008
19009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h.  */
19011 #include <sys/select.h>
19012 _ACEOF
19013                 case "$host_os" in
19014     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19015     *)    gl_absname_cpp="$ac_cpp" ;;
19016   esac
19017
19018   case "$host_os" in
19019     mingw*)
19020                                           gl_dirsep_regex='[/\\]'
19021       ;;
19022     *)
19023       gl_dirsep_regex='\/'
19024       ;;
19025   esac
19026       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19027   gl_header_literal_regex=`echo 'sys/select.h' \
19028                            | sed -e "$gl_make_literal_regex_sed"`
19029   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19030       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19031       s|^/[^/]|//&|
19032       p
19033       q
19034     }'
19035
19036         gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19037   sed -n "$gl_absolute_header_sed"`
19038
19039            gl_header=$gl_cv_absolute_sys_select_h
19040            gl_cv_next_sys_select_h='"'$gl_header'"'
19041           else
19042                gl_cv_next_sys_select_h='<'sys/select.h'>'
19043              fi
19044
19045
19046 fi
19047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19048 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
19049      fi
19050      NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19051
19052      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19053        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19054        gl_next_as_first_directive='<'sys/select.h'>'
19055      else
19056        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19057        gl_next_as_first_directive=$gl_cv_next_sys_select_h
19058      fi
19059      NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19060
19061
19062
19063
19064   if test $ac_cv_header_sys_select_h = yes; then
19065     HAVE_SYS_SELECT_H=1
19066   else
19067     HAVE_SYS_SELECT_H=0
19068   fi
19069
19070
19071
19072
19073
19074   if test $ac_cv_header_sys_socket_h != yes; then
19075                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19076 if test "x$ac_cv_header_winsock2_h" = xyes
19077 then :
19078   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19079
19080 fi
19081
19082   fi
19083   if test "$ac_cv_header_winsock2_h" = yes; then
19084     HAVE_WINSOCK2_H=1
19085     UNISTD_H_HAVE_WINSOCK2_H=1
19086     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19087   else
19088     HAVE_WINSOCK2_H=0
19089   fi
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102   if test $ac_cv_header_sys_socket_h != yes; then
19103                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19104 if test "x$ac_cv_header_winsock2_h" = xyes
19105 then :
19106   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19107
19108 fi
19109
19110   fi
19111   if test "$ac_cv_header_winsock2_h" = yes; then
19112     HAVE_WINSOCK2_H=1
19113     UNISTD_H_HAVE_WINSOCK2_H=1
19114     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19115   else
19116     HAVE_WINSOCK2_H=0
19117   fi
19118
19119    LIBSOCKET=
19120   if test $HAVE_WINSOCK2_H = 1; then
19121         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
19122 printf %s "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
19123 if test ${gl_cv_func_wsastartup+y}
19124 then :
19125   printf %s "(cached) " >&6
19126 else
19127
19128       gl_save_LIBS="$LIBS"
19129       LIBS="$LIBS -lws2_32"
19130       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19131 /* end confdefs.h.  */
19132
19133 #ifdef HAVE_WINSOCK2_H
19134 # include <winsock2.h>
19135 #endif
19136 int
19137 main (void)
19138 {
19139
19140           WORD wVersionRequested = MAKEWORD(1, 1);
19141           WSADATA wsaData;
19142           int err = WSAStartup(wVersionRequested, &wsaData);
19143           WSACleanup ();
19144   ;
19145   return 0;
19146 }
19147 _ACEOF
19148 if ac_fn_c_try_link "$LINENO"
19149 then :
19150   gl_cv_func_wsastartup=yes
19151 else
19152   gl_cv_func_wsastartup=no
19153 fi
19154 rm -f core conftest.err conftest.$ac_objext \
19155     conftest$ac_exeext conftest.$ac_ext
19156       LIBS="$gl_save_LIBS"
19157
19158 fi
19159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
19160 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
19161     if test "$gl_cv_func_wsastartup" = "yes"; then
19162
19163 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
19164
19165       LIBSOCKET='-lws2_32'
19166     fi
19167   else
19168                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
19169 printf %s "checking for library containing setsockopt... " >&6; }
19170 if test ${gl_cv_lib_socket+y}
19171 then :
19172   printf %s "(cached) " >&6
19173 else
19174
19175       gl_cv_lib_socket=
19176       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19177 /* end confdefs.h.  */
19178 extern
19179 #ifdef __cplusplus
19180 "C"
19181 #endif
19182 char setsockopt();
19183 int
19184 main (void)
19185 {
19186 setsockopt();
19187   ;
19188   return 0;
19189 }
19190 _ACEOF
19191 if ac_fn_c_try_link "$LINENO"
19192 then :
19193
19194 else
19195   gl_save_LIBS="$LIBS"
19196          LIBS="$gl_save_LIBS -lsocket"
19197          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19198 /* end confdefs.h.  */
19199 extern
19200 #ifdef __cplusplus
19201 "C"
19202 #endif
19203 char setsockopt();
19204 int
19205 main (void)
19206 {
19207 setsockopt();
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 if ac_fn_c_try_link "$LINENO"
19213 then :
19214   gl_cv_lib_socket="-lsocket"
19215 fi
19216 rm -f core conftest.err conftest.$ac_objext \
19217     conftest$ac_exeext conftest.$ac_ext
19218          if test -z "$gl_cv_lib_socket"; then
19219            LIBS="$gl_save_LIBS -lnetwork"
19220            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19221 /* end confdefs.h.  */
19222 extern
19223 #ifdef __cplusplus
19224 "C"
19225 #endif
19226 char setsockopt();
19227 int
19228 main (void)
19229 {
19230 setsockopt();
19231   ;
19232   return 0;
19233 }
19234 _ACEOF
19235 if ac_fn_c_try_link "$LINENO"
19236 then :
19237   gl_cv_lib_socket="-lnetwork"
19238 fi
19239 rm -f core conftest.err conftest.$ac_objext \
19240     conftest$ac_exeext conftest.$ac_ext
19241            if test -z "$gl_cv_lib_socket"; then
19242              LIBS="$gl_save_LIBS -lnet"
19243              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19244 /* end confdefs.h.  */
19245 extern
19246 #ifdef __cplusplus
19247 "C"
19248 #endif
19249 char setsockopt();
19250 int
19251 main (void)
19252 {
19253 setsockopt();
19254   ;
19255   return 0;
19256 }
19257 _ACEOF
19258 if ac_fn_c_try_link "$LINENO"
19259 then :
19260   gl_cv_lib_socket="-lnet"
19261 fi
19262 rm -f core conftest.err conftest.$ac_objext \
19263     conftest$ac_exeext conftest.$ac_ext
19264            fi
19265          fi
19266          LIBS="$gl_save_LIBS"
19267
19268 fi
19269 rm -f core conftest.err conftest.$ac_objext \
19270     conftest$ac_exeext conftest.$ac_ext
19271       if test -z "$gl_cv_lib_socket"; then
19272         gl_cv_lib_socket="none needed"
19273       fi
19274
19275 fi
19276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
19277 printf "%s\n" "$gl_cv_lib_socket" >&6; }
19278     if test "$gl_cv_lib_socket" != "none needed"; then
19279       LIBSOCKET="$gl_cv_lib_socket"
19280     fi
19281   fi
19282
19283
19284
19285
19286
19287
19288   :
19289
19290
19291
19292
19293
19294
19295   if test "$ac_cv_header_winsock2_h" = yes; then
19296     REPLACE_SELECT=1
19297   else
19298
19299     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
19300 printf %s "checking whether select supports a 0 argument... " >&6; }
19301 if test ${gl_cv_func_select_supports0+y}
19302 then :
19303   printf %s "(cached) " >&6
19304 else
19305
19306         if test "$cross_compiling" = yes
19307 then :
19308
19309            case "$host_os" in
19310                        # Guess no on Interix.
19311              interix*) gl_cv_func_select_supports0="guessing no";;
19312                        # Guess yes otherwise.
19313              *)        gl_cv_func_select_supports0="guessing yes";;
19314            esac
19315
19316 else
19317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19318 /* end confdefs.h.  */
19319
19320 #include <sys/types.h>
19321 #include <sys/time.h>
19322 #if HAVE_SYS_SELECT_H
19323 #include <sys/select.h>
19324 #endif
19325 int main ()
19326 {
19327   struct timeval timeout;
19328   timeout.tv_sec = 0;
19329   timeout.tv_usec = 5;
19330   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
19331 }
19332 _ACEOF
19333 if ac_fn_c_try_run "$LINENO"
19334 then :
19335   gl_cv_func_select_supports0=yes
19336 else
19337   gl_cv_func_select_supports0=no
19338 fi
19339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19340   conftest.$ac_objext conftest.beam conftest.$ac_ext
19341 fi
19342
19343
19344 fi
19345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
19346 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
19347     case "$gl_cv_func_select_supports0" in
19348       *yes) ;;
19349       *) REPLACE_SELECT=1 ;;
19350     esac
19351
19352         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
19353 printf %s "checking whether select detects invalid fds... " >&6; }
19354 if test ${gl_cv_func_select_detects_ebadf+y}
19355 then :
19356   printf %s "(cached) " >&6
19357 else
19358
19359         if test "$cross_compiling" = yes
19360 then :
19361
19362            case "$host_os" in
19363                              # Guess yes on Linux systems.
19364             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
19365                              # Guess yes on glibc systems.
19366             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
19367                              # If we don't know, assume the worst.
19368             *)               gl_cv_func_select_detects_ebadf="guessing no" ;;
19369            esac
19370
19371 else
19372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19373 /* end confdefs.h.  */
19374
19375 #include <sys/types.h>
19376 #include <sys/time.h>
19377 #if HAVE_SYS_SELECT_H
19378 # include <sys/select.h>
19379 #endif
19380 #include <unistd.h>
19381 #include <errno.h>
19382
19383 int
19384 main (void)
19385 {
19386
19387   fd_set set;
19388   dup2(0, 16);
19389   FD_ZERO(&set);
19390   FD_SET(16, &set);
19391   close(16);
19392   struct timeval timeout;
19393   timeout.tv_sec = 0;
19394   timeout.tv_usec = 5;
19395   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
19396
19397   ;
19398   return 0;
19399 }
19400 _ACEOF
19401 if ac_fn_c_try_run "$LINENO"
19402 then :
19403   gl_cv_func_select_detects_ebadf=yes
19404 else
19405   gl_cv_func_select_detects_ebadf=no
19406 fi
19407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19408   conftest.$ac_objext conftest.beam conftest.$ac_ext
19409 fi
19410
19411
19412 fi
19413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
19414 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
19415     case $gl_cv_func_select_detects_ebadf in
19416       *yes) ;;
19417       *) REPLACE_SELECT=1 ;;
19418     esac
19419   fi
19420
19421     LIB_SELECT="$LIBSOCKET"
19422   if test $REPLACE_SELECT = 1; then
19423     case "$host_os" in
19424       mingw*)
19425                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19426 /* end confdefs.h.  */
19427
19428 #define WIN32_LEAN_AND_MEAN
19429 #include <windows.h>
19430 int
19431 main ()
19432 {
19433   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
19434   return 0;
19435 }
19436 _ACEOF
19437 if ac_fn_c_try_link "$LINENO"
19438 then :
19439
19440 else
19441   LIB_SELECT="$LIB_SELECT -luser32"
19442 fi
19443 rm -f core conftest.err conftest.$ac_objext \
19444     conftest$ac_exeext conftest.$ac_ext
19445         ;;
19446     esac
19447   fi
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457   if test $ac_cv_have_decl_strerror_r = no; then
19458     HAVE_DECL_STRERROR_R=0
19459   fi
19460
19461   if test $ac_cv_func_strerror_r = yes; then
19462     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19463       if test $gl_cv_func_strerror_r_posix_signature = yes; then
19464         case "$gl_cv_func_strerror_r_works" in
19465                     *no) REPLACE_STRERROR_R=1 ;;
19466         esac
19467       else
19468                 REPLACE_STRERROR_R=1
19469       fi
19470     else
19471                   REPLACE_STRERROR_R=1
19472     fi
19473   fi
19474
19475
19476
19477 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
19478 if test "x$ac_cv_have_decl_snprintf" = xyes
19479 then :
19480   ac_have_decl=1
19481 else
19482   ac_have_decl=0
19483 fi
19484
19485 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495    if false; then
19496   GL_COND_LIBTOOL_TRUE=
19497   GL_COND_LIBTOOL_FALSE='#'
19498 else
19499   GL_COND_LIBTOOL_TRUE='#'
19500   GL_COND_LIBTOOL_FALSE=
19501 fi
19502
19503   gl_cond_libtool=false
19504   gl_libdeps=
19505   gl_ltlibdeps=
19506   gl_m4_base='m4'
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516   gl_source_base='lib'
19517
19518
19519   if test $ac_cv_func_alloca_works = no; then
19520     :
19521   fi
19522
19523   # Define an additional variable used in the Makefile substitution.
19524   if test $ac_cv_working_alloca_h = yes; then
19525     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19526 printf %s "checking for alloca as a compiler built-in... " >&6; }
19527 if test ${gl_cv_rpl_alloca+y}
19528 then :
19529   printf %s "(cached) " >&6
19530 else
19531
19532       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19533 /* end confdefs.h.  */
19534
19535 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
19536         Need own alloca
19537 #endif
19538
19539 _ACEOF
19540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19541   $EGREP "Need own alloca" >/dev/null 2>&1
19542 then :
19543   gl_cv_rpl_alloca=yes
19544 else
19545   gl_cv_rpl_alloca=no
19546 fi
19547 rm -rf conftest*
19548
19549
19550 fi
19551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19552 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
19553     if test $gl_cv_rpl_alloca = yes; then
19554
19555 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
19556
19557       ALLOCA_H=alloca.h
19558     else
19559                   ALLOCA_H=
19560     fi
19561   else
19562     ALLOCA_H=alloca.h
19563   fi
19564
19565    if test -n "$ALLOCA_H"; then
19566   GL_GENERATE_ALLOCA_H_TRUE=
19567   GL_GENERATE_ALLOCA_H_FALSE='#'
19568 else
19569   GL_GENERATE_ALLOCA_H_TRUE='#'
19570   GL_GENERATE_ALLOCA_H_FALSE=
19571 fi
19572
19573
19574
19575
19576
19577
19578
19579
19580   if test $ac_cv_func_btowc = no; then
19581     HAVE_BTOWC=0
19582   else
19583
19584
19585
19586
19587         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
19588 printf %s "checking whether btowc(0) is correct... " >&6; }
19589 if test ${gl_cv_func_btowc_nul+y}
19590 then :
19591   printf %s "(cached) " >&6
19592 else
19593
19594         if test "$cross_compiling" = yes
19595 then :
19596
19597            case "$host_os" in
19598                       # Guess no on Cygwin.
19599              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
19600                       # Guess yes on native Windows.
19601              mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
19602                       # Guess yes otherwise.
19603              *)       gl_cv_func_btowc_nul="guessing yes" ;;
19604            esac
19605
19606 else
19607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19608 /* end confdefs.h.  */
19609
19610 #include <string.h>
19611 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19612    <wchar.h>.
19613    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19614    included before <wchar.h>.  */
19615 #include <stddef.h>
19616 #include <stdio.h>
19617 #include <time.h>
19618 #include <wchar.h>
19619 int main ()
19620 {
19621   if (btowc ('\0') != 0)
19622     return 1;
19623   return 0;
19624 }
19625 _ACEOF
19626 if ac_fn_c_try_run "$LINENO"
19627 then :
19628   gl_cv_func_btowc_nul=yes
19629 else
19630   gl_cv_func_btowc_nul=no
19631 fi
19632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19633   conftest.$ac_objext conftest.beam conftest.$ac_ext
19634 fi
19635
19636
19637 fi
19638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
19639 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
19640
19641         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
19642 printf %s "checking whether btowc(EOF) is correct... " >&6; }
19643 if test ${gl_cv_func_btowc_eof+y}
19644 then :
19645   printf %s "(cached) " >&6
19646 else
19647
19648                         case "$host_os" in
19649                   # Guess no on IRIX.
19650           irix*)  gl_cv_func_btowc_eof="guessing no" ;;
19651                   # Guess yes on native Windows.
19652           mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
19653                   # Guess yes otherwise.
19654           *)      gl_cv_func_btowc_eof="guessing yes" ;;
19655         esac
19656         if test $LOCALE_FR != none; then
19657           if test "$cross_compiling" = yes
19658 then :
19659   :
19660 else
19661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19662 /* end confdefs.h.  */
19663
19664 #include <locale.h>
19665 #include <string.h>
19666 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19667    <wchar.h>.
19668    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19669    included before <wchar.h>.  */
19670 #include <stddef.h>
19671 #include <stdio.h>
19672 #include <time.h>
19673 #include <wchar.h>
19674 int main ()
19675 {
19676   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19677     {
19678       if (btowc (EOF) != WEOF)
19679         return 1;
19680     }
19681   return 0;
19682 }
19683 _ACEOF
19684 if ac_fn_c_try_run "$LINENO"
19685 then :
19686   gl_cv_func_btowc_eof=yes
19687 else
19688   gl_cv_func_btowc_eof=no
19689 fi
19690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19691   conftest.$ac_objext conftest.beam conftest.$ac_ext
19692 fi
19693
19694         fi
19695
19696 fi
19697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
19698 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
19699
19700     case "$gl_cv_func_btowc_nul" in
19701       *yes) ;;
19702       *) REPLACE_BTOWC=1 ;;
19703     esac
19704     case "$gl_cv_func_btowc_eof" in
19705       *yes) ;;
19706       *) REPLACE_BTOWC=1 ;;
19707     esac
19708   fi
19709
19710   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
19711
19712
19713
19714
19715
19716
19717
19718
19719   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
19720
19721
19722   :
19723
19724   fi
19725
19726
19727
19728
19729
19730           GNULIB_BTOWC=1
19731
19732
19733
19734
19735
19736 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
19737
19738
19739
19740
19741   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
19742 printf %s "checking for __builtin_expect... " >&6; }
19743 if test ${gl_cv___builtin_expect+y}
19744 then :
19745   printf %s "(cached) " >&6
19746 else
19747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19748 /* end confdefs.h.  */
19749
19750          int
19751          main (int argc, char **argv)
19752          {
19753            argc = __builtin_expect (argc, 100);
19754            return argv[argc != 100][0];
19755          }
19756 _ACEOF
19757 if ac_fn_c_try_link "$LINENO"
19758 then :
19759   gl_cv___builtin_expect=yes
19760 else
19761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19762 /* end confdefs.h.  */
19763
19764              #include <builtins.h>
19765              int
19766              main (int argc, char **argv)
19767              {
19768                argc = __builtin_expect (argc, 100);
19769                return argv[argc != 100][0];
19770              }
19771 _ACEOF
19772 if ac_fn_c_try_link "$LINENO"
19773 then :
19774   gl_cv___builtin_expect="in <builtins.h>"
19775 else
19776   gl_cv___builtin_expect=no
19777 fi
19778 rm -f core conftest.err conftest.$ac_objext \
19779     conftest$ac_exeext conftest.$ac_ext
19780 fi
19781 rm -f core conftest.err conftest.$ac_objext \
19782     conftest$ac_exeext conftest.$ac_ext
19783 fi
19784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
19785 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
19786   if test "$gl_cv___builtin_expect" = yes; then
19787     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
19788
19789   elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
19790     printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
19791
19792   fi
19793
19794
19795
19796
19797
19798
19799    # for STACK_DIRECTION
19800
19801
19802
19803    ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
19804 "
19805 if test "x$ac_cv_have_decl_sigaltstack" = xyes
19806 then :
19807   ac_have_decl=1
19808 else
19809   ac_have_decl=0
19810 fi
19811
19812 printf "%s\n" "#define HAVE_DECL_SIGALTSTACK $ac_have_decl" >>confdefs.h
19813
19814
19815
19816
19817    ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
19818 "
19819 if test "x$ac_cv_type_stack_t" = xyes
19820 then :
19821
19822 printf "%s\n" "#define HAVE_STACK_T 1" >>confdefs.h
19823
19824
19825 fi
19826
19827
19828       if test "$gl_cv_lib_sigsegv" = yes \
19829        && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
19830      LIBCSTACK=$LIBSIGSEGV
19831
19832      LTLIBCSTACK=$LTLIBSIGSEGV
19833
19834    fi
19835
19836
19837
19838
19839
19840
19841   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19842   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
19843
19844   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
19845   # programs in the package would end up linked with that potentially-shared
19846   # library, inducing unnecessary run-time overhead.
19847   LIB_CLOCK_GETTIME=
19848
19849   gl_saved_libs=$LIBS
19850     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19851 printf %s "checking for library containing clock_gettime... " >&6; }
19852 if test ${ac_cv_search_clock_gettime+y}
19853 then :
19854   printf %s "(cached) " >&6
19855 else
19856   ac_func_search_save_LIBS=$LIBS
19857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19858 /* end confdefs.h.  */
19859
19860 /* Override any GCC internal prototype to avoid an error.
19861    Use char because int might match the return type of a GCC
19862    builtin and then its argument prototype would still apply.  */
19863 #ifdef __cplusplus
19864 extern "C"
19865 #endif
19866 char clock_gettime ();
19867 int
19868 main (void)
19869 {
19870 return clock_gettime ();
19871   ;
19872   return 0;
19873 }
19874 _ACEOF
19875 for ac_lib in '' rt posix4
19876 do
19877   if test -z "$ac_lib"; then
19878     ac_res="none required"
19879   else
19880     ac_res=-l$ac_lib
19881     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19882   fi
19883   if ac_fn_c_try_link "$LINENO"
19884 then :
19885   ac_cv_search_clock_gettime=$ac_res
19886 fi
19887 rm -f core conftest.err conftest.$ac_objext \
19888     conftest$ac_exeext
19889   if test ${ac_cv_search_clock_gettime+y}
19890 then :
19891   break
19892 fi
19893 done
19894 if test ${ac_cv_search_clock_gettime+y}
19895 then :
19896
19897 else
19898   ac_cv_search_clock_gettime=no
19899 fi
19900 rm conftest.$ac_ext
19901 LIBS=$ac_func_search_save_LIBS
19902 fi
19903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19904 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
19905 ac_res=$ac_cv_search_clock_gettime
19906 if test "$ac_res" != no
19907 then :
19908   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19909   test "$ac_cv_search_clock_gettime" = "none required" ||
19910                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19911 fi
19912
19913     ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
19914 if test "x$ac_cv_func_clock_gettime" = xyes
19915 then :
19916   printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
19917
19918 fi
19919 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
19920 if test "x$ac_cv_func_clock_settime" = xyes
19921 then :
19922   printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
19923
19924 fi
19925
19926   LIBS=$gl_saved_libs
19927
19928
19929
19930 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
19931
19932
19933
19934
19935
19936
19937     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19938       REPLACE_CLOSE=1
19939     fi
19940
19941
19942
19943
19944
19945
19946   if test $ac_cv_header_sys_socket_h != yes; then
19947                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19948 if test "x$ac_cv_header_winsock2_h" = xyes
19949 then :
19950   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19951
19952 fi
19953
19954   fi
19955   if test "$ac_cv_header_winsock2_h" = yes; then
19956     HAVE_WINSOCK2_H=1
19957     UNISTD_H_HAVE_WINSOCK2_H=1
19958     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19959   else
19960     HAVE_WINSOCK2_H=0
19961   fi
19962
19963
19964     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19965                         REPLACE_CLOSE=1
19966     fi
19967
19968
19969
19970   if test $REPLACE_CLOSE = 1; then
19971
19972
19973
19974
19975
19976
19977
19978
19979   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19980
19981   fi
19982
19983
19984
19985
19986
19987           GNULIB_CLOSE=1
19988
19989
19990
19991
19992
19993 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009      if test $gl_cv_have_include_next = yes; then
20010        gl_cv_next_ctype_h='<'ctype.h'>'
20011      else
20012        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
20013 printf %s "checking absolute name of <ctype.h>... " >&6; }
20014 if test ${gl_cv_next_ctype_h+y}
20015 then :
20016   printf %s "(cached) " >&6
20017 else
20018
20019
20020
20021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20022 /* end confdefs.h.  */
20023 #include <ctype.h>
20024 _ACEOF
20025                 case "$host_os" in
20026     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20027     *)    gl_absname_cpp="$ac_cpp" ;;
20028   esac
20029
20030   case "$host_os" in
20031     mingw*)
20032                                           gl_dirsep_regex='[/\\]'
20033       ;;
20034     *)
20035       gl_dirsep_regex='\/'
20036       ;;
20037   esac
20038       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20039   gl_header_literal_regex=`echo 'ctype.h' \
20040                            | sed -e "$gl_make_literal_regex_sed"`
20041   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20042       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20043       s|^/[^/]|//&|
20044       p
20045       q
20046     }'
20047
20048         gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20049   sed -n "$gl_absolute_header_sed"`
20050
20051            gl_header=$gl_cv_absolute_ctype_h
20052            gl_cv_next_ctype_h='"'$gl_header'"'
20053
20054
20055 fi
20056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
20057 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
20058      fi
20059      NEXT_CTYPE_H=$gl_cv_next_ctype_h
20060
20061      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20062        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20063        gl_next_as_first_directive='<'ctype.h'>'
20064      else
20065        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20066        gl_next_as_first_directive=$gl_cv_next_ctype_h
20067      fi
20068      NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
20084
20085
20086
20087
20088
20089
20090
20091
20092   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20093 printf %s "checking whether // is distinct from /... " >&6; }
20094 if test ${gl_cv_double_slash_root+y}
20095 then :
20096   printf %s "(cached) " >&6
20097 else
20098    if test x"$cross_compiling" = xyes ; then
20099         # When cross-compiling, there is no way to tell whether // is special
20100         # short of a list of hosts.  However, the only known hosts to date
20101         # that have a distinct // are Apollo DomainOS (too old to port to),
20102         # Cygwin, and z/OS.  If anyone knows of another system for which // has
20103         # special semantics and is distinct from /, please report it to
20104         # <bug-gnulib@gnu.org>.
20105         case $host in
20106           *-cygwin | i370-ibm-openedition)
20107             gl_cv_double_slash_root=yes ;;
20108           *)
20109             # Be optimistic and assume that / and // are the same when we
20110             # don't know.
20111             gl_cv_double_slash_root='unknown, assuming no' ;;
20112         esac
20113       else
20114         set x `ls -di / // 2>/dev/null`
20115         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20116           gl_cv_double_slash_root=no
20117         else
20118           gl_cv_double_slash_root=yes
20119         fi
20120       fi
20121 fi
20122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20123 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
20124   if test "$gl_cv_double_slash_root" = yes; then
20125
20126 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20127
20128   fi
20129
20130
20131
20132
20133
20134
20135 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
20136
20137
20138   if test $HAVE_DUP2 = 1; then
20139     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20140 printf %s "checking whether dup2 works... " >&6; }
20141 if test ${gl_cv_func_dup2_works+y}
20142 then :
20143   printf %s "(cached) " >&6
20144 else
20145   if test "$cross_compiling" = yes
20146 then :
20147   case "$host_os" in
20148            mingw*) # on this platform, dup2 always returns 0 for success
20149              gl_cv_func_dup2_works="guessing no" ;;
20150            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20151              gl_cv_func_dup2_works="guessing no" ;;
20152            aix* | freebsd*)
20153                    # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
20154                    # not EBADF.
20155              gl_cv_func_dup2_works="guessing no" ;;
20156            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20157              gl_cv_func_dup2_works="guessing no" ;;
20158            *-android*) # implemented using dup3(), which fails if oldfd == newfd
20159              gl_cv_func_dup2_works="guessing no" ;;
20160            os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
20161              gl_cv_func_dup2_works="guessing no" ;;
20162            *) gl_cv_func_dup2_works="guessing yes" ;;
20163          esac
20164 else
20165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20166 /* end confdefs.h.  */
20167
20168          #include <errno.h>
20169              #include <fcntl.h>
20170              #include <limits.h>
20171              #include <sys/resource.h>
20172              #include <unistd.h>
20173              #ifndef RLIM_SAVED_CUR
20174              # define RLIM_SAVED_CUR RLIM_INFINITY
20175              #endif
20176              #ifndef RLIM_SAVED_MAX
20177              # define RLIM_SAVED_MAX RLIM_INFINITY
20178              #endif
20179
20180 int
20181 main (void)
20182 {
20183 int result = 0;
20184              int bad_fd = INT_MAX;
20185              struct rlimit rlim;
20186              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20187                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20188                  && rlim.rlim_cur != RLIM_INFINITY
20189                  && rlim.rlim_cur != RLIM_SAVED_MAX
20190                  && rlim.rlim_cur != RLIM_SAVED_CUR)
20191                bad_fd = rlim.rlim_cur;
20192              #ifdef FD_CLOEXEC
20193                if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20194                  result |= 1;
20195              #endif
20196              if (dup2 (1, 1) != 1)
20197                result |= 2;
20198              #ifdef FD_CLOEXEC
20199                if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20200                  result |= 4;
20201              #endif
20202              close (0);
20203              if (dup2 (0, 0) != -1)
20204                result |= 8;
20205              /* Many gnulib modules require POSIX conformance of EBADF.  */
20206              if (dup2 (2, bad_fd) == -1 && errno != EBADF)
20207                result |= 16;
20208              /* Flush out some cygwin core dumps.  */
20209              if (dup2 (2, -1) != -1 || errno != EBADF)
20210                result |= 32;
20211              dup2 (2, 255);
20212              dup2 (2, 256);
20213              /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
20214              {
20215                int fd = open (".", O_RDONLY);
20216                if (fd == -1)
20217                  result |= 64;
20218                else if (dup2 (fd, fd + 1) == -1)
20219                  result |= 128;
20220
20221                close (fd);
20222              }
20223              return result;
20224   ;
20225   return 0;
20226 }
20227
20228 _ACEOF
20229 if ac_fn_c_try_run "$LINENO"
20230 then :
20231   gl_cv_func_dup2_works=yes
20232 else
20233   gl_cv_func_dup2_works=no
20234 fi
20235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20236   conftest.$ac_objext conftest.beam conftest.$ac_ext
20237 fi
20238
20239
20240 fi
20241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20242 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
20243     case "$gl_cv_func_dup2_works" in
20244       *yes) ;;
20245       *)
20246         REPLACE_DUP2=1
20247         ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
20248 if test "x$ac_cv_func_setdtablesize" = xyes
20249 then :
20250   printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
20251
20252 fi
20253
20254         ;;
20255     esac
20256   fi
20257
20258
20259   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20260
20261
20262
20263
20264
20265
20266
20267
20268   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20269
20270
20271   fi
20272
20273
20274
20275
20276
20277           GNULIB_DUP2=1
20278
20279
20280
20281
20282
20283 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293           GNULIB_ENVIRON=1
20294
20295
20296
20297
20298
20299 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
20300
20301
20302
20303
20304
20305       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20306 printf %s "checking for error_at_line... " >&6; }
20307 if test ${ac_cv_lib_error_at_line+y}
20308 then :
20309   printf %s "(cached) " >&6
20310 else
20311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20312 /* end confdefs.h.  */
20313 #include <error.h>
20314 int
20315 main (void)
20316 {
20317 error_at_line (0, 0, "", 0, "an error occurred");
20318   ;
20319   return 0;
20320 }
20321 _ACEOF
20322 if ac_fn_c_try_link "$LINENO"
20323 then :
20324   ac_cv_lib_error_at_line=yes
20325 else
20326   ac_cv_lib_error_at_line=no
20327 fi
20328 rm -f core conftest.err conftest.$ac_objext \
20329     conftest$ac_exeext conftest.$ac_ext
20330 fi
20331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20332 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
20333
20334   if test $ac_cv_lib_error_at_line = no; then
20335
20336
20337
20338
20339
20340
20341
20342
20343   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
20344
20345
20346
20347   :
20348
20349   fi
20350
20351
20352   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
20353
20354
20355
20356   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
20357
20358
20359
20360
20361
20362
20363
20364   if test $ac_cv_func_fcntl = no; then
20365
20366
20367
20368   if test $ac_cv_func_fcntl = no; then
20369     HAVE_FCNTL=0
20370   else
20371     REPLACE_FCNTL=1
20372   fi
20373
20374   else
20375             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20376 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20377 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
20378 then :
20379   printf %s "(cached) " >&6
20380 else
20381   if test "$cross_compiling" = yes
20382 then :
20383   case $host_os in
20384             aix* | cygwin* | haiku*)
20385                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
20386             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
20387           esac
20388 else
20389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20390 /* end confdefs.h.  */
20391 #include <errno.h>
20392               #include <fcntl.h>
20393               #include <limits.h>
20394               #include <sys/resource.h>
20395               #include <unistd.h>
20396               #ifndef RLIM_SAVED_CUR
20397               # define RLIM_SAVED_CUR RLIM_INFINITY
20398               #endif
20399               #ifndef RLIM_SAVED_MAX
20400               # define RLIM_SAVED_MAX RLIM_INFINITY
20401               #endif
20402
20403 int
20404 main (void)
20405 {
20406 int result = 0;
20407               int bad_fd = INT_MAX;
20408               struct rlimit rlim;
20409               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20410                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20411                   && rlim.rlim_cur != RLIM_INFINITY
20412                   && rlim.rlim_cur != RLIM_SAVED_MAX
20413                   && rlim.rlim_cur != RLIM_SAVED_CUR)
20414                 bad_fd = rlim.rlim_cur;
20415               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
20416               if (errno != EINVAL) result |= 2;
20417               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
20418               if (errno != EINVAL) result |= 8;
20419               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
20420               {
20421                 int fd;
20422                 fd = open (".", O_RDONLY);
20423                 if (fd == -1)
20424                   result |= 16;
20425                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
20426                   result |= 32;
20427
20428                 close (fd);
20429               }
20430               return result;
20431   ;
20432   return 0;
20433 }
20434 _ACEOF
20435 if ac_fn_c_try_run "$LINENO"
20436 then :
20437   gl_cv_func_fcntl_f_dupfd_works=yes
20438 else
20439   gl_cv_func_fcntl_f_dupfd_works=no
20440 fi
20441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20442   conftest.$ac_objext conftest.beam conftest.$ac_ext
20443 fi
20444
20445 fi
20446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20447 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20448     case $gl_cv_func_fcntl_f_dupfd_works in
20449       *yes) ;;
20450       *)
20451
20452
20453   if test $ac_cv_func_fcntl = no; then
20454     HAVE_FCNTL=0
20455   else
20456     REPLACE_FCNTL=1
20457   fi
20458
20459
20460 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20461  ;;
20462     esac
20463
20464         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20465 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20466 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
20467 then :
20468   printf %s "(cached) " >&6
20469 else
20470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471 /* end confdefs.h.  */
20472
20473 #include <fcntl.h>
20474 #ifndef F_DUPFD_CLOEXEC
20475 choke me
20476 #endif
20477
20478 int
20479 main (void)
20480 {
20481
20482   ;
20483   return 0;
20484 }
20485 _ACEOF
20486 if ac_fn_c_try_compile "$LINENO"
20487 then :
20488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20489 /* end confdefs.h.  */
20490
20491 #ifdef __linux__
20492 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20493    it to support the semantics on older kernels that failed with EINVAL.  */
20494 choke me
20495 #endif
20496
20497 int
20498 main (void)
20499 {
20500
20501   ;
20502   return 0;
20503 }
20504 _ACEOF
20505 if ac_fn_c_try_compile "$LINENO"
20506 then :
20507   gl_cv_func_fcntl_f_dupfd_cloexec=yes
20508 else
20509   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20510 fi
20511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20512 else
20513   gl_cv_func_fcntl_f_dupfd_cloexec=no
20514 fi
20515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20516 fi
20517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20518 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20519     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20520
20521
20522
20523   if test $ac_cv_func_fcntl = no; then
20524     HAVE_FCNTL=0
20525   else
20526     REPLACE_FCNTL=1
20527   fi
20528
20529           fi
20530   fi
20531
20532
20533   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20534
20535
20536
20537
20538
20539
20540
20541
20542   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20543
20544   fi
20545
20546
20547
20548
20549
20550           GNULIB_FCNTL=1
20551
20552
20553
20554
20555
20556 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571      if test $gl_cv_have_include_next = yes; then
20572        gl_cv_next_fcntl_h='<'fcntl.h'>'
20573      else
20574        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20575 printf %s "checking absolute name of <fcntl.h>... " >&6; }
20576 if test ${gl_cv_next_fcntl_h+y}
20577 then :
20578   printf %s "(cached) " >&6
20579 else
20580
20581
20582
20583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20584 /* end confdefs.h.  */
20585 #include <fcntl.h>
20586 _ACEOF
20587                 case "$host_os" in
20588     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20589     *)    gl_absname_cpp="$ac_cpp" ;;
20590   esac
20591
20592   case "$host_os" in
20593     mingw*)
20594                                           gl_dirsep_regex='[/\\]'
20595       ;;
20596     *)
20597       gl_dirsep_regex='\/'
20598       ;;
20599   esac
20600       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20601   gl_header_literal_regex=`echo 'fcntl.h' \
20602                            | sed -e "$gl_make_literal_regex_sed"`
20603   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20604       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20605       s|^/[^/]|//&|
20606       p
20607       q
20608     }'
20609
20610         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20611   sed -n "$gl_absolute_header_sed"`
20612
20613            gl_header=$gl_cv_absolute_fcntl_h
20614            gl_cv_next_fcntl_h='"'$gl_header'"'
20615
20616
20617 fi
20618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20619 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
20620      fi
20621      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20622
20623      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20624        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20625        gl_next_as_first_directive='<'fcntl.h'>'
20626      else
20627        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20628        gl_next_as_first_directive=$gl_cv_next_fcntl_h
20629      fi
20630      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
20650
20651
20652
20653
20654
20655
20656   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
20657 printf %s "checking for flexible array member... " >&6; }
20658 if test ${ac_cv_c_flexmember+y}
20659 then :
20660   printf %s "(cached) " >&6
20661 else
20662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20663 /* end confdefs.h.  */
20664 #include <stdlib.h>
20665             #include <stdio.h>
20666             #include <stddef.h>
20667             struct m { struct m *next, **list; char name[]; };
20668             struct s { struct s *p; struct m *m; int n; double d[]; };
20669 int
20670 main (void)
20671 {
20672 int m = getchar ();
20673             size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
20674             nbytes += sizeof (struct s) - 1;
20675             nbytes -= nbytes % sizeof (struct s);
20676             struct s *p = malloc (nbytes);
20677             p->p = p;
20678             p->m = NULL;
20679             p->d[0] = 0.0;
20680             return p->d != (double *) NULL;
20681   ;
20682   return 0;
20683 }
20684 _ACEOF
20685 if ac_fn_c_try_compile "$LINENO"
20686 then :
20687   ac_cv_c_flexmember=yes
20688 else
20689   ac_cv_c_flexmember=no
20690 fi
20691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20692 fi
20693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
20694 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
20695   if test $ac_cv_c_flexmember = yes; then
20696
20697 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
20698
20699   else
20700     printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
20701
20702   fi
20703
20704
20705
20706
20707   FLOAT_H=
20708   REPLACE_FLOAT_LDBL=0
20709   case "$host_os" in
20710     aix* | beos* | openbsd* | mirbsd* | irix*)
20711       FLOAT_H=float.h
20712       ;;
20713     freebsd* | dragonfly*)
20714       case "$host_cpu" in
20715         i[34567]86 )
20716           FLOAT_H=float.h
20717           ;;
20718         x86_64 )
20719           # On x86_64 systems, the C compiler may still be generating
20720           # 32-bit code.
20721           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h.  */
20723 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20724                   int ok;
20725                  #else
20726                   error fail
20727                  #endif
20728
20729 _ACEOF
20730 if ac_fn_c_try_compile "$LINENO"
20731 then :
20732
20733 else
20734   FLOAT_H=float.h
20735 fi
20736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20737           ;;
20738       esac
20739       ;;
20740     linux*)
20741       case "$host_cpu" in
20742         powerpc*)
20743           FLOAT_H=float.h
20744           ;;
20745       esac
20746       ;;
20747   esac
20748   case "$host_os" in
20749     aix* | freebsd* | dragonfly* | linux*)
20750       if test -n "$FLOAT_H"; then
20751         REPLACE_FLOAT_LDBL=1
20752       fi
20753       ;;
20754   esac
20755
20756     REPLACE_ITOLD=0
20757   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20758 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
20759 if test ${gl_cv_func_itold_works+y}
20760 then :
20761   printf %s "(cached) " >&6
20762 else
20763
20764       if test "$cross_compiling" = yes
20765 then :
20766   case "$host" in
20767            sparc*-*-linux*)
20768              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769 /* end confdefs.h.  */
20770 #if defined __LP64__ || defined __arch64__
20771                     int ok;
20772                    #else
20773                     error fail
20774                    #endif
20775
20776 _ACEOF
20777 if ac_fn_c_try_compile "$LINENO"
20778 then :
20779   gl_cv_func_itold_works="guessing no"
20780 else
20781   gl_cv_func_itold_works="guessing yes"
20782 fi
20783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20784              ;;
20785                    # Guess yes on native Windows.
20786            mingw*) gl_cv_func_itold_works="guessing yes" ;;
20787            *)      gl_cv_func_itold_works="guessing yes" ;;
20788          esac
20789
20790 else
20791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20792 /* end confdefs.h.  */
20793
20794 int i = -1;
20795 volatile long double ld;
20796 int main ()
20797 {
20798   ld += i * 1.0L;
20799   if (ld > 0)
20800     return 1;
20801   return 0;
20802 }
20803 _ACEOF
20804 if ac_fn_c_try_run "$LINENO"
20805 then :
20806   gl_cv_func_itold_works=yes
20807 else
20808   gl_cv_func_itold_works=no
20809 fi
20810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20811   conftest.$ac_objext conftest.beam conftest.$ac_ext
20812 fi
20813
20814
20815 fi
20816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20817 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
20818   case "$gl_cv_func_itold_works" in
20819     *no)
20820       REPLACE_ITOLD=1
20821                   FLOAT_H=float.h
20822       ;;
20823   esac
20824
20825   if test -n "$FLOAT_H"; then
20826
20827
20828
20829
20830
20831
20832
20833
20834      if test $gl_cv_have_include_next = yes; then
20835        gl_cv_next_float_h='<'float.h'>'
20836      else
20837        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20838 printf %s "checking absolute name of <float.h>... " >&6; }
20839 if test ${gl_cv_next_float_h+y}
20840 then :
20841   printf %s "(cached) " >&6
20842 else
20843
20844
20845
20846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847 /* end confdefs.h.  */
20848 #include <float.h>
20849 _ACEOF
20850                 case "$host_os" in
20851     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20852     *)    gl_absname_cpp="$ac_cpp" ;;
20853   esac
20854
20855   case "$host_os" in
20856     mingw*)
20857                                           gl_dirsep_regex='[/\\]'
20858       ;;
20859     *)
20860       gl_dirsep_regex='\/'
20861       ;;
20862   esac
20863       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20864   gl_header_literal_regex=`echo 'float.h' \
20865                            | sed -e "$gl_make_literal_regex_sed"`
20866   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20867       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20868       s|^/[^/]|//&|
20869       p
20870       q
20871     }'
20872
20873         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20874   sed -n "$gl_absolute_header_sed"`
20875
20876            gl_header=$gl_cv_absolute_float_h
20877            gl_cv_next_float_h='"'$gl_header'"'
20878
20879
20880 fi
20881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20882 printf "%s\n" "$gl_cv_next_float_h" >&6; }
20883      fi
20884      NEXT_FLOAT_H=$gl_cv_next_float_h
20885
20886      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20887        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20888        gl_next_as_first_directive='<'float.h'>'
20889      else
20890        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20891        gl_next_as_first_directive=$gl_cv_next_float_h
20892      fi
20893      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20894
20895
20896
20897
20898   fi
20899
20900    if test -n "$FLOAT_H"; then
20901   GL_GENERATE_FLOAT_H_TRUE=
20902   GL_GENERATE_FLOAT_H_FALSE='#'
20903 else
20904   GL_GENERATE_FLOAT_H_TRUE='#'
20905   GL_GENERATE_FLOAT_H_FALSE=
20906 fi
20907
20908
20909
20910   if test $REPLACE_FLOAT_LDBL = 1; then
20911
20912
20913
20914
20915
20916
20917
20918
20919   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20920
20921   fi
20922   if test $REPLACE_ITOLD = 1; then
20923
20924
20925
20926
20927
20928
20929
20930
20931   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20932
20933   fi
20934
20935
20936
20937
20938   gl_fnmatch_required_lowercase=`
20939     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20940   `
20941
20942   if test $ac_cv_func_fnmatch = no; then
20943     HAVE_FNMATCH=0
20944   else
20945     gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20946     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20947 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20948 if eval test \${$gl_fnmatch_cache_var+y}
20949 then :
20950   printf %s "(cached) " >&6
20951 else
20952                                      if test $gl_fnmatch_required = GNU; then
20953          gl_fnmatch_gnu_start=
20954          gl_fnmatch_gnu_end=
20955        else
20956          gl_fnmatch_gnu_start='#if 0'
20957          gl_fnmatch_gnu_end='#endif'
20958        fi
20959        if test "$cross_compiling" = yes
20960 then :
20961   eval "$gl_fnmatch_cache_var=\"guessing no\""
20962 else
20963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20964 /* end confdefs.h.  */
20965 #include <fnmatch.h>
20966               static int
20967               y (char const *pattern, char const *string, int flags)
20968               {
20969                 return fnmatch (pattern, string, flags) == 0;
20970               }
20971               static int
20972               n (char const *pattern, char const *string, int flags)
20973               {
20974                 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20975               }
20976
20977 int
20978 main (void)
20979 {
20980 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20981               char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20982               static char const A_1[] = { 'A' - 1, 0 };
20983               static char const A01[] = { 'A' + 1, 0 };
20984               static char const a_1[] = { 'a' - 1, 0 };
20985               static char const a01[] = { 'a' + 1, 0 };
20986               static char const bs_1[] = { '\\\\' - 1, 0 };
20987               static char const bs01[] = { '\\\\' + 1, 0 };
20988               int result = 0;
20989               if (!n ("a*", "", 0))
20990                 return 1;
20991               if (!y ("a*", "abc", 0))
20992                 return 1;
20993               if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20994                 return 1;
20995               if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20996                 return 2;
20997               if (!y ("a\\\\bc", "abc", 0))
20998                 return 3;
20999               if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
21000                 return 3;
21001               if (!y ("*x", ".x", 0))
21002                 return 4;
21003               if (!n ("*x", ".x", FNM_PERIOD))
21004                 return 4;
21005               if (!y (Apat, "\\\\", 0))
21006                 return 5;
21007               if (!y (Apat, "A", 0))
21008                 return 5;
21009               if (!y (apat, "\\\\", 0))
21010                 return 5;
21011               if (!y (apat, "a", 0))
21012                 return 5;
21013               if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
21014                 return 5;
21015               if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
21016                 return 5;
21017               if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
21018                 return 5;
21019               if (!(y (apat, a01, 0) == ('a' < '\\\\')))
21020                 return 5;
21021               if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
21022                 return 5;
21023               if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
21024                 return 5;
21025               if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
21026                 return 5;
21027               if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
21028                 return 5;
21029               $gl_fnmatch_gnu_start
21030               if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
21031                 result |= 8;
21032               if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
21033                 result |= 16;
21034               if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
21035                 result |= 32;
21036               if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
21037                 result |= 64;
21038               if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
21039                 result |= 64;
21040               if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
21041                 result |= 64;
21042               $gl_fnmatch_gnu_end
21043               return result;
21044
21045   ;
21046   return 0;
21047 }
21048 _ACEOF
21049 if ac_fn_c_try_run "$LINENO"
21050 then :
21051   eval "$gl_fnmatch_cache_var=yes"
21052 else
21053   eval "$gl_fnmatch_cache_var=no"
21054 fi
21055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21056   conftest.$ac_objext conftest.beam conftest.$ac_ext
21057 fi
21058
21059
21060 fi
21061 eval ac_res=\$$gl_fnmatch_cache_var
21062                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21063 printf "%s\n" "$ac_res" >&6; }
21064     eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
21065     if test "$gl_fnmatch_result" != yes; then
21066       REPLACE_FNMATCH=1
21067     fi
21068   fi
21069   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21070
21071
21072   FNMATCH_H='fnmatch.h'
21073    if test -n "$FNMATCH_H"; then
21074   GL_GENERATE_FNMATCH_H_TRUE=
21075   GL_GENERATE_FNMATCH_H_FALSE='#'
21076 else
21077   GL_GENERATE_FNMATCH_H_TRUE='#'
21078   GL_GENERATE_FNMATCH_H_FALSE=
21079 fi
21080
21081
21082   fi
21083
21084   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21085
21086
21087
21088
21089
21090
21091
21092
21093   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
21094
21095
21096
21097   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
21098 "
21099 if test "x$ac_cv_have_decl_isblank" = xyes
21100 then :
21101   ac_have_decl=1
21102 else
21103   ac_have_decl=0
21104 fi
21105
21106 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
21107
21108
21109
21110
21111   fi
21112
21113
21114
21115
21116
21117           GNULIB_FNMATCH=1
21118
21119
21120
21121
21122
21123 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
21124
21125
21126
21127
21128
21129
21130
21131
21132   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21133
21134
21135
21136
21137
21138
21139
21140
21141   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
21142
21143
21144
21145   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
21146 "
21147 if test "x$ac_cv_have_decl_isblank" = xyes
21148 then :
21149   ac_have_decl=1
21150 else
21151   ac_have_decl=0
21152 fi
21153
21154 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
21155
21156
21157
21158
21159   fi
21160
21161
21162 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
21163
21164
21165
21166
21167
21168
21169   case "$host_os" in
21170     mingw* | pw* | os2*)
21171       REPLACE_FREOPEN=1
21172       ;;
21173     *)
21174       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
21175 printf %s "checking whether freopen works on closed fds... " >&6; }
21176 if test ${gl_cv_func_freopen_works_on_closed+y}
21177 then :
21178   printf %s "(cached) " >&6
21179 else
21180   if test "$cross_compiling" = yes
21181 then :
21182   case $host_os in
21183               *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
21184               *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
21185             esac
21186 else
21187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21188 /* end confdefs.h.  */
21189 #include <stdio.h>
21190                 #include <unistd.h>
21191
21192 int
21193 main (void)
21194 {
21195 close (0);
21196                 return !(freopen ("/dev/null", "r", stdin)
21197                          && getchar () == EOF
21198                          && !ferror (stdin) && feof (stdin));
21199   ;
21200   return 0;
21201 }
21202 _ACEOF
21203 if ac_fn_c_try_run "$LINENO"
21204 then :
21205   gl_cv_func_freopen_works_on_closed=yes
21206 else
21207   gl_cv_func_freopen_works_on_closed=no
21208 fi
21209 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21210   conftest.$ac_objext conftest.beam conftest.$ac_ext
21211 fi
21212
21213 fi
21214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
21215 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
21216       case $gl_cv_func_freopen_works_on_closed in
21217         *no) REPLACE_FREOPEN=1;;
21218       esac
21219   esac
21220
21221   if test $REPLACE_FREOPEN = 1; then
21222
21223
21224
21225
21226
21227
21228
21229
21230   gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
21231
21232     :
21233   fi
21234
21235
21236
21237
21238
21239           GNULIB_FREOPEN=1
21240
21241
21242
21243
21244
21245 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
21246
21247
21248
21249
21250
21251 printf "%s\n" "#define GNULIB_FREOPEN_SAFER 1" >>confdefs.h
21252
21253
21254
21255
21256
21257
21258   case "$host_os" in
21259     mingw* | solaris*)
21260                         REPLACE_FSTAT=1
21261       ;;
21262   esac
21263
21264
21265
21266   if test $REPLACE_FSTAT = 1; then
21267
21268
21269
21270
21271
21272
21273
21274
21275   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21276
21277     case "$host_os" in
21278       mingw*)
21279
21280
21281
21282
21283
21284
21285
21286
21287   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
21288
21289         ;;
21290     esac
21291
21292
21293   :
21294
21295   fi
21296
21297
21298
21299
21300
21301           GNULIB_FSTAT=1
21302
21303
21304
21305
21306
21307 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21308
21309
21310
21311
21312
21313
21314
21315
21316   if test $ac_cv_func_getdtablesize = yes &&
21317      test $ac_cv_have_decl_getdtablesize = yes; then
21318     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21319 printf %s "checking whether getdtablesize works... " >&6; }
21320 if test ${gl_cv_func_getdtablesize_works+y}
21321 then :
21322   printf %s "(cached) " >&6
21323 else
21324                                                    case "$host_os" in
21325          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21326          *)
21327                                                        if test "$cross_compiling" = yes
21328 then :
21329   case "$host_os" in
21330                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21331                   gl_cv_func_getdtablesize_works="guessing no" ;;
21332                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21333               esac
21334
21335 else
21336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21337 /* end confdefs.h.  */
21338
21339              #include <unistd.h>
21340 int
21341 main (void)
21342 {
21343 int size = getdtablesize();
21344                 if (dup2 (0, getdtablesize()) != -1)
21345                   return 1;
21346                 if (size != getdtablesize())
21347                   return 2;
21348
21349   ;
21350   return 0;
21351 }
21352 _ACEOF
21353 if ac_fn_c_try_run "$LINENO"
21354 then :
21355   gl_cv_func_getdtablesize_works=yes
21356 else
21357   gl_cv_func_getdtablesize_works=no
21358 fi
21359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21360   conftest.$ac_objext conftest.beam conftest.$ac_ext
21361 fi
21362
21363            ;;
21364        esac
21365
21366 fi
21367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21368 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
21369     case "$gl_cv_func_getdtablesize_works" in
21370       *yes | "no (limitation)") ;;
21371       *) REPLACE_GETDTABLESIZE=1 ;;
21372     esac
21373   else
21374     HAVE_GETDTABLESIZE=0
21375   fi
21376
21377   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21378
21379
21380
21381
21382
21383
21384
21385
21386   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21387
21388     :
21389   fi
21390
21391
21392
21393
21394
21395           GNULIB_GETDTABLESIZE=1
21396
21397
21398
21399
21400
21401 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414     REPLACE_GETOPT=0
21415     if test -n "$gl_replace_getopt"; then
21416       REPLACE_GETOPT=1
21417     fi
21418
21419   if test $REPLACE_GETOPT = 1; then
21420
21421
21422   if test $ac_cv_header_sys_cdefs_h = yes; then
21423     HAVE_SYS_CDEFS_H=1
21424   else
21425     HAVE_SYS_CDEFS_H=0
21426   fi
21427
21428
21429
21430 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21431
21432   GETOPT_H=getopt.h
21433   GETOPT_CDEFS_H=getopt-cdefs.h
21434
21435
21436
21437   fi
21438
21439   if test $REPLACE_GETOPT = 1; then
21440
21441
21442
21443
21444
21445
21446
21447
21448   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21459
21460         GNULIB_GL_UNISTD_H_GETOPT=1
21461   fi
21462
21463
21464
21465
21466   ac_found=0
21467   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
21468 "
21469 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
21470 then :
21471   ac_have_decl=1
21472 else
21473   ac_have_decl=0
21474 fi
21475
21476 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
21477 if test $ac_have_decl = 1
21478 then :
21479   ac_found=1
21480 fi
21481
21482   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
21483 "
21484 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
21485 then :
21486   ac_have_decl=1
21487 else
21488   ac_have_decl=0
21489 fi
21490
21491 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
21492 if test $ac_have_decl = 1
21493 then :
21494   ac_found=1
21495 fi
21496
21497   ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
21498 "
21499 if test "x$ac_cv_have_decl___argv" = xyes
21500 then :
21501   ac_have_decl=1
21502 else
21503   ac_have_decl=0
21504 fi
21505
21506 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
21507 if test $ac_have_decl = 1
21508 then :
21509   ac_found=1
21510 fi
21511
21512
21513   # Incur the cost of this test only if none of the above worked.
21514   if test $ac_found = 0; then
21515     # On OpenBSD 5.1, using the global __progname variable appears to be
21516     # the only way to implement getprogname.
21517     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
21518 printf %s "checking whether __progname is defined in default libraries... " >&6; }
21519 if test ${gl_cv_var___progname+y}
21520 then :
21521   printf %s "(cached) " >&6
21522 else
21523
21524         gl_cv_var___progname=
21525         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21526 /* end confdefs.h.  */
21527 extern char *__progname;
21528 int
21529 main (void)
21530 {
21531 return *__progname;
21532
21533   ;
21534   return 0;
21535 }
21536 _ACEOF
21537 if ac_fn_c_try_link "$LINENO"
21538 then :
21539   gl_cv_var___progname=yes
21540
21541 fi
21542 rm -f core conftest.err conftest.$ac_objext \
21543     conftest$ac_exeext conftest.$ac_ext
21544
21545
21546 fi
21547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
21548 printf "%s\n" "$gl_cv_var___progname" >&6; }
21549     if test "$gl_cv_var___progname" = yes; then
21550
21551 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
21552
21553     fi
21554   fi
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570   gl_gettimeofday_timezone=void
21571   if test $ac_cv_func_gettimeofday != yes; then
21572     HAVE_GETTIMEOFDAY=0
21573   else
21574
21575
21576
21577
21578  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21579 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21580 if test ${gl_cv_func_gettimeofday_clobber+y}
21581 then :
21582   printf %s "(cached) " >&6
21583 else
21584   if test "$cross_compiling" = yes
21585 then :
21586   # When cross-compiling:
21587       case "$host_os" in
21588                        # Guess all is fine on glibc systems.
21589         *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21590                        # Guess no on native Windows.
21591         mingw*)        gl_cv_func_gettimeofday_clobber="guessing no" ;;
21592                        # If we don't know, assume the worst.
21593         *)             gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21594       esac
21595
21596 else
21597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21598 /* end confdefs.h.  */
21599 #include <string.h>
21600           #include <sys/time.h>
21601           #include <time.h>
21602           #include <stdlib.h>
21603
21604 int
21605 main (void)
21606 {
21607
21608           time_t t = 0;
21609           struct tm *lt;
21610           struct tm saved_lt;
21611           struct timeval tv;
21612           lt = localtime (&t);
21613           saved_lt = *lt;
21614           gettimeofday (&tv, NULL);
21615           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21616
21617   ;
21618   return 0;
21619 }
21620 _ACEOF
21621 if ac_fn_c_try_run "$LINENO"
21622 then :
21623   gl_cv_func_gettimeofday_clobber=no
21624 else
21625   gl_cv_func_gettimeofday_clobber=yes
21626 fi
21627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21628   conftest.$ac_objext conftest.beam conftest.$ac_ext
21629 fi
21630
21631 fi
21632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21633 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21634
21635  case "$gl_cv_func_gettimeofday_clobber" in
21636    *yes)
21637      REPLACE_GETTIMEOFDAY=1
21638
21639 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21640
21641
21642
21643
21644   NEED_LOCALTIME_BUFFER=1
21645   REPLACE_GMTIME=1
21646   REPLACE_LOCALTIME=1
21647
21648      ;;
21649  esac
21650
21651     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21652 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21653 if test ${gl_cv_func_gettimeofday_posix_signature+y}
21654 then :
21655   printf %s "(cached) " >&6
21656 else
21657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21658 /* end confdefs.h.  */
21659 #include <sys/time.h>
21660               struct timeval c;
21661               int gettimeofday (struct timeval *restrict, void *restrict);
21662
21663 int
21664 main (void)
21665 {
21666 /* glibc uses struct timezone * rather than the POSIX void *
21667                  if _GNU_SOURCE is defined.  However, since the only portable
21668                  use of gettimeofday uses NULL as the second parameter, and
21669                  since the glibc definition is actually more typesafe, it is
21670                  not worth wrapping this to get a compliant signature.  */
21671               int (*f) (struct timeval *restrict, void *restrict)
21672                 = gettimeofday;
21673               int x = f (&c, 0);
21674               return !(x | c.tv_sec | c.tv_usec);
21675
21676   ;
21677   return 0;
21678 }
21679 _ACEOF
21680 if ac_fn_c_try_compile "$LINENO"
21681 then :
21682   gl_cv_func_gettimeofday_posix_signature=yes
21683 else
21684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21685 /* end confdefs.h.  */
21686 #include <sys/time.h>
21687 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21688
21689 int
21690 main (void)
21691 {
21692
21693   ;
21694   return 0;
21695 }
21696 _ACEOF
21697 if ac_fn_c_try_compile "$LINENO"
21698 then :
21699   gl_cv_func_gettimeofday_posix_signature=almost
21700 else
21701   gl_cv_func_gettimeofday_posix_signature=no
21702 fi
21703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21704 fi
21705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21706 fi
21707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21708 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21709     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21710       gl_gettimeofday_timezone='struct timezone'
21711     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21712       REPLACE_GETTIMEOFDAY=1
21713     fi
21714         if test $REPLACE_STRUCT_TIMEVAL = 1; then
21715       REPLACE_GETTIMEOFDAY=1
21716     fi
21717             case "$host_os" in
21718       mingw*) REPLACE_GETTIMEOFDAY=1 ;;
21719     esac
21720   fi
21721
21722 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
21723
21724
21725   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21726
21727
21728
21729
21730
21731
21732
21733
21734   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21735
21736     :
21737   fi
21738
21739
21740
21741
21742
21743           GNULIB_GETTIMEOFDAY=1
21744
21745
21746
21747
21748
21749 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21750
21751
21752
21753
21754    if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
21755   GNU_MAKE_TRUE=
21756   GNU_MAKE_FALSE='#'
21757 else
21758   GNU_MAKE_TRUE='#'
21759   GNU_MAKE_FALSE=
21760 fi
21761
21762
21763   # Autoconf 2.61a.99 and earlier don't support linking a file only
21764   # in VPATH builds.  But since GNUmakefile is for maintainer use
21765   # only, it does not matter if we skip the link with older autoconf.
21766   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21767   # builds, so use a shell variable to bypass this.
21768   GNUmakefile=GNUmakefile
21769   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21770
21771
21772
21773
21774
21775
21776
21777           GNULIB_ICONV=1
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794      if test $gl_cv_have_include_next = yes; then
21795        gl_cv_next_iconv_h='<'iconv.h'>'
21796      else
21797        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
21798 printf %s "checking absolute name of <iconv.h>... " >&6; }
21799 if test ${gl_cv_next_iconv_h+y}
21800 then :
21801   printf %s "(cached) " >&6
21802 else
21803
21804              if test $ac_cv_header_iconv_h = yes; then
21805
21806
21807
21808
21809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21810 /* end confdefs.h.  */
21811 #include <iconv.h>
21812 _ACEOF
21813                 case "$host_os" in
21814     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21815     *)    gl_absname_cpp="$ac_cpp" ;;
21816   esac
21817
21818   case "$host_os" in
21819     mingw*)
21820                                           gl_dirsep_regex='[/\\]'
21821       ;;
21822     *)
21823       gl_dirsep_regex='\/'
21824       ;;
21825   esac
21826       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21827   gl_header_literal_regex=`echo 'iconv.h' \
21828                            | sed -e "$gl_make_literal_regex_sed"`
21829   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21830       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21831       s|^/[^/]|//&|
21832       p
21833       q
21834     }'
21835
21836         gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21837   sed -n "$gl_absolute_header_sed"`
21838
21839            gl_header=$gl_cv_absolute_iconv_h
21840            gl_cv_next_iconv_h='"'$gl_header'"'
21841           else
21842                gl_cv_next_iconv_h='<'iconv.h'>'
21843              fi
21844
21845
21846 fi
21847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
21848 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
21849      fi
21850      NEXT_ICONV_H=$gl_cv_next_iconv_h
21851
21852      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21853        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21854        gl_next_as_first_directive='<'iconv.h'>'
21855      else
21856        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21857        gl_next_as_first_directive=$gl_cv_next_iconv_h
21858      fi
21859      NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873   if test "$am_cv_func_iconv" = yes; then
21874
21875
21876   ICONV_H='iconv.h'
21877    if test -n "$ICONV_H"; then
21878   GL_GENERATE_ICONV_H_TRUE=
21879   GL_GENERATE_ICONV_H_FALSE='#'
21880 else
21881   GL_GENERATE_ICONV_H_TRUE='#'
21882   GL_GENERATE_ICONV_H_FALSE=
21883 fi
21884
21885
21886             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21887 /* end confdefs.h.  */
21888
21889       #include <iconv.h>
21890       #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
21891        gnu_iconv
21892       #endif
21893
21894 _ACEOF
21895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21896   $EGREP "gnu_iconv" >/dev/null 2>&1
21897 then :
21898   gl_func_iconv_gnu=yes
21899 else
21900   gl_func_iconv_gnu=no
21901 fi
21902 rm -rf conftest*
21903
21904     if test $gl_func_iconv_gnu = no; then
21905       iconv_flavor=
21906       case "$host_os" in
21907         aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
21908         irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
21909         hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
21910         osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
21911         solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
21912       esac
21913       if test -n "$iconv_flavor"; then
21914
21915 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
21916
21917
21918
21919
21920   ICONV_H='iconv.h'
21921    if test -n "$ICONV_H"; then
21922   GL_GENERATE_ICONV_H_TRUE=
21923   GL_GENERATE_ICONV_H_FALSE='#'
21924 else
21925   GL_GENERATE_ICONV_H_TRUE='#'
21926   GL_GENERATE_ICONV_H_FALSE=
21927 fi
21928
21929
21930   REPLACE_ICONV_OPEN=1
21931
21932       fi
21933     fi
21934
21935   fi
21936
21937   if test $REPLACE_ICONV_OPEN = 1; then
21938
21939
21940
21941
21942
21943
21944
21945
21946   gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
21947
21948   fi
21949   if test $REPLACE_ICONV = 1; then
21950
21951
21952
21953
21954
21955
21956
21957
21958   gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968   gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
21969
21970   fi
21971
21972
21973   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
21974 printf %s "checking whether the compiler generally respects inline... " >&6; }
21975 if test ${gl_cv_c_inline_effective+y}
21976 then :
21977   printf %s "(cached) " >&6
21978 else
21979   if test $ac_cv_c_inline = no; then
21980        gl_cv_c_inline_effective=no
21981      else
21982                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21983 /* end confdefs.h.  */
21984
21985 int
21986 main (void)
21987 {
21988 #ifdef __NO_INLINE__
21989                #error "inline is not effective"
21990              #endif
21991   ;
21992   return 0;
21993 }
21994 _ACEOF
21995 if ac_fn_c_try_compile "$LINENO"
21996 then :
21997   gl_cv_c_inline_effective=yes
21998 else
21999   gl_cv_c_inline_effective=no
22000 fi
22001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22002      fi
22003
22004 fi
22005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
22006 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
22007   if test $gl_cv_c_inline_effective = yes; then
22008
22009 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
22010
22011   fi
22012
22013
22014
22015
22016   :
22017
22018   :
22019   :
22020   :
22021   :
22022
22023
22024
22025
22026
22027
22028   PRIPTR_PREFIX=
22029   if test -n "$STDINT_H"; then
22030         PRIPTR_PREFIX='"l"'
22031   else
22032         for glpfx in '' l ll I64; do
22033       case $glpfx in
22034         '')  gltype1='int';;
22035         l)   gltype1='long int';;
22036         ll)  gltype1='long long int';;
22037         I64) gltype1='__int64';;
22038       esac
22039       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22040 /* end confdefs.h.  */
22041 #include <stdint.h>
22042            extern intptr_t foo;
22043            extern $gltype1 foo;
22044 int
22045 main (void)
22046 {
22047
22048   ;
22049   return 0;
22050 }
22051 _ACEOF
22052 if ac_fn_c_try_compile "$LINENO"
22053 then :
22054   PRIPTR_PREFIX='"'$glpfx'"'
22055 fi
22056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22057       test -n "$PRIPTR_PREFIX" && break
22058     done
22059   fi
22060
22061
22062
22063   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22064 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22065 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
22066 then :
22067   printf %s "(cached) " >&6
22068 else
22069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070 /* end confdefs.h.  */
22071 /* Work also in C++ mode.  */
22072             #define __STDC_LIMIT_MACROS 1
22073
22074             /* Work if build is not clean.  */
22075             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22076
22077             #include <limits.h>
22078             #if HAVE_STDINT_H
22079              #include <stdint.h>
22080             #endif
22081
22082             #if defined INT32_MAX && defined INTMAX_MAX
22083              #define CONDITION (INT32_MAX < INTMAX_MAX)
22084             #elif HAVE_LONG_LONG_INT
22085              #define CONDITION (sizeof (int) < sizeof (long long int))
22086             #else
22087              #define CONDITION 0
22088             #endif
22089             int test[CONDITION ? 1 : -1];
22090 int
22091 main (void)
22092 {
22093
22094   ;
22095   return 0;
22096 }
22097 _ACEOF
22098 if ac_fn_c_try_compile "$LINENO"
22099 then :
22100   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22101 else
22102   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22103 fi
22104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22105 fi
22106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22107 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22108   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22109     INT32_MAX_LT_INTMAX_MAX=1;
22110   else
22111     INT32_MAX_LT_INTMAX_MAX=0;
22112   fi
22113
22114
22115   if test $APPLE_UNIVERSAL_BUILD = 0; then
22116
22117   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22118 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
22119 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
22120 then :
22121   printf %s "(cached) " >&6
22122 else
22123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22124 /* end confdefs.h.  */
22125 /* Work also in C++ mode.  */
22126             #define __STDC_LIMIT_MACROS 1
22127
22128             /* Work if build is not clean.  */
22129             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22130
22131             #include <limits.h>
22132             #if HAVE_STDINT_H
22133              #include <stdint.h>
22134             #endif
22135
22136             #if defined INT64_MAX
22137              #define CONDITION (INT64_MAX == LONG_MAX)
22138             #elif HAVE_LONG_LONG_INT
22139              #define CONDITION (sizeof (long long int) == sizeof (long int))
22140             #else
22141              #define CONDITION 0
22142             #endif
22143             int test[CONDITION ? 1 : -1];
22144 int
22145 main (void)
22146 {
22147
22148   ;
22149   return 0;
22150 }
22151 _ACEOF
22152 if ac_fn_c_try_compile "$LINENO"
22153 then :
22154   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
22155 else
22156   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
22157 fi
22158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22159 fi
22160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22161 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22162   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22163     INT64_MAX_EQ_LONG_MAX=1;
22164   else
22165     INT64_MAX_EQ_LONG_MAX=0;
22166   fi
22167
22168
22169   else
22170     INT64_MAX_EQ_LONG_MAX=-1
22171   fi
22172
22173   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22174 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22175 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
22176 then :
22177   printf %s "(cached) " >&6
22178 else
22179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22180 /* end confdefs.h.  */
22181 /* Work also in C++ mode.  */
22182             #define __STDC_LIMIT_MACROS 1
22183
22184             /* Work if build is not clean.  */
22185             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22186
22187             #include <limits.h>
22188             #if HAVE_STDINT_H
22189              #include <stdint.h>
22190             #endif
22191
22192             #if defined UINT32_MAX && defined UINTMAX_MAX
22193              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22194             #elif HAVE_LONG_LONG_INT
22195              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22196             #else
22197              #define CONDITION 0
22198             #endif
22199             int test[CONDITION ? 1 : -1];
22200 int
22201 main (void)
22202 {
22203
22204   ;
22205   return 0;
22206 }
22207 _ACEOF
22208 if ac_fn_c_try_compile "$LINENO"
22209 then :
22210   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22211 else
22212   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
22213 fi
22214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22215 fi
22216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22217 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22218   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22219     UINT32_MAX_LT_UINTMAX_MAX=1;
22220   else
22221     UINT32_MAX_LT_UINTMAX_MAX=0;
22222   fi
22223
22224
22225   if test $APPLE_UNIVERSAL_BUILD = 0; then
22226
22227   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22228 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22229 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
22230 then :
22231   printf %s "(cached) " >&6
22232 else
22233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22234 /* end confdefs.h.  */
22235 /* Work also in C++ mode.  */
22236             #define __STDC_LIMIT_MACROS 1
22237
22238             /* Work if build is not clean.  */
22239             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22240
22241             #include <limits.h>
22242             #if HAVE_STDINT_H
22243              #include <stdint.h>
22244             #endif
22245
22246             #if defined UINT64_MAX
22247              #define CONDITION (UINT64_MAX == ULONG_MAX)
22248             #elif HAVE_LONG_LONG_INT
22249              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22250             #else
22251              #define CONDITION 0
22252             #endif
22253             int test[CONDITION ? 1 : -1];
22254 int
22255 main (void)
22256 {
22257
22258   ;
22259   return 0;
22260 }
22261 _ACEOF
22262 if ac_fn_c_try_compile "$LINENO"
22263 then :
22264   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22265 else
22266   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
22267 fi
22268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22269 fi
22270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22271 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22272   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22273     UINT64_MAX_EQ_ULONG_MAX=1;
22274   else
22275     UINT64_MAX_EQ_ULONG_MAX=0;
22276   fi
22277
22278
22279   else
22280     UINT64_MAX_EQ_ULONG_MAX=-1
22281   fi
22282
22283
22284
22285
22286
22287
22288
22289
22290   if test $ac_cv_func_isblank = no; then
22291     HAVE_ISBLANK=0
22292   fi
22293
22294   if test $HAVE_ISBLANK = 0; then
22295
22296
22297
22298
22299
22300
22301
22302
22303   gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
22304
22305   fi
22306
22307
22308
22309
22310
22311           GNULIB_ISBLANK=1
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
22322 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22323    <wchar.h>.
22324    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
22325    before <wchar.h>.  */
22326 #include <stddef.h>
22327 #include <stdio.h>
22328 #include <time.h>
22329 #include <wchar.h>
22330 #include <wctype.h>
22331
22332 "
22333 if test "x$ac_cv_have_decl_iswblank" = xyes
22334 then :
22335   ac_have_decl=1
22336 else
22337   ac_have_decl=0
22338 fi
22339
22340 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
22341
22342   if test $ac_cv_func_iswblank = no; then
22343     HAVE_ISWBLANK=0
22344     if test $ac_cv_have_decl_iswblank = yes; then
22345       REPLACE_ISWBLANK=1
22346     fi
22347   fi
22348   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22349         :
22350   else
22351     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22352             :
22353     fi
22354   fi
22355
22356
22357   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22358     :
22359   else
22360     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22361
22362
22363
22364
22365
22366
22367
22368
22369   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
22370
22371     fi
22372   fi
22373
22374
22375
22376
22377
22378           GNULIB_ISWBLANK=1
22379
22380
22381
22382
22383
22384 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402      if test $gl_cv_have_include_next = yes; then
22403        gl_cv_next_langinfo_h='<'langinfo.h'>'
22404      else
22405        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
22406 printf %s "checking absolute name of <langinfo.h>... " >&6; }
22407 if test ${gl_cv_next_langinfo_h+y}
22408 then :
22409   printf %s "(cached) " >&6
22410 else
22411
22412              if test $ac_cv_header_langinfo_h = yes; then
22413
22414
22415
22416
22417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22418 /* end confdefs.h.  */
22419 #include <langinfo.h>
22420 _ACEOF
22421                 case "$host_os" in
22422     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22423     *)    gl_absname_cpp="$ac_cpp" ;;
22424   esac
22425
22426   case "$host_os" in
22427     mingw*)
22428                                           gl_dirsep_regex='[/\\]'
22429       ;;
22430     *)
22431       gl_dirsep_regex='\/'
22432       ;;
22433   esac
22434       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22435   gl_header_literal_regex=`echo 'langinfo.h' \
22436                            | sed -e "$gl_make_literal_regex_sed"`
22437   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22438       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22439       s|^/[^/]|//&|
22440       p
22441       q
22442     }'
22443
22444         gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22445   sed -n "$gl_absolute_header_sed"`
22446
22447            gl_header=$gl_cv_absolute_langinfo_h
22448            gl_cv_next_langinfo_h='"'$gl_header'"'
22449           else
22450                gl_cv_next_langinfo_h='<'langinfo.h'>'
22451              fi
22452
22453
22454 fi
22455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
22456 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
22457      fi
22458      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
22459
22460      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22461        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22462        gl_next_as_first_directive='<'langinfo.h'>'
22463      else
22464        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22465        gl_next_as_first_directive=$gl_cv_next_langinfo_h
22466      fi
22467      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
22468
22469
22470
22471
22472
22473     HAVE_LANGINFO_CODESET=0
22474   HAVE_LANGINFO_T_FMT_AMPM=0
22475   HAVE_LANGINFO_ALTMON=0
22476   HAVE_LANGINFO_ERA=0
22477   HAVE_LANGINFO_YESEXPR=0
22478
22479   if test $ac_cv_header_langinfo_h = yes; then
22480     HAVE_LANGINFO_H=1
22481                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
22482 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
22483 if test ${gl_cv_header_langinfo_codeset+y}
22484 then :
22485   printf %s "(cached) " >&6
22486 else
22487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22488 /* end confdefs.h.  */
22489 #include <langinfo.h>
22490 int a = CODESET;
22491
22492 int
22493 main (void)
22494 {
22495
22496   ;
22497   return 0;
22498 }
22499 _ACEOF
22500 if ac_fn_c_try_compile "$LINENO"
22501 then :
22502   gl_cv_header_langinfo_codeset=yes
22503 else
22504   gl_cv_header_langinfo_codeset=no
22505 fi
22506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22507
22508 fi
22509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
22510 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
22511     if test $gl_cv_header_langinfo_codeset = yes; then
22512       HAVE_LANGINFO_CODESET=1
22513     fi
22514     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
22515 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
22516 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
22517 then :
22518   printf %s "(cached) " >&6
22519 else
22520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22521 /* end confdefs.h.  */
22522 #include <langinfo.h>
22523 int a = T_FMT_AMPM;
22524
22525 int
22526 main (void)
22527 {
22528
22529   ;
22530   return 0;
22531 }
22532 _ACEOF
22533 if ac_fn_c_try_compile "$LINENO"
22534 then :
22535   gl_cv_header_langinfo_t_fmt_ampm=yes
22536 else
22537   gl_cv_header_langinfo_t_fmt_ampm=no
22538 fi
22539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22540
22541 fi
22542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
22543 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
22544     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
22545       HAVE_LANGINFO_T_FMT_AMPM=1
22546     fi
22547     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
22548 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
22549 if test ${gl_cv_header_langinfo_altmon+y}
22550 then :
22551   printf %s "(cached) " >&6
22552 else
22553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22554 /* end confdefs.h.  */
22555 #include <langinfo.h>
22556 int a = ALTMON_1;
22557
22558 int
22559 main (void)
22560 {
22561
22562   ;
22563   return 0;
22564 }
22565 _ACEOF
22566 if ac_fn_c_try_compile "$LINENO"
22567 then :
22568   gl_cv_header_langinfo_altmon=yes
22569 else
22570   gl_cv_header_langinfo_altmon=no
22571 fi
22572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22573
22574 fi
22575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
22576 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
22577     if test $gl_cv_header_langinfo_altmon = yes; then
22578       HAVE_LANGINFO_ALTMON=1
22579     fi
22580     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
22581 printf %s "checking whether langinfo.h defines ERA... " >&6; }
22582 if test ${gl_cv_header_langinfo_era+y}
22583 then :
22584   printf %s "(cached) " >&6
22585 else
22586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22587 /* end confdefs.h.  */
22588 #include <langinfo.h>
22589 int a = ERA;
22590
22591 int
22592 main (void)
22593 {
22594
22595   ;
22596   return 0;
22597 }
22598 _ACEOF
22599 if ac_fn_c_try_compile "$LINENO"
22600 then :
22601   gl_cv_header_langinfo_era=yes
22602 else
22603   gl_cv_header_langinfo_era=no
22604 fi
22605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22606
22607 fi
22608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
22609 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
22610     if test $gl_cv_header_langinfo_era = yes; then
22611       HAVE_LANGINFO_ERA=1
22612     fi
22613     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
22614 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
22615 if test ${gl_cv_header_langinfo_yesexpr+y}
22616 then :
22617   printf %s "(cached) " >&6
22618 else
22619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22620 /* end confdefs.h.  */
22621 #include <langinfo.h>
22622 int a = YESEXPR;
22623
22624 int
22625 main (void)
22626 {
22627
22628   ;
22629   return 0;
22630 }
22631 _ACEOF
22632 if ac_fn_c_try_compile "$LINENO"
22633 then :
22634   gl_cv_header_langinfo_yesexpr=yes
22635 else
22636   gl_cv_header_langinfo_yesexpr=no
22637 fi
22638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22639
22640 fi
22641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
22642 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
22643     if test $gl_cv_header_langinfo_yesexpr = yes; then
22644       HAVE_LANGINFO_YESEXPR=1
22645     fi
22646   else
22647     HAVE_LANGINFO_H=0
22648   fi
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
22663 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
22664 if test ${gl_cv_c___inline+y}
22665 then :
22666   printf %s "(cached) " >&6
22667 else
22668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669 /* end confdefs.h.  */
22670 typedef int foo_t;
22671            static __inline foo_t foo (void) { return 0; }
22672 int
22673 main (void)
22674 {
22675 return foo ();
22676   ;
22677   return 0;
22678 }
22679 _ACEOF
22680 if ac_fn_c_try_compile "$LINENO"
22681 then :
22682   gl_cv_c___inline=yes
22683 else
22684   gl_cv_c___inline=no
22685 fi
22686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22687 fi
22688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
22689 printf "%s\n" "$gl_cv_c___inline" >&6; }
22690   if test $gl_cv_c___inline = yes; then
22691
22692 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
22693
22694   fi
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709     use_additional=yes
22710
22711   acl_save_prefix="$prefix"
22712   prefix="$acl_final_prefix"
22713   acl_save_exec_prefix="$exec_prefix"
22714   exec_prefix="$acl_final_exec_prefix"
22715
22716     eval additional_includedir=\"$includedir\"
22717     eval additional_libdir=\"$libdir\"
22718
22719   exec_prefix="$acl_save_exec_prefix"
22720   prefix="$acl_save_prefix"
22721
22722
22723 # Check whether --with-libsigsegv-prefix was given.
22724 if test ${with_libsigsegv_prefix+y}
22725 then :
22726   withval=$with_libsigsegv_prefix;
22727     if test "X$withval" = "Xno"; then
22728       use_additional=no
22729     else
22730       if test "X$withval" = "X"; then
22731
22732   acl_save_prefix="$prefix"
22733   prefix="$acl_final_prefix"
22734   acl_save_exec_prefix="$exec_prefix"
22735   exec_prefix="$acl_final_exec_prefix"
22736
22737           eval additional_includedir=\"$includedir\"
22738           eval additional_libdir=\"$libdir\"
22739
22740   exec_prefix="$acl_save_exec_prefix"
22741   prefix="$acl_save_prefix"
22742
22743       else
22744         additional_includedir="$withval/include"
22745         additional_libdir="$withval/$acl_libdirstem"
22746         if test "$acl_libdirstem2" != "$acl_libdirstem" \
22747            && test ! -d "$withval/$acl_libdirstem"; then
22748           additional_libdir="$withval/$acl_libdirstem2"
22749         fi
22750       fi
22751     fi
22752
22753 fi
22754
22755       LIBSIGSEGV=
22756   LTLIBSIGSEGV=
22757   INCSIGSEGV=
22758   LIBSIGSEGV_PREFIX=
22759       HAVE_LIBSIGSEGV=
22760   rpathdirs=
22761   ltrpathdirs=
22762   names_already_handled=
22763   names_next_round='sigsegv '
22764   while test -n "$names_next_round"; do
22765     names_this_round="$names_next_round"
22766     names_next_round=
22767     for name in $names_this_round; do
22768       already_handled=
22769       for n in $names_already_handled; do
22770         if test "$n" = "$name"; then
22771           already_handled=yes
22772           break
22773         fi
22774       done
22775       if test -z "$already_handled"; then
22776         names_already_handled="$names_already_handled $name"
22777                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
22778         eval value=\"\$HAVE_LIB$uppername\"
22779         if test -n "$value"; then
22780           if test "$value" = yes; then
22781             eval value=\"\$LIB$uppername\"
22782             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
22783             eval value=\"\$LTLIB$uppername\"
22784             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
22785           else
22786                                     :
22787           fi
22788         else
22789                               found_dir=
22790           found_la=
22791           found_so=
22792           found_a=
22793           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
22794           if test -n "$acl_shlibext"; then
22795             shrext=".$acl_shlibext"             # typically: shrext=.so
22796           else
22797             shrext=
22798           fi
22799           if test $use_additional = yes; then
22800             dir="$additional_libdir"
22801                                     if test -n "$acl_shlibext"; then
22802               if test -f "$dir/$libname$shrext"; then
22803                 found_dir="$dir"
22804                 found_so="$dir/$libname$shrext"
22805               else
22806                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
22807                   ver=`(cd "$dir" && \
22808                         for f in "$libname$shrext".*; do echo "$f"; done \
22809                         | sed -e "s,^$libname$shrext\\\\.,," \
22810                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
22811                         | sed 1q ) 2>/dev/null`
22812                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
22813                     found_dir="$dir"
22814                     found_so="$dir/$libname$shrext.$ver"
22815                   fi
22816                 else
22817                   eval library_names=\"$acl_library_names_spec\"
22818                   for f in $library_names; do
22819                     if test -f "$dir/$f"; then
22820                       found_dir="$dir"
22821                       found_so="$dir/$f"
22822                       break
22823                     fi
22824                   done
22825                 fi
22826               fi
22827             fi
22828                         if test "X$found_dir" = "X"; then
22829               if test -f "$dir/$libname.$acl_libext"; then
22830                 found_dir="$dir"
22831                 found_a="$dir/$libname.$acl_libext"
22832               fi
22833             fi
22834             if test "X$found_dir" != "X"; then
22835               if test -f "$dir/$libname.la"; then
22836                 found_la="$dir/$libname.la"
22837               fi
22838             fi
22839           fi
22840           if test "X$found_dir" = "X"; then
22841             for x in $LDFLAGS $LTLIBSIGSEGV; do
22842
22843   acl_save_prefix="$prefix"
22844   prefix="$acl_final_prefix"
22845   acl_save_exec_prefix="$exec_prefix"
22846   exec_prefix="$acl_final_exec_prefix"
22847   eval x=\"$x\"
22848   exec_prefix="$acl_save_exec_prefix"
22849   prefix="$acl_save_prefix"
22850
22851               case "$x" in
22852                 -L*)
22853                   dir=`echo "X$x" | sed -e 's/^X-L//'`
22854                                     if test -n "$acl_shlibext"; then
22855                     if test -f "$dir/$libname$shrext"; then
22856                       found_dir="$dir"
22857                       found_so="$dir/$libname$shrext"
22858                     else
22859                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
22860                         ver=`(cd "$dir" && \
22861                               for f in "$libname$shrext".*; do echo "$f"; done \
22862                               | sed -e "s,^$libname$shrext\\\\.,," \
22863                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
22864                               | sed 1q ) 2>/dev/null`
22865                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
22866                           found_dir="$dir"
22867                           found_so="$dir/$libname$shrext.$ver"
22868                         fi
22869                       else
22870                         eval library_names=\"$acl_library_names_spec\"
22871                         for f in $library_names; do
22872                           if test -f "$dir/$f"; then
22873                             found_dir="$dir"
22874                             found_so="$dir/$f"
22875                             break
22876                           fi
22877                         done
22878                       fi
22879                     fi
22880                   fi
22881                                     if test "X$found_dir" = "X"; then
22882                     if test -f "$dir/$libname.$acl_libext"; then
22883                       found_dir="$dir"
22884                       found_a="$dir/$libname.$acl_libext"
22885                     fi
22886                   fi
22887                   if test "X$found_dir" != "X"; then
22888                     if test -f "$dir/$libname.la"; then
22889                       found_la="$dir/$libname.la"
22890                     fi
22891                   fi
22892                   ;;
22893               esac
22894               if test "X$found_dir" != "X"; then
22895                 break
22896               fi
22897             done
22898           fi
22899           if test "X$found_dir" != "X"; then
22900                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
22901             if test "X$found_so" != "X"; then
22902                                                         if test "$enable_rpath" = no \
22903                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
22904                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
22905                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22906               else
22907                                                                                 haveit=
22908                 for x in $ltrpathdirs; do
22909                   if test "X$x" = "X$found_dir"; then
22910                     haveit=yes
22911                     break
22912                   fi
22913                 done
22914                 if test -z "$haveit"; then
22915                   ltrpathdirs="$ltrpathdirs $found_dir"
22916                 fi
22917                                 if test "$acl_hardcode_direct" = yes; then
22918                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22919                 else
22920                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
22921                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22922                                                             haveit=
22923                     for x in $rpathdirs; do
22924                       if test "X$x" = "X$found_dir"; then
22925                         haveit=yes
22926                         break
22927                       fi
22928                     done
22929                     if test -z "$haveit"; then
22930                       rpathdirs="$rpathdirs $found_dir"
22931                     fi
22932                   else
22933                                                                                 haveit=
22934                     for x in $LDFLAGS $LIBSIGSEGV; do
22935
22936   acl_save_prefix="$prefix"
22937   prefix="$acl_final_prefix"
22938   acl_save_exec_prefix="$exec_prefix"
22939   exec_prefix="$acl_final_exec_prefix"
22940   eval x=\"$x\"
22941   exec_prefix="$acl_save_exec_prefix"
22942   prefix="$acl_save_prefix"
22943
22944                       if test "X$x" = "X-L$found_dir"; then
22945                         haveit=yes
22946                         break
22947                       fi
22948                     done
22949                     if test -z "$haveit"; then
22950                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
22951                     fi
22952                     if test "$acl_hardcode_minus_L" != no; then
22953                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22954                     else
22955                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
22956                     fi
22957                   fi
22958                 fi
22959               fi
22960             else
22961               if test "X$found_a" != "X"; then
22962                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
22963               else
22964                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
22965               fi
22966             fi
22967                         additional_includedir=
22968             case "$found_dir" in
22969               */$acl_libdirstem | */$acl_libdirstem/)
22970                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
22971                 if test "$name" = 'sigsegv'; then
22972                   LIBSIGSEGV_PREFIX="$basedir"
22973                 fi
22974                 additional_includedir="$basedir/include"
22975                 ;;
22976               */$acl_libdirstem2 | */$acl_libdirstem2/)
22977                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
22978                 if test "$name" = 'sigsegv'; then
22979                   LIBSIGSEGV_PREFIX="$basedir"
22980                 fi
22981                 additional_includedir="$basedir/include"
22982                 ;;
22983             esac
22984             if test "X$additional_includedir" != "X"; then
22985                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
22986                 haveit=
22987                 if test "X$additional_includedir" = "X/usr/local/include"; then
22988                   if test -n "$GCC"; then
22989                     case $host_os in
22990                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
22991                     esac
22992                   fi
22993                 fi
22994                 if test -z "$haveit"; then
22995                   for x in $CPPFLAGS $INCSIGSEGV; do
22996
22997   acl_save_prefix="$prefix"
22998   prefix="$acl_final_prefix"
22999   acl_save_exec_prefix="$exec_prefix"
23000   exec_prefix="$acl_final_exec_prefix"
23001   eval x=\"$x\"
23002   exec_prefix="$acl_save_exec_prefix"
23003   prefix="$acl_save_prefix"
23004
23005                     if test "X$x" = "X-I$additional_includedir"; then
23006                       haveit=yes
23007                       break
23008                     fi
23009                   done
23010                   if test -z "$haveit"; then
23011                     if test -d "$additional_includedir"; then
23012                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
23013                     fi
23014                   fi
23015                 fi
23016               fi
23017             fi
23018                         if test -n "$found_la"; then
23019                                                         save_libdir="$libdir"
23020               case "$found_la" in
23021                 */* | *\\*) . "$found_la" ;;
23022                 *) . "./$found_la" ;;
23023               esac
23024               libdir="$save_libdir"
23025                             for dep in $dependency_libs; do
23026                 case "$dep" in
23027                   -L*)
23028                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
23029                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
23030                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
23031                       haveit=
23032                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
23033                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
23034                         if test -n "$GCC"; then
23035                           case $host_os in
23036                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23037                           esac
23038                         fi
23039                       fi
23040                       if test -z "$haveit"; then
23041                         haveit=
23042                         for x in $LDFLAGS $LIBSIGSEGV; do
23043
23044   acl_save_prefix="$prefix"
23045   prefix="$acl_final_prefix"
23046   acl_save_exec_prefix="$exec_prefix"
23047   exec_prefix="$acl_final_exec_prefix"
23048   eval x=\"$x\"
23049   exec_prefix="$acl_save_exec_prefix"
23050   prefix="$acl_save_prefix"
23051
23052                           if test "X$x" = "X-L$additional_libdir"; then
23053                             haveit=yes
23054                             break
23055                           fi
23056                         done
23057                         if test -z "$haveit"; then
23058                           if test -d "$additional_libdir"; then
23059                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
23060                           fi
23061                         fi
23062                         haveit=
23063                         for x in $LDFLAGS $LTLIBSIGSEGV; do
23064
23065   acl_save_prefix="$prefix"
23066   prefix="$acl_final_prefix"
23067   acl_save_exec_prefix="$exec_prefix"
23068   exec_prefix="$acl_final_exec_prefix"
23069   eval x=\"$x\"
23070   exec_prefix="$acl_save_exec_prefix"
23071   prefix="$acl_save_prefix"
23072
23073                           if test "X$x" = "X-L$additional_libdir"; then
23074                             haveit=yes
23075                             break
23076                           fi
23077                         done
23078                         if test -z "$haveit"; then
23079                           if test -d "$additional_libdir"; then
23080                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
23081                           fi
23082                         fi
23083                       fi
23084                     fi
23085                     ;;
23086                   -R*)
23087                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
23088                     if test "$enable_rpath" != no; then
23089                                                                   haveit=
23090                       for x in $rpathdirs; do
23091                         if test "X$x" = "X$dir"; then
23092                           haveit=yes
23093                           break
23094                         fi
23095                       done
23096                       if test -z "$haveit"; then
23097                         rpathdirs="$rpathdirs $dir"
23098                       fi
23099                                                                   haveit=
23100                       for x in $ltrpathdirs; do
23101                         if test "X$x" = "X$dir"; then
23102                           haveit=yes
23103                           break
23104                         fi
23105                       done
23106                       if test -z "$haveit"; then
23107                         ltrpathdirs="$ltrpathdirs $dir"
23108                       fi
23109                     fi
23110                     ;;
23111                   -l*)
23112                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
23113                     ;;
23114                   *.la)
23115                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
23116                     ;;
23117                   *)
23118                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
23119                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
23120                     ;;
23121                 esac
23122               done
23123             fi
23124           else
23125                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
23126             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
23127           fi
23128         fi
23129       fi
23130     done
23131   done
23132   if test "X$rpathdirs" != "X"; then
23133     if test -n "$acl_hardcode_libdir_separator"; then
23134                         alldirs=
23135       for found_dir in $rpathdirs; do
23136         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
23137       done
23138             acl_save_libdir="$libdir"
23139       libdir="$alldirs"
23140       eval flag=\"$acl_hardcode_libdir_flag_spec\"
23141       libdir="$acl_save_libdir"
23142       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
23143     else
23144             for found_dir in $rpathdirs; do
23145         acl_save_libdir="$libdir"
23146         libdir="$found_dir"
23147         eval flag=\"$acl_hardcode_libdir_flag_spec\"
23148         libdir="$acl_save_libdir"
23149         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
23150       done
23151     fi
23152   fi
23153   if test "X$ltrpathdirs" != "X"; then
23154             for found_dir in $ltrpathdirs; do
23155       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
23156     done
23157   fi
23158
23159
23160
23161
23162
23163
23164         ac_save_CPPFLAGS="$CPPFLAGS"
23165
23166   for element in $INCSIGSEGV; do
23167     haveit=
23168     for x in $CPPFLAGS; do
23169
23170   acl_save_prefix="$prefix"
23171   prefix="$acl_final_prefix"
23172   acl_save_exec_prefix="$exec_prefix"
23173   exec_prefix="$acl_final_exec_prefix"
23174   eval x=\"$x\"
23175   exec_prefix="$acl_save_exec_prefix"
23176   prefix="$acl_save_prefix"
23177
23178       if test "X$x" = "X$element"; then
23179         haveit=yes
23180         break
23181       fi
23182     done
23183     if test -z "$haveit"; then
23184       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
23185     fi
23186   done
23187
23188
23189   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
23190 printf %s "checking for libsigsegv... " >&6; }
23191 if test ${ac_cv_libsigsegv+y}
23192 then :
23193   printf %s "(cached) " >&6
23194 else
23195
23196     ac_save_LIBS="$LIBS"
23197                                 case " $LIBSIGSEGV" in
23198       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
23199       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
23200     esac
23201     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23202 /* end confdefs.h.  */
23203 #include <sigsegv.h>
23204 int
23205 main (void)
23206 {
23207 sigsegv_deinstall_handler();
23208   ;
23209   return 0;
23210 }
23211 _ACEOF
23212 if ac_fn_c_try_link "$LINENO"
23213 then :
23214   ac_cv_libsigsegv=yes
23215 else
23216   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
23217 fi
23218 rm -f core conftest.err conftest.$ac_objext \
23219     conftest$ac_exeext conftest.$ac_ext
23220     LIBS="$ac_save_LIBS"
23221
23222 fi
23223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
23224 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
23225   if test "$ac_cv_libsigsegv" = yes; then
23226     HAVE_LIBSIGSEGV=yes
23227
23228 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
23229
23230     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
23231 printf %s "checking how to link with libsigsegv... " >&6; }
23232     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
23233 printf "%s\n" "$LIBSIGSEGV" >&6; }
23234   else
23235     HAVE_LIBSIGSEGV=no
23236             CPPFLAGS="$ac_save_CPPFLAGS"
23237     LIBSIGSEGV=
23238     LTLIBSIGSEGV=
23239     LIBSIGSEGV_PREFIX=
23240   fi
23241
23242
23243
23244
23245
23246
23247
23248     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
23249
23250
23251
23252
23253
23254     LOCALCHARSET_TESTS_ENVIRONMENT=
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264   case "$host_os" in
23265     solaris*)
23266
23267 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
23268
23269       ;;
23270   esac
23271
23272   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23273 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
23274 if test ${gl_cv_header_locale_h_posix2001+y}
23275 then :
23276   printf %s "(cached) " >&6
23277 else
23278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23279 /* end confdefs.h.  */
23280 #include <locale.h>
23281             int x = LC_MESSAGES;
23282             int y = sizeof (((struct lconv *) 0)->decimal_point);
23283 int
23284 main (void)
23285 {
23286
23287   ;
23288   return 0;
23289 }
23290 _ACEOF
23291 if ac_fn_c_try_compile "$LINENO"
23292 then :
23293   gl_cv_header_locale_h_posix2001=yes
23294 else
23295   gl_cv_header_locale_h_posix2001=no
23296 fi
23297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23298 fi
23299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23300 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
23301
23302
23303   if test $ac_cv_header_xlocale_h = yes; then
23304     HAVE_XLOCALE_H=1
23305                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
23306 printf %s "checking whether locale.h defines locale_t... " >&6; }
23307 if test ${gl_cv_header_locale_has_locale_t+y}
23308 then :
23309   printf %s "(cached) " >&6
23310 else
23311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23312 /* end confdefs.h.  */
23313 #include <locale.h>
23314               locale_t x;
23315 int
23316 main (void)
23317 {
23318
23319   ;
23320   return 0;
23321 }
23322 _ACEOF
23323 if ac_fn_c_try_compile "$LINENO"
23324 then :
23325   gl_cv_header_locale_has_locale_t=yes
23326 else
23327   gl_cv_header_locale_has_locale_t=no
23328 fi
23329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23330
23331 fi
23332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
23333 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
23334     if test $gl_cv_header_locale_has_locale_t = yes; then
23335       gl_cv_header_locale_h_needs_xlocale_h=no
23336     else
23337       gl_cv_header_locale_h_needs_xlocale_h=yes
23338     fi
23339   else
23340     HAVE_XLOCALE_H=0
23341     gl_cv_header_locale_h_needs_xlocale_h=no
23342   fi
23343
23344
23345           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23346 printf %s "checking whether struct lconv is properly defined... " >&6; }
23347 if test ${gl_cv_sys_struct_lconv_ok+y}
23348 then :
23349   printf %s "(cached) " >&6
23350 else
23351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h.  */
23353 #include <locale.h>
23354             struct lconv l;
23355             int x = sizeof (l.decimal_point);
23356             int y = sizeof (l.int_p_cs_precedes);
23357 int
23358 main (void)
23359 {
23360
23361   ;
23362   return 0;
23363 }
23364 _ACEOF
23365 if ac_fn_c_try_compile "$LINENO"
23366 then :
23367   gl_cv_sys_struct_lconv_ok=yes
23368 else
23369   gl_cv_sys_struct_lconv_ok=no
23370 fi
23371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23372
23373 fi
23374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23375 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
23376   if test $gl_cv_sys_struct_lconv_ok = no; then
23377     REPLACE_STRUCT_LCONV=1
23378   fi
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388      if test $gl_cv_have_include_next = yes; then
23389        gl_cv_next_locale_h='<'locale.h'>'
23390      else
23391        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23392 printf %s "checking absolute name of <locale.h>... " >&6; }
23393 if test ${gl_cv_next_locale_h+y}
23394 then :
23395   printf %s "(cached) " >&6
23396 else
23397
23398
23399
23400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23401 /* end confdefs.h.  */
23402 #include <locale.h>
23403 _ACEOF
23404                 case "$host_os" in
23405     aix*) gl_absname_cpp="$ac_cpp -C" ;;
23406     *)    gl_absname_cpp="$ac_cpp" ;;
23407   esac
23408
23409   case "$host_os" in
23410     mingw*)
23411                                           gl_dirsep_regex='[/\\]'
23412       ;;
23413     *)
23414       gl_dirsep_regex='\/'
23415       ;;
23416   esac
23417       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23418   gl_header_literal_regex=`echo 'locale.h' \
23419                            | sed -e "$gl_make_literal_regex_sed"`
23420   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23421       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23422       s|^/[^/]|//&|
23423       p
23424       q
23425     }'
23426
23427         gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23428   sed -n "$gl_absolute_header_sed"`
23429
23430            gl_header=$gl_cv_absolute_locale_h
23431            gl_cv_next_locale_h='"'$gl_header'"'
23432
23433
23434 fi
23435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23436 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
23437      fi
23438      NEXT_LOCALE_H=$gl_cv_next_locale_h
23439
23440      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23441        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23442        gl_next_as_first_directive='<'locale.h'>'
23443      else
23444        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23445        gl_next_as_first_directive=$gl_cv_next_locale_h
23446      fi
23447      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461   if test $REPLACE_STRUCT_LCONV = 1; then
23462     REPLACE_LOCALECONV=1
23463   fi
23464
23465   if test $REPLACE_LOCALECONV = 1; then
23466
23467
23468
23469
23470
23471
23472
23473
23474   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
23475
23476
23477   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
23478 "
23479 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
23480 then :
23481
23482 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
23483
23484
23485 fi
23486
23487
23488   fi
23489
23490
23491
23492
23493
23494           GNULIB_LOCALECONV=1
23495
23496
23497
23498
23499
23500 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513   gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
23514
23515
23516
23517
23518
23519   if test $ac_cv_func_lstat = yes; then
23520
23521     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
23522       solaris* | *no)
23523         REPLACE_LSTAT=1
23524         ;;
23525     esac
23526   else
23527     HAVE_LSTAT=0
23528   fi
23529
23530   if test $REPLACE_LSTAT = 1; then
23531
23532
23533
23534
23535
23536
23537
23538
23539   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23540
23541     :
23542   fi
23543
23544
23545
23546
23547
23548           GNULIB_LSTAT=1
23549
23550
23551
23552
23553
23554 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23555
23556
23557
23558
23559
23560
23561
23562
23563   if test $gl_cv_func_malloc_posix = yes; then
23564
23565 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23566
23567   else
23568     REPLACE_MALLOC=1
23569   fi
23570
23571   if test $REPLACE_MALLOC = 1; then
23572
23573
23574
23575
23576
23577
23578
23579
23580   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23581
23582   fi
23583
23584
23585
23586
23587
23588           GNULIB_MALLOC_POSIX=1
23589
23590
23591
23592
23593
23594 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607   :
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23620
23621
23622
23623      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23624 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
23625 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
23626 then :
23627   printf %s "(cached) " >&6
23628 else
23629
23630                   case "$host_os" in
23631                      # Guess no on AIX and OSF/1.
23632         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23633                      # Guess yes otherwise.
23634         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23635       esac
23636       if test $LOCALE_JA != none; then
23637         if test "$cross_compiling" = yes
23638 then :
23639   :
23640 else
23641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23642 /* end confdefs.h.  */
23643
23644 #include <locale.h>
23645 #include <string.h>
23646 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23647    <wchar.h>.
23648    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23649    included before <wchar.h>.  */
23650 #include <stddef.h>
23651 #include <stdio.h>
23652 #include <time.h>
23653 #include <wchar.h>
23654 int main ()
23655 {
23656   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23657     {
23658       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23659       mbstate_t state;
23660       wchar_t wc;
23661
23662       memset (&state, '\0', sizeof (mbstate_t));
23663       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23664         if (mbsinit (&state))
23665           return 2;
23666     }
23667   return 0;
23668 }
23669 _ACEOF
23670 if ac_fn_c_try_run "$LINENO"
23671 then :
23672   gl_cv_func_mbrtowc_incomplete_state=yes
23673 else
23674   gl_cv_func_mbrtowc_incomplete_state=no
23675 fi
23676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23677   conftest.$ac_objext conftest.beam conftest.$ac_ext
23678 fi
23679
23680       fi
23681
23682 fi
23683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23684 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23685
23686
23687
23688
23689      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23690 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
23691 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
23692 then :
23693   printf %s "(cached) " >&6
23694 else
23695
23696                   case "$host_os" in
23697                     # Guess no on Solaris 8.
23698         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23699                     # Guess yes otherwise.
23700         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23701       esac
23702       if test $LOCALE_ZH_CN != none; then
23703         if test "$cross_compiling" = yes
23704 then :
23705   :
23706 else
23707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23708 /* end confdefs.h.  */
23709
23710 #include <locale.h>
23711 #include <stdlib.h>
23712 #include <string.h>
23713 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23714    <wchar.h>.
23715    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23716    included before <wchar.h>.  */
23717 #include <stddef.h>
23718 #include <stdio.h>
23719 #include <time.h>
23720 #include <wchar.h>
23721 int main ()
23722 {
23723   /* This fails on Solaris 8:
23724      mbrtowc returns 2, and sets wc to 0x00F0.
23725      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23726   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23727     {
23728       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23729       mbstate_t state;
23730       wchar_t wc;
23731
23732       memset (&state, '\0', sizeof (mbstate_t));
23733       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23734           && mbtowc (&wc, input + 3, 6) == 4)
23735         return 2;
23736     }
23737   return 0;
23738 }
23739 _ACEOF
23740 if ac_fn_c_try_run "$LINENO"
23741 then :
23742   gl_cv_func_mbrtowc_sanitycheck=yes
23743 else
23744   gl_cv_func_mbrtowc_sanitycheck=no
23745 fi
23746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23747   conftest.$ac_objext conftest.beam conftest.$ac_ext
23748 fi
23749
23750       fi
23751
23752 fi
23753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23754 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23755
23756     REPLACE_MBSTATE_T=0
23757     case "$gl_cv_func_mbrtowc_incomplete_state" in
23758       *yes) ;;
23759       *) REPLACE_MBSTATE_T=1 ;;
23760     esac
23761     case "$gl_cv_func_mbrtowc_sanitycheck" in
23762       *yes) ;;
23763       *) REPLACE_MBSTATE_T=1 ;;
23764     esac
23765   else
23766     REPLACE_MBSTATE_T=1
23767   fi
23768
23769
23770
23771   if test $ac_cv_func_mbrtowc = no; then
23772     HAVE_MBRTOWC=0
23773     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23774 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23775    <wchar.h>.
23776    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23777    included before <wchar.h>.  */
23778 #include <stddef.h>
23779 #include <stdio.h>
23780 #include <time.h>
23781 #include <wchar.h>
23782
23783 "
23784 if test "x$ac_cv_have_decl_mbrtowc" = xyes
23785 then :
23786   ac_have_decl=1
23787 else
23788   ac_have_decl=0
23789 fi
23790
23791 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
23792
23793     if test $ac_cv_have_decl_mbrtowc = yes; then
23794                         REPLACE_MBRTOWC=1
23795     fi
23796   else
23797     if test $REPLACE_MBSTATE_T = 1; then
23798       REPLACE_MBRTOWC=1
23799     else
23800
23801
23802
23803      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23804 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23805 if test ${gl_cv_func_mbrtowc_null_arg1+y}
23806 then :
23807   printf %s "(cached) " >&6
23808 else
23809
23810                   case "$host_os" in
23811                   # Guess no on Solaris.
23812         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23813                   # Guess yes otherwise.
23814         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23815       esac
23816       if test $LOCALE_FR_UTF8 != none; then
23817         if test "$cross_compiling" = yes
23818 then :
23819   :
23820 else
23821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23822 /* end confdefs.h.  */
23823
23824 #include <locale.h>
23825 #include <stdlib.h>
23826 #include <string.h>
23827 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23828    <wchar.h>.
23829    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23830    included before <wchar.h>.  */
23831 #include <stddef.h>
23832 #include <stdio.h>
23833 #include <time.h>
23834 #include <wchar.h>
23835 int main ()
23836 {
23837   int result = 0;
23838
23839   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23840     {
23841       char input[] = "\303\237er";
23842       mbstate_t state;
23843       wchar_t wc;
23844       size_t ret;
23845
23846       memset (&state, '\0', sizeof (mbstate_t));
23847       wc = (wchar_t) 0xBADFACE;
23848       ret = mbrtowc (&wc, input, 5, &state);
23849       if (ret != 2)
23850         result |= 1;
23851       if (!mbsinit (&state))
23852         result |= 2;
23853
23854       memset (&state, '\0', sizeof (mbstate_t));
23855       ret = mbrtowc (NULL, input, 5, &state);
23856       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
23857         result |= 4;
23858       if (!mbsinit (&state))
23859         result |= 8;
23860     }
23861   return result;
23862 }
23863 _ACEOF
23864 if ac_fn_c_try_run "$LINENO"
23865 then :
23866   gl_cv_func_mbrtowc_null_arg1=yes
23867 else
23868   gl_cv_func_mbrtowc_null_arg1=no
23869 fi
23870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23871   conftest.$ac_objext conftest.beam conftest.$ac_ext
23872 fi
23873
23874       fi
23875
23876 fi
23877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23878 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23879
23880
23881
23882
23883      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23884 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
23885 if test ${gl_cv_func_mbrtowc_null_arg2+y}
23886 then :
23887   printf %s "(cached) " >&6
23888 else
23889
23890                   case "$host_os" in
23891               # Guess no on OSF/1.
23892         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23893               # Guess yes otherwise.
23894         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23895       esac
23896       if test $LOCALE_FR_UTF8 != none; then
23897         if test "$cross_compiling" = yes
23898 then :
23899   :
23900 else
23901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23902 /* end confdefs.h.  */
23903
23904 #include <locale.h>
23905 #include <string.h>
23906 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23907    <wchar.h>.
23908    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23909    included before <wchar.h>.  */
23910 #include <stddef.h>
23911 #include <stdio.h>
23912 #include <time.h>
23913 #include <wchar.h>
23914 int main ()
23915 {
23916   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23917     {
23918       mbstate_t state;
23919       wchar_t wc;
23920       int ret;
23921
23922       memset (&state, '\0', sizeof (mbstate_t));
23923       wc = (wchar_t) 0xBADFACE;
23924       mbrtowc (&wc, NULL, 5, &state);
23925       /* Check that wc was not modified.  */
23926       if (wc != (wchar_t) 0xBADFACE)
23927         return 2;
23928     }
23929   return 0;
23930 }
23931 _ACEOF
23932 if ac_fn_c_try_run "$LINENO"
23933 then :
23934   gl_cv_func_mbrtowc_null_arg2=yes
23935 else
23936   gl_cv_func_mbrtowc_null_arg2=no
23937 fi
23938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23939   conftest.$ac_objext conftest.beam conftest.$ac_ext
23940 fi
23941
23942       fi
23943
23944 fi
23945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23946 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23947
23948
23949
23950
23951
23952
23953   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23954 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
23955 if test ${gl_cv_func_mbrtowc_retval+y}
23956 then :
23957   printf %s "(cached) " >&6
23958 else
23959
23960                   case "$host_os" in
23961                                    # Guess no on HP-UX, Solaris, native Windows.
23962         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23963                                    # Guess yes otherwise.
23964         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
23965       esac
23966       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23967          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23968         if test "$cross_compiling" = yes
23969 then :
23970   :
23971 else
23972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23973 /* end confdefs.h.  */
23974
23975 #include <locale.h>
23976 #include <string.h>
23977 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23978    <wchar.h>.
23979    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23980    included before <wchar.h>.  */
23981 #include <stddef.h>
23982 #include <stdio.h>
23983 #include <time.h>
23984 #include <wchar.h>
23985 int main ()
23986 {
23987   int result = 0;
23988   int found_some_locale = 0;
23989   /* This fails on Solaris.  */
23990   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23991     {
23992       char input[] = "B\303\274\303\237er"; /* "Büßer" */
23993       mbstate_t state;
23994       wchar_t wc;
23995
23996       memset (&state, '\0', sizeof (mbstate_t));
23997       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23998         {
23999           input[1] = '\0';
24000           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24001             result |= 1;
24002         }
24003       found_some_locale = 1;
24004     }
24005   /* This fails on HP-UX 11.11.  */
24006   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24007     {
24008       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24009       mbstate_t state;
24010       wchar_t wc;
24011
24012       memset (&state, '\0', sizeof (mbstate_t));
24013       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24014         {
24015           input[1] = '\0';
24016           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24017             result |= 2;
24018         }
24019       found_some_locale = 1;
24020     }
24021   /* This fails on native Windows.  */
24022   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24023     {
24024       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24025       mbstate_t state;
24026       wchar_t wc;
24027
24028       memset (&state, '\0', sizeof (mbstate_t));
24029       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24030         {
24031           input[3] = '\0';
24032           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24033             result |= 4;
24034         }
24035       found_some_locale = 1;
24036     }
24037   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24038     {
24039       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24040       mbstate_t state;
24041       wchar_t wc;
24042
24043       memset (&state, '\0', sizeof (mbstate_t));
24044       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24045         {
24046           input[3] = '\0';
24047           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24048             result |= 8;
24049         }
24050       found_some_locale = 1;
24051     }
24052   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24053     {
24054       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24055       mbstate_t state;
24056       wchar_t wc;
24057
24058       memset (&state, '\0', sizeof (mbstate_t));
24059       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24060         {
24061           input[3] = '\0';
24062           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24063             result |= 16;
24064         }
24065       found_some_locale = 1;
24066     }
24067   return (found_some_locale ? result : 77);
24068 }
24069 _ACEOF
24070 if ac_fn_c_try_run "$LINENO"
24071 then :
24072   gl_cv_func_mbrtowc_retval=yes
24073 else
24074   if test $? != 77; then
24075              gl_cv_func_mbrtowc_retval=no
24076            fi
24077
24078 fi
24079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24080   conftest.$ac_objext conftest.beam conftest.$ac_ext
24081 fi
24082
24083       fi
24084
24085 fi
24086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24087 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
24088
24089
24090
24091
24092      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24093 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24094 if test ${gl_cv_func_mbrtowc_nul_retval+y}
24095 then :
24096   printf %s "(cached) " >&6
24097 else
24098
24099                   case "$host_os" in
24100                        # Guess no on Solaris 8 and 9.
24101         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24102                        # Guess yes otherwise.
24103         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24104       esac
24105       if test $LOCALE_ZH_CN != none; then
24106         if test "$cross_compiling" = yes
24107 then :
24108   :
24109 else
24110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24111 /* end confdefs.h.  */
24112
24113 #include <locale.h>
24114 #include <string.h>
24115 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24116    <wchar.h>.
24117    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24118    included before <wchar.h>.  */
24119 #include <stddef.h>
24120 #include <stdio.h>
24121 #include <time.h>
24122 #include <wchar.h>
24123 int main ()
24124 {
24125   /* This fails on Solaris 8 and 9.  */
24126   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24127     {
24128       mbstate_t state;
24129       wchar_t wc;
24130
24131       memset (&state, '\0', sizeof (mbstate_t));
24132       if (mbrtowc (&wc, "", 1, &state) != 0)
24133         return 2;
24134     }
24135   return 0;
24136 }
24137 _ACEOF
24138 if ac_fn_c_try_run "$LINENO"
24139 then :
24140   gl_cv_func_mbrtowc_nul_retval=yes
24141 else
24142   gl_cv_func_mbrtowc_nul_retval=no
24143 fi
24144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24145   conftest.$ac_objext conftest.beam conftest.$ac_ext
24146 fi
24147
24148       fi
24149
24150 fi
24151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24152 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24153
24154
24155
24156      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24157 printf %s "checking whether mbrtowc works on empty input... " >&6; }
24158 if test ${gl_cv_func_mbrtowc_empty_input+y}
24159 then :
24160   printf %s "(cached) " >&6
24161 else
24162
24163                   case "$host_os" in
24164                               # Guess no on AIX and glibc systems.
24165         aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24166                               # Guess yes on native Windows.
24167         mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24168         *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24169       esac
24170       if test "$cross_compiling" = yes
24171 then :
24172   :
24173 else
24174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24175 /* end confdefs.h.  */
24176
24177            #include <wchar.h>
24178            static wchar_t wc;
24179            static mbstate_t mbs;
24180            int
24181            main (void)
24182            {
24183              return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24184            }
24185 _ACEOF
24186 if ac_fn_c_try_run "$LINENO"
24187 then :
24188   gl_cv_func_mbrtowc_empty_input=yes
24189 else
24190   gl_cv_func_mbrtowc_empty_input=no
24191 fi
24192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24193   conftest.$ac_objext conftest.beam conftest.$ac_ext
24194 fi
24195
24196
24197 fi
24198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24199 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
24200
24201
24202      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24203 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
24204 if test ${gl_cv_C_locale_sans_EILSEQ+y}
24205 then :
24206   printf %s "(cached) " >&6
24207 else
24208
24209                gl_cv_C_locale_sans_EILSEQ="guessing no"
24210
24211      if test "$cross_compiling" = yes
24212 then :
24213   case "$host_os" in
24214                  # Guess yes on native Windows.
24215          mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
24216        esac
24217
24218 else
24219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24220 /* end confdefs.h.  */
24221 #include <limits.h>
24222             #include <locale.h>
24223             #include <wchar.h>
24224
24225 int
24226 main (void)
24227 {
24228
24229             int i;
24230             char *locale = setlocale (LC_ALL, "C");
24231             if (! locale)
24232               return 2;
24233             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24234               {
24235                 char c = i;
24236                 wchar_t wc;
24237                 mbstate_t mbs = { 0, };
24238                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24239                 if (1 < ss)
24240                   return 3;
24241               }
24242             return 0;
24243
24244   ;
24245   return 0;
24246 }
24247 _ACEOF
24248 if ac_fn_c_try_run "$LINENO"
24249 then :
24250   gl_cv_C_locale_sans_EILSEQ=yes
24251 else
24252   gl_cv_C_locale_sans_EILSEQ=no
24253 fi
24254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24255   conftest.$ac_objext conftest.beam conftest.$ac_ext
24256 fi
24257
24258
24259 fi
24260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
24261 printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
24262
24263       case "$gl_cv_func_mbrtowc_null_arg1" in
24264         *yes) ;;
24265         *)
24266 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24267
24268            REPLACE_MBRTOWC=1
24269            ;;
24270       esac
24271       case "$gl_cv_func_mbrtowc_null_arg2" in
24272         *yes) ;;
24273         *)
24274 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24275
24276            REPLACE_MBRTOWC=1
24277            ;;
24278       esac
24279       case "$gl_cv_func_mbrtowc_retval" in
24280         *yes) ;;
24281         *)
24282 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24283
24284            REPLACE_MBRTOWC=1
24285            ;;
24286       esac
24287       case "$gl_cv_func_mbrtowc_nul_retval" in
24288         *yes) ;;
24289         *)
24290 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24291
24292            REPLACE_MBRTOWC=1
24293            ;;
24294       esac
24295       case "$gl_cv_func_mbrtowc_empty_input" in
24296         *yes) ;;
24297         *)
24298 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24299
24300            REPLACE_MBRTOWC=1
24301            ;;
24302       esac
24303       case $gl_cv_C_locale_sans_EILSEQ in
24304         *yes) ;;
24305         *)
24306 printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24307
24308            REPLACE_MBRTOWC=1
24309            ;;
24310       esac
24311     fi
24312   fi
24313
24314   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24315
24316
24317
24318
24319
24320
24321
24322
24323   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24324
24325
24326
24327   :
24328
24329   fi
24330
24331
24332
24333
24334
24335           GNULIB_MBRTOWC=1
24336
24337
24338
24339
24340
24341 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24342
24343
24344
24345
24346
24347
24348
24349
24350           GNULIB_MBSCASECMP=1
24351
24352
24353
24354
24355
24356 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24372
24373
24374
24375      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24376 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
24377 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
24378 then :
24379   printf %s "(cached) " >&6
24380 else
24381
24382                   case "$host_os" in
24383                      # Guess no on AIX and OSF/1.
24384         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24385                      # Guess yes otherwise.
24386         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24387       esac
24388       if test $LOCALE_JA != none; then
24389         if test "$cross_compiling" = yes
24390 then :
24391   :
24392 else
24393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394 /* end confdefs.h.  */
24395
24396 #include <locale.h>
24397 #include <string.h>
24398 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24399    <wchar.h>.
24400    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24401    included before <wchar.h>.  */
24402 #include <stddef.h>
24403 #include <stdio.h>
24404 #include <time.h>
24405 #include <wchar.h>
24406 int main ()
24407 {
24408   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24409     {
24410       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24411       mbstate_t state;
24412       wchar_t wc;
24413
24414       memset (&state, '\0', sizeof (mbstate_t));
24415       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24416         if (mbsinit (&state))
24417           return 2;
24418     }
24419   return 0;
24420 }
24421 _ACEOF
24422 if ac_fn_c_try_run "$LINENO"
24423 then :
24424   gl_cv_func_mbrtowc_incomplete_state=yes
24425 else
24426   gl_cv_func_mbrtowc_incomplete_state=no
24427 fi
24428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24429   conftest.$ac_objext conftest.beam conftest.$ac_ext
24430 fi
24431
24432       fi
24433
24434 fi
24435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24436 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24437
24438
24439
24440
24441      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24442 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
24443 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
24444 then :
24445   printf %s "(cached) " >&6
24446 else
24447
24448                   case "$host_os" in
24449                     # Guess no on Solaris 8.
24450         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24451                     # Guess yes otherwise.
24452         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24453       esac
24454       if test $LOCALE_ZH_CN != none; then
24455         if test "$cross_compiling" = yes
24456 then :
24457   :
24458 else
24459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24460 /* end confdefs.h.  */
24461
24462 #include <locale.h>
24463 #include <stdlib.h>
24464 #include <string.h>
24465 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24466    <wchar.h>.
24467    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24468    included before <wchar.h>.  */
24469 #include <stddef.h>
24470 #include <stdio.h>
24471 #include <time.h>
24472 #include <wchar.h>
24473 int main ()
24474 {
24475   /* This fails on Solaris 8:
24476      mbrtowc returns 2, and sets wc to 0x00F0.
24477      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24478   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24479     {
24480       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24481       mbstate_t state;
24482       wchar_t wc;
24483
24484       memset (&state, '\0', sizeof (mbstate_t));
24485       if (mbrtowc (&wc, input + 3, 6, &state) != 4
24486           && mbtowc (&wc, input + 3, 6) == 4)
24487         return 2;
24488     }
24489   return 0;
24490 }
24491 _ACEOF
24492 if ac_fn_c_try_run "$LINENO"
24493 then :
24494   gl_cv_func_mbrtowc_sanitycheck=yes
24495 else
24496   gl_cv_func_mbrtowc_sanitycheck=no
24497 fi
24498 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24499   conftest.$ac_objext conftest.beam conftest.$ac_ext
24500 fi
24501
24502       fi
24503
24504 fi
24505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24506 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24507
24508     REPLACE_MBSTATE_T=0
24509     case "$gl_cv_func_mbrtowc_incomplete_state" in
24510       *yes) ;;
24511       *) REPLACE_MBSTATE_T=1 ;;
24512     esac
24513     case "$gl_cv_func_mbrtowc_sanitycheck" in
24514       *yes) ;;
24515       *) REPLACE_MBSTATE_T=1 ;;
24516     esac
24517   else
24518     REPLACE_MBSTATE_T=1
24519   fi
24520
24521
24522
24523   if test $ac_cv_func_mbsinit = no; then
24524     HAVE_MBSINIT=0
24525     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24526 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24527    <wchar.h>.
24528    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24529    included before <wchar.h>.  */
24530 #include <stddef.h>
24531 #include <stdio.h>
24532 #include <time.h>
24533 #include <wchar.h>
24534
24535 "
24536 if test "x$ac_cv_have_decl_mbsinit" = xyes
24537 then :
24538   ac_have_decl=1
24539 else
24540   ac_have_decl=0
24541 fi
24542
24543 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
24544
24545     if test $ac_cv_have_decl_mbsinit = yes; then
24546                         REPLACE_MBSINIT=1
24547     fi
24548   else
24549     if test $REPLACE_MBSTATE_T = 1; then
24550       REPLACE_MBSINIT=1
24551     else
24552                         case "$host_os" in
24553         mingw*) REPLACE_MBSINIT=1 ;;
24554       esac
24555     fi
24556   fi
24557
24558   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24559
24560
24561
24562
24563
24564
24565
24566
24567   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24568
24569
24570   :
24571
24572   fi
24573
24574
24575
24576
24577
24578           GNULIB_MBSINIT=1
24579
24580
24581
24582
24583
24584 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24585
24586
24587
24588
24589
24590
24591   if test $ac_cv_func_mbslen = yes; then
24592     HAVE_MBSLEN=1
24593   else
24594     HAVE_MBSLEN=0
24595   fi
24596
24597
24598
24599
24600
24601
24602           GNULIB_MBSLEN=1
24603
24604
24605
24606
24607
24608 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24623
24624
24625
24626      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24627 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
24628 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
24629 then :
24630   printf %s "(cached) " >&6
24631 else
24632
24633                   case "$host_os" in
24634                      # Guess no on AIX and OSF/1.
24635         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24636                      # Guess yes otherwise.
24637         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24638       esac
24639       if test $LOCALE_JA != none; then
24640         if test "$cross_compiling" = yes
24641 then :
24642   :
24643 else
24644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24645 /* end confdefs.h.  */
24646
24647 #include <locale.h>
24648 #include <string.h>
24649 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24650    <wchar.h>.
24651    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24652    included before <wchar.h>.  */
24653 #include <stddef.h>
24654 #include <stdio.h>
24655 #include <time.h>
24656 #include <wchar.h>
24657 int main ()
24658 {
24659   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24660     {
24661       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24662       mbstate_t state;
24663       wchar_t wc;
24664
24665       memset (&state, '\0', sizeof (mbstate_t));
24666       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24667         if (mbsinit (&state))
24668           return 2;
24669     }
24670   return 0;
24671 }
24672 _ACEOF
24673 if ac_fn_c_try_run "$LINENO"
24674 then :
24675   gl_cv_func_mbrtowc_incomplete_state=yes
24676 else
24677   gl_cv_func_mbrtowc_incomplete_state=no
24678 fi
24679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24680   conftest.$ac_objext conftest.beam conftest.$ac_ext
24681 fi
24682
24683       fi
24684
24685 fi
24686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24687 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24688
24689
24690
24691
24692      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24693 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
24694 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
24695 then :
24696   printf %s "(cached) " >&6
24697 else
24698
24699                   case "$host_os" in
24700                     # Guess no on Solaris 8.
24701         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24702                     # Guess yes otherwise.
24703         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24704       esac
24705       if test $LOCALE_ZH_CN != none; then
24706         if test "$cross_compiling" = yes
24707 then :
24708   :
24709 else
24710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24711 /* end confdefs.h.  */
24712
24713 #include <locale.h>
24714 #include <stdlib.h>
24715 #include <string.h>
24716 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24717    <wchar.h>.
24718    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24719    included before <wchar.h>.  */
24720 #include <stddef.h>
24721 #include <stdio.h>
24722 #include <time.h>
24723 #include <wchar.h>
24724 int main ()
24725 {
24726   /* This fails on Solaris 8:
24727      mbrtowc returns 2, and sets wc to 0x00F0.
24728      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
24729   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24730     {
24731       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24732       mbstate_t state;
24733       wchar_t wc;
24734
24735       memset (&state, '\0', sizeof (mbstate_t));
24736       if (mbrtowc (&wc, input + 3, 6, &state) != 4
24737           && mbtowc (&wc, input + 3, 6) == 4)
24738         return 2;
24739     }
24740   return 0;
24741 }
24742 _ACEOF
24743 if ac_fn_c_try_run "$LINENO"
24744 then :
24745   gl_cv_func_mbrtowc_sanitycheck=yes
24746 else
24747   gl_cv_func_mbrtowc_sanitycheck=no
24748 fi
24749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24750   conftest.$ac_objext conftest.beam conftest.$ac_ext
24751 fi
24752
24753       fi
24754
24755 fi
24756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24757 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24758
24759     REPLACE_MBSTATE_T=0
24760     case "$gl_cv_func_mbrtowc_incomplete_state" in
24761       *yes) ;;
24762       *) REPLACE_MBSTATE_T=1 ;;
24763     esac
24764     case "$gl_cv_func_mbrtowc_sanitycheck" in
24765       *yes) ;;
24766       *) REPLACE_MBSTATE_T=1 ;;
24767     esac
24768   else
24769     REPLACE_MBSTATE_T=1
24770   fi
24771
24772
24773
24774   if test $ac_cv_func_mbsrtowcs = no; then
24775     HAVE_MBSRTOWCS=0
24776     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24777 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24778    <wchar.h>.
24779    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24780    included before <wchar.h>.  */
24781 #include <stddef.h>
24782 #include <stdio.h>
24783 #include <time.h>
24784 #include <wchar.h>
24785
24786 "
24787 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
24788 then :
24789   ac_have_decl=1
24790 else
24791   ac_have_decl=0
24792 fi
24793
24794 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
24795
24796     if test $ac_cv_have_decl_mbsrtowcs = yes; then
24797                         REPLACE_MBSRTOWCS=1
24798     fi
24799   else
24800     if test $REPLACE_MBSTATE_T = 1; then
24801       REPLACE_MBSRTOWCS=1
24802     else
24803
24804
24805
24806
24807
24808
24809      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24810 printf %s "checking whether mbsrtowcs works... " >&6; }
24811 if test ${gl_cv_func_mbsrtowcs_works+y}
24812 then :
24813   printf %s "(cached) " >&6
24814 else
24815
24816                   case "$host_os" in
24817                                    # Guess no on HP-UX, Solaris, mingw.
24818         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24819                                    # Guess yes otherwise.
24820         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24821       esac
24822       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24823         if test "$cross_compiling" = yes
24824 then :
24825   :
24826 else
24827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24828 /* end confdefs.h.  */
24829
24830 #include <locale.h>
24831 #include <string.h>
24832 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24833    <wchar.h>.
24834    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24835    included before <wchar.h>.  */
24836 #include <stddef.h>
24837 #include <stdio.h>
24838 #include <time.h>
24839 #include <wchar.h>
24840 int main ()
24841 {
24842   int result = 0;
24843   /* Test whether the function supports a NULL destination argument.
24844      This fails on native Windows.  */
24845   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24846     {
24847       const char input[] = "\337er";
24848       const char *src = input;
24849       mbstate_t state;
24850
24851       memset (&state, '\0', sizeof (mbstate_t));
24852       if (mbsrtowcs (NULL, &src, 1, &state) != 3
24853           || src != input)
24854         result |= 1;
24855     }
24856   /* Test whether the function works when started with a conversion state
24857      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
24858   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24859     {
24860       const char input[] = "B\303\274\303\237er";
24861       mbstate_t state;
24862
24863       memset (&state, '\0', sizeof (mbstate_t));
24864       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24865         if (!mbsinit (&state))
24866           {
24867             const char *src = input + 2;
24868             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24869               result |= 2;
24870           }
24871     }
24872   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24873     {
24874       const char input[] = "<\306\374\313\334\270\354>";
24875       mbstate_t state;
24876
24877       memset (&state, '\0', sizeof (mbstate_t));
24878       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24879         if (!mbsinit (&state))
24880           {
24881             const char *src = input + 4;
24882             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24883               result |= 4;
24884           }
24885     }
24886   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24887     {
24888       const char input[] = "B\250\271\201\060\211\070er";
24889       mbstate_t state;
24890
24891       memset (&state, '\0', sizeof (mbstate_t));
24892       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24893         if (!mbsinit (&state))
24894           {
24895             const char *src = input + 2;
24896             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24897               result |= 8;
24898           }
24899     }
24900   return result;
24901 }
24902 _ACEOF
24903 if ac_fn_c_try_run "$LINENO"
24904 then :
24905   gl_cv_func_mbsrtowcs_works=yes
24906 else
24907   gl_cv_func_mbsrtowcs_works=no
24908 fi
24909 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24910   conftest.$ac_objext conftest.beam conftest.$ac_ext
24911 fi
24912
24913       fi
24914
24915 fi
24916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24917 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
24918
24919       case "$gl_cv_func_mbsrtowcs_works" in
24920         *yes) ;;
24921         *) REPLACE_MBSRTOWCS=1 ;;
24922       esac
24923     fi
24924   fi
24925
24926   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24927
24928
24929
24930
24931
24932
24933
24934
24935   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24946
24947
24948   :
24949
24950   fi
24951
24952
24953
24954
24955
24956           GNULIB_MBSRTOWCS=1
24957
24958
24959
24960
24961
24962 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24963
24964
24965
24966
24967
24968
24969
24970
24971           GNULIB_MBSSTR=1
24972
24973
24974
24975
24976
24977 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
24978
24979
24980
24981
24982
24983
24984   if false; then
24985     REPLACE_MBTOWC=1
24986   fi
24987
24988   if test $REPLACE_MBTOWC = 1; then
24989
24990
24991
24992
24993
24994
24995
24996
24997   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
24998
24999
25000   :
25001
25002   fi
25003
25004
25005
25006
25007
25008           GNULIB_MBTOWC=1
25009
25010
25011
25012
25013
25014 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25015
25016
25017
25018
25019
25020   :
25021
25022
25023   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
25024
25025
25026
25027
25028
25029
25030
25031
25032   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25033
25034
25035   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25036 if test "x$ac_cv_header_bp_sym_h" = xyes
25037 then :
25038   printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
25039
25040 fi
25041
25042
25043   fi
25044
25045
25046
25047
25048
25049           GNULIB_MEMCHR=1
25050
25051
25052
25053
25054
25055 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25056
25057
25058
25059
25060
25061
25062
25063
25064   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25065 printf %s "checking whether mkdir handles trailing slash... " >&6; }
25066 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
25067 then :
25068   printf %s "(cached) " >&6
25069 else
25070   rm -rf conftest.dir
25071       if test "$cross_compiling" = yes
25072 then :
25073   case "$host_os" in
25074                           # Guess yes on Linux systems.
25075          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25076                           # Guess yes on glibc systems.
25077          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25078                           # Guess yes on MSVC, no on mingw.
25079          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25080 /* end confdefs.h.  */
25081
25082 #ifdef _MSC_VER
25083  Known
25084 #endif
25085
25086 _ACEOF
25087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25088   $EGREP "Known" >/dev/null 2>&1
25089 then :
25090   gl_cv_func_mkdir_trailing_slash_works="guessing yes"
25091 else
25092   gl_cv_func_mkdir_trailing_slash_works="guessing no"
25093 fi
25094 rm -rf conftest*
25095
25096                           ;;
25097                           # If we don't know, assume the worst.
25098          *)               gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
25099        esac
25100
25101 else
25102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25103 /* end confdefs.h.  */
25104
25105 #       include <sys/types.h>
25106 #       include <sys/stat.h>
25107
25108 int
25109 main (void)
25110 {
25111 return mkdir ("conftest.dir/", 0700);
25112   ;
25113   return 0;
25114 }
25115 _ACEOF
25116 if ac_fn_c_try_run "$LINENO"
25117 then :
25118   gl_cv_func_mkdir_trailing_slash_works=yes
25119 else
25120   gl_cv_func_mkdir_trailing_slash_works=no
25121 fi
25122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25123   conftest.$ac_objext conftest.beam conftest.$ac_ext
25124 fi
25125
25126     rm -rf conftest.dir
25127
25128
25129 fi
25130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25131 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25132   case "$gl_cv_func_mkdir_trailing_slash_works" in
25133     *yes) ;;
25134     *)
25135       REPLACE_MKDIR=1
25136       ;;
25137   esac
25138
25139   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25140 printf %s "checking whether mkdir handles trailing dot... " >&6; }
25141 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
25142 then :
25143   printf %s "(cached) " >&6
25144 else
25145   rm -rf conftest.dir
25146       if test "$cross_compiling" = yes
25147 then :
25148   case "$host_os" in
25149                         # Guess yes on glibc systems.
25150          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25151                         # Guess no on native Windows.
25152          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25153                         # If we don't know, assume the worst.
25154          *)             gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25155        esac
25156
25157 else
25158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25159 /* end confdefs.h.  */
25160
25161 #       include <sys/types.h>
25162 #       include <sys/stat.h>
25163
25164 int
25165 main (void)
25166 {
25167 return !mkdir ("conftest.dir/./", 0700);
25168   ;
25169   return 0;
25170 }
25171 _ACEOF
25172 if ac_fn_c_try_run "$LINENO"
25173 then :
25174   gl_cv_func_mkdir_trailing_dot_works=yes
25175 else
25176   gl_cv_func_mkdir_trailing_dot_works=no
25177 fi
25178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25179   conftest.$ac_objext conftest.beam conftest.$ac_ext
25180 fi
25181
25182     rm -rf conftest.dir
25183
25184
25185 fi
25186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25187 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25188   case "$gl_cv_func_mkdir_trailing_dot_works" in
25189     *yes) ;;
25190     *)
25191       REPLACE_MKDIR=1
25192
25193 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25194
25195       ;;
25196   esac
25197
25198   if test $REPLACE_MKDIR = 1; then
25199
25200
25201
25202
25203
25204
25205
25206
25207   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25208
25209   fi
25210
25211
25212
25213
25214   if test $ac_cv_func_mkstemp = yes; then
25215     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
25216 printf %s "checking for working mkstemp... " >&6; }
25217 if test ${gl_cv_func_working_mkstemp+y}
25218 then :
25219   printf %s "(cached) " >&6
25220 else
25221
25222         mkdir conftest.mkstemp
25223         if test "$cross_compiling" = yes
25224 then :
25225   case "$host_os" in
25226                             # Guess yes on glibc systems.
25227              *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
25228                             # Guess no on native Windows.
25229              mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
25230                             # If we don't know, assume the worst.
25231              *)             gl_cv_func_working_mkstemp="guessing no" ;;
25232            esac
25233
25234 else
25235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25236 /* end confdefs.h.  */
25237 $ac_includes_default
25238 int
25239 main (void)
25240 {
25241 int result = 0;
25242               int i;
25243               off_t large = (off_t) 4294967295u;
25244               if (large < 0)
25245                 large = 2147483647;
25246               umask (0);
25247               for (i = 0; i < 70; i++)
25248                 {
25249                   char templ[] = "conftest.mkstemp/coXXXXXX";
25250                   int (*mkstemp_function) (char *) = mkstemp;
25251                   int fd = mkstemp_function (templ);
25252                   if (fd < 0)
25253                     result |= 1;
25254                   else
25255                     {
25256                       struct stat st;
25257                       if (lseek (fd, large, SEEK_SET) != large)
25258                         result |= 2;
25259                       if (fstat (fd, &st) < 0)
25260                         result |= 4;
25261                       else if (st.st_mode & 0077)
25262                         result |= 8;
25263                       if (close (fd))
25264                         result |= 16;
25265                     }
25266                 }
25267               return result;
25268   ;
25269   return 0;
25270 }
25271 _ACEOF
25272 if ac_fn_c_try_run "$LINENO"
25273 then :
25274   gl_cv_func_working_mkstemp=yes
25275 else
25276   gl_cv_func_working_mkstemp=no
25277 fi
25278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25279   conftest.$ac_objext conftest.beam conftest.$ac_ext
25280 fi
25281
25282         rm -rf conftest.mkstemp
25283
25284 fi
25285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
25286 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
25287     case "$gl_cv_func_working_mkstemp" in
25288       *yes) ;;
25289       *)
25290         REPLACE_MKSTEMP=1
25291         ;;
25292     esac
25293   else
25294     HAVE_MKSTEMP=0
25295   fi
25296
25297   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
25298
25299
25300
25301
25302
25303
25304
25305
25306   gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
25307
25308
25309
25310   fi
25311
25312
25313
25314
25315
25316           GNULIB_MKSTEMP=1
25317
25318
25319
25320
25321
25322 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
25323
25324
25325
25326
25327
25328
25329
25330
25331   REPLACE_MKTIME=0
25332   if test "$gl_cv_func_working_mktime" != yes; then
25333     REPLACE_MKTIME=1
25334
25335 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
25336
25337   fi
25338   case "$host_os" in
25339     mingw*)
25340       REPLACE_MKTIME=1
25341
25342 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
25343
25344       ;;
25345   esac
25346
25347   if test $REPLACE_MKTIME = 1; then
25348
25349
25350
25351
25352
25353
25354
25355
25356   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25357
25358     :
25359   fi
25360
25361
25362
25363
25364
25365           GNULIB_MKTIME=1
25366
25367
25368
25369
25370
25371 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
25372
25373
25374
25375
25376
25377
25378   WANT_MKTIME_INTERNAL=0
25379     ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
25380 if test "x$ac_cv_func___mktime_internal" = xyes
25381 then :
25382
25383 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
25384
25385
25386 else
25387             WANT_MKTIME_INTERNAL=1
25388
25389 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
25390
25391
25392 fi
25393
25394
25395   if test $WANT_MKTIME_INTERNAL = 1; then
25396
25397
25398
25399
25400
25401
25402
25403
25404   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25405
25406     :
25407   fi
25408
25409   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25410
25411
25412
25413
25414
25415
25416
25417
25418   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25419
25420   fi
25421
25422   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25423
25424
25425
25426
25427
25428
25429
25430
25431   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25432
25433   fi
25434
25435
25436 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
25437
25438
25439
25440
25441
25442
25443
25444      if test $ac_cv_func_nl_langinfo = yes; then
25445     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
25446     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
25447 printf %s "checking whether YESEXPR works... " >&6; }
25448 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
25449 then :
25450   printf %s "(cached) " >&6
25451 else
25452   if test "$cross_compiling" = yes
25453 then :
25454
25455          case "$host_os" in
25456                    # Guess no on irix systems.
25457            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
25458                    # Guess yes elsewhere.
25459            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
25460          esac
25461
25462 else
25463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25464 /* end confdefs.h.  */
25465 #include <langinfo.h>
25466
25467 int
25468 main (void)
25469 {
25470 return !*nl_langinfo(YESEXPR);
25471
25472   ;
25473   return 0;
25474 }
25475 _ACEOF
25476 if ac_fn_c_try_run "$LINENO"
25477 then :
25478   gl_cv_func_nl_langinfo_yesexpr_works=yes
25479 else
25480   gl_cv_func_nl_langinfo_yesexpr_works=no
25481 fi
25482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25483   conftest.$ac_objext conftest.beam conftest.$ac_ext
25484 fi
25485
25486
25487 fi
25488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
25489 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
25490     case $gl_cv_func_nl_langinfo_yesexpr_works in
25491       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
25492       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
25493     esac
25494
25495 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
25496
25497     if test $HAVE_LANGINFO_CODESET = 1 \
25498        && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
25499        && test $HAVE_LANGINFO_ALTMON = 1 \
25500        && test $HAVE_LANGINFO_ERA = 1 \
25501        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
25502       :
25503     else
25504       REPLACE_NL_LANGINFO=1
25505
25506 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
25507
25508     fi
25509   else
25510     HAVE_NL_LANGINFO=0
25511   fi
25512
25513   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
25514
25515
25516
25517
25518
25519
25520
25521
25522   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
25523
25524   fi
25525
25526
25527
25528
25529
25530           GNULIB_NL_LANGINFO=1
25531
25532
25533
25534
25535
25536 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
25537
25538
25539
25540
25541  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
25542
25543
25544
25545
25546
25547
25548
25549 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
25550
25551
25552
25553
25554
25555   case "$host_os" in
25556     mingw* | pw*)
25557       REPLACE_OPEN=1
25558       ;;
25559     *)
25560
25561       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
25562         REPLACE_OPEN=1
25563       fi
25564       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25565 printf %s "checking whether open recognizes a trailing slash... " >&6; }
25566 if test ${gl_cv_func_open_slash+y}
25567 then :
25568   printf %s "(cached) " >&6
25569 else
25570   # Assume that if we have lstat, we can also check symlinks.
25571           if test $ac_cv_func_lstat = yes; then
25572             touch conftest.tmp
25573             ln -s conftest.tmp conftest.lnk
25574           fi
25575           if test "$cross_compiling" = yes
25576 then :
25577
25578              case "$host_os" in
25579                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25580                  gl_cv_func_open_slash="guessing no" ;;
25581                *)
25582                  gl_cv_func_open_slash="guessing yes" ;;
25583              esac
25584
25585 else
25586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25587 /* end confdefs.h.  */
25588
25589 #include <fcntl.h>
25590 #if HAVE_UNISTD_H
25591 # include <unistd.h>
25592 #endif
25593 int main ()
25594 {
25595   int result = 0;
25596 #if HAVE_LSTAT
25597   if (open ("conftest.lnk/", O_RDONLY) != -1)
25598     result |= 1;
25599 #endif
25600   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25601     result |= 2;
25602   return result;
25603 }
25604 _ACEOF
25605 if ac_fn_c_try_run "$LINENO"
25606 then :
25607   gl_cv_func_open_slash=yes
25608 else
25609   gl_cv_func_open_slash=no
25610 fi
25611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25612   conftest.$ac_objext conftest.beam conftest.$ac_ext
25613 fi
25614
25615           rm -f conftest.sl conftest.tmp conftest.lnk
25616
25617 fi
25618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25619 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
25620       case "$gl_cv_func_open_slash" in
25621         *no)
25622
25623 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25624
25625           REPLACE_OPEN=1
25626           ;;
25627       esac
25628       ;;
25629   esac
25630
25631
25632
25633   if test $REPLACE_OPEN = 1; then
25634
25635
25636
25637
25638
25639
25640
25641
25642   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25643
25644
25645
25646   :
25647
25648   fi
25649
25650
25651
25652
25653
25654           GNULIB_OPEN=1
25655
25656
25657
25658
25659
25660 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25661
25662
25663
25664
25665
25666
25667   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25668 "
25669 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
25670 then :
25671   ac_have_decl=1
25672 else
25673   ac_have_decl=0
25674 fi
25675
25676 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
25677
25678   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25679 "
25680 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
25681 then :
25682   ac_have_decl=1
25683 else
25684   ac_have_decl=0
25685 fi
25686
25687 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
25688
25689
25690
25691   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
25692
25693
25694
25695   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
25696
25697
25698       :
25699
25700
25701   :
25702
25703
25704
25705
25706   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25707 if test "x$ac_cv_func_raise" = xyes
25708 then :
25709   printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
25710
25711 fi
25712
25713   if test $ac_cv_func_raise = no; then
25714     HAVE_RAISE=0
25715   else
25716
25717
25718       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25719         REPLACE_RAISE=1
25720       fi
25721
25722
25723
25724
25725
25726   if test $gl_cv_type_sigset_t = yes; then
25727     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
25728 if test "x$ac_cv_func_sigprocmask" = xyes
25729 then :
25730   gl_cv_func_sigprocmask=1
25731 fi
25732
25733   fi
25734   if test -z "$gl_cv_func_sigprocmask"; then
25735     HAVE_POSIX_SIGNALBLOCKING=0
25736   fi
25737
25738       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
25739         :
25740       fi
25741
25742   fi
25743
25744   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25745
25746
25747
25748
25749
25750
25751
25752
25753   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25754
25755     :
25756   fi
25757
25758
25759
25760
25761
25762           GNULIB_RAISE=1
25763
25764
25765
25766
25767
25768 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25769
25770
25771
25772
25773
25774
25775
25776   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25777 if test "x$ac_cv_func_rawmemchr" = xyes
25778 then :
25779   printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
25780
25781 fi
25782
25783   if test $ac_cv_func_rawmemchr = no; then
25784     HAVE_RAWMEMCHR=0
25785   fi
25786
25787   if test $HAVE_RAWMEMCHR = 0; then
25788
25789
25790
25791
25792
25793
25794
25795
25796   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25797
25798     :
25799   fi
25800
25801
25802
25803
25804
25805           GNULIB_RAWMEMCHR=1
25806
25807
25808
25809
25810
25811 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25812
25813
25814
25815
25816
25817
25818   if test $ac_cv_func_readlink = no; then
25819     HAVE_READLINK=0
25820   else
25821     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25822 printf %s "checking whether readlink signature is correct... " >&6; }
25823 if test ${gl_cv_decl_readlink_works+y}
25824 then :
25825   printf %s "(cached) " >&6
25826 else
25827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25828 /* end confdefs.h.  */
25829 #include <unistd.h>
25830       /* Cause compilation failure if original declaration has wrong type.  */
25831       ssize_t readlink (const char *, char *, size_t);
25832 int
25833 main (void)
25834 {
25835
25836   ;
25837   return 0;
25838 }
25839 _ACEOF
25840 if ac_fn_c_try_compile "$LINENO"
25841 then :
25842   gl_cv_decl_readlink_works=yes
25843 else
25844   gl_cv_decl_readlink_works=no
25845 fi
25846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25847 fi
25848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25849 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
25850             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25851 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
25852 if test ${gl_cv_func_readlink_works+y}
25853 then :
25854   printf %s "(cached) " >&6
25855 else
25856   # We have readlink, so assume ln -s works.
25857        ln -s conftest.no-such conftest.link
25858        ln -s conftest.link conftest.lnk2
25859        if test "$cross_compiling" = yes
25860 then :
25861   case "$host_os" in
25862                              # Guess yes on Linux systems.
25863             linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
25864                              # Guess yes on glibc systems.
25865             *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
25866                              # If we don't know, assume the worst.
25867             *)               gl_cv_func_readlink_works="guessing no" ;;
25868           esac
25869
25870 else
25871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25872 /* end confdefs.h.  */
25873 #include <unistd.h>
25874
25875 int
25876 main (void)
25877 {
25878 char buf[20];
25879       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25880   ;
25881   return 0;
25882 }
25883 _ACEOF
25884 if ac_fn_c_try_run "$LINENO"
25885 then :
25886   gl_cv_func_readlink_works=yes
25887 else
25888   gl_cv_func_readlink_works=no
25889 fi
25890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25891   conftest.$ac_objext conftest.beam conftest.$ac_ext
25892 fi
25893
25894       rm -f conftest.link conftest.lnk2
25895 fi
25896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25897 printf "%s\n" "$gl_cv_func_readlink_works" >&6; }
25898     case "$gl_cv_func_readlink_works" in
25899       *yes)
25900         if test "$gl_cv_decl_readlink_works" != yes; then
25901           REPLACE_READLINK=1
25902         fi
25903         ;;
25904       *)
25905
25906 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25907
25908         REPLACE_READLINK=1
25909         ;;
25910     esac
25911   fi
25912
25913   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25914
25915
25916
25917
25918
25919
25920
25921
25922   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25923
25924
25925   :
25926
25927   fi
25928
25929
25930
25931
25932
25933           GNULIB_READLINK=1
25934
25935
25936
25937
25938
25939 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
25940
25941
25942
25943
25944
25945 # Check whether --with-included-regex was given.
25946 if test ${with_included_regex+y}
25947 then :
25948   withval=$with_included_regex;
25949 fi
25950
25951
25952   case $with_included_regex in #(
25953   yes|no) ac_use_included_regex=$with_included_regex
25954         ;;
25955   '')
25956     # If the system regex support is good enough that it passes the
25957     # following run test, then default to *not* using the included regex.c.
25958     # If cross compiling, assume the test would fail and use the included
25959     # regex.c.
25960
25961
25962     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
25963 printf %s "checking for working re_compile_pattern... " >&6; }
25964 if test ${gl_cv_func_re_compile_pattern_working+y}
25965 then :
25966   printf %s "(cached) " >&6
25967 else
25968   if test "$cross_compiling" = yes
25969 then :
25970   case "$host_os" in
25971                    # Guess no on native Windows.
25972            mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
25973                    # Otherwise, assume it is not working.
25974            *)      gl_cv_func_re_compile_pattern_working="guessing no" ;;
25975          esac
25976
25977 else
25978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25979 /* end confdefs.h.  */
25980 #include <regex.h>
25981
25982             #include <locale.h>
25983             #include <limits.h>
25984             #include <string.h>
25985
25986             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
25987             # include <signal.h>
25988             # include <unistd.h>
25989             #endif
25990
25991             #if HAVE_MALLOC_H
25992             # include <malloc.h>
25993             #endif
25994
25995             #ifdef M_CHECK_ACTION
25996             /* Exit with distinguishable exit code.  */
25997             static void sigabrt_no_core (int sig) { raise (SIGTERM); }
25998             #endif
25999
26000 int
26001 main (void)
26002 {
26003 int result = 0;
26004             static struct re_pattern_buffer regex;
26005             unsigned char folded_chars[UCHAR_MAX + 1];
26006             int i;
26007             const char *s;
26008             struct re_registers regs;
26009
26010             /* Some builds of glibc go into an infinite loop on this
26011                test.  Use alarm to force death, and mallopt to avoid
26012                malloc recursion in diagnosing the corrupted heap. */
26013 #if HAVE_DECL_ALARM
26014             signal (SIGALRM, SIG_DFL);
26015             alarm (2);
26016 #endif
26017 #ifdef M_CHECK_ACTION
26018             signal (SIGABRT, sigabrt_no_core);
26019             mallopt (M_CHECK_ACTION, 2);
26020 #endif
26021
26022             if (setlocale (LC_ALL, "en_US.UTF-8"))
26023               {
26024                 {
26025                   /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26026                      This test needs valgrind to catch the bug on Debian
26027                      GNU/Linux 3.1 x86, but it might catch the bug better
26028                      on other platforms and it shouldn't hurt to try the
26029                      test here.  */
26030                   static char const pat[] = "insert into";
26031                   static char const data[] =
26032                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26033                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26034                                  | RE_ICASE);
26035                   memset (&regex, 0, sizeof regex);
26036                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26037                   if (s)
26038                     result |= 1;
26039                   else if (re_search (&regex, data, sizeof data - 1,
26040                                       0, sizeof data - 1, &regs)
26041                            != -1)
26042                     result |= 1;
26043                   regfree (&regex);
26044                 }
26045
26046                 {
26047                   /* This test is from glibc bug 15078.
26048                      The test case is from Andreas Schwab in
26049                      <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26050                      */
26051                   static char const pat[] = "[^x]x";
26052                   static char const data[] =
26053                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26054                     "\xe1\x80\x80"
26055                     "\xe1\x80\xbb"
26056                     "\xe1\x80\xbd"
26057                     "\xe1\x80\x94"
26058                     "\xe1\x80\xba"
26059                     "\xe1\x80\xaf"
26060                     "\xe1\x80\x95"
26061                     "\xe1\x80\xba"
26062                     "x";
26063                   re_set_syntax (0);
26064                   memset (&regex, 0, sizeof regex);
26065                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
26066                   if (s)
26067                     result |= 1;
26068                   else
26069                     {
26070                       i = re_search (&regex, data, sizeof data - 1,
26071                                      0, sizeof data - 1, 0);
26072                       if (i != 0 && i != 21)
26073                         result |= 1;
26074                     }
26075                   regfree (&regex);
26076                 }
26077
26078                 if (! setlocale (LC_ALL, "C"))
26079                   return 1;
26080               }
26081
26082             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
26083             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26084             memset (&regex, 0, sizeof regex);
26085             s = re_compile_pattern ("a[^x]b", 6, &regex);
26086             if (s)
26087               result |= 2;
26088             /* This should fail, but succeeds for glibc-2.5.  */
26089             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
26090               result |= 2;
26091
26092             /* This regular expression is from Spencer ere test number 75
26093                in grep-2.3.  */
26094             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26095             memset (&regex, 0, sizeof regex);
26096             for (i = 0; i <= UCHAR_MAX; i++)
26097               folded_chars[i] = i;
26098             regex.translate = folded_chars;
26099             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
26100             /* This should fail with _Invalid character class name_ error.  */
26101             if (!s)
26102               result |= 4;
26103
26104             /* Ensure that [b-a] is diagnosed as invalid, when
26105                using RE_NO_EMPTY_RANGES. */
26106             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26107             memset (&regex, 0, sizeof regex);
26108             s = re_compile_pattern ("a[b-a]", 6, &regex);
26109             if (s == 0)
26110               result |= 8;
26111
26112             /* This should succeed, but does not for glibc-2.1.3.  */
26113             memset (&regex, 0, sizeof regex);
26114             s = re_compile_pattern ("{1", 2, &regex);
26115             if (s)
26116               result |= 8;
26117
26118             /* The following example is derived from a problem report
26119                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
26120             memset (&regex, 0, sizeof regex);
26121             s = re_compile_pattern ("[an\371]*n", 7, &regex);
26122             if (s)
26123               result |= 8;
26124             /* This should match, but does not for glibc-2.2.1.  */
26125             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
26126               result |= 8;
26127
26128             memset (&regex, 0, sizeof regex);
26129             s = re_compile_pattern ("x", 1, &regex);
26130             if (s)
26131               result |= 8;
26132             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
26133             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
26134               result |= 8;
26135
26136             /* The version of regex.c in older versions of gnulib
26137                ignored RE_ICASE.  Detect that problem too.  */
26138             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26139             memset (&regex, 0, sizeof regex);
26140             s = re_compile_pattern ("x", 1, &regex);
26141             if (s)
26142               result |= 16;
26143             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
26144               result |= 16;
26145
26146             /* Catch a bug reported by Vin Shelton in
26147                https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
26148                */
26149             re_set_syntax (RE_SYNTAX_POSIX_BASIC
26150                            & ~RE_CONTEXT_INVALID_DUP
26151                            & ~RE_NO_EMPTY_RANGES);
26152             memset (&regex, 0, sizeof regex);
26153             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
26154             if (s)
26155               result |= 32;
26156
26157             /* REG_STARTEND was added to glibc on 2004-01-15.
26158                Reject older versions.  */
26159             if (! REG_STARTEND)
26160               result |= 64;
26161
26162             /* Matching with the compiled form of this regexp would provoke
26163                an assertion failure prior to glibc-2.28:
26164                  regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
26165                With glibc-2.28, compilation fails and reports the invalid
26166                back reference.  */
26167             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26168             memset (&regex, 0, sizeof regex);
26169             s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
26170             if (!s || strcmp (s, "Invalid back reference"))
26171               result |= 64;
26172
26173 #if 0
26174             /* It would be nice to reject hosts whose regoff_t values are too
26175                narrow (including glibc on hosts with 64-bit ptrdiff_t and
26176                32-bit int), but we should wait until glibc implements this
26177                feature.  Otherwise, support for equivalence classes and
26178                multibyte collation symbols would always be broken except
26179                when compiling --without-included-regex.   */
26180             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26181                 || sizeof (regoff_t) < sizeof (ssize_t))
26182               result |= 64;
26183 #endif
26184
26185             return result;
26186
26187   ;
26188   return 0;
26189 }
26190 _ACEOF
26191 if ac_fn_c_try_run "$LINENO"
26192 then :
26193   gl_cv_func_re_compile_pattern_working=yes
26194 else
26195   gl_cv_func_re_compile_pattern_working=no
26196 fi
26197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26198   conftest.$ac_objext conftest.beam conftest.$ac_ext
26199 fi
26200
26201
26202 fi
26203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26204 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
26205     case "$gl_cv_func_re_compile_pattern_working" in #(
26206       *yes) ac_use_included_regex=no;; #(
26207       *no) ac_use_included_regex=yes;;
26208     esac
26209     ;;
26210   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26211     ;;
26212   esac
26213
26214   if test $ac_use_included_regex = yes; then
26215
26216 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26217
26218
26219 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26220
26221
26222 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26223
26224
26225 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26226
26227
26228 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26229
26230
26231 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26232
26233
26234 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
26235
26236
26237 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
26238
26239
26240 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
26241
26242
26243 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
26244
26245
26246 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26247
26248
26249 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
26250
26251
26252 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
26253
26254
26255 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
26256
26257
26258 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
26259
26260
26261 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
26262
26263
26264 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
26265
26266   fi
26267
26268   if test $ac_use_included_regex = yes; then
26269
26270
26271
26272
26273
26274
26275
26276
26277   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26278
26279
26280
26281
26282
26283
26284
26285
26286   ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26287 if test "x$ac_cv_header_libintl_h" = xyes
26288 then :
26289   printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
26290
26291 fi
26292
26293
26294   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26295 "
26296 if test "x$ac_cv_have_decl_isblank" = xyes
26297 then :
26298   ac_have_decl=1
26299 else
26300   ac_have_decl=0
26301 fi
26302
26303 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
26304
26305
26306   fi
26307
26308
26309      if test $ac_cv_func_setenv = no; then
26310     HAVE_SETENV=0
26311   else
26312     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
26313 printf %s "checking whether setenv validates arguments... " >&6; }
26314 if test ${gl_cv_func_setenv_works+y}
26315 then :
26316   printf %s "(cached) " >&6
26317 else
26318   if test "$cross_compiling" = yes
26319 then :
26320   case "$host_os" in
26321                         # Guess yes on glibc systems.
26322          *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
26323                         # If we don't know, assume the worst.
26324          *)             gl_cv_func_setenv_works="guessing no" ;;
26325        esac
26326
26327 else
26328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26329 /* end confdefs.h.  */
26330
26331        #include <stdlib.h>
26332        #include <errno.h>
26333        #include <string.h>
26334
26335 int
26336 main (void)
26337 {
26338
26339        int result = 0;
26340        {
26341          if (setenv ("", "", 0) != -1)
26342            result |= 1;
26343          else if (errno != EINVAL)
26344            result |= 2;
26345        }
26346        {
26347          if (setenv ("a", "=", 1) != 0)
26348            result |= 4;
26349          else if (strcmp (getenv ("a"), "=") != 0)
26350            result |= 8;
26351        }
26352        return result;
26353
26354   ;
26355   return 0;
26356 }
26357 _ACEOF
26358 if ac_fn_c_try_run "$LINENO"
26359 then :
26360   gl_cv_func_setenv_works=yes
26361 else
26362   gl_cv_func_setenv_works=no
26363 fi
26364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26365   conftest.$ac_objext conftest.beam conftest.$ac_ext
26366 fi
26367
26368 fi
26369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
26370 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
26371     case "$gl_cv_func_setenv_works" in
26372       *yes) ;;
26373       *)
26374         REPLACE_SETENV=1
26375         ;;
26376     esac
26377   fi
26378
26379   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
26380
26381
26382
26383
26384
26385
26386
26387
26388   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
26389
26390   fi
26391
26392
26393
26394
26395
26396           GNULIB_SETENV=1
26397
26398
26399
26400
26401
26402 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
26403
26404
26405
26406
26407
26408
26409   if test $ac_cv_func_sigaction = yes; then
26410     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
26411 "
26412 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
26413 then :
26414
26415 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
26416
26417
26418 fi
26419
26420     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
26421       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
26422     fi
26423   else
26424     HAVE_SIGACTION=0
26425   fi
26426
26427   if test $HAVE_SIGACTION = 0; then
26428
26429
26430
26431
26432
26433
26434
26435
26436   gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
26437
26438
26439
26440
26441
26442
26443
26444   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
26445 #include <signal.h>
26446
26447 "
26448 if test "x$ac_cv_type_siginfo_t" = xyes
26449 then :
26450
26451 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
26452
26453
26454 fi
26455
26456   if test $ac_cv_type_siginfo_t = no; then
26457     HAVE_SIGINFO_T=0
26458   fi
26459
26460   fi
26461
26462
26463
26464
26465
26466           GNULIB_SIGACTION=1
26467
26468
26469
26470
26471
26472 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487      if test $gl_cv_have_include_next = yes; then
26488        gl_cv_next_signal_h='<'signal.h'>'
26489      else
26490        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26491 printf %s "checking absolute name of <signal.h>... " >&6; }
26492 if test ${gl_cv_next_signal_h+y}
26493 then :
26494   printf %s "(cached) " >&6
26495 else
26496
26497
26498
26499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500 /* end confdefs.h.  */
26501 #include <signal.h>
26502 _ACEOF
26503                 case "$host_os" in
26504     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26505     *)    gl_absname_cpp="$ac_cpp" ;;
26506   esac
26507
26508   case "$host_os" in
26509     mingw*)
26510                                           gl_dirsep_regex='[/\\]'
26511       ;;
26512     *)
26513       gl_dirsep_regex='\/'
26514       ;;
26515   esac
26516       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26517   gl_header_literal_regex=`echo 'signal.h' \
26518                            | sed -e "$gl_make_literal_regex_sed"`
26519   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26520       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26521       s|^/[^/]|//&|
26522       p
26523       q
26524     }'
26525
26526         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26527   sed -n "$gl_absolute_header_sed"`
26528
26529            gl_header=$gl_cv_absolute_signal_h
26530            gl_cv_next_signal_h='"'$gl_header'"'
26531
26532
26533 fi
26534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26535 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
26536      fi
26537      NEXT_SIGNAL_H=$gl_cv_next_signal_h
26538
26539      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26540        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26541        gl_next_as_first_directive='<'signal.h'>'
26542      else
26543        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26544        gl_next_as_first_directive=$gl_cv_next_signal_h
26545      fi
26546      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
26547
26548
26549
26550
26551
26552 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
26553 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
26554   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26555 #include <signal.h>
26556
26557 "
26558 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
26559 then :
26560
26561 else
26562   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
26563 fi
26564
26565
26566
26567
26568
26569
26570
26571   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26572 #include <signal.h>
26573
26574 "
26575 if test "x$ac_cv_type_sighandler_t" = xyes
26576 then :
26577
26578 else
26579   HAVE_SIGHANDLER_T=0
26580 fi
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590   if test $gl_cv_type_sigset_t = yes; then
26591     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
26592 if test "x$ac_cv_func_sigprocmask" = xyes
26593 then :
26594   gl_cv_func_sigprocmask=1
26595 fi
26596
26597   fi
26598   if test -z "$gl_cv_func_sigprocmask"; then
26599     HAVE_POSIX_SIGNALBLOCKING=0
26600   fi
26601
26602   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
26603
26604
26605
26606
26607
26608
26609
26610
26611   gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
26612
26613     :
26614   fi
26615
26616
26617
26618
26619
26620           GNULIB_SIGPROCMASK=1
26621
26622
26623
26624
26625
26626 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
26627
26628
26629
26630
26631   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26632 if test "x$ac_cv_header_stdint_h" = xyes
26633 then :
26634   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
26635
26636 fi
26637
26638     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26639 printf %s "checking for SIZE_MAX... " >&6; }
26640 if test ${gl_cv_size_max+y}
26641 then :
26642   printf %s "(cached) " >&6
26643 else
26644
26645     gl_cv_size_max=
26646     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26647 /* end confdefs.h.  */
26648
26649 #include <limits.h>
26650 #if HAVE_STDINT_H
26651 #include <stdint.h>
26652 #endif
26653 #ifdef SIZE_MAX
26654 Found it
26655 #endif
26656
26657 _ACEOF
26658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26659   $EGREP "Found it" >/dev/null 2>&1
26660 then :
26661   gl_cv_size_max=yes
26662 fi
26663 rm -rf conftest*
26664
26665     if test -z "$gl_cv_size_max"; then
26666                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
26667 #include <limits.h>"
26668 then :
26669
26670 else
26671   size_t_bits_minus_1=
26672 fi
26673
26674       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
26675 then :
26676
26677 else
26678   fits_in_uint=
26679 fi
26680
26681       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26682         if test $fits_in_uint = 1; then
26683                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26684 /* end confdefs.h.  */
26685 #include <stddef.h>
26686                  extern size_t foo;
26687                  extern unsigned long foo;
26688
26689 int
26690 main (void)
26691 {
26692
26693   ;
26694   return 0;
26695 }
26696 _ACEOF
26697 if ac_fn_c_try_compile "$LINENO"
26698 then :
26699   fits_in_uint=0
26700 fi
26701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26702         fi
26703                                 if test $fits_in_uint = 1; then
26704           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
26705         else
26706           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
26707         fi
26708       else
26709                 gl_cv_size_max='((size_t)~(size_t)0)'
26710       fi
26711     fi
26712
26713 fi
26714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
26715 printf "%s\n" "$gl_cv_size_max" >&6; }
26716   if test "$gl_cv_size_max" != yes; then
26717
26718 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
26719
26720   fi
26721
26722
26723
26724   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26725 printf %s "checking for ssize_t... " >&6; }
26726 if test ${gt_cv_ssize_t+y}
26727 then :
26728   printf %s "(cached) " >&6
26729 else
26730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26731 /* end confdefs.h.  */
26732 #include <sys/types.h>
26733 int
26734 main (void)
26735 {
26736 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26737             return !x;
26738   ;
26739   return 0;
26740 }
26741 _ACEOF
26742 if ac_fn_c_try_compile "$LINENO"
26743 then :
26744   gt_cv_ssize_t=yes
26745 else
26746   gt_cv_ssize_t=no
26747 fi
26748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26749 fi
26750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26751 printf "%s\n" "$gt_cv_ssize_t" >&6; }
26752   if test $gt_cv_ssize_t = no; then
26753
26754 printf "%s\n" "#define ssize_t int" >>confdefs.h
26755
26756   fi
26757
26758
26759
26760
26761
26762   case "$host_os" in
26763     mingw*)
26764                   REPLACE_STAT=1
26765       ;;
26766     *)
26767                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26768 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
26769 if test ${gl_cv_func_stat_file_slash+y}
26770 then :
26771   printf %s "(cached) " >&6
26772 else
26773   touch conftest.tmp
26774          # Assume that if we have lstat, we can also check symlinks.
26775          if test $ac_cv_func_lstat = yes; then
26776            ln -s conftest.tmp conftest.lnk
26777          fi
26778          if test "$cross_compiling" = yes
26779 then :
26780   case "$host_os" in
26781                                # Guess yes on Linux systems.
26782               linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
26783                                # Guess yes on glibc systems.
26784               *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
26785                                # If we don't know, assume the worst.
26786               *)               gl_cv_func_stat_file_slash="guessing no" ;;
26787             esac
26788
26789 else
26790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26791 /* end confdefs.h.  */
26792 #include <sys/stat.h>
26793
26794 int
26795 main (void)
26796 {
26797 int result = 0;
26798                struct stat st;
26799                if (!stat ("conftest.tmp/", &st))
26800                  result |= 1;
26801 #if HAVE_LSTAT
26802                if (!stat ("conftest.lnk/", &st))
26803                  result |= 2;
26804 #endif
26805                return result;
26806
26807   ;
26808   return 0;
26809 }
26810 _ACEOF
26811 if ac_fn_c_try_run "$LINENO"
26812 then :
26813   gl_cv_func_stat_file_slash=yes
26814 else
26815   gl_cv_func_stat_file_slash=no
26816 fi
26817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26818   conftest.$ac_objext conftest.beam conftest.$ac_ext
26819 fi
26820
26821          rm -f conftest.tmp conftest.lnk
26822 fi
26823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26824 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
26825       case $gl_cv_func_stat_file_slash in
26826         *no)
26827           REPLACE_STAT=1
26828
26829 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26830 ;;
26831       esac
26832       case $host_os in
26833                 solaris*)
26834           REPLACE_FSTAT=1 ;;
26835       esac
26836       ;;
26837   esac
26838
26839   if test $REPLACE_STAT = 1; then
26840
26841
26842
26843
26844
26845
26846
26847
26848   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
26849
26850     case "$host_os" in
26851       mingw*)
26852
26853
26854
26855
26856
26857
26858
26859
26860   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26861
26862         ;;
26863     esac
26864
26865
26866   :
26867
26868   fi
26869
26870
26871
26872
26873
26874           GNULIB_STAT=1
26875
26876
26877
26878
26879
26880 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
26881
26882
26883
26884
26885
26886
26887
26888   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>
26889      #include <sys/stat.h>
26890 "
26891 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
26892 then :
26893
26894 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
26895
26896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26897 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26898 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
26899 then :
26900   printf %s "(cached) " >&6
26901 else
26902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26903 /* end confdefs.h.  */
26904
26905             #include <sys/types.h>
26906             #include <sys/stat.h>
26907             #if HAVE_SYS_TIME_H
26908             # include <sys/time.h>
26909             #endif
26910             #include <time.h>
26911             struct timespec ts;
26912             struct stat st;
26913
26914 int
26915 main (void)
26916 {
26917
26918             st.st_atim = ts;
26919
26920   ;
26921   return 0;
26922 }
26923 _ACEOF
26924 if ac_fn_c_try_compile "$LINENO"
26925 then :
26926   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26927 else
26928   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26929 fi
26930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26931 fi
26932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26933 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26934      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26935
26936 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26937
26938      fi
26939 else
26940   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>
26941         #include <sys/stat.h>
26942 "
26943 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
26944 then :
26945
26946 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
26947
26948
26949 else
26950   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26951            #include <sys/stat.h>
26952 "
26953 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
26954 then :
26955
26956 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
26957
26958
26959 else
26960   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>
26961               #include <sys/stat.h>
26962 "
26963 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
26964 then :
26965
26966 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
26967
26968
26969 fi
26970
26971 fi
26972
26973 fi
26974
26975 fi
26976
26977
26978
26979
26980
26981   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>
26982      #include <sys/stat.h>
26983 "
26984 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
26985 then :
26986
26987 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
26988
26989
26990 else
26991   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26992         #include <sys/stat.h>
26993 "
26994 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
26995 then :
26996
26997 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
26998
26999
27000 else
27001   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>
27002           #include <sys/stat.h>
27003 "
27004 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
27005 then :
27006
27007 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
27008
27009
27010 fi
27011
27012 fi
27013
27014 fi
27015
27016
27017
27018   STDARG_H=''
27019   NEXT_STDARG_H='<stdarg.h>'
27020   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
27021 printf %s "checking for va_copy... " >&6; }
27022 if test ${gl_cv_func_va_copy+y}
27023 then :
27024   printf %s "(cached) " >&6
27025 else
27026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27027 /* end confdefs.h.  */
27028 #include <stdarg.h>
27029 int
27030 main (void)
27031 {
27032
27033 #ifndef va_copy
27034 void (*func) (va_list, va_list) = va_copy;
27035 #endif
27036
27037   ;
27038   return 0;
27039 }
27040 _ACEOF
27041 if ac_fn_c_try_compile "$LINENO"
27042 then :
27043   gl_cv_func_va_copy=yes
27044 else
27045   gl_cv_func_va_copy=no
27046 fi
27047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27048
27049 fi
27050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
27051 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
27052   if test $gl_cv_func_va_copy = no; then
27053                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27054 /* end confdefs.h.  */
27055 #if defined _AIX && !defined __GNUC__
27056         AIX vaccine
27057        #endif
27058
27059 _ACEOF
27060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27061   $EGREP "vaccine" >/dev/null 2>&1
27062 then :
27063   gl_aixcc=yes
27064 else
27065   gl_aixcc=no
27066 fi
27067 rm -rf conftest*
27068
27069     if test $gl_aixcc = yes; then
27070             STDARG_H=stdarg.h
27071
27072
27073
27074
27075
27076
27077
27078
27079      if test $gl_cv_have_include_next = yes; then
27080        gl_cv_next_stdarg_h='<'stdarg.h'>'
27081      else
27082        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
27083 printf %s "checking absolute name of <stdarg.h>... " >&6; }
27084 if test ${gl_cv_next_stdarg_h+y}
27085 then :
27086   printf %s "(cached) " >&6
27087 else
27088
27089
27090
27091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27092 /* end confdefs.h.  */
27093 #include <stdarg.h>
27094 _ACEOF
27095                 case "$host_os" in
27096     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27097     *)    gl_absname_cpp="$ac_cpp" ;;
27098   esac
27099
27100   case "$host_os" in
27101     mingw*)
27102                                           gl_dirsep_regex='[/\\]'
27103       ;;
27104     *)
27105       gl_dirsep_regex='\/'
27106       ;;
27107   esac
27108       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27109   gl_header_literal_regex=`echo 'stdarg.h' \
27110                            | sed -e "$gl_make_literal_regex_sed"`
27111   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27112       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27113       s|^/[^/]|//&|
27114       p
27115       q
27116     }'
27117
27118         gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27119   sed -n "$gl_absolute_header_sed"`
27120
27121            gl_header=$gl_cv_absolute_stdarg_h
27122            gl_cv_next_stdarg_h='"'$gl_header'"'
27123
27124
27125 fi
27126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
27127 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
27128      fi
27129      NEXT_STDARG_H=$gl_cv_next_stdarg_h
27130
27131      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27132        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27133        gl_next_as_first_directive='<'stdarg.h'>'
27134      else
27135        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27136        gl_next_as_first_directive=$gl_cv_next_stdarg_h
27137      fi
27138      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
27139
27140
27141
27142
27143             if test "$gl_cv_next_stdarg_h" = '""'; then
27144         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
27145         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
27146       fi
27147     else
27148
27149   saved_as_echo_n="$as_echo_n"
27150   as_echo_n=':'
27151   if test ${gl_cv_func___va_copy+y}
27152 then :
27153   printf %s "(cached) " >&6
27154 else
27155
27156         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27157 /* end confdefs.h.  */
27158 #include <stdarg.h>
27159 int
27160 main (void)
27161 {
27162
27163 #ifndef __va_copy
27164 error, bail out
27165 #endif
27166
27167   ;
27168   return 0;
27169 }
27170 _ACEOF
27171 if ac_fn_c_try_compile "$LINENO"
27172 then :
27173   gl_cv_func___va_copy=yes
27174 else
27175   gl_cv_func___va_copy=no
27176 fi
27177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27178 fi
27179
27180   as_echo_n="$saved_as_echo_n"
27181
27182       if test $gl_cv_func___va_copy = yes; then
27183
27184 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
27185
27186       else
27187
27188
27189 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
27190
27191       fi
27192     fi
27193   fi
27194
27195    if test -n "$STDARG_H"; then
27196   GL_GENERATE_STDARG_H_TRUE=
27197   GL_GENERATE_STDARG_H_FALSE='#'
27198 else
27199   GL_GENERATE_STDARG_H_TRUE='#'
27200   GL_GENERATE_STDARG_H_FALSE=
27201 fi
27202
27203
27204
27205
27206
27207
27208   # Define two additional variables used in the Makefile substitution.
27209
27210   if test "$ac_cv_header_stdbool_h" = yes; then
27211     STDBOOL_H=''
27212   else
27213     STDBOOL_H='stdbool.h'
27214   fi
27215
27216    if test -n "$STDBOOL_H"; then
27217   GL_GENERATE_STDBOOL_H_TRUE=
27218   GL_GENERATE_STDBOOL_H_FALSE='#'
27219 else
27220   GL_GENERATE_STDBOOL_H_TRUE='#'
27221   GL_GENERATE_STDBOOL_H_FALSE=
27222 fi
27223
27224
27225   if test "$ac_cv_type__Bool" = yes; then
27226     HAVE__BOOL=1
27227   else
27228     HAVE__BOOL=0
27229   fi
27230
27231
27232
27233
27234
27235   STDDEF_H=
27236
27237       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27238 printf %s "checking for good max_align_t... " >&6; }
27239 if test ${gl_cv_type_max_align_t+y}
27240 then :
27241   printf %s "(cached) " >&6
27242 else
27243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27244 /* end confdefs.h.  */
27245 #include <stddef.h>
27246             unsigned int s = sizeof (max_align_t);
27247             #if defined __GNUC__ || defined __IBM__ALIGNOF__
27248             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27249             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27250             #endif
27251
27252 int
27253 main (void)
27254 {
27255
27256   ;
27257   return 0;
27258 }
27259 _ACEOF
27260 if ac_fn_c_try_compile "$LINENO"
27261 then :
27262   gl_cv_type_max_align_t=yes
27263 else
27264   gl_cv_type_max_align_t=no
27265 fi
27266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27267
27268 fi
27269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27270 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
27271   if test $gl_cv_type_max_align_t = no; then
27272     HAVE_MAX_ALIGN_T=0
27273     STDDEF_H=stddef.h
27274   fi
27275
27276   if test $gt_cv_c_wchar_t = no; then
27277     HAVE_WCHAR_T=0
27278     STDDEF_H=stddef.h
27279   fi
27280
27281   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
27282 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
27283 if test ${gl_cv_decl_null_works+y}
27284 then :
27285   printf %s "(cached) " >&6
27286 else
27287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27288 /* end confdefs.h.  */
27289 #include <stddef.h>
27290       int test[2 * (sizeof NULL == sizeof (void *)) -1];
27291
27292 int
27293 main (void)
27294 {
27295
27296   ;
27297   return 0;
27298 }
27299 _ACEOF
27300 if ac_fn_c_try_compile "$LINENO"
27301 then :
27302   gl_cv_decl_null_works=yes
27303 else
27304   gl_cv_decl_null_works=no
27305 fi
27306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27307 fi
27308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
27309 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
27310   if test $gl_cv_decl_null_works = no; then
27311     REPLACE_NULL=1
27312     STDDEF_H=stddef.h
27313   fi
27314
27315
27316    if test -n "$STDDEF_H"; then
27317   GL_GENERATE_STDDEF_H_TRUE=
27318   GL_GENERATE_STDDEF_H_FALSE='#'
27319 else
27320   GL_GENERATE_STDDEF_H_TRUE='#'
27321   GL_GENERATE_STDDEF_H_FALSE=
27322 fi
27323
27324   if test -n "$STDDEF_H"; then
27325
27326
27327
27328
27329
27330
27331
27332
27333      if test $gl_cv_have_include_next = yes; then
27334        gl_cv_next_stddef_h='<'stddef.h'>'
27335      else
27336        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
27337 printf %s "checking absolute name of <stddef.h>... " >&6; }
27338 if test ${gl_cv_next_stddef_h+y}
27339 then :
27340   printf %s "(cached) " >&6
27341 else
27342
27343
27344
27345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27346 /* end confdefs.h.  */
27347 #include <stddef.h>
27348 _ACEOF
27349                 case "$host_os" in
27350     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27351     *)    gl_absname_cpp="$ac_cpp" ;;
27352   esac
27353
27354   case "$host_os" in
27355     mingw*)
27356                                           gl_dirsep_regex='[/\\]'
27357       ;;
27358     *)
27359       gl_dirsep_regex='\/'
27360       ;;
27361   esac
27362       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27363   gl_header_literal_regex=`echo 'stddef.h' \
27364                            | sed -e "$gl_make_literal_regex_sed"`
27365   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27366       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27367       s|^/[^/]|//&|
27368       p
27369       q
27370     }'
27371
27372         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27373   sed -n "$gl_absolute_header_sed"`
27374
27375            gl_header=$gl_cv_absolute_stddef_h
27376            gl_cv_next_stddef_h='"'$gl_header'"'
27377
27378
27379 fi
27380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27381 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27382      fi
27383      NEXT_STDDEF_H=$gl_cv_next_stddef_h
27384
27385      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27386        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27387        gl_next_as_first_directive='<'stddef.h'>'
27388      else
27389        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27390        gl_next_as_first_directive=$gl_cv_next_stddef_h
27391      fi
27392      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27393
27394
27395
27396
27397   fi
27398
27399
27400
27401
27402   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413      if test $gl_cv_have_include_next = yes; then
27414        gl_cv_next_stdio_h='<'stdio.h'>'
27415      else
27416        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27417 printf %s "checking absolute name of <stdio.h>... " >&6; }
27418 if test ${gl_cv_next_stdio_h+y}
27419 then :
27420   printf %s "(cached) " >&6
27421 else
27422
27423
27424
27425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27426 /* end confdefs.h.  */
27427 #include <stdio.h>
27428 _ACEOF
27429                 case "$host_os" in
27430     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27431     *)    gl_absname_cpp="$ac_cpp" ;;
27432   esac
27433
27434   case "$host_os" in
27435     mingw*)
27436                                           gl_dirsep_regex='[/\\]'
27437       ;;
27438     *)
27439       gl_dirsep_regex='\/'
27440       ;;
27441   esac
27442       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27443   gl_header_literal_regex=`echo 'stdio.h' \
27444                            | sed -e "$gl_make_literal_regex_sed"`
27445   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27446       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27447       s|^/[^/]|//&|
27448       p
27449       q
27450     }'
27451
27452         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27453   sed -n "$gl_absolute_header_sed"`
27454
27455            gl_header=$gl_cv_absolute_stdio_h
27456            gl_cv_next_stdio_h='"'$gl_header'"'
27457
27458
27459 fi
27460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27461 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
27462      fi
27463      NEXT_STDIO_H=$gl_cv_next_stdio_h
27464
27465      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27466        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27467        gl_next_as_first_directive='<'stdio.h'>'
27468      else
27469        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27470        gl_next_as_first_directive=$gl_cv_next_stdio_h
27471      fi
27472      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27473
27474
27475
27476
27477
27478         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27479 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27480 if test ${gl_cv_func_printf_attribute_flavor+y}
27481 then :
27482   printf %s "(cached) " >&6
27483 else
27484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27485 /* end confdefs.h.  */
27486
27487        #define __STDC_FORMAT_MACROS 1
27488        #include <stdio.h>
27489        #include <inttypes.h>
27490        /* For non-mingw systems, compilation will trivially succeed.
27491           For mingw, compilation will succeed for older mingw (system
27492           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27493        #if (defined _WIN32 && ! defined __CYGWIN__) && \
27494          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27495        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27496        #endif
27497
27498 int
27499 main (void)
27500 {
27501
27502   ;
27503   return 0;
27504 }
27505 _ACEOF
27506 if ac_fn_c_try_compile "$LINENO"
27507 then :
27508   gl_cv_func_printf_attribute_flavor=system
27509 else
27510   gl_cv_func_printf_attribute_flavor=gnu
27511 fi
27512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27513 fi
27514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27515 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
27516   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27517
27518 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27519
27520   fi
27521
27522       GNULIB_FSCANF=1
27523
27524
27525 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
27526
27527
27528   GNULIB_SCANF=1
27529
27530
27531 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
27532
27533
27534   GNULIB_FGETC=1
27535   GNULIB_GETC=1
27536   GNULIB_GETCHAR=1
27537   GNULIB_FGETS=1
27538   GNULIB_FREAD=1
27539
27540
27541       GNULIB_FPRINTF=1
27542   GNULIB_PRINTF=1
27543   GNULIB_VFPRINTF=1
27544   GNULIB_VPRINTF=1
27545   GNULIB_FPUTC=1
27546   GNULIB_PUTC=1
27547   GNULIB_PUTCHAR=1
27548   GNULIB_FPUTS=1
27549   GNULIB_PUTS=1
27550   GNULIB_FWRITE=1
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568      if test $gl_cv_have_include_next = yes; then
27569        gl_cv_next_stdlib_h='<'stdlib.h'>'
27570      else
27571        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27572 printf %s "checking absolute name of <stdlib.h>... " >&6; }
27573 if test ${gl_cv_next_stdlib_h+y}
27574 then :
27575   printf %s "(cached) " >&6
27576 else
27577
27578
27579
27580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27581 /* end confdefs.h.  */
27582 #include <stdlib.h>
27583 _ACEOF
27584                 case "$host_os" in
27585     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27586     *)    gl_absname_cpp="$ac_cpp" ;;
27587   esac
27588
27589   case "$host_os" in
27590     mingw*)
27591                                           gl_dirsep_regex='[/\\]'
27592       ;;
27593     *)
27594       gl_dirsep_regex='\/'
27595       ;;
27596   esac
27597       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27598   gl_header_literal_regex=`echo 'stdlib.h' \
27599                            | sed -e "$gl_make_literal_regex_sed"`
27600   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27601       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27602       s|^/[^/]|//&|
27603       p
27604       q
27605     }'
27606
27607         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27608   sed -n "$gl_absolute_header_sed"`
27609
27610            gl_header=$gl_cv_absolute_stdlib_h
27611            gl_cv_next_stdlib_h='"'$gl_header'"'
27612
27613
27614 fi
27615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27616 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
27617      fi
27618      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27619
27620      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27621        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27622        gl_next_as_first_directive='<'stdlib.h'>'
27623      else
27624        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27625        gl_next_as_first_directive=$gl_cv_next_stdlib_h
27626      fi
27627      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
27641 if test "x$ac_cv_func_strcasecmp" = xyes
27642 then :
27643   printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
27644
27645 fi
27646
27647   if test $ac_cv_func_strcasecmp = no; then
27648     HAVE_STRCASECMP=0
27649   fi
27650
27651
27652
27653   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
27654 if test "x$ac_cv_func_strncasecmp" = xyes
27655 then :
27656   printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
27657
27658 fi
27659
27660   if test $ac_cv_func_strncasecmp = yes; then
27661     HAVE_STRNCASECMP=1
27662   else
27663     HAVE_STRNCASECMP=0
27664   fi
27665   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
27666 if test "x$ac_cv_have_decl_strncasecmp" = xyes
27667 then :
27668   ac_have_decl=1
27669 else
27670   ac_have_decl=0
27671 fi
27672
27673 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
27674
27675   if test $ac_cv_have_decl_strncasecmp = no; then
27676     HAVE_DECL_STRNCASECMP=0
27677   fi
27678
27679
27680   if test $HAVE_STRCASECMP = 0; then
27681
27682
27683
27684
27685
27686
27687
27688
27689   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
27690
27691
27692   :
27693
27694   fi
27695   if test $HAVE_STRNCASECMP = 0; then
27696
27697
27698
27699
27700
27701
27702
27703
27704   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
27705
27706
27707   :
27708
27709   fi
27710
27711
27712
27713
27714
27715
27716
27717   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27718     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27719 printf %s "checking for working strerror function... " >&6; }
27720 if test ${gl_cv_func_working_strerror+y}
27721 then :
27722   printf %s "(cached) " >&6
27723 else
27724   if test "$cross_compiling" = yes
27725 then :
27726   case "$host_os" in
27727                           # Guess yes on glibc systems.
27728            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27729                           # If we don't know, assume the worst.
27730            *)             gl_cv_func_working_strerror="guessing no" ;;
27731          esac
27732
27733 else
27734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27735 /* end confdefs.h.  */
27736 #include <string.h>
27737
27738 int
27739 main (void)
27740 {
27741 if (!*strerror (-2)) return 1;
27742   ;
27743   return 0;
27744 }
27745 _ACEOF
27746 if ac_fn_c_try_run "$LINENO"
27747 then :
27748   gl_cv_func_working_strerror=yes
27749 else
27750   gl_cv_func_working_strerror=no
27751 fi
27752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27753   conftest.$ac_objext conftest.beam conftest.$ac_ext
27754 fi
27755
27756
27757 fi
27758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27759 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
27760     case "$gl_cv_func_working_strerror" in
27761       *yes) ;;
27762       *)
27763                         REPLACE_STRERROR=1
27764         ;;
27765     esac
27766
27767                   case "$gl_cv_func_strerror_r_works" in
27768         *no) REPLACE_STRERROR=1 ;;
27769       esac
27770
27771   else
27772             REPLACE_STRERROR=1
27773   fi
27774
27775   if test $REPLACE_STRERROR = 1; then
27776
27777
27778
27779
27780
27781
27782
27783
27784   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27785
27786   fi
27787
27788
27789 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
27790
27791
27792
27793
27794
27795
27796
27797           GNULIB_STRERROR=1
27798
27799
27800
27801
27802
27803 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27804
27805
27806
27807
27808
27809   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27810
27811
27812
27813
27814
27815
27816
27817
27818   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
27819
27820
27821
27822
27823
27824   if test $ac_cv_header_sys_socket_h != yes; then
27825                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27826 if test "x$ac_cv_header_winsock2_h" = xyes
27827 then :
27828   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
27829
27830 fi
27831
27832   fi
27833   if test "$ac_cv_header_winsock2_h" = yes; then
27834     HAVE_WINSOCK2_H=1
27835     UNISTD_H_HAVE_WINSOCK2_H=1
27836     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27837   else
27838     HAVE_WINSOCK2_H=0
27839   fi
27840
27841
27842   fi
27843   if test $gl_cond_libtool = false; then
27844     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
27845     gl_libdeps="$gl_libdeps $LIBICONV"
27846   fi
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859   if test $ac_cv_have_decl_strndup = no; then
27860     HAVE_DECL_STRNDUP=0
27861   fi
27862
27863   if test $ac_cv_func_strndup = yes; then
27864     HAVE_STRNDUP=1
27865     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
27866     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
27867 printf %s "checking for working strndup... " >&6; }
27868 if test ${gl_cv_func_strndup_works+y}
27869 then :
27870   printf %s "(cached) " >&6
27871 else
27872   if test "$cross_compiling" = yes
27873 then :
27874
27875           case $host_os in
27876             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
27877             *)               gl_cv_func_strndup_works="guessing yes";;
27878           esac
27879
27880 else
27881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27882 /* end confdefs.h.  */
27883
27884          #include <string.h>
27885                            #include <stdlib.h>
27886 int
27887 main (void)
27888 {
27889
27890 #if !HAVE_DECL_STRNDUP
27891   extern
27892   #ifdef __cplusplus
27893   "C"
27894   #endif
27895   char *strndup (const char *, size_t);
27896 #endif
27897   int result;
27898   char *s;
27899   s = strndup ("some longer string", 15);
27900   free (s);
27901   s = strndup ("shorter string", 13);
27902   result = s[13] != '\0';
27903   free (s);
27904   return result;
27905   ;
27906   return 0;
27907 }
27908 _ACEOF
27909 if ac_fn_c_try_run "$LINENO"
27910 then :
27911   gl_cv_func_strndup_works=yes
27912 else
27913   gl_cv_func_strndup_works=no
27914 fi
27915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27916   conftest.$ac_objext conftest.beam conftest.$ac_ext
27917 fi
27918
27919 fi
27920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
27921 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
27922     case $gl_cv_func_strndup_works in
27923       *no) REPLACE_STRNDUP=1 ;;
27924     esac
27925   else
27926     HAVE_STRNDUP=0
27927   fi
27928
27929   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
27930
27931
27932
27933
27934
27935
27936
27937
27938   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
27939
27940   fi
27941
27942
27943
27944
27945
27946           GNULIB_STRNDUP=1
27947
27948
27949
27950
27951
27952 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962   if test $ac_cv_have_decl_strnlen = no; then
27963     HAVE_DECL_STRNLEN=0
27964   else
27965
27966          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
27967 printf %s "checking for working strnlen... " >&6; }
27968 if test ${ac_cv_func_strnlen_working+y}
27969 then :
27970   printf %s "(cached) " >&6
27971 else
27972   if test "$cross_compiling" = yes
27973 then :
27974   # Guess no on AIX systems, yes otherwise.
27975                 case "$host_os" in
27976                   aix*) ac_cv_func_strnlen_working=no;;
27977                   *)    ac_cv_func_strnlen_working=yes;;
27978                 esac
27979 else
27980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27981 /* end confdefs.h.  */
27982 $ac_includes_default
27983 int
27984 main (void)
27985 {
27986
27987 #define S "foobar"
27988 #define S_LEN (sizeof S - 1)
27989
27990   /* At least one implementation is buggy: that of AIX 4.3 would
27991      give strnlen (S, 1) == 3.  */
27992
27993   int i;
27994   for (i = 0; i < S_LEN + 1; ++i)
27995     {
27996       int expected = i <= S_LEN ? i : S_LEN;
27997       if (strnlen (S, i) != expected)
27998         return 1;
27999     }
28000   return 0;
28001
28002   ;
28003   return 0;
28004 }
28005 _ACEOF
28006 if ac_fn_c_try_run "$LINENO"
28007 then :
28008   ac_cv_func_strnlen_working=yes
28009 else
28010   ac_cv_func_strnlen_working=no
28011 fi
28012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28013   conftest.$ac_objext conftest.beam conftest.$ac_ext
28014 fi
28015
28016 fi
28017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28018 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
28019 test $ac_cv_func_strnlen_working = no && :
28020
28021
28022     if test $ac_cv_func_strnlen_working = no; then
28023       REPLACE_STRNLEN=1
28024     fi
28025   fi
28026
28027   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
28028
28029
28030
28031
28032
28033
28034
28035
28036   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
28037
28038     :
28039   fi
28040
28041
28042
28043
28044
28045           GNULIB_STRNLEN=1
28046
28047
28048
28049
28050
28051 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
28052
28053
28054
28055
28056
28057
28058
28059   if test $ac_cv_func_strptime != yes; then
28060     HAVE_STRPTIME=0
28061   fi
28062
28063   if test $HAVE_STRPTIME = 0; then
28064
28065
28066
28067
28068
28069
28070
28071
28072   gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
28073
28074
28075
28076   :
28077
28078   fi
28079
28080
28081
28082
28083
28084           GNULIB_STRPTIME=1
28085
28086
28087
28088
28089
28090 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
28091
28092
28093
28094
28095
28096
28097   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28098     ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28099 if test "x$ac_cv_func_strtoull" = xyes
28100 then :
28101   printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h
28102
28103 fi
28104
28105     if test $ac_cv_func_strtoull = no; then
28106       HAVE_STRTOULL=0
28107     fi
28108   fi
28109
28110   if test $HAVE_STRTOULL = 0; then
28111
28112
28113
28114
28115
28116
28117
28118
28119   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28120
28121
28122   :
28123
28124   fi
28125
28126
28127
28128
28129
28130           GNULIB_STRTOULL=1
28131
28132
28133
28134
28135
28136 printf "%s\n" "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
28137
28138
28139
28140
28141
28142
28143
28144
28145   if test "$ac_cv_have_decl_strtoumax" = yes; then
28146     if test "$ac_cv_func_strtoumax" != yes; then
28147       # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
28148       REPLACE_STRTOUMAX=1
28149     fi
28150   else
28151     HAVE_DECL_STRTOUMAX=0
28152   fi
28153
28154   if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
28155
28156
28157
28158
28159
28160
28161
28162
28163   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
28164
28165
28166   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
28167 if test "x$ac_cv_have_decl_strtoull" = xyes
28168 then :
28169   ac_have_decl=1
28170 else
28171   ac_have_decl=0
28172 fi
28173
28174 printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h
28175
28176
28177
28178   fi
28179
28180
28181
28182
28183
28184           GNULIB_STRTOUMAX=1
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203      if test $gl_cv_have_include_next = yes; then
28204        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28205      else
28206        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
28207 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
28208 if test ${gl_cv_next_sys_stat_h+y}
28209 then :
28210   printf %s "(cached) " >&6
28211 else
28212
28213              if test $ac_cv_header_sys_stat_h = yes; then
28214
28215
28216
28217
28218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28219 /* end confdefs.h.  */
28220 #include <sys/stat.h>
28221 _ACEOF
28222                 case "$host_os" in
28223     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28224     *)    gl_absname_cpp="$ac_cpp" ;;
28225   esac
28226
28227   case "$host_os" in
28228     mingw*)
28229                                           gl_dirsep_regex='[/\\]'
28230       ;;
28231     *)
28232       gl_dirsep_regex='\/'
28233       ;;
28234   esac
28235       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28236   gl_header_literal_regex=`echo 'sys/stat.h' \
28237                            | sed -e "$gl_make_literal_regex_sed"`
28238   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28239       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28240       s|^/[^/]|//&|
28241       p
28242       q
28243     }'
28244
28245         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28246   sed -n "$gl_absolute_header_sed"`
28247
28248            gl_header=$gl_cv_absolute_sys_stat_h
28249            gl_cv_next_sys_stat_h='"'$gl_header'"'
28250           else
28251                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28252              fi
28253
28254
28255 fi
28256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
28257 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
28258      fi
28259      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
28260
28261      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28262        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28263        gl_next_as_first_directive='<'sys/stat.h'>'
28264      else
28265        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28266        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
28267      fi
28268      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
28269
28270
28271
28272
28273
28274
28275
28276
28277     WINDOWS_STAT_TIMESPEC=0
28278
28279
28280
28281
28282
28283
28284
28285
28286       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28287      #include <sys/stat.h>
28288 "
28289 if test "x$ac_cv_type_nlink_t" = xyes
28290 then :
28291
28292 else
28293
28294 printf "%s\n" "#define nlink_t int" >>confdefs.h
28295
28296 fi
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322      if test $gl_cv_have_include_next = yes; then
28323        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
28324      else
28325        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
28326 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
28327 if test ${gl_cv_next_sys_wait_h+y}
28328 then :
28329   printf %s "(cached) " >&6
28330 else
28331
28332              if test $ac_cv_header_sys_wait_h = yes; then
28333
28334
28335
28336
28337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28338 /* end confdefs.h.  */
28339 #include <sys/wait.h>
28340 _ACEOF
28341                 case "$host_os" in
28342     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28343     *)    gl_absname_cpp="$ac_cpp" ;;
28344   esac
28345
28346   case "$host_os" in
28347     mingw*)
28348                                           gl_dirsep_regex='[/\\]'
28349       ;;
28350     *)
28351       gl_dirsep_regex='\/'
28352       ;;
28353   esac
28354       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28355   gl_header_literal_regex=`echo 'sys/wait.h' \
28356                            | sed -e "$gl_make_literal_regex_sed"`
28357   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28358       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28359       s|^/[^/]|//&|
28360       p
28361       q
28362     }'
28363
28364         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28365   sed -n "$gl_absolute_header_sed"`
28366
28367            gl_header=$gl_cv_absolute_sys_wait_h
28368            gl_cv_next_sys_wait_h='"'$gl_header'"'
28369           else
28370                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
28371              fi
28372
28373
28374 fi
28375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
28376 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
28377      fi
28378      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
28379
28380      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28381        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28382        gl_next_as_first_directive='<'sys/wait.h'>'
28383      else
28384        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28385        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
28386      fi
28387      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402   :
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
28415 "
28416 if test "x$ac_cv_have_decl_localtime_r" = xyes
28417 then :
28418   ac_have_decl=1
28419 else
28420   ac_have_decl=0
28421 fi
28422
28423 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
28424
28425   if test $ac_cv_have_decl_localtime_r = no; then
28426     HAVE_DECL_LOCALTIME_R=0
28427   fi
28428
28429
28430   if test $ac_cv_func_localtime_r = yes; then
28431     HAVE_LOCALTIME_R=1
28432     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
28433 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
28434 if test ${gl_cv_time_r_posix+y}
28435 then :
28436   printf %s "(cached) " >&6
28437 else
28438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28439 /* end confdefs.h.  */
28440 #include <time.h>
28441 int
28442 main (void)
28443 {
28444 /* We don't need to append 'restrict's to the argument types,
28445                  even though the POSIX signature has the 'restrict's,
28446                  since C99 says they can't affect type compatibility.  */
28447               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
28448               if (ptr) return 0;
28449               /* Check the return type is a pointer.
28450                  On HP-UX 10 it is 'int'.  */
28451               *localtime_r (0, 0);
28452   ;
28453   return 0;
28454 }
28455
28456 _ACEOF
28457 if ac_fn_c_try_compile "$LINENO"
28458 then :
28459   gl_cv_time_r_posix=yes
28460 else
28461   gl_cv_time_r_posix=no
28462 fi
28463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28464
28465 fi
28466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
28467 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
28468     if test $gl_cv_time_r_posix = yes; then
28469       REPLACE_LOCALTIME_R=0
28470     else
28471       REPLACE_LOCALTIME_R=1
28472     fi
28473   else
28474     HAVE_LOCALTIME_R=0
28475   fi
28476
28477   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
28478
28479
28480
28481
28482
28483
28484
28485
28486   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
28487
28488
28489   :
28490
28491   fi
28492
28493
28494
28495
28496
28497           GNULIB_TIME_R=1
28498
28499
28500
28501
28502
28503 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
28504
28505
28506
28507
28508
28509
28510
28511
28512   # Mac OS X 10.6 loops forever with some time_t values.
28513   # See Bug#27706, Bug#27736, and
28514   # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
28515   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime loops forever near extrema" >&5
28516 printf %s "checking whether localtime loops forever near extrema... " >&6; }
28517 if test ${gl_cv_func_localtime_infloop_bug+y}
28518 then :
28519   printf %s "(cached) " >&6
28520 else
28521   gl_cv_func_localtime_infloop_bug=no
28522      if test "$cross_compiling" = yes
28523 then :
28524   gl_cv_func_localtime_infloop_bug="guessing no"
28525 else
28526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28527 /* end confdefs.h.  */
28528 #include <stdlib.h>
28529             #include <string.h>
28530             #include <unistd.h>
28531             #include <time.h>
28532
28533 int
28534 main (void)
28535 {
28536
28537             time_t t = -67768038400666600;
28538             struct tm *tm;
28539             char *tz = getenv ("TZ");
28540             if (! (tz && strcmp (tz, "QQQ0") == 0))
28541               return 0;
28542             alarm (2);
28543             tm = localtime (&t);
28544             /* Use TM and *TM to suppress over-optimization.  */
28545             return tm && tm->tm_isdst;
28546
28547   ;
28548   return 0;
28549 }
28550 _ACEOF
28551 if ac_fn_c_try_run "$LINENO"
28552 then :
28553   (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
28554            gl_cv_func_localtime_infloop_bug=yes
28555 fi
28556 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28557   conftest.$ac_objext conftest.beam conftest.$ac_ext
28558 fi
28559
28560 fi
28561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_infloop_bug" >&5
28562 printf "%s\n" "$gl_cv_func_localtime_infloop_bug" >&6; }
28563   if test "$gl_cv_func_localtime_infloop_bug" = yes; then
28564
28565 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
28566
28567   fi
28568
28569   ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
28570 "
28571 if test "x$ac_cv_type_timezone_t" = xyes
28572 then :
28573
28574 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
28575
28576
28577 fi
28578
28579   if test "$ac_cv_type_timezone_t" = yes; then
28580     HAVE_TIMEZONE_T=1
28581   fi
28582
28583   if test $HAVE_TIMEZONE_T = 0; then
28584
28585
28586
28587
28588
28589
28590
28591
28592   gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
28593
28594   fi
28595
28596
28597
28598
28599
28600           GNULIB_TIME_RZ=1
28601
28602
28603
28604
28605
28606 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
28607
28608
28609
28610
28611
28612
28613   REPLACE_TIMEGM=0
28614
28615   if test $ac_cv_func_timegm = yes; then
28616     if test "$gl_cv_func_working_mktime" != yes; then
28617       # Assume that timegm is buggy if mktime is.
28618       REPLACE_TIMEGM=1
28619     fi
28620   else
28621     HAVE_TIMEGM=0
28622   fi
28623
28624   if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
28625
28626
28627
28628
28629
28630
28631
28632
28633   gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
28634
28635
28636   :
28637
28638   fi
28639
28640
28641
28642
28643
28644           GNULIB_TIMEGM=1
28645
28646
28647
28648
28649
28650 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
28651
28652
28653
28654   :
28655
28656
28657
28658
28659
28660   if test $ac_cv_func_tzset = no; then
28661     HAVE_TZSET=0
28662   fi
28663
28664      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
28665 printf %s "checking whether tzset clobbers localtime buffer... " >&6; }
28666 if test ${gl_cv_func_tzset_clobber+y}
28667 then :
28668   printf %s "(cached) " >&6
28669 else
28670   if test "$cross_compiling" = yes
28671 then :
28672   case "$host_os" in
28673                          # Guess all is fine on glibc systems.
28674           *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
28675                          # Guess no on native Windows.
28676           mingw*)        gl_cv_func_tzset_clobber="guessing no" ;;
28677                          # If we don't know, assume the worst.
28678           *)             gl_cv_func_tzset_clobber="guessing yes" ;;
28679         esac
28680
28681 else
28682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28683 /* end confdefs.h.  */
28684
28685 #include <time.h>
28686 #include <stdlib.h>
28687
28688 int
28689 main ()
28690 {
28691   time_t t1 = 853958121;
28692   struct tm *p, s;
28693   putenv ("TZ=GMT0");
28694   p = localtime (&t1);
28695   s = *p;
28696   putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
28697   tzset ();
28698   return (p->tm_year != s.tm_year
28699           || p->tm_mon != s.tm_mon
28700           || p->tm_mday != s.tm_mday
28701           || p->tm_hour != s.tm_hour
28702           || p->tm_min != s.tm_min
28703           || p->tm_sec != s.tm_sec);
28704 }
28705
28706 _ACEOF
28707 if ac_fn_c_try_run "$LINENO"
28708 then :
28709   gl_cv_func_tzset_clobber=no
28710 else
28711   gl_cv_func_tzset_clobber=yes
28712 fi
28713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28714   conftest.$ac_objext conftest.beam conftest.$ac_ext
28715 fi
28716
28717
28718 fi
28719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tzset_clobber" >&5
28720 printf "%s\n" "$gl_cv_func_tzset_clobber" >&6; }
28721
28722
28723 printf "%s\n" "#define HAVE_RUN_TZSET_TEST 1" >>confdefs.h
28724
28725
28726   REPLACE_TZSET=0
28727   case "$gl_cv_func_tzset_clobber" in
28728     *yes)
28729       REPLACE_TZSET=1
28730
28731 printf "%s\n" "#define TZSET_CLOBBERS_LOCALTIME 1" >>confdefs.h
28732
28733
28734
28735
28736   NEED_LOCALTIME_BUFFER=1
28737   REPLACE_GMTIME=1
28738   REPLACE_LOCALTIME=1
28739
28740       ;;
28741   esac
28742   case "$host_os" in
28743     mingw*) REPLACE_TZSET=1 ;;
28744   esac
28745
28746   if test $HAVE_TZSET = 0 || test $REPLACE_TZSET = 1; then
28747
28748
28749
28750
28751
28752
28753
28754
28755   gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
28756
28757   fi
28758
28759
28760
28761
28762
28763           GNULIB_TZSET=1
28764
28765
28766
28767
28768
28769 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785      if test $gl_cv_have_include_next = yes; then
28786        gl_cv_next_unistd_h='<'unistd.h'>'
28787      else
28788        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
28789 printf %s "checking absolute name of <unistd.h>... " >&6; }
28790 if test ${gl_cv_next_unistd_h+y}
28791 then :
28792   printf %s "(cached) " >&6
28793 else
28794
28795              if test $ac_cv_header_unistd_h = yes; then
28796
28797
28798
28799
28800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28801 /* end confdefs.h.  */
28802 #include <unistd.h>
28803 _ACEOF
28804                 case "$host_os" in
28805     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28806     *)    gl_absname_cpp="$ac_cpp" ;;
28807   esac
28808
28809   case "$host_os" in
28810     mingw*)
28811                                           gl_dirsep_regex='[/\\]'
28812       ;;
28813     *)
28814       gl_dirsep_regex='\/'
28815       ;;
28816   esac
28817       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28818   gl_header_literal_regex=`echo 'unistd.h' \
28819                            | sed -e "$gl_make_literal_regex_sed"`
28820   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28821       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28822       s|^/[^/]|//&|
28823       p
28824       q
28825     }'
28826
28827         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28828   sed -n "$gl_absolute_header_sed"`
28829
28830            gl_header=$gl_cv_absolute_unistd_h
28831            gl_cv_next_unistd_h='"'$gl_header'"'
28832           else
28833                gl_cv_next_unistd_h='<'unistd.h'>'
28834              fi
28835
28836
28837 fi
28838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
28839 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
28840      fi
28841      NEXT_UNISTD_H=$gl_cv_next_unistd_h
28842
28843      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28844        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28845        gl_next_as_first_directive='<'unistd.h'>'
28846      else
28847        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28848        gl_next_as_first_directive=$gl_cv_next_unistd_h
28849      fi
28850      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
28851
28852
28853
28854
28855   if test $ac_cv_header_unistd_h = yes; then
28856     HAVE_UNISTD_H=1
28857   else
28858     HAVE_UNISTD_H=0
28859   fi
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872       if  { test "$HAVE_LIBUNISTRING" != yes \
28873     || {
28874
28875
28876
28877             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28878             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28879                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28880                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28881                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28882                          }
28883                     }
28884                }
28885
28886
28887
28888
28889        }
28890   }; then
28891     LIBUNISTRING_UNISTR_H='unistr.h'
28892   else
28893     LIBUNISTRING_UNISTR_H=
28894   fi
28895
28896
28897
28898
28899 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
28900
28901
28902
28903
28904        if  { test "$HAVE_LIBUNISTRING" != yes \
28905     || {
28906
28907
28908
28909             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28910             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28911                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28912                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28913                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
28914                          }
28915                     }
28916                }
28917
28918
28919
28920
28921        }
28922   }; then
28923   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
28924   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
28925 else
28926   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
28927   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
28928 fi
28929
28930
28931
28932
28933 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
28934
28935
28936
28937
28938        if  { test "$HAVE_LIBUNISTRING" != yes \
28939     || {
28940
28941
28942
28943             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28944             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28945                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28946                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28947                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
28948                          }
28949                     }
28950                }
28951
28952
28953
28954
28955        }
28956   }; then
28957   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
28958   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
28959 else
28960   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
28961   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
28962 fi
28963
28964
28965
28966
28967       if  { test "$HAVE_LIBUNISTRING" != yes \
28968     || {
28969
28970
28971
28972             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28973             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28974                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28975                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28976                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28977                          }
28978                     }
28979                }
28980
28981
28982
28983
28984        }
28985   }; then
28986     LIBUNISTRING_UNITYPES_H='unitypes.h'
28987   else
28988     LIBUNISTRING_UNITYPES_H=
28989   fi
28990
28991
28992
28993
28994       if  { test "$HAVE_LIBUNISTRING" != yes \
28995     || {
28996
28997
28998
28999             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
29000             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
29001                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
29002                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
29003                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
29004                          }
29005                     }
29006                }
29007
29008
29009
29010
29011        }
29012   }; then
29013     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
29014   else
29015     LIBUNISTRING_UNIWIDTH_H=
29016   fi
29017
29018
29019
29020
29021        if  { test "$HAVE_LIBUNISTRING" != yes \
29022     || {
29023
29024
29025
29026             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
29027             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
29028                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
29029                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
29030                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
29031                          }
29032                     }
29033                }
29034
29035
29036
29037
29038        }
29039   }; then
29040   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
29041   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
29042 else
29043   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
29044   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
29045 fi
29046
29047
29048
29049
29050 printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072   if test $ac_cv_have_decl_unsetenv = no; then
29073     HAVE_DECL_UNSETENV=0
29074   fi
29075   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
29076 if test "x$ac_cv_func_unsetenv" = xyes
29077 then :
29078   printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
29079
29080 fi
29081
29082   if test $ac_cv_func_unsetenv = no; then
29083     HAVE_UNSETENV=0
29084   else
29085     HAVE_UNSETENV=1
29086         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
29087 printf %s "checking for unsetenv() return type... " >&6; }
29088 if test ${gt_cv_func_unsetenv_ret+y}
29089 then :
29090   printf %s "(cached) " >&6
29091 else
29092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093 /* end confdefs.h.  */
29094
29095 #undef _BSD
29096 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
29097 #include <stdlib.h>
29098 extern
29099 #ifdef __cplusplus
29100 "C"
29101 #endif
29102 int unsetenv (const char *name);
29103
29104 int
29105 main (void)
29106 {
29107
29108   ;
29109   return 0;
29110 }
29111 _ACEOF
29112 if ac_fn_c_try_compile "$LINENO"
29113 then :
29114   gt_cv_func_unsetenv_ret='int'
29115 else
29116   gt_cv_func_unsetenv_ret='void'
29117 fi
29118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29119 fi
29120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
29121 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
29122     if test $gt_cv_func_unsetenv_ret = 'void'; then
29123
29124 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
29125
29126       REPLACE_UNSETENV=1
29127     fi
29128
29129                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
29130 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
29131 if test ${gl_cv_func_unsetenv_works+y}
29132 then :
29133   printf %s "(cached) " >&6
29134 else
29135   if test "$cross_compiling" = yes
29136 then :
29137   case "$host_os" in
29138                  # Guess yes on glibc systems.
29139          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
29140                  # If we don't know, assume the worst.
29141          *)      gl_cv_func_unsetenv_works="guessing no" ;;
29142        esac
29143
29144 else
29145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29146 /* end confdefs.h.  */
29147
29148        #include <stdlib.h>
29149        #include <errno.h>
29150        extern char **environ;
29151
29152 int
29153 main (void)
29154 {
29155
29156        char entry1[] = "a=1";
29157        char entry2[] = "b=2";
29158        char *env[] = { entry1, entry2, NULL };
29159        if (putenv ((char *) "a=1")) return 1;
29160        if (putenv (entry2)) return 2;
29161        entry2[0] = 'a';
29162        unsetenv ("a");
29163        if (getenv ("a")) return 3;
29164        if (!unsetenv ("") || errno != EINVAL) return 4;
29165        entry2[0] = 'b';
29166        environ = env;
29167        if (!getenv ("a")) return 5;
29168        entry2[0] = 'a';
29169        unsetenv ("a");
29170        if (getenv ("a")) return 6;
29171
29172   ;
29173   return 0;
29174 }
29175 _ACEOF
29176 if ac_fn_c_try_run "$LINENO"
29177 then :
29178   gl_cv_func_unsetenv_works=yes
29179 else
29180   gl_cv_func_unsetenv_works=no
29181 fi
29182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29183   conftest.$ac_objext conftest.beam conftest.$ac_ext
29184 fi
29185
29186 fi
29187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
29188 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
29189     case "$gl_cv_func_unsetenv_works" in
29190       *yes) ;;
29191       *)
29192         REPLACE_UNSETENV=1
29193         ;;
29194     esac
29195   fi
29196
29197   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
29198
29199
29200
29201
29202
29203
29204
29205
29206   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
29207
29208
29209
29210
29211
29212   fi
29213
29214
29215
29216
29217
29218           GNULIB_UNSETENV=1
29219
29220
29221
29222
29223
29224 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
29225
29226
29227
29228
29229   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
29230 printf %s "checking for variable-length arrays... " >&6; }
29231 if test ${ac_cv_c_vararrays+y}
29232 then :
29233   printf %s "(cached) " >&6
29234 else
29235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29236 /* end confdefs.h.  */
29237 #ifdef __STDC_NO_VLA__
29238         defined
29239         #endif
29240
29241 _ACEOF
29242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29243   $EGREP "defined" >/dev/null 2>&1
29244 then :
29245   ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
29246 else
29247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29248 /* end confdefs.h.  */
29249 /* Test for VLA support.  This test is partly inspired
29250                   from examples in the C standard.  Use at least two VLA
29251                   functions to detect the GCC 3.4.3 bug described in:
29252                   https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
29253                   */
29254                #ifdef __STDC_NO_VLA__
29255                 syntax error;
29256                #else
29257                  extern int n;
29258                  int B[100];
29259                  int fvla (int m, int C[m][m]);
29260
29261                  int
29262                  simple (int count, int all[static count])
29263                  {
29264                    return all[count - 1];
29265                  }
29266
29267                  int
29268                  fvla (int m, int C[m][m])
29269                  {
29270                    typedef int VLA[m][m];
29271                    VLA x;
29272                    int D[m];
29273                    static int (*q)[m] = &B;
29274                    int (*s)[n] = q;
29275                    return C && &x[0][0] == &D[0] && &D[0] == s[0];
29276                  }
29277                #endif
29278
29279 int
29280 main (void)
29281 {
29282
29283   ;
29284   return 0;
29285 }
29286 _ACEOF
29287 if ac_fn_c_try_compile "$LINENO"
29288 then :
29289   ac_cv_c_vararrays=yes
29290 else
29291   ac_cv_c_vararrays=no
29292 fi
29293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29294 fi
29295 rm -rf conftest*
29296
29297 fi
29298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
29299 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
29300   if test "$ac_cv_c_vararrays" = yes; then
29301
29302 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
29303
29304   elif test "$ac_cv_c_vararrays" = no; then
29305
29306 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
29307
29308   fi
29309
29310
29311
29312   if test $ac_cv_func_vasnprintf = no; then
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
29354
29355   if test $ac_cv_func_vasnprintf = yes; then
29356
29357 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
29358
29359   fi
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
29372 if test "x$ac_cv_type_ptrdiff_t" = xyes
29373 then :
29374
29375 else
29376
29377 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
29378
29379
29380 fi
29381
29382
29383
29384
29385
29386
29387
29388   fi
29389
29390
29391   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
29392 if test "x$ac_cv_func_vasprintf" = xyes
29393 then :
29394   printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
29395
29396 fi
29397
29398   if test $ac_cv_func_vasprintf = no; then
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
29419
29420
29421   if test $ac_cv_func_vasprintf = yes; then
29422     REPLACE_VASPRINTF=1
29423   else
29424     HAVE_VASPRINTF=0
29425   fi
29426
29427
29428
29429
29430
29431
29432
29433
29434   fi
29435
29436
29437
29438
29439
29440
29441           GNULIB_VASPRINTF=1
29442
29443
29444
29445
29446
29447 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
29448
29449
29450
29451
29452
29453   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
29454
29455
29456
29457   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
29458
29459
29460 # Check whether --with-packager was given.
29461 if test ${with_packager+y}
29462 then :
29463   withval=$with_packager;       case $withval in
29464         yes|no) ;;
29465         *)
29466 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
29467  ;;
29468       esac
29469
29470 fi
29471
29472
29473
29474 # Check whether --with-packager-version was given.
29475 if test ${with_packager_version+y}
29476 then :
29477   withval=$with_packager_version;       case $withval in
29478         yes|no) ;;
29479         *)
29480 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
29481  ;;
29482       esac
29483
29484 fi
29485
29486
29487
29488 # Check whether --with-packager-bug-reports was given.
29489 if test ${with_packager_bug_reports+y}
29490 then :
29491   withval=$with_packager_bug_reports;       case $withval in
29492         yes|no) ;;
29493         *)
29494 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
29495  ;;
29496       esac
29497
29498 fi
29499
29500
29501   if test "X$with_packager" = "X" && \
29502      test "X$with_packager_version$with_packager_bug_reports" != "X"
29503   then
29504     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
29505   fi
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519      if test $gl_cv_have_include_next = yes; then
29520        gl_cv_next_wchar_h='<'wchar.h'>'
29521      else
29522        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
29523 printf %s "checking absolute name of <wchar.h>... " >&6; }
29524 if test ${gl_cv_next_wchar_h+y}
29525 then :
29526   printf %s "(cached) " >&6
29527 else
29528
29529              if test $ac_cv_header_wchar_h = yes; then
29530
29531
29532
29533
29534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535 /* end confdefs.h.  */
29536 #include <wchar.h>
29537 _ACEOF
29538                 case "$host_os" in
29539     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29540     *)    gl_absname_cpp="$ac_cpp" ;;
29541   esac
29542
29543   case "$host_os" in
29544     mingw*)
29545                                           gl_dirsep_regex='[/\\]'
29546       ;;
29547     *)
29548       gl_dirsep_regex='\/'
29549       ;;
29550   esac
29551       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29552   gl_header_literal_regex=`echo 'wchar.h' \
29553                            | sed -e "$gl_make_literal_regex_sed"`
29554   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29555       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29556       s|^/[^/]|//&|
29557       p
29558       q
29559     }'
29560
29561         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29562   sed -n "$gl_absolute_header_sed"`
29563
29564            gl_header=$gl_cv_absolute_wchar_h
29565            gl_cv_next_wchar_h='"'$gl_header'"'
29566           else
29567                gl_cv_next_wchar_h='<'wchar.h'>'
29568              fi
29569
29570
29571 fi
29572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
29573 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
29574      fi
29575      NEXT_WCHAR_H=$gl_cv_next_wchar_h
29576
29577      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29578        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29579        gl_next_as_first_directive='<'wchar.h'>'
29580      else
29581        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29582        gl_next_as_first_directive=$gl_cv_next_wchar_h
29583      fi
29584      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29585
29586
29587
29588
29589   if test $ac_cv_header_wchar_h = yes; then
29590     HAVE_WCHAR_H=1
29591   else
29592     HAVE_WCHAR_H=0
29593   fi
29594
29595
29596
29597
29598
29599   if test $gt_cv_c_wint_t = yes; then
29600     HAVE_WINT_T=1
29601   else
29602     HAVE_WINT_T=0
29603   fi
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29623
29624
29625
29626      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29627 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
29628 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
29629 then :
29630   printf %s "(cached) " >&6
29631 else
29632
29633                   case "$host_os" in
29634                      # Guess no on AIX and OSF/1.
29635         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29636                      # Guess yes otherwise.
29637         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29638       esac
29639       if test $LOCALE_JA != none; then
29640         if test "$cross_compiling" = yes
29641 then :
29642   :
29643 else
29644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29645 /* end confdefs.h.  */
29646
29647 #include <locale.h>
29648 #include <string.h>
29649 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29650    <wchar.h>.
29651    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29652    included before <wchar.h>.  */
29653 #include <stddef.h>
29654 #include <stdio.h>
29655 #include <time.h>
29656 #include <wchar.h>
29657 int main ()
29658 {
29659   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29660     {
29661       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29662       mbstate_t state;
29663       wchar_t wc;
29664
29665       memset (&state, '\0', sizeof (mbstate_t));
29666       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29667         if (mbsinit (&state))
29668           return 2;
29669     }
29670   return 0;
29671 }
29672 _ACEOF
29673 if ac_fn_c_try_run "$LINENO"
29674 then :
29675   gl_cv_func_mbrtowc_incomplete_state=yes
29676 else
29677   gl_cv_func_mbrtowc_incomplete_state=no
29678 fi
29679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29680   conftest.$ac_objext conftest.beam conftest.$ac_ext
29681 fi
29682
29683       fi
29684
29685 fi
29686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29687 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29688
29689
29690
29691
29692      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29693 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
29694 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
29695 then :
29696   printf %s "(cached) " >&6
29697 else
29698
29699                   case "$host_os" in
29700                     # Guess no on Solaris 8.
29701         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29702                     # Guess yes otherwise.
29703         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29704       esac
29705       if test $LOCALE_ZH_CN != none; then
29706         if test "$cross_compiling" = yes
29707 then :
29708   :
29709 else
29710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29711 /* end confdefs.h.  */
29712
29713 #include <locale.h>
29714 #include <stdlib.h>
29715 #include <string.h>
29716 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29717    <wchar.h>.
29718    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29719    included before <wchar.h>.  */
29720 #include <stddef.h>
29721 #include <stdio.h>
29722 #include <time.h>
29723 #include <wchar.h>
29724 int main ()
29725 {
29726   /* This fails on Solaris 8:
29727      mbrtowc returns 2, and sets wc to 0x00F0.
29728      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29729   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29730     {
29731       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29732       mbstate_t state;
29733       wchar_t wc;
29734
29735       memset (&state, '\0', sizeof (mbstate_t));
29736       if (mbrtowc (&wc, input + 3, 6, &state) != 4
29737           && mbtowc (&wc, input + 3, 6) == 4)
29738         return 2;
29739     }
29740   return 0;
29741 }
29742 _ACEOF
29743 if ac_fn_c_try_run "$LINENO"
29744 then :
29745   gl_cv_func_mbrtowc_sanitycheck=yes
29746 else
29747   gl_cv_func_mbrtowc_sanitycheck=no
29748 fi
29749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29750   conftest.$ac_objext conftest.beam conftest.$ac_ext
29751 fi
29752
29753       fi
29754
29755 fi
29756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29757 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29758
29759     REPLACE_MBSTATE_T=0
29760     case "$gl_cv_func_mbrtowc_incomplete_state" in
29761       *yes) ;;
29762       *) REPLACE_MBSTATE_T=1 ;;
29763     esac
29764     case "$gl_cv_func_mbrtowc_sanitycheck" in
29765       *yes) ;;
29766       *) REPLACE_MBSTATE_T=1 ;;
29767     esac
29768   else
29769     REPLACE_MBSTATE_T=1
29770   fi
29771
29772
29773
29774   if test $ac_cv_func_wcrtomb = no; then
29775     HAVE_WCRTOMB=0
29776     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
29777 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29778    <wchar.h>.
29779    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29780    included before <wchar.h>.  */
29781 #include <stddef.h>
29782 #include <stdio.h>
29783 #include <time.h>
29784 #include <wchar.h>
29785
29786 "
29787 if test "x$ac_cv_have_decl_wcrtomb" = xyes
29788 then :
29789   ac_have_decl=1
29790 else
29791   ac_have_decl=0
29792 fi
29793
29794 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
29795
29796     if test $ac_cv_have_decl_wcrtomb = yes; then
29797                         REPLACE_WCRTOMB=1
29798     fi
29799   else
29800     if test $REPLACE_MBSTATE_T = 1; then
29801       REPLACE_WCRTOMB=1
29802     else
29803
29804
29805
29806
29807
29808              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
29809 printf %s "checking whether wcrtomb return value is correct... " >&6; }
29810 if test ${gl_cv_func_wcrtomb_retval+y}
29811 then :
29812   printf %s "(cached) " >&6
29813 else
29814
29815                               case "$host_os" in
29816                                      # Guess no on AIX 4, OSF/1 and Solaris.
29817             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
29818                                      # Guess yes on native Windows.
29819             mingw*)                  gl_cv_func_wcrtomb_retval="guessing yes" ;;
29820                                      # Guess yes otherwise.
29821             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
29822           esac
29823           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
29824             if test "$cross_compiling" = yes
29825 then :
29826   :
29827 else
29828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29829 /* end confdefs.h.  */
29830
29831 #include <locale.h>
29832 #include <string.h>
29833 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29834    <wchar.h>.
29835    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29836    included before <wchar.h>.  */
29837 #include <stddef.h>
29838 #include <stdio.h>
29839 #include <time.h>
29840 #include <wchar.h>
29841 int main ()
29842 {
29843   int result = 0;
29844   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
29845     {
29846       if (wcrtomb (NULL, 0, NULL) != 1)
29847         result |= 1;
29848     }
29849   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29850     {
29851       if (wcrtomb (NULL, 0, NULL) != 1)
29852         result |= 2;
29853     }
29854   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29855     {
29856       if (wcrtomb (NULL, 0, NULL) != 1)
29857         result |= 4;
29858     }
29859   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29860     {
29861       if (wcrtomb (NULL, 0, NULL) != 1)
29862         result |= 8;
29863     }
29864   return result;
29865 }
29866 _ACEOF
29867 if ac_fn_c_try_run "$LINENO"
29868 then :
29869   gl_cv_func_wcrtomb_retval=yes
29870 else
29871   gl_cv_func_wcrtomb_retval=no
29872 fi
29873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29874   conftest.$ac_objext conftest.beam conftest.$ac_ext
29875 fi
29876
29877           fi
29878
29879 fi
29880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
29881 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
29882       case "$gl_cv_func_wcrtomb_retval" in
29883         *yes) ;;
29884         *) REPLACE_WCRTOMB=1 ;;
29885       esac
29886     fi
29887   fi
29888
29889   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
29890
29891
29892
29893
29894
29895
29896
29897
29898   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
29899
29900
29901   :
29902
29903   fi
29904
29905
29906
29907
29908
29909           GNULIB_WCRTOMB=1
29910
29911
29912
29913
29914
29915 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
29916
29917
29918
29919
29920
29921
29922
29923
29924   if test $ac_cv_func_iswcntrl = yes; then
29925     HAVE_ISWCNTRL=1
29926   else
29927     HAVE_ISWCNTRL=0
29928   fi
29929
29930
29931
29932   if test $gt_cv_c_wint_t = yes; then
29933     HAVE_WINT_T=1
29934   else
29935     HAVE_WINT_T=0
29936   fi
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950      if test $gl_cv_have_include_next = yes; then
29951        gl_cv_next_wctype_h='<'wctype.h'>'
29952      else
29953        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
29954 printf %s "checking absolute name of <wctype.h>... " >&6; }
29955 if test ${gl_cv_next_wctype_h+y}
29956 then :
29957   printf %s "(cached) " >&6
29958 else
29959
29960              if test $ac_cv_header_wctype_h = yes; then
29961
29962
29963
29964
29965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966 /* end confdefs.h.  */
29967 #include <wctype.h>
29968 _ACEOF
29969                 case "$host_os" in
29970     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29971     *)    gl_absname_cpp="$ac_cpp" ;;
29972   esac
29973
29974   case "$host_os" in
29975     mingw*)
29976                                           gl_dirsep_regex='[/\\]'
29977       ;;
29978     *)
29979       gl_dirsep_regex='\/'
29980       ;;
29981   esac
29982       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29983   gl_header_literal_regex=`echo 'wctype.h' \
29984                            | sed -e "$gl_make_literal_regex_sed"`
29985   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29986       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29987       s|^/[^/]|//&|
29988       p
29989       q
29990     }'
29991
29992         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29993   sed -n "$gl_absolute_header_sed"`
29994
29995            gl_header=$gl_cv_absolute_wctype_h
29996            gl_cv_next_wctype_h='"'$gl_header'"'
29997           else
29998                gl_cv_next_wctype_h='<'wctype.h'>'
29999              fi
30000
30001
30002 fi
30003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
30004 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
30005      fi
30006      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
30007
30008      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30009        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30010        gl_next_as_first_directive='<'wctype.h'>'
30011      else
30012        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30013        gl_next_as_first_directive=$gl_cv_next_wctype_h
30014      fi
30015      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
30016
30017
30018
30019
30020   if test $ac_cv_header_wctype_h = yes; then
30021     if test $ac_cv_func_iswcntrl = yes; then
30022                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
30023 printf %s "checking whether iswcntrl works... " >&6; }
30024 if test ${gl_cv_func_iswcntrl_works+y}
30025 then :
30026   printf %s "(cached) " >&6
30027 else
30028
30029           if test "$cross_compiling" = yes
30030 then :
30031                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30032 /* end confdefs.h.  */
30033 #include <stdlib.h>
30034                           #if __GNU_LIBRARY__ == 1
30035                           Linux libc5 i18n is broken.
30036                           #endif
30037 int
30038 main (void)
30039 {
30040
30041   ;
30042   return 0;
30043 }
30044 _ACEOF
30045 if ac_fn_c_try_compile "$LINENO"
30046 then :
30047   gl_cv_func_iswcntrl_works="guessing yes"
30048 else
30049   gl_cv_func_iswcntrl_works="guessing no"
30050 fi
30051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30052
30053 else
30054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30055 /* end confdefs.h.  */
30056
30057                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30058                   included before <wchar.h>.
30059                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30060                   must be included before <wchar.h>.  */
30061                #include <stddef.h>
30062                #include <stdio.h>
30063                #include <time.h>
30064                #include <wchar.h>
30065                #include <wctype.h>
30066                int main () { return iswprint ('x') == 0; }
30067
30068 _ACEOF
30069 if ac_fn_c_try_run "$LINENO"
30070 then :
30071   gl_cv_func_iswcntrl_works=yes
30072 else
30073   gl_cv_func_iswcntrl_works=no
30074 fi
30075 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30076   conftest.$ac_objext conftest.beam conftest.$ac_ext
30077 fi
30078
30079
30080 fi
30081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
30082 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
30083     fi
30084     HAVE_WCTYPE_H=1
30085   else
30086     HAVE_WCTYPE_H=0
30087   fi
30088
30089
30090   case "$gl_cv_func_iswcntrl_works" in
30091     *yes) REPLACE_ISWCNTRL=0 ;;
30092     *)    REPLACE_ISWCNTRL=1 ;;
30093   esac
30094
30095
30096   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
30097         :
30098   fi
30099
30100   if test $REPLACE_ISWCNTRL = 1; then
30101     REPLACE_TOWLOWER=1
30102   else
30103     ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
30104 if test "x$ac_cv_func_towlower" = xyes
30105 then :
30106   printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
30107
30108 fi
30109
30110     if test $ac_cv_func_towlower = yes; then
30111       REPLACE_TOWLOWER=0
30112     else
30113       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30114              included before <wchar.h>.
30115              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30116              must be included before <wchar.h>.  */
30117           #include <stddef.h>
30118           #include <stdio.h>
30119           #include <time.h>
30120           #include <wchar.h>
30121           #if HAVE_WCTYPE_H
30122           # include <wctype.h>
30123           #endif
30124
30125 "
30126 if test "x$ac_cv_have_decl_towlower" = xyes
30127 then :
30128   ac_have_decl=1
30129 else
30130   ac_have_decl=0
30131 fi
30132
30133 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
30134
30135       if test $ac_cv_have_decl_towlower = yes; then
30136                                 REPLACE_TOWLOWER=1
30137       else
30138         REPLACE_TOWLOWER=0
30139       fi
30140     fi
30141   fi
30142
30143
30144   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
30145         :
30146   fi
30147
30148           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
30149 printf %s "checking for wctype_t... " >&6; }
30150 if test ${gl_cv_type_wctype_t+y}
30151 then :
30152   printf %s "(cached) " >&6
30153 else
30154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30155 /* end confdefs.h.  */
30156 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30157                included before <wchar.h>.
30158                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30159                must be included before <wchar.h>.  */
30160             #include <stddef.h>
30161             #include <stdio.h>
30162             #include <time.h>
30163             #include <wchar.h>
30164             #if HAVE_WCTYPE_H
30165             # include <wctype.h>
30166             #endif
30167             wctype_t a;
30168
30169 int
30170 main (void)
30171 {
30172
30173   ;
30174   return 0;
30175 }
30176 _ACEOF
30177 if ac_fn_c_try_compile "$LINENO"
30178 then :
30179   gl_cv_type_wctype_t=yes
30180 else
30181   gl_cv_type_wctype_t=no
30182 fi
30183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30184
30185 fi
30186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
30187 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
30188   if test $gl_cv_type_wctype_t = no; then
30189     HAVE_WCTYPE_T=0
30190   fi
30191
30192       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
30193 printf %s "checking for wctrans_t... " >&6; }
30194 if test ${gl_cv_type_wctrans_t+y}
30195 then :
30196   printf %s "(cached) " >&6
30197 else
30198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30199 /* end confdefs.h.  */
30200 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30201                included before <wchar.h>.
30202                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30203                must be included before <wchar.h>.  */
30204             #include <stddef.h>
30205             #include <stdio.h>
30206             #include <time.h>
30207             #include <wchar.h>
30208             #include <wctype.h>
30209             wctrans_t a;
30210
30211 int
30212 main (void)
30213 {
30214
30215   ;
30216   return 0;
30217 }
30218 _ACEOF
30219 if ac_fn_c_try_compile "$LINENO"
30220 then :
30221   gl_cv_type_wctrans_t=yes
30222 else
30223   gl_cv_type_wctrans_t=no
30224 fi
30225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30226
30227 fi
30228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30229 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
30230   if test $gl_cv_type_wctrans_t = no; then
30231     HAVE_WCTRANS_T=0
30232   fi
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
30250 /* AIX 3.2.5 declares wcwidth in <string.h>. */
30251 #include <string.h>
30252 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30253    <wchar.h>.
30254    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
30255    before <wchar.h>.  */
30256 #include <stddef.h>
30257 #include <stdio.h>
30258 #include <time.h>
30259 #include <wchar.h>
30260
30261 "
30262 if test "x$ac_cv_have_decl_wcwidth" = xyes
30263 then :
30264   ac_have_decl=1
30265 else
30266   ac_have_decl=0
30267 fi
30268
30269 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
30270
30271   if test $ac_cv_have_decl_wcwidth != yes; then
30272     HAVE_DECL_WCWIDTH=0
30273   fi
30274
30275   if test $ac_cv_func_wcwidth != yes; then
30276     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
30277 printf %s "checking whether wcwidth is a macro... " >&6; }
30278 if test ${gl_cv_func_wcwidth_macro+y}
30279 then :
30280   printf %s "(cached) " >&6
30281 else
30282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30283 /* end confdefs.h.  */
30284
30285 #include <wchar.h>
30286 #ifdef wcwidth
30287  wchar_header_defines_wcwidth
30288 #endif
30289 _ACEOF
30290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30291   $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
30292 then :
30293   gl_cv_func_wcwidth_macro=yes
30294 else
30295   gl_cv_func_wcwidth_macro=no
30296 fi
30297 rm -rf conftest*
30298
30299
30300 fi
30301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
30302 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
30303   fi
30304
30305   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
30306     HAVE_WCWIDTH=1
30307                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
30308 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
30309 if test ${gl_cv_func_wcwidth_works+y}
30310 then :
30311   printf %s "(cached) " >&6
30312 else
30313
30314         if test "$cross_compiling" = yes
30315 then :
30316
30317            case "$host_os" in
30318                                         # Guess yes on glibc and AIX 7 systems.
30319              *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
30320              *)                         gl_cv_func_wcwidth_works="guessing no";;
30321            esac
30322
30323 else
30324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30325 /* end confdefs.h.  */
30326
30327 #include <locale.h>
30328 /* AIX 3.2.5 declares wcwidth in <string.h>. */
30329 #include <string.h>
30330 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30331    <wchar.h>.
30332    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
30333    before <wchar.h>.  */
30334 #include <stddef.h>
30335 #include <stdio.h>
30336 #include <time.h>
30337 #include <wchar.h>
30338 #if !HAVE_DECL_WCWIDTH
30339 extern
30340 # ifdef __cplusplus
30341 "C"
30342 # endif
30343 int wcwidth (int);
30344 #endif
30345 int main ()
30346 {
30347   int result = 0;
30348   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
30349     {
30350       if (wcwidth (0x0301) > 0)
30351         result |= 1;
30352       if (wcwidth (0x05B0) > 0)
30353         result |= 2;
30354       if (wcwidth (0x200B) > 0)
30355         result |= 4;
30356       if (wcwidth (0xFF1A) == 0)
30357         result |= 8;
30358     }
30359   return result;
30360 }
30361 _ACEOF
30362 if ac_fn_c_try_run "$LINENO"
30363 then :
30364   gl_cv_func_wcwidth_works=yes
30365 else
30366   gl_cv_func_wcwidth_works=no
30367 fi
30368 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30369   conftest.$ac_objext conftest.beam conftest.$ac_ext
30370 fi
30371
30372
30373 fi
30374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
30375 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
30376     case "$gl_cv_func_wcwidth_works" in
30377       *yes) ;;
30378       *no) REPLACE_WCWIDTH=1 ;;
30379     esac
30380   else
30381     HAVE_WCWIDTH=0
30382   fi
30383
30384   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
30385
30386
30387
30388
30389
30390
30391
30392
30393   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
30394
30395
30396
30397   :
30398
30399   fi
30400
30401
30402
30403
30404
30405           GNULIB_WCWIDTH=1
30406
30407
30408
30409
30410
30411 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
30412
30413
30414
30415   :
30416
30417
30418   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
30419 if test "x$ac_cv_header_stdint_h" = xyes
30420 then :
30421   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
30422
30423 fi
30424
30425
30426
30427
30428   :
30429
30430
30431
30432   :
30433
30434   :
30435
30436
30437   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
30438
30439   # End of code from modules
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449   gltests_libdeps=
30450   gltests_ltlibdeps=
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460   gl_source_base='gnulib-tests'
30461   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
30462
30463   gl_module_indicator_condition=$gltests_WITNESS
30464
30465
30466   if test "$ac_cv_header_winsock2_h" = yes; then
30467
30468
30469
30470
30471
30472
30473
30474
30475   gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
30476
30477   fi
30478
30479
30480
30481
30482
30483     if test "$GNULIB_ACCEPT" != 1; then
30484         if test "$GNULIB_ACCEPT" = 0; then
30485       GNULIB_ACCEPT=$gl_module_indicator_condition
30486     else
30487       GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
30488     fi
30489   fi
30490
30491
30492
30493
30494
30495 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
30496
30497
30498
30499
30500
30501
30502
30503   if test $ac_cv_header_arpa_inet_h = yes; then
30504     HAVE_ARPA_INET_H=1
30505   else
30506     HAVE_ARPA_INET_H=0
30507   fi
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518      if test $gl_cv_have_include_next = yes; then
30519        gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
30520      else
30521        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
30522 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
30523 if test ${gl_cv_next_arpa_inet_h+y}
30524 then :
30525   printf %s "(cached) " >&6
30526 else
30527
30528              if test $ac_cv_header_arpa_inet_h = yes; then
30529
30530
30531
30532
30533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534 /* end confdefs.h.  */
30535 #include <arpa/inet.h>
30536 _ACEOF
30537                 case "$host_os" in
30538     aix*) gl_absname_cpp="$ac_cpp -C" ;;
30539     *)    gl_absname_cpp="$ac_cpp" ;;
30540   esac
30541
30542   case "$host_os" in
30543     mingw*)
30544                                           gl_dirsep_regex='[/\\]'
30545       ;;
30546     *)
30547       gl_dirsep_regex='\/'
30548       ;;
30549   esac
30550       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30551   gl_header_literal_regex=`echo 'arpa/inet.h' \
30552                            | sed -e "$gl_make_literal_regex_sed"`
30553   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30554       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30555       s|^/[^/]|//&|
30556       p
30557       q
30558     }'
30559
30560         gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30561   sed -n "$gl_absolute_header_sed"`
30562
30563            gl_header=$gl_cv_absolute_arpa_inet_h
30564            gl_cv_next_arpa_inet_h='"'$gl_header'"'
30565           else
30566                gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
30567              fi
30568
30569
30570 fi
30571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
30572 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
30573      fi
30574      NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
30575
30576      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30577        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30578        gl_next_as_first_directive='<'arpa/inet.h'>'
30579      else
30580        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30581        gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
30582      fi
30583      NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597   if test "$ac_cv_header_winsock2_h" = yes; then
30598
30599
30600
30601
30602
30603
30604
30605
30606   gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
30607
30608   fi
30609
30610
30611
30612
30613
30614     if test "$GNULIB_BIND" != 1; then
30615         if test "$GNULIB_BIND" = 0; then
30616       GNULIB_BIND=$gl_module_indicator_condition
30617     else
30618       GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
30619     fi
30620   fi
30621
30622
30623
30624
30625
30626 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
30627
30628
30629
30630
30631
30632
30633   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
30634 printf %s "checking for a traditional french locale... " >&6; }
30635 if test ${gt_cv_locale_fr+y}
30636 then :
30637   printf %s "(cached) " >&6
30638 else
30639
30640     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30641 /* end confdefs.h.  */
30642
30643 #include <locale.h>
30644 #include <time.h>
30645 #if HAVE_LANGINFO_CODESET
30646 # include <langinfo.h>
30647 #endif
30648 #include <stdlib.h>
30649 #include <string.h>
30650 struct tm t;
30651 char buf[16];
30652 int main () {
30653   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
30654      imitates locale dependent behaviour by looking at the environment
30655      variables, and all locales use the UTF-8 encoding.  */
30656 #if defined __BEOS__ || defined __HAIKU__
30657   return 1;
30658 #else
30659   /* Check whether the given locale name is recognized by the system.  */
30660 # if defined _WIN32 && !defined __CYGWIN__
30661   /* On native Windows, setlocale(category, "") looks at the system settings,
30662      not at the environment variables.  Also, when an encoding suffix such
30663      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30664      category of the locale to "C".  */
30665   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30666       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30667     return 1;
30668 # else
30669   if (setlocale (LC_ALL, "") == NULL) return 1;
30670 # endif
30671   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30672      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30673      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30674      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30675      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30676      some unit tests fail.
30677      On MirBSD 10, when an unsupported locale is specified, setlocale()
30678      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
30679 # if HAVE_LANGINFO_CODESET
30680   {
30681     const char *cs = nl_langinfo (CODESET);
30682     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
30683         || strcmp (cs, "UTF-8") == 0)
30684       return 1;
30685   }
30686 # endif
30687 # ifdef __CYGWIN__
30688   /* On Cygwin, avoid locale names without encoding suffix, because the
30689      locale_charset() function relies on the encoding suffix.  Note that
30690      LC_ALL is set on the command line.  */
30691   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30692 # endif
30693   /* Check whether in the abbreviation of the second month, the second
30694      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
30695      one byte long. This excludes the UTF-8 encoding.  */
30696   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30697   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
30698 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
30699   /* Check whether the decimal separator is a comma.
30700      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30701      are nl_langinfo(RADIXCHAR) are both ".".  */
30702   if (localeconv () ->decimal_point[0] != ',') return 1;
30703 # endif
30704   return 0;
30705 #endif
30706 }
30707
30708 _ACEOF
30709     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30710   (eval $ac_link) 2>&5
30711   ac_status=$?
30712   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30713   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30714       case "$host_os" in
30715         # Handle native Windows specially, because there setlocale() interprets
30716         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30717         # "fr" or "fra" as "French" or "French_France.1252",
30718         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30719         # "ja" as "Japanese" or "Japanese_Japan.932",
30720         # and similar.
30721         mingw*)
30722           # Test for the native Windows locale name.
30723           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30724             gt_cv_locale_fr=French_France.1252
30725           else
30726             # None found.
30727             gt_cv_locale_fr=none
30728           fi
30729           ;;
30730         *)
30731           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30732           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30733           # configure script would override the LC_ALL setting. Likewise for
30734           # LC_CTYPE, which is also set at the beginning of the configure script.
30735           # Test for the usual locale name.
30736           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30737             gt_cv_locale_fr=fr_FR
30738           else
30739             # Test for the locale name with explicit encoding suffix.
30740             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30741               gt_cv_locale_fr=fr_FR.ISO-8859-1
30742             else
30743               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
30744               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30745                 gt_cv_locale_fr=fr_FR.ISO8859-1
30746               else
30747                 # Test for the HP-UX locale name.
30748                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30749                   gt_cv_locale_fr=fr_FR.iso88591
30750                 else
30751                   # Test for the Solaris 7 locale name.
30752                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30753                     gt_cv_locale_fr=fr
30754                   else
30755                     # None found.
30756                     gt_cv_locale_fr=none
30757                   fi
30758                 fi
30759               fi
30760             fi
30761           fi
30762           ;;
30763       esac
30764     fi
30765     rm -fr conftest*
30766
30767 fi
30768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
30769 printf "%s\n" "$gt_cv_locale_fr" >&6; }
30770   LOCALE_FR=$gt_cv_locale_fr
30771
30772
30773
30774
30775   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
30776 printf %s "checking for a french Unicode locale... " >&6; }
30777 if test ${gt_cv_locale_fr_utf8+y}
30778 then :
30779   printf %s "(cached) " >&6
30780 else
30781
30782     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30783 /* end confdefs.h.  */
30784
30785 #include <locale.h>
30786 #include <time.h>
30787 #if HAVE_LANGINFO_CODESET
30788 # include <langinfo.h>
30789 #endif
30790 #include <stdlib.h>
30791 #include <string.h>
30792 struct tm t;
30793 char buf[16];
30794 int main () {
30795   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
30796      imitates locale dependent behaviour by looking at the environment
30797      variables, and all locales use the UTF-8 encoding.  */
30798 #if !(defined __BEOS__ || defined __HAIKU__)
30799   /* Check whether the given locale name is recognized by the system.  */
30800 # if defined _WIN32 && !defined __CYGWIN__
30801   /* On native Windows, setlocale(category, "") looks at the system settings,
30802      not at the environment variables.  Also, when an encoding suffix such
30803      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30804      category of the locale to "C".  */
30805   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30806       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30807     return 1;
30808 # else
30809   if (setlocale (LC_ALL, "") == NULL) return 1;
30810 # endif
30811   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30812      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30813      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30814      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30815      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30816      some unit tests fail.  */
30817 # if HAVE_LANGINFO_CODESET
30818   {
30819     const char *cs = nl_langinfo (CODESET);
30820     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
30821       return 1;
30822   }
30823 # endif
30824 # ifdef __CYGWIN__
30825   /* On Cygwin, avoid locale names without encoding suffix, because the
30826      locale_charset() function relies on the encoding suffix.  Note that
30827      LC_ALL is set on the command line.  */
30828   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30829 # endif
30830   /* Check whether in the abbreviation of the second month, the second
30831      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
30832      two bytes long, with UTF-8 encoding.  */
30833   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30834   if (strftime (buf, sizeof (buf), "%b", &t) < 4
30835       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
30836     return 1;
30837 #endif
30838 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
30839   /* Check whether the decimal separator is a comma.
30840      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30841      are nl_langinfo(RADIXCHAR) are both ".".  */
30842   if (localeconv () ->decimal_point[0] != ',') return 1;
30843 #endif
30844   return 0;
30845 }
30846
30847 _ACEOF
30848     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30849   (eval $ac_link) 2>&5
30850   ac_status=$?
30851   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30852   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30853       case "$host_os" in
30854         # Handle native Windows specially, because there setlocale() interprets
30855         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30856         # "fr" or "fra" as "French" or "French_France.1252",
30857         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30858         # "ja" as "Japanese" or "Japanese_Japan.932",
30859         # and similar.
30860         mingw*)
30861           # Test for the hypothetical native Windows locale name.
30862           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30863             gt_cv_locale_fr_utf8=French_France.65001
30864           else
30865             # None found.
30866             gt_cv_locale_fr_utf8=none
30867           fi
30868           ;;
30869         *)
30870           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30871           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30872           # configure script would override the LC_ALL setting. Likewise for
30873           # LC_CTYPE, which is also set at the beginning of the configure script.
30874           # Test for the usual locale name.
30875           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30876             gt_cv_locale_fr_utf8=fr_FR
30877           else
30878             # Test for the locale name with explicit encoding suffix.
30879             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30880               gt_cv_locale_fr_utf8=fr_FR.UTF-8
30881             else
30882               # Test for the Solaris 7 locale name.
30883               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30884                 gt_cv_locale_fr_utf8=fr.UTF-8
30885               else
30886                 # None found.
30887                 gt_cv_locale_fr_utf8=none
30888               fi
30889             fi
30890           fi
30891           ;;
30892       esac
30893     fi
30894     rm -fr conftest*
30895
30896 fi
30897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
30898 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
30899   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
30900
30901
30902
30903
30904
30905   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
30906 printf %s "checking for a traditional french locale... " >&6; }
30907 if test ${gt_cv_locale_fr+y}
30908 then :
30909   printf %s "(cached) " >&6
30910 else
30911
30912     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30913 /* end confdefs.h.  */
30914
30915 #include <locale.h>
30916 #include <time.h>
30917 #if HAVE_LANGINFO_CODESET
30918 # include <langinfo.h>
30919 #endif
30920 #include <stdlib.h>
30921 #include <string.h>
30922 struct tm t;
30923 char buf[16];
30924 int main () {
30925   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
30926      imitates locale dependent behaviour by looking at the environment
30927      variables, and all locales use the UTF-8 encoding.  */
30928 #if defined __BEOS__ || defined __HAIKU__
30929   return 1;
30930 #else
30931   /* Check whether the given locale name is recognized by the system.  */
30932 # if defined _WIN32 && !defined __CYGWIN__
30933   /* On native Windows, setlocale(category, "") looks at the system settings,
30934      not at the environment variables.  Also, when an encoding suffix such
30935      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30936      category of the locale to "C".  */
30937   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30938       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30939     return 1;
30940 # else
30941   if (setlocale (LC_ALL, "") == NULL) return 1;
30942 # endif
30943   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30944      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30945      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30946      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30947      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30948      some unit tests fail.
30949      On MirBSD 10, when an unsupported locale is specified, setlocale()
30950      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
30951 # if HAVE_LANGINFO_CODESET
30952   {
30953     const char *cs = nl_langinfo (CODESET);
30954     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
30955         || strcmp (cs, "UTF-8") == 0)
30956       return 1;
30957   }
30958 # endif
30959 # ifdef __CYGWIN__
30960   /* On Cygwin, avoid locale names without encoding suffix, because the
30961      locale_charset() function relies on the encoding suffix.  Note that
30962      LC_ALL is set on the command line.  */
30963   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30964 # endif
30965   /* Check whether in the abbreviation of the second month, the second
30966      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
30967      one byte long. This excludes the UTF-8 encoding.  */
30968   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30969   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
30970 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
30971   /* Check whether the decimal separator is a comma.
30972      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30973      are nl_langinfo(RADIXCHAR) are both ".".  */
30974   if (localeconv () ->decimal_point[0] != ',') return 1;
30975 # endif
30976   return 0;
30977 #endif
30978 }
30979
30980 _ACEOF
30981     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30982   (eval $ac_link) 2>&5
30983   ac_status=$?
30984   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30985   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30986       case "$host_os" in
30987         # Handle native Windows specially, because there setlocale() interprets
30988         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30989         # "fr" or "fra" as "French" or "French_France.1252",
30990         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30991         # "ja" as "Japanese" or "Japanese_Japan.932",
30992         # and similar.
30993         mingw*)
30994           # Test for the native Windows locale name.
30995           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30996             gt_cv_locale_fr=French_France.1252
30997           else
30998             # None found.
30999             gt_cv_locale_fr=none
31000           fi
31001           ;;
31002         *)
31003           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31004           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31005           # configure script would override the LC_ALL setting. Likewise for
31006           # LC_CTYPE, which is also set at the beginning of the configure script.
31007           # Test for the usual locale name.
31008           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31009             gt_cv_locale_fr=fr_FR
31010           else
31011             # Test for the locale name with explicit encoding suffix.
31012             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31013               gt_cv_locale_fr=fr_FR.ISO-8859-1
31014             else
31015               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31016               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31017                 gt_cv_locale_fr=fr_FR.ISO8859-1
31018               else
31019                 # Test for the HP-UX locale name.
31020                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31021                   gt_cv_locale_fr=fr_FR.iso88591
31022                 else
31023                   # Test for the Solaris 7 locale name.
31024                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31025                     gt_cv_locale_fr=fr
31026                   else
31027                     # None found.
31028                     gt_cv_locale_fr=none
31029                   fi
31030                 fi
31031               fi
31032             fi
31033           fi
31034           ;;
31035       esac
31036     fi
31037     rm -fr conftest*
31038
31039 fi
31040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31041 printf "%s\n" "$gt_cv_locale_fr" >&6; }
31042   LOCALE_FR=$gt_cv_locale_fr
31043
31044
31045
31046
31047
31048   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
31049 printf %s "checking for a turkish Unicode locale... " >&6; }
31050 if test ${gt_cv_locale_tr_utf8+y}
31051 then :
31052   printf %s "(cached) " >&6
31053 else
31054
31055     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31056 /* end confdefs.h.  */
31057
31058 #include <locale.h>
31059 #include <time.h>
31060 #if HAVE_LANGINFO_CODESET
31061 # include <langinfo.h>
31062 #endif
31063 #include <stdlib.h>
31064 #include <string.h>
31065 struct tm t;
31066 char buf[16];
31067 int main () {
31068   /* On BeOS, locales are not implemented in libc.  Rather, libintl
31069      imitates locale dependent behaviour by looking at the environment
31070      variables, and all locales use the UTF-8 encoding.  But BeOS does not
31071      implement the Turkish upper-/lowercase mappings.  Therefore, let this
31072      program return 1 on BeOS.  */
31073   /* Check whether the given locale name is recognized by the system.  */
31074 #if defined _WIN32 && !defined __CYGWIN__
31075   /* On native Windows, setlocale(category, "") looks at the system settings,
31076      not at the environment variables.  Also, when an encoding suffix such
31077      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
31078      category of the locale to "C".  */
31079   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31080       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31081     return 1;
31082 #else
31083   if (setlocale (LC_ALL, "") == NULL) return 1;
31084 #endif
31085   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31086      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
31087      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31088      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31089      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31090      some unit tests fail.  */
31091 #if HAVE_LANGINFO_CODESET
31092   {
31093     const char *cs = nl_langinfo (CODESET);
31094     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31095       return 1;
31096   }
31097 #endif
31098 #ifdef __CYGWIN__
31099   /* On Cygwin, avoid locale names without encoding suffix, because the
31100      locale_charset() function relies on the encoding suffix.  Note that
31101      LC_ALL is set on the command line.  */
31102   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31103 #endif
31104   /* Check whether in the abbreviation of the eighth month, the second
31105      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
31106      two bytes long, with UTF-8 encoding.  */
31107   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
31108   if (strftime (buf, sizeof (buf), "%b", &t) < 4
31109       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
31110     return 1;
31111   /* Check whether the upper-/lowercase mappings are as expected for
31112      Turkish.  */
31113   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
31114       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
31115     return 1;
31116   return 0;
31117 }
31118
31119 _ACEOF
31120     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31121   (eval $ac_link) 2>&5
31122   ac_status=$?
31123   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31124   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31125       case "$host_os" in
31126         # Handle native Windows specially, because there setlocale() interprets
31127         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31128         # "fr" or "fra" as "French" or "French_France.1252",
31129         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31130         # "ja" as "Japanese" or "Japanese_Japan.932",
31131         # and similar.
31132         mingw*)
31133           # Test for the hypothetical native Windows locale name.
31134           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31135             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
31136           else
31137             # None found.
31138             gt_cv_locale_tr_utf8=none
31139           fi
31140           ;;
31141         *)
31142           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31143           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31144           # configure script would override the LC_ALL setting. Likewise for
31145           # LC_CTYPE, which is also set at the beginning of the configure script.
31146           # Test for the usual locale name.
31147           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31148             gt_cv_locale_tr_utf8=tr_TR
31149           else
31150             # Test for the locale name with explicit encoding suffix.
31151             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31152               gt_cv_locale_tr_utf8=tr_TR.UTF-8
31153             else
31154               # Test for the Solaris 7 locale name.
31155               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31156                 gt_cv_locale_tr_utf8=tr.UTF-8
31157               else
31158                 # None found.
31159                 gt_cv_locale_tr_utf8=none
31160               fi
31161             fi
31162           fi
31163           ;;
31164       esac
31165     else
31166       gt_cv_locale_tr_utf8=none
31167     fi
31168     rm -fr conftest*
31169
31170 fi
31171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
31172 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
31173   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
31174
31175
31176
31177   if test "$ac_cv_header_winsock2_h" = yes; then
31178
31179
31180
31181
31182
31183
31184
31185
31186   gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
31187
31188   fi
31189
31190
31191
31192
31193
31194     if test "$GNULIB_CONNECT" != 1; then
31195         if test "$GNULIB_CONNECT" = 0; then
31196       GNULIB_CONNECT=$gl_module_indicator_condition
31197     else
31198       GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
31199     fi
31200   fi
31201
31202
31203
31204
31205
31206 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
31207
31208
31209
31210
31211
31212
31213
31214     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31215       REPLACE_FDOPEN=1
31216     fi
31217
31218   if test $REPLACE_FDOPEN = 0; then
31219         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
31220 printf %s "checking whether fdopen sets errno... " >&6; }
31221 if test ${gl_cv_func_fdopen_works+y}
31222 then :
31223   printf %s "(cached) " >&6
31224 else
31225
31226         if test "$cross_compiling" = yes
31227 then :
31228   case "$host_os" in
31229              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
31230              *)      gl_cv_func_fdopen_works="guessing yes" ;;
31231            esac
31232
31233 else
31234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31235 /* end confdefs.h.  */
31236
31237 #include <stdio.h>
31238 #include <errno.h>
31239 int
31240 main (void)
31241 {
31242   FILE *fp;
31243   errno = 0;
31244   fp = fdopen (-1, "r");
31245   if (fp == NULL && errno == 0)
31246     return 1;
31247   return 0;
31248 }
31249 _ACEOF
31250 if ac_fn_c_try_run "$LINENO"
31251 then :
31252   gl_cv_func_fdopen_works=yes
31253 else
31254   gl_cv_func_fdopen_works=no
31255 fi
31256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31257   conftest.$ac_objext conftest.beam conftest.$ac_ext
31258 fi
31259
31260
31261 fi
31262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
31263 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
31264     case "$gl_cv_func_fdopen_works" in
31265       *no) REPLACE_FDOPEN=1 ;;
31266     esac
31267   fi
31268
31269   if test $REPLACE_FDOPEN = 1; then
31270
31271
31272
31273
31274
31275
31276
31277
31278   gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
31279
31280
31281   fi
31282
31283
31284
31285
31286
31287     if test "$GNULIB_FDOPEN" != 1; then
31288         if test "$GNULIB_FDOPEN" = 0; then
31289       GNULIB_FDOPEN=$gl_module_indicator_condition
31290     else
31291       GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
31292     fi
31293   fi
31294
31295
31296
31297
31298
31299 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
31300
31301
31302
31303
31304
31305
31306   if test $ac_cv_func_ftruncate = yes; then
31307
31308
31309       case "$host_os" in
31310         mingw*)
31311                                                                       REPLACE_FTRUNCATE=1
31312           ;;
31313       esac
31314
31315   else
31316     HAVE_FTRUNCATE=0
31317   fi
31318
31319   if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
31320
31321
31322
31323
31324
31325
31326
31327
31328   gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
31329
31330
31331   ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
31332 if test "x$ac_cv_func_chsize" = xyes
31333 then :
31334   printf "%s\n" "#define HAVE_CHSIZE 1" >>confdefs.h
31335
31336 fi
31337
31338
31339   fi
31340
31341
31342
31343
31344
31345     if test "$GNULIB_FTRUNCATE" != 1; then
31346         if test "$GNULIB_FTRUNCATE" = 0; then
31347       GNULIB_FTRUNCATE=$gl_module_indicator_condition
31348     else
31349       GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
31350     fi
31351   fi
31352
31353
31354
31355
31356
31357 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
31358
31359
31360
31361
31362
31363
31364
31365
31366   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
31367   *yes,yes) ;;
31368   *)
31369         REPLACE_GETCWD=1
31370     ;;
31371   esac
31372
31373   if test $REPLACE_GETCWD = 1; then
31374
31375
31376
31377
31378
31379
31380
31381
31382   gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
31383
31384   fi
31385
31386
31387
31388
31389
31390     if test "$GNULIB_GETCWD" != 1; then
31391         if test "$GNULIB_GETCWD" = 0; then
31392       GNULIB_GETCWD=$gl_module_indicator_condition
31393     else
31394       GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
31395     fi
31396   fi
31397
31398
31399
31400
31401
31402 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
31403
31404
31405
31406
31407
31408
31409
31410       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
31411 printf %s "checking for getpagesize... " >&6; }
31412 if test ${gl_cv_func_getpagesize+y}
31413 then :
31414   printf %s "(cached) " >&6
31415 else
31416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31417 /* end confdefs.h.  */
31418 #include <unistd.h>
31419 int
31420 main (void)
31421 {
31422 return getpagesize();
31423   ;
31424   return 0;
31425 }
31426
31427 _ACEOF
31428 if ac_fn_c_try_link "$LINENO"
31429 then :
31430   gl_cv_func_getpagesize=yes
31431 else
31432   gl_cv_func_getpagesize=no
31433 fi
31434 rm -f core conftest.err conftest.$ac_objext \
31435     conftest$ac_exeext conftest.$ac_ext
31436
31437 fi
31438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
31439 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
31440
31441   if test $gl_cv_func_getpagesize = no; then
31442     HAVE_GETPAGESIZE=0
31443     ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
31444 if test "x$ac_cv_header_OS_h" = xyes
31445 then :
31446   printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
31447
31448 fi
31449
31450     if test $ac_cv_header_OS_h = yes; then
31451       HAVE_OS_H=1
31452     fi
31453     ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
31454 if test "x$ac_cv_header_sys_param_h" = xyes
31455 then :
31456   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
31457
31458 fi
31459
31460     if test $ac_cv_header_sys_param_h = yes; then
31461       HAVE_SYS_PARAM_H=1
31462     fi
31463   fi
31464   case "$host_os" in
31465     mingw*)
31466       REPLACE_GETPAGESIZE=1
31467       ;;
31468   esac
31469       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
31470 if test "x$ac_cv_have_decl_getpagesize" = xyes
31471 then :
31472
31473 else
31474   HAVE_DECL_GETPAGESIZE=0
31475 fi
31476
31477
31478   if test $REPLACE_GETPAGESIZE = 1; then
31479
31480
31481
31482
31483
31484
31485
31486
31487   gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
31488
31489   fi
31490
31491
31492
31493
31494
31495     if test "$GNULIB_GETPAGESIZE" != 1; then
31496         if test "$GNULIB_GETPAGESIZE" = 0; then
31497       GNULIB_GETPAGESIZE=$gl_module_indicator_condition
31498     else
31499       GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
31500     fi
31501   fi
31502
31503
31504
31505
31506
31507 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518                 HAVE_INET_PTON=1
31519   INET_PTON_LIB=
31520
31521
31522
31523
31524   if test $ac_cv_header_sys_socket_h != yes; then
31525                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31526 if test "x$ac_cv_header_winsock2_h" = xyes
31527 then :
31528   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
31529
31530 fi
31531
31532   fi
31533   if test "$ac_cv_header_winsock2_h" = yes; then
31534     HAVE_WINSOCK2_H=1
31535     UNISTD_H_HAVE_WINSOCK2_H=1
31536     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31537   else
31538     HAVE_WINSOCK2_H=0
31539   fi
31540
31541
31542   if test $HAVE_WINSOCK2_H = 1; then
31543     ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
31544 "
31545 if test "x$ac_cv_have_decl_inet_pton" = xyes
31546 then :
31547   ac_have_decl=1
31548 else
31549   ac_have_decl=0
31550 fi
31551
31552 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31553
31554     if test $ac_cv_have_decl_inet_pton = yes; then
31555                   REPLACE_INET_PTON=1
31556       INET_PTON_LIB="-lws2_32"
31557     else
31558       HAVE_DECL_INET_PTON=0
31559       HAVE_INET_PTON=0
31560     fi
31561   else
31562     gl_save_LIBS=$LIBS
31563     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
31564 printf %s "checking for library containing inet_pton... " >&6; }
31565 if test ${ac_cv_search_inet_pton+y}
31566 then :
31567   printf %s "(cached) " >&6
31568 else
31569   ac_func_search_save_LIBS=$LIBS
31570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31571 /* end confdefs.h.  */
31572
31573 /* Override any GCC internal prototype to avoid an error.
31574    Use char because int might match the return type of a GCC
31575    builtin and then its argument prototype would still apply.  */
31576 #ifdef __cplusplus
31577 extern "C"
31578 #endif
31579 char inet_pton ();
31580 int
31581 main (void)
31582 {
31583 return inet_pton ();
31584   ;
31585   return 0;
31586 }
31587 _ACEOF
31588 for ac_lib in '' nsl resolv network
31589 do
31590   if test -z "$ac_lib"; then
31591     ac_res="none required"
31592   else
31593     ac_res=-l$ac_lib
31594     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31595   fi
31596   if ac_fn_c_try_link "$LINENO"
31597 then :
31598   ac_cv_search_inet_pton=$ac_res
31599 fi
31600 rm -f core conftest.err conftest.$ac_objext \
31601     conftest$ac_exeext
31602   if test ${ac_cv_search_inet_pton+y}
31603 then :
31604   break
31605 fi
31606 done
31607 if test ${ac_cv_search_inet_pton+y}
31608 then :
31609
31610 else
31611   ac_cv_search_inet_pton=no
31612 fi
31613 rm conftest.$ac_ext
31614 LIBS=$ac_func_search_save_LIBS
31615 fi
31616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
31617 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
31618 ac_res=$ac_cv_search_inet_pton
31619 if test "$ac_res" != no
31620 then :
31621   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31622
31623 else
31624   ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
31625 if test "x$ac_cv_func_inet_pton" = xyes
31626 then :
31627   printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
31628
31629 fi
31630
31631        if test $ac_cv_func_inet_pton = no; then
31632          HAVE_INET_PTON=0
31633        fi
31634
31635 fi
31636
31637     LIBS=$gl_save_LIBS
31638
31639     if test "$ac_cv_search_inet_pton" != "no" \
31640        && test "$ac_cv_search_inet_pton" != "none required"; then
31641       INET_PTON_LIB="$ac_cv_search_inet_pton"
31642     fi
31643
31644
31645     ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
31646         #if HAVE_NETDB_H
31647         # include <netdb.h>
31648         #endif
31649
31650 "
31651 if test "x$ac_cv_have_decl_inet_pton" = xyes
31652 then :
31653   ac_have_decl=1
31654 else
31655   ac_have_decl=0
31656 fi
31657
31658 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31659
31660     if test $ac_cv_have_decl_inet_pton = no; then
31661       HAVE_DECL_INET_PTON=0
31662     fi
31663   fi
31664
31665
31666   if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
31667
31668
31669
31670
31671
31672
31673
31674
31675   gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
31676
31677
31678
31679
31680   fi
31681
31682
31683
31684
31685
31686     if test "$GNULIB_INET_PTON" != 1; then
31687         if test "$GNULIB_INET_PTON" = 0; then
31688       GNULIB_INET_PTON=$gl_module_indicator_condition
31689     else
31690       GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
31691     fi
31692   fi
31693
31694
31695
31696
31697    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
31698 printf %s "checking whether byte ordering is bigendian... " >&6; }
31699 if test ${ac_cv_c_bigendian+y}
31700 then :
31701   printf %s "(cached) " >&6
31702 else
31703   ac_cv_c_bigendian=unknown
31704     # See if we're dealing with a universal compiler.
31705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31706 /* end confdefs.h.  */
31707 #ifndef __APPLE_CC__
31708                not a universal capable compiler
31709              #endif
31710              typedef int dummy;
31711
31712 _ACEOF
31713 if ac_fn_c_try_compile "$LINENO"
31714 then :
31715
31716         # Check for potential -arch flags.  It is not universal unless
31717         # there are at least two -arch flags with different values.
31718         ac_arch=
31719         ac_prev=
31720         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
31721          if test -n "$ac_prev"; then
31722            case $ac_word in
31723              i?86 | x86_64 | ppc | ppc64)
31724                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
31725                  ac_arch=$ac_word
31726                else
31727                  ac_cv_c_bigendian=universal
31728                  break
31729                fi
31730                ;;
31731            esac
31732            ac_prev=
31733          elif test "x$ac_word" = "x-arch"; then
31734            ac_prev=arch
31735          fi
31736        done
31737 fi
31738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31739     if test $ac_cv_c_bigendian = unknown; then
31740       # See if sys/param.h defines the BYTE_ORDER macro.
31741       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31742 /* end confdefs.h.  */
31743 #include <sys/types.h>
31744              #include <sys/param.h>
31745
31746 int
31747 main (void)
31748 {
31749 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
31750                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
31751                      && LITTLE_ENDIAN)
31752               bogus endian macros
31753              #endif
31754
31755   ;
31756   return 0;
31757 }
31758 _ACEOF
31759 if ac_fn_c_try_compile "$LINENO"
31760 then :
31761   # It does; now see whether it defined to BIG_ENDIAN or not.
31762          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31763 /* end confdefs.h.  */
31764 #include <sys/types.h>
31765                 #include <sys/param.h>
31766
31767 int
31768 main (void)
31769 {
31770 #if BYTE_ORDER != BIG_ENDIAN
31771                  not big endian
31772                 #endif
31773
31774   ;
31775   return 0;
31776 }
31777 _ACEOF
31778 if ac_fn_c_try_compile "$LINENO"
31779 then :
31780   ac_cv_c_bigendian=yes
31781 else
31782   ac_cv_c_bigendian=no
31783 fi
31784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31785 fi
31786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31787     fi
31788     if test $ac_cv_c_bigendian = unknown; then
31789       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
31790       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791 /* end confdefs.h.  */
31792 #include <limits.h>
31793
31794 int
31795 main (void)
31796 {
31797 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
31798               bogus endian macros
31799              #endif
31800
31801   ;
31802   return 0;
31803 }
31804 _ACEOF
31805 if ac_fn_c_try_compile "$LINENO"
31806 then :
31807   # It does; now see whether it defined to _BIG_ENDIAN or not.
31808          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31809 /* end confdefs.h.  */
31810 #include <limits.h>
31811
31812 int
31813 main (void)
31814 {
31815 #ifndef _BIG_ENDIAN
31816                  not big endian
31817                 #endif
31818
31819   ;
31820   return 0;
31821 }
31822 _ACEOF
31823 if ac_fn_c_try_compile "$LINENO"
31824 then :
31825   ac_cv_c_bigendian=yes
31826 else
31827   ac_cv_c_bigendian=no
31828 fi
31829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31830 fi
31831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31832     fi
31833     if test $ac_cv_c_bigendian = unknown; then
31834       # Compile a test program.
31835       if test "$cross_compiling" = yes
31836 then :
31837   # Try to guess by grepping values from an object file.
31838          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31839 /* end confdefs.h.  */
31840 short int ascii_mm[] =
31841                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
31842                 short int ascii_ii[] =
31843                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
31844                 int use_ascii (int i) {
31845                   return ascii_mm[i] + ascii_ii[i];
31846                 }
31847                 short int ebcdic_ii[] =
31848                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
31849                 short int ebcdic_mm[] =
31850                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
31851                 int use_ebcdic (int i) {
31852                   return ebcdic_mm[i] + ebcdic_ii[i];
31853                 }
31854                 extern int foo;
31855
31856 int
31857 main (void)
31858 {
31859 return use_ascii (foo) == use_ebcdic (foo);
31860   ;
31861   return 0;
31862 }
31863 _ACEOF
31864 if ac_fn_c_try_compile "$LINENO"
31865 then :
31866   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
31867               ac_cv_c_bigendian=yes
31868             fi
31869             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
31870               if test "$ac_cv_c_bigendian" = unknown; then
31871                 ac_cv_c_bigendian=no
31872               else
31873                 # finding both strings is unlikely to happen, but who knows?
31874                 ac_cv_c_bigendian=unknown
31875               fi
31876             fi
31877 fi
31878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31879 else
31880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31881 /* end confdefs.h.  */
31882 $ac_includes_default
31883 int
31884 main (void)
31885 {
31886
31887              /* Are we little or big endian?  From Harbison&Steele.  */
31888              union
31889              {
31890                long int l;
31891                char c[sizeof (long int)];
31892              } u;
31893              u.l = 1;
31894              return u.c[sizeof (long int) - 1] == 1;
31895
31896   ;
31897   return 0;
31898 }
31899 _ACEOF
31900 if ac_fn_c_try_run "$LINENO"
31901 then :
31902   ac_cv_c_bigendian=no
31903 else
31904   ac_cv_c_bigendian=yes
31905 fi
31906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31907   conftest.$ac_objext conftest.beam conftest.$ac_ext
31908 fi
31909
31910     fi
31911 fi
31912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
31913 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
31914  case $ac_cv_c_bigendian in #(
31915    yes)
31916      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
31917 ;; #(
31918    no)
31919       ;; #(
31920    universal)
31921
31922 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
31923
31924      ;; #(
31925    *)
31926      as_fn_error $? "unknown endianness
31927  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
31928  esac
31929
31930
31931
31932
31933   HAVE_IOCTL=1
31934   if test "$ac_cv_header_winsock2_h" = yes; then
31935                 HAVE_IOCTL=0
31936   else
31937     ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
31938 if test "x$ac_cv_func_ioctl" = xyes
31939 then :
31940   printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
31941
31942 fi
31943
31944                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
31945 printf %s "checking for ioctl with POSIX signature... " >&6; }
31946 if test ${gl_cv_func_ioctl_posix_signature+y}
31947 then :
31948   printf %s "(cached) " >&6
31949 else
31950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31951 /* end confdefs.h.  */
31952 #include <sys/ioctl.h>
31953               /* On some platforms, ioctl() is declared in <unistd.h>.  */
31954               #include <unistd.h>
31955
31956 int
31957 main (void)
31958 {
31959 extern
31960               #ifdef __cplusplus
31961               "C"
31962               #endif
31963               int ioctl (int, int, ...);
31964
31965   ;
31966   return 0;
31967 }
31968
31969 _ACEOF
31970 if ac_fn_c_try_compile "$LINENO"
31971 then :
31972   gl_cv_func_ioctl_posix_signature=yes
31973 else
31974   gl_cv_func_ioctl_posix_signature=no
31975 fi
31976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31977
31978 fi
31979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
31980 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
31981     if test $gl_cv_func_ioctl_posix_signature != yes; then
31982       REPLACE_IOCTL=1
31983     fi
31984   fi
31985
31986   if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
31987
31988
31989
31990
31991
31992
31993
31994
31995   gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
31996
31997   fi
31998
31999
32000
32001
32002
32003     if test "$GNULIB_IOCTL" != 1; then
32004         if test "$GNULIB_IOCTL" = 0; then
32005       GNULIB_IOCTL=$gl_module_indicator_condition
32006     else
32007       GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
32008     fi
32009   fi
32010
32011
32012
32013
32014
32015 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
32016
32017
32018
32019
32020   if test "$ac_cv_header_winsock2_h" = yes; then
32021
32022
32023
32024
32025
32026
32027
32028
32029   gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
32030
32031   fi
32032
32033
32034
32035
32036
32037     if test "$GNULIB_LISTEN" != 1; then
32038         if test "$GNULIB_LISTEN" = 0; then
32039       GNULIB_LISTEN=$gl_module_indicator_condition
32040     else
32041       GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
32042     fi
32043   fi
32044
32045
32046
32047
32048
32049 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
32050
32051
32052
32053
32054
32055
32056
32057   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32058 printf %s "checking for a traditional french locale... " >&6; }
32059 if test ${gt_cv_locale_fr+y}
32060 then :
32061   printf %s "(cached) " >&6
32062 else
32063
32064     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32065 /* end confdefs.h.  */
32066
32067 #include <locale.h>
32068 #include <time.h>
32069 #if HAVE_LANGINFO_CODESET
32070 # include <langinfo.h>
32071 #endif
32072 #include <stdlib.h>
32073 #include <string.h>
32074 struct tm t;
32075 char buf[16];
32076 int main () {
32077   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32078      imitates locale dependent behaviour by looking at the environment
32079      variables, and all locales use the UTF-8 encoding.  */
32080 #if defined __BEOS__ || defined __HAIKU__
32081   return 1;
32082 #else
32083   /* Check whether the given locale name is recognized by the system.  */
32084 # if defined _WIN32 && !defined __CYGWIN__
32085   /* On native Windows, setlocale(category, "") looks at the system settings,
32086      not at the environment variables.  Also, when an encoding suffix such
32087      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32088      category of the locale to "C".  */
32089   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32090       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32091     return 1;
32092 # else
32093   if (setlocale (LC_ALL, "") == NULL) return 1;
32094 # endif
32095   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32096      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32097      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32098      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32099      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32100      some unit tests fail.
32101      On MirBSD 10, when an unsupported locale is specified, setlocale()
32102      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32103 # if HAVE_LANGINFO_CODESET
32104   {
32105     const char *cs = nl_langinfo (CODESET);
32106     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32107         || strcmp (cs, "UTF-8") == 0)
32108       return 1;
32109   }
32110 # endif
32111 # ifdef __CYGWIN__
32112   /* On Cygwin, avoid locale names without encoding suffix, because the
32113      locale_charset() function relies on the encoding suffix.  Note that
32114      LC_ALL is set on the command line.  */
32115   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32116 # endif
32117   /* Check whether in the abbreviation of the second month, the second
32118      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32119      one byte long. This excludes the UTF-8 encoding.  */
32120   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32121   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32122 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
32123   /* Check whether the decimal separator is a comma.
32124      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32125      are nl_langinfo(RADIXCHAR) are both ".".  */
32126   if (localeconv () ->decimal_point[0] != ',') return 1;
32127 # endif
32128   return 0;
32129 #endif
32130 }
32131
32132 _ACEOF
32133     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32134   (eval $ac_link) 2>&5
32135   ac_status=$?
32136   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32137   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32138       case "$host_os" in
32139         # Handle native Windows specially, because there setlocale() interprets
32140         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32141         # "fr" or "fra" as "French" or "French_France.1252",
32142         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32143         # "ja" as "Japanese" or "Japanese_Japan.932",
32144         # and similar.
32145         mingw*)
32146           # Test for the native Windows locale name.
32147           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32148             gt_cv_locale_fr=French_France.1252
32149           else
32150             # None found.
32151             gt_cv_locale_fr=none
32152           fi
32153           ;;
32154         *)
32155           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32156           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32157           # configure script would override the LC_ALL setting. Likewise for
32158           # LC_CTYPE, which is also set at the beginning of the configure script.
32159           # Test for the usual locale name.
32160           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32161             gt_cv_locale_fr=fr_FR
32162           else
32163             # Test for the locale name with explicit encoding suffix.
32164             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32165               gt_cv_locale_fr=fr_FR.ISO-8859-1
32166             else
32167               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32168               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32169                 gt_cv_locale_fr=fr_FR.ISO8859-1
32170               else
32171                 # Test for the HP-UX locale name.
32172                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32173                   gt_cv_locale_fr=fr_FR.iso88591
32174                 else
32175                   # Test for the Solaris 7 locale name.
32176                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32177                     gt_cv_locale_fr=fr
32178                   else
32179                     # None found.
32180                     gt_cv_locale_fr=none
32181                   fi
32182                 fi
32183               fi
32184             fi
32185           fi
32186           ;;
32187       esac
32188     fi
32189     rm -fr conftest*
32190
32191 fi
32192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
32193 printf "%s\n" "$gt_cv_locale_fr" >&6; }
32194   LOCALE_FR=$gt_cv_locale_fr
32195
32196
32197
32198
32199   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32200 printf %s "checking for a french Unicode locale... " >&6; }
32201 if test ${gt_cv_locale_fr_utf8+y}
32202 then :
32203   printf %s "(cached) " >&6
32204 else
32205
32206     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32207 /* end confdefs.h.  */
32208
32209 #include <locale.h>
32210 #include <time.h>
32211 #if HAVE_LANGINFO_CODESET
32212 # include <langinfo.h>
32213 #endif
32214 #include <stdlib.h>
32215 #include <string.h>
32216 struct tm t;
32217 char buf[16];
32218 int main () {
32219   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32220      imitates locale dependent behaviour by looking at the environment
32221      variables, and all locales use the UTF-8 encoding.  */
32222 #if !(defined __BEOS__ || defined __HAIKU__)
32223   /* Check whether the given locale name is recognized by the system.  */
32224 # if defined _WIN32 && !defined __CYGWIN__
32225   /* On native Windows, setlocale(category, "") looks at the system settings,
32226      not at the environment variables.  Also, when an encoding suffix such
32227      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32228      category of the locale to "C".  */
32229   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32230       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32231     return 1;
32232 # else
32233   if (setlocale (LC_ALL, "") == NULL) return 1;
32234 # endif
32235   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32236      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32237      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32238      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32239      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32240      some unit tests fail.  */
32241 # if HAVE_LANGINFO_CODESET
32242   {
32243     const char *cs = nl_langinfo (CODESET);
32244     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32245       return 1;
32246   }
32247 # endif
32248 # ifdef __CYGWIN__
32249   /* On Cygwin, avoid locale names without encoding suffix, because the
32250      locale_charset() function relies on the encoding suffix.  Note that
32251      LC_ALL is set on the command line.  */
32252   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32253 # endif
32254   /* Check whether in the abbreviation of the second month, the second
32255      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32256      two bytes long, with UTF-8 encoding.  */
32257   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32258   if (strftime (buf, sizeof (buf), "%b", &t) < 4
32259       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32260     return 1;
32261 #endif
32262 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
32263   /* Check whether the decimal separator is a comma.
32264      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32265      are nl_langinfo(RADIXCHAR) are both ".".  */
32266   if (localeconv () ->decimal_point[0] != ',') return 1;
32267 #endif
32268   return 0;
32269 }
32270
32271 _ACEOF
32272     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32273   (eval $ac_link) 2>&5
32274   ac_status=$?
32275   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32276   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32277       case "$host_os" in
32278         # Handle native Windows specially, because there setlocale() interprets
32279         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32280         # "fr" or "fra" as "French" or "French_France.1252",
32281         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32282         # "ja" as "Japanese" or "Japanese_Japan.932",
32283         # and similar.
32284         mingw*)
32285           # Test for the hypothetical native Windows locale name.
32286           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32287             gt_cv_locale_fr_utf8=French_France.65001
32288           else
32289             # None found.
32290             gt_cv_locale_fr_utf8=none
32291           fi
32292           ;;
32293         *)
32294           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32295           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32296           # configure script would override the LC_ALL setting. Likewise for
32297           # LC_CTYPE, which is also set at the beginning of the configure script.
32298           # Test for the usual locale name.
32299           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32300             gt_cv_locale_fr_utf8=fr_FR
32301           else
32302             # Test for the locale name with explicit encoding suffix.
32303             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32304               gt_cv_locale_fr_utf8=fr_FR.UTF-8
32305             else
32306               # Test for the Solaris 7 locale name.
32307               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32308                 gt_cv_locale_fr_utf8=fr.UTF-8
32309               else
32310                 # None found.
32311                 gt_cv_locale_fr_utf8=none
32312               fi
32313             fi
32314           fi
32315           ;;
32316       esac
32317     fi
32318     rm -fr conftest*
32319
32320 fi
32321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32322 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
32323   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32324
32325
32326
32327
32328
32329   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
32330 printf %s "checking for a traditional japanese locale... " >&6; }
32331 if test ${gt_cv_locale_ja+y}
32332 then :
32333   printf %s "(cached) " >&6
32334 else
32335
32336     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32337 /* end confdefs.h.  */
32338
32339 #include <locale.h>
32340 #include <time.h>
32341 #if HAVE_LANGINFO_CODESET
32342 # include <langinfo.h>
32343 #endif
32344 #include <stdlib.h>
32345 #include <string.h>
32346 struct tm t;
32347 char buf[16];
32348 int main ()
32349 {
32350   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32351      imitates locale dependent behaviour by looking at the environment
32352      variables, and all locales use the UTF-8 encoding.  */
32353 #if defined __BEOS__ || defined __HAIKU__
32354   return 1;
32355 #else
32356   /* Check whether the given locale name is recognized by the system.  */
32357 # if defined _WIN32 && !defined __CYGWIN__
32358   /* On native Windows, setlocale(category, "") looks at the system settings,
32359      not at the environment variables.  Also, when an encoding suffix such
32360      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32361      category of the locale to "C".  */
32362   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32363       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32364     return 1;
32365 # else
32366   if (setlocale (LC_ALL, "") == NULL) return 1;
32367 # endif
32368   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32369      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32370      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32371      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32372      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32373      some unit tests fail.
32374      On MirBSD 10, when an unsupported locale is specified, setlocale()
32375      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32376 # if HAVE_LANGINFO_CODESET
32377   {
32378     const char *cs = nl_langinfo (CODESET);
32379     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32380         || strcmp (cs, "UTF-8") == 0)
32381       return 1;
32382   }
32383 # endif
32384 # ifdef __CYGWIN__
32385   /* On Cygwin, avoid locale names without encoding suffix, because the
32386      locale_charset() function relies on the encoding suffix.  Note that
32387      LC_ALL is set on the command line.  */
32388   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32389 # endif
32390   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
32391      on Cygwin 1.5.x.  */
32392   if (MB_CUR_MAX == 1)
32393     return 1;
32394   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32395      This excludes the UTF-8 encoding (except on MirBSD).  */
32396   {
32397     const char *p;
32398     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32399     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32400     for (p = buf; *p != '\0'; p++)
32401       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32402         return 1;
32403   }
32404   return 0;
32405 #endif
32406 }
32407
32408 _ACEOF
32409     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32410   (eval $ac_link) 2>&5
32411   ac_status=$?
32412   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32413   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32414       case "$host_os" in
32415         # Handle native Windows specially, because there setlocale() interprets
32416         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32417         # "fr" or "fra" as "French" or "French_France.1252",
32418         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32419         # "ja" as "Japanese" or "Japanese_Japan.932",
32420         # and similar.
32421         mingw*)
32422           # Note that on native Windows, the Japanese locale is
32423           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
32424           # cannot use it here.
32425           gt_cv_locale_ja=none
32426           ;;
32427         *)
32428           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32429           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32430           # configure script would override the LC_ALL setting. Likewise for
32431           # LC_CTYPE, which is also set at the beginning of the configure script.
32432           # Test for the AIX locale name.
32433           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32434             gt_cv_locale_ja=ja_JP
32435           else
32436             # Test for the locale name with explicit encoding suffix.
32437             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32438               gt_cv_locale_ja=ja_JP.EUC-JP
32439             else
32440               # Test for the HP-UX, OSF/1, NetBSD locale name.
32441               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32442                 gt_cv_locale_ja=ja_JP.eucJP
32443               else
32444                 # Test for the IRIX, FreeBSD locale name.
32445                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32446                   gt_cv_locale_ja=ja_JP.EUC
32447                 else
32448                   # Test for the Solaris 7 locale name.
32449                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32450                     gt_cv_locale_ja=ja
32451                   else
32452                     # Special test for NetBSD 1.6.
32453                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
32454                       gt_cv_locale_ja=ja_JP.eucJP
32455                     else
32456                       # None found.
32457                       gt_cv_locale_ja=none
32458                     fi
32459                   fi
32460                 fi
32461               fi
32462             fi
32463           fi
32464           ;;
32465       esac
32466     fi
32467     rm -fr conftest*
32468
32469 fi
32470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
32471 printf "%s\n" "$gt_cv_locale_ja" >&6; }
32472   LOCALE_JA=$gt_cv_locale_ja
32473
32474
32475
32476
32477
32478   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
32479 printf %s "checking for a transitional chinese locale... " >&6; }
32480 if test ${gt_cv_locale_zh_CN+y}
32481 then :
32482   printf %s "(cached) " >&6
32483 else
32484
32485     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32486 /* end confdefs.h.  */
32487
32488 #include <locale.h>
32489 #include <stdlib.h>
32490 #include <time.h>
32491 #if HAVE_LANGINFO_CODESET
32492 # include <langinfo.h>
32493 #endif
32494 #include <stdlib.h>
32495 #include <string.h>
32496 struct tm t;
32497 char buf[16];
32498 int main ()
32499 {
32500   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32501      imitates locale dependent behaviour by looking at the environment
32502      variables, and all locales use the UTF-8 encoding.  */
32503 #if defined __BEOS__ || defined __HAIKU__
32504   return 1;
32505 #else
32506   /* Check whether the given locale name is recognized by the system.  */
32507 # if defined _WIN32 && !defined __CYGWIN__
32508   /* On native Windows, setlocale(category, "") looks at the system settings,
32509      not at the environment variables.  Also, when an encoding suffix such
32510      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32511      category of the locale to "C".  */
32512   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32513       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32514     return 1;
32515 # else
32516   if (setlocale (LC_ALL, "") == NULL) return 1;
32517 # endif
32518   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32519      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32520      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32521      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32522      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32523      some unit tests fail.
32524      On MirBSD 10, when an unsupported locale is specified, setlocale()
32525      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32526 # if HAVE_LANGINFO_CODESET
32527   {
32528     const char *cs = nl_langinfo (CODESET);
32529     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32530         || strcmp (cs, "UTF-8") == 0)
32531       return 1;
32532   }
32533 # endif
32534 # ifdef __CYGWIN__
32535   /* On Cygwin, avoid locale names without encoding suffix, because the
32536      locale_charset() function relies on the encoding suffix.  Note that
32537      LC_ALL is set on the command line.  */
32538   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32539 # endif
32540   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32541      This excludes the UTF-8 encoding (except on MirBSD).  */
32542   {
32543     const char *p;
32544     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32545     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32546     for (p = buf; *p != '\0'; p++)
32547       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32548         return 1;
32549   }
32550   /* Check whether a typical GB18030 multibyte sequence is recognized as a
32551      single wide character.  This excludes the GB2312 and GBK encodings.  */
32552   if (mblen ("\203\062\332\066", 5) != 4)
32553     return 1;
32554   return 0;
32555 #endif
32556 }
32557
32558 _ACEOF
32559     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32560   (eval $ac_link) 2>&5
32561   ac_status=$?
32562   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32563   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32564       case "$host_os" in
32565         # Handle native Windows specially, because there setlocale() interprets
32566         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32567         # "fr" or "fra" as "French" or "French_France.1252",
32568         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32569         # "ja" as "Japanese" or "Japanese_Japan.932",
32570         # and similar.
32571         mingw*)
32572           # Test for the hypothetical native Windows locale name.
32573           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32574             gt_cv_locale_zh_CN=Chinese_China.54936
32575           else
32576             # None found.
32577             gt_cv_locale_zh_CN=none
32578           fi
32579           ;;
32580         solaris2.8)
32581           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
32582           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
32583           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
32584           gt_cv_locale_zh_CN=none
32585           ;;
32586         *)
32587           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32588           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32589           # configure script would override the LC_ALL setting. Likewise for
32590           # LC_CTYPE, which is also set at the beginning of the configure script.
32591           # Test for the locale name without encoding suffix.
32592           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32593             gt_cv_locale_zh_CN=zh_CN
32594           else
32595             # Test for the locale name with explicit encoding suffix.
32596             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32597               gt_cv_locale_zh_CN=zh_CN.GB18030
32598             else
32599               # None found.
32600               gt_cv_locale_zh_CN=none
32601             fi
32602           fi
32603           ;;
32604       esac
32605     else
32606       # If there was a link error, due to mblen(), the system is so old that
32607       # it certainly doesn't have a chinese locale.
32608       gt_cv_locale_zh_CN=none
32609     fi
32610     rm -fr conftest*
32611
32612 fi
32613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
32614 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
32615   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
32616
32617
32618
32619
32620
32621   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
32622 printf %s "checking for a turkish Unicode locale... " >&6; }
32623 if test ${gt_cv_locale_tr_utf8+y}
32624 then :
32625   printf %s "(cached) " >&6
32626 else
32627
32628     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32629 /* end confdefs.h.  */
32630
32631 #include <locale.h>
32632 #include <time.h>
32633 #if HAVE_LANGINFO_CODESET
32634 # include <langinfo.h>
32635 #endif
32636 #include <stdlib.h>
32637 #include <string.h>
32638 struct tm t;
32639 char buf[16];
32640 int main () {
32641   /* On BeOS, locales are not implemented in libc.  Rather, libintl
32642      imitates locale dependent behaviour by looking at the environment
32643      variables, and all locales use the UTF-8 encoding.  But BeOS does not
32644      implement the Turkish upper-/lowercase mappings.  Therefore, let this
32645      program return 1 on BeOS.  */
32646   /* Check whether the given locale name is recognized by the system.  */
32647 #if defined _WIN32 && !defined __CYGWIN__
32648   /* On native Windows, setlocale(category, "") looks at the system settings,
32649      not at the environment variables.  Also, when an encoding suffix such
32650      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32651      category of the locale to "C".  */
32652   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32653       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32654     return 1;
32655 #else
32656   if (setlocale (LC_ALL, "") == NULL) return 1;
32657 #endif
32658   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32659      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
32660      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32661      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32662      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32663      some unit tests fail.  */
32664 #if HAVE_LANGINFO_CODESET
32665   {
32666     const char *cs = nl_langinfo (CODESET);
32667     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32668       return 1;
32669   }
32670 #endif
32671 #ifdef __CYGWIN__
32672   /* On Cygwin, avoid locale names without encoding suffix, because the
32673      locale_charset() function relies on the encoding suffix.  Note that
32674      LC_ALL is set on the command line.  */
32675   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32676 #endif
32677   /* Check whether in the abbreviation of the eighth month, the second
32678      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
32679      two bytes long, with UTF-8 encoding.  */
32680   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
32681   if (strftime (buf, sizeof (buf), "%b", &t) < 4
32682       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
32683     return 1;
32684   /* Check whether the upper-/lowercase mappings are as expected for
32685      Turkish.  */
32686   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
32687       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
32688     return 1;
32689   return 0;
32690 }
32691
32692 _ACEOF
32693     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32694   (eval $ac_link) 2>&5
32695   ac_status=$?
32696   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32697   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32698       case "$host_os" in
32699         # Handle native Windows specially, because there setlocale() interprets
32700         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32701         # "fr" or "fra" as "French" or "French_France.1252",
32702         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32703         # "ja" as "Japanese" or "Japanese_Japan.932",
32704         # and similar.
32705         mingw*)
32706           # Test for the hypothetical native Windows locale name.
32707           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32708             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
32709           else
32710             # None found.
32711             gt_cv_locale_tr_utf8=none
32712           fi
32713           ;;
32714         *)
32715           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32716           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32717           # configure script would override the LC_ALL setting. Likewise for
32718           # LC_CTYPE, which is also set at the beginning of the configure script.
32719           # Test for the usual locale name.
32720           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32721             gt_cv_locale_tr_utf8=tr_TR
32722           else
32723             # Test for the locale name with explicit encoding suffix.
32724             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32725               gt_cv_locale_tr_utf8=tr_TR.UTF-8
32726             else
32727               # Test for the Solaris 7 locale name.
32728               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32729                 gt_cv_locale_tr_utf8=tr.UTF-8
32730               else
32731                 # None found.
32732                 gt_cv_locale_tr_utf8=none
32733               fi
32734             fi
32735           fi
32736           ;;
32737       esac
32738     else
32739       gt_cv_locale_tr_utf8=none
32740     fi
32741     rm -fr conftest*
32742
32743 fi
32744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
32745 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
32746   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
32747
32748
32749
32750
32751   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32752 printf %s "checking for a french Unicode locale... " >&6; }
32753 if test ${gt_cv_locale_fr_utf8+y}
32754 then :
32755   printf %s "(cached) " >&6
32756 else
32757
32758     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32759 /* end confdefs.h.  */
32760
32761 #include <locale.h>
32762 #include <time.h>
32763 #if HAVE_LANGINFO_CODESET
32764 # include <langinfo.h>
32765 #endif
32766 #include <stdlib.h>
32767 #include <string.h>
32768 struct tm t;
32769 char buf[16];
32770 int main () {
32771   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32772      imitates locale dependent behaviour by looking at the environment
32773      variables, and all locales use the UTF-8 encoding.  */
32774 #if !(defined __BEOS__ || defined __HAIKU__)
32775   /* Check whether the given locale name is recognized by the system.  */
32776 # if defined _WIN32 && !defined __CYGWIN__
32777   /* On native Windows, setlocale(category, "") looks at the system settings,
32778      not at the environment variables.  Also, when an encoding suffix such
32779      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32780      category of the locale to "C".  */
32781   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32782       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32783     return 1;
32784 # else
32785   if (setlocale (LC_ALL, "") == NULL) return 1;
32786 # endif
32787   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32788      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32789      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32790      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32791      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32792      some unit tests fail.  */
32793 # if HAVE_LANGINFO_CODESET
32794   {
32795     const char *cs = nl_langinfo (CODESET);
32796     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32797       return 1;
32798   }
32799 # endif
32800 # ifdef __CYGWIN__
32801   /* On Cygwin, avoid locale names without encoding suffix, because the
32802      locale_charset() function relies on the encoding suffix.  Note that
32803      LC_ALL is set on the command line.  */
32804   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32805 # endif
32806   /* Check whether in the abbreviation of the second month, the second
32807      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32808      two bytes long, with UTF-8 encoding.  */
32809   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32810   if (strftime (buf, sizeof (buf), "%b", &t) < 4
32811       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32812     return 1;
32813 #endif
32814 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
32815   /* Check whether the decimal separator is a comma.
32816      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32817      are nl_langinfo(RADIXCHAR) are both ".".  */
32818   if (localeconv () ->decimal_point[0] != ',') return 1;
32819 #endif
32820   return 0;
32821 }
32822
32823 _ACEOF
32824     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32825   (eval $ac_link) 2>&5
32826   ac_status=$?
32827   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32828   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32829       case "$host_os" in
32830         # Handle native Windows specially, because there setlocale() interprets
32831         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32832         # "fr" or "fra" as "French" or "French_France.1252",
32833         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32834         # "ja" as "Japanese" or "Japanese_Japan.932",
32835         # and similar.
32836         mingw*)
32837           # Test for the hypothetical native Windows locale name.
32838           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32839             gt_cv_locale_fr_utf8=French_France.65001
32840           else
32841             # None found.
32842             gt_cv_locale_fr_utf8=none
32843           fi
32844           ;;
32845         *)
32846           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32847           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32848           # configure script would override the LC_ALL setting. Likewise for
32849           # LC_CTYPE, which is also set at the beginning of the configure script.
32850           # Test for the usual locale name.
32851           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32852             gt_cv_locale_fr_utf8=fr_FR
32853           else
32854             # Test for the locale name with explicit encoding suffix.
32855             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32856               gt_cv_locale_fr_utf8=fr_FR.UTF-8
32857             else
32858               # Test for the Solaris 7 locale name.
32859               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32860                 gt_cv_locale_fr_utf8=fr.UTF-8
32861               else
32862                 # None found.
32863                 gt_cv_locale_fr_utf8=none
32864               fi
32865             fi
32866           fi
32867           ;;
32868       esac
32869     fi
32870     rm -fr conftest*
32871
32872 fi
32873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32874 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
32875   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32876
32877
32878
32879
32880
32881   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32882 printf %s "checking for a traditional french locale... " >&6; }
32883 if test ${gt_cv_locale_fr+y}
32884 then :
32885   printf %s "(cached) " >&6
32886 else
32887
32888     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32889 /* end confdefs.h.  */
32890
32891 #include <locale.h>
32892 #include <time.h>
32893 #if HAVE_LANGINFO_CODESET
32894 # include <langinfo.h>
32895 #endif
32896 #include <stdlib.h>
32897 #include <string.h>
32898 struct tm t;
32899 char buf[16];
32900 int main () {
32901   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32902      imitates locale dependent behaviour by looking at the environment
32903      variables, and all locales use the UTF-8 encoding.  */
32904 #if defined __BEOS__ || defined __HAIKU__
32905   return 1;
32906 #else
32907   /* Check whether the given locale name is recognized by the system.  */
32908 # if defined _WIN32 && !defined __CYGWIN__
32909   /* On native Windows, setlocale(category, "") looks at the system settings,
32910      not at the environment variables.  Also, when an encoding suffix such
32911      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32912      category of the locale to "C".  */
32913   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32914       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32915     return 1;
32916 # else
32917   if (setlocale (LC_ALL, "") == NULL) return 1;
32918 # endif
32919   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32920      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32921      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32922      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32923      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32924      some unit tests fail.
32925      On MirBSD 10, when an unsupported locale is specified, setlocale()
32926      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32927 # if HAVE_LANGINFO_CODESET
32928   {
32929     const char *cs = nl_langinfo (CODESET);
32930     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32931         || strcmp (cs, "UTF-8") == 0)
32932       return 1;
32933   }
32934 # endif
32935 # ifdef __CYGWIN__
32936   /* On Cygwin, avoid locale names without encoding suffix, because the
32937      locale_charset() function relies on the encoding suffix.  Note that
32938      LC_ALL is set on the command line.  */
32939   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32940 # endif
32941   /* Check whether in the abbreviation of the second month, the second
32942      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32943      one byte long. This excludes the UTF-8 encoding.  */
32944   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32945   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32946 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
32947   /* Check whether the decimal separator is a comma.
32948      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32949      are nl_langinfo(RADIXCHAR) are both ".".  */
32950   if (localeconv () ->decimal_point[0] != ',') return 1;
32951 # endif
32952   return 0;
32953 #endif
32954 }
32955
32956 _ACEOF
32957     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32958   (eval $ac_link) 2>&5
32959   ac_status=$?
32960   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32961   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32962       case "$host_os" in
32963         # Handle native Windows specially, because there setlocale() interprets
32964         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32965         # "fr" or "fra" as "French" or "French_France.1252",
32966         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32967         # "ja" as "Japanese" or "Japanese_Japan.932",
32968         # and similar.
32969         mingw*)
32970           # Test for the native Windows locale name.
32971           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32972             gt_cv_locale_fr=French_France.1252
32973           else
32974             # None found.
32975             gt_cv_locale_fr=none
32976           fi
32977           ;;
32978         *)
32979           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32980           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32981           # configure script would override the LC_ALL setting. Likewise for
32982           # LC_CTYPE, which is also set at the beginning of the configure script.
32983           # Test for the usual locale name.
32984           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32985             gt_cv_locale_fr=fr_FR
32986           else
32987             # Test for the locale name with explicit encoding suffix.
32988             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32989               gt_cv_locale_fr=fr_FR.ISO-8859-1
32990             else
32991               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32992               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32993                 gt_cv_locale_fr=fr_FR.ISO8859-1
32994               else
32995                 # Test for the HP-UX locale name.
32996                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32997                   gt_cv_locale_fr=fr_FR.iso88591
32998                 else
32999                   # Test for the Solaris 7 locale name.
33000                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33001                     gt_cv_locale_fr=fr
33002                   else
33003                     # None found.
33004                     gt_cv_locale_fr=none
33005                   fi
33006                 fi
33007               fi
33008             fi
33009           fi
33010           ;;
33011       esac
33012     fi
33013     rm -fr conftest*
33014
33015 fi
33016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
33017 printf "%s\n" "$gt_cv_locale_fr" >&6; }
33018   LOCALE_FR=$gt_cv_locale_fr
33019
33020
33021
33022
33023   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33024 printf %s "checking for a french Unicode locale... " >&6; }
33025 if test ${gt_cv_locale_fr_utf8+y}
33026 then :
33027   printf %s "(cached) " >&6
33028 else
33029
33030     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33031 /* end confdefs.h.  */
33032
33033 #include <locale.h>
33034 #include <time.h>
33035 #if HAVE_LANGINFO_CODESET
33036 # include <langinfo.h>
33037 #endif
33038 #include <stdlib.h>
33039 #include <string.h>
33040 struct tm t;
33041 char buf[16];
33042 int main () {
33043   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33044      imitates locale dependent behaviour by looking at the environment
33045      variables, and all locales use the UTF-8 encoding.  */
33046 #if !(defined __BEOS__ || defined __HAIKU__)
33047   /* Check whether the given locale name is recognized by the system.  */
33048 # if defined _WIN32 && !defined __CYGWIN__
33049   /* On native Windows, setlocale(category, "") looks at the system settings,
33050      not at the environment variables.  Also, when an encoding suffix such
33051      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33052      category of the locale to "C".  */
33053   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33054       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33055     return 1;
33056 # else
33057   if (setlocale (LC_ALL, "") == NULL) return 1;
33058 # endif
33059   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33060      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33061      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33062      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33063      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33064      some unit tests fail.  */
33065 # if HAVE_LANGINFO_CODESET
33066   {
33067     const char *cs = nl_langinfo (CODESET);
33068     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33069       return 1;
33070   }
33071 # endif
33072 # ifdef __CYGWIN__
33073   /* On Cygwin, avoid locale names without encoding suffix, because the
33074      locale_charset() function relies on the encoding suffix.  Note that
33075      LC_ALL is set on the command line.  */
33076   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33077 # endif
33078   /* Check whether in the abbreviation of the second month, the second
33079      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33080      two bytes long, with UTF-8 encoding.  */
33081   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33082   if (strftime (buf, sizeof (buf), "%b", &t) < 4
33083       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33084     return 1;
33085 #endif
33086 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
33087   /* Check whether the decimal separator is a comma.
33088      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33089      are nl_langinfo(RADIXCHAR) are both ".".  */
33090   if (localeconv () ->decimal_point[0] != ',') return 1;
33091 #endif
33092   return 0;
33093 }
33094
33095 _ACEOF
33096     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33097   (eval $ac_link) 2>&5
33098   ac_status=$?
33099   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33100   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33101       case "$host_os" in
33102         # Handle native Windows specially, because there setlocale() interprets
33103         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33104         # "fr" or "fra" as "French" or "French_France.1252",
33105         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33106         # "ja" as "Japanese" or "Japanese_Japan.932",
33107         # and similar.
33108         mingw*)
33109           # Test for the hypothetical native Windows locale name.
33110           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33111             gt_cv_locale_fr_utf8=French_France.65001
33112           else
33113             # None found.
33114             gt_cv_locale_fr_utf8=none
33115           fi
33116           ;;
33117         *)
33118           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33119           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33120           # configure script would override the LC_ALL setting. Likewise for
33121           # LC_CTYPE, which is also set at the beginning of the configure script.
33122           # Test for the usual locale name.
33123           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33124             gt_cv_locale_fr_utf8=fr_FR
33125           else
33126             # Test for the locale name with explicit encoding suffix.
33127             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33128               gt_cv_locale_fr_utf8=fr_FR.UTF-8
33129             else
33130               # Test for the Solaris 7 locale name.
33131               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33132                 gt_cv_locale_fr_utf8=fr.UTF-8
33133               else
33134                 # None found.
33135                 gt_cv_locale_fr_utf8=none
33136               fi
33137             fi
33138           fi
33139           ;;
33140       esac
33141     fi
33142     rm -fr conftest*
33143
33144 fi
33145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33146 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
33147   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33148
33149
33150
33151
33152
33153   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
33154 printf %s "checking for a traditional japanese locale... " >&6; }
33155 if test ${gt_cv_locale_ja+y}
33156 then :
33157   printf %s "(cached) " >&6
33158 else
33159
33160     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33161 /* end confdefs.h.  */
33162
33163 #include <locale.h>
33164 #include <time.h>
33165 #if HAVE_LANGINFO_CODESET
33166 # include <langinfo.h>
33167 #endif
33168 #include <stdlib.h>
33169 #include <string.h>
33170 struct tm t;
33171 char buf[16];
33172 int main ()
33173 {
33174   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33175      imitates locale dependent behaviour by looking at the environment
33176      variables, and all locales use the UTF-8 encoding.  */
33177 #if defined __BEOS__ || defined __HAIKU__
33178   return 1;
33179 #else
33180   /* Check whether the given locale name is recognized by the system.  */
33181 # if defined _WIN32 && !defined __CYGWIN__
33182   /* On native Windows, setlocale(category, "") looks at the system settings,
33183      not at the environment variables.  Also, when an encoding suffix such
33184      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33185      category of the locale to "C".  */
33186   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33187       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33188     return 1;
33189 # else
33190   if (setlocale (LC_ALL, "") == NULL) return 1;
33191 # endif
33192   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33193      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33194      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33195      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33196      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33197      some unit tests fail.
33198      On MirBSD 10, when an unsupported locale is specified, setlocale()
33199      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33200 # if HAVE_LANGINFO_CODESET
33201   {
33202     const char *cs = nl_langinfo (CODESET);
33203     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33204         || strcmp (cs, "UTF-8") == 0)
33205       return 1;
33206   }
33207 # endif
33208 # ifdef __CYGWIN__
33209   /* On Cygwin, avoid locale names without encoding suffix, because the
33210      locale_charset() function relies on the encoding suffix.  Note that
33211      LC_ALL is set on the command line.  */
33212   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33213 # endif
33214   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
33215      on Cygwin 1.5.x.  */
33216   if (MB_CUR_MAX == 1)
33217     return 1;
33218   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33219      This excludes the UTF-8 encoding (except on MirBSD).  */
33220   {
33221     const char *p;
33222     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33223     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33224     for (p = buf; *p != '\0'; p++)
33225       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33226         return 1;
33227   }
33228   return 0;
33229 #endif
33230 }
33231
33232 _ACEOF
33233     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33234   (eval $ac_link) 2>&5
33235   ac_status=$?
33236   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33237   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33238       case "$host_os" in
33239         # Handle native Windows specially, because there setlocale() interprets
33240         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33241         # "fr" or "fra" as "French" or "French_France.1252",
33242         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33243         # "ja" as "Japanese" or "Japanese_Japan.932",
33244         # and similar.
33245         mingw*)
33246           # Note that on native Windows, the Japanese locale is
33247           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
33248           # cannot use it here.
33249           gt_cv_locale_ja=none
33250           ;;
33251         *)
33252           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33253           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33254           # configure script would override the LC_ALL setting. Likewise for
33255           # LC_CTYPE, which is also set at the beginning of the configure script.
33256           # Test for the AIX locale name.
33257           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33258             gt_cv_locale_ja=ja_JP
33259           else
33260             # Test for the locale name with explicit encoding suffix.
33261             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33262               gt_cv_locale_ja=ja_JP.EUC-JP
33263             else
33264               # Test for the HP-UX, OSF/1, NetBSD locale name.
33265               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33266                 gt_cv_locale_ja=ja_JP.eucJP
33267               else
33268                 # Test for the IRIX, FreeBSD locale name.
33269                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33270                   gt_cv_locale_ja=ja_JP.EUC
33271                 else
33272                   # Test for the Solaris 7 locale name.
33273                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33274                     gt_cv_locale_ja=ja
33275                   else
33276                     # Special test for NetBSD 1.6.
33277                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
33278                       gt_cv_locale_ja=ja_JP.eucJP
33279                     else
33280                       # None found.
33281                       gt_cv_locale_ja=none
33282                     fi
33283                   fi
33284                 fi
33285               fi
33286             fi
33287           fi
33288           ;;
33289       esac
33290     fi
33291     rm -fr conftest*
33292
33293 fi
33294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
33295 printf "%s\n" "$gt_cv_locale_ja" >&6; }
33296   LOCALE_JA=$gt_cv_locale_ja
33297
33298
33299
33300
33301
33302   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33303 printf %s "checking for a transitional chinese locale... " >&6; }
33304 if test ${gt_cv_locale_zh_CN+y}
33305 then :
33306   printf %s "(cached) " >&6
33307 else
33308
33309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33310 /* end confdefs.h.  */
33311
33312 #include <locale.h>
33313 #include <stdlib.h>
33314 #include <time.h>
33315 #if HAVE_LANGINFO_CODESET
33316 # include <langinfo.h>
33317 #endif
33318 #include <stdlib.h>
33319 #include <string.h>
33320 struct tm t;
33321 char buf[16];
33322 int main ()
33323 {
33324   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33325      imitates locale dependent behaviour by looking at the environment
33326      variables, and all locales use the UTF-8 encoding.  */
33327 #if defined __BEOS__ || defined __HAIKU__
33328   return 1;
33329 #else
33330   /* Check whether the given locale name is recognized by the system.  */
33331 # if defined _WIN32 && !defined __CYGWIN__
33332   /* On native Windows, setlocale(category, "") looks at the system settings,
33333      not at the environment variables.  Also, when an encoding suffix such
33334      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33335      category of the locale to "C".  */
33336   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33337       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33338     return 1;
33339 # else
33340   if (setlocale (LC_ALL, "") == NULL) return 1;
33341 # endif
33342   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33343      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33344      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33345      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33346      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33347      some unit tests fail.
33348      On MirBSD 10, when an unsupported locale is specified, setlocale()
33349      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33350 # if HAVE_LANGINFO_CODESET
33351   {
33352     const char *cs = nl_langinfo (CODESET);
33353     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33354         || strcmp (cs, "UTF-8") == 0)
33355       return 1;
33356   }
33357 # endif
33358 # ifdef __CYGWIN__
33359   /* On Cygwin, avoid locale names without encoding suffix, because the
33360      locale_charset() function relies on the encoding suffix.  Note that
33361      LC_ALL is set on the command line.  */
33362   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33363 # endif
33364   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33365      This excludes the UTF-8 encoding (except on MirBSD).  */
33366   {
33367     const char *p;
33368     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33369     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33370     for (p = buf; *p != '\0'; p++)
33371       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33372         return 1;
33373   }
33374   /* Check whether a typical GB18030 multibyte sequence is recognized as a
33375      single wide character.  This excludes the GB2312 and GBK encodings.  */
33376   if (mblen ("\203\062\332\066", 5) != 4)
33377     return 1;
33378   return 0;
33379 #endif
33380 }
33381
33382 _ACEOF
33383     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33384   (eval $ac_link) 2>&5
33385   ac_status=$?
33386   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33387   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33388       case "$host_os" in
33389         # Handle native Windows specially, because there setlocale() interprets
33390         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33391         # "fr" or "fra" as "French" or "French_France.1252",
33392         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33393         # "ja" as "Japanese" or "Japanese_Japan.932",
33394         # and similar.
33395         mingw*)
33396           # Test for the hypothetical native Windows locale name.
33397           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33398             gt_cv_locale_zh_CN=Chinese_China.54936
33399           else
33400             # None found.
33401             gt_cv_locale_zh_CN=none
33402           fi
33403           ;;
33404         solaris2.8)
33405           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
33406           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
33407           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
33408           gt_cv_locale_zh_CN=none
33409           ;;
33410         *)
33411           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33412           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33413           # configure script would override the LC_ALL setting. Likewise for
33414           # LC_CTYPE, which is also set at the beginning of the configure script.
33415           # Test for the locale name without encoding suffix.
33416           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33417             gt_cv_locale_zh_CN=zh_CN
33418           else
33419             # Test for the locale name with explicit encoding suffix.
33420             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33421               gt_cv_locale_zh_CN=zh_CN.GB18030
33422             else
33423               # None found.
33424               gt_cv_locale_zh_CN=none
33425             fi
33426           fi
33427           ;;
33428       esac
33429     else
33430       # If there was a link error, due to mblen(), the system is so old that
33431       # it certainly doesn't have a chinese locale.
33432       gt_cv_locale_zh_CN=none
33433     fi
33434     rm -fr conftest*
33435
33436 fi
33437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33438 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
33439   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33440
33441
33442
33443
33444   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33445 printf %s "checking for a french Unicode locale... " >&6; }
33446 if test ${gt_cv_locale_fr_utf8+y}
33447 then :
33448   printf %s "(cached) " >&6
33449 else
33450
33451     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33452 /* end confdefs.h.  */
33453
33454 #include <locale.h>
33455 #include <time.h>
33456 #if HAVE_LANGINFO_CODESET
33457 # include <langinfo.h>
33458 #endif
33459 #include <stdlib.h>
33460 #include <string.h>
33461 struct tm t;
33462 char buf[16];
33463 int main () {
33464   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33465      imitates locale dependent behaviour by looking at the environment
33466      variables, and all locales use the UTF-8 encoding.  */
33467 #if !(defined __BEOS__ || defined __HAIKU__)
33468   /* Check whether the given locale name is recognized by the system.  */
33469 # if defined _WIN32 && !defined __CYGWIN__
33470   /* On native Windows, setlocale(category, "") looks at the system settings,
33471      not at the environment variables.  Also, when an encoding suffix such
33472      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33473      category of the locale to "C".  */
33474   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33475       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33476     return 1;
33477 # else
33478   if (setlocale (LC_ALL, "") == NULL) return 1;
33479 # endif
33480   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33481      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33482      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33483      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33484      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33485      some unit tests fail.  */
33486 # if HAVE_LANGINFO_CODESET
33487   {
33488     const char *cs = nl_langinfo (CODESET);
33489     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33490       return 1;
33491   }
33492 # endif
33493 # ifdef __CYGWIN__
33494   /* On Cygwin, avoid locale names without encoding suffix, because the
33495      locale_charset() function relies on the encoding suffix.  Note that
33496      LC_ALL is set on the command line.  */
33497   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33498 # endif
33499   /* Check whether in the abbreviation of the second month, the second
33500      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33501      two bytes long, with UTF-8 encoding.  */
33502   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33503   if (strftime (buf, sizeof (buf), "%b", &t) < 4
33504       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33505     return 1;
33506 #endif
33507 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
33508   /* Check whether the decimal separator is a comma.
33509      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33510      are nl_langinfo(RADIXCHAR) are both ".".  */
33511   if (localeconv () ->decimal_point[0] != ',') return 1;
33512 #endif
33513   return 0;
33514 }
33515
33516 _ACEOF
33517     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33518   (eval $ac_link) 2>&5
33519   ac_status=$?
33520   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33521   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33522       case "$host_os" in
33523         # Handle native Windows specially, because there setlocale() interprets
33524         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33525         # "fr" or "fra" as "French" or "French_France.1252",
33526         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33527         # "ja" as "Japanese" or "Japanese_Japan.932",
33528         # and similar.
33529         mingw*)
33530           # Test for the hypothetical native Windows locale name.
33531           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33532             gt_cv_locale_fr_utf8=French_France.65001
33533           else
33534             # None found.
33535             gt_cv_locale_fr_utf8=none
33536           fi
33537           ;;
33538         *)
33539           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33540           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33541           # configure script would override the LC_ALL setting. Likewise for
33542           # LC_CTYPE, which is also set at the beginning of the configure script.
33543           # Test for the usual locale name.
33544           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33545             gt_cv_locale_fr_utf8=fr_FR
33546           else
33547             # Test for the locale name with explicit encoding suffix.
33548             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33549               gt_cv_locale_fr_utf8=fr_FR.UTF-8
33550             else
33551               # Test for the Solaris 7 locale name.
33552               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33553                 gt_cv_locale_fr_utf8=fr.UTF-8
33554               else
33555                 # None found.
33556                 gt_cv_locale_fr_utf8=none
33557               fi
33558             fi
33559           fi
33560           ;;
33561       esac
33562     fi
33563     rm -fr conftest*
33564
33565 fi
33566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33567 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
33568   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33569
33570
33571
33572
33573
33574   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33575 printf %s "checking for a transitional chinese locale... " >&6; }
33576 if test ${gt_cv_locale_zh_CN+y}
33577 then :
33578   printf %s "(cached) " >&6
33579 else
33580
33581     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33582 /* end confdefs.h.  */
33583
33584 #include <locale.h>
33585 #include <stdlib.h>
33586 #include <time.h>
33587 #if HAVE_LANGINFO_CODESET
33588 # include <langinfo.h>
33589 #endif
33590 #include <stdlib.h>
33591 #include <string.h>
33592 struct tm t;
33593 char buf[16];
33594 int main ()
33595 {
33596   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33597      imitates locale dependent behaviour by looking at the environment
33598      variables, and all locales use the UTF-8 encoding.  */
33599 #if defined __BEOS__ || defined __HAIKU__
33600   return 1;
33601 #else
33602   /* Check whether the given locale name is recognized by the system.  */
33603 # if defined _WIN32 && !defined __CYGWIN__
33604   /* On native Windows, setlocale(category, "") looks at the system settings,
33605      not at the environment variables.  Also, when an encoding suffix such
33606      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33607      category of the locale to "C".  */
33608   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33609       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33610     return 1;
33611 # else
33612   if (setlocale (LC_ALL, "") == NULL) return 1;
33613 # endif
33614   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33615      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33616      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33617      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33618      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33619      some unit tests fail.
33620      On MirBSD 10, when an unsupported locale is specified, setlocale()
33621      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33622 # if HAVE_LANGINFO_CODESET
33623   {
33624     const char *cs = nl_langinfo (CODESET);
33625     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33626         || strcmp (cs, "UTF-8") == 0)
33627       return 1;
33628   }
33629 # endif
33630 # ifdef __CYGWIN__
33631   /* On Cygwin, avoid locale names without encoding suffix, because the
33632      locale_charset() function relies on the encoding suffix.  Note that
33633      LC_ALL is set on the command line.  */
33634   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33635 # endif
33636   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33637      This excludes the UTF-8 encoding (except on MirBSD).  */
33638   {
33639     const char *p;
33640     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33641     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33642     for (p = buf; *p != '\0'; p++)
33643       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33644         return 1;
33645   }
33646   /* Check whether a typical GB18030 multibyte sequence is recognized as a
33647      single wide character.  This excludes the GB2312 and GBK encodings.  */
33648   if (mblen ("\203\062\332\066", 5) != 4)
33649     return 1;
33650   return 0;
33651 #endif
33652 }
33653
33654 _ACEOF
33655     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33656   (eval $ac_link) 2>&5
33657   ac_status=$?
33658   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33659   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33660       case "$host_os" in
33661         # Handle native Windows specially, because there setlocale() interprets
33662         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33663         # "fr" or "fra" as "French" or "French_France.1252",
33664         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33665         # "ja" as "Japanese" or "Japanese_Japan.932",
33666         # and similar.
33667         mingw*)
33668           # Test for the hypothetical native Windows locale name.
33669           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33670             gt_cv_locale_zh_CN=Chinese_China.54936
33671           else
33672             # None found.
33673             gt_cv_locale_zh_CN=none
33674           fi
33675           ;;
33676         solaris2.8)
33677           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
33678           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
33679           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
33680           gt_cv_locale_zh_CN=none
33681           ;;
33682         *)
33683           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33684           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33685           # configure script would override the LC_ALL setting. Likewise for
33686           # LC_CTYPE, which is also set at the beginning of the configure script.
33687           # Test for the locale name without encoding suffix.
33688           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33689             gt_cv_locale_zh_CN=zh_CN
33690           else
33691             # Test for the locale name with explicit encoding suffix.
33692             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33693               gt_cv_locale_zh_CN=zh_CN.GB18030
33694             else
33695               # None found.
33696               gt_cv_locale_zh_CN=none
33697             fi
33698           fi
33699           ;;
33700       esac
33701     else
33702       # If there was a link error, due to mblen(), the system is so old that
33703       # it certainly doesn't have a chinese locale.
33704       gt_cv_locale_zh_CN=none
33705     fi
33706     rm -fr conftest*
33707
33708 fi
33709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33710 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
33711   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33712
33713
33714
33715
33716
33717   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
33718   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
33719   # irrelevant for anonymous mappings.
33720   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
33721 if test "x$ac_cv_func_mmap" = xyes
33722 then :
33723   gl_have_mmap=yes
33724 else
33725   gl_have_mmap=no
33726 fi
33727
33728
33729   # Try to allow MAP_ANONYMOUS.
33730   gl_have_mmap_anonymous=no
33731   if test $gl_have_mmap = yes; then
33732     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
33733 printf %s "checking for MAP_ANONYMOUS... " >&6; }
33734     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33735 /* end confdefs.h.  */
33736
33737 #include <sys/mman.h>
33738 #ifdef MAP_ANONYMOUS
33739     I cannot identify this map
33740 #endif
33741
33742 _ACEOF
33743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33744   $EGREP "I cannot identify this map" >/dev/null 2>&1
33745 then :
33746   gl_have_mmap_anonymous=yes
33747 fi
33748 rm -rf conftest*
33749
33750     if test $gl_have_mmap_anonymous != yes; then
33751       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33752 /* end confdefs.h.  */
33753
33754 #include <sys/mman.h>
33755 #ifdef MAP_ANON
33756     I cannot identify this map
33757 #endif
33758
33759 _ACEOF
33760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33761   $EGREP "I cannot identify this map" >/dev/null 2>&1
33762 then :
33763
33764 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33765
33766          gl_have_mmap_anonymous=yes
33767 fi
33768 rm -rf conftest*
33769
33770     fi
33771     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33772 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
33773     if test $gl_have_mmap_anonymous = yes; then
33774
33775 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33776
33777     fi
33778   fi
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792  nanosleep_save_libs=$LIBS
33793
33794  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
33795  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
33796  LIB_NANOSLEEP=
33797
33798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
33799 printf %s "checking for library containing nanosleep... " >&6; }
33800 if test ${ac_cv_search_nanosleep+y}
33801 then :
33802   printf %s "(cached) " >&6
33803 else
33804   ac_func_search_save_LIBS=$LIBS
33805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33806 /* end confdefs.h.  */
33807
33808 /* Override any GCC internal prototype to avoid an error.
33809    Use char because int might match the return type of a GCC
33810    builtin and then its argument prototype would still apply.  */
33811 #ifdef __cplusplus
33812 extern "C"
33813 #endif
33814 char nanosleep ();
33815 int
33816 main (void)
33817 {
33818 return nanosleep ();
33819   ;
33820   return 0;
33821 }
33822 _ACEOF
33823 for ac_lib in '' rt posix4
33824 do
33825   if test -z "$ac_lib"; then
33826     ac_res="none required"
33827   else
33828     ac_res=-l$ac_lib
33829     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
33830   fi
33831   if ac_fn_c_try_link "$LINENO"
33832 then :
33833   ac_cv_search_nanosleep=$ac_res
33834 fi
33835 rm -f core conftest.err conftest.$ac_objext \
33836     conftest$ac_exeext
33837   if test ${ac_cv_search_nanosleep+y}
33838 then :
33839   break
33840 fi
33841 done
33842 if test ${ac_cv_search_nanosleep+y}
33843 then :
33844
33845 else
33846   ac_cv_search_nanosleep=no
33847 fi
33848 rm conftest.$ac_ext
33849 LIBS=$ac_func_search_save_LIBS
33850 fi
33851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
33852 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
33853 ac_res=$ac_cv_search_nanosleep
33854 if test "$ac_res" != no
33855 then :
33856   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33857   test "$ac_cv_search_nanosleep" = "none required" ||
33858                  LIB_NANOSLEEP=$ac_cv_search_nanosleep
33859 fi
33860
33861  if test "x$ac_cv_search_nanosleep" != xno; then
33862
33863
33864    if test $APPLE_UNIVERSAL_BUILD = 1; then
33865      # A universal build on Apple Mac OS X platforms.
33866      # The test result would be 'no (mishandles large arguments)' in 64-bit
33867      # mode but 'yes' in 32-bit mode. But we need a configuration result that
33868      # is valid in both modes.
33869      gl_cv_func_nanosleep='no (mishandles large arguments)'
33870    fi
33871
33872    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
33873 printf %s "checking for working nanosleep... " >&6; }
33874 if test ${gl_cv_func_nanosleep+y}
33875 then :
33876   printf %s "(cached) " >&6
33877 else
33878
33879      if test "$cross_compiling" = yes
33880 then :
33881   case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
33882             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
33883           mingw*) # Guess no on native Windows.
33884             gl_cv_func_nanosleep='guessing no' ;;
33885           *)      # If we don't know, assume the worst.
33886             gl_cv_func_nanosleep='guessing no' ;;
33887         esac
33888
33889 else
33890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33891 /* end confdefs.h.  */
33892
33893           #include <errno.h>
33894           #include <limits.h>
33895           #include <signal.h>
33896           #if HAVE_SYS_TIME_H
33897            #include <sys/time.h>
33898           #endif
33899           #include <time.h>
33900           #include <unistd.h>
33901           #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
33902           #define TYPE_MAXIMUM(t) \
33903             ((t) (! TYPE_SIGNED (t) \
33904                   ? (t) -1 \
33905                   : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
33906
33907           #if HAVE_DECL_ALARM
33908           static void
33909           check_for_SIGALRM (int sig)
33910           {
33911             if (sig != SIGALRM)
33912               _exit (1);
33913           }
33914           #endif
33915
33916           int
33917           main ()
33918           {
33919             static struct timespec ts_sleep;
33920             static struct timespec ts_remaining;
33921             /* Test for major problems first.  */
33922             if (! nanosleep)
33923               return 2;
33924             ts_sleep.tv_sec = 0;
33925             ts_sleep.tv_nsec = 1;
33926             #if HAVE_DECL_ALARM
33927             {
33928               static struct sigaction act;
33929               act.sa_handler = check_for_SIGALRM;
33930               sigemptyset (&act.sa_mask);
33931               sigaction (SIGALRM, &act, NULL);
33932               alarm (1);
33933               if (nanosleep (&ts_sleep, NULL) != 0)
33934                 return 3;
33935               /* Test for a minor problem: the handling of large arguments.  */
33936               ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
33937               ts_sleep.tv_nsec = 999999999;
33938               alarm (1);
33939               if (nanosleep (&ts_sleep, &ts_remaining) != -1)
33940                 return 4;
33941               if (errno != EINTR)
33942                 return 5;
33943               if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
33944                 return 6;
33945             }
33946             #else /* A simpler test for native Windows.  */
33947             if (nanosleep (&ts_sleep, &ts_remaining) < 0)
33948               return 3;
33949             #endif
33950             return 0;
33951           }
33952 _ACEOF
33953 if ac_fn_c_try_run "$LINENO"
33954 then :
33955   gl_cv_func_nanosleep=yes
33956 else
33957   case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
33958         esac
33959 fi
33960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33961   conftest.$ac_objext conftest.beam conftest.$ac_ext
33962 fi
33963
33964
33965 fi
33966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
33967 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
33968    case "$gl_cv_func_nanosleep" in
33969      *yes)
33970        REPLACE_NANOSLEEP=0
33971        ;;
33972      *)
33973        REPLACE_NANOSLEEP=1
33974        case "$gl_cv_func_nanosleep" in
33975          *"mishandles large arguments"*)
33976
33977 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
33978
33979            ;;
33980          *)
33981            # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
33982            for ac_lib in $LIBSOCKET; do
33983              case " $LIB_NANOSLEEP " in
33984                *" $ac_lib "*) ;;
33985                *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
33986              esac
33987            done
33988            ;;
33989        esac
33990        ;;
33991    esac
33992  else
33993    HAVE_NANOSLEEP=0
33994  fi
33995  LIBS=$nanosleep_save_libs
33996
33997   if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
33998
33999
34000
34001
34002
34003
34004
34005
34006   gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
34007
34008
34009
34010   :
34011
34012   fi
34013
34014
34015
34016
34017
34018     if test "$GNULIB_NANOSLEEP" != 1; then
34019         if test "$GNULIB_NANOSLEEP" = 0; then
34020       GNULIB_NANOSLEEP=$gl_module_indicator_condition
34021     else
34022       GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
34023     fi
34024   fi
34025
34026
34027
34028
34029
34030 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
34031
34032
34033
34034
34035
34036   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
34037 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
34038 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
34039 then :
34040   printf %s "(cached) " >&6
34041 else
34042
34043       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34044 /* end confdefs.h.  */
34045 #include <netinet/in.h>
34046 int
34047 main (void)
34048 {
34049
34050   ;
34051   return 0;
34052 }
34053 _ACEOF
34054 if ac_fn_c_try_compile "$LINENO"
34055 then :
34056   gl_cv_header_netinet_in_h_selfcontained=yes
34057 else
34058   gl_cv_header_netinet_in_h_selfcontained=no
34059 fi
34060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34061
34062 fi
34063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
34064 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
34065   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
34066     NETINET_IN_H=''
34067   else
34068     NETINET_IN_H='netinet/in.h'
34069     ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
34070 if test "x$ac_cv_header_netinet_in_h" = xyes
34071 then :
34072   printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
34073
34074 fi
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085      if test $gl_cv_have_include_next = yes; then
34086        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
34087      else
34088        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
34089 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
34090 if test ${gl_cv_next_netinet_in_h+y}
34091 then :
34092   printf %s "(cached) " >&6
34093 else
34094
34095              if test $ac_cv_header_netinet_in_h = yes; then
34096
34097
34098
34099
34100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34101 /* end confdefs.h.  */
34102 #include <netinet/in.h>
34103 _ACEOF
34104                 case "$host_os" in
34105     aix*) gl_absname_cpp="$ac_cpp -C" ;;
34106     *)    gl_absname_cpp="$ac_cpp" ;;
34107   esac
34108
34109   case "$host_os" in
34110     mingw*)
34111                                           gl_dirsep_regex='[/\\]'
34112       ;;
34113     *)
34114       gl_dirsep_regex='\/'
34115       ;;
34116   esac
34117       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34118   gl_header_literal_regex=`echo 'netinet/in.h' \
34119                            | sed -e "$gl_make_literal_regex_sed"`
34120   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34121       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34122       s|^/[^/]|//&|
34123       p
34124       q
34125     }'
34126
34127         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34128   sed -n "$gl_absolute_header_sed"`
34129
34130            gl_header=$gl_cv_absolute_netinet_in_h
34131            gl_cv_next_netinet_in_h='"'$gl_header'"'
34132           else
34133                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
34134              fi
34135
34136
34137 fi
34138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
34139 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
34140      fi
34141      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
34142
34143      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34144        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34145        gl_next_as_first_directive='<'netinet/in.h'>'
34146      else
34147        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34148        gl_next_as_first_directive=$gl_cv_next_netinet_in_h
34149      fi
34150      NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
34151
34152
34153
34154
34155     if test $ac_cv_header_netinet_in_h = yes; then
34156       HAVE_NETINET_IN_H=1
34157     else
34158       HAVE_NETINET_IN_H=0
34159     fi
34160
34161   fi
34162
34163    if test -n "$NETINET_IN_H"; then
34164   GL_GENERATE_NETINET_IN_H_TRUE=
34165   GL_GENERATE_NETINET_IN_H_FALSE='#'
34166 else
34167   GL_GENERATE_NETINET_IN_H_TRUE='#'
34168   GL_GENERATE_NETINET_IN_H_FALSE=
34169 fi
34170
34171
34172
34173
34174
34175
34176   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34177 printf %s "checking for a traditional french locale... " >&6; }
34178 if test ${gt_cv_locale_fr+y}
34179 then :
34180   printf %s "(cached) " >&6
34181 else
34182
34183     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34184 /* end confdefs.h.  */
34185
34186 #include <locale.h>
34187 #include <time.h>
34188 #if HAVE_LANGINFO_CODESET
34189 # include <langinfo.h>
34190 #endif
34191 #include <stdlib.h>
34192 #include <string.h>
34193 struct tm t;
34194 char buf[16];
34195 int main () {
34196   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
34197      imitates locale dependent behaviour by looking at the environment
34198      variables, and all locales use the UTF-8 encoding.  */
34199 #if defined __BEOS__ || defined __HAIKU__
34200   return 1;
34201 #else
34202   /* Check whether the given locale name is recognized by the system.  */
34203 # if defined _WIN32 && !defined __CYGWIN__
34204   /* On native Windows, setlocale(category, "") looks at the system settings,
34205      not at the environment variables.  Also, when an encoding suffix such
34206      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34207      category of the locale to "C".  */
34208   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34209       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34210     return 1;
34211 # else
34212   if (setlocale (LC_ALL, "") == NULL) return 1;
34213 # endif
34214   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34215      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34216      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34217      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34218      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34219      some unit tests fail.
34220      On MirBSD 10, when an unsupported locale is specified, setlocale()
34221      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
34222 # if HAVE_LANGINFO_CODESET
34223   {
34224     const char *cs = nl_langinfo (CODESET);
34225     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34226         || strcmp (cs, "UTF-8") == 0)
34227       return 1;
34228   }
34229 # endif
34230 # ifdef __CYGWIN__
34231   /* On Cygwin, avoid locale names without encoding suffix, because the
34232      locale_charset() function relies on the encoding suffix.  Note that
34233      LC_ALL is set on the command line.  */
34234   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34235 # endif
34236   /* Check whether in the abbreviation of the second month, the second
34237      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34238      one byte long. This excludes the UTF-8 encoding.  */
34239   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34240   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34241 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
34242   /* Check whether the decimal separator is a comma.
34243      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34244      are nl_langinfo(RADIXCHAR) are both ".".  */
34245   if (localeconv () ->decimal_point[0] != ',') return 1;
34246 # endif
34247   return 0;
34248 #endif
34249 }
34250
34251 _ACEOF
34252     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34253   (eval $ac_link) 2>&5
34254   ac_status=$?
34255   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34256   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34257       case "$host_os" in
34258         # Handle native Windows specially, because there setlocale() interprets
34259         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34260         # "fr" or "fra" as "French" or "French_France.1252",
34261         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34262         # "ja" as "Japanese" or "Japanese_Japan.932",
34263         # and similar.
34264         mingw*)
34265           # Test for the native Windows locale name.
34266           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34267             gt_cv_locale_fr=French_France.1252
34268           else
34269             # None found.
34270             gt_cv_locale_fr=none
34271           fi
34272           ;;
34273         *)
34274           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34275           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34276           # configure script would override the LC_ALL setting. Likewise for
34277           # LC_CTYPE, which is also set at the beginning of the configure script.
34278           # Test for the usual locale name.
34279           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34280             gt_cv_locale_fr=fr_FR
34281           else
34282             # Test for the locale name with explicit encoding suffix.
34283             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34284               gt_cv_locale_fr=fr_FR.ISO-8859-1
34285             else
34286               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34287               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34288                 gt_cv_locale_fr=fr_FR.ISO8859-1
34289               else
34290                 # Test for the HP-UX locale name.
34291                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34292                   gt_cv_locale_fr=fr_FR.iso88591
34293                 else
34294                   # Test for the Solaris 7 locale name.
34295                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34296                     gt_cv_locale_fr=fr
34297                   else
34298                     # None found.
34299                     gt_cv_locale_fr=none
34300                   fi
34301                 fi
34302               fi
34303             fi
34304           fi
34305           ;;
34306       esac
34307     fi
34308     rm -fr conftest*
34309
34310 fi
34311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34312 printf "%s\n" "$gt_cv_locale_fr" >&6; }
34313   LOCALE_FR=$gt_cv_locale_fr
34314
34315
34316
34317
34318   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
34319 printf %s "checking for a french Unicode locale... " >&6; }
34320 if test ${gt_cv_locale_fr_utf8+y}
34321 then :
34322   printf %s "(cached) " >&6
34323 else
34324
34325     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34326 /* end confdefs.h.  */
34327
34328 #include <locale.h>
34329 #include <time.h>
34330 #if HAVE_LANGINFO_CODESET
34331 # include <langinfo.h>
34332 #endif
34333 #include <stdlib.h>
34334 #include <string.h>
34335 struct tm t;
34336 char buf[16];
34337 int main () {
34338   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
34339      imitates locale dependent behaviour by looking at the environment
34340      variables, and all locales use the UTF-8 encoding.  */
34341 #if !(defined __BEOS__ || defined __HAIKU__)
34342   /* Check whether the given locale name is recognized by the system.  */
34343 # if defined _WIN32 && !defined __CYGWIN__
34344   /* On native Windows, setlocale(category, "") looks at the system settings,
34345      not at the environment variables.  Also, when an encoding suffix such
34346      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34347      category of the locale to "C".  */
34348   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34349       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34350     return 1;
34351 # else
34352   if (setlocale (LC_ALL, "") == NULL) return 1;
34353 # endif
34354   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34355      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34356      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34357      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34358      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34359      some unit tests fail.  */
34360 # if HAVE_LANGINFO_CODESET
34361   {
34362     const char *cs = nl_langinfo (CODESET);
34363     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34364       return 1;
34365   }
34366 # endif
34367 # ifdef __CYGWIN__
34368   /* On Cygwin, avoid locale names without encoding suffix, because the
34369      locale_charset() function relies on the encoding suffix.  Note that
34370      LC_ALL is set on the command line.  */
34371   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34372 # endif
34373   /* Check whether in the abbreviation of the second month, the second
34374      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
34375      two bytes long, with UTF-8 encoding.  */
34376   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34377   if (strftime (buf, sizeof (buf), "%b", &t) < 4
34378       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
34379     return 1;
34380 #endif
34381 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
34382   /* Check whether the decimal separator is a comma.
34383      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34384      are nl_langinfo(RADIXCHAR) are both ".".  */
34385   if (localeconv () ->decimal_point[0] != ',') return 1;
34386 #endif
34387   return 0;
34388 }
34389
34390 _ACEOF
34391     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34392   (eval $ac_link) 2>&5
34393   ac_status=$?
34394   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34395   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34396       case "$host_os" in
34397         # Handle native Windows specially, because there setlocale() interprets
34398         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34399         # "fr" or "fra" as "French" or "French_France.1252",
34400         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34401         # "ja" as "Japanese" or "Japanese_Japan.932",
34402         # and similar.
34403         mingw*)
34404           # Test for the hypothetical native Windows locale name.
34405           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34406             gt_cv_locale_fr_utf8=French_France.65001
34407           else
34408             # None found.
34409             gt_cv_locale_fr_utf8=none
34410           fi
34411           ;;
34412         *)
34413           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34414           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34415           # configure script would override the LC_ALL setting. Likewise for
34416           # LC_CTYPE, which is also set at the beginning of the configure script.
34417           # Test for the usual locale name.
34418           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34419             gt_cv_locale_fr_utf8=fr_FR
34420           else
34421             # Test for the locale name with explicit encoding suffix.
34422             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34423               gt_cv_locale_fr_utf8=fr_FR.UTF-8
34424             else
34425               # Test for the Solaris 7 locale name.
34426               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34427                 gt_cv_locale_fr_utf8=fr.UTF-8
34428               else
34429                 # None found.
34430                 gt_cv_locale_fr_utf8=none
34431               fi
34432             fi
34433           fi
34434           ;;
34435       esac
34436     fi
34437     rm -fr conftest*
34438
34439 fi
34440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
34441 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
34442   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
34443
34444
34445
34446
34447
34448
34449
34450              if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
34451             REPLACE_PERROR=1
34452   fi
34453   case ${gl_cv_func_strerror_r_works-unset} in
34454     unset|*yes)
34455       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
34456 printf %s "checking whether perror matches strerror... " >&6; }
34457 if test ${gl_cv_func_perror_works+y}
34458 then :
34459   printf %s "(cached) " >&6
34460 else
34461   if test "$cross_compiling" = yes
34462 then :
34463   case "$host_os" in
34464                       # Guess yes on native Windows.
34465               mingw*) gl_cv_func_perror_works="guessing yes" ;;
34466                       # Otherwise guess no.
34467               *)      gl_cv_func_perror_works="guessing no" ;;
34468             esac
34469
34470 else
34471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34472 /* end confdefs.h.  */
34473 #include <errno.h>
34474                 #include <stdio.h>
34475                 #include <stdlib.h>
34476                 #include <string.h>
34477
34478 int
34479 main (void)
34480 {
34481 char *str = strerror (-1);
34482                 if (!getenv("CONFTEST_OUTPUT")) return 0;
34483                 if (!str) str = "";
34484                 puts (str);
34485                 errno = -1;
34486                 perror ("");
34487                 return 0;
34488
34489   ;
34490   return 0;
34491 }
34492 _ACEOF
34493 if ac_fn_c_try_run "$LINENO"
34494 then :
34495   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
34496                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
34497               gl_cv_func_perror_works=yes
34498             else
34499               gl_cv_func_perror_works=no
34500             fi
34501             rm -rf conftest.txt1 conftest.txt2
34502 else
34503   gl_cv_func_perror_works=no
34504 fi
34505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34506   conftest.$ac_objext conftest.beam conftest.$ac_ext
34507 fi
34508
34509
34510 fi
34511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
34512 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
34513       case "$gl_cv_func_perror_works" in
34514         *yes) ;;
34515         *) REPLACE_PERROR=1 ;;
34516       esac
34517       ;;
34518     *)
34519                   REPLACE_PERROR=1
34520       ;;
34521   esac
34522
34523   if test $REPLACE_PERROR = 1; then
34524
34525
34526
34527
34528
34529
34530
34531
34532   gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
34533
34534   fi
34535
34536
34537
34538
34539
34540     if test "$GNULIB_PERROR" != 1; then
34541         if test "$GNULIB_PERROR" = 0; then
34542       GNULIB_PERROR=$gl_module_indicator_condition
34543     else
34544       GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)"
34545     fi
34546   fi
34547
34548
34549
34550
34551
34552 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
34553
34554
34555
34556
34557
34558
34559
34560   if test $ac_cv_func_pipe != yes; then
34561     HAVE_PIPE=0
34562   fi
34563
34564   if test $HAVE_PIPE = 0; then
34565
34566
34567
34568
34569
34570
34571
34572
34573   gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
34574
34575   fi
34576
34577
34578
34579
34580
34581     if test "$GNULIB_PIPE" != 1; then
34582         if test "$GNULIB_PIPE" = 0; then
34583       GNULIB_PIPE=$gl_module_indicator_condition
34584     else
34585       GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
34586     fi
34587   fi
34588
34589
34590
34591
34592
34593 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
34594
34595
34596
34597
34598
34599      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
34600 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
34601 if test ${gl_cv_func_svid_putenv+y}
34602 then :
34603   printf %s "(cached) " >&6
34604 else
34605   if test "$cross_compiling" = yes
34606 then :
34607                case "$host_os" in
34608                                # Guess yes on glibc systems.
34609                 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
34610                                # Guess no on native Windows.
34611                 mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
34612                                # If we don't know, assume the worst.
34613                 *)             gl_cv_func_svid_putenv="guessing no" ;;
34614               esac
34615
34616 else
34617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34618 /* end confdefs.h.  */
34619 $ac_includes_default
34620 int
34621 main (void)
34622 {
34623
34624     /* Put it in env.  */
34625     if (putenv ("CONFTEST_putenv=val"))
34626       return 1;
34627
34628     /* Try to remove it.  */
34629     if (putenv ("CONFTEST_putenv"))
34630       return 2;
34631
34632     /* Make sure it was deleted.  */
34633     if (getenv ("CONFTEST_putenv") != 0)
34634       return 3;
34635
34636     return 0;
34637
34638   ;
34639   return 0;
34640 }
34641 _ACEOF
34642 if ac_fn_c_try_run "$LINENO"
34643 then :
34644   gl_cv_func_svid_putenv=yes
34645 else
34646   gl_cv_func_svid_putenv=no
34647 fi
34648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34649   conftest.$ac_objext conftest.beam conftest.$ac_ext
34650 fi
34651
34652
34653 fi
34654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
34655 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
34656   case "$gl_cv_func_svid_putenv" in
34657     *yes) ;;
34658     *)
34659       REPLACE_PUTENV=1
34660       ;;
34661   esac
34662
34663   if test $REPLACE_PUTENV = 1; then
34664
34665
34666
34667
34668
34669
34670
34671
34672   gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
34673
34674
34675   ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
34676 if test "x$ac_cv_have_decl__putenv" = xyes
34677 then :
34678   ac_have_decl=1
34679 else
34680   ac_have_decl=0
34681 fi
34682
34683 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
34684
34685
34686   fi
34687
34688
34689
34690
34691
34692     if test "$GNULIB_PUTENV" != 1; then
34693         if test "$GNULIB_PUTENV" = 0; then
34694       GNULIB_PUTENV=$gl_module_indicator_condition
34695     else
34696       GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
34697     fi
34698   fi
34699
34700
34701
34702
34703
34704 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
34705
34706
34707
34708
34709
34710
34711   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
34712   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
34713   # irrelevant for anonymous mappings.
34714   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
34715 if test "x$ac_cv_func_mmap" = xyes
34716 then :
34717   gl_have_mmap=yes
34718 else
34719   gl_have_mmap=no
34720 fi
34721
34722
34723   # Try to allow MAP_ANONYMOUS.
34724   gl_have_mmap_anonymous=no
34725   if test $gl_have_mmap = yes; then
34726     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
34727 printf %s "checking for MAP_ANONYMOUS... " >&6; }
34728     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34729 /* end confdefs.h.  */
34730
34731 #include <sys/mman.h>
34732 #ifdef MAP_ANONYMOUS
34733     I cannot identify this map
34734 #endif
34735
34736 _ACEOF
34737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34738   $EGREP "I cannot identify this map" >/dev/null 2>&1
34739 then :
34740   gl_have_mmap_anonymous=yes
34741 fi
34742 rm -rf conftest*
34743
34744     if test $gl_have_mmap_anonymous != yes; then
34745       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34746 /* end confdefs.h.  */
34747
34748 #include <sys/mman.h>
34749 #ifdef MAP_ANON
34750     I cannot identify this map
34751 #endif
34752
34753 _ACEOF
34754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34755   $EGREP "I cannot identify this map" >/dev/null 2>&1
34756 then :
34757
34758 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
34759
34760          gl_have_mmap_anonymous=yes
34761 fi
34762 rm -rf conftest*
34763
34764     fi
34765     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
34766 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
34767     if test $gl_have_mmap_anonymous = yes; then
34768
34769 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
34770
34771     fi
34772   fi
34773
34774
34775
34776
34777
34778
34779   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
34780   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
34781   # irrelevant for anonymous mappings.
34782   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
34783 if test "x$ac_cv_func_mmap" = xyes
34784 then :
34785   gl_have_mmap=yes
34786 else
34787   gl_have_mmap=no
34788 fi
34789
34790
34791   # Try to allow MAP_ANONYMOUS.
34792   gl_have_mmap_anonymous=no
34793   if test $gl_have_mmap = yes; then
34794     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
34795 printf %s "checking for MAP_ANONYMOUS... " >&6; }
34796     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34797 /* end confdefs.h.  */
34798
34799 #include <sys/mman.h>
34800 #ifdef MAP_ANONYMOUS
34801     I cannot identify this map
34802 #endif
34803
34804 _ACEOF
34805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34806   $EGREP "I cannot identify this map" >/dev/null 2>&1
34807 then :
34808   gl_have_mmap_anonymous=yes
34809 fi
34810 rm -rf conftest*
34811
34812     if test $gl_have_mmap_anonymous != yes; then
34813       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814 /* end confdefs.h.  */
34815
34816 #include <sys/mman.h>
34817 #ifdef MAP_ANON
34818     I cannot identify this map
34819 #endif
34820
34821 _ACEOF
34822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34823   $EGREP "I cannot identify this map" >/dev/null 2>&1
34824 then :
34825
34826 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
34827
34828          gl_have_mmap_anonymous=yes
34829 fi
34830 rm -rf conftest*
34831
34832     fi
34833     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
34834 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
34835     if test $gl_have_mmap_anonymous = yes; then
34836
34837 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
34838
34839     fi
34840   fi
34841
34842
34843
34844
34845
34846
34847
34848   if test "$ac_cv_header_winsock2_h" = yes; then
34849     REPLACE_SELECT=1
34850   else
34851
34852     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
34853 printf %s "checking whether select supports a 0 argument... " >&6; }
34854 if test ${gl_cv_func_select_supports0+y}
34855 then :
34856   printf %s "(cached) " >&6
34857 else
34858
34859         if test "$cross_compiling" = yes
34860 then :
34861
34862            case "$host_os" in
34863                        # Guess no on Interix.
34864              interix*) gl_cv_func_select_supports0="guessing no";;
34865                        # Guess yes otherwise.
34866              *)        gl_cv_func_select_supports0="guessing yes";;
34867            esac
34868
34869 else
34870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34871 /* end confdefs.h.  */
34872
34873 #include <sys/types.h>
34874 #include <sys/time.h>
34875 #if HAVE_SYS_SELECT_H
34876 #include <sys/select.h>
34877 #endif
34878 int main ()
34879 {
34880   struct timeval timeout;
34881   timeout.tv_sec = 0;
34882   timeout.tv_usec = 5;
34883   return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
34884 }
34885 _ACEOF
34886 if ac_fn_c_try_run "$LINENO"
34887 then :
34888   gl_cv_func_select_supports0=yes
34889 else
34890   gl_cv_func_select_supports0=no
34891 fi
34892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34893   conftest.$ac_objext conftest.beam conftest.$ac_ext
34894 fi
34895
34896
34897 fi
34898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
34899 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
34900     case "$gl_cv_func_select_supports0" in
34901       *yes) ;;
34902       *) REPLACE_SELECT=1 ;;
34903     esac
34904
34905         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
34906 printf %s "checking whether select detects invalid fds... " >&6; }
34907 if test ${gl_cv_func_select_detects_ebadf+y}
34908 then :
34909   printf %s "(cached) " >&6
34910 else
34911
34912         if test "$cross_compiling" = yes
34913 then :
34914
34915            case "$host_os" in
34916                              # Guess yes on Linux systems.
34917             linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
34918                              # Guess yes on glibc systems.
34919             *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
34920                              # If we don't know, assume the worst.
34921             *)               gl_cv_func_select_detects_ebadf="guessing no" ;;
34922            esac
34923
34924 else
34925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34926 /* end confdefs.h.  */
34927
34928 #include <sys/types.h>
34929 #include <sys/time.h>
34930 #if HAVE_SYS_SELECT_H
34931 # include <sys/select.h>
34932 #endif
34933 #include <unistd.h>
34934 #include <errno.h>
34935
34936 int
34937 main (void)
34938 {
34939
34940   fd_set set;
34941   dup2(0, 16);
34942   FD_ZERO(&set);
34943   FD_SET(16, &set);
34944   close(16);
34945   struct timeval timeout;
34946   timeout.tv_sec = 0;
34947   timeout.tv_usec = 5;
34948   return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
34949
34950   ;
34951   return 0;
34952 }
34953 _ACEOF
34954 if ac_fn_c_try_run "$LINENO"
34955 then :
34956   gl_cv_func_select_detects_ebadf=yes
34957 else
34958   gl_cv_func_select_detects_ebadf=no
34959 fi
34960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34961   conftest.$ac_objext conftest.beam conftest.$ac_ext
34962 fi
34963
34964
34965 fi
34966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
34967 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
34968     case $gl_cv_func_select_detects_ebadf in
34969       *yes) ;;
34970       *) REPLACE_SELECT=1 ;;
34971     esac
34972   fi
34973
34974     LIB_SELECT="$LIBSOCKET"
34975   if test $REPLACE_SELECT = 1; then
34976     case "$host_os" in
34977       mingw*)
34978                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34979 /* end confdefs.h.  */
34980
34981 #define WIN32_LEAN_AND_MEAN
34982 #include <windows.h>
34983 int
34984 main ()
34985 {
34986   MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
34987   return 0;
34988 }
34989 _ACEOF
34990 if ac_fn_c_try_link "$LINENO"
34991 then :
34992
34993 else
34994   LIB_SELECT="$LIB_SELECT -luser32"
34995 fi
34996 rm -f core conftest.err conftest.$ac_objext \
34997     conftest$ac_exeext conftest.$ac_ext
34998         ;;
34999     esac
35000   fi
35001
35002
35003   if test $REPLACE_SELECT = 1; then
35004
35005
35006
35007
35008
35009
35010
35011
35012   gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
35013
35014   fi
35015
35016
35017
35018
35019
35020     if test "$GNULIB_SELECT" != 1; then
35021         if test "$GNULIB_SELECT" = 0; then
35022       GNULIB_SELECT=$gl_module_indicator_condition
35023     else
35024       GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
35025     fi
35026   fi
35027
35028
35029
35030
35031
35032 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
35033
35034
35035
35036
35037
35038
35039
35040   case "$host_os" in
35041             mingw*) REPLACE_SETLOCALE=1 ;;
35042             cygwin*)
35043       case `uname -r` in
35044         1.5.*) REPLACE_SETLOCALE=1 ;;
35045       esac
35046       ;;
35047   esac
35048
35049   if test $REPLACE_SETLOCALE = 1; then
35050
35051
35052
35053
35054
35055
35056
35057
35058   gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
35059
35060
35061         :
35062
35063   fi
35064
35065
35066
35067
35068
35069     if test "$GNULIB_SETLOCALE" != 1; then
35070         if test "$GNULIB_SETLOCALE" = 0; then
35071       GNULIB_SETLOCALE=$gl_module_indicator_condition
35072     else
35073       GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
35074     fi
35075   fi
35076
35077
35078
35079
35080
35081 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
35082
35083
35084
35085
35086
35087
35088   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
35089 printf %s "checking for a traditional french locale... " >&6; }
35090 if test ${gt_cv_locale_fr+y}
35091 then :
35092   printf %s "(cached) " >&6
35093 else
35094
35095     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35096 /* end confdefs.h.  */
35097
35098 #include <locale.h>
35099 #include <time.h>
35100 #if HAVE_LANGINFO_CODESET
35101 # include <langinfo.h>
35102 #endif
35103 #include <stdlib.h>
35104 #include <string.h>
35105 struct tm t;
35106 char buf[16];
35107 int main () {
35108   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
35109      imitates locale dependent behaviour by looking at the environment
35110      variables, and all locales use the UTF-8 encoding.  */
35111 #if defined __BEOS__ || defined __HAIKU__
35112   return 1;
35113 #else
35114   /* Check whether the given locale name is recognized by the system.  */
35115 # if defined _WIN32 && !defined __CYGWIN__
35116   /* On native Windows, setlocale(category, "") looks at the system settings,
35117      not at the environment variables.  Also, when an encoding suffix such
35118      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35119      category of the locale to "C".  */
35120   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35121       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35122     return 1;
35123 # else
35124   if (setlocale (LC_ALL, "") == NULL) return 1;
35125 # endif
35126   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35127      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35128      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35129      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35130      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35131      some unit tests fail.
35132      On MirBSD 10, when an unsupported locale is specified, setlocale()
35133      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
35134 # if HAVE_LANGINFO_CODESET
35135   {
35136     const char *cs = nl_langinfo (CODESET);
35137     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35138         || strcmp (cs, "UTF-8") == 0)
35139       return 1;
35140   }
35141 # endif
35142 # ifdef __CYGWIN__
35143   /* On Cygwin, avoid locale names without encoding suffix, because the
35144      locale_charset() function relies on the encoding suffix.  Note that
35145      LC_ALL is set on the command line.  */
35146   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35147 # endif
35148   /* Check whether in the abbreviation of the second month, the second
35149      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
35150      one byte long. This excludes the UTF-8 encoding.  */
35151   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35152   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
35153 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
35154   /* Check whether the decimal separator is a comma.
35155      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35156      are nl_langinfo(RADIXCHAR) are both ".".  */
35157   if (localeconv () ->decimal_point[0] != ',') return 1;
35158 # endif
35159   return 0;
35160 #endif
35161 }
35162
35163 _ACEOF
35164     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35165   (eval $ac_link) 2>&5
35166   ac_status=$?
35167   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35168   test $ac_status = 0; } && test -s conftest$ac_exeext; then
35169       case "$host_os" in
35170         # Handle native Windows specially, because there setlocale() interprets
35171         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35172         # "fr" or "fra" as "French" or "French_France.1252",
35173         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35174         # "ja" as "Japanese" or "Japanese_Japan.932",
35175         # and similar.
35176         mingw*)
35177           # Test for the native Windows locale name.
35178           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35179             gt_cv_locale_fr=French_France.1252
35180           else
35181             # None found.
35182             gt_cv_locale_fr=none
35183           fi
35184           ;;
35185         *)
35186           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35187           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35188           # configure script would override the LC_ALL setting. Likewise for
35189           # LC_CTYPE, which is also set at the beginning of the configure script.
35190           # Test for the usual locale name.
35191           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35192             gt_cv_locale_fr=fr_FR
35193           else
35194             # Test for the locale name with explicit encoding suffix.
35195             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35196               gt_cv_locale_fr=fr_FR.ISO-8859-1
35197             else
35198               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
35199               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35200                 gt_cv_locale_fr=fr_FR.ISO8859-1
35201               else
35202                 # Test for the HP-UX locale name.
35203                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35204                   gt_cv_locale_fr=fr_FR.iso88591
35205                 else
35206                   # Test for the Solaris 7 locale name.
35207                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35208                     gt_cv_locale_fr=fr
35209                   else
35210                     # None found.
35211                     gt_cv_locale_fr=none
35212                   fi
35213                 fi
35214               fi
35215             fi
35216           fi
35217           ;;
35218       esac
35219     fi
35220     rm -fr conftest*
35221
35222 fi
35223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
35224 printf "%s\n" "$gt_cv_locale_fr" >&6; }
35225   LOCALE_FR=$gt_cv_locale_fr
35226
35227
35228
35229
35230   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
35231 printf %s "checking for a french Unicode locale... " >&6; }
35232 if test ${gt_cv_locale_fr_utf8+y}
35233 then :
35234   printf %s "(cached) " >&6
35235 else
35236
35237     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35238 /* end confdefs.h.  */
35239
35240 #include <locale.h>
35241 #include <time.h>
35242 #if HAVE_LANGINFO_CODESET
35243 # include <langinfo.h>
35244 #endif
35245 #include <stdlib.h>
35246 #include <string.h>
35247 struct tm t;
35248 char buf[16];
35249 int main () {
35250   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
35251      imitates locale dependent behaviour by looking at the environment
35252      variables, and all locales use the UTF-8 encoding.  */
35253 #if !(defined __BEOS__ || defined __HAIKU__)
35254   /* Check whether the given locale name is recognized by the system.  */
35255 # if defined _WIN32 && !defined __CYGWIN__
35256   /* On native Windows, setlocale(category, "") looks at the system settings,
35257      not at the environment variables.  Also, when an encoding suffix such
35258      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35259      category of the locale to "C".  */
35260   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35261       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35262     return 1;
35263 # else
35264   if (setlocale (LC_ALL, "") == NULL) return 1;
35265 # endif
35266   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35267      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35268      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35269      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35270      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35271      some unit tests fail.  */
35272 # if HAVE_LANGINFO_CODESET
35273   {
35274     const char *cs = nl_langinfo (CODESET);
35275     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
35276       return 1;
35277   }
35278 # endif
35279 # ifdef __CYGWIN__
35280   /* On Cygwin, avoid locale names without encoding suffix, because the
35281      locale_charset() function relies on the encoding suffix.  Note that
35282      LC_ALL is set on the command line.  */
35283   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35284 # endif
35285   /* Check whether in the abbreviation of the second month, the second
35286      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
35287      two bytes long, with UTF-8 encoding.  */
35288   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35289   if (strftime (buf, sizeof (buf), "%b", &t) < 4
35290       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
35291     return 1;
35292 #endif
35293 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
35294   /* Check whether the decimal separator is a comma.
35295      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35296      are nl_langinfo(RADIXCHAR) are both ".".  */
35297   if (localeconv () ->decimal_point[0] != ',') return 1;
35298 #endif
35299   return 0;
35300 }
35301
35302 _ACEOF
35303     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35304   (eval $ac_link) 2>&5
35305   ac_status=$?
35306   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35307   test $ac_status = 0; } && test -s conftest$ac_exeext; then
35308       case "$host_os" in
35309         # Handle native Windows specially, because there setlocale() interprets
35310         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35311         # "fr" or "fra" as "French" or "French_France.1252",
35312         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35313         # "ja" as "Japanese" or "Japanese_Japan.932",
35314         # and similar.
35315         mingw*)
35316           # Test for the hypothetical native Windows locale name.
35317           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35318             gt_cv_locale_fr_utf8=French_France.65001
35319           else
35320             # None found.
35321             gt_cv_locale_fr_utf8=none
35322           fi
35323           ;;
35324         *)
35325           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35326           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35327           # configure script would override the LC_ALL setting. Likewise for
35328           # LC_CTYPE, which is also set at the beginning of the configure script.
35329           # Test for the usual locale name.
35330           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35331             gt_cv_locale_fr_utf8=fr_FR
35332           else
35333             # Test for the locale name with explicit encoding suffix.
35334             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35335               gt_cv_locale_fr_utf8=fr_FR.UTF-8
35336             else
35337               # Test for the Solaris 7 locale name.
35338               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35339                 gt_cv_locale_fr_utf8=fr.UTF-8
35340               else
35341                 # None found.
35342                 gt_cv_locale_fr_utf8=none
35343               fi
35344             fi
35345           fi
35346           ;;
35347       esac
35348     fi
35349     rm -fr conftest*
35350
35351 fi
35352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
35353 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
35354   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
35355
35356
35357
35358
35359
35360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
35361 printf %s "checking for a traditional japanese locale... " >&6; }
35362 if test ${gt_cv_locale_ja+y}
35363 then :
35364   printf %s "(cached) " >&6
35365 else
35366
35367     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35368 /* end confdefs.h.  */
35369
35370 #include <locale.h>
35371 #include <time.h>
35372 #if HAVE_LANGINFO_CODESET
35373 # include <langinfo.h>
35374 #endif
35375 #include <stdlib.h>
35376 #include <string.h>
35377 struct tm t;
35378 char buf[16];
35379 int main ()
35380 {
35381   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
35382      imitates locale dependent behaviour by looking at the environment
35383      variables, and all locales use the UTF-8 encoding.  */
35384 #if defined __BEOS__ || defined __HAIKU__
35385   return 1;
35386 #else
35387   /* Check whether the given locale name is recognized by the system.  */
35388 # if defined _WIN32 && !defined __CYGWIN__
35389   /* On native Windows, setlocale(category, "") looks at the system settings,
35390      not at the environment variables.  Also, when an encoding suffix such
35391      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35392      category of the locale to "C".  */
35393   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35394       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35395     return 1;
35396 # else
35397   if (setlocale (LC_ALL, "") == NULL) return 1;
35398 # endif
35399   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35400      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35401      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35402      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35403      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35404      some unit tests fail.
35405      On MirBSD 10, when an unsupported locale is specified, setlocale()
35406      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
35407 # if HAVE_LANGINFO_CODESET
35408   {
35409     const char *cs = nl_langinfo (CODESET);
35410     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35411         || strcmp (cs, "UTF-8") == 0)
35412       return 1;
35413   }
35414 # endif
35415 # ifdef __CYGWIN__
35416   /* On Cygwin, avoid locale names without encoding suffix, because the
35417      locale_charset() function relies on the encoding suffix.  Note that
35418      LC_ALL is set on the command line.  */
35419   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35420 # endif
35421   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
35422      on Cygwin 1.5.x.  */
35423   if (MB_CUR_MAX == 1)
35424     return 1;
35425   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
35426      This excludes the UTF-8 encoding (except on MirBSD).  */
35427   {
35428     const char *p;
35429     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35430     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
35431     for (p = buf; *p != '\0'; p++)
35432       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
35433         return 1;
35434   }
35435   return 0;
35436 #endif
35437 }
35438
35439 _ACEOF
35440     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35441   (eval $ac_link) 2>&5
35442   ac_status=$?
35443   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35444   test $ac_status = 0; } && test -s conftest$ac_exeext; then
35445       case "$host_os" in
35446         # Handle native Windows specially, because there setlocale() interprets
35447         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35448         # "fr" or "fra" as "French" or "French_France.1252",
35449         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35450         # "ja" as "Japanese" or "Japanese_Japan.932",
35451         # and similar.
35452         mingw*)
35453           # Note that on native Windows, the Japanese locale is
35454           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
35455           # cannot use it here.
35456           gt_cv_locale_ja=none
35457           ;;
35458         *)
35459           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35460           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35461           # configure script would override the LC_ALL setting. Likewise for
35462           # LC_CTYPE, which is also set at the beginning of the configure script.
35463           # Test for the AIX locale name.
35464           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35465             gt_cv_locale_ja=ja_JP
35466           else
35467             # Test for the locale name with explicit encoding suffix.
35468             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35469               gt_cv_locale_ja=ja_JP.EUC-JP
35470             else
35471               # Test for the HP-UX, OSF/1, NetBSD locale name.
35472               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35473                 gt_cv_locale_ja=ja_JP.eucJP
35474               else
35475                 # Test for the IRIX, FreeBSD locale name.
35476                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35477                   gt_cv_locale_ja=ja_JP.EUC
35478                 else
35479                   # Test for the Solaris 7 locale name.
35480                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35481                     gt_cv_locale_ja=ja
35482                   else
35483                     # Special test for NetBSD 1.6.
35484                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
35485                       gt_cv_locale_ja=ja_JP.eucJP
35486                     else
35487                       # None found.
35488                       gt_cv_locale_ja=none
35489                     fi
35490                   fi
35491                 fi
35492               fi
35493             fi
35494           fi
35495           ;;
35496       esac
35497     fi
35498     rm -fr conftest*
35499
35500 fi
35501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
35502 printf "%s\n" "$gt_cv_locale_ja" >&6; }
35503   LOCALE_JA=$gt_cv_locale_ja
35504
35505
35506
35507
35508
35509   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
35510 printf %s "checking for a transitional chinese locale... " >&6; }
35511 if test ${gt_cv_locale_zh_CN+y}
35512 then :
35513   printf %s "(cached) " >&6
35514 else
35515
35516     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35517 /* end confdefs.h.  */
35518
35519 #include <locale.h>
35520 #include <stdlib.h>
35521 #include <time.h>
35522 #if HAVE_LANGINFO_CODESET
35523 # include <langinfo.h>
35524 #endif
35525 #include <stdlib.h>
35526 #include <string.h>
35527 struct tm t;
35528 char buf[16];
35529 int main ()
35530 {
35531   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
35532      imitates locale dependent behaviour by looking at the environment
35533      variables, and all locales use the UTF-8 encoding.  */
35534 #if defined __BEOS__ || defined __HAIKU__
35535   return 1;
35536 #else
35537   /* Check whether the given locale name is recognized by the system.  */
35538 # if defined _WIN32 && !defined __CYGWIN__
35539   /* On native Windows, setlocale(category, "") looks at the system settings,
35540      not at the environment variables.  Also, when an encoding suffix such
35541      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35542      category of the locale to "C".  */
35543   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35544       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35545     return 1;
35546 # else
35547   if (setlocale (LC_ALL, "") == NULL) return 1;
35548 # endif
35549   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35550      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35551      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35552      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35553      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35554      some unit tests fail.
35555      On MirBSD 10, when an unsupported locale is specified, setlocale()
35556      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
35557 # if HAVE_LANGINFO_CODESET
35558   {
35559     const char *cs = nl_langinfo (CODESET);
35560     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35561         || strcmp (cs, "UTF-8") == 0)
35562       return 1;
35563   }
35564 # endif
35565 # ifdef __CYGWIN__
35566   /* On Cygwin, avoid locale names without encoding suffix, because the
35567      locale_charset() function relies on the encoding suffix.  Note that
35568      LC_ALL is set on the command line.  */
35569   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35570 # endif
35571   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
35572      This excludes the UTF-8 encoding (except on MirBSD).  */
35573   {
35574     const char *p;
35575     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35576     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
35577     for (p = buf; *p != '\0'; p++)
35578       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
35579         return 1;
35580   }
35581   /* Check whether a typical GB18030 multibyte sequence is recognized as a
35582      single wide character.  This excludes the GB2312 and GBK encodings.  */
35583   if (mblen ("\203\062\332\066", 5) != 4)
35584     return 1;
35585   return 0;
35586 #endif
35587 }
35588
35589 _ACEOF
35590     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35591   (eval $ac_link) 2>&5
35592   ac_status=$?
35593   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35594   test $ac_status = 0; } && test -s conftest$ac_exeext; then
35595       case "$host_os" in
35596         # Handle native Windows specially, because there setlocale() interprets
35597         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35598         # "fr" or "fra" as "French" or "French_France.1252",
35599         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35600         # "ja" as "Japanese" or "Japanese_Japan.932",
35601         # and similar.
35602         mingw*)
35603           # Test for the hypothetical native Windows locale name.
35604           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35605             gt_cv_locale_zh_CN=Chinese_China.54936
35606           else
35607             # None found.
35608             gt_cv_locale_zh_CN=none
35609           fi
35610           ;;
35611         solaris2.8)
35612           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
35613           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
35614           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
35615           gt_cv_locale_zh_CN=none
35616           ;;
35617         *)
35618           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35619           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35620           # configure script would override the LC_ALL setting. Likewise for
35621           # LC_CTYPE, which is also set at the beginning of the configure script.
35622           # Test for the locale name without encoding suffix.
35623           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35624             gt_cv_locale_zh_CN=zh_CN
35625           else
35626             # Test for the locale name with explicit encoding suffix.
35627             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35628               gt_cv_locale_zh_CN=zh_CN.GB18030
35629             else
35630               # None found.
35631               gt_cv_locale_zh_CN=none
35632             fi
35633           fi
35634           ;;
35635       esac
35636     else
35637       # If there was a link error, due to mblen(), the system is so old that
35638       # it certainly doesn't have a chinese locale.
35639       gt_cv_locale_zh_CN=none
35640     fi
35641     rm -fr conftest*
35642
35643 fi
35644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
35645 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
35646   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
35647
35648
35649
35650   if test "$ac_cv_header_winsock2_h" = yes; then
35651
35652
35653
35654
35655
35656
35657
35658
35659   gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
35660
35661   fi
35662
35663
35664
35665
35666
35667     if test "$GNULIB_SETSOCKOPT" != 1; then
35668         if test "$GNULIB_SETSOCKOPT" = 0; then
35669       GNULIB_SETSOCKOPT=$gl_module_indicator_condition
35670     else
35671       GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
35672     fi
35673   fi
35674
35675
35676
35677
35678
35679 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
35680
35681
35682
35683
35684
35685                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
35686 "
35687 if test "x$ac_cv_have_decl_sleep" = xyes
35688 then :
35689   ac_have_decl=1
35690 else
35691   ac_have_decl=0
35692 fi
35693
35694 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
35695
35696
35697   if test $ac_cv_have_decl_sleep != yes; then
35698     HAVE_SLEEP=0
35699   else
35700         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
35701 printf %s "checking for working sleep... " >&6; }
35702 if test ${gl_cv_func_sleep_works+y}
35703 then :
35704   printf %s "(cached) " >&6
35705 else
35706   if test "$cross_compiling" = yes
35707 then :
35708   case "$host_os" in
35709                         # Guess yes on glibc systems.
35710          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
35711                         # Guess no on native Windows.
35712          mingw*)        gl_cv_func_sleep_works="guessing no" ;;
35713                         # If we don't know, assume the worst.
35714          *)             gl_cv_func_sleep_works="guessing no" ;;
35715        esac
35716
35717 else
35718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35719 /* end confdefs.h.  */
35720
35721 #include <errno.h>
35722 #include <unistd.h>
35723 #include <signal.h>
35724 static void
35725 handle_alarm (int sig)
35726 {
35727   if (sig != SIGALRM)
35728     _exit (2);
35729 }
35730
35731 int
35732 main (void)
35733 {
35734
35735     /* Failure to compile this test due to missing alarm is okay,
35736        since all such platforms (mingw) also lack sleep.  */
35737     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
35738     unsigned int remaining;
35739     signal (SIGALRM, handle_alarm);
35740     alarm (1);
35741     remaining = sleep (pentecost);
35742     if (remaining > pentecost)
35743       return 3;
35744     if (remaining <= pentecost - 10)
35745       return 4;
35746     return 0;
35747
35748   ;
35749   return 0;
35750 }
35751 _ACEOF
35752 if ac_fn_c_try_run "$LINENO"
35753 then :
35754   gl_cv_func_sleep_works=yes
35755 else
35756   gl_cv_func_sleep_works=no
35757 fi
35758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35759   conftest.$ac_objext conftest.beam conftest.$ac_ext
35760 fi
35761
35762 fi
35763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
35764 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
35765     case "$gl_cv_func_sleep_works" in
35766       *yes) ;;
35767       *)
35768         REPLACE_SLEEP=1
35769         ;;
35770     esac
35771   fi
35772
35773   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
35774
35775
35776
35777
35778
35779
35780
35781
35782   gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
35783
35784   fi
35785
35786
35787
35788
35789
35790     if test "$GNULIB_SLEEP" != 1; then
35791         if test "$GNULIB_SLEEP" = 0; then
35792       GNULIB_SLEEP=$gl_module_indicator_condition
35793     else
35794       GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
35795     fi
35796   fi
35797
35798
35799
35800
35801
35802 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
35803
35804
35805
35806
35807
35808
35809   gl_cv_func_snprintf_usable=no
35810   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
35811 if test "x$ac_cv_func_snprintf" = xyes
35812 then :
35813   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
35814
35815 fi
35816
35817   if test $ac_cv_func_snprintf = yes; then
35818
35819
35820
35821   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
35822 printf %s "checking whether snprintf respects a size of 1... " >&6; }
35823 if test ${gl_cv_func_snprintf_size1+y}
35824 then :
35825   printf %s "(cached) " >&6
35826 else
35827
35828       if test "$cross_compiling" = yes
35829 then :
35830   case "$host_os" in
35831                    # Guess yes on native Windows.
35832            mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
35833            *)      gl_cv_func_snprintf_size1="guessing yes" ;;
35834          esac
35835
35836 else
35837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35838 /* end confdefs.h.  */
35839
35840 #include <stdio.h>
35841 #if HAVE_SNPRINTF
35842 # define my_snprintf snprintf
35843 #else
35844 # include <stdarg.h>
35845 static int my_snprintf (char *buf, int size, const char *format, ...)
35846 {
35847   va_list args;
35848   int ret;
35849   va_start (args, format);
35850   ret = vsnprintf (buf, size, format, args);
35851   va_end (args);
35852   return ret;
35853 }
35854 #endif
35855 int main()
35856 {
35857   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35858   my_snprintf (buf, 1, "%d", 12345);
35859   return buf[1] != 'E';
35860 }
35861 _ACEOF
35862 if ac_fn_c_try_run "$LINENO"
35863 then :
35864   gl_cv_func_snprintf_size1=yes
35865 else
35866   gl_cv_func_snprintf_size1=no
35867 fi
35868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35869   conftest.$ac_objext conftest.beam conftest.$ac_ext
35870 fi
35871
35872
35873 fi
35874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
35875 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
35876
35877     case "$gl_cv_func_snprintf_size1" in
35878       *yes)
35879
35880         case "$gl_cv_func_snprintf_retval_c99" in
35881           *yes)
35882
35883
35884      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
35885 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
35886 if test ${gl_cv_func_printf_positions+y}
35887 then :
35888   printf %s "(cached) " >&6
35889 else
35890
35891       if test "$cross_compiling" = yes
35892 then :
35893
35894          case "$host_os" in
35895            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
35896                          gl_cv_func_printf_positions="guessing no";;
35897            beos*)        gl_cv_func_printf_positions="guessing no";;
35898                          # Guess no on native Windows.
35899            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
35900            *)            gl_cv_func_printf_positions="guessing yes";;
35901          esac
35902
35903 else
35904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35905 /* end confdefs.h.  */
35906
35907 #include <stdio.h>
35908 #include <string.h>
35909 /* The string "%2$d %1$d", with dollar characters protected from the shell's
35910    dollar expansion (possibly an autoconf bug).  */
35911 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
35912 static char buf[100];
35913 int main ()
35914 {
35915   sprintf (buf, format, 33, 55);
35916   return (strcmp (buf, "55 33") != 0);
35917 }
35918 _ACEOF
35919 if ac_fn_c_try_run "$LINENO"
35920 then :
35921   gl_cv_func_printf_positions=yes
35922 else
35923   gl_cv_func_printf_positions=no
35924 fi
35925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35926   conftest.$ac_objext conftest.beam conftest.$ac_ext
35927 fi
35928
35929
35930 fi
35931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
35932 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
35933
35934             case "$gl_cv_func_printf_positions" in
35935               *yes)
35936                 gl_cv_func_snprintf_usable=yes
35937                 ;;
35938             esac
35939             ;;
35940         esac
35941         ;;
35942     esac
35943   fi
35944   if test $gl_cv_func_snprintf_usable = no; then
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955   gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
35956
35957   if test $ac_cv_func_snprintf = yes; then
35958     REPLACE_SNPRINTF=1
35959   else
35960
35961     if test $ac_cv_have_decl_snprintf = yes; then
35962                         REPLACE_SNPRINTF=1
35963     fi
35964   fi
35965   :
35966
35967   fi
35968
35969   if test $ac_cv_have_decl_snprintf = no; then
35970     HAVE_DECL_SNPRINTF=0
35971   fi
35972
35973
35974
35975
35976
35977
35978     if test "$GNULIB_SNPRINTF" != 1; then
35979         if test "$GNULIB_SNPRINTF" = 0; then
35980       GNULIB_SNPRINTF=$gl_module_indicator_condition
35981     else
35982       GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)"
35983     fi
35984   fi
35985
35986
35987
35988
35989
35990 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
35991
35992
35993
35994
35995
35996 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
35997
35998
35999
36000   if test "$ac_cv_header_winsock2_h" = yes; then
36001
36002
36003
36004
36005
36006
36007
36008
36009   gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
36010
36011   fi
36012   # When this module is used, sockets may actually occur as file descriptors,
36013   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
36014
36015
36016
36017   if test "$ac_cv_header_winsock2_h" = yes; then
36018     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
36019     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
36020   fi
36021
36022
36023
36024
36025
36026     if test "$GNULIB_SOCKET" != 1; then
36027         if test "$GNULIB_SOCKET" = 0; then
36028       GNULIB_SOCKET=$gl_module_indicator_condition
36029     else
36030       GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
36031     fi
36032   fi
36033
36034
36035
36036
36037
36038 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
36039
36040
36041
36042
36043
36044      ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
36045 /* <sys/types.h> is not needed according to POSIX, but the
36046    <sys/socket.h> in i386-unknown-freebsd4.10 and
36047    powerpc-apple-darwin5.5 required it. */
36048 #include <sys/types.h>
36049 #if HAVE_SYS_SOCKET_H
36050 # include <sys/socket.h>
36051 #elif HAVE_WS2TCPIP_H
36052 # include <ws2tcpip.h>
36053 #endif
36054
36055 "
36056 if test "x$ac_cv_type_socklen_t" = xyes
36057 then :
36058
36059 else
36060   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
36061 printf %s "checking for socklen_t equivalent... " >&6; }
36062 if test ${gl_cv_socklen_t_equiv+y}
36063 then :
36064   printf %s "(cached) " >&6
36065 else
36066   # Systems have either "struct sockaddr *" or
36067          # "void *" as the second argument to getpeername
36068          gl_cv_socklen_t_equiv=
36069          for arg2 in "struct sockaddr" void; do
36070            for t in int size_t "unsigned int" "long int" "unsigned long int"; do
36071              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36072 /* end confdefs.h.  */
36073 #include <sys/types.h>
36074                    #include <sys/socket.h>
36075
36076                    int getpeername (int, $arg2 *, $t *);
36077 int
36078 main (void)
36079 {
36080 $t len;
36081                   getpeername (0, 0, &len);
36082   ;
36083   return 0;
36084 }
36085 _ACEOF
36086 if ac_fn_c_try_compile "$LINENO"
36087 then :
36088   gl_cv_socklen_t_equiv="$t"
36089 fi
36090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36091              test "$gl_cv_socklen_t_equiv" != "" && break
36092            done
36093            test "$gl_cv_socklen_t_equiv" != "" && break
36094          done
36095          if test "$gl_cv_socklen_t_equiv" = ""; then
36096            as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
36097          fi
36098
36099 fi
36100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
36101 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
36102
36103 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
36104
36105 fi
36106
36107
36108   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
36109 printf %s "checking for working stdalign.h... " >&6; }
36110 if test ${gl_cv_header_working_stdalign_h+y}
36111 then :
36112   printf %s "(cached) " >&6
36113 else
36114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36115 /* end confdefs.h.  */
36116 #include <stdalign.h>
36117             #include <stddef.h>
36118
36119             /* Test that alignof yields a result consistent with offsetof.
36120                This catches GCC bug 52023
36121                <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
36122             #ifdef __cplusplus
36123                template <class t> struct alignof_helper { char a; t b; };
36124             # define ao(type) offsetof (alignof_helper<type>, b)
36125             #else
36126             # define ao(type) offsetof (struct { char a; type b; }, b)
36127             #endif
36128             char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
36129             char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
36130             char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
36131
36132             /* Test _Alignas only on platforms where gnulib can help.  */
36133             #if \
36134                 ((defined __cplusplus && 201103 <= __cplusplus) \
36135                  || (defined __APPLE__ && defined __MACH__ \
36136                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
36137                      : __GNUC__) \
36138                  || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
36139                  || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
36140                  || 1300 <= _MSC_VER)
36141               struct alignas_test { char c; char alignas (8) alignas_8; };
36142               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
36143                                 ? 1 : -1];
36144             #endif
36145
36146 int
36147 main (void)
36148 {
36149
36150   ;
36151   return 0;
36152 }
36153 _ACEOF
36154 if ac_fn_c_try_compile "$LINENO"
36155 then :
36156   gl_cv_header_working_stdalign_h=yes
36157 else
36158   gl_cv_header_working_stdalign_h=no
36159 fi
36160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36161 fi
36162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
36163 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
36164
36165   if test $gl_cv_header_working_stdalign_h = yes; then
36166     STDALIGN_H=''
36167   else
36168     STDALIGN_H='stdalign.h'
36169   fi
36170
36171
36172    if test -n "$STDALIGN_H"; then
36173   GL_GENERATE_STDALIGN_H_TRUE=
36174   GL_GENERATE_STDALIGN_H_FALSE='#'
36175 else
36176   GL_GENERATE_STDALIGN_H_TRUE='#'
36177   GL_GENERATE_STDALIGN_H_FALSE=
36178 fi
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190   if test $ac_cv_have_decl_strerror_r = no; then
36191     HAVE_DECL_STRERROR_R=0
36192   fi
36193
36194   if test $ac_cv_func_strerror_r = yes; then
36195     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
36196       if test $gl_cv_func_strerror_r_posix_signature = yes; then
36197         case "$gl_cv_func_strerror_r_works" in
36198                     *no) REPLACE_STRERROR_R=1 ;;
36199         esac
36200       else
36201                 REPLACE_STRERROR_R=1
36202       fi
36203     else
36204                   REPLACE_STRERROR_R=1
36205     fi
36206   fi
36207
36208   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
36209
36210
36211
36212
36213
36214
36215
36216
36217   gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
36218
36219
36220
36221
36222
36223
36224   fi
36225
36226
36227
36228
36229
36230     if test "$GNULIB_STRERROR_R" != 1; then
36231         if test "$GNULIB_STRERROR_R" = 0; then
36232       GNULIB_STRERROR_R=$gl_module_indicator_condition
36233     else
36234       GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)"
36235     fi
36236   fi
36237
36238
36239
36240
36241
36242 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
36243
36244
36245
36246
36247
36248 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
36249
36250
36251
36252
36253
36254   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36255   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36256   # irrelevant for anonymous mappings.
36257   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36258 if test "x$ac_cv_func_mmap" = xyes
36259 then :
36260   gl_have_mmap=yes
36261 else
36262   gl_have_mmap=no
36263 fi
36264
36265
36266   # Try to allow MAP_ANONYMOUS.
36267   gl_have_mmap_anonymous=no
36268   if test $gl_have_mmap = yes; then
36269     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36270 printf %s "checking for MAP_ANONYMOUS... " >&6; }
36271     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36272 /* end confdefs.h.  */
36273
36274 #include <sys/mman.h>
36275 #ifdef MAP_ANONYMOUS
36276     I cannot identify this map
36277 #endif
36278
36279 _ACEOF
36280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36281   $EGREP "I cannot identify this map" >/dev/null 2>&1
36282 then :
36283   gl_have_mmap_anonymous=yes
36284 fi
36285 rm -rf conftest*
36286
36287     if test $gl_have_mmap_anonymous != yes; then
36288       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36289 /* end confdefs.h.  */
36290
36291 #include <sys/mman.h>
36292 #ifdef MAP_ANON
36293     I cannot identify this map
36294 #endif
36295
36296 _ACEOF
36297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36298   $EGREP "I cannot identify this map" >/dev/null 2>&1
36299 then :
36300
36301 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36302
36303          gl_have_mmap_anonymous=yes
36304 fi
36305 rm -rf conftest*
36306
36307     fi
36308     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36309 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
36310     if test $gl_have_mmap_anonymous = yes; then
36311
36312 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36313
36314     fi
36315   fi
36316
36317
36318
36319
36320
36321
36322         if test $ac_cv_func_symlink = no; then
36323     HAVE_SYMLINK=0
36324   else
36325     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
36326 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
36327 if test ${gl_cv_func_symlink_works+y}
36328 then :
36329   printf %s "(cached) " >&6
36330 else
36331   if test "$cross_compiling" = yes
36332 then :
36333   case "$host_os" in
36334                              # Guess yes on Linux systems.
36335             linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
36336                              # Guess yes on glibc systems.
36337             *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
36338                              # If we don't know, assume the worst.
36339             *)               gl_cv_func_symlink_works="guessing no" ;;
36340           esac
36341
36342 else
36343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36344 /* end confdefs.h.  */
36345 #include <unistd.h>
36346
36347 int
36348 main (void)
36349 {
36350 int result = 0;
36351              if (!symlink ("a", "conftest.link/"))
36352                result |= 1;
36353              if (symlink ("conftest.f", "conftest.lnk2"))
36354                result |= 2;
36355              else if (!symlink ("a", "conftest.lnk2/"))
36356                result |= 4;
36357              return result;
36358
36359   ;
36360   return 0;
36361 }
36362 _ACEOF
36363 if ac_fn_c_try_run "$LINENO"
36364 then :
36365   gl_cv_func_symlink_works=yes
36366 else
36367   gl_cv_func_symlink_works=no
36368 fi
36369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36370   conftest.$ac_objext conftest.beam conftest.$ac_ext
36371 fi
36372
36373       rm -f conftest.f conftest.link conftest.lnk2
36374 fi
36375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
36376 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
36377     case "$gl_cv_func_symlink_works" in
36378       *yes) ;;
36379       *)
36380         REPLACE_SYMLINK=1
36381         ;;
36382     esac
36383   fi
36384
36385   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
36386
36387
36388
36389
36390
36391
36392
36393
36394   gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
36395
36396   fi
36397
36398
36399
36400
36401
36402     if test "$GNULIB_SYMLINK" != 1; then
36403         if test "$GNULIB_SYMLINK" = 0; then
36404       GNULIB_SYMLINK=$gl_module_indicator_condition
36405     else
36406       GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
36407     fi
36408   fi
36409
36410
36411
36412
36413
36414 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
36415
36416
36417
36418
36419
36420
36421
36422   if test $ac_cv_header_sys_ioctl_h = yes; then
36423     HAVE_SYS_IOCTL_H=1
36424             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
36425 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
36426 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
36427 then :
36428   printf %s "(cached) " >&6
36429 else
36430          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36431 /* end confdefs.h.  */
36432 #include <sys/ioctl.h>
36433
36434 int
36435 main (void)
36436 {
36437 (void) ioctl;
36438   ;
36439   return 0;
36440 }
36441 _ACEOF
36442 if ac_fn_c_try_compile "$LINENO"
36443 then :
36444   gl_cv_decl_ioctl_in_sys_ioctl_h=yes
36445 else
36446   gl_cv_decl_ioctl_in_sys_ioctl_h=no
36447 fi
36448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36449
36450 fi
36451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
36452 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
36453   else
36454     HAVE_SYS_IOCTL_H=0
36455   fi
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466      if test $gl_cv_have_include_next = yes; then
36467        gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
36468      else
36469        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
36470 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
36471 if test ${gl_cv_next_sys_ioctl_h+y}
36472 then :
36473   printf %s "(cached) " >&6
36474 else
36475
36476              if test $ac_cv_header_sys_ioctl_h = yes; then
36477
36478
36479
36480
36481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36482 /* end confdefs.h.  */
36483 #include <sys/ioctl.h>
36484 _ACEOF
36485                 case "$host_os" in
36486     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36487     *)    gl_absname_cpp="$ac_cpp" ;;
36488   esac
36489
36490   case "$host_os" in
36491     mingw*)
36492                                           gl_dirsep_regex='[/\\]'
36493       ;;
36494     *)
36495       gl_dirsep_regex='\/'
36496       ;;
36497   esac
36498       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36499   gl_header_literal_regex=`echo 'sys/ioctl.h' \
36500                            | sed -e "$gl_make_literal_regex_sed"`
36501   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36502       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36503       s|^/[^/]|//&|
36504       p
36505       q
36506     }'
36507
36508         gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36509   sed -n "$gl_absolute_header_sed"`
36510
36511            gl_header=$gl_cv_absolute_sys_ioctl_h
36512            gl_cv_next_sys_ioctl_h='"'$gl_header'"'
36513           else
36514                gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
36515              fi
36516
36517
36518 fi
36519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
36520 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
36521      fi
36522      NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
36523
36524      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36525        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36526        gl_next_as_first_directive='<'sys/ioctl.h'>'
36527      else
36528        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36529        gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
36530      fi
36531      NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558      if test $gl_cv_have_include_next = yes; then
36559        gl_cv_next_sys_uio_h='<'sys/uio.h'>'
36560      else
36561        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
36562 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
36563 if test ${gl_cv_next_sys_uio_h+y}
36564 then :
36565   printf %s "(cached) " >&6
36566 else
36567
36568              if test $ac_cv_header_sys_uio_h = yes; then
36569
36570
36571
36572
36573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36574 /* end confdefs.h.  */
36575 #include <sys/uio.h>
36576 _ACEOF
36577                 case "$host_os" in
36578     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36579     *)    gl_absname_cpp="$ac_cpp" ;;
36580   esac
36581
36582   case "$host_os" in
36583     mingw*)
36584                                           gl_dirsep_regex='[/\\]'
36585       ;;
36586     *)
36587       gl_dirsep_regex='\/'
36588       ;;
36589   esac
36590       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36591   gl_header_literal_regex=`echo 'sys/uio.h' \
36592                            | sed -e "$gl_make_literal_regex_sed"`
36593   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36594       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36595       s|^/[^/]|//&|
36596       p
36597       q
36598     }'
36599
36600         gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36601   sed -n "$gl_absolute_header_sed"`
36602
36603            gl_header=$gl_cv_absolute_sys_uio_h
36604            gl_cv_next_sys_uio_h='"'$gl_header'"'
36605           else
36606                gl_cv_next_sys_uio_h='<'sys/uio.h'>'
36607              fi
36608
36609
36610 fi
36611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
36612 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
36613      fi
36614      NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
36615
36616      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36617        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36618        gl_next_as_first_directive='<'sys/uio.h'>'
36619      else
36620        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36621        gl_next_as_first_directive=$gl_cv_next_sys_uio_h
36622      fi
36623      NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
36624
36625
36626
36627
36628   if test $ac_cv_header_sys_uio_h = yes; then
36629     HAVE_SYS_UIO_H=1
36630   else
36631     HAVE_SYS_UIO_H=0
36632   fi
36633
36634
36635
36636   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
36637
36638   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
36639
36640
36641
36642
36643   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
36644 printf %s "checking for a traditional french locale... " >&6; }
36645 if test ${gt_cv_locale_fr+y}
36646 then :
36647   printf %s "(cached) " >&6
36648 else
36649
36650     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36651 /* end confdefs.h.  */
36652
36653 #include <locale.h>
36654 #include <time.h>
36655 #if HAVE_LANGINFO_CODESET
36656 # include <langinfo.h>
36657 #endif
36658 #include <stdlib.h>
36659 #include <string.h>
36660 struct tm t;
36661 char buf[16];
36662 int main () {
36663   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
36664      imitates locale dependent behaviour by looking at the environment
36665      variables, and all locales use the UTF-8 encoding.  */
36666 #if defined __BEOS__ || defined __HAIKU__
36667   return 1;
36668 #else
36669   /* Check whether the given locale name is recognized by the system.  */
36670 # if defined _WIN32 && !defined __CYGWIN__
36671   /* On native Windows, setlocale(category, "") looks at the system settings,
36672      not at the environment variables.  Also, when an encoding suffix such
36673      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36674      category of the locale to "C".  */
36675   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36676       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36677     return 1;
36678 # else
36679   if (setlocale (LC_ALL, "") == NULL) return 1;
36680 # endif
36681   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36682      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36683      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36684      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36685      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36686      some unit tests fail.
36687      On MirBSD 10, when an unsupported locale is specified, setlocale()
36688      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
36689 # if HAVE_LANGINFO_CODESET
36690   {
36691     const char *cs = nl_langinfo (CODESET);
36692     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36693         || strcmp (cs, "UTF-8") == 0)
36694       return 1;
36695   }
36696 # endif
36697 # ifdef __CYGWIN__
36698   /* On Cygwin, avoid locale names without encoding suffix, because the
36699      locale_charset() function relies on the encoding suffix.  Note that
36700      LC_ALL is set on the command line.  */
36701   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36702 # endif
36703   /* Check whether in the abbreviation of the second month, the second
36704      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
36705      one byte long. This excludes the UTF-8 encoding.  */
36706   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36707   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
36708 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36709   /* Check whether the decimal separator is a comma.
36710      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36711      are nl_langinfo(RADIXCHAR) are both ".".  */
36712   if (localeconv () ->decimal_point[0] != ',') return 1;
36713 # endif
36714   return 0;
36715 #endif
36716 }
36717
36718 _ACEOF
36719     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36720   (eval $ac_link) 2>&5
36721   ac_status=$?
36722   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36723   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36724       case "$host_os" in
36725         # Handle native Windows specially, because there setlocale() interprets
36726         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36727         # "fr" or "fra" as "French" or "French_France.1252",
36728         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36729         # "ja" as "Japanese" or "Japanese_Japan.932",
36730         # and similar.
36731         mingw*)
36732           # Test for the native Windows locale name.
36733           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36734             gt_cv_locale_fr=French_France.1252
36735           else
36736             # None found.
36737             gt_cv_locale_fr=none
36738           fi
36739           ;;
36740         *)
36741           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36742           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36743           # configure script would override the LC_ALL setting. Likewise for
36744           # LC_CTYPE, which is also set at the beginning of the configure script.
36745           # Test for the usual locale name.
36746           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36747             gt_cv_locale_fr=fr_FR
36748           else
36749             # Test for the locale name with explicit encoding suffix.
36750             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36751               gt_cv_locale_fr=fr_FR.ISO-8859-1
36752             else
36753               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
36754               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36755                 gt_cv_locale_fr=fr_FR.ISO8859-1
36756               else
36757                 # Test for the HP-UX locale name.
36758                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36759                   gt_cv_locale_fr=fr_FR.iso88591
36760                 else
36761                   # Test for the Solaris 7 locale name.
36762                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36763                     gt_cv_locale_fr=fr
36764                   else
36765                     # None found.
36766                     gt_cv_locale_fr=none
36767                   fi
36768                 fi
36769               fi
36770             fi
36771           fi
36772           ;;
36773       esac
36774     fi
36775     rm -fr conftest*
36776
36777 fi
36778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
36779 printf "%s\n" "$gt_cv_locale_fr" >&6; }
36780   LOCALE_FR=$gt_cv_locale_fr
36781
36782
36783
36784
36785   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36786 printf %s "checking for a french Unicode locale... " >&6; }
36787 if test ${gt_cv_locale_fr_utf8+y}
36788 then :
36789   printf %s "(cached) " >&6
36790 else
36791
36792     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36793 /* end confdefs.h.  */
36794
36795 #include <locale.h>
36796 #include <time.h>
36797 #if HAVE_LANGINFO_CODESET
36798 # include <langinfo.h>
36799 #endif
36800 #include <stdlib.h>
36801 #include <string.h>
36802 struct tm t;
36803 char buf[16];
36804 int main () {
36805   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
36806      imitates locale dependent behaviour by looking at the environment
36807      variables, and all locales use the UTF-8 encoding.  */
36808 #if !(defined __BEOS__ || defined __HAIKU__)
36809   /* Check whether the given locale name is recognized by the system.  */
36810 # if defined _WIN32 && !defined __CYGWIN__
36811   /* On native Windows, setlocale(category, "") looks at the system settings,
36812      not at the environment variables.  Also, when an encoding suffix such
36813      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36814      category of the locale to "C".  */
36815   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36816       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36817     return 1;
36818 # else
36819   if (setlocale (LC_ALL, "") == NULL) return 1;
36820 # endif
36821   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36822      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36823      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36824      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36825      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36826      some unit tests fail.  */
36827 # if HAVE_LANGINFO_CODESET
36828   {
36829     const char *cs = nl_langinfo (CODESET);
36830     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36831       return 1;
36832   }
36833 # endif
36834 # ifdef __CYGWIN__
36835   /* On Cygwin, avoid locale names without encoding suffix, because the
36836      locale_charset() function relies on the encoding suffix.  Note that
36837      LC_ALL is set on the command line.  */
36838   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36839 # endif
36840   /* Check whether in the abbreviation of the second month, the second
36841      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36842      two bytes long, with UTF-8 encoding.  */
36843   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36844   if (strftime (buf, sizeof (buf), "%b", &t) < 4
36845       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36846     return 1;
36847 #endif
36848 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36849   /* Check whether the decimal separator is a comma.
36850      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36851      are nl_langinfo(RADIXCHAR) are both ".".  */
36852   if (localeconv () ->decimal_point[0] != ',') return 1;
36853 #endif
36854   return 0;
36855 }
36856
36857 _ACEOF
36858     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36859   (eval $ac_link) 2>&5
36860   ac_status=$?
36861   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36862   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36863       case "$host_os" in
36864         # Handle native Windows specially, because there setlocale() interprets
36865         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36866         # "fr" or "fra" as "French" or "French_France.1252",
36867         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36868         # "ja" as "Japanese" or "Japanese_Japan.932",
36869         # and similar.
36870         mingw*)
36871           # Test for the hypothetical native Windows locale name.
36872           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36873             gt_cv_locale_fr_utf8=French_France.65001
36874           else
36875             # None found.
36876             gt_cv_locale_fr_utf8=none
36877           fi
36878           ;;
36879         *)
36880           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36881           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36882           # configure script would override the LC_ALL setting. Likewise for
36883           # LC_CTYPE, which is also set at the beginning of the configure script.
36884           # Test for the usual locale name.
36885           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36886             gt_cv_locale_fr_utf8=fr_FR
36887           else
36888             # Test for the locale name with explicit encoding suffix.
36889             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36890               gt_cv_locale_fr_utf8=fr_FR.UTF-8
36891             else
36892               # Test for the Solaris 7 locale name.
36893               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36894                 gt_cv_locale_fr_utf8=fr.UTF-8
36895               else
36896                 # None found.
36897                 gt_cv_locale_fr_utf8=none
36898               fi
36899             fi
36900           fi
36901           ;;
36902       esac
36903     fi
36904     rm -fr conftest*
36905
36906 fi
36907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36908 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
36909   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36910
36911
36912
36913
36914
36915   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
36916 printf %s "checking for a traditional japanese locale... " >&6; }
36917 if test ${gt_cv_locale_ja+y}
36918 then :
36919   printf %s "(cached) " >&6
36920 else
36921
36922     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36923 /* end confdefs.h.  */
36924
36925 #include <locale.h>
36926 #include <time.h>
36927 #if HAVE_LANGINFO_CODESET
36928 # include <langinfo.h>
36929 #endif
36930 #include <stdlib.h>
36931 #include <string.h>
36932 struct tm t;
36933 char buf[16];
36934 int main ()
36935 {
36936   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
36937      imitates locale dependent behaviour by looking at the environment
36938      variables, and all locales use the UTF-8 encoding.  */
36939 #if defined __BEOS__ || defined __HAIKU__
36940   return 1;
36941 #else
36942   /* Check whether the given locale name is recognized by the system.  */
36943 # if defined _WIN32 && !defined __CYGWIN__
36944   /* On native Windows, setlocale(category, "") looks at the system settings,
36945      not at the environment variables.  Also, when an encoding suffix such
36946      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36947      category of the locale to "C".  */
36948   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36949       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36950     return 1;
36951 # else
36952   if (setlocale (LC_ALL, "") == NULL) return 1;
36953 # endif
36954   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36955      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36956      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36957      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36958      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36959      some unit tests fail.
36960      On MirBSD 10, when an unsupported locale is specified, setlocale()
36961      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
36962 # if HAVE_LANGINFO_CODESET
36963   {
36964     const char *cs = nl_langinfo (CODESET);
36965     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36966         || strcmp (cs, "UTF-8") == 0)
36967       return 1;
36968   }
36969 # endif
36970 # ifdef __CYGWIN__
36971   /* On Cygwin, avoid locale names without encoding suffix, because the
36972      locale_charset() function relies on the encoding suffix.  Note that
36973      LC_ALL is set on the command line.  */
36974   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36975 # endif
36976   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
36977      on Cygwin 1.5.x.  */
36978   if (MB_CUR_MAX == 1)
36979     return 1;
36980   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36981      This excludes the UTF-8 encoding (except on MirBSD).  */
36982   {
36983     const char *p;
36984     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36985     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36986     for (p = buf; *p != '\0'; p++)
36987       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36988         return 1;
36989   }
36990   return 0;
36991 #endif
36992 }
36993
36994 _ACEOF
36995     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36996   (eval $ac_link) 2>&5
36997   ac_status=$?
36998   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36999   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37000       case "$host_os" in
37001         # Handle native Windows specially, because there setlocale() interprets
37002         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37003         # "fr" or "fra" as "French" or "French_France.1252",
37004         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37005         # "ja" as "Japanese" or "Japanese_Japan.932",
37006         # and similar.
37007         mingw*)
37008           # Note that on native Windows, the Japanese locale is
37009           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
37010           # cannot use it here.
37011           gt_cv_locale_ja=none
37012           ;;
37013         *)
37014           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37015           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37016           # configure script would override the LC_ALL setting. Likewise for
37017           # LC_CTYPE, which is also set at the beginning of the configure script.
37018           # Test for the AIX locale name.
37019           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37020             gt_cv_locale_ja=ja_JP
37021           else
37022             # Test for the locale name with explicit encoding suffix.
37023             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37024               gt_cv_locale_ja=ja_JP.EUC-JP
37025             else
37026               # Test for the HP-UX, OSF/1, NetBSD locale name.
37027               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37028                 gt_cv_locale_ja=ja_JP.eucJP
37029               else
37030                 # Test for the IRIX, FreeBSD locale name.
37031                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37032                   gt_cv_locale_ja=ja_JP.EUC
37033                 else
37034                   # Test for the Solaris 7 locale name.
37035                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37036                     gt_cv_locale_ja=ja
37037                   else
37038                     # Special test for NetBSD 1.6.
37039                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
37040                       gt_cv_locale_ja=ja_JP.eucJP
37041                     else
37042                       # None found.
37043                       gt_cv_locale_ja=none
37044                     fi
37045                   fi
37046                 fi
37047               fi
37048             fi
37049           fi
37050           ;;
37051       esac
37052     fi
37053     rm -fr conftest*
37054
37055 fi
37056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
37057 printf "%s\n" "$gt_cv_locale_ja" >&6; }
37058   LOCALE_JA=$gt_cv_locale_ja
37059
37060
37061
37062
37063
37064   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
37065 printf %s "checking for a transitional chinese locale... " >&6; }
37066 if test ${gt_cv_locale_zh_CN+y}
37067 then :
37068   printf %s "(cached) " >&6
37069 else
37070
37071     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37072 /* end confdefs.h.  */
37073
37074 #include <locale.h>
37075 #include <stdlib.h>
37076 #include <time.h>
37077 #if HAVE_LANGINFO_CODESET
37078 # include <langinfo.h>
37079 #endif
37080 #include <stdlib.h>
37081 #include <string.h>
37082 struct tm t;
37083 char buf[16];
37084 int main ()
37085 {
37086   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
37087      imitates locale dependent behaviour by looking at the environment
37088      variables, and all locales use the UTF-8 encoding.  */
37089 #if defined __BEOS__ || defined __HAIKU__
37090   return 1;
37091 #else
37092   /* Check whether the given locale name is recognized by the system.  */
37093 # if defined _WIN32 && !defined __CYGWIN__
37094   /* On native Windows, setlocale(category, "") looks at the system settings,
37095      not at the environment variables.  Also, when an encoding suffix such
37096      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37097      category of the locale to "C".  */
37098   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37099       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37100     return 1;
37101 # else
37102   if (setlocale (LC_ALL, "") == NULL) return 1;
37103 # endif
37104   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37105      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37106      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37107      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37108      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37109      some unit tests fail.
37110      On MirBSD 10, when an unsupported locale is specified, setlocale()
37111      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
37112 # if HAVE_LANGINFO_CODESET
37113   {
37114     const char *cs = nl_langinfo (CODESET);
37115     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37116         || strcmp (cs, "UTF-8") == 0)
37117       return 1;
37118   }
37119 # endif
37120 # ifdef __CYGWIN__
37121   /* On Cygwin, avoid locale names without encoding suffix, because the
37122      locale_charset() function relies on the encoding suffix.  Note that
37123      LC_ALL is set on the command line.  */
37124   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37125 # endif
37126   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37127      This excludes the UTF-8 encoding (except on MirBSD).  */
37128   {
37129     const char *p;
37130     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37131     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37132     for (p = buf; *p != '\0'; p++)
37133       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37134         return 1;
37135   }
37136   /* Check whether a typical GB18030 multibyte sequence is recognized as a
37137      single wide character.  This excludes the GB2312 and GBK encodings.  */
37138   if (mblen ("\203\062\332\066", 5) != 4)
37139     return 1;
37140   return 0;
37141 #endif
37142 }
37143
37144 _ACEOF
37145     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37146   (eval $ac_link) 2>&5
37147   ac_status=$?
37148   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37149   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37150       case "$host_os" in
37151         # Handle native Windows specially, because there setlocale() interprets
37152         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37153         # "fr" or "fra" as "French" or "French_France.1252",
37154         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37155         # "ja" as "Japanese" or "Japanese_Japan.932",
37156         # and similar.
37157         mingw*)
37158           # Test for the hypothetical native Windows locale name.
37159           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37160             gt_cv_locale_zh_CN=Chinese_China.54936
37161           else
37162             # None found.
37163             gt_cv_locale_zh_CN=none
37164           fi
37165           ;;
37166         solaris2.8)
37167           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
37168           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
37169           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
37170           gt_cv_locale_zh_CN=none
37171           ;;
37172         *)
37173           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37174           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37175           # configure script would override the LC_ALL setting. Likewise for
37176           # LC_CTYPE, which is also set at the beginning of the configure script.
37177           # Test for the locale name without encoding suffix.
37178           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37179             gt_cv_locale_zh_CN=zh_CN
37180           else
37181             # Test for the locale name with explicit encoding suffix.
37182             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37183               gt_cv_locale_zh_CN=zh_CN.GB18030
37184             else
37185               # None found.
37186               gt_cv_locale_zh_CN=none
37187             fi
37188           fi
37189           ;;
37190       esac
37191     else
37192       # If there was a link error, due to mblen(), the system is so old that
37193       # it certainly doesn't have a chinese locale.
37194       gt_cv_locale_zh_CN=none
37195     fi
37196     rm -fr conftest*
37197
37198 fi
37199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
37200 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
37201   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
37202
37203
37204
37205
37206
37207
37208   if test $ac_cv_func_wctob = no; then
37209     HAVE_WCTOB=0
37210     HAVE_DECL_WCTOB=0
37211   else
37212     HAVE_WCTOB=1
37213
37214
37215
37216          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
37217 printf %s "checking whether wctob works... " >&6; }
37218 if test ${gl_cv_func_wctob_works+y}
37219 then :
37220   printf %s "(cached) " >&6
37221 else
37222
37223                         case "$host_os" in
37224             # Guess no on Solaris <= 9 and Cygwin.
37225           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
37226             gl_cv_func_wctob_works="guessing no" ;;
37227             # Guess no on native Windows.
37228           mingw*)
37229             gl_cv_func_wctob_works="guessing no" ;;
37230             # Guess yes otherwise.
37231           *) gl_cv_func_wctob_works="guessing yes" ;;
37232         esac
37233         case "$host_os" in
37234           cygwin*)
37235             if test "$cross_compiling" = yes
37236 then :
37237   :
37238 else
37239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37240 /* end confdefs.h.  */
37241
37242 #include <locale.h>
37243 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37244    <wchar.h>.
37245    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37246    included before <wchar.h>.  */
37247 #include <stddef.h>
37248 #include <stdio.h>
37249 #include <time.h>
37250 #include <wchar.h>
37251
37252 register long global __asm__ ("%ebx");
37253
37254 int main ()
37255 {
37256   setlocale (LC_ALL, "en_US.UTF-8");
37257
37258   global = 0x12345678;
37259   if (wctob (0x00FC) != -1)
37260     return 1;
37261   if (global != 0x12345678)
37262     return 2;
37263   return 0;
37264 }
37265 _ACEOF
37266 if ac_fn_c_try_run "$LINENO"
37267 then :
37268   :
37269 else
37270   gl_cv_func_wctob_works=no
37271 fi
37272 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37273   conftest.$ac_objext conftest.beam conftest.$ac_ext
37274 fi
37275
37276             ;;
37277         esac
37278         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
37279           if test "$cross_compiling" = yes
37280 then :
37281   :
37282 else
37283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37284 /* end confdefs.h.  */
37285
37286 #include <locale.h>
37287 #include <string.h>
37288 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37289    <wchar.h>.
37290    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37291    included before <wchar.h>.  */
37292 #include <stddef.h>
37293 #include <stdio.h>
37294 #include <time.h>
37295 #include <wchar.h>
37296 int main ()
37297 {
37298   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
37299     {
37300       wchar_t wc;
37301
37302       if (mbtowc (&wc, "\374", 1) == 1)
37303         if (wctob (wc) != (unsigned char) '\374')
37304           return 1;
37305     }
37306   return 0;
37307 }
37308 _ACEOF
37309 if ac_fn_c_try_run "$LINENO"
37310 then :
37311   gl_cv_func_wctob_works=yes
37312 else
37313   gl_cv_func_wctob_works=no
37314 fi
37315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37316   conftest.$ac_objext conftest.beam conftest.$ac_ext
37317 fi
37318
37319         fi
37320
37321 fi
37322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
37323 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
37324     case "$gl_cv_func_wctob_works" in
37325       *yes) ;;
37326       *) REPLACE_WCTOB=1 ;;
37327     esac
37328     if test $REPLACE_WCTOB = 0; then
37329
37330             ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
37331 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37332    <wchar.h>.
37333    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
37334    before <wchar.h>.  */
37335 #include <stddef.h>
37336 #include <stdio.h>
37337 #include <time.h>
37338 #include <wchar.h>
37339
37340 "
37341 if test "x$ac_cv_have_decl_wctob" = xyes
37342 then :
37343   ac_have_decl=1
37344 else
37345   ac_have_decl=0
37346 fi
37347
37348 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
37349
37350       if test $ac_cv_have_decl_wctob != yes; then
37351         HAVE_DECL_WCTOB=0
37352       fi
37353     fi
37354   fi
37355
37356   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
37357
37358
37359
37360
37361
37362
37363
37364
37365   gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
37366
37367
37368   :
37369
37370   fi
37371
37372
37373
37374
37375
37376     if test "$GNULIB_WCTOB" != 1; then
37377         if test "$GNULIB_WCTOB" = 0; then
37378       GNULIB_WCTOB=$gl_module_indicator_condition
37379     else
37380       GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
37381     fi
37382   fi
37383
37384
37385
37386
37387
37388 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
37389
37390
37391
37392
37393
37394
37395   if false; then
37396     REPLACE_WCTOMB=1
37397   fi
37398
37399   if test $REPLACE_WCTOMB = 1; then
37400
37401
37402
37403
37404
37405
37406
37407
37408   gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
37409
37410
37411   :
37412
37413   fi
37414
37415
37416
37417
37418
37419     if test "$GNULIB_WCTOMB" != 1; then
37420         if test "$GNULIB_WCTOMB" = 0; then
37421       GNULIB_WCTOMB=$gl_module_indicator_condition
37422     else
37423       GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
37424     fi
37425   fi
37426
37427
37428
37429
37430
37431 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445   LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
37446
37447   LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
37448
37449   LIBTESTS_LIBDEPS="$gltests_libdeps"
37450
37451
37452
37453 # Check whether --enable-gcc-warnings was given.
37454 if test ${enable_gcc_warnings+y}
37455 then :
37456   enableval=$enable_gcc_warnings; case $enableval in
37457      yes|no) ;;
37458      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
37459    esac
37460    gl_gcc_warnings=$enableval
37461 else
37462   if test -d "$srcdir"/.git; then
37463      gl_gcc_warnings=yes
37464    else
37465      gl_gcc_warnings=no
37466    fi
37467
37468 fi
37469
37470
37471 if test "$gl_gcc_warnings" = yes; then
37472
37473   ac_ext=c
37474 ac_cpp='$CPP $CPPFLAGS'
37475 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37476 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37477 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37478
37479
37480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
37481 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
37482 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
37483 then :
37484   printf %s "(cached) " >&6
37485 else
37486
37487   gl_save_compiler_FLAGS="$CFLAGS"
37488   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
37489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37490 /* end confdefs.h.  */
37491
37492 int
37493 main (void)
37494 {
37495
37496   ;
37497   return 0;
37498 }
37499 _ACEOF
37500 if ac_fn_c_try_link "$LINENO"
37501 then :
37502   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
37503 else
37504   gl_cv_warn_c__Werror__Wunknown_warning_option=no
37505 fi
37506 rm -f core conftest.err conftest.$ac_objext \
37507     conftest$ac_exeext conftest.$ac_ext
37508   CFLAGS="$gl_save_compiler_FLAGS"
37509
37510 fi
37511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
37512 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
37513 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
37514 then :
37515   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
37516 else
37517   gl_unknown_warnings_are_errors=
37518 fi
37519
37520   ac_ext=c
37521 ac_cpp='$CPP $CPPFLAGS'
37522 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37523 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37524 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37525
37526
37527
37528
37529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
37530 printf %s "checking whether C compiler handles -Werror... " >&6; }
37531 if test ${gl_cv_warn_c__Werror+y}
37532 then :
37533   printf %s "(cached) " >&6
37534 else
37535
37536   gl_save_compiler_FLAGS="$CFLAGS"
37537   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
37538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37539 /* end confdefs.h.  */
37540
37541 int
37542 main (void)
37543 {
37544
37545   ;
37546   return 0;
37547 }
37548 _ACEOF
37549 if ac_fn_c_try_link "$LINENO"
37550 then :
37551   gl_cv_warn_c__Werror=yes
37552 else
37553   gl_cv_warn_c__Werror=no
37554 fi
37555 rm -f core conftest.err conftest.$ac_objext \
37556     conftest$ac_exeext conftest.$ac_ext
37557   CFLAGS="$gl_save_compiler_FLAGS"
37558
37559 fi
37560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
37561 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
37562 if test "x$gl_cv_warn_c__Werror" = xyes
37563 then :
37564   as_fn_append WERROR_CFLAGS " -Werror"
37565 fi
37566
37567
37568
37569
37570   nw=
37571   # This, $nw, is the list of warnings we disable.
37572   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
37573   nw="$nw -Waggregate-return"       # anachronistic
37574   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
37575   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
37576   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
37577   nw="$nw -Wtraditional"            # Warns on #elif which we use often
37578   nw="$nw -Wcast-qual"              # Too many warnings for now
37579   nw="$nw -Wconversion"             # Too many warnings for now
37580   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
37581   nw="$nw -Wsign-conversion"        # Too many warnings for now
37582   nw="$nw -Wtraditional-conversion" # Too many warnings for now
37583   nw="$nw -Wunreachable-code"       # Too many warnings for now
37584   nw="$nw -Wpadded"                 # Our structs are not padded
37585   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
37586   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
37587   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
37588   nw="$nw -Wvla"                    # warnings in gettext.h
37589   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
37590   nw="$nw -Wswitch-enum"            # Too many warnings for now
37591   nw="$nw -Wswitch-default"         # Too many warnings for now
37592   nw="$nw -Wstack-protector"        # not worth working around
37593   # things I might fix soon:
37594   nw="$nw -Wfloat-equal"            # sort.c, seq.c
37595   nw="$nw -Wmissing-format-attribute" # copy.c
37596   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
37597   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
37598   nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
37599   nw="$nw -Wformat-extra-args"      # sdiff.c
37600   # ?? -Wstrict-overflow
37601
37602
37603   ac_ext=c
37604 ac_cpp='$CPP $CPPFLAGS'
37605 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37606 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37607 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37608
37609
37610
37611   if test -n "$GCC"; then
37612
37613             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
37614 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
37615 if test ${gl_cv_cc_nomfi_supported+y}
37616 then :
37617   printf %s "(cached) " >&6
37618 else
37619   gl_save_CFLAGS="$CFLAGS"
37620        CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
37621        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37622 /* end confdefs.h.  */
37623
37624 int
37625 main (void)
37626 {
37627
37628   ;
37629   return 0;
37630 }
37631 _ACEOF
37632 if ac_fn_c_try_compile "$LINENO"
37633 then :
37634   gl_cv_cc_nomfi_supported=yes
37635 else
37636   gl_cv_cc_nomfi_supported=no
37637 fi
37638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37639        CFLAGS="$gl_save_CFLAGS"
37640
37641 fi
37642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
37643 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
37644
37645     if test "$gl_cv_cc_nomfi_supported" = yes; then
37646                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
37647 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
37648 if test ${gl_cv_cc_nomfi_needed+y}
37649 then :
37650   printf %s "(cached) " >&6
37651 else
37652   gl_save_CFLAGS="$CFLAGS"
37653          CFLAGS="$CFLAGS -W -Werror"
37654          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37655 /* end confdefs.h.  */
37656 int f (void)
37657                 {
37658                   typedef struct { int a; int b; } s_t;
37659                   s_t s1 = { 0, };
37660                   return s1.b;
37661                 }
37662
37663 int
37664 main (void)
37665 {
37666
37667   ;
37668   return 0;
37669 }
37670 _ACEOF
37671 if ac_fn_c_try_compile "$LINENO"
37672 then :
37673   gl_cv_cc_nomfi_needed=no
37674 else
37675   gl_cv_cc_nomfi_needed=yes
37676 fi
37677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37678          CFLAGS="$gl_save_CFLAGS"
37679
37680 fi
37681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
37682 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
37683     fi
37684
37685                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
37686 printf %s "checking whether -Wuninitialized is supported... " >&6; }
37687 if test ${gl_cv_cc_uninitialized_supported+y}
37688 then :
37689   printf %s "(cached) " >&6
37690 else
37691   gl_save_CFLAGS="$CFLAGS"
37692        CFLAGS="$CFLAGS -Werror -Wuninitialized"
37693        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37694 /* end confdefs.h.  */
37695
37696 int
37697 main (void)
37698 {
37699
37700   ;
37701   return 0;
37702 }
37703 _ACEOF
37704 if ac_fn_c_try_compile "$LINENO"
37705 then :
37706   gl_cv_cc_uninitialized_supported=yes
37707 else
37708   gl_cv_cc_uninitialized_supported=no
37709 fi
37710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37711        CFLAGS="$gl_save_CFLAGS"
37712
37713 fi
37714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
37715 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
37716
37717   fi
37718
37719   # List all gcc warning categories.
37720   # To compare this list to your installed GCC's, run this Bash command:
37721   #
37722   # comm -3 \
37723   #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
37724   #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
37725   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
37726
37727   gl_manywarn_set=
37728   for gl_manywarn_item in -fno-common \
37729     -W \
37730     -Waddress \
37731     -Waggressive-loop-optimizations \
37732     -Wall \
37733     -Wattribute-alias \
37734     -Wattributes \
37735     -Wbad-function-cast \
37736     -Wbool-compare \
37737     -Wbool-operation \
37738     -Wbuiltin-declaration-mismatch \
37739     -Wbuiltin-macro-redefined \
37740     -Wcast-align \
37741     -Wcast-align=strict \
37742     -Wcast-function-type \
37743     -Wchar-subscripts \
37744     -Wclobbered \
37745     -Wcomment \
37746     -Wcomments \
37747     -Wcoverage-mismatch \
37748     -Wcpp \
37749     -Wdangling-else \
37750     -Wdate-time \
37751     -Wdeprecated \
37752     -Wdeprecated-declarations \
37753     -Wdesignated-init \
37754     -Wdisabled-optimization \
37755     -Wdiscarded-array-qualifiers \
37756     -Wdiscarded-qualifiers \
37757     -Wdiv-by-zero \
37758     -Wdouble-promotion \
37759     -Wduplicated-branches \
37760     -Wduplicated-cond \
37761     -Wduplicate-decl-specifier \
37762     -Wempty-body \
37763     -Wendif-labels \
37764     -Wenum-compare \
37765     -Wexpansion-to-defined \
37766     -Wextra \
37767     -Wformat-contains-nul \
37768     -Wformat-extra-args \
37769     -Wformat-nonliteral \
37770     -Wformat-security \
37771     -Wformat-signedness \
37772     -Wformat-y2k \
37773     -Wformat-zero-length \
37774     -Wframe-address \
37775     -Wfree-nonheap-object \
37776     -Whsa \
37777     -Wif-not-aligned \
37778     -Wignored-attributes \
37779     -Wignored-qualifiers \
37780     -Wimplicit \
37781     -Wimplicit-function-declaration \
37782     -Wimplicit-int \
37783     -Wincompatible-pointer-types \
37784     -Winit-self \
37785     -Winline \
37786     -Wint-conversion \
37787     -Wint-in-bool-context \
37788     -Wint-to-pointer-cast \
37789     -Winvalid-memory-model \
37790     -Winvalid-pch \
37791     -Wlogical-not-parentheses \
37792     -Wlogical-op \
37793     -Wmain \
37794     -Wmaybe-uninitialized \
37795     -Wmemset-elt-size \
37796     -Wmemset-transposed-args \
37797     -Wmisleading-indentation \
37798     -Wmissing-attributes \
37799     -Wmissing-braces \
37800     -Wmissing-declarations \
37801     -Wmissing-field-initializers \
37802     -Wmissing-include-dirs \
37803     -Wmissing-parameter-type \
37804     -Wmissing-prototypes \
37805     -Wmultichar \
37806     -Wmultistatement-macros \
37807     -Wnarrowing \
37808     -Wnested-externs \
37809     -Wnonnull \
37810     -Wnonnull-compare \
37811     -Wnull-dereference \
37812     -Wodr \
37813     -Wold-style-declaration \
37814     -Wold-style-definition \
37815     -Wopenmp-simd \
37816     -Woverflow \
37817     -Woverlength-strings \
37818     -Woverride-init \
37819     -Wpacked \
37820     -Wpacked-bitfield-compat \
37821     -Wpacked-not-aligned \
37822     -Wparentheses \
37823     -Wpointer-arith \
37824     -Wpointer-compare \
37825     -Wpointer-sign \
37826     -Wpointer-to-int-cast \
37827     -Wpragmas \
37828     -Wpsabi \
37829     -Wrestrict \
37830     -Wreturn-local-addr \
37831     -Wreturn-type \
37832     -Wscalar-storage-order \
37833     -Wsequence-point \
37834     -Wshadow \
37835     -Wshift-count-negative \
37836     -Wshift-count-overflow \
37837     -Wshift-negative-value \
37838     -Wsizeof-array-argument \
37839     -Wsizeof-pointer-div \
37840     -Wsizeof-pointer-memaccess \
37841     -Wstack-protector \
37842     -Wstrict-aliasing \
37843     -Wstrict-overflow \
37844     -Wstrict-prototypes \
37845     -Wstringop-truncation \
37846     -Wsuggest-attribute=cold \
37847     -Wsuggest-attribute=const \
37848     -Wsuggest-attribute=format \
37849     -Wsuggest-attribute=malloc \
37850     -Wsuggest-attribute=noreturn \
37851     -Wsuggest-attribute=pure \
37852     -Wsuggest-final-methods \
37853     -Wsuggest-final-types \
37854     -Wswitch \
37855     -Wswitch-bool \
37856     -Wswitch-unreachable \
37857     -Wsync-nand \
37858     -Wsystem-headers \
37859     -Wtautological-compare \
37860     -Wtrampolines \
37861     -Wtrigraphs \
37862     -Wtype-limits \
37863     -Wuninitialized \
37864     -Wunknown-pragmas \
37865     -Wunsafe-loop-optimizations \
37866     -Wunused \
37867     -Wunused-but-set-parameter \
37868     -Wunused-but-set-variable \
37869     -Wunused-function \
37870     -Wunused-label \
37871     -Wunused-local-typedefs \
37872     -Wunused-macros \
37873     -Wunused-parameter \
37874     -Wunused-result \
37875     -Wunused-value \
37876     -Wunused-variable \
37877     -Wvarargs \
37878     -Wvariadic-macros \
37879     -Wvector-operation-performance \
37880     -Wvla \
37881     -Wvolatile-register-var \
37882     -Wwrite-strings \
37883     \
37884     ; do
37885     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
37886   done
37887
37888   # gcc --help=warnings outputs an unusual form for these options; list
37889   # them here so that the above 'comm' command doesn't report a false match.
37890   # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
37891   # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
37892   # the only platforms where it does not fit in a long, so make that
37893   # a special case.
37894   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
37895 printf %s "checking max safe object size... " >&6; }
37896   if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
37897      ? -1
37898      : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max"        "#include <limits.h>
37899       #include <stddef.h>
37900       #include <stdint.h>
37901     "
37902 then :
37903
37904 else
37905   gl_alloc_max=2147483647
37906 fi
37907
37908   case $gl_alloc_max in
37909     -1) gl_alloc_max=9223372036854775807;;
37910   esac
37911   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
37912 printf "%s\n" "$gl_alloc_max" >&6; }
37913   gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
37914   gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
37915   gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
37916   gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
37917   gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
37918   gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
37919   gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
37920   gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
37921   gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
37922   gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
37923
37924   # These are needed for older GCC versions.
37925   if test -n "$GCC"; then
37926     case `($CC --version) 2>/dev/null` in
37927       'gcc (GCC) '[0-3].* | \
37928       'gcc (GCC) '4.[0-7].*)
37929         gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
37930         gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
37931           ;;
37932     esac
37933   fi
37934
37935   # Disable specific options as needed.
37936   if test "$gl_cv_cc_nomfi_needed" = yes; then
37937     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
37938   fi
37939
37940   if test "$gl_cv_cc_uninitialized_supported" = no; then
37941     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
37942   fi
37943
37944   ws=$gl_manywarn_set
37945
37946   ac_ext=c
37947 ac_cpp='$CPP $CPPFLAGS'
37948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37951
37952
37953
37954   gl_warn_set=
37955   set x $ws; shift
37956   for gl_warn_item
37957   do
37958     case " $nw " in
37959       *" $gl_warn_item "*)
37960         ;;
37961       *)
37962         gl_warn_set="$gl_warn_set $gl_warn_item"
37963         ;;
37964     esac
37965   done
37966   ws=$gl_warn_set
37967
37968   for w in $ws; do
37969
37970
37971 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
37972 gl_positive="$w"
37973 case $gl_positive in
37974   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
37975 esac
37976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
37977 printf %s "checking whether C compiler handles $w... " >&6; }
37978 if eval test \${$as_gl_Warn+y}
37979 then :
37980   printf %s "(cached) " >&6
37981 else
37982
37983   gl_save_compiler_FLAGS="$CFLAGS"
37984   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
37985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37986 /* end confdefs.h.  */
37987
37988 int
37989 main (void)
37990 {
37991
37992   ;
37993   return 0;
37994 }
37995 _ACEOF
37996 if ac_fn_c_try_link "$LINENO"
37997 then :
37998   eval "$as_gl_Warn=yes"
37999 else
38000   eval "$as_gl_Warn=no"
38001 fi
38002 rm -f core conftest.err conftest.$ac_objext \
38003     conftest$ac_exeext conftest.$ac_ext
38004   CFLAGS="$gl_save_compiler_FLAGS"
38005
38006 fi
38007 eval ac_res=\$$as_gl_Warn
38008                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38009 printf "%s\n" "$ac_res" >&6; }
38010 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
38011 then :
38012   as_fn_append WARN_CFLAGS " $w"
38013 fi
38014
38015
38016   done
38017
38018
38019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
38020 printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
38021 if test ${gl_cv_warn_c__Wno_missing_field_initializers+y}
38022 then :
38023   printf %s "(cached) " >&6
38024 else
38025
38026   gl_save_compiler_FLAGS="$CFLAGS"
38027   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
38028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38029 /* end confdefs.h.  */
38030
38031 int
38032 main (void)
38033 {
38034
38035   ;
38036   return 0;
38037 }
38038 _ACEOF
38039 if ac_fn_c_try_link "$LINENO"
38040 then :
38041   gl_cv_warn_c__Wno_missing_field_initializers=yes
38042 else
38043   gl_cv_warn_c__Wno_missing_field_initializers=no
38044 fi
38045 rm -f core conftest.err conftest.$ac_objext \
38046     conftest$ac_exeext conftest.$ac_ext
38047   CFLAGS="$gl_save_compiler_FLAGS"
38048
38049 fi
38050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
38051 printf "%s\n" "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
38052 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes
38053 then :
38054   as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
38055 fi
38056
38057  # We need this one
38058
38059
38060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
38061 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
38062 if test ${gl_cv_warn_c__Wno_sign_compare+y}
38063 then :
38064   printf %s "(cached) " >&6
38065 else
38066
38067   gl_save_compiler_FLAGS="$CFLAGS"
38068   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
38069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38070 /* end confdefs.h.  */
38071
38072 int
38073 main (void)
38074 {
38075
38076   ;
38077   return 0;
38078 }
38079 _ACEOF
38080 if ac_fn_c_try_link "$LINENO"
38081 then :
38082   gl_cv_warn_c__Wno_sign_compare=yes
38083 else
38084   gl_cv_warn_c__Wno_sign_compare=no
38085 fi
38086 rm -f core conftest.err conftest.$ac_objext \
38087     conftest$ac_exeext conftest.$ac_ext
38088   CFLAGS="$gl_save_compiler_FLAGS"
38089
38090 fi
38091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
38092 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
38093 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
38094 then :
38095   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
38096 fi
38097
38098      # Too many warnings for now
38099
38100
38101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
38102 printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
38103 if test ${gl_cv_warn_c__Wno_pointer_sign+y}
38104 then :
38105   printf %s "(cached) " >&6
38106 else
38107
38108   gl_save_compiler_FLAGS="$CFLAGS"
38109   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
38110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38111 /* end confdefs.h.  */
38112
38113 int
38114 main (void)
38115 {
38116
38117   ;
38118   return 0;
38119 }
38120 _ACEOF
38121 if ac_fn_c_try_link "$LINENO"
38122 then :
38123   gl_cv_warn_c__Wno_pointer_sign=yes
38124 else
38125   gl_cv_warn_c__Wno_pointer_sign=no
38126 fi
38127 rm -f core conftest.err conftest.$ac_objext \
38128     conftest$ac_exeext conftest.$ac_ext
38129   CFLAGS="$gl_save_compiler_FLAGS"
38130
38131 fi
38132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
38133 printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
38134 if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes
38135 then :
38136   as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
38137 fi
38138
38139      # Too many warnings for now
38140
38141
38142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
38143 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
38144 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
38145 then :
38146   printf %s "(cached) " >&6
38147 else
38148
38149   gl_save_compiler_FLAGS="$CFLAGS"
38150   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
38151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38152 /* end confdefs.h.  */
38153
38154 int
38155 main (void)
38156 {
38157
38158   ;
38159   return 0;
38160 }
38161 _ACEOF
38162 if ac_fn_c_try_link "$LINENO"
38163 then :
38164   gl_cv_warn_c__Wno_unused_parameter=yes
38165 else
38166   gl_cv_warn_c__Wno_unused_parameter=no
38167 fi
38168 rm -f core conftest.err conftest.$ac_objext \
38169     conftest$ac_exeext conftest.$ac_ext
38170   CFLAGS="$gl_save_compiler_FLAGS"
38171
38172 fi
38173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
38174 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
38175 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
38176 then :
38177   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
38178 fi
38179
38180  # Too many warnings for now
38181
38182
38183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
38184 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
38185 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
38186 then :
38187   printf %s "(cached) " >&6
38188 else
38189
38190   gl_save_compiler_FLAGS="$CFLAGS"
38191   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
38192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38193 /* end confdefs.h.  */
38194
38195 int
38196 main (void)
38197 {
38198
38199   ;
38200   return 0;
38201 }
38202 _ACEOF
38203 if ac_fn_c_try_link "$LINENO"
38204 then :
38205   gl_cv_warn_c__Wno_format_nonliteral=yes
38206 else
38207   gl_cv_warn_c__Wno_format_nonliteral=no
38208 fi
38209 rm -f core conftest.err conftest.$ac_objext \
38210     conftest$ac_exeext conftest.$ac_ext
38211   CFLAGS="$gl_save_compiler_FLAGS"
38212
38213 fi
38214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
38215 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
38216 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
38217 then :
38218   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
38219 fi
38220
38221
38222
38223
38224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-cast-function-type" >&5
38225 printf %s "checking whether C compiler handles -Wno-cast-function-type... " >&6; }
38226 if test ${gl_cv_warn_c__Wno_cast_function_type+y}
38227 then :
38228   printf %s "(cached) " >&6
38229 else
38230
38231   gl_save_compiler_FLAGS="$CFLAGS"
38232   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wcast-function-type"
38233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38234 /* end confdefs.h.  */
38235
38236 int
38237 main (void)
38238 {
38239
38240   ;
38241   return 0;
38242 }
38243 _ACEOF
38244 if ac_fn_c_try_link "$LINENO"
38245 then :
38246   gl_cv_warn_c__Wno_cast_function_type=yes
38247 else
38248   gl_cv_warn_c__Wno_cast_function_type=no
38249 fi
38250 rm -f core conftest.err conftest.$ac_objext \
38251     conftest$ac_exeext conftest.$ac_ext
38252   CFLAGS="$gl_save_compiler_FLAGS"
38253
38254 fi
38255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_cast_function_type" >&5
38256 printf "%s\n" "$gl_cv_warn_c__Wno_cast_function_type" >&6; }
38257 if test "x$gl_cv_warn_c__Wno_cast_function_type" = xyes
38258 then :
38259   as_fn_append WARN_CFLAGS " -Wno-cast-function-type"
38260 fi
38261
38262  # For sig-handler.h:47
38263
38264   # In spite of excluding -Wlogical-op above, it is enabled, as of
38265   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
38266
38267
38268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
38269 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
38270 if test ${gl_cv_warn_c__Wno_logical_op+y}
38271 then :
38272   printf %s "(cached) " >&6
38273 else
38274
38275   gl_save_compiler_FLAGS="$CFLAGS"
38276   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
38277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38278 /* end confdefs.h.  */
38279
38280 int
38281 main (void)
38282 {
38283
38284   ;
38285   return 0;
38286 }
38287 _ACEOF
38288 if ac_fn_c_try_link "$LINENO"
38289 then :
38290   gl_cv_warn_c__Wno_logical_op=yes
38291 else
38292   gl_cv_warn_c__Wno_logical_op=no
38293 fi
38294 rm -f core conftest.err conftest.$ac_objext \
38295     conftest$ac_exeext conftest.$ac_ext
38296   CFLAGS="$gl_save_compiler_FLAGS"
38297
38298 fi
38299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
38300 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
38301 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
38302 then :
38303   as_fn_append WARN_CFLAGS " -Wno-logical-op"
38304 fi
38305
38306
38307
38308
38309
38310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
38311 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
38312 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
38313 then :
38314   printf %s "(cached) " >&6
38315 else
38316
38317   gl_save_compiler_FLAGS="$CFLAGS"
38318   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
38319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38320 /* end confdefs.h.  */
38321
38322 int
38323 main (void)
38324 {
38325
38326   ;
38327   return 0;
38328 }
38329 _ACEOF
38330 if ac_fn_c_try_link "$LINENO"
38331 then :
38332   gl_cv_warn_c__fdiagnostics_show_option=yes
38333 else
38334   gl_cv_warn_c__fdiagnostics_show_option=no
38335 fi
38336 rm -f core conftest.err conftest.$ac_objext \
38337     conftest$ac_exeext conftest.$ac_ext
38338   CFLAGS="$gl_save_compiler_FLAGS"
38339
38340 fi
38341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
38342 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
38343 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
38344 then :
38345   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
38346 fi
38347
38348
38349
38350
38351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
38352 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
38353 if test ${gl_cv_warn_c__funit_at_a_time+y}
38354 then :
38355   printf %s "(cached) " >&6
38356 else
38357
38358   gl_save_compiler_FLAGS="$CFLAGS"
38359   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
38360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38361 /* end confdefs.h.  */
38362
38363 int
38364 main (void)
38365 {
38366
38367   ;
38368   return 0;
38369 }
38370 _ACEOF
38371 if ac_fn_c_try_link "$LINENO"
38372 then :
38373   gl_cv_warn_c__funit_at_a_time=yes
38374 else
38375   gl_cv_warn_c__funit_at_a_time=no
38376 fi
38377 rm -f core conftest.err conftest.$ac_objext \
38378     conftest$ac_exeext conftest.$ac_ext
38379   CFLAGS="$gl_save_compiler_FLAGS"
38380
38381 fi
38382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
38383 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
38384 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
38385 then :
38386   as_fn_append WARN_CFLAGS " -funit-at-a-time"
38387 fi
38388
38389
38390
38391
38392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
38393 printf %s "checking whether C compiler handles -fno-common... " >&6; }
38394 if test ${gl_cv_warn_c__fno_common+y}
38395 then :
38396   printf %s "(cached) " >&6
38397 else
38398
38399   gl_save_compiler_FLAGS="$CFLAGS"
38400   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
38401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38402 /* end confdefs.h.  */
38403
38404 int
38405 main (void)
38406 {
38407
38408   ;
38409   return 0;
38410 }
38411 _ACEOF
38412 if ac_fn_c_try_link "$LINENO"
38413 then :
38414   gl_cv_warn_c__fno_common=yes
38415 else
38416   gl_cv_warn_c__fno_common=no
38417 fi
38418 rm -f core conftest.err conftest.$ac_objext \
38419     conftest$ac_exeext conftest.$ac_ext
38420   CFLAGS="$gl_save_compiler_FLAGS"
38421
38422 fi
38423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
38424 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
38425 if test "x$gl_cv_warn_c__fno_common" = xyes
38426 then :
38427   as_fn_append WARN_CFLAGS " -fno-common"
38428 fi
38429
38430
38431
38432
38433
38434
38435 printf "%s\n" "#define lint 1" >>confdefs.h
38436
38437
38438 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
38439
38440
38441 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
38442
38443
38444   # We use a slightly smaller set of warning options for lib/.
38445   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
38446   nw=
38447   nw="$nw -Wunused-macros"
38448   nw="$nw -Wmissing-prototypes"
38449   nw="$nw -Wold-style-definition"
38450   nw="$nw -Wsuggest-attribute=pure"
38451
38452   gl_warn_set=
38453   set x $WARN_CFLAGS; shift
38454   for gl_warn_item
38455   do
38456     case " $nw " in
38457       *" $gl_warn_item "*)
38458         ;;
38459       *)
38460         gl_warn_set="$gl_warn_set $gl_warn_item"
38461         ;;
38462     esac
38463   done
38464   GNULIB_WARN_CFLAGS=$gl_warn_set
38465
38466
38467 fi
38468
38469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
38470 printf %s "checking for inline... " >&6; }
38471 if test ${ac_cv_c_inline+y}
38472 then :
38473   printf %s "(cached) " >&6
38474 else
38475   ac_cv_c_inline=no
38476 for ac_kw in inline __inline__ __inline; do
38477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38478 /* end confdefs.h.  */
38479 #ifndef __cplusplus
38480 typedef int foo_t;
38481 static $ac_kw foo_t static_foo () {return 0; }
38482 $ac_kw foo_t foo () {return 0; }
38483 #endif
38484
38485 _ACEOF
38486 if ac_fn_c_try_compile "$LINENO"
38487 then :
38488   ac_cv_c_inline=$ac_kw
38489 fi
38490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38491   test "$ac_cv_c_inline" != no && break
38492 done
38493
38494 fi
38495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
38496 printf "%s\n" "$ac_cv_c_inline" >&6; }
38497
38498 case $ac_cv_c_inline in
38499   inline | yes) ;;
38500   *)
38501     case $ac_cv_c_inline in
38502       no) ac_val=;;
38503       *) ac_val=$ac_cv_c_inline;;
38504     esac
38505     cat >>confdefs.h <<_ACEOF
38506 #ifndef __cplusplus
38507 #define inline $ac_val
38508 #endif
38509 _ACEOF
38510     ;;
38511 esac
38512
38513
38514   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
38515 printf %s "checking for variable-length arrays... " >&6; }
38516 if test ${ac_cv_c_vararrays+y}
38517 then :
38518   printf %s "(cached) " >&6
38519 else
38520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38521 /* end confdefs.h.  */
38522 #ifdef __STDC_NO_VLA__
38523         defined
38524         #endif
38525
38526 _ACEOF
38527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38528   $EGREP "defined" >/dev/null 2>&1
38529 then :
38530   ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
38531 else
38532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38533 /* end confdefs.h.  */
38534 /* Test for VLA support.  This test is partly inspired
38535                   from examples in the C standard.  Use at least two VLA
38536                   functions to detect the GCC 3.4.3 bug described in:
38537                   https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
38538                   */
38539                #ifdef __STDC_NO_VLA__
38540                 syntax error;
38541                #else
38542                  extern int n;
38543                  int B[100];
38544                  int fvla (int m, int C[m][m]);
38545
38546                  int
38547                  simple (int count, int all[static count])
38548                  {
38549                    return all[count - 1];
38550                  }
38551
38552                  int
38553                  fvla (int m, int C[m][m])
38554                  {
38555                    typedef int VLA[m][m];
38556                    VLA x;
38557                    int D[m];
38558                    static int (*q)[m] = &B;
38559                    int (*s)[n] = q;
38560                    return C && &x[0][0] == &D[0] && &D[0] == s[0];
38561                  }
38562                #endif
38563
38564 int
38565 main (void)
38566 {
38567
38568   ;
38569   return 0;
38570 }
38571 _ACEOF
38572 if ac_fn_c_try_compile "$LINENO"
38573 then :
38574   ac_cv_c_vararrays=yes
38575 else
38576   ac_cv_c_vararrays=no
38577 fi
38578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38579 fi
38580 rm -rf conftest*
38581
38582 fi
38583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
38584 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
38585   if test "$ac_cv_c_vararrays" = yes; then
38586
38587 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
38588
38589   elif test "$ac_cv_c_vararrays" = no; then
38590
38591 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
38592
38593   fi
38594
38595
38596
38597 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
38598
38599
38600 # Extract the first word of "pr", so it can be a program name with args.
38601 set dummy pr; ac_word=$2
38602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38603 printf %s "checking for $ac_word... " >&6; }
38604 if test ${ac_cv_path_PR_PROGRAM+y}
38605 then :
38606   printf %s "(cached) " >&6
38607 else
38608   case $PR_PROGRAM in
38609   [\\/]* | ?:[\\/]*)
38610   ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
38611   ;;
38612   *)
38613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38614 for as_dir in $PATH
38615 do
38616   IFS=$as_save_IFS
38617   case $as_dir in #(((
38618     '') as_dir=./ ;;
38619     */) ;;
38620     *) as_dir=$as_dir/ ;;
38621   esac
38622     for ac_exec_ext in '' $ac_executable_extensions; do
38623   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
38624     ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
38625     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
38626     break 2
38627   fi
38628 done
38629   done
38630 IFS=$as_save_IFS
38631
38632   test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
38633   ;;
38634 esac
38635 fi
38636 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
38637 if test -n "$PR_PROGRAM"; then
38638   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
38639 printf "%s\n" "$PR_PROGRAM" >&6; }
38640 else
38641   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38642 printf "%s\n" "no" >&6; }
38643 fi
38644
38645
38646
38647 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
38648
38649
38650 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
38651 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
38652 then :
38653
38654 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
38655
38656
38657 fi
38658
38659 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
38660 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
38661 then :
38662
38663 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
38664
38665
38666 fi
38667
38668 ac_header_dirent=no
38669 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
38670   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
38671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
38672 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
38673 if eval test \${$as_ac_Header+y}
38674 then :
38675   printf %s "(cached) " >&6
38676 else
38677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38678 /* end confdefs.h.  */
38679 #include <sys/types.h>
38680 #include <$ac_hdr>
38681
38682 int
38683 main (void)
38684 {
38685 if ((DIR *) 0)
38686 return 0;
38687   ;
38688   return 0;
38689 }
38690 _ACEOF
38691 if ac_fn_c_try_compile "$LINENO"
38692 then :
38693   eval "$as_ac_Header=yes"
38694 else
38695   eval "$as_ac_Header=no"
38696 fi
38697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38698 fi
38699 eval ac_res=\$$as_ac_Header
38700                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38701 printf "%s\n" "$ac_res" >&6; }
38702 if eval test \"x\$"$as_ac_Header"\" = x"yes"
38703 then :
38704   cat >>confdefs.h <<_ACEOF
38705 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
38706 _ACEOF
38707
38708 ac_header_dirent=$ac_hdr; break
38709 fi
38710
38711 done
38712 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
38713 if test $ac_header_dirent = dirent.h; then
38714   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
38715 printf %s "checking for library containing opendir... " >&6; }
38716 if test ${ac_cv_search_opendir+y}
38717 then :
38718   printf %s "(cached) " >&6
38719 else
38720   ac_func_search_save_LIBS=$LIBS
38721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38722 /* end confdefs.h.  */
38723
38724 /* Override any GCC internal prototype to avoid an error.
38725    Use char because int might match the return type of a GCC
38726    builtin and then its argument prototype would still apply.  */
38727 #ifdef __cplusplus
38728 extern "C"
38729 #endif
38730 char opendir ();
38731 int
38732 main (void)
38733 {
38734 return opendir ();
38735   ;
38736   return 0;
38737 }
38738 _ACEOF
38739 for ac_lib in '' dir
38740 do
38741   if test -z "$ac_lib"; then
38742     ac_res="none required"
38743   else
38744     ac_res=-l$ac_lib
38745     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38746   fi
38747   if ac_fn_c_try_link "$LINENO"
38748 then :
38749   ac_cv_search_opendir=$ac_res
38750 fi
38751 rm -f core conftest.err conftest.$ac_objext \
38752     conftest$ac_exeext
38753   if test ${ac_cv_search_opendir+y}
38754 then :
38755   break
38756 fi
38757 done
38758 if test ${ac_cv_search_opendir+y}
38759 then :
38760
38761 else
38762   ac_cv_search_opendir=no
38763 fi
38764 rm conftest.$ac_ext
38765 LIBS=$ac_func_search_save_LIBS
38766 fi
38767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
38768 printf "%s\n" "$ac_cv_search_opendir" >&6; }
38769 ac_res=$ac_cv_search_opendir
38770 if test "$ac_res" != no
38771 then :
38772   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38773
38774 fi
38775
38776 else
38777   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
38778 printf %s "checking for library containing opendir... " >&6; }
38779 if test ${ac_cv_search_opendir+y}
38780 then :
38781   printf %s "(cached) " >&6
38782 else
38783   ac_func_search_save_LIBS=$LIBS
38784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38785 /* end confdefs.h.  */
38786
38787 /* Override any GCC internal prototype to avoid an error.
38788    Use char because int might match the return type of a GCC
38789    builtin and then its argument prototype would still apply.  */
38790 #ifdef __cplusplus
38791 extern "C"
38792 #endif
38793 char opendir ();
38794 int
38795 main (void)
38796 {
38797 return opendir ();
38798   ;
38799   return 0;
38800 }
38801 _ACEOF
38802 for ac_lib in '' x
38803 do
38804   if test -z "$ac_lib"; then
38805     ac_res="none required"
38806   else
38807     ac_res=-l$ac_lib
38808     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
38809   fi
38810   if ac_fn_c_try_link "$LINENO"
38811 then :
38812   ac_cv_search_opendir=$ac_res
38813 fi
38814 rm -f core conftest.err conftest.$ac_objext \
38815     conftest$ac_exeext
38816   if test ${ac_cv_search_opendir+y}
38817 then :
38818   break
38819 fi
38820 done
38821 if test ${ac_cv_search_opendir+y}
38822 then :
38823
38824 else
38825   ac_cv_search_opendir=no
38826 fi
38827 rm conftest.$ac_ext
38828 LIBS=$ac_func_search_save_LIBS
38829 fi
38830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
38831 printf "%s\n" "$ac_cv_search_opendir" >&6; }
38832 ac_res=$ac_cv_search_opendir
38833 if test "$ac_res" != no
38834 then :
38835   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38836
38837 fi
38838
38839 fi
38840
38841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
38842 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
38843 if test ${ac_cv_header_sys_wait_h+y}
38844 then :
38845   printf %s "(cached) " >&6
38846 else
38847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38848 /* end confdefs.h.  */
38849 #include <sys/types.h>
38850 #include <sys/wait.h>
38851 #ifndef WEXITSTATUS
38852 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
38853 #endif
38854 #ifndef WIFEXITED
38855 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
38856 #endif
38857
38858 int
38859 main (void)
38860 {
38861   int s;
38862   wait (&s);
38863   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
38864   ;
38865   return 0;
38866 }
38867 _ACEOF
38868 if ac_fn_c_try_compile "$LINENO"
38869 then :
38870   ac_cv_header_sys_wait_h=yes
38871 else
38872   ac_cv_header_sys_wait_h=no
38873 fi
38874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38875 fi
38876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
38877 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
38878 if test $ac_cv_header_sys_wait_h = yes; then
38879
38880 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
38881
38882 fi
38883
38884 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
38885 if test "x$ac_cv_type_pid_t" = xyes
38886 then :
38887
38888 else
38889
38890 printf "%s\n" "#define pid_t int" >>confdefs.h
38891
38892 fi
38893
38894
38895
38896
38897
38898
38899 if test $ac_cv_func_sigprocmask = no; then
38900   ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
38901 if test "x$ac_cv_func_sigblock" = xyes
38902 then :
38903   printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
38904
38905 fi
38906
38907 fi
38908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
38909 printf %s "checking whether closedir returns void... " >&6; }
38910 if test ${ac_cv_func_closedir_void+y}
38911 then :
38912   printf %s "(cached) " >&6
38913 else
38914   if test "$cross_compiling" = yes
38915 then :
38916   ac_cv_func_closedir_void=yes
38917 else
38918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38919 /* end confdefs.h.  */
38920 $ac_includes_default
38921 #include <$ac_header_dirent>
38922 #ifndef __cplusplus
38923 int closedir ();
38924 #endif
38925
38926 int
38927 main (void)
38928 {
38929 return closedir (opendir (".")) != 0;
38930   ;
38931   return 0;
38932 }
38933 _ACEOF
38934 if ac_fn_c_try_run "$LINENO"
38935 then :
38936   ac_cv_func_closedir_void=no
38937 else
38938   ac_cv_func_closedir_void=yes
38939 fi
38940 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38941   conftest.$ac_objext conftest.beam conftest.$ac_ext
38942 fi
38943
38944 fi
38945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
38946 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
38947 if test $ac_cv_func_closedir_void = yes; then
38948
38949 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
38950
38951 fi
38952
38953
38954
38955
38956
38957
38958 if test "x$ac_cv_func_fork" = xyes; then
38959   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
38960 printf %s "checking for working fork... " >&6; }
38961 if test ${ac_cv_func_fork_works+y}
38962 then :
38963   printf %s "(cached) " >&6
38964 else
38965   if test "$cross_compiling" = yes
38966 then :
38967   ac_cv_func_fork_works=cross
38968 else
38969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38970 /* end confdefs.h.  */
38971 $ac_includes_default
38972 int
38973 main (void)
38974 {
38975
38976           /* By Ruediger Kuhlmann. */
38977           return fork () < 0;
38978
38979   ;
38980   return 0;
38981 }
38982 _ACEOF
38983 if ac_fn_c_try_run "$LINENO"
38984 then :
38985   ac_cv_func_fork_works=yes
38986 else
38987   ac_cv_func_fork_works=no
38988 fi
38989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38990   conftest.$ac_objext conftest.beam conftest.$ac_ext
38991 fi
38992
38993 fi
38994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
38995 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
38996
38997 else
38998   ac_cv_func_fork_works=$ac_cv_func_fork
38999 fi
39000 if test "x$ac_cv_func_fork_works" = xcross; then
39001   case $host in
39002     *-*-amigaos* | *-*-msdosdjgpp*)
39003       # Override, as these systems have only a dummy fork() stub
39004       ac_cv_func_fork_works=no
39005       ;;
39006     *)
39007       ac_cv_func_fork_works=yes
39008       ;;
39009   esac
39010   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
39011 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
39012 fi
39013 ac_cv_func_vfork_works=$ac_cv_func_vfork
39014 if test "x$ac_cv_func_vfork" = xyes; then
39015   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
39016 printf %s "checking for working vfork... " >&6; }
39017 if test ${ac_cv_func_vfork_works+y}
39018 then :
39019   printf %s "(cached) " >&6
39020 else
39021   if test "$cross_compiling" = yes
39022 then :
39023   ac_cv_func_vfork_works=cross
39024 else
39025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39026 /* end confdefs.h.  */
39027 /* Thanks to Paul Eggert for this test.  */
39028 $ac_includes_default
39029 #include <signal.h>
39030 #include <sys/wait.h>
39031 #ifdef HAVE_VFORK_H
39032 # include <vfork.h>
39033 #endif
39034
39035 static void
39036 do_nothing (int sig)
39037 {
39038   (void) sig;
39039 }
39040
39041 /* On some sparc systems, changes by the child to local and incoming
39042    argument registers are propagated back to the parent.  The compiler
39043    is told about this with #include <vfork.h>, but some compilers
39044    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
39045    static variable whose address is put into a register that is
39046    clobbered by the vfork.  */
39047 static void
39048 sparc_address_test (int arg)
39049 {
39050   static pid_t child;
39051   if (!child) {
39052     child = vfork ();
39053     if (child < 0) {
39054       perror ("vfork");
39055       _exit(2);
39056     }
39057     if (!child) {
39058       arg = getpid();
39059       write(-1, "", 0);
39060       _exit (arg);
39061     }
39062   }
39063 }
39064
39065 int
39066 main (void)
39067 {
39068   pid_t parent = getpid ();
39069   pid_t child;
39070
39071   sparc_address_test (0);
39072
39073   /* On Solaris 2.4, changes by the child to the signal handler
39074      also munge signal handlers in the parent.  To detect this,
39075      start by putting the parent's handler in a known state.  */
39076   signal (SIGTERM, SIG_DFL);
39077
39078   child = vfork ();
39079
39080   if (child == 0) {
39081     /* Here is another test for sparc vfork register problems.  This
39082        test uses lots of local variables, at least as many local
39083        variables as main has allocated so far including compiler
39084        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
39085        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
39086        reuse the register of parent for one of the local variables,
39087        since it will think that parent can't possibly be used any more
39088        in this routine.  Assigning to the local variable will thus
39089        munge parent in the parent process.  */
39090     pid_t
39091       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
39092       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
39093     /* Convince the compiler that p..p7 are live; otherwise, it might
39094        use the same hardware register for all 8 local variables.  */
39095     if (p != p1 || p != p2 || p != p3 || p != p4
39096         || p != p5 || p != p6 || p != p7)
39097       _exit(1);
39098
39099     /* Alter the child's signal handler.  */
39100     if (signal (SIGTERM, do_nothing) != SIG_DFL)
39101       _exit(1);
39102
39103     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
39104        from child file descriptors.  If the child closes a descriptor
39105        before it execs or exits, this munges the parent's descriptor
39106        as well.  Test for this by closing stdout in the child.  */
39107     _exit(close(fileno(stdout)) != 0);
39108   } else {
39109     int status;
39110     struct stat st;
39111
39112     while (wait(&status) != child)
39113       ;
39114     return (
39115          /* Was there some problem with vforking?  */
39116          child < 0
39117
39118          /* Did the child munge the parent's signal handler?  */
39119          || signal (SIGTERM, SIG_DFL) != SIG_DFL
39120
39121          /* Did the child fail?  (This shouldn't happen.)  */
39122          || status
39123
39124          /* Did the vfork/compiler bug occur?  */
39125          || parent != getpid()
39126
39127          /* Did the file descriptor bug occur?  */
39128          || fstat(fileno(stdout), &st) != 0
39129          );
39130   }
39131 }
39132 _ACEOF
39133 if ac_fn_c_try_run "$LINENO"
39134 then :
39135   ac_cv_func_vfork_works=yes
39136 else
39137   ac_cv_func_vfork_works=no
39138 fi
39139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39140   conftest.$ac_objext conftest.beam conftest.$ac_ext
39141 fi
39142
39143 fi
39144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
39145 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
39146
39147 fi;
39148 if test "x$ac_cv_func_fork_works" = xcross; then
39149   ac_cv_func_vfork_works=$ac_cv_func_vfork
39150   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
39151 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
39152 fi
39153
39154 if test "x$ac_cv_func_vfork_works" = xyes; then
39155
39156 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
39157
39158 else
39159
39160 printf "%s\n" "#define vfork fork" >>confdefs.h
39161
39162 fi
39163 if test "x$ac_cv_func_fork_works" = xyes; then
39164
39165 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
39166
39167 fi
39168
39169
39170 # When .tarball-version exists, we're building from a tarball
39171 # and must not make man/*.1 files depend on the generated src/version.c,
39172 # because that would induce a requirement to run the help2man perl script.
39173 # We are not yet prepared to make perl a build-from-tarball requirement.
39174 # Hence, here we detect .tarball-version existence.  When not present,
39175 # we define a variable to be used in man/Makefile.am to induce the
39176 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
39177 # but not when built from a tarball.
39178
39179 test -f $srcdir/.tarball-version \
39180   && SRC_VERSION_C= \
39181   || SRC_VERSION_C=../src/version.c
39182
39183
39184   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
39185 printf %s "checking whether NLS is requested... " >&6; }
39186     # Check whether --enable-nls was given.
39187 if test ${enable_nls+y}
39188 then :
39189   enableval=$enable_nls; USE_NLS=$enableval
39190 else
39191   USE_NLS=yes
39192 fi
39193
39194   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
39195 printf "%s\n" "$USE_NLS" >&6; }
39196
39197
39198
39199
39200       GETTEXT_MACRO_VERSION=0.19
39201
39202
39203
39204
39205 # Prepare PATH_SEPARATOR.
39206 # The user is always right.
39207 if test "${PATH_SEPARATOR+set}" != set; then
39208   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39209   # contains only /bin. Note that ksh looks also at the FPATH variable,
39210   # so we have to set that as well for the test.
39211   PATH_SEPARATOR=:
39212   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39213     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39214            || PATH_SEPARATOR=';'
39215        }
39216 fi
39217
39218 # Find out how to test for executable files. Don't use a zero-byte file,
39219 # as systems may use methods other than mode bits to determine executability.
39220 cat >conf$$.file <<_ASEOF
39221 #! /bin/sh
39222 exit 0
39223 _ASEOF
39224 chmod +x conf$$.file
39225 if test -x conf$$.file >/dev/null 2>&1; then
39226   ac_executable_p="test -x"
39227 else
39228   ac_executable_p="test -f"
39229 fi
39230 rm -f conf$$.file
39231
39232 # Extract the first word of "msgfmt", so it can be a program name with args.
39233 set dummy msgfmt; ac_word=$2
39234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39235 printf %s "checking for $ac_word... " >&6; }
39236 if test ${ac_cv_path_MSGFMT+y}
39237 then :
39238   printf %s "(cached) " >&6
39239 else
39240   case "$MSGFMT" in
39241   [\\/]* | ?:[\\/]*)
39242     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
39243     ;;
39244   *)
39245     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39246     for ac_dir in $PATH; do
39247       IFS="$ac_save_IFS"
39248       test -z "$ac_dir" && ac_dir=.
39249       for ac_exec_ext in '' $ac_executable_extensions; do
39250         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39251           echo "$as_me: trying $ac_dir/$ac_word..." >&5
39252           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
39253      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
39254             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
39255             break 2
39256           fi
39257         fi
39258       done
39259     done
39260     IFS="$ac_save_IFS"
39261   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
39262     ;;
39263 esac
39264 fi
39265 MSGFMT="$ac_cv_path_MSGFMT"
39266 if test "$MSGFMT" != ":"; then
39267   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
39268 printf "%s\n" "$MSGFMT" >&6; }
39269 else
39270   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39271 printf "%s\n" "no" >&6; }
39272 fi
39273
39274   # Extract the first word of "gmsgfmt", so it can be a program name with args.
39275 set dummy gmsgfmt; ac_word=$2
39276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39277 printf %s "checking for $ac_word... " >&6; }
39278 if test ${ac_cv_path_GMSGFMT+y}
39279 then :
39280   printf %s "(cached) " >&6
39281 else
39282   case $GMSGFMT in
39283   [\\/]* | ?:[\\/]*)
39284   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
39285   ;;
39286   *)
39287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39288 for as_dir in $PATH
39289 do
39290   IFS=$as_save_IFS
39291   case $as_dir in #(((
39292     '') as_dir=./ ;;
39293     */) ;;
39294     *) as_dir=$as_dir/ ;;
39295   esac
39296     for ac_exec_ext in '' $ac_executable_extensions; do
39297   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
39298     ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
39299     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
39300     break 2
39301   fi
39302 done
39303   done
39304 IFS=$as_save_IFS
39305
39306   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
39307   ;;
39308 esac
39309 fi
39310 GMSGFMT=$ac_cv_path_GMSGFMT
39311 if test -n "$GMSGFMT"; then
39312   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
39313 printf "%s\n" "$GMSGFMT" >&6; }
39314 else
39315   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39316 printf "%s\n" "no" >&6; }
39317 fi
39318
39319
39320
39321     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39322     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
39323     *) MSGFMT_015=$MSGFMT ;;
39324   esac
39325
39326   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39327     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
39328     *) GMSGFMT_015=$GMSGFMT ;;
39329   esac
39330
39331
39332
39333 # Prepare PATH_SEPARATOR.
39334 # The user is always right.
39335 if test "${PATH_SEPARATOR+set}" != set; then
39336   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39337   # contains only /bin. Note that ksh looks also at the FPATH variable,
39338   # so we have to set that as well for the test.
39339   PATH_SEPARATOR=:
39340   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39341     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39342            || PATH_SEPARATOR=';'
39343        }
39344 fi
39345
39346 # Find out how to test for executable files. Don't use a zero-byte file,
39347 # as systems may use methods other than mode bits to determine executability.
39348 cat >conf$$.file <<_ASEOF
39349 #! /bin/sh
39350 exit 0
39351 _ASEOF
39352 chmod +x conf$$.file
39353 if test -x conf$$.file >/dev/null 2>&1; then
39354   ac_executable_p="test -x"
39355 else
39356   ac_executable_p="test -f"
39357 fi
39358 rm -f conf$$.file
39359
39360 # Extract the first word of "xgettext", so it can be a program name with args.
39361 set dummy xgettext; ac_word=$2
39362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39363 printf %s "checking for $ac_word... " >&6; }
39364 if test ${ac_cv_path_XGETTEXT+y}
39365 then :
39366   printf %s "(cached) " >&6
39367 else
39368   case "$XGETTEXT" in
39369   [\\/]* | ?:[\\/]*)
39370     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
39371     ;;
39372   *)
39373     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39374     for ac_dir in $PATH; do
39375       IFS="$ac_save_IFS"
39376       test -z "$ac_dir" && ac_dir=.
39377       for ac_exec_ext in '' $ac_executable_extensions; do
39378         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39379           echo "$as_me: trying $ac_dir/$ac_word..." >&5
39380           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
39381      (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
39382             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
39383             break 2
39384           fi
39385         fi
39386       done
39387     done
39388     IFS="$ac_save_IFS"
39389   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
39390     ;;
39391 esac
39392 fi
39393 XGETTEXT="$ac_cv_path_XGETTEXT"
39394 if test "$XGETTEXT" != ":"; then
39395   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
39396 printf "%s\n" "$XGETTEXT" >&6; }
39397 else
39398   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39399 printf "%s\n" "no" >&6; }
39400 fi
39401
39402     rm -f messages.po
39403
39404     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39405     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
39406     *) XGETTEXT_015=$XGETTEXT ;;
39407   esac
39408
39409
39410
39411 # Prepare PATH_SEPARATOR.
39412 # The user is always right.
39413 if test "${PATH_SEPARATOR+set}" != set; then
39414   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39415   # contains only /bin. Note that ksh looks also at the FPATH variable,
39416   # so we have to set that as well for the test.
39417   PATH_SEPARATOR=:
39418   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39419     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39420            || PATH_SEPARATOR=';'
39421        }
39422 fi
39423
39424 # Find out how to test for executable files. Don't use a zero-byte file,
39425 # as systems may use methods other than mode bits to determine executability.
39426 cat >conf$$.file <<_ASEOF
39427 #! /bin/sh
39428 exit 0
39429 _ASEOF
39430 chmod +x conf$$.file
39431 if test -x conf$$.file >/dev/null 2>&1; then
39432   ac_executable_p="test -x"
39433 else
39434   ac_executable_p="test -f"
39435 fi
39436 rm -f conf$$.file
39437
39438 # Extract the first word of "msgmerge", so it can be a program name with args.
39439 set dummy msgmerge; ac_word=$2
39440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39441 printf %s "checking for $ac_word... " >&6; }
39442 if test ${ac_cv_path_MSGMERGE+y}
39443 then :
39444   printf %s "(cached) " >&6
39445 else
39446   case "$MSGMERGE" in
39447   [\\/]* | ?:[\\/]*)
39448     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
39449     ;;
39450   *)
39451     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39452     for ac_dir in $PATH; do
39453       IFS="$ac_save_IFS"
39454       test -z "$ac_dir" && ac_dir=.
39455       for ac_exec_ext in '' $ac_executable_extensions; do
39456         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39457           echo "$as_me: trying $ac_dir/$ac_word..." >&5
39458           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
39459             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
39460             break 2
39461           fi
39462         fi
39463       done
39464     done
39465     IFS="$ac_save_IFS"
39466   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
39467     ;;
39468 esac
39469 fi
39470 MSGMERGE="$ac_cv_path_MSGMERGE"
39471 if test "$MSGMERGE" != ":"; then
39472   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
39473 printf "%s\n" "$MSGMERGE" >&6; }
39474 else
39475   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39476 printf "%s\n" "no" >&6; }
39477 fi
39478
39479
39480         test -n "$localedir" || localedir='${datadir}/locale'
39481
39482
39483     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
39484
39485
39486   ac_config_commands="$ac_config_commands po-directories"
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
39514 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
39515 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
39516 then :
39517   printf %s "(cached) " >&6
39518 else
39519   gt_save_LIBS="$LIBS"
39520      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39521      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39522 /* end confdefs.h.  */
39523 #include <CoreFoundation/CFPreferences.h>
39524 int
39525 main (void)
39526 {
39527 CFPreferencesCopyAppValue(NULL, NULL)
39528   ;
39529   return 0;
39530 }
39531 _ACEOF
39532 if ac_fn_c_try_link "$LINENO"
39533 then :
39534   gt_cv_func_CFPreferencesCopyAppValue=yes
39535 else
39536   gt_cv_func_CFPreferencesCopyAppValue=no
39537 fi
39538 rm -f core conftest.err conftest.$ac_objext \
39539     conftest$ac_exeext conftest.$ac_ext
39540      LIBS="$gt_save_LIBS"
39541 fi
39542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
39543 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
39544   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
39545
39546 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
39547
39548   fi
39549     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
39550 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
39551 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
39552 then :
39553   printf %s "(cached) " >&6
39554 else
39555   gt_save_LIBS="$LIBS"
39556      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39557      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39558 /* end confdefs.h.  */
39559 #include <CoreFoundation/CFLocale.h>
39560 int
39561 main (void)
39562 {
39563 CFLocaleCopyCurrent();
39564   ;
39565   return 0;
39566 }
39567 _ACEOF
39568 if ac_fn_c_try_link "$LINENO"
39569 then :
39570   gt_cv_func_CFLocaleCopyCurrent=yes
39571 else
39572   gt_cv_func_CFLocaleCopyCurrent=no
39573 fi
39574 rm -f core conftest.err conftest.$ac_objext \
39575     conftest$ac_exeext conftest.$ac_ext
39576      LIBS="$gt_save_LIBS"
39577 fi
39578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
39579 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
39580   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
39581
39582 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
39583
39584   fi
39585   INTL_MACOSX_LIBS=
39586   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
39587     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
39588   fi
39589
39590
39591
39592
39593
39594
39595   LIBINTL=
39596   LTLIBINTL=
39597   POSUB=
39598
39599     case " $gt_needs " in
39600     *" need-formatstring-macros "*) gt_api_version=3 ;;
39601     *" need-ngettext "*) gt_api_version=2 ;;
39602     *) gt_api_version=1 ;;
39603   esac
39604   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
39605   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
39606
39607     if test "$USE_NLS" = "yes"; then
39608     gt_use_preinstalled_gnugettext=no
39609
39610
39611         if test $gt_api_version -ge 3; then
39612           gt_revision_test_code='
39613 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
39614 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
39615 #endif
39616 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
39617 '
39618         else
39619           gt_revision_test_code=
39620         fi
39621         if test $gt_api_version -ge 2; then
39622           gt_expression_test_code=' + * ngettext ("", "", 0)'
39623         else
39624           gt_expression_test_code=
39625         fi
39626
39627         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
39628 printf %s "checking for GNU gettext in libc... " >&6; }
39629 if eval test \${$gt_func_gnugettext_libc+y}
39630 then :
39631   printf %s "(cached) " >&6
39632 else
39633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39634 /* end confdefs.h.  */
39635
39636 #include <libintl.h>
39637 $gt_revision_test_code
39638 extern int _nl_msg_cat_cntr;
39639 extern int *_nl_domain_bindings;
39640
39641 int
39642 main (void)
39643 {
39644
39645 bindtextdomain ("", "");
39646 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
39647
39648   ;
39649   return 0;
39650 }
39651 _ACEOF
39652 if ac_fn_c_try_link "$LINENO"
39653 then :
39654   eval "$gt_func_gnugettext_libc=yes"
39655 else
39656   eval "$gt_func_gnugettext_libc=no"
39657 fi
39658 rm -f core conftest.err conftest.$ac_objext \
39659     conftest$ac_exeext conftest.$ac_ext
39660 fi
39661 eval ac_res=\$$gt_func_gnugettext_libc
39662                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39663 printf "%s\n" "$ac_res" >&6; }
39664
39665         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
39666
39667
39668
39669
39670
39671           am_save_CPPFLAGS="$CPPFLAGS"
39672
39673   for element in $INCICONV; do
39674     haveit=
39675     for x in $CPPFLAGS; do
39676
39677   acl_save_prefix="$prefix"
39678   prefix="$acl_final_prefix"
39679   acl_save_exec_prefix="$exec_prefix"
39680   exec_prefix="$acl_final_exec_prefix"
39681   eval x=\"$x\"
39682   exec_prefix="$acl_save_exec_prefix"
39683   prefix="$acl_save_prefix"
39684
39685       if test "X$x" = "X$element"; then
39686         haveit=yes
39687         break
39688       fi
39689     done
39690     if test -z "$haveit"; then
39691       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
39692     fi
39693   done
39694
39695
39696   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
39697 printf %s "checking for iconv... " >&6; }
39698 if test ${am_cv_func_iconv+y}
39699 then :
39700   printf %s "(cached) " >&6
39701 else
39702
39703     am_cv_func_iconv="no, consider installing GNU libiconv"
39704     am_cv_lib_iconv=no
39705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39706 /* end confdefs.h.  */
39707
39708 #include <stdlib.h>
39709 #include <iconv.h>
39710
39711 int
39712 main (void)
39713 {
39714 iconv_t cd = iconv_open("","");
39715            iconv(cd,NULL,NULL,NULL,NULL);
39716            iconv_close(cd);
39717   ;
39718   return 0;
39719 }
39720 _ACEOF
39721 if ac_fn_c_try_link "$LINENO"
39722 then :
39723   am_cv_func_iconv=yes
39724 fi
39725 rm -f core conftest.err conftest.$ac_objext \
39726     conftest$ac_exeext conftest.$ac_ext
39727     if test "$am_cv_func_iconv" != yes; then
39728       am_save_LIBS="$LIBS"
39729       LIBS="$LIBS $LIBICONV"
39730       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39731 /* end confdefs.h.  */
39732
39733 #include <stdlib.h>
39734 #include <iconv.h>
39735
39736 int
39737 main (void)
39738 {
39739 iconv_t cd = iconv_open("","");
39740              iconv(cd,NULL,NULL,NULL,NULL);
39741              iconv_close(cd);
39742   ;
39743   return 0;
39744 }
39745 _ACEOF
39746 if ac_fn_c_try_link "$LINENO"
39747 then :
39748   am_cv_lib_iconv=yes
39749         am_cv_func_iconv=yes
39750 fi
39751 rm -f core conftest.err conftest.$ac_objext \
39752     conftest$ac_exeext conftest.$ac_ext
39753       LIBS="$am_save_LIBS"
39754     fi
39755
39756 fi
39757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
39758 printf "%s\n" "$am_cv_func_iconv" >&6; }
39759   if test "$am_cv_func_iconv" = yes; then
39760     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
39761 printf %s "checking for working iconv... " >&6; }
39762 if test ${am_cv_func_iconv_works+y}
39763 then :
39764   printf %s "(cached) " >&6
39765 else
39766
39767                   am_save_LIBS="$LIBS"
39768       if test $am_cv_lib_iconv = yes; then
39769         LIBS="$LIBS $LIBICONV"
39770       fi
39771       am_cv_func_iconv_works=no
39772       for ac_iconv_const in '' 'const'; do
39773         if test "$cross_compiling" = yes
39774 then :
39775   case "$host_os" in
39776              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
39777              *)            am_cv_func_iconv_works="guessing yes" ;;
39778            esac
39779 else
39780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39781 /* end confdefs.h.  */
39782
39783 #include <iconv.h>
39784 #include <string.h>
39785
39786 #ifndef ICONV_CONST
39787 # define ICONV_CONST $ac_iconv_const
39788 #endif
39789
39790 int
39791 main (void)
39792 {
39793 int result = 0;
39794   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
39795      returns.  */
39796   {
39797     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
39798     if (cd_utf8_to_88591 != (iconv_t)(-1))
39799       {
39800         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
39801         char buf[10];
39802         ICONV_CONST char *inptr = input;
39803         size_t inbytesleft = strlen (input);
39804         char *outptr = buf;
39805         size_t outbytesleft = sizeof (buf);
39806         size_t res = iconv (cd_utf8_to_88591,
39807                             &inptr, &inbytesleft,
39808                             &outptr, &outbytesleft);
39809         if (res == 0)
39810           result |= 1;
39811         iconv_close (cd_utf8_to_88591);
39812       }
39813   }
39814   /* Test against Solaris 10 bug: Failures are not distinguishable from
39815      successful returns.  */
39816   {
39817     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
39818     if (cd_ascii_to_88591 != (iconv_t)(-1))
39819       {
39820         static ICONV_CONST char input[] = "\263";
39821         char buf[10];
39822         ICONV_CONST char *inptr = input;
39823         size_t inbytesleft = strlen (input);
39824         char *outptr = buf;
39825         size_t outbytesleft = sizeof (buf);
39826         size_t res = iconv (cd_ascii_to_88591,
39827                             &inptr, &inbytesleft,
39828                             &outptr, &outbytesleft);
39829         if (res == 0)
39830           result |= 2;
39831         iconv_close (cd_ascii_to_88591);
39832       }
39833   }
39834   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
39835   {
39836     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
39837     if (cd_88591_to_utf8 != (iconv_t)(-1))
39838       {
39839         static ICONV_CONST char input[] = "\304";
39840         static char buf[2] = { (char)0xDE, (char)0xAD };
39841         ICONV_CONST char *inptr = input;
39842         size_t inbytesleft = 1;
39843         char *outptr = buf;
39844         size_t outbytesleft = 1;
39845         size_t res = iconv (cd_88591_to_utf8,
39846                             &inptr, &inbytesleft,
39847                             &outptr, &outbytesleft);
39848         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
39849           result |= 4;
39850         iconv_close (cd_88591_to_utf8);
39851       }
39852   }
39853 #if 0 /* This bug could be worked around by the caller.  */
39854   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
39855   {
39856     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
39857     if (cd_88591_to_utf8 != (iconv_t)(-1))
39858       {
39859         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
39860         char buf[50];
39861         ICONV_CONST char *inptr = input;
39862         size_t inbytesleft = strlen (input);
39863         char *outptr = buf;
39864         size_t outbytesleft = sizeof (buf);
39865         size_t res = iconv (cd_88591_to_utf8,
39866                             &inptr, &inbytesleft,
39867                             &outptr, &outbytesleft);
39868         if ((int)res > 0)
39869           result |= 8;
39870         iconv_close (cd_88591_to_utf8);
39871       }
39872   }
39873 #endif
39874   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
39875      provided.  */
39876   {
39877     /* Try standardized names.  */
39878     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
39879     /* Try IRIX, OSF/1 names.  */
39880     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
39881     /* Try AIX names.  */
39882     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
39883     /* Try HP-UX names.  */
39884     iconv_t cd4 = iconv_open ("utf8", "eucJP");
39885     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
39886         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
39887       result |= 16;
39888     if (cd1 != (iconv_t)(-1))
39889       iconv_close (cd1);
39890     if (cd2 != (iconv_t)(-1))
39891       iconv_close (cd2);
39892     if (cd3 != (iconv_t)(-1))
39893       iconv_close (cd3);
39894     if (cd4 != (iconv_t)(-1))
39895       iconv_close (cd4);
39896   }
39897   return result;
39898
39899   ;
39900   return 0;
39901 }
39902 _ACEOF
39903 if ac_fn_c_try_run "$LINENO"
39904 then :
39905   am_cv_func_iconv_works=yes
39906 fi
39907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39908   conftest.$ac_objext conftest.beam conftest.$ac_ext
39909 fi
39910
39911         test "$am_cv_func_iconv_works" = no || break
39912       done
39913       LIBS="$am_save_LIBS"
39914
39915 fi
39916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
39917 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
39918     case "$am_cv_func_iconv_works" in
39919       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
39920       *)   am_func_iconv=yes ;;
39921     esac
39922   else
39923     am_func_iconv=no am_cv_lib_iconv=no
39924   fi
39925   if test "$am_func_iconv" = yes; then
39926
39927 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
39928
39929   fi
39930   if test "$am_cv_lib_iconv" = yes; then
39931     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
39932 printf %s "checking how to link with libiconv... " >&6; }
39933     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
39934 printf "%s\n" "$LIBICONV" >&6; }
39935   else
39936             CPPFLAGS="$am_save_CPPFLAGS"
39937     LIBICONV=
39938     LTLIBICONV=
39939   fi
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950     use_additional=yes
39951
39952   acl_save_prefix="$prefix"
39953   prefix="$acl_final_prefix"
39954   acl_save_exec_prefix="$exec_prefix"
39955   exec_prefix="$acl_final_exec_prefix"
39956
39957     eval additional_includedir=\"$includedir\"
39958     eval additional_libdir=\"$libdir\"
39959
39960   exec_prefix="$acl_save_exec_prefix"
39961   prefix="$acl_save_prefix"
39962
39963
39964 # Check whether --with-libintl-prefix was given.
39965 if test ${with_libintl_prefix+y}
39966 then :
39967   withval=$with_libintl_prefix;
39968     if test "X$withval" = "Xno"; then
39969       use_additional=no
39970     else
39971       if test "X$withval" = "X"; then
39972
39973   acl_save_prefix="$prefix"
39974   prefix="$acl_final_prefix"
39975   acl_save_exec_prefix="$exec_prefix"
39976   exec_prefix="$acl_final_exec_prefix"
39977
39978           eval additional_includedir=\"$includedir\"
39979           eval additional_libdir=\"$libdir\"
39980
39981   exec_prefix="$acl_save_exec_prefix"
39982   prefix="$acl_save_prefix"
39983
39984       else
39985         additional_includedir="$withval/include"
39986         additional_libdir="$withval/$acl_libdirstem"
39987         if test "$acl_libdirstem2" != "$acl_libdirstem" \
39988            && test ! -d "$withval/$acl_libdirstem"; then
39989           additional_libdir="$withval/$acl_libdirstem2"
39990         fi
39991       fi
39992     fi
39993
39994 fi
39995
39996       LIBINTL=
39997   LTLIBINTL=
39998   INCINTL=
39999   LIBINTL_PREFIX=
40000       HAVE_LIBINTL=
40001   rpathdirs=
40002   ltrpathdirs=
40003   names_already_handled=
40004   names_next_round='intl '
40005   while test -n "$names_next_round"; do
40006     names_this_round="$names_next_round"
40007     names_next_round=
40008     for name in $names_this_round; do
40009       already_handled=
40010       for n in $names_already_handled; do
40011         if test "$n" = "$name"; then
40012           already_handled=yes
40013           break
40014         fi
40015       done
40016       if test -z "$already_handled"; then
40017         names_already_handled="$names_already_handled $name"
40018                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
40019         eval value=\"\$HAVE_LIB$uppername\"
40020         if test -n "$value"; then
40021           if test "$value" = yes; then
40022             eval value=\"\$LIB$uppername\"
40023             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
40024             eval value=\"\$LTLIB$uppername\"
40025             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
40026           else
40027                                     :
40028           fi
40029         else
40030                               found_dir=
40031           found_la=
40032           found_so=
40033           found_a=
40034           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
40035           if test -n "$acl_shlibext"; then
40036             shrext=".$acl_shlibext"             # typically: shrext=.so
40037           else
40038             shrext=
40039           fi
40040           if test $use_additional = yes; then
40041             dir="$additional_libdir"
40042                                     if test -n "$acl_shlibext"; then
40043               if test -f "$dir/$libname$shrext"; then
40044                 found_dir="$dir"
40045                 found_so="$dir/$libname$shrext"
40046               else
40047                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
40048                   ver=`(cd "$dir" && \
40049                         for f in "$libname$shrext".*; do echo "$f"; done \
40050                         | sed -e "s,^$libname$shrext\\\\.,," \
40051                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
40052                         | sed 1q ) 2>/dev/null`
40053                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
40054                     found_dir="$dir"
40055                     found_so="$dir/$libname$shrext.$ver"
40056                   fi
40057                 else
40058                   eval library_names=\"$acl_library_names_spec\"
40059                   for f in $library_names; do
40060                     if test -f "$dir/$f"; then
40061                       found_dir="$dir"
40062                       found_so="$dir/$f"
40063                       break
40064                     fi
40065                   done
40066                 fi
40067               fi
40068             fi
40069                         if test "X$found_dir" = "X"; then
40070               if test -f "$dir/$libname.$acl_libext"; then
40071                 found_dir="$dir"
40072                 found_a="$dir/$libname.$acl_libext"
40073               fi
40074             fi
40075             if test "X$found_dir" != "X"; then
40076               if test -f "$dir/$libname.la"; then
40077                 found_la="$dir/$libname.la"
40078               fi
40079             fi
40080           fi
40081           if test "X$found_dir" = "X"; then
40082             for x in $LDFLAGS $LTLIBINTL; do
40083
40084   acl_save_prefix="$prefix"
40085   prefix="$acl_final_prefix"
40086   acl_save_exec_prefix="$exec_prefix"
40087   exec_prefix="$acl_final_exec_prefix"
40088   eval x=\"$x\"
40089   exec_prefix="$acl_save_exec_prefix"
40090   prefix="$acl_save_prefix"
40091
40092               case "$x" in
40093                 -L*)
40094                   dir=`echo "X$x" | sed -e 's/^X-L//'`
40095                                     if test -n "$acl_shlibext"; then
40096                     if test -f "$dir/$libname$shrext"; then
40097                       found_dir="$dir"
40098                       found_so="$dir/$libname$shrext"
40099                     else
40100                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
40101                         ver=`(cd "$dir" && \
40102                               for f in "$libname$shrext".*; do echo "$f"; done \
40103                               | sed -e "s,^$libname$shrext\\\\.,," \
40104                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
40105                               | sed 1q ) 2>/dev/null`
40106                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
40107                           found_dir="$dir"
40108                           found_so="$dir/$libname$shrext.$ver"
40109                         fi
40110                       else
40111                         eval library_names=\"$acl_library_names_spec\"
40112                         for f in $library_names; do
40113                           if test -f "$dir/$f"; then
40114                             found_dir="$dir"
40115                             found_so="$dir/$f"
40116                             break
40117                           fi
40118                         done
40119                       fi
40120                     fi
40121                   fi
40122                                     if test "X$found_dir" = "X"; then
40123                     if test -f "$dir/$libname.$acl_libext"; then
40124                       found_dir="$dir"
40125                       found_a="$dir/$libname.$acl_libext"
40126                     fi
40127                   fi
40128                   if test "X$found_dir" != "X"; then
40129                     if test -f "$dir/$libname.la"; then
40130                       found_la="$dir/$libname.la"
40131                     fi
40132                   fi
40133                   ;;
40134               esac
40135               if test "X$found_dir" != "X"; then
40136                 break
40137               fi
40138             done
40139           fi
40140           if test "X$found_dir" != "X"; then
40141                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
40142             if test "X$found_so" != "X"; then
40143                                                         if test "$enable_rpath" = no \
40144                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
40145                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
40146                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40147               else
40148                                                                                 haveit=
40149                 for x in $ltrpathdirs; do
40150                   if test "X$x" = "X$found_dir"; then
40151                     haveit=yes
40152                     break
40153                   fi
40154                 done
40155                 if test -z "$haveit"; then
40156                   ltrpathdirs="$ltrpathdirs $found_dir"
40157                 fi
40158                                 if test "$acl_hardcode_direct" = yes; then
40159                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40160                 else
40161                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
40162                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40163                                                             haveit=
40164                     for x in $rpathdirs; do
40165                       if test "X$x" = "X$found_dir"; then
40166                         haveit=yes
40167                         break
40168                       fi
40169                     done
40170                     if test -z "$haveit"; then
40171                       rpathdirs="$rpathdirs $found_dir"
40172                     fi
40173                   else
40174                                                                                 haveit=
40175                     for x in $LDFLAGS $LIBINTL; do
40176
40177   acl_save_prefix="$prefix"
40178   prefix="$acl_final_prefix"
40179   acl_save_exec_prefix="$exec_prefix"
40180   exec_prefix="$acl_final_exec_prefix"
40181   eval x=\"$x\"
40182   exec_prefix="$acl_save_exec_prefix"
40183   prefix="$acl_save_prefix"
40184
40185                       if test "X$x" = "X-L$found_dir"; then
40186                         haveit=yes
40187                         break
40188                       fi
40189                     done
40190                     if test -z "$haveit"; then
40191                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
40192                     fi
40193                     if test "$acl_hardcode_minus_L" != no; then
40194                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40195                     else
40196                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
40197                     fi
40198                   fi
40199                 fi
40200               fi
40201             else
40202               if test "X$found_a" != "X"; then
40203                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
40204               else
40205                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
40206               fi
40207             fi
40208                         additional_includedir=
40209             case "$found_dir" in
40210               */$acl_libdirstem | */$acl_libdirstem/)
40211                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
40212                 if test "$name" = 'intl'; then
40213                   LIBINTL_PREFIX="$basedir"
40214                 fi
40215                 additional_includedir="$basedir/include"
40216                 ;;
40217               */$acl_libdirstem2 | */$acl_libdirstem2/)
40218                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
40219                 if test "$name" = 'intl'; then
40220                   LIBINTL_PREFIX="$basedir"
40221                 fi
40222                 additional_includedir="$basedir/include"
40223                 ;;
40224             esac
40225             if test "X$additional_includedir" != "X"; then
40226                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
40227                 haveit=
40228                 if test "X$additional_includedir" = "X/usr/local/include"; then
40229                   if test -n "$GCC"; then
40230                     case $host_os in
40231                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
40232                     esac
40233                   fi
40234                 fi
40235                 if test -z "$haveit"; then
40236                   for x in $CPPFLAGS $INCINTL; do
40237
40238   acl_save_prefix="$prefix"
40239   prefix="$acl_final_prefix"
40240   acl_save_exec_prefix="$exec_prefix"
40241   exec_prefix="$acl_final_exec_prefix"
40242   eval x=\"$x\"
40243   exec_prefix="$acl_save_exec_prefix"
40244   prefix="$acl_save_prefix"
40245
40246                     if test "X$x" = "X-I$additional_includedir"; then
40247                       haveit=yes
40248                       break
40249                     fi
40250                   done
40251                   if test -z "$haveit"; then
40252                     if test -d "$additional_includedir"; then
40253                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
40254                     fi
40255                   fi
40256                 fi
40257               fi
40258             fi
40259                         if test -n "$found_la"; then
40260                                                         save_libdir="$libdir"
40261               case "$found_la" in
40262                 */* | *\\*) . "$found_la" ;;
40263                 *) . "./$found_la" ;;
40264               esac
40265               libdir="$save_libdir"
40266                             for dep in $dependency_libs; do
40267                 case "$dep" in
40268                   -L*)
40269                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
40270                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
40271                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
40272                       haveit=
40273                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
40274                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
40275                         if test -n "$GCC"; then
40276                           case $host_os in
40277                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
40278                           esac
40279                         fi
40280                       fi
40281                       if test -z "$haveit"; then
40282                         haveit=
40283                         for x in $LDFLAGS $LIBINTL; do
40284
40285   acl_save_prefix="$prefix"
40286   prefix="$acl_final_prefix"
40287   acl_save_exec_prefix="$exec_prefix"
40288   exec_prefix="$acl_final_exec_prefix"
40289   eval x=\"$x\"
40290   exec_prefix="$acl_save_exec_prefix"
40291   prefix="$acl_save_prefix"
40292
40293                           if test "X$x" = "X-L$additional_libdir"; then
40294                             haveit=yes
40295                             break
40296                           fi
40297                         done
40298                         if test -z "$haveit"; then
40299                           if test -d "$additional_libdir"; then
40300                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
40301                           fi
40302                         fi
40303                         haveit=
40304                         for x in $LDFLAGS $LTLIBINTL; do
40305
40306   acl_save_prefix="$prefix"
40307   prefix="$acl_final_prefix"
40308   acl_save_exec_prefix="$exec_prefix"
40309   exec_prefix="$acl_final_exec_prefix"
40310   eval x=\"$x\"
40311   exec_prefix="$acl_save_exec_prefix"
40312   prefix="$acl_save_prefix"
40313
40314                           if test "X$x" = "X-L$additional_libdir"; then
40315                             haveit=yes
40316                             break
40317                           fi
40318                         done
40319                         if test -z "$haveit"; then
40320                           if test -d "$additional_libdir"; then
40321                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
40322                           fi
40323                         fi
40324                       fi
40325                     fi
40326                     ;;
40327                   -R*)
40328                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
40329                     if test "$enable_rpath" != no; then
40330                                                                   haveit=
40331                       for x in $rpathdirs; do
40332                         if test "X$x" = "X$dir"; then
40333                           haveit=yes
40334                           break
40335                         fi
40336                       done
40337                       if test -z "$haveit"; then
40338                         rpathdirs="$rpathdirs $dir"
40339                       fi
40340                                                                   haveit=
40341                       for x in $ltrpathdirs; do
40342                         if test "X$x" = "X$dir"; then
40343                           haveit=yes
40344                           break
40345                         fi
40346                       done
40347                       if test -z "$haveit"; then
40348                         ltrpathdirs="$ltrpathdirs $dir"
40349                       fi
40350                     fi
40351                     ;;
40352                   -l*)
40353                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
40354                     ;;
40355                   *.la)
40356                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
40357                     ;;
40358                   *)
40359                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
40360                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
40361                     ;;
40362                 esac
40363               done
40364             fi
40365           else
40366                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
40367             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
40368           fi
40369         fi
40370       fi
40371     done
40372   done
40373   if test "X$rpathdirs" != "X"; then
40374     if test -n "$acl_hardcode_libdir_separator"; then
40375                         alldirs=
40376       for found_dir in $rpathdirs; do
40377         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
40378       done
40379             acl_save_libdir="$libdir"
40380       libdir="$alldirs"
40381       eval flag=\"$acl_hardcode_libdir_flag_spec\"
40382       libdir="$acl_save_libdir"
40383       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
40384     else
40385             for found_dir in $rpathdirs; do
40386         acl_save_libdir="$libdir"
40387         libdir="$found_dir"
40388         eval flag=\"$acl_hardcode_libdir_flag_spec\"
40389         libdir="$acl_save_libdir"
40390         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
40391       done
40392     fi
40393   fi
40394   if test "X$ltrpathdirs" != "X"; then
40395             for found_dir in $ltrpathdirs; do
40396       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
40397     done
40398   fi
40399
40400
40401
40402
40403
40404           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
40405 printf %s "checking for GNU gettext in libintl... " >&6; }
40406 if eval test \${$gt_func_gnugettext_libintl+y}
40407 then :
40408   printf %s "(cached) " >&6
40409 else
40410   gt_save_CPPFLAGS="$CPPFLAGS"
40411             CPPFLAGS="$CPPFLAGS $INCINTL"
40412             gt_save_LIBS="$LIBS"
40413             LIBS="$LIBS $LIBINTL"
40414                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40415 /* end confdefs.h.  */
40416
40417 #include <libintl.h>
40418 $gt_revision_test_code
40419 extern int _nl_msg_cat_cntr;
40420 extern
40421 #ifdef __cplusplus
40422 "C"
40423 #endif
40424 const char *_nl_expand_alias (const char *);
40425
40426 int
40427 main (void)
40428 {
40429
40430 bindtextdomain ("", "");
40431 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
40432
40433   ;
40434   return 0;
40435 }
40436 _ACEOF
40437 if ac_fn_c_try_link "$LINENO"
40438 then :
40439   eval "$gt_func_gnugettext_libintl=yes"
40440 else
40441   eval "$gt_func_gnugettext_libintl=no"
40442 fi
40443 rm -f core conftest.err conftest.$ac_objext \
40444     conftest$ac_exeext conftest.$ac_ext
40445                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
40446               LIBS="$LIBS $LIBICONV"
40447               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40448 /* end confdefs.h.  */
40449
40450 #include <libintl.h>
40451 $gt_revision_test_code
40452 extern int _nl_msg_cat_cntr;
40453 extern
40454 #ifdef __cplusplus
40455 "C"
40456 #endif
40457 const char *_nl_expand_alias (const char *);
40458
40459 int
40460 main (void)
40461 {
40462
40463 bindtextdomain ("", "");
40464 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
40465
40466   ;
40467   return 0;
40468 }
40469 _ACEOF
40470 if ac_fn_c_try_link "$LINENO"
40471 then :
40472   LIBINTL="$LIBINTL $LIBICONV"
40473                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
40474                  eval "$gt_func_gnugettext_libintl=yes"
40475
40476 fi
40477 rm -f core conftest.err conftest.$ac_objext \
40478     conftest$ac_exeext conftest.$ac_ext
40479             fi
40480             CPPFLAGS="$gt_save_CPPFLAGS"
40481             LIBS="$gt_save_LIBS"
40482 fi
40483 eval ac_res=\$$gt_func_gnugettext_libintl
40484                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
40485 printf "%s\n" "$ac_res" >&6; }
40486         fi
40487
40488                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
40489            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
40490                 && test "$PACKAGE" != gettext-runtime \
40491                 && test "$PACKAGE" != gettext-tools; }; then
40492           gt_use_preinstalled_gnugettext=yes
40493         else
40494                     LIBINTL=
40495           LTLIBINTL=
40496           INCINTL=
40497         fi
40498
40499
40500
40501     if test -n "$INTL_MACOSX_LIBS"; then
40502       if test "$gt_use_preinstalled_gnugettext" = "yes" \
40503          || test "$nls_cv_use_gnu_gettext" = "yes"; then
40504                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
40505         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
40506       fi
40507     fi
40508
40509     if test "$gt_use_preinstalled_gnugettext" = "yes" \
40510        || test "$nls_cv_use_gnu_gettext" = "yes"; then
40511
40512 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
40513
40514     else
40515       USE_NLS=no
40516     fi
40517   fi
40518
40519   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
40520 printf %s "checking whether to use NLS... " >&6; }
40521   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
40522 printf "%s\n" "$USE_NLS" >&6; }
40523   if test "$USE_NLS" = "yes"; then
40524     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
40525 printf %s "checking where the gettext function comes from... " >&6; }
40526     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
40527       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
40528         gt_source="external libintl"
40529       else
40530         gt_source="libc"
40531       fi
40532     else
40533       gt_source="included intl directory"
40534     fi
40535     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
40536 printf "%s\n" "$gt_source" >&6; }
40537   fi
40538
40539   if test "$USE_NLS" = "yes"; then
40540
40541     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
40542       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
40543         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
40544 printf %s "checking how to link with libintl... " >&6; }
40545         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
40546 printf "%s\n" "$LIBINTL" >&6; }
40547
40548   for element in $INCINTL; do
40549     haveit=
40550     for x in $CPPFLAGS; do
40551
40552   acl_save_prefix="$prefix"
40553   prefix="$acl_final_prefix"
40554   acl_save_exec_prefix="$exec_prefix"
40555   exec_prefix="$acl_final_exec_prefix"
40556   eval x=\"$x\"
40557   exec_prefix="$acl_save_exec_prefix"
40558   prefix="$acl_save_prefix"
40559
40560       if test "X$x" = "X$element"; then
40561         haveit=yes
40562         break
40563       fi
40564     done
40565     if test -z "$haveit"; then
40566       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
40567     fi
40568   done
40569
40570       fi
40571
40572
40573 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
40574
40575
40576 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
40577
40578     fi
40579
40580         POSUB=po
40581   fi
40582
40583
40584
40585     INTLLIBS="$LIBINTL"
40586
40587
40588
40589
40590
40591
40592
40593 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
40594
40595 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
40596
40597 cat >confcache <<\_ACEOF
40598 # This file is a shell script that caches the results of configure
40599 # tests run on this system so they can be shared between configure
40600 # scripts and configure runs, see configure's option --config-cache.
40601 # It is not useful on other systems.  If it contains results you don't
40602 # want to keep, you may remove or edit it.
40603 #
40604 # config.status only pays attention to the cache file if you give it
40605 # the --recheck option to rerun configure.
40606 #
40607 # `ac_cv_env_foo' variables (set or unset) will be overridden when
40608 # loading this file, other *unset* `ac_cv_foo' will be assigned the
40609 # following values.
40610
40611 _ACEOF
40612
40613 # The following way of writing the cache mishandles newlines in values,
40614 # but we know of no workaround that is simple, portable, and efficient.
40615 # So, we kill variables containing newlines.
40616 # Ultrix sh set writes to stderr and can't be redirected directly,
40617 # and sets the high bit in the cache file unless we assign to the vars.
40618 (
40619   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
40620     eval ac_val=\$$ac_var
40621     case $ac_val in #(
40622     *${as_nl}*)
40623       case $ac_var in #(
40624       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
40625 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
40626       esac
40627       case $ac_var in #(
40628       _ | IFS | as_nl) ;; #(
40629       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
40630       *) { eval $ac_var=; unset $ac_var;} ;;
40631       esac ;;
40632     esac
40633   done
40634
40635   (set) 2>&1 |
40636     case $as_nl`(ac_space=' '; set) 2>&1` in #(
40637     *${as_nl}ac_space=\ *)
40638       # `set' does not quote correctly, so add quotes: double-quote
40639       # substitution turns \\\\ into \\, and sed turns \\ into \.
40640       sed -n \
40641         "s/'/'\\\\''/g;
40642           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
40643       ;; #(
40644     *)
40645       # `set' quotes correctly as required by POSIX, so do not add quotes.
40646       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
40647       ;;
40648     esac |
40649     sort
40650 ) |
40651   sed '
40652      /^ac_cv_env_/b end
40653      t clear
40654      :clear
40655      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
40656      t end
40657      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
40658      :end' >>confcache
40659 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
40660   if test -w "$cache_file"; then
40661     if test "x$cache_file" != "x/dev/null"; then
40662       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
40663 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
40664       if test ! -f "$cache_file" || test -h "$cache_file"; then
40665         cat confcache >"$cache_file"
40666       else
40667         case $cache_file in #(
40668         */* | ?:*)
40669           mv -f confcache "$cache_file"$$ &&
40670           mv -f "$cache_file"$$ "$cache_file" ;; #(
40671         *)
40672           mv -f confcache "$cache_file" ;;
40673         esac
40674       fi
40675     fi
40676   else
40677     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
40678 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
40679   fi
40680 fi
40681 rm -f confcache
40682
40683 test "x$prefix" = xNONE && prefix=$ac_default_prefix
40684 # Let make expand exec_prefix.
40685 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
40686
40687 DEFS=-DHAVE_CONFIG_H
40688
40689 ac_libobjs=
40690 ac_ltlibobjs=
40691 U=
40692 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
40693   # 1. Remove the extension, and $U if already installed.
40694   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
40695   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
40696   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
40697   #    will be set to the directory where LIBOBJS objects are built.
40698   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
40699   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
40700 done
40701 LIBOBJS=$ac_libobjs
40702
40703 LTLIBOBJS=$ac_ltlibobjs
40704
40705
40706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
40707 printf %s "checking that generated files are newer than configure... " >&6; }
40708    if test -n "$am_sleep_pid"; then
40709      # Hide warnings about reused PIDs.
40710      wait $am_sleep_pid 2>/dev/null
40711    fi
40712    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
40713 printf "%s\n" "done" >&6; }
40714  if test -n "$EXEEXT"; then
40715   am__EXEEXT_TRUE=
40716   am__EXEEXT_FALSE='#'
40717 else
40718   am__EXEEXT_TRUE='#'
40719   am__EXEEXT_FALSE=
40720 fi
40721
40722 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
40723   as_fn_error $? "conditional \"AMDEP\" was never defined.
40724 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40725 fi
40726 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40727   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
40728 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40729 fi
40730 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
40731   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
40732 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40733 fi
40734 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
40735   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
40736 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40737 fi
40738 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
40739 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
40740   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
40741 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40742 fi
40743 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
40744   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
40745 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40746 fi
40747 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
40748   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
40749 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40750 fi
40751 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
40752   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
40753 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40754 fi
40755 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
40756   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
40757 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40758 fi
40759 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40760   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40761 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40762 fi
40763 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40764   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40765 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40766 fi
40767 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40768   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40769 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40770 fi
40771 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
40772   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
40773 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40774 fi
40775 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
40776   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
40777 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40778 fi
40779 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
40780   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
40781 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40782 fi
40783 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
40784   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
40785 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40786 fi
40787 CONFIG_INCLUDE=lib/config.h
40788
40789 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
40790   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
40791 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40792 fi
40793 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
40794   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
40795 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40796 fi
40797 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
40798   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
40799 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40800 fi
40801 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
40802   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
40803 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40804 fi
40805 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
40806   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
40807 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40808 fi
40809 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
40810   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
40811 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40812 fi
40813
40814
40815     gl_libobjs=
40816     gl_ltlibobjs=
40817     if test -n "$gl_LIBOBJS"; then
40818       # Remove the extension.
40819       sed_drop_objext='s/\.o$//;s/\.obj$//'
40820       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
40821         gl_libobjs="$gl_libobjs $i.$ac_objext"
40822         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
40823       done
40824     fi
40825     gl_LIBOBJS=$gl_libobjs
40826
40827     gl_LTLIBOBJS=$gl_ltlibobjs
40828
40829
40830
40831 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
40832   as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
40833 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40834 fi
40835 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
40836   as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
40837 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40838 fi
40839
40840     gltests_libobjs=
40841     gltests_ltlibobjs=
40842     if test -n "$gltests_LIBOBJS"; then
40843       # Remove the extension.
40844       sed_drop_objext='s/\.o$//;s/\.obj$//'
40845       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
40846         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
40847         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
40848       done
40849     fi
40850     gltests_LIBOBJS=$gltests_libobjs
40851
40852     gltests_LTLIBOBJS=$gltests_ltlibobjs
40853
40854
40855
40856 : "${CONFIG_STATUS=./config.status}"
40857 ac_write_fail=0
40858 ac_clean_files_save=$ac_clean_files
40859 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
40860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
40861 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
40862 as_write_fail=0
40863 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
40864 #! $SHELL
40865 # Generated by $as_me.
40866 # Run this file to recreate the current configuration.
40867 # Compiler output produced by configure, useful for debugging
40868 # configure, is in config.log if it exists.
40869
40870 debug=false
40871 ac_cs_recheck=false
40872 ac_cs_silent=false
40873
40874 SHELL=\${CONFIG_SHELL-$SHELL}
40875 export SHELL
40876 _ASEOF
40877 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
40878 ## -------------------- ##
40879 ## M4sh Initialization. ##
40880 ## -------------------- ##
40881
40882 # Be more Bourne compatible
40883 DUALCASE=1; export DUALCASE # for MKS sh
40884 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
40885 then :
40886   emulate sh
40887   NULLCMD=:
40888   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
40889   # is contrary to our usage.  Disable this feature.
40890   alias -g '${1+"$@"}'='"$@"'
40891   setopt NO_GLOB_SUBST
40892 else
40893   case `(set -o) 2>/dev/null` in #(
40894   *posix*) :
40895     set -o posix ;; #(
40896   *) :
40897      ;;
40898 esac
40899 fi
40900
40901
40902 # The user is always right.
40903 if ${PATH_SEPARATOR+false} :; then
40904   PATH_SEPARATOR=:
40905   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40906     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
40907       PATH_SEPARATOR=';'
40908   }
40909 fi
40910
40911
40912 # IFS
40913 # We need space, tab and new line, in precisely that order.  Quoting is
40914 # there to prevent editors from complaining about space-tab.
40915 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
40916 # splitting by setting IFS to empty value.)
40917 as_nl='
40918 '
40919 export as_nl
40920 IFS=" ""        $as_nl"
40921
40922 # Find who we are.  Look in the path if we contain no directory separator.
40923 as_myself=
40924 case $0 in #((
40925   *[\\/]* ) as_myself=$0 ;;
40926   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40927 for as_dir in $PATH
40928 do
40929   IFS=$as_save_IFS
40930   case $as_dir in #(((
40931     '') as_dir=./ ;;
40932     */) ;;
40933     *) as_dir=$as_dir/ ;;
40934   esac
40935     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
40936   done
40937 IFS=$as_save_IFS
40938
40939      ;;
40940 esac
40941 # We did not find ourselves, most probably we were run as `sh COMMAND'
40942 # in which case we are not to be found in the path.
40943 if test "x$as_myself" = x; then
40944   as_myself=$0
40945 fi
40946 if test ! -f "$as_myself"; then
40947   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
40948   exit 1
40949 fi
40950
40951 # Unset variables that we do not need and which cause bugs (e.g. in
40952 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
40953 # suppresses any "Segmentation fault" message there.  '((' could
40954 # trigger a bug in pdksh 5.2.14.
40955 for as_var in BASH_ENV ENV MAIL MAILPATH
40956 do eval test \${$as_var+y} \
40957   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
40958 done
40959 PS1='$ '
40960 PS2='> '
40961 PS4='+ '
40962
40963 # NLS nuisances.
40964 LC_ALL=C
40965 export LC_ALL
40966 LANGUAGE=C
40967 export LANGUAGE
40968
40969 # CDPATH.
40970 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
40971
40972
40973 # as_fn_error STATUS ERROR [LINENO LOG_FD]
40974 # ----------------------------------------
40975 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
40976 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
40977 # script with STATUS, using 1 if that was 0.
40978 as_fn_error ()
40979 {
40980   as_status=$1; test $as_status -eq 0 && as_status=1
40981   if test "$4"; then
40982     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
40983     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
40984   fi
40985   printf "%s\n" "$as_me: error: $2" >&2
40986   as_fn_exit $as_status
40987 } # as_fn_error
40988
40989
40990 # as_fn_set_status STATUS
40991 # -----------------------
40992 # Set $? to STATUS, without forking.
40993 as_fn_set_status ()
40994 {
40995   return $1
40996 } # as_fn_set_status
40997
40998 # as_fn_exit STATUS
40999 # -----------------
41000 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
41001 as_fn_exit ()
41002 {
41003   set +e
41004   as_fn_set_status $1
41005   exit $1
41006 } # as_fn_exit
41007
41008 # as_fn_unset VAR
41009 # ---------------
41010 # Portably unset VAR.
41011 as_fn_unset ()
41012 {
41013   { eval $1=; unset $1;}
41014 }
41015 as_unset=as_fn_unset
41016 # as_fn_append VAR VALUE
41017 # ----------------------
41018 # Append the text in VALUE to the end of the definition contained in VAR. Take
41019 # advantage of any shell optimizations that allow amortized linear growth over
41020 # repeated appends, instead of the typical quadratic growth present in naive
41021 # implementations.
41022 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
41023 then :
41024   eval 'as_fn_append ()
41025   {
41026     eval $1+=\$2
41027   }'
41028 else
41029   as_fn_append ()
41030   {
41031     eval $1=\$$1\$2
41032   }
41033 fi # as_fn_append
41034
41035 # as_fn_arith ARG...
41036 # ------------------
41037 # Perform arithmetic evaluation on the ARGs, and store the result in the
41038 # global $as_val. Take advantage of shells that can avoid forks. The arguments
41039 # must be portable across $(()) and expr.
41040 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
41041 then :
41042   eval 'as_fn_arith ()
41043   {
41044     as_val=$(( $* ))
41045   }'
41046 else
41047   as_fn_arith ()
41048   {
41049     as_val=`expr "$@" || test $? -eq 1`
41050   }
41051 fi # as_fn_arith
41052
41053
41054 if expr a : '\(a\)' >/dev/null 2>&1 &&
41055    test "X`expr 00001 : '.*\(...\)'`" = X001; then
41056   as_expr=expr
41057 else
41058   as_expr=false
41059 fi
41060
41061 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
41062   as_basename=basename
41063 else
41064   as_basename=false
41065 fi
41066
41067 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
41068   as_dirname=dirname
41069 else
41070   as_dirname=false
41071 fi
41072
41073 as_me=`$as_basename -- "$0" ||
41074 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
41075          X"$0" : 'X\(//\)$' \| \
41076          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
41077 printf "%s\n" X/"$0" |
41078     sed '/^.*\/\([^/][^/]*\)\/*$/{
41079             s//\1/
41080             q
41081           }
41082           /^X\/\(\/\/\)$/{
41083             s//\1/
41084             q
41085           }
41086           /^X\/\(\/\).*/{
41087             s//\1/
41088             q
41089           }
41090           s/.*/./; q'`
41091
41092 # Avoid depending upon Character Ranges.
41093 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
41094 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
41095 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41096 as_cr_digits='0123456789'
41097 as_cr_alnum=$as_cr_Letters$as_cr_digits
41098
41099 ECHO_C= ECHO_N= ECHO_T=
41100 case `echo -n x` in #(((((
41101 -n*)
41102   case `echo 'xy\c'` in
41103   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
41104   xy)  ECHO_C='\c';;
41105   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
41106        ECHO_T=' ';;
41107   esac;;
41108 *)
41109   ECHO_N='-n';;
41110 esac
41111
41112 rm -f conf$$ conf$$.exe conf$$.file
41113 if test -d conf$$.dir; then
41114   rm -f conf$$.dir/conf$$.file
41115 else
41116   rm -f conf$$.dir
41117   mkdir conf$$.dir 2>/dev/null
41118 fi
41119 if (echo >conf$$.file) 2>/dev/null; then
41120   if ln -s conf$$.file conf$$ 2>/dev/null; then
41121     as_ln_s='ln -s'
41122     # ... but there are two gotchas:
41123     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
41124     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
41125     # In both cases, we have to default to `cp -pR'.
41126     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
41127       as_ln_s='cp -pR'
41128   elif ln conf$$.file conf$$ 2>/dev/null; then
41129     as_ln_s=ln
41130   else
41131     as_ln_s='cp -pR'
41132   fi
41133 else
41134   as_ln_s='cp -pR'
41135 fi
41136 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
41137 rmdir conf$$.dir 2>/dev/null
41138
41139
41140 # as_fn_mkdir_p
41141 # -------------
41142 # Create "$as_dir" as a directory, including parents if necessary.
41143 as_fn_mkdir_p ()
41144 {
41145
41146   case $as_dir in #(
41147   -*) as_dir=./$as_dir;;
41148   esac
41149   test -d "$as_dir" || eval $as_mkdir_p || {
41150     as_dirs=
41151     while :; do
41152       case $as_dir in #(
41153       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
41154       *) as_qdir=$as_dir;;
41155       esac
41156       as_dirs="'$as_qdir' $as_dirs"
41157       as_dir=`$as_dirname -- "$as_dir" ||
41158 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41159          X"$as_dir" : 'X\(//\)[^/]' \| \
41160          X"$as_dir" : 'X\(//\)$' \| \
41161          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
41162 printf "%s\n" X"$as_dir" |
41163     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41164             s//\1/
41165             q
41166           }
41167           /^X\(\/\/\)[^/].*/{
41168             s//\1/
41169             q
41170           }
41171           /^X\(\/\/\)$/{
41172             s//\1/
41173             q
41174           }
41175           /^X\(\/\).*/{
41176             s//\1/
41177             q
41178           }
41179           s/.*/./; q'`
41180       test -d "$as_dir" && break
41181     done
41182     test -z "$as_dirs" || eval "mkdir $as_dirs"
41183   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
41184
41185
41186 } # as_fn_mkdir_p
41187 if mkdir -p . 2>/dev/null; then
41188   as_mkdir_p='mkdir -p "$as_dir"'
41189 else
41190   test -d ./-p && rmdir ./-p
41191   as_mkdir_p=false
41192 fi
41193
41194
41195 # as_fn_executable_p FILE
41196 # -----------------------
41197 # Test if FILE is an executable regular file.
41198 as_fn_executable_p ()
41199 {
41200   test -f "$1" && test -x "$1"
41201 } # as_fn_executable_p
41202 as_test_x='test -x'
41203 as_executable_p=as_fn_executable_p
41204
41205 # Sed expression to map a string onto a valid CPP name.
41206 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
41207
41208 # Sed expression to map a string onto a valid variable name.
41209 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
41210
41211
41212 exec 6>&1
41213 ## ----------------------------------- ##
41214 ## Main body of $CONFIG_STATUS script. ##
41215 ## ----------------------------------- ##
41216 _ASEOF
41217 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
41218
41219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41220 # Save the log message, to keep $0 and so on meaningful, and to
41221 # report actual input values of CONFIG_FILES etc. instead of their
41222 # values after options handling.
41223 ac_log="
41224 This file was extended by GNU diffutils $as_me 3.7, which was
41225 generated by GNU Autoconf 2.69.197-b8fd7.  Invocation command line was
41226
41227   CONFIG_FILES    = $CONFIG_FILES
41228   CONFIG_HEADERS  = $CONFIG_HEADERS
41229   CONFIG_LINKS    = $CONFIG_LINKS
41230   CONFIG_COMMANDS = $CONFIG_COMMANDS
41231   $ $0 $@
41232
41233 on `(hostname || uname -n) 2>/dev/null | sed 1q`
41234 "
41235
41236 _ACEOF
41237
41238 case $ac_config_files in *"
41239 "*) set x $ac_config_files; shift; ac_config_files=$*;;
41240 esac
41241
41242 case $ac_config_headers in *"
41243 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
41244 esac
41245
41246
41247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41248 # Files that config.status was made for.
41249 config_files="$ac_config_files"
41250 config_headers="$ac_config_headers"
41251 config_links="$ac_config_links"
41252 config_commands="$ac_config_commands"
41253
41254 _ACEOF
41255
41256 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41257 ac_cs_usage="\
41258 \`$as_me' instantiates files and other configuration actions
41259 from templates according to the current configuration.  Unless the files
41260 and actions are specified as TAGs, all are instantiated by default.
41261
41262 Usage: $0 [OPTION]... [TAG]...
41263
41264   -h, --help       print this help, then exit
41265   -V, --version    print version number and configuration settings, then exit
41266       --config     print configuration, then exit
41267   -q, --quiet, --silent
41268                    do not print progress messages
41269   -d, --debug      don't remove temporary files
41270       --recheck    update $as_me by reconfiguring in the same conditions
41271       --file=FILE[:TEMPLATE]
41272                    instantiate the configuration file FILE
41273       --header=FILE[:TEMPLATE]
41274                    instantiate the configuration header FILE
41275
41276 Configuration files:
41277 $config_files
41278
41279 Configuration headers:
41280 $config_headers
41281
41282 Configuration links:
41283 $config_links
41284
41285 Configuration commands:
41286 $config_commands
41287
41288 Report bugs to <bug-diffutils@gnu.org>.
41289 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
41290 General help using GNU software: <https://www.gnu.org/gethelp/>."
41291
41292 _ACEOF
41293 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
41294 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
41295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41296 ac_cs_config='$ac_cs_config_escaped'
41297 ac_cs_version="\\
41298 GNU diffutils config.status 3.7
41299 configured by $0, generated by GNU Autoconf 2.69.197-b8fd7,
41300   with options \\"\$ac_cs_config\\"
41301
41302 Copyright (C) 2017 Free Software Foundation, Inc.
41303 This config.status script is free software; the Free Software Foundation
41304 gives unlimited permission to copy, distribute and modify it."
41305
41306 ac_pwd='$ac_pwd'
41307 srcdir='$srcdir'
41308 INSTALL='$INSTALL'
41309 MKDIR_P='$MKDIR_P'
41310 AWK='$AWK'
41311 test -n "\$AWK" || AWK=awk
41312 _ACEOF
41313
41314 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41315 # The default lists apply if the user does not specify any file.
41316 ac_need_defaults=:
41317 while test $# != 0
41318 do
41319   case $1 in
41320   --*=?*)
41321     ac_option=`expr "X$1" : 'X\([^=]*\)='`
41322     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
41323     ac_shift=:
41324     ;;
41325   --*=)
41326     ac_option=`expr "X$1" : 'X\([^=]*\)='`
41327     ac_optarg=
41328     ac_shift=:
41329     ;;
41330   *)
41331     ac_option=$1
41332     ac_optarg=$2
41333     ac_shift=shift
41334     ;;
41335   esac
41336
41337   case $ac_option in
41338   # Handling of the options.
41339   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
41340     ac_cs_recheck=: ;;
41341   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
41342     printf "%s\n" "$ac_cs_version"; exit ;;
41343   --config | --confi | --conf | --con | --co | --c )
41344     printf "%s\n" "$ac_cs_config"; exit ;;
41345   --debug | --debu | --deb | --de | --d | -d )
41346     debug=: ;;
41347   --file | --fil | --fi | --f )
41348     $ac_shift
41349     case $ac_optarg in
41350     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
41351     '') as_fn_error $? "missing file argument" ;;
41352     esac
41353     as_fn_append CONFIG_FILES " '$ac_optarg'"
41354     ac_need_defaults=false;;
41355   --header | --heade | --head | --hea )
41356     $ac_shift
41357     case $ac_optarg in
41358     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
41359     esac
41360     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
41361     ac_need_defaults=false;;
41362   --he | --h)
41363     # Conflict between --help and --header
41364     as_fn_error $? "ambiguous option: \`$1'
41365 Try \`$0 --help' for more information.";;
41366   --help | --hel | -h )
41367     printf "%s\n" "$ac_cs_usage"; exit ;;
41368   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
41369   | -silent | --silent | --silen | --sile | --sil | --si | --s)
41370     ac_cs_silent=: ;;
41371
41372   # This is an error.
41373   -*) as_fn_error $? "unrecognized option: \`$1'
41374 Try \`$0 --help' for more information." ;;
41375
41376   *) as_fn_append ac_config_targets " $1"
41377      ac_need_defaults=false ;;
41378
41379   esac
41380   shift
41381 done
41382
41383 ac_configure_extra_args=
41384
41385 if $ac_cs_silent; then
41386   exec 6>/dev/null
41387   ac_configure_extra_args="$ac_configure_extra_args --silent"
41388 fi
41389
41390 _ACEOF
41391 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41392 if \$ac_cs_recheck; then
41393   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
41394   shift
41395   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
41396   CONFIG_SHELL='$SHELL'
41397   export CONFIG_SHELL
41398   exec "\$@"
41399 fi
41400
41401 _ACEOF
41402 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41403 exec 5>>config.log
41404 {
41405   echo
41406   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
41407 ## Running $as_me. ##
41408 _ASBOX
41409   printf "%s\n" "$ac_log"
41410 } >&5
41411
41412 _ACEOF
41413 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41414 #
41415 # INIT-COMMANDS
41416 #
41417 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
41418 GNUmakefile=$GNUmakefile
41419 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
41420     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
41421     # from automake < 1.5.
41422     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
41423     # Capture the value of LINGUAS because we need it to compute CATALOGS.
41424     LINGUAS="${LINGUAS-%UNSET%}"
41425
41426
41427 _ACEOF
41428
41429 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41430
41431 # Handling of arguments.
41432 for ac_config_target in $ac_config_targets
41433 do
41434   case $ac_config_target in
41435     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
41436     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
41437     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
41438     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
41439     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
41440     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
41441     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
41442     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
41443     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
41444     "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
41445     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
41446     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
41447
41448   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
41449   esac
41450 done
41451
41452
41453 # If the user did not use the arguments to specify the items to instantiate,
41454 # then the envvar interface is used.  Set only those that are not.
41455 # We use the long form for the default assignment because of an extremely
41456 # bizarre bug on SunOS 4.1.3.
41457 if $ac_need_defaults; then
41458   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
41459   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
41460   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
41461   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
41462 fi
41463
41464 # Have a temporary directory for convenience.  Make it in the build tree
41465 # simply because there is no reason against having it here, and in addition,
41466 # creating and moving files from /tmp can sometimes cause problems.
41467 # Hook for its removal unless debugging.
41468 # Note that there is a small window in which the directory will not be cleaned:
41469 # after its creation but before its name has been assigned to `$tmp'.
41470 $debug ||
41471 {
41472   tmp= ac_tmp=
41473   trap 'exit_status=$?
41474   : "${ac_tmp:=$tmp}"
41475   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
41476 ' 0
41477   trap 'as_fn_exit 1' 1 2 13 15
41478 }
41479 # Create a (secure) tmp directory for tmp files.
41480
41481 {
41482   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
41483   test -d "$tmp"
41484 }  ||
41485 {
41486   tmp=./conf$$-$RANDOM
41487   (umask 077 && mkdir "$tmp")
41488 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
41489 ac_tmp=$tmp
41490
41491 # Set up the scripts for CONFIG_FILES section.
41492 # No need to generate them if there are no CONFIG_FILES.
41493 # This happens for instance with `./config.status config.h'.
41494 if test -n "$CONFIG_FILES"; then
41495
41496
41497 ac_cr=`echo X | tr X '\015'`
41498 # On cygwin, bash can eat \r inside `` if the user requested igncr.
41499 # But we know of no other shell where ac_cr would be empty at this
41500 # point, so we can use a bashism as a fallback.
41501 if test "x$ac_cr" = x; then
41502   eval ac_cr=\$\'\\r\'
41503 fi
41504 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
41505 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
41506   ac_cs_awk_cr='\\r'
41507 else
41508   ac_cs_awk_cr=$ac_cr
41509 fi
41510
41511 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
41512 _ACEOF
41513
41514
41515 {
41516   echo "cat >conf$$subs.awk <<_ACEOF" &&
41517   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
41518   echo "_ACEOF"
41519 } >conf$$subs.sh ||
41520   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41521 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
41522 ac_delim='%!_!# '
41523 for ac_last_try in false false false false false :; do
41524   . ./conf$$subs.sh ||
41525     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41526
41527   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
41528   if test $ac_delim_n = $ac_delim_num; then
41529     break
41530   elif $ac_last_try; then
41531     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41532   else
41533     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
41534   fi
41535 done
41536 rm -f conf$$subs.sh
41537
41538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41539 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
41540 _ACEOF
41541 sed -n '
41542 h
41543 s/^/S["/; s/!.*/"]=/
41544 p
41545 g
41546 s/^[^!]*!//
41547 :repl
41548 t repl
41549 s/'"$ac_delim"'$//
41550 t delim
41551 :nl
41552 h
41553 s/\(.\{148\}\)..*/\1/
41554 t more1
41555 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
41556 p
41557 n
41558 b repl
41559 :more1
41560 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
41561 p
41562 g
41563 s/.\{148\}//
41564 t nl
41565 :delim
41566 h
41567 s/\(.\{148\}\)..*/\1/
41568 t more2
41569 s/["\\]/\\&/g; s/^/"/; s/$/"/
41570 p
41571 b
41572 :more2
41573 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
41574 p
41575 g
41576 s/.\{148\}//
41577 t delim
41578 ' <conf$$subs.awk | sed '
41579 /^[^""]/{
41580   N
41581   s/\n//
41582 }
41583 ' >>$CONFIG_STATUS || ac_write_fail=1
41584 rm -f conf$$subs.awk
41585 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41586 _ACAWK
41587 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
41588   for (key in S) S_is_set[key] = 1
41589   FS = "\a"
41590
41591 }
41592 {
41593   line = $ 0
41594   nfields = split(line, field, "@")
41595   substed = 0
41596   len = length(field[1])
41597   for (i = 2; i < nfields; i++) {
41598     key = field[i]
41599     keylen = length(key)
41600     if (S_is_set[key]) {
41601       value = S[key]
41602       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
41603       len += length(value) + length(field[++i])
41604       substed = 1
41605     } else
41606       len += 1 + keylen
41607   }
41608
41609   print line
41610 }
41611
41612 _ACAWK
41613 _ACEOF
41614 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41615 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
41616   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
41617 else
41618   cat
41619 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
41620   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
41621 _ACEOF
41622
41623 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
41624 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
41625 # trailing colons and then remove the whole line if VPATH becomes empty
41626 # (actually we leave an empty line to preserve line numbers).
41627 if test "x$srcdir" = x.; then
41628   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
41629 h
41630 s///
41631 s/^/:/
41632 s/[      ]*$/:/
41633 s/:\$(srcdir):/:/g
41634 s/:\${srcdir}:/:/g
41635 s/:@srcdir@:/:/g
41636 s/^:*//
41637 s/:*$//
41638 x
41639 s/\(=[   ]*\).*/\1/
41640 G
41641 s/\n//
41642 s/^[^=]*=[       ]*$//
41643 }'
41644 fi
41645
41646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41647 fi # test -n "$CONFIG_FILES"
41648
41649 # Set up the scripts for CONFIG_HEADERS section.
41650 # No need to generate them if there are no CONFIG_HEADERS.
41651 # This happens for instance with `./config.status Makefile'.
41652 if test -n "$CONFIG_HEADERS"; then
41653 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
41654 BEGIN {
41655 _ACEOF
41656
41657 # Transform confdefs.h into an awk script `defines.awk', embedded as
41658 # here-document in config.status, that substitutes the proper values into
41659 # config.h.in to produce config.h.
41660
41661 # Create a delimiter string that does not exist in confdefs.h, to ease
41662 # handling of long lines.
41663 ac_delim='%!_!# '
41664 for ac_last_try in false false :; do
41665   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
41666   if test -z "$ac_tt"; then
41667     break
41668   elif $ac_last_try; then
41669     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
41670   else
41671     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
41672   fi
41673 done
41674
41675 # For the awk script, D is an array of macro values keyed by name,
41676 # likewise P contains macro parameters if any.  Preserve backslash
41677 # newline sequences.
41678
41679 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
41680 sed -n '
41681 s/.\{148\}/&'"$ac_delim"'/g
41682 t rset
41683 :rset
41684 s/^[     ]*#[    ]*define[       ][      ]*/ /
41685 t def
41686 d
41687 :def
41688 s/\\$//
41689 t bsnl
41690 s/["\\]/\\&/g
41691 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
41692 D["\1"]=" \3"/p
41693 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
41694 d
41695 :bsnl
41696 s/["\\]/\\&/g
41697 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
41698 D["\1"]=" \3\\\\\\n"\\/p
41699 t cont
41700 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
41701 t cont
41702 d
41703 :cont
41704 n
41705 s/.\{148\}/&'"$ac_delim"'/g
41706 t clear
41707 :clear
41708 s/\\$//
41709 t bsnlc
41710 s/["\\]/\\&/g; s/^/"/; s/$/"/p
41711 d
41712 :bsnlc
41713 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
41714 b cont
41715 ' <confdefs.h | sed '
41716 s/'"$ac_delim"'/"\\\
41717 "/g' >>$CONFIG_STATUS || ac_write_fail=1
41718
41719 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41720   for (key in D) D_is_set[key] = 1
41721   FS = "\a"
41722 }
41723 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
41724   line = \$ 0
41725   split(line, arg, " ")
41726   if (arg[1] == "#") {
41727     defundef = arg[2]
41728     mac1 = arg[3]
41729   } else {
41730     defundef = substr(arg[1], 2)
41731     mac1 = arg[2]
41732   }
41733   split(mac1, mac2, "(") #)
41734   macro = mac2[1]
41735   prefix = substr(line, 1, index(line, defundef) - 1)
41736   if (D_is_set[macro]) {
41737     # Preserve the white space surrounding the "#".
41738     print prefix "define", macro P[macro] D[macro]
41739     next
41740   } else {
41741     # Replace #undef with comments.  This is necessary, for example,
41742     # in the case of _POSIX_SOURCE, which is predefined and required
41743     # on some systems where configure will not decide to define it.
41744     if (defundef == "undef") {
41745       print "/*", prefix defundef, macro, "*/"
41746       next
41747     }
41748   }
41749 }
41750 { print }
41751 _ACAWK
41752 _ACEOF
41753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41754   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
41755 fi # test -n "$CONFIG_HEADERS"
41756
41757
41758 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
41759 shift
41760 for ac_tag
41761 do
41762   case $ac_tag in
41763   :[FHLC]) ac_mode=$ac_tag; continue;;
41764   esac
41765   case $ac_mode$ac_tag in
41766   :[FHL]*:*);;
41767   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
41768   :[FH]-) ac_tag=-:-;;
41769   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
41770   esac
41771   ac_save_IFS=$IFS
41772   IFS=:
41773   set x $ac_tag
41774   IFS=$ac_save_IFS
41775   shift
41776   ac_file=$1
41777   shift
41778
41779   case $ac_mode in
41780   :L) ac_source=$1;;
41781   :[FH])
41782     ac_file_inputs=
41783     for ac_f
41784     do
41785       case $ac_f in
41786       -) ac_f="$ac_tmp/stdin";;
41787       *) # Look for the file first in the build tree, then in the source tree
41788          # (if the path is not absolute).  The absolute path cannot be DOS-style,
41789          # because $ac_f cannot contain `:'.
41790          test -f "$ac_f" ||
41791            case $ac_f in
41792            [\\/$]*) false;;
41793            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
41794            esac ||
41795            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
41796       esac
41797       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
41798       as_fn_append ac_file_inputs " '$ac_f'"
41799     done
41800
41801     # Let's still pretend it is `configure' which instantiates (i.e., don't
41802     # use $as_me), people would be surprised to read:
41803     #    /* config.h.  Generated by config.status.  */
41804     configure_input='Generated from '`
41805           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
41806         `' by configure.'
41807     if test x"$ac_file" != x-; then
41808       configure_input="$ac_file.  $configure_input"
41809       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
41810 printf "%s\n" "$as_me: creating $ac_file" >&6;}
41811     fi
41812     # Neutralize special characters interpreted by sed in replacement strings.
41813     case $configure_input in #(
41814     *\&* | *\|* | *\\* )
41815        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
41816        sed 's/[\\\\&|]/\\\\&/g'`;; #(
41817     *) ac_sed_conf_input=$configure_input;;
41818     esac
41819
41820     case $ac_tag in
41821     *:-:* | *:-) cat >"$ac_tmp/stdin" \
41822       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
41823     esac
41824     ;;
41825   esac
41826
41827   ac_dir=`$as_dirname -- "$ac_file" ||
41828 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41829          X"$ac_file" : 'X\(//\)[^/]' \| \
41830          X"$ac_file" : 'X\(//\)$' \| \
41831          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
41832 printf "%s\n" X"$ac_file" |
41833     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41834             s//\1/
41835             q
41836           }
41837           /^X\(\/\/\)[^/].*/{
41838             s//\1/
41839             q
41840           }
41841           /^X\(\/\/\)$/{
41842             s//\1/
41843             q
41844           }
41845           /^X\(\/\).*/{
41846             s//\1/
41847             q
41848           }
41849           s/.*/./; q'`
41850   as_dir="$ac_dir"; as_fn_mkdir_p
41851   ac_builddir=.
41852
41853 case "$ac_dir" in
41854 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
41855 *)
41856   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
41857   # A ".." for each directory in $ac_dir_suffix.
41858   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
41859   case $ac_top_builddir_sub in
41860   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
41861   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
41862   esac ;;
41863 esac
41864 ac_abs_top_builddir=$ac_pwd
41865 ac_abs_builddir=$ac_pwd$ac_dir_suffix
41866 # for backward compatibility:
41867 ac_top_builddir=$ac_top_build_prefix
41868
41869 case $srcdir in
41870   .)  # We are building in place.
41871     ac_srcdir=.
41872     ac_top_srcdir=$ac_top_builddir_sub
41873     ac_abs_top_srcdir=$ac_pwd ;;
41874   [\\/]* | ?:[\\/]* )  # Absolute name.
41875     ac_srcdir=$srcdir$ac_dir_suffix;
41876     ac_top_srcdir=$srcdir
41877     ac_abs_top_srcdir=$srcdir ;;
41878   *) # Relative name.
41879     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
41880     ac_top_srcdir=$ac_top_build_prefix$srcdir
41881     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
41882 esac
41883 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
41884
41885
41886   case $ac_mode in
41887   :F)
41888   #
41889   # CONFIG_FILE
41890   #
41891
41892   case $INSTALL in
41893   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41894   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
41895   esac
41896   ac_MKDIR_P=$MKDIR_P
41897   case $MKDIR_P in
41898   [\\/$]* | ?:[\\/]* ) ;;
41899   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
41900   esac
41901 _ACEOF
41902
41903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41904 # If the template does not know about datarootdir, expand it.
41905 # FIXME: This hack should be removed a few years after 2.60.
41906 ac_datarootdir_hack=; ac_datarootdir_seen=
41907 ac_sed_dataroot='
41908 /datarootdir/ {
41909   p
41910   q
41911 }
41912 /@datadir@/p
41913 /@docdir@/p
41914 /@infodir@/p
41915 /@localedir@/p
41916 /@mandir@/p'
41917 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
41918 *datarootdir*) ac_datarootdir_seen=yes;;
41919 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
41920   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
41921 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
41922 _ACEOF
41923 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41924   ac_datarootdir_hack='
41925   s&@datadir@&$datadir&g
41926   s&@docdir@&$docdir&g
41927   s&@infodir@&$infodir&g
41928   s&@localedir@&$localedir&g
41929   s&@mandir@&$mandir&g
41930   s&\\\${datarootdir}&$datarootdir&g' ;;
41931 esac
41932 _ACEOF
41933
41934 # Neutralize VPATH when `$srcdir' = `.'.
41935 # Shell code in configure.ac might set extrasub.
41936 # FIXME: do we really want to maintain this feature?
41937 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41938 ac_sed_extra="$ac_vpsub
41939 $extrasub
41940 _ACEOF
41941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41942 :t
41943 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41944 s|@configure_input@|$ac_sed_conf_input|;t t
41945 s&@top_builddir@&$ac_top_builddir_sub&;t t
41946 s&@top_build_prefix@&$ac_top_build_prefix&;t t
41947 s&@srcdir@&$ac_srcdir&;t t
41948 s&@abs_srcdir@&$ac_abs_srcdir&;t t
41949 s&@top_srcdir@&$ac_top_srcdir&;t t
41950 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
41951 s&@builddir@&$ac_builddir&;t t
41952 s&@abs_builddir@&$ac_abs_builddir&;t t
41953 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
41954 s&@INSTALL@&$ac_INSTALL&;t t
41955 s&@MKDIR_P@&$ac_MKDIR_P&;t t
41956 $ac_datarootdir_hack
41957 "
41958 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
41959   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41960
41961 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
41962   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
41963   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
41964       "$ac_tmp/out"`; test -z "$ac_out"; } &&
41965   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41966 which seems to be undefined.  Please make sure it is defined" >&5
41967 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41968 which seems to be undefined.  Please make sure it is defined" >&2;}
41969
41970   rm -f "$ac_tmp/stdin"
41971   case $ac_file in
41972   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
41973   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
41974   esac \
41975   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41976  ;;
41977   :H)
41978   #
41979   # CONFIG_HEADER
41980   #
41981   if test x"$ac_file" != x-; then
41982     {
41983       printf "%s\n" "/* $configure_input  */" \
41984       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
41985     } >"$ac_tmp/config.h" \
41986       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41987     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
41988       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
41989 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
41990     else
41991       rm -f "$ac_file"
41992       mv "$ac_tmp/config.h" "$ac_file" \
41993         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41994     fi
41995   else
41996     printf "%s\n" "/* $configure_input  */" \
41997       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
41998       || as_fn_error $? "could not create -" "$LINENO" 5
41999   fi
42000 # Compute "$ac_file"'s index in $config_headers.
42001 _am_arg="$ac_file"
42002 _am_stamp_count=1
42003 for _am_header in $config_headers :; do
42004   case $_am_header in
42005     $_am_arg | $_am_arg:* )
42006       break ;;
42007     * )
42008       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
42009   esac
42010 done
42011 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
42012 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42013          X"$_am_arg" : 'X\(//\)[^/]' \| \
42014          X"$_am_arg" : 'X\(//\)$' \| \
42015          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
42016 printf "%s\n" X"$_am_arg" |
42017     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42018             s//\1/
42019             q
42020           }
42021           /^X\(\/\/\)[^/].*/{
42022             s//\1/
42023             q
42024           }
42025           /^X\(\/\/\)$/{
42026             s//\1/
42027             q
42028           }
42029           /^X\(\/\).*/{
42030             s//\1/
42031             q
42032           }
42033           s/.*/./; q'`/stamp-h$_am_stamp_count
42034  ;;
42035   :L)
42036   #
42037   # CONFIG_LINK
42038   #
42039
42040   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
42041     :
42042   else
42043     # Prefer the file from the source tree if names are identical.
42044     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
42045       ac_source=$srcdir/$ac_source
42046     fi
42047
42048     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
42049 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
42050
42051     if test ! -r "$ac_source"; then
42052       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
42053     fi
42054     rm -f "$ac_file"
42055
42056     # Try a relative symlink, then a hard link, then a copy.
42057     case $ac_source in
42058     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
42059         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
42060     esac
42061     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
42062       ln "$ac_source" "$ac_file" 2>/dev/null ||
42063       cp -p "$ac_source" "$ac_file" ||
42064       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
42065   fi
42066  ;;
42067   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
42068 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
42069  ;;
42070   esac
42071
42072
42073   case $ac_file$ac_mode in
42074     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
42075   # Older Autoconf quotes --file arguments for eval, but not when files
42076   # are listed without --file.  Let's play safe and only enable the eval
42077   # if we detect the quoting.
42078   # TODO: see whether this extra hack can be removed once we start
42079   # requiring Autoconf 2.70 or later.
42080   case $CONFIG_FILES in #(
42081   *\'*) :
42082     eval set x "$CONFIG_FILES" ;; #(
42083   *) :
42084     set x $CONFIG_FILES ;; #(
42085   *) :
42086      ;;
42087 esac
42088   shift
42089   # Used to flag and report bootstrapping failures.
42090   am_rc=0
42091   for am_mf
42092   do
42093     # Strip MF so we end up with the name of the file.
42094     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
42095     # Check whether this is an Automake generated Makefile which includes
42096     # dependency-tracking related rules and includes.
42097     # Grep'ing the whole file directly is not great: AIX grep has a line
42098     # limit of 2048, but all sed's we know have understand at least 4000.
42099     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
42100       || continue
42101     am_dirpart=`$as_dirname -- "$am_mf" ||
42102 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42103          X"$am_mf" : 'X\(//\)[^/]' \| \
42104          X"$am_mf" : 'X\(//\)$' \| \
42105          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
42106 printf "%s\n" X"$am_mf" |
42107     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42108             s//\1/
42109             q
42110           }
42111           /^X\(\/\/\)[^/].*/{
42112             s//\1/
42113             q
42114           }
42115           /^X\(\/\/\)$/{
42116             s//\1/
42117             q
42118           }
42119           /^X\(\/\).*/{
42120             s//\1/
42121             q
42122           }
42123           s/.*/./; q'`
42124     am_filepart=`$as_basename -- "$am_mf" ||
42125 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
42126          X"$am_mf" : 'X\(//\)$' \| \
42127          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
42128 printf "%s\n" X/"$am_mf" |
42129     sed '/^.*\/\([^/][^/]*\)\/*$/{
42130             s//\1/
42131             q
42132           }
42133           /^X\/\(\/\/\)$/{
42134             s//\1/
42135             q
42136           }
42137           /^X\/\(\/\).*/{
42138             s//\1/
42139             q
42140           }
42141           s/.*/./; q'`
42142     { echo "$as_me:$LINENO: cd "$am_dirpart" \
42143       && sed -e '/# am--include-marker/d' "$am_filepart" \
42144         | $MAKE -f - am--depfiles" >&5
42145    (cd "$am_dirpart" \
42146       && sed -e '/# am--include-marker/d' "$am_filepart" \
42147         | $MAKE -f - am--depfiles) >&5 2>&5
42148    ac_status=$?
42149    echo "$as_me:$LINENO: \$? = $ac_status" >&5
42150    (exit $ac_status); } || am_rc=$?
42151   done
42152   if test $am_rc -ne 0; then
42153     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42154 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
42155 as_fn_error $? "Something went wrong bootstrapping makefile fragments
42156     for automatic dependency tracking.  Try re-running configure with the
42157     '--disable-dependency-tracking' option to at least be able to build
42158     the package (albeit without support for automatic dependency tracking).
42159 See \`config.log' for more details" "$LINENO" 5; }
42160   fi
42161   { am_dirpart=; unset am_dirpart;}
42162   { am_filepart=; unset am_filepart;}
42163   { am_mf=; unset am_mf;}
42164   { am_rc=; unset am_rc;}
42165   rm -f conftest-deps.mk
42166 }
42167  ;;
42168     "po-directories":C)
42169     for ac_file in $CONFIG_FILES; do
42170       # Support "outfile[:infile[:infile...]]"
42171       case "$ac_file" in
42172         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
42173       esac
42174       # PO directories have a Makefile.in generated from Makefile.in.in.
42175       case "$ac_file" in */Makefile.in)
42176         # Adjust a relative srcdir.
42177         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
42178         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
42179         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
42180         # In autoconf-2.13 it is called $ac_given_srcdir.
42181         # In autoconf-2.50 it is called $srcdir.
42182         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
42183         case "$ac_given_srcdir" in
42184           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
42185           /*) top_srcdir="$ac_given_srcdir" ;;
42186           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
42187         esac
42188         # Treat a directory as a PO directory if and only if it has a
42189         # POTFILES.in file. This allows packages to have multiple PO
42190         # directories under different names or in different locations.
42191         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
42192           rm -f "$ac_dir/POTFILES"
42193           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
42194           gt_tab=`printf '\t'`
42195           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"
42196           POMAKEFILEDEPS="POTFILES.in"
42197           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
42198           # on $ac_dir but don't depend on user-specified configuration
42199           # parameters.
42200           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
42201             # The LINGUAS file contains the set of available languages.
42202             if test -n "$OBSOLETE_ALL_LINGUAS"; then
42203               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
42204             fi
42205             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
42206             # Hide the ALL_LINGUAS assignment from automake < 1.5.
42207             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
42208             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
42209           else
42210             # The set of available languages was given in configure.in.
42211             # Hide the ALL_LINGUAS assignment from automake < 1.5.
42212             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
42213           fi
42214           # Compute POFILES
42215           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
42216           # Compute UPDATEPOFILES
42217           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
42218           # Compute DUMMYPOFILES
42219           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
42220           # Compute GMOFILES
42221           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
42222           case "$ac_given_srcdir" in
42223             .) srcdirpre= ;;
42224             *) srcdirpre='$(srcdir)/' ;;
42225           esac
42226           POFILES=
42227           UPDATEPOFILES=
42228           DUMMYPOFILES=
42229           GMOFILES=
42230           for lang in $ALL_LINGUAS; do
42231             POFILES="$POFILES $srcdirpre$lang.po"
42232             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
42233             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
42234             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
42235           done
42236           # CATALOGS depends on both $ac_dir and the user's LINGUAS
42237           # environment variable.
42238           INST_LINGUAS=
42239           if test -n "$ALL_LINGUAS"; then
42240             for presentlang in $ALL_LINGUAS; do
42241               useit=no
42242               if test "%UNSET%" != "$LINGUAS"; then
42243                 desiredlanguages="$LINGUAS"
42244               else
42245                 desiredlanguages="$ALL_LINGUAS"
42246               fi
42247               for desiredlang in $desiredlanguages; do
42248                 # Use the presentlang catalog if desiredlang is
42249                 #   a. equal to presentlang, or
42250                 #   b. a variant of presentlang (because in this case,
42251                 #      presentlang can be used as a fallback for messages
42252                 #      which are not translated in the desiredlang catalog).
42253                 case "$desiredlang" in
42254                   "$presentlang"*) useit=yes;;
42255                 esac
42256               done
42257               if test $useit = yes; then
42258                 INST_LINGUAS="$INST_LINGUAS $presentlang"
42259               fi
42260             done
42261           fi
42262           CATALOGS=
42263           if test -n "$INST_LINGUAS"; then
42264             for lang in $INST_LINGUAS; do
42265               CATALOGS="$CATALOGS $lang.gmo"
42266             done
42267           fi
42268           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
42269           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"
42270           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
42271             if test -f "$f"; then
42272               case "$f" in
42273                 *.orig | *.bak | *~) ;;
42274                 *) cat "$f" >> "$ac_dir/Makefile" ;;
42275               esac
42276             fi
42277           done
42278         fi
42279         ;;
42280       esac
42281     done ;;
42282
42283   esac
42284 done # for ac_tag
42285
42286
42287 as_fn_exit 0
42288 _ACEOF
42289 ac_clean_files=$ac_clean_files_save
42290
42291 test $ac_write_fail = 0 ||
42292   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
42293
42294
42295 # configure is writing to config.log, and then calls config.status.
42296 # config.status does its own redirection, appending to config.log.
42297 # Unfortunately, on DOS this fails, as config.log is still kept open
42298 # by configure, so config.status won't be able to write to it; its
42299 # output is simply discarded.  So we exec the FD to /dev/null,
42300 # effectively closing config.log, so it can be properly (re)opened and
42301 # appended to by config.status.  When coming back to configure, we
42302 # need to make the FD available again.
42303 if test "$no_create" != yes; then
42304   ac_cs_success=:
42305   ac_config_status_args=
42306   test "$silent" = yes &&
42307     ac_config_status_args="$ac_config_status_args --quiet"
42308   exec 5>/dev/null
42309   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
42310   exec 5>>config.log
42311   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
42312   # would make configure fail if this is the last instruction.
42313   $ac_cs_success || as_fn_exit 1
42314 fi
42315 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
42316   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
42317 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
42318 fi
42319