Imported Upstream version 3.3
[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.79-0bdae for GNU diffutils 3.3.
4 #
5 # Report bugs to <bug-diffutils@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2013 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 -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 # The user is always right.
37 if test "${PATH_SEPARATOR+set}" != set; then
38   PATH_SEPARATOR=:
39   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
41       PATH_SEPARATOR=';'
42   }
43 fi
44
45
46 # IFS
47 # We need space, tab and new line, in precisely that order.  Quoting is
48 # there to prevent editors from complaining about space-tab.
49 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
50 # splitting by setting IFS to empty value.)
51 as_nl='
52 '
53 export as_nl
54 IFS=" ""        $as_nl"
55
56 # Find who we are.  Look in the path if we contain no directory separator.
57 as_myself=
58 case $0 in #((
59   *[\\/]* ) as_myself=$0 ;;
60   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61 for as_dir in $PATH
62 do
63   IFS=$as_save_IFS
64   case $as_dir in #(((
65     '') as_dir=./ ;;
66     */) ;;
67     *) as_dir=$as_dir/ ;;
68   esac
69     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
70   done
71 IFS=$as_save_IFS
72
73      ;;
74 esac
75 # We did not find ourselves, most probably we were run as `sh COMMAND'
76 # in which case we are not to be found in the path.
77 if test "x$as_myself" = x; then
78   as_myself=$0
79 fi
80 if test ! -f "$as_myself"; then
81   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
82   exit 1
83 fi
84
85 # Unset variables that we do not need and which cause bugs (e.g. in
86 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
87 # suppresses any "Segmentation fault" message there.  '((' could
88 # trigger a bug in pdksh 5.2.14.
89 for as_var in BASH_ENV ENV MAIL MAILPATH
90 do eval test x\${$as_var+set} = xset \
91   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
92 done
93 PS1='$ '
94 PS2='> '
95 PS4='+ '
96
97 # NLS nuisances.
98 LC_ALL=C
99 export LC_ALL
100 LANGUAGE=C
101 export LANGUAGE
102
103 # CDPATH.
104 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
105
106 # Use a proper internal environment variable to ensure we don't fall
107   # into an infinite loop, continuously re-executing ourselves.
108   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
109     _as_can_reexec=no; export _as_can_reexec;
110     # We cannot yet assume a decent shell, so we have to provide a
111 # neutralization value for shells without unset; and this also
112 # works around shells that cannot unset nonexistent variables.
113 # Preserve -v and -x to the replacement shell.
114 BASH_ENV=/dev/null
115 ENV=/dev/null
116 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
117 case $- in # ((((
118   *v*x* | *x*v* ) as_opts=-vx ;;
119   *v* ) as_opts=-v ;;
120   *x* ) as_opts=-x ;;
121   * ) as_opts= ;;
122 esac
123 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
124 # Admittedly, this is quite paranoid, since all the known shells bail
125 # out after a failed `exec'.
126 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
127 as_fn_exit 255
128   fi
129   # We don't want this to propagate to other subprocesses.
130           { _as_can_reexec=; unset _as_can_reexec;}
131 if test "x$CONFIG_SHELL" = x; then
132   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
133   emulate sh
134   NULLCMD=:
135   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
136   # is contrary to our usage.  Disable this feature.
137   alias -g '\${1+\"\$@\"}'='\"\$@\"'
138   setopt NO_GLOB_SUBST
139 else
140   case \`(set -o) 2>/dev/null\` in #(
141   *posix*) :
142     set -o posix ;; #(
143   *) :
144      ;;
145 esac
146 fi
147 "
148   as_required="as_fn_return () { (exit \$1); }
149 as_fn_success () { as_fn_return 0; }
150 as_fn_failure () { as_fn_return 1; }
151 as_fn_ret_success () { return 0; }
152 as_fn_ret_failure () { return 1; }
153
154 exitcode=0
155 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
156 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
157 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
158 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
159 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
160
161 else
162   exitcode=1; echo positional parameters were not saved.
163 fi
164 test x\$exitcode = x0 || exit 1
165 test -x / || exit 1"
166   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
167   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
168   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
169   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
170 test \$(( 1 + 1 )) = 2 || exit 1"
171   if (eval "$as_required") 2>/dev/null; then :
172   as_have_required=yes
173 else
174   as_have_required=no
175 fi
176   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
177
178 else
179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
180 as_found=false
181 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
182 do
183   IFS=$as_save_IFS
184   case $as_dir in #(((
185     '') as_dir=./ ;;
186     */) ;;
187     *) as_dir=$as_dir/ ;;
188   esac
189   as_found=:
190   case $as_dir in #(
191          /*)
192            for as_base in sh bash ksh sh5; do
193              # Try only shells that exist, to save several forks.
194              as_shell=$as_dir$as_base
195              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   CONFIG_SHELL=$as_shell as_have_required=yes
198                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199   break 2
200 fi
201 fi
202            done;;
203        esac
204   as_found=false
205 done
206 IFS=$as_save_IFS
207 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
208               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
209   CONFIG_SHELL=$SHELL as_have_required=yes
210 fi; }
211
212
213       if test "x$CONFIG_SHELL" != x; then :
214   export CONFIG_SHELL
215              # We cannot yet assume a decent shell, so we have to provide a
216 # neutralization value for shells without unset; and this also
217 # works around shells that cannot unset nonexistent variables.
218 # Preserve -v and -x to the replacement shell.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 case $- in # ((((
223   *v*x* | *x*v* ) as_opts=-vx ;;
224   *v* ) as_opts=-v ;;
225   *x* ) as_opts=-x ;;
226   * ) as_opts= ;;
227 esac
228 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
229 # Admittedly, this is quite paranoid, since all the known shells bail
230 # out after a failed `exec'.
231 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
232 exit 255
233 fi
234
235     if test x$as_have_required = xno; then :
236   printf "%s\n" "$0: This script requires a shell more modern than all"
237   printf "%s\n" "$0: the shells that I found on your system."
238   if test x${ZSH_VERSION+set} = xset ; then
239     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
241   else
242     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
243 $0: bug-diffutils@gnu.org about your system, including any
244 $0: error possibly output before this message. Then install
245 $0: a modern shell, or manually run the script under such a
246 $0: shell if you do have one."
247   fi
248   exit 1
249 fi
250 fi
251 fi
252 SHELL=${CONFIG_SHELL-/bin/sh}
253 export SHELL
254 # Unset more variables known to interfere with behavior of common tools.
255 CLICOLOR_FORCE= GREP_OPTIONS=
256 unset CLICOLOR_FORCE GREP_OPTIONS
257
258 ## --------------------- ##
259 ## M4sh Shell Functions. ##
260 ## --------------------- ##
261 # as_fn_unset VAR
262 # ---------------
263 # Portably unset VAR.
264 as_fn_unset ()
265 {
266   { eval $1=; unset $1;}
267 }
268 as_unset=as_fn_unset
269
270 # as_fn_set_status STATUS
271 # -----------------------
272 # Set $? to STATUS, without forking.
273 as_fn_set_status ()
274 {
275   return $1
276 } # as_fn_set_status
277
278 # as_fn_exit STATUS
279 # -----------------
280 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281 as_fn_exit ()
282 {
283   set +e
284   as_fn_set_status $1
285   exit $1
286 } # as_fn_exit
287
288 # as_fn_mkdir_p
289 # -------------
290 # Create "$as_dir" as a directory, including parents if necessary.
291 as_fn_mkdir_p ()
292 {
293
294   case $as_dir in #(
295   -*) as_dir=./$as_dir;;
296   esac
297   test -d "$as_dir" || eval $as_mkdir_p || {
298     as_dirs=
299     while :; do
300       case $as_dir in #(
301       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302       *) as_qdir=$as_dir;;
303       esac
304       as_dirs="'$as_qdir' $as_dirs"
305       as_dir=`$as_dirname -- "$as_dir" ||
306 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307          X"$as_dir" : 'X\(//\)[^/]' \| \
308          X"$as_dir" : 'X\(//\)$' \| \
309          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310 printf "%s\n" X"$as_dir" |
311     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312             s//\1/
313             q
314           }
315           /^X\(\/\/\)[^/].*/{
316             s//\1/
317             q
318           }
319           /^X\(\/\/\)$/{
320             s//\1/
321             q
322           }
323           /^X\(\/\).*/{
324             s//\1/
325             q
326           }
327           s/.*/./; q'`
328       test -d "$as_dir" && break
329     done
330     test -z "$as_dirs" || eval "mkdir $as_dirs"
331   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332
333
334 } # as_fn_mkdir_p
335
336 # as_fn_executable_p FILE
337 # -----------------------
338 # Test if FILE is an executable regular file.
339 as_fn_executable_p ()
340 {
341   test -f "$1" && test -x "$1"
342 } # as_fn_executable_p
343 # as_fn_append VAR VALUE
344 # ----------------------
345 # Append the text in VALUE to the end of the definition contained in VAR. Take
346 # advantage of any shell optimizations that allow amortized linear growth over
347 # repeated appends, instead of the typical quadratic growth present in naive
348 # implementations.
349 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
350   eval 'as_fn_append ()
351   {
352     eval $1+=\$2
353   }'
354 else
355   as_fn_append ()
356   {
357     eval $1=\$$1\$2
358   }
359 fi # as_fn_append
360
361 # as_fn_arith ARG...
362 # ------------------
363 # Perform arithmetic evaluation on the ARGs, and store the result in the
364 # global $as_val. Take advantage of shells that can avoid forks. The arguments
365 # must be portable across $(()) and expr.
366 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
367   eval 'as_fn_arith ()
368   {
369     as_val=$(( $* ))
370   }'
371 else
372   as_fn_arith ()
373   {
374     as_val=`expr "$@" || test $? -eq 1`
375   }
376 fi # as_fn_arith
377
378
379 # as_fn_error STATUS ERROR [LINENO LOG_FD]
380 # ----------------------------------------
381 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
382 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
383 # script with STATUS, using 1 if that was 0.
384 as_fn_error ()
385 {
386   as_status=$1; test $as_status -eq 0 && as_status=1
387   if test "$4"; then
388     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
389     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
390   fi
391   printf "%s\n" "$as_me: error: $2" >&2
392   as_fn_exit $as_status
393 } # as_fn_error
394
395 if expr a : '\(a\)' >/dev/null 2>&1 &&
396    test "X`expr 00001 : '.*\(...\)'`" = X001; then
397   as_expr=expr
398 else
399   as_expr=false
400 fi
401
402 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
403   as_basename=basename
404 else
405   as_basename=false
406 fi
407
408 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
409   as_dirname=dirname
410 else
411   as_dirname=false
412 fi
413
414 as_me=`$as_basename -- "$0" ||
415 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
416          X"$0" : 'X\(//\)$' \| \
417          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
418 printf "%s\n" X/"$0" |
419     sed '/^.*\/\([^/][^/]*\)\/*$/{
420             s//\1/
421             q
422           }
423           /^X\/\(\/\/\)$/{
424             s//\1/
425             q
426           }
427           /^X\/\(\/\).*/{
428             s//\1/
429             q
430           }
431           s/.*/./; q'`
432
433 # Avoid depending upon Character Ranges.
434 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
435 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
436 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
437 as_cr_digits='0123456789'
438 as_cr_alnum=$as_cr_Letters$as_cr_digits
439
440
441   as_lineno_1=$LINENO as_lineno_1a=$LINENO
442   as_lineno_2=$LINENO as_lineno_2a=$LINENO
443   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
444   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
445   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
446   sed -n '
447     p
448     /[$]LINENO/=
449   ' <$as_myself |
450     sed '
451       s/[$]LINENO.*/&-/
452       t lineno
453       b
454       :lineno
455       N
456       :loop
457       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
458       t loop
459       s/-\n.*//
460     ' >$as_me.lineno &&
461   chmod +x "$as_me.lineno" ||
462     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
463
464   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
465   # already done that, so ensure we don't try to do so again and fall
466   # in an infinite loop.  This has already happened in practice.
467   _as_can_reexec=no; export _as_can_reexec
468   # Don't try to exec as it changes $[0], causing all sort of problems
469   # (the dirname of $[0] is not the place where we might find the
470   # original and so on.  Autoconf is especially sensitive to this).
471   . "./$as_me.lineno"
472   # Exit status is that of the last command.
473   exit
474 }
475
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in #(((((
478 -n*)
479   case `echo 'xy\c'` in
480   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
481   xy)  ECHO_C='\c';;
482   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
483        ECHO_T=' ';;
484   esac;;
485 *)
486   ECHO_N='-n';;
487 esac
488
489 rm -f conf$$ conf$$.exe conf$$.file
490 if test -d conf$$.dir; then
491   rm -f conf$$.dir/conf$$.file
492 else
493   rm -f conf$$.dir
494   mkdir conf$$.dir 2>/dev/null
495 fi
496 if (echo >conf$$.file) 2>/dev/null; then
497   if ln -s conf$$.file conf$$ 2>/dev/null; then
498     as_ln_s='ln -s'
499     # ... but there are two gotchas:
500     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
501     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
502     # In both cases, we have to default to `cp -pR'.
503     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
504       as_ln_s='cp -pR'
505   elif ln conf$$.file conf$$ 2>/dev/null; then
506     as_ln_s=ln
507   else
508     as_ln_s='cp -pR'
509   fi
510 else
511   as_ln_s='cp -pR'
512 fi
513 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
514 rmdir conf$$.dir 2>/dev/null
515
516 if mkdir -p . 2>/dev/null; then
517   as_mkdir_p='mkdir -p "$as_dir"'
518 else
519   test -d ./-p && rmdir ./-p
520   as_mkdir_p=false
521 fi
522
523 as_test_x='test -x'
524 as_executable_p=as_fn_executable_p
525
526 # Sed expression to map a string onto a valid CPP name.
527 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
528
529 # Sed expression to map a string onto a valid variable name.
530 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
531
532
533 test -n "$DJDIR" || exec 7<&0 </dev/null
534 exec 6>&1
535
536 # Name of the host.
537 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
538 # so uname gets run too.
539 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
541 #
542 # Initializations.
543 #
544 ac_default_prefix=/usr/local
545 ac_clean_files=
546 ac_config_libobj_dir=.
547 LIBOBJS=
548 cross_compiling=no
549 subdirs=
550 MFLAGS=
551 MAKEFLAGS=
552
553 # Identity of this package.
554 PACKAGE_NAME='GNU diffutils'
555 PACKAGE_TARNAME='diffutils'
556 PACKAGE_VERSION='3.3'
557 PACKAGE_STRING='GNU diffutils 3.3'
558 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
559 PACKAGE_URL='http://www.gnu.org/software/diffutils/'
560
561 ac_unique_file="src/diff.c"
562 # Factoring default headers for most tests.
563 ac_includes_default="\
564 #include <stdio.h>
565 #ifdef HAVE_SYS_TYPES_H
566 # include <sys/types.h>
567 #endif
568 #ifdef HAVE_SYS_STAT_H
569 # include <sys/stat.h>
570 #endif
571 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
572 # include <stdlib.h>
573 #endif
574 #include <stddef.h>
575 #ifdef HAVE_STRING_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577 #  include <memory.h>
578 # endif
579 # include <string.h>
580 #endif
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
583 #endif
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
586 #endif
587 #ifdef HAVE_STDINT_H
588 # include <stdint.h>
589 #endif
590 #ifdef HAVE_UNISTD_H
591 # include <unistd.h>
592 #endif"
593
594 ac_func_list=
595 ac_header_list=
596 gl_fnmatch_required=POSIX
597 gl_getopt_required=POSIX
598 gl_getopt_required=POSIX
599 gt_needs=
600 ac_subst_vars='gltests_LTLIBOBJS
601 gltests_LIBOBJS
602 gl_LTLIBOBJS
603 gl_LIBOBJS
604 CONFIG_INCLUDE
605 am__EXEEXT_FALSE
606 am__EXEEXT_TRUE
607 LTLIBOBJS
608 LIBOBJS
609 POSUB
610 INTLLIBS
611 INTL_MACOSX_LIBS
612 XGETTEXT_EXTRA_OPTIONS
613 MSGMERGE
614 XGETTEXT_015
615 XGETTEXT
616 GMSGFMT_015
617 MSGFMT_015
618 GMSGFMT
619 MSGFMT
620 GETTEXT_MACRO_VERSION
621 USE_NLS
622 SRC_VERSION_C
623 PR_PROGRAM
624 GNULIB_WARN_CFLAGS
625 WARN_CFLAGS
626 WERROR_CFLAGS
627 LIBTESTS_LIBDEPS
628 LIBDIFFUTILS_LTLIBDEPS
629 LIBDIFFUTILS_LIBDEPS
630 abs_aux_dir
631 LOCALE_TR_UTF8
632 gltests_WITNESS
633 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
634 NEXT_WCHAR_H
635 HAVE_FEATURES_H
636 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
637 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
638 LIBUNISTRING_UNIWIDTH_H
639 LIBUNISTRING_UNITYPES_H
640 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
641 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
642 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
643 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
644 LIBUNISTRING_UNISTR_H
645 HAVE_UNISTD_H
646 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
647 NEXT_UNISTD_H
648 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
649 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
650 TIME_H_DEFINES_STRUCT_TIMESPEC
651 NEXT_AS_FIRST_DIRECTIVE_TIME_H
652 NEXT_TIME_H
653 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
654 NEXT_SYS_WAIT_H
655 GNULIB_WAITPID
656 WINDOWS_64_BIT_OFF_T
657 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
658 NEXT_SYS_TYPES_H
659 HAVE_STRINGS_H
660 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
661 NEXT_STRINGS_H
662 NEXT_AS_FIRST_DIRECTIVE_STRING_H
663 NEXT_STRING_H
664 HAVE_DECL_STRNCASECMP
665 HAVE_STRCASECMP
666 HAVE_FFS
667 GNULIB_FFS
668 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
669 NEXT_STDLIB_H
670 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
671 NEXT_STDIO_H
672 HAVE__BOOL
673 GL_GENERATE_STDBOOL_H_FALSE
674 GL_GENERATE_STDBOOL_H_TRUE
675 STDBOOL_H
676 GL_GENERATE_STDARG_H_FALSE
677 GL_GENERATE_STDARG_H_TRUE
678 STDARG_H
679 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
680 NEXT_STDARG_H
681 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
682 NEXT_SIGNAL_H
683 REPLACE_RAISE
684 REPLACE_PTHREAD_SIGMASK
685 HAVE_SIGHANDLER_T
686 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
687 HAVE_STRUCT_SIGACTION_SA_SIGACTION
688 HAVE_SIGACTION
689 HAVE_SIGINFO_T
690 HAVE_SIGSET_T
691 HAVE_RAISE
692 HAVE_PTHREAD_SIGMASK
693 HAVE_POSIX_SIGNALBLOCKING
694 GNULIB_SIGACTION
695 GNULIB_SIGPROCMASK
696 GNULIB_SIGNAL_H_SIGPIPE
697 GNULIB_RAISE
698 GNULIB_PTHREAD_SIGMASK
699 REPLACE_TIMEGM
700 REPLACE_NANOSLEEP
701 REPLACE_MKTIME
702 REPLACE_LOCALTIME_R
703 HAVE_TIMEGM
704 HAVE_STRPTIME
705 HAVE_NANOSLEEP
706 HAVE_DECL_LOCALTIME_R
707 GNULIB_TIME_R
708 GNULIB_TIMEGM
709 GNULIB_STRPTIME
710 GNULIB_NANOSLEEP
711 GNULIB_MKTIME
712 UNDEFINE_STRTOK_R
713 REPLACE_STRTOK_R
714 REPLACE_STRSIGNAL
715 REPLACE_STRNLEN
716 REPLACE_STRNDUP
717 REPLACE_STRNCAT
718 REPLACE_STRERROR_R
719 REPLACE_STRERROR
720 REPLACE_STRCHRNUL
721 REPLACE_STRCASESTR
722 REPLACE_STRSTR
723 REPLACE_STRDUP
724 REPLACE_STPNCPY
725 REPLACE_MEMMEM
726 REPLACE_MEMCHR
727 HAVE_STRVERSCMP
728 HAVE_DECL_STRSIGNAL
729 HAVE_DECL_STRERROR_R
730 HAVE_DECL_STRTOK_R
731 HAVE_STRCASESTR
732 HAVE_STRSEP
733 HAVE_STRPBRK
734 HAVE_DECL_STRNLEN
735 HAVE_DECL_STRNDUP
736 HAVE_DECL_STRDUP
737 HAVE_STRCHRNUL
738 HAVE_STPNCPY
739 HAVE_STPCPY
740 HAVE_RAWMEMCHR
741 HAVE_DECL_MEMRCHR
742 HAVE_MEMPCPY
743 HAVE_DECL_MEMMEM
744 HAVE_MEMCHR
745 HAVE_FFSLL
746 HAVE_FFSL
747 HAVE_MBSLEN
748 GNULIB_STRVERSCMP
749 GNULIB_STRSIGNAL
750 GNULIB_STRERROR_R
751 GNULIB_STRERROR
752 GNULIB_MBSTOK_R
753 GNULIB_MBSSEP
754 GNULIB_MBSSPN
755 GNULIB_MBSPBRK
756 GNULIB_MBSCSPN
757 GNULIB_MBSCASESTR
758 GNULIB_MBSPCASECMP
759 GNULIB_MBSNCASECMP
760 GNULIB_MBSCASECMP
761 GNULIB_MBSSTR
762 GNULIB_MBSRCHR
763 GNULIB_MBSCHR
764 GNULIB_MBSNLEN
765 GNULIB_MBSLEN
766 GNULIB_STRTOK_R
767 GNULIB_STRCASESTR
768 GNULIB_STRSTR
769 GNULIB_STRSEP
770 GNULIB_STRPBRK
771 GNULIB_STRNLEN
772 GNULIB_STRNDUP
773 GNULIB_STRNCAT
774 GNULIB_STRDUP
775 GNULIB_STRCHRNUL
776 GNULIB_STPNCPY
777 GNULIB_STPCPY
778 GNULIB_RAWMEMCHR
779 GNULIB_MEMRCHR
780 GNULIB_MEMPCPY
781 GNULIB_MEMMEM
782 GNULIB_MEMCHR
783 GNULIB_FFSLL
784 GNULIB_FFSL
785 LOCALE_FR_UTF8
786 LOCALE_ZH_CN
787 LOCALE_JA
788 REPLACE_WCTOMB
789 REPLACE_UNSETENV
790 REPLACE_STRTOD
791 REPLACE_SETENV
792 REPLACE_REALPATH
793 REPLACE_REALLOC
794 REPLACE_RANDOM_R
795 REPLACE_PUTENV
796 REPLACE_PTSNAME_R
797 REPLACE_PTSNAME
798 REPLACE_MKSTEMP
799 REPLACE_MBTOWC
800 REPLACE_MALLOC
801 REPLACE_CANONICALIZE_FILE_NAME
802 REPLACE_CALLOC
803 HAVE_DECL_UNSETENV
804 HAVE_UNLOCKPT
805 HAVE_SYS_LOADAVG_H
806 HAVE_STRUCT_RANDOM_DATA
807 HAVE_STRTOULL
808 HAVE_STRTOLL
809 HAVE_STRTOD
810 HAVE_DECL_SETENV
811 HAVE_SETENV
812 HAVE_SECURE_GETENV
813 HAVE_RPMATCH
814 HAVE_REALPATH
815 HAVE_RANDOM_R
816 HAVE_RANDOM_H
817 HAVE_RANDOM
818 HAVE_PTSNAME_R
819 HAVE_PTSNAME
820 HAVE_POSIX_OPENPT
821 HAVE_MKSTEMPS
822 HAVE_MKSTEMP
823 HAVE_MKOSTEMPS
824 HAVE_MKOSTEMP
825 HAVE_MKDTEMP
826 HAVE_GRANTPT
827 HAVE_GETSUBOPT
828 HAVE_DECL_GETLOADAVG
829 HAVE_CANONICALIZE_FILE_NAME
830 HAVE_ATOLL
831 HAVE__EXIT
832 GNULIB_WCTOMB
833 GNULIB_UNSETENV
834 GNULIB_UNLOCKPT
835 GNULIB_SYSTEM_POSIX
836 GNULIB_STRTOULL
837 GNULIB_STRTOLL
838 GNULIB_STRTOD
839 GNULIB_SETENV
840 GNULIB_SECURE_GETENV
841 GNULIB_RPMATCH
842 GNULIB_REALPATH
843 GNULIB_REALLOC_POSIX
844 GNULIB_RANDOM_R
845 GNULIB_RANDOM
846 GNULIB_PUTENV
847 GNULIB_PTSNAME_R
848 GNULIB_PTSNAME
849 GNULIB_POSIX_OPENPT
850 GNULIB_MKSTEMPS
851 GNULIB_MKSTEMP
852 GNULIB_MKOSTEMPS
853 GNULIB_MKOSTEMP
854 GNULIB_MKDTEMP
855 GNULIB_MBTOWC
856 GNULIB_MALLOC_POSIX
857 GNULIB_GRANTPT
858 GNULIB_GETSUBOPT
859 GNULIB_GETLOADAVG
860 GNULIB_CANONICALIZE_FILE_NAME
861 GNULIB_CALLOC_POSIX
862 GNULIB_ATOLL
863 GNULIB__EXIT
864 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
865 NEXT_LOCALE_H
866 HAVE_XLOCALE_H
867 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
868 NEXT_STDDEF_H
869 GL_GENERATE_STDDEF_H_FALSE
870 GL_GENERATE_STDDEF_H_TRUE
871 STDDEF_H
872 HAVE_WCHAR_T
873 REPLACE_NULL
874 REPLACE_STRUCT_LCONV
875 REPLACE_DUPLOCALE
876 REPLACE_SETLOCALE
877 REPLACE_LOCALECONV
878 HAVE_DUPLOCALE
879 GNULIB_DUPLOCALE
880 GNULIB_SETLOCALE
881 GNULIB_LOCALECONV
882 LOCALCHARSET_TESTS_ENVIRONMENT
883 GLIBC21
884 HAVE_LANGINFO_YESEXPR
885 HAVE_LANGINFO_ERA
886 HAVE_LANGINFO_T_FMT_AMPM
887 HAVE_LANGINFO_CODESET
888 HAVE_LANGINFO_H
889 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
890 NEXT_LANGINFO_H
891 REPLACE_NL_LANGINFO
892 HAVE_NL_LANGINFO
893 GNULIB_NL_LANGINFO
894 REPLACE_TOWLOWER
895 REPLACE_ISWCNTRL
896 HAVE_WCTYPE_H
897 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
898 NEXT_WCTYPE_H
899 HAVE_WINT_T
900 HAVE_ISWCNTRL
901 REPLACE_ISWBLANK
902 HAVE_WCTRANS_T
903 HAVE_WCTYPE_T
904 HAVE_ISWBLANK
905 GNULIB_TOWCTRANS
906 GNULIB_WCTRANS
907 GNULIB_ISWCTYPE
908 GNULIB_WCTYPE
909 GNULIB_ISWBLANK
910 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
911 NEXT_INTTYPES_H
912 UINT64_MAX_EQ_ULONG_MAX
913 UINT32_MAX_LT_UINTMAX_MAX
914 PRIPTR_PREFIX
915 PRI_MACROS_BROKEN
916 INT64_MAX_EQ_LONG_MAX
917 INT32_MAX_LT_INTMAX_MAX
918 REPLACE_STRTOIMAX
919 HAVE_DECL_STRTOUMAX
920 HAVE_DECL_STRTOIMAX
921 HAVE_DECL_IMAXDIV
922 HAVE_DECL_IMAXABS
923 GNULIB_STRTOUMAX
924 GNULIB_STRTOIMAX
925 GNULIB_IMAXDIV
926 GNULIB_IMAXABS
927 GL_GENERATE_STDINT_H_FALSE
928 GL_GENERATE_STDINT_H_TRUE
929 STDINT_H
930 WINT_T_SUFFIX
931 WCHAR_T_SUFFIX
932 SIG_ATOMIC_T_SUFFIX
933 SIZE_T_SUFFIX
934 PTRDIFF_T_SUFFIX
935 HAVE_SIGNED_WINT_T
936 HAVE_SIGNED_WCHAR_T
937 HAVE_SIGNED_SIG_ATOMIC_T
938 BITSIZEOF_WINT_T
939 BITSIZEOF_WCHAR_T
940 BITSIZEOF_SIG_ATOMIC_T
941 BITSIZEOF_SIZE_T
942 BITSIZEOF_PTRDIFF_T
943 APPLE_UNIVERSAL_BUILD
944 HAVE_SYS_BITYPES_H
945 HAVE_SYS_INTTYPES_H
946 HAVE_STDINT_H
947 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
948 NEXT_STDINT_H
949 HAVE_SYS_TYPES_H
950 HAVE_INTTYPES_H
951 HAVE_WCHAR_H
952 HAVE_UNSIGNED_LONG_LONG_INT
953 HAVE_LONG_LONG_INT
954 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
955 NEXT_ICONV_H
956 GL_GENERATE_ICONV_H_FALSE
957 GL_GENERATE_ICONV_H_TRUE
958 ICONV_H
959 REPLACE_ICONV_UTF
960 REPLACE_ICONV_OPEN
961 REPLACE_ICONV
962 ICONV_CONST
963 GNULIB_ICONV
964 LTLIBICONV
965 LIBICONV
966 GNU_MAKE_FALSE
967 GNU_MAKE_TRUE
968 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
969 NEXT_SYS_TIME_H
970 REPLACE_STRUCT_TIMEVAL
971 REPLACE_GETTIMEOFDAY
972 HAVE_SYS_TIME_H
973 HAVE_STRUCT_TIMEVAL
974 HAVE_GETTIMEOFDAY
975 GNULIB_GETTIMEOFDAY
976 LTLIBINTL
977 LIBINTL
978 GNULIB_GL_UNISTD_H_GETOPT
979 GETOPT_H
980 HAVE_GETOPT_H
981 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
982 NEXT_GETOPT_H
983 WINDOWS_64_BIT_ST_SIZE
984 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
985 NEXT_SYS_STAT_H
986 REPLACE_UTIMENSAT
987 REPLACE_STAT
988 REPLACE_MKNOD
989 REPLACE_MKFIFO
990 REPLACE_MKDIR
991 REPLACE_LSTAT
992 REPLACE_FUTIMENS
993 REPLACE_FSTATAT
994 REPLACE_FSTAT
995 HAVE_UTIMENSAT
996 HAVE_MKNODAT
997 HAVE_MKNOD
998 HAVE_MKFIFOAT
999 HAVE_MKFIFO
1000 HAVE_MKDIRAT
1001 HAVE_LSTAT
1002 HAVE_LCHMOD
1003 HAVE_FUTIMENS
1004 HAVE_FSTATAT
1005 HAVE_FCHMODAT
1006 GNULIB_UTIMENSAT
1007 GNULIB_STAT
1008 GNULIB_MKNODAT
1009 GNULIB_MKNOD
1010 GNULIB_MKFIFOAT
1011 GNULIB_MKFIFO
1012 GNULIB_MKDIRAT
1013 GNULIB_LSTAT
1014 GNULIB_LCHMOD
1015 GNULIB_FUTIMENS
1016 GNULIB_FSTATAT
1017 GNULIB_FSTAT
1018 GNULIB_FCHMODAT
1019 REPLACE_VSPRINTF
1020 REPLACE_VSNPRINTF
1021 REPLACE_VPRINTF
1022 REPLACE_VFPRINTF
1023 REPLACE_VDPRINTF
1024 REPLACE_VASPRINTF
1025 REPLACE_TMPFILE
1026 REPLACE_STDIO_WRITE_FUNCS
1027 REPLACE_STDIO_READ_FUNCS
1028 REPLACE_SPRINTF
1029 REPLACE_SNPRINTF
1030 REPLACE_RENAMEAT
1031 REPLACE_RENAME
1032 REPLACE_REMOVE
1033 REPLACE_PRINTF
1034 REPLACE_POPEN
1035 REPLACE_PERROR
1036 REPLACE_OBSTACK_PRINTF
1037 REPLACE_GETLINE
1038 REPLACE_GETDELIM
1039 REPLACE_FTELLO
1040 REPLACE_FTELL
1041 REPLACE_FSEEKO
1042 REPLACE_FSEEK
1043 REPLACE_FREOPEN
1044 REPLACE_FPURGE
1045 REPLACE_FPRINTF
1046 REPLACE_FOPEN
1047 REPLACE_FFLUSH
1048 REPLACE_FDOPEN
1049 REPLACE_FCLOSE
1050 REPLACE_DPRINTF
1051 HAVE_VDPRINTF
1052 HAVE_VASPRINTF
1053 HAVE_RENAMEAT
1054 HAVE_POPEN
1055 HAVE_PCLOSE
1056 HAVE_FTELLO
1057 HAVE_FSEEKO
1058 HAVE_DPRINTF
1059 HAVE_DECL_VSNPRINTF
1060 HAVE_DECL_SNPRINTF
1061 HAVE_DECL_OBSTACK_PRINTF
1062 HAVE_DECL_GETLINE
1063 HAVE_DECL_GETDELIM
1064 HAVE_DECL_FTELLO
1065 HAVE_DECL_FSEEKO
1066 HAVE_DECL_FPURGE
1067 GNULIB_VSPRINTF_POSIX
1068 GNULIB_VSNPRINTF
1069 GNULIB_VPRINTF_POSIX
1070 GNULIB_VPRINTF
1071 GNULIB_VFPRINTF_POSIX
1072 GNULIB_VFPRINTF
1073 GNULIB_VDPRINTF
1074 GNULIB_VSCANF
1075 GNULIB_VFSCANF
1076 GNULIB_VASPRINTF
1077 GNULIB_TMPFILE
1078 GNULIB_STDIO_H_SIGPIPE
1079 GNULIB_STDIO_H_NONBLOCKING
1080 GNULIB_SPRINTF_POSIX
1081 GNULIB_SNPRINTF
1082 GNULIB_SCANF
1083 GNULIB_RENAMEAT
1084 GNULIB_RENAME
1085 GNULIB_REMOVE
1086 GNULIB_PUTS
1087 GNULIB_PUTCHAR
1088 GNULIB_PUTC
1089 GNULIB_PRINTF_POSIX
1090 GNULIB_PRINTF
1091 GNULIB_POPEN
1092 GNULIB_PERROR
1093 GNULIB_PCLOSE
1094 GNULIB_OBSTACK_PRINTF_POSIX
1095 GNULIB_OBSTACK_PRINTF
1096 GNULIB_GETLINE
1097 GNULIB_GETDELIM
1098 GNULIB_GETCHAR
1099 GNULIB_GETC
1100 GNULIB_FWRITE
1101 GNULIB_FTELLO
1102 GNULIB_FTELL
1103 GNULIB_FSEEKO
1104 GNULIB_FSEEK
1105 GNULIB_FSCANF
1106 GNULIB_FREOPEN
1107 GNULIB_FREAD
1108 GNULIB_FPUTS
1109 GNULIB_FPUTC
1110 GNULIB_FPURGE
1111 GNULIB_FPRINTF_POSIX
1112 GNULIB_FPRINTF
1113 GNULIB_FOPEN
1114 GNULIB_FGETS
1115 GNULIB_FGETC
1116 GNULIB_FFLUSH
1117 GNULIB_FDOPEN
1118 GNULIB_FCLOSE
1119 GNULIB_DPRINTF
1120 GL_GENERATE_FNMATCH_H_FALSE
1121 GL_GENERATE_FNMATCH_H_TRUE
1122 FNMATCH_H
1123 REPLACE_ITOLD
1124 GL_GENERATE_FLOAT_H_FALSE
1125 GL_GENERATE_FLOAT_H_TRUE
1126 FLOAT_H
1127 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1128 NEXT_FLOAT_H
1129 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1130 NEXT_FCNTL_H
1131 REPLACE_OPENAT
1132 REPLACE_OPEN
1133 REPLACE_FCNTL
1134 HAVE_OPENAT
1135 HAVE_FCNTL
1136 GNULIB_OPENAT
1137 GNULIB_OPEN
1138 GNULIB_NONBLOCKING
1139 GNULIB_FCNTL
1140 EOVERFLOW_VALUE
1141 EOVERFLOW_HIDDEN
1142 ENOLINK_VALUE
1143 ENOLINK_HIDDEN
1144 EMULTIHOP_VALUE
1145 EMULTIHOP_HIDDEN
1146 GL_GENERATE_ERRNO_H_FALSE
1147 GL_GENERATE_ERRNO_H_TRUE
1148 ERRNO_H
1149 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1150 NEXT_ERRNO_H
1151 PRAGMA_COLUMNS
1152 PRAGMA_SYSTEM_HEADER
1153 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1154 INCLUDE_NEXT
1155 pkglibexecdir
1156 lispdir
1157 HAVE_WINSOCK2_H
1158 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1159 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1160 UNISTD_H_HAVE_WINSOCK2_H
1161 REPLACE_WRITE
1162 REPLACE_USLEEP
1163 REPLACE_UNLINKAT
1164 REPLACE_UNLINK
1165 REPLACE_TTYNAME_R
1166 REPLACE_SYMLINK
1167 REPLACE_SLEEP
1168 REPLACE_RMDIR
1169 REPLACE_READLINK
1170 REPLACE_READ
1171 REPLACE_PWRITE
1172 REPLACE_PREAD
1173 REPLACE_LSEEK
1174 REPLACE_LINKAT
1175 REPLACE_LINK
1176 REPLACE_LCHOWN
1177 REPLACE_ISATTY
1178 REPLACE_GETPAGESIZE
1179 REPLACE_GETGROUPS
1180 REPLACE_GETLOGIN_R
1181 REPLACE_GETDOMAINNAME
1182 REPLACE_GETCWD
1183 REPLACE_FTRUNCATE
1184 REPLACE_FCHOWNAT
1185 REPLACE_DUP2
1186 REPLACE_DUP
1187 REPLACE_CLOSE
1188 REPLACE_CHOWN
1189 HAVE_SYS_PARAM_H
1190 HAVE_OS_H
1191 HAVE_DECL_TTYNAME_R
1192 HAVE_DECL_SETHOSTNAME
1193 HAVE_DECL_GETUSERSHELL
1194 HAVE_DECL_GETPAGESIZE
1195 HAVE_DECL_GETLOGIN_R
1196 HAVE_DECL_GETDOMAINNAME
1197 HAVE_DECL_FDATASYNC
1198 HAVE_DECL_FCHDIR
1199 HAVE_DECL_ENVIRON
1200 HAVE_USLEEP
1201 HAVE_UNLINKAT
1202 HAVE_SYMLINKAT
1203 HAVE_SYMLINK
1204 HAVE_SLEEP
1205 HAVE_SETHOSTNAME
1206 HAVE_READLINKAT
1207 HAVE_READLINK
1208 HAVE_PWRITE
1209 HAVE_PREAD
1210 HAVE_PIPE2
1211 HAVE_PIPE
1212 HAVE_LINKAT
1213 HAVE_LINK
1214 HAVE_LCHOWN
1215 HAVE_GROUP_MEMBER
1216 HAVE_GETPAGESIZE
1217 HAVE_GETLOGIN
1218 HAVE_GETHOSTNAME
1219 HAVE_GETGROUPS
1220 HAVE_GETDTABLESIZE
1221 HAVE_FTRUNCATE
1222 HAVE_FSYNC
1223 HAVE_FDATASYNC
1224 HAVE_FCHOWNAT
1225 HAVE_FCHDIR
1226 HAVE_FACCESSAT
1227 HAVE_EUIDACCESS
1228 HAVE_DUP3
1229 HAVE_DUP2
1230 HAVE_CHOWN
1231 GNULIB_WRITE
1232 GNULIB_USLEEP
1233 GNULIB_UNLINKAT
1234 GNULIB_UNLINK
1235 GNULIB_UNISTD_H_SIGPIPE
1236 GNULIB_UNISTD_H_NONBLOCKING
1237 GNULIB_TTYNAME_R
1238 GNULIB_SYMLINKAT
1239 GNULIB_SYMLINK
1240 GNULIB_SLEEP
1241 GNULIB_SETHOSTNAME
1242 GNULIB_RMDIR
1243 GNULIB_READLINKAT
1244 GNULIB_READLINK
1245 GNULIB_READ
1246 GNULIB_PWRITE
1247 GNULIB_PREAD
1248 GNULIB_PIPE2
1249 GNULIB_PIPE
1250 GNULIB_LSEEK
1251 GNULIB_LINKAT
1252 GNULIB_LINK
1253 GNULIB_LCHOWN
1254 GNULIB_ISATTY
1255 GNULIB_GROUP_MEMBER
1256 GNULIB_GETUSERSHELL
1257 GNULIB_GETPAGESIZE
1258 GNULIB_GETLOGIN_R
1259 GNULIB_GETLOGIN
1260 GNULIB_GETHOSTNAME
1261 GNULIB_GETGROUPS
1262 GNULIB_GETDTABLESIZE
1263 GNULIB_GETDOMAINNAME
1264 GNULIB_GETCWD
1265 GNULIB_FTRUNCATE
1266 GNULIB_FSYNC
1267 GNULIB_FDATASYNC
1268 GNULIB_FCHOWNAT
1269 GNULIB_FCHDIR
1270 GNULIB_FACCESSAT
1271 GNULIB_EUIDACCESS
1272 GNULIB_ENVIRON
1273 GNULIB_DUP3
1274 GNULIB_DUP2
1275 GNULIB_DUP
1276 GNULIB_CLOSE
1277 GNULIB_CHOWN
1278 GNULIB_CHDIR
1279 LIB_CLOCK_GETTIME
1280 LTLIBCSTACK
1281 LIBCSTACK
1282 LIBSIGSEGV_PREFIX
1283 LTLIBSIGSEGV
1284 LIBSIGSEGV
1285 HAVE_LIBSIGSEGV
1286 LOCALE_FR
1287 REPLACE_WCSWIDTH
1288 REPLACE_WCWIDTH
1289 REPLACE_WCSNRTOMBS
1290 REPLACE_WCSRTOMBS
1291 REPLACE_WCRTOMB
1292 REPLACE_MBSNRTOWCS
1293 REPLACE_MBSRTOWCS
1294 REPLACE_MBRLEN
1295 REPLACE_MBRTOWC
1296 REPLACE_MBSINIT
1297 REPLACE_WCTOB
1298 REPLACE_BTOWC
1299 REPLACE_MBSTATE_T
1300 HAVE_DECL_WCWIDTH
1301 HAVE_DECL_WCTOB
1302 HAVE_WCSWIDTH
1303 HAVE_WCSTOK
1304 HAVE_WCSSTR
1305 HAVE_WCSPBRK
1306 HAVE_WCSSPN
1307 HAVE_WCSCSPN
1308 HAVE_WCSRCHR
1309 HAVE_WCSCHR
1310 HAVE_WCSDUP
1311 HAVE_WCSXFRM
1312 HAVE_WCSCOLL
1313 HAVE_WCSNCASECMP
1314 HAVE_WCSCASECMP
1315 HAVE_WCSNCMP
1316 HAVE_WCSCMP
1317 HAVE_WCSNCAT
1318 HAVE_WCSCAT
1319 HAVE_WCPNCPY
1320 HAVE_WCSNCPY
1321 HAVE_WCPCPY
1322 HAVE_WCSCPY
1323 HAVE_WCSNLEN
1324 HAVE_WCSLEN
1325 HAVE_WMEMSET
1326 HAVE_WMEMMOVE
1327 HAVE_WMEMCPY
1328 HAVE_WMEMCMP
1329 HAVE_WMEMCHR
1330 HAVE_WCSNRTOMBS
1331 HAVE_WCSRTOMBS
1332 HAVE_WCRTOMB
1333 HAVE_MBSNRTOWCS
1334 HAVE_MBSRTOWCS
1335 HAVE_MBRLEN
1336 HAVE_MBRTOWC
1337 HAVE_MBSINIT
1338 HAVE_BTOWC
1339 GNULIB_WCSWIDTH
1340 GNULIB_WCSTOK
1341 GNULIB_WCSSTR
1342 GNULIB_WCSPBRK
1343 GNULIB_WCSSPN
1344 GNULIB_WCSCSPN
1345 GNULIB_WCSRCHR
1346 GNULIB_WCSCHR
1347 GNULIB_WCSDUP
1348 GNULIB_WCSXFRM
1349 GNULIB_WCSCOLL
1350 GNULIB_WCSNCASECMP
1351 GNULIB_WCSCASECMP
1352 GNULIB_WCSNCMP
1353 GNULIB_WCSCMP
1354 GNULIB_WCSNCAT
1355 GNULIB_WCSCAT
1356 GNULIB_WCPNCPY
1357 GNULIB_WCSNCPY
1358 GNULIB_WCPCPY
1359 GNULIB_WCSCPY
1360 GNULIB_WCSNLEN
1361 GNULIB_WCSLEN
1362 GNULIB_WMEMSET
1363 GNULIB_WMEMMOVE
1364 GNULIB_WMEMCPY
1365 GNULIB_WMEMCMP
1366 GNULIB_WMEMCHR
1367 GNULIB_WCWIDTH
1368 GNULIB_WCSNRTOMBS
1369 GNULIB_WCSRTOMBS
1370 GNULIB_WCRTOMB
1371 GNULIB_MBSNRTOWCS
1372 GNULIB_MBSRTOWCS
1373 GNULIB_MBRLEN
1374 GNULIB_MBRTOWC
1375 GNULIB_MBSINIT
1376 GNULIB_WCTOB
1377 GNULIB_BTOWC
1378 GL_GENERATE_ALLOCA_H_FALSE
1379 GL_GENERATE_ALLOCA_H_TRUE
1380 ALLOCA_H
1381 ALLOCA
1382 GL_COND_LIBTOOL_FALSE
1383 GL_COND_LIBTOOL_TRUE
1384 host_os
1385 host_vendor
1386 host_cpu
1387 host
1388 build_os
1389 build_vendor
1390 build_cpu
1391 build
1392 ARFLAGS
1393 AR
1394 EGREP
1395 GREP
1396 CPP
1397 RANLIB
1398 HELP2MAN
1399 am__fastdepCC_FALSE
1400 am__fastdepCC_TRUE
1401 CCDEPMODE
1402 am__nodep
1403 AMDEPBACKSLASH
1404 AMDEP_FALSE
1405 AMDEP_TRUE
1406 am__quote
1407 am__include
1408 DEPDIR
1409 OBJEXT
1410 EXEEXT
1411 ac_ct_CC
1412 CPPFLAGS
1413 LDFLAGS
1414 CFLAGS
1415 CC
1416 AM_BACKSLASH
1417 AM_DEFAULT_VERBOSITY
1418 AM_DEFAULT_V
1419 AM_V
1420 am__untar
1421 am__tar
1422 AMTAR
1423 SET_MAKE
1424 AWK
1425 MKDIR_P
1426 INSTALL_STRIP_PROGRAM
1427 STRIP
1428 install_sh
1429 MAKEINFO
1430 AUTOHEADER
1431 AUTOMAKE
1432 AUTOCONF
1433 ACLOCAL
1434 VERSION
1435 PACKAGE
1436 CYGPATH_W
1437 am__isrc
1438 INSTALL_DATA
1439 INSTALL_SCRIPT
1440 INSTALL_PROGRAM
1441 target_alias
1442 host_alias
1443 build_alias
1444 LIBS
1445 ECHO_T
1446 ECHO_N
1447 ECHO_C
1448 DEFS
1449 mandir
1450 localedir
1451 libdir
1452 psdir
1453 pdfdir
1454 dvidir
1455 htmldir
1456 infodir
1457 docdir
1458 oldincludedir
1459 includedir
1460 localstatedir
1461 sharedstatedir
1462 sysconfdir
1463 datadir
1464 datarootdir
1465 libexecdir
1466 sbindir
1467 bindir
1468 program_transform_name
1469 prefix
1470 exec_prefix
1471 PACKAGE_URL
1472 PACKAGE_BUGREPORT
1473 PACKAGE_STRING
1474 PACKAGE_VERSION
1475 PACKAGE_TARNAME
1476 PACKAGE_NAME
1477 PATH_SEPARATOR
1478 SHELL'
1479 ac_subst_files=''
1480 ac_user_opts='
1481 enable_option_checking
1482 enable_silent_rules
1483 enable_dependency_tracking
1484 enable_largefile
1485 with_gnu_ld
1486 enable_rpath
1487 with_libsigsegv_prefix
1488 with_libiconv_prefix
1489 with_included_regex
1490 with_packager
1491 with_packager_version
1492 with_packager_bug_reports
1493 enable_gcc_warnings
1494 enable_nls
1495 with_libintl_prefix
1496 '
1497       ac_precious_vars='build_alias
1498 host_alias
1499 target_alias
1500 CC
1501 CFLAGS
1502 LDFLAGS
1503 LIBS
1504 CPPFLAGS
1505 CPP'
1506
1507
1508 # Initialize some variables set by options.
1509 ac_init_help=
1510 ac_init_version=false
1511 ac_unrecognized_opts=
1512 ac_unrecognized_sep=
1513 # The variables have the same names as the options, with
1514 # dashes changed to underlines.
1515 cache_file=/dev/null
1516 exec_prefix=NONE
1517 no_create=
1518 no_recursion=
1519 prefix=NONE
1520 program_prefix=NONE
1521 program_suffix=NONE
1522 program_transform_name=s,x,x,
1523 silent=
1524 site=
1525 srcdir=
1526 verbose=
1527 x_includes=NONE
1528 x_libraries=NONE
1529
1530 # Installation directory options.
1531 # These are left unexpanded so users can "make install exec_prefix=/foo"
1532 # and all the variables that are supposed to be based on exec_prefix
1533 # by default will actually change.
1534 # Use braces instead of parens because sh, perl, etc. also accept them.
1535 # (The list follows the same order as the GNU Coding Standards.)
1536 bindir='${exec_prefix}/bin'
1537 sbindir='${exec_prefix}/sbin'
1538 libexecdir='${exec_prefix}/libexec'
1539 datarootdir='${prefix}/share'
1540 datadir='${datarootdir}'
1541 sysconfdir='${prefix}/etc'
1542 sharedstatedir='${prefix}/com'
1543 localstatedir='${prefix}/var'
1544 includedir='${prefix}/include'
1545 oldincludedir='/usr/include'
1546 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1547 infodir='${datarootdir}/info'
1548 htmldir='${docdir}'
1549 dvidir='${docdir}'
1550 pdfdir='${docdir}'
1551 psdir='${docdir}'
1552 libdir='${exec_prefix}/lib'
1553 localedir='${datarootdir}/locale'
1554 mandir='${datarootdir}/man'
1555
1556 ac_prev=
1557 ac_dashdash=
1558 for ac_option
1559 do
1560   # If the previous option needs an argument, assign it.
1561   if test -n "$ac_prev"; then
1562     eval $ac_prev=\$ac_option
1563     ac_prev=
1564     continue
1565   fi
1566
1567   case $ac_option in
1568   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1569   *=)   ac_optarg= ;;
1570   *)    ac_optarg=yes ;;
1571   esac
1572
1573   # Accept the important Cygnus configure options, so we can diagnose typos.
1574
1575   case $ac_dashdash$ac_option in
1576   --)
1577     ac_dashdash=yes ;;
1578
1579   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1580     ac_prev=bindir ;;
1581   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1582     bindir=$ac_optarg ;;
1583
1584   -build | --build | --buil | --bui | --bu)
1585     ac_prev=build_alias ;;
1586   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1587     build_alias=$ac_optarg ;;
1588
1589   -cache-file | --cache-file | --cache-fil | --cache-fi \
1590   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1591     ac_prev=cache_file ;;
1592   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1593   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1594     cache_file=$ac_optarg ;;
1595
1596   --config-cache | -C)
1597     cache_file=config.cache ;;
1598
1599   -datadir | --datadir | --datadi | --datad)
1600     ac_prev=datadir ;;
1601   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1602     datadir=$ac_optarg ;;
1603
1604   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1605   | --dataroo | --dataro | --datar)
1606     ac_prev=datarootdir ;;
1607   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1608   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1609     datarootdir=$ac_optarg ;;
1610
1611   -disable-* | --disable-*)
1612     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1613     # Reject names that are not valid shell variable names.
1614     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1615       as_fn_error $? "invalid feature name: $ac_useropt"
1616     ac_useropt_orig=$ac_useropt
1617     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1618     case $ac_user_opts in
1619       *"
1620 "enable_$ac_useropt"
1621 "*) ;;
1622       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1623          ac_unrecognized_sep=', ';;
1624     esac
1625     eval enable_$ac_useropt=no ;;
1626
1627   -docdir | --docdir | --docdi | --doc | --do)
1628     ac_prev=docdir ;;
1629   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1630     docdir=$ac_optarg ;;
1631
1632   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1633     ac_prev=dvidir ;;
1634   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1635     dvidir=$ac_optarg ;;
1636
1637   -enable-* | --enable-*)
1638     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1639     # Reject names that are not valid shell variable names.
1640     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1641       as_fn_error $? "invalid feature name: $ac_useropt"
1642     ac_useropt_orig=$ac_useropt
1643     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1644     case $ac_user_opts in
1645       *"
1646 "enable_$ac_useropt"
1647 "*) ;;
1648       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1649          ac_unrecognized_sep=', ';;
1650     esac
1651     eval enable_$ac_useropt=\$ac_optarg ;;
1652
1653   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1654   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1655   | --exec | --exe | --ex)
1656     ac_prev=exec_prefix ;;
1657   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1658   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1659   | --exec=* | --exe=* | --ex=*)
1660     exec_prefix=$ac_optarg ;;
1661
1662   -gas | --gas | --ga | --g)
1663     # Obsolete; use --with-gas.
1664     with_gas=yes ;;
1665
1666   -help | --help | --hel | --he | -h)
1667     ac_init_help=long ;;
1668   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1669     ac_init_help=recursive ;;
1670   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1671     ac_init_help=short ;;
1672
1673   -host | --host | --hos | --ho)
1674     ac_prev=host_alias ;;
1675   -host=* | --host=* | --hos=* | --ho=*)
1676     host_alias=$ac_optarg ;;
1677
1678   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1679     ac_prev=htmldir ;;
1680   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1681   | --ht=*)
1682     htmldir=$ac_optarg ;;
1683
1684   -includedir | --includedir | --includedi | --included | --include \
1685   | --includ | --inclu | --incl | --inc)
1686     ac_prev=includedir ;;
1687   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1688   | --includ=* | --inclu=* | --incl=* | --inc=*)
1689     includedir=$ac_optarg ;;
1690
1691   -infodir | --infodir | --infodi | --infod | --info | --inf)
1692     ac_prev=infodir ;;
1693   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1694     infodir=$ac_optarg ;;
1695
1696   -libdir | --libdir | --libdi | --libd)
1697     ac_prev=libdir ;;
1698   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1699     libdir=$ac_optarg ;;
1700
1701   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1702   | --libexe | --libex | --libe)
1703     ac_prev=libexecdir ;;
1704   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1705   | --libexe=* | --libex=* | --libe=*)
1706     libexecdir=$ac_optarg ;;
1707
1708   -localedir | --localedir | --localedi | --localed | --locale)
1709     ac_prev=localedir ;;
1710   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1711     localedir=$ac_optarg ;;
1712
1713   -localstatedir | --localstatedir | --localstatedi | --localstated \
1714   | --localstate | --localstat | --localsta | --localst | --locals)
1715     ac_prev=localstatedir ;;
1716   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1717   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1718     localstatedir=$ac_optarg ;;
1719
1720   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1721     ac_prev=mandir ;;
1722   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1723     mandir=$ac_optarg ;;
1724
1725   -nfp | --nfp | --nf)
1726     # Obsolete; use --without-fp.
1727     with_fp=no ;;
1728
1729   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1730   | --no-cr | --no-c | -n)
1731     no_create=yes ;;
1732
1733   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1734   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1735     no_recursion=yes ;;
1736
1737   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1738   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1739   | --oldin | --oldi | --old | --ol | --o)
1740     ac_prev=oldincludedir ;;
1741   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1742   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1743   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1744     oldincludedir=$ac_optarg ;;
1745
1746   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1747     ac_prev=prefix ;;
1748   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1749     prefix=$ac_optarg ;;
1750
1751   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1752   | --program-pre | --program-pr | --program-p)
1753     ac_prev=program_prefix ;;
1754   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1755   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1756     program_prefix=$ac_optarg ;;
1757
1758   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1759   | --program-suf | --program-su | --program-s)
1760     ac_prev=program_suffix ;;
1761   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1762   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1763     program_suffix=$ac_optarg ;;
1764
1765   -program-transform-name | --program-transform-name \
1766   | --program-transform-nam | --program-transform-na \
1767   | --program-transform-n | --program-transform- \
1768   | --program-transform | --program-transfor \
1769   | --program-transfo | --program-transf \
1770   | --program-trans | --program-tran \
1771   | --progr-tra | --program-tr | --program-t)
1772     ac_prev=program_transform_name ;;
1773   -program-transform-name=* | --program-transform-name=* \
1774   | --program-transform-nam=* | --program-transform-na=* \
1775   | --program-transform-n=* | --program-transform-=* \
1776   | --program-transform=* | --program-transfor=* \
1777   | --program-transfo=* | --program-transf=* \
1778   | --program-trans=* | --program-tran=* \
1779   | --progr-tra=* | --program-tr=* | --program-t=*)
1780     program_transform_name=$ac_optarg ;;
1781
1782   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1783     ac_prev=pdfdir ;;
1784   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1785     pdfdir=$ac_optarg ;;
1786
1787   -psdir | --psdir | --psdi | --psd | --ps)
1788     ac_prev=psdir ;;
1789   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1790     psdir=$ac_optarg ;;
1791
1792   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1793   | -silent | --silent | --silen | --sile | --sil)
1794     silent=yes ;;
1795
1796   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1797     ac_prev=sbindir ;;
1798   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1799   | --sbi=* | --sb=*)
1800     sbindir=$ac_optarg ;;
1801
1802   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1803   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1804   | --sharedst | --shareds | --shared | --share | --shar \
1805   | --sha | --sh)
1806     ac_prev=sharedstatedir ;;
1807   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1808   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1809   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1810   | --sha=* | --sh=*)
1811     sharedstatedir=$ac_optarg ;;
1812
1813   -site | --site | --sit)
1814     ac_prev=site ;;
1815   -site=* | --site=* | --sit=*)
1816     site=$ac_optarg ;;
1817
1818   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1819     ac_prev=srcdir ;;
1820   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1821     srcdir=$ac_optarg ;;
1822
1823   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1824   | --syscon | --sysco | --sysc | --sys | --sy)
1825     ac_prev=sysconfdir ;;
1826   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1827   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1828     sysconfdir=$ac_optarg ;;
1829
1830   -target | --target | --targe | --targ | --tar | --ta | --t)
1831     ac_prev=target_alias ;;
1832   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1833     target_alias=$ac_optarg ;;
1834
1835   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1836     verbose=yes ;;
1837
1838   -version | --version | --versio | --versi | --vers | -V)
1839     ac_init_version=: ;;
1840
1841   -with-* | --with-*)
1842     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1843     # Reject names that are not valid shell variable names.
1844     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1845       as_fn_error $? "invalid package name: $ac_useropt"
1846     ac_useropt_orig=$ac_useropt
1847     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1848     case $ac_user_opts in
1849       *"
1850 "with_$ac_useropt"
1851 "*) ;;
1852       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1853          ac_unrecognized_sep=', ';;
1854     esac
1855     eval with_$ac_useropt=\$ac_optarg ;;
1856
1857   -without-* | --without-*)
1858     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1859     # Reject names that are not valid shell variable names.
1860     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1861       as_fn_error $? "invalid package name: $ac_useropt"
1862     ac_useropt_orig=$ac_useropt
1863     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1864     case $ac_user_opts in
1865       *"
1866 "with_$ac_useropt"
1867 "*) ;;
1868       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1869          ac_unrecognized_sep=', ';;
1870     esac
1871     eval with_$ac_useropt=no ;;
1872
1873   --x)
1874     # Obsolete; use --with-x.
1875     with_x=yes ;;
1876
1877   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1878   | --x-incl | --x-inc | --x-in | --x-i)
1879     ac_prev=x_includes ;;
1880   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1881   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1882     x_includes=$ac_optarg ;;
1883
1884   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1885   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1886     ac_prev=x_libraries ;;
1887   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1888   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1889     x_libraries=$ac_optarg ;;
1890
1891   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1892 Try \`$0 --help' for more information"
1893     ;;
1894
1895   *=*)
1896     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1897     # Reject names that are not valid shell variable names.
1898     case $ac_envvar in #(
1899       '' | [0-9]* | *[!_$as_cr_alnum]* )
1900       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1901     esac
1902     eval $ac_envvar=\$ac_optarg
1903     export $ac_envvar ;;
1904
1905   *)
1906     # FIXME: should be removed in autoconf 3.0.
1907     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1908     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1909       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1910     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1911     ;;
1912
1913   esac
1914 done
1915
1916 if test -n "$ac_prev"; then
1917   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1918   as_fn_error $? "missing argument to $ac_option"
1919 fi
1920
1921 if test -n "$ac_unrecognized_opts"; then
1922   case $enable_option_checking in
1923     no) ;;
1924     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1925     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1926   esac
1927 fi
1928
1929 # Check all directory arguments for consistency.
1930 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1931                 datadir sysconfdir sharedstatedir localstatedir includedir \
1932                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1933                 libdir localedir mandir
1934 do
1935   eval ac_val=\$$ac_var
1936   # Remove trailing slashes.
1937   case $ac_val in
1938     */ )
1939       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1940       eval $ac_var=\$ac_val;;
1941   esac
1942   # Be sure to have absolute directory names.
1943   case $ac_val in
1944     [\\/$]* | ?:[\\/]* )  continue;;
1945     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1946   esac
1947   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1948 done
1949
1950 # There might be people who depend on the old broken behavior: `$host'
1951 # used to hold the argument of --host etc.
1952 # FIXME: To remove some day.
1953 build=$build_alias
1954 host=$host_alias
1955 target=$target_alias
1956
1957 # FIXME: To remove some day.
1958 if test "x$host_alias" != x; then
1959   if test "x$build_alias" = x; then
1960     cross_compiling=maybe
1961   elif test "x$build_alias" != "x$host_alias"; then
1962     cross_compiling=yes
1963   fi
1964 fi
1965
1966 ac_tool_prefix=
1967 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1968
1969 test "$silent" = yes && exec 6>/dev/null
1970
1971
1972 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1973 ac_ls_di=`ls -di .` &&
1974 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1975   as_fn_error $? "working directory cannot be determined"
1976 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1977   as_fn_error $? "pwd does not report name of working directory"
1978
1979
1980 # Find the source files, if location was not specified.
1981 if test -z "$srcdir"; then
1982   ac_srcdir_defaulted=yes
1983   # Try the directory containing this script, then the parent directory.
1984   ac_confdir=`$as_dirname -- "$as_myself" ||
1985 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1986          X"$as_myself" : 'X\(//\)[^/]' \| \
1987          X"$as_myself" : 'X\(//\)$' \| \
1988          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1989 printf "%s\n" X"$as_myself" |
1990     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1991             s//\1/
1992             q
1993           }
1994           /^X\(\/\/\)[^/].*/{
1995             s//\1/
1996             q
1997           }
1998           /^X\(\/\/\)$/{
1999             s//\1/
2000             q
2001           }
2002           /^X\(\/\).*/{
2003             s//\1/
2004             q
2005           }
2006           s/.*/./; q'`
2007   srcdir=$ac_confdir
2008   if test ! -r "$srcdir/$ac_unique_file"; then
2009     srcdir=..
2010   fi
2011 else
2012   ac_srcdir_defaulted=no
2013 fi
2014 if test ! -r "$srcdir/$ac_unique_file"; then
2015   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2016   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2017 fi
2018 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2019 ac_abs_confdir=`(
2020         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2021         pwd)`
2022 # When building in place, set srcdir=.
2023 if test "$ac_abs_confdir" = "$ac_pwd"; then
2024   srcdir=.
2025 fi
2026 # Remove unnecessary trailing slashes from srcdir.
2027 # Double slashes in file names in object file debugging info
2028 # mess up M-x gdb in Emacs.
2029 case $srcdir in
2030 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2031 esac
2032 for ac_var in $ac_precious_vars; do
2033   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2034   eval ac_env_${ac_var}_value=\$${ac_var}
2035   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2036   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2037 done
2038
2039 #
2040 # Report the --help message.
2041 #
2042 if test "$ac_init_help" = "long"; then
2043   # Omit some internal or obsolete options to make the list less imposing.
2044   # This message is too long to be a string in the A/UX 3.1 sh.
2045   cat <<_ACEOF
2046 \`configure' configures GNU diffutils 3.3 to adapt to many kinds of systems.
2047
2048 Usage: $0 [OPTION]... [VAR=VALUE]...
2049
2050 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2051 VAR=VALUE.  See below for descriptions of some of the useful variables.
2052
2053 Defaults for the options are specified in brackets.
2054
2055 Configuration:
2056   -h, --help              display this help and exit
2057       --help=short        display options specific to this package
2058       --help=recursive    display the short help of all the included packages
2059   -V, --version           display version information and exit
2060   -q, --quiet, --silent   do not print \`checking ...' messages
2061       --cache-file=FILE   cache test results in FILE [disabled]
2062   -C, --config-cache      alias for \`--cache-file=config.cache'
2063   -n, --no-create         do not create output files
2064       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2065
2066 Installation directories:
2067   --prefix=PREFIX         install architecture-independent files in PREFIX
2068                           [$ac_default_prefix]
2069   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2070                           [PREFIX]
2071
2072 By default, \`make install' will install all the files in
2073 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2074 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2075 for instance \`--prefix=\$HOME'.
2076
2077 For better control, use the options below.
2078
2079 Fine tuning of the installation directories:
2080   --bindir=DIR            user executables [EPREFIX/bin]
2081   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2082   --libexecdir=DIR        program executables [EPREFIX/libexec]
2083   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2084   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2085   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2086   --libdir=DIR            object code libraries [EPREFIX/lib]
2087   --includedir=DIR        C header files [PREFIX/include]
2088   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2089   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2090   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2091   --infodir=DIR           info documentation [DATAROOTDIR/info]
2092   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2093   --mandir=DIR            man documentation [DATAROOTDIR/man]
2094   --docdir=DIR            documentation root [DATAROOTDIR/doc/diffutils]
2095   --htmldir=DIR           html documentation [DOCDIR]
2096   --dvidir=DIR            dvi documentation [DOCDIR]
2097   --pdfdir=DIR            pdf documentation [DOCDIR]
2098   --psdir=DIR             ps documentation [DOCDIR]
2099 _ACEOF
2100
2101   cat <<\_ACEOF
2102
2103 Program names:
2104   --program-prefix=PREFIX            prepend PREFIX to installed program names
2105   --program-suffix=SUFFIX            append SUFFIX to installed program names
2106   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2107
2108 System types:
2109   --build=BUILD     configure for building on BUILD [guessed]
2110   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2111 _ACEOF
2112 fi
2113
2114 if test -n "$ac_init_help"; then
2115   case $ac_init_help in
2116      short | recursive ) echo "Configuration of GNU diffutils 3.3:";;
2117    esac
2118   cat <<\_ACEOF
2119
2120 Optional Features:
2121   --disable-option-checking  ignore unrecognized --enable/--with options
2122   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2123   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2124   --enable-silent-rules   less verbose build output (undo: "make V=1")
2125   --disable-silent-rules  verbose build output (undo: "make V=0")
2126   --enable-dependency-tracking
2127                           do not reject slow dependency extractors
2128   --disable-dependency-tracking
2129                           speeds up one-time build
2130   --disable-largefile     omit support for large files
2131   --disable-rpath         do not hardcode runtime library paths
2132   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2133   --disable-nls           do not use Native Language Support
2134
2135 Optional Packages:
2136   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2137   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2138   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2139   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2140   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2141   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2142   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2143   --without-included-regex
2144                           don't compile regex; this is the default on systems
2145                           with recent-enough versions of the GNU C Library
2146                           (use with caution on other systems).
2147   --with-packager         String identifying the packager of this software
2148   --with-packager-version Packager-specific version information
2149   --with-packager-bug-reports
2150                           Packager info for bug reports (URL/e-mail/...)
2151   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2152   --without-libintl-prefix     don't search for libintl in includedir and libdir
2153
2154 Some influential environment variables:
2155   CC          C compiler command
2156   CFLAGS      C compiler flags
2157   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2158               nonstandard directory <lib dir>
2159   LIBS        libraries to pass to the linker, e.g. -l<library>
2160   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2161               you have headers in a nonstandard directory <include dir>
2162   CPP         C preprocessor
2163
2164 Use these variables to override the choices made by `configure' or to help
2165 it to find libraries and programs with nonstandard names/locations.
2166
2167 Report bugs to <bug-diffutils@gnu.org>.
2168 GNU diffutils home page: <http://www.gnu.org/software/diffutils/>.
2169 General help using GNU software: <http://www.gnu.org/gethelp/>.
2170 _ACEOF
2171 ac_status=$?
2172 fi
2173
2174 if test "$ac_init_help" = "recursive"; then
2175   # If there are subdirs, report their specific --help.
2176   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2177     test -d "$ac_dir" ||
2178       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2179       continue
2180     ac_builddir=.
2181
2182 case "$ac_dir" in
2183 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2184 *)
2185   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2186   # A ".." for each directory in $ac_dir_suffix.
2187   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2188   case $ac_top_builddir_sub in
2189   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2190   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2191   esac ;;
2192 esac
2193 ac_abs_top_builddir=$ac_pwd
2194 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2195 # for backward compatibility:
2196 ac_top_builddir=$ac_top_build_prefix
2197
2198 case $srcdir in
2199   .)  # We are building in place.
2200     ac_srcdir=.
2201     ac_top_srcdir=$ac_top_builddir_sub
2202     ac_abs_top_srcdir=$ac_pwd ;;
2203   [\\/]* | ?:[\\/]* )  # Absolute name.
2204     ac_srcdir=$srcdir$ac_dir_suffix;
2205     ac_top_srcdir=$srcdir
2206     ac_abs_top_srcdir=$srcdir ;;
2207   *) # Relative name.
2208     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2209     ac_top_srcdir=$ac_top_build_prefix$srcdir
2210     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2211 esac
2212 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2213
2214     cd "$ac_dir" || { ac_status=$?; continue; }
2215     # Check for guested configure.
2216     if test -f "$ac_srcdir/configure.gnu"; then
2217       echo &&
2218       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2219     elif test -f "$ac_srcdir/configure"; then
2220       echo &&
2221       $SHELL "$ac_srcdir/configure" --help=recursive
2222     else
2223       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2224     fi || ac_status=$?
2225     cd "$ac_pwd" || { ac_status=$?; break; }
2226   done
2227 fi
2228
2229 test -n "$ac_init_help" && exit $ac_status
2230 if $ac_init_version; then
2231   cat <<\_ACEOF
2232 GNU diffutils configure 3.3
2233 generated by GNU Autoconf 2.69.79-0bdae
2234
2235 Copyright (C) 2013 Free Software Foundation, Inc.
2236 This configure script is free software; the Free Software Foundation
2237 gives unlimited permission to copy, distribute and modify it.
2238 _ACEOF
2239   exit
2240 fi
2241
2242 ## ------------------------ ##
2243 ## Autoconf initialization. ##
2244 ## ------------------------ ##
2245
2246 # ac_fn_c_try_compile LINENO
2247 # --------------------------
2248 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2249 ac_fn_c_try_compile ()
2250 {
2251   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252   rm -f conftest.$ac_objext
2253   if { { ac_try="$ac_compile"
2254 case "(($ac_try" in
2255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256   *) ac_try_echo=$ac_try;;
2257 esac
2258 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259 printf "%s\n" "$ac_try_echo"; } >&5
2260   (eval "$ac_compile") 2>conftest.err
2261   ac_status=$?
2262   if test -s conftest.err; then
2263     grep -v '^ *+' conftest.err >conftest.er1
2264     cat conftest.er1 >&5
2265     mv -f conftest.er1 conftest.err
2266   fi
2267   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2268   test $ac_status = 0; } && {
2269          test -z "$ac_c_werror_flag" ||
2270          test ! -s conftest.err
2271        } && test -s conftest.$ac_objext; then :
2272   ac_retval=0
2273 else
2274   printf "%s\n" "$as_me: failed program was:" >&5
2275 sed 's/^/| /' conftest.$ac_ext >&5
2276
2277         ac_retval=1
2278 fi
2279   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280   as_fn_set_status $ac_retval
2281
2282 } # ac_fn_c_try_compile
2283
2284 # ac_fn_c_try_cpp LINENO
2285 # ----------------------
2286 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2287 ac_fn_c_try_cpp ()
2288 {
2289   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290   if { { ac_try="$ac_cpp conftest.$ac_ext"
2291 case "(($ac_try" in
2292   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2293   *) ac_try_echo=$ac_try;;
2294 esac
2295 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2296 printf "%s\n" "$ac_try_echo"; } >&5
2297   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2298   ac_status=$?
2299   if test -s conftest.err; then
2300     grep -v '^ *+' conftest.err >conftest.er1
2301     cat conftest.er1 >&5
2302     mv -f conftest.er1 conftest.err
2303   fi
2304   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2305   test $ac_status = 0; } > conftest.i && {
2306          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2307          test ! -s conftest.err
2308        }; then :
2309   ac_retval=0
2310 else
2311   printf "%s\n" "$as_me: failed program was:" >&5
2312 sed 's/^/| /' conftest.$ac_ext >&5
2313
2314     ac_retval=1
2315 fi
2316   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317   as_fn_set_status $ac_retval
2318
2319 } # ac_fn_c_try_cpp
2320
2321 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2322 # -------------------------------------------------------
2323 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2324 # the include files in INCLUDES and setting the cache variable VAR
2325 # accordingly.
2326 ac_fn_c_check_header_mongrel ()
2327 {
2328   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2329   if eval \${$3+:} false; then :
2330   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2331 printf %s "checking for $2... " >&6; }
2332 if eval \${$3+:} false; then :
2333   printf %s "(cached) " >&6
2334 fi
2335 eval ac_res=\$$3
2336                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337 printf "%s\n" "$ac_res" >&6; }
2338 else
2339   # Is the header compilable?
2340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2341 printf %s "checking $2 usability... " >&6; }
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343 /* end confdefs.h.  */
2344 $4
2345 #include <$2>
2346 _ACEOF
2347 if ac_fn_c_try_compile "$LINENO"; then :
2348   ac_header_compiler=yes
2349 else
2350   ac_header_compiler=no
2351 fi
2352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2354 printf "%s\n" "$ac_header_compiler" >&6; }
2355
2356 # Is the header present?
2357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2358 printf %s "checking $2 presence... " >&6; }
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360 /* end confdefs.h.  */
2361 #include <$2>
2362 _ACEOF
2363 if ac_fn_c_try_cpp "$LINENO"; then :
2364   ac_header_preproc=yes
2365 else
2366   ac_header_preproc=no
2367 fi
2368 rm -f conftest.err conftest.i conftest.$ac_ext
2369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2370 printf "%s\n" "$ac_header_preproc" >&6; }
2371
2372 # So?  What about this header?
2373 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2374   yes:no: )
2375     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2376 printf "%s\n" "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2377     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2378 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2379     ;;
2380   no:yes:* )
2381     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2382 printf "%s\n" "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2383     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2384 printf "%s\n" "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2385     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2386 printf "%s\n" "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2387     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2388 printf "%s\n" "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2389     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2390 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2391 ( printf "%s\n" "## ------------------------------------ ##
2392 ## Report this to bug-diffutils@gnu.org ##
2393 ## ------------------------------------ ##"
2394      ) | sed "s/^/$as_me: WARNING:     /" >&2
2395     ;;
2396 esac
2397   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2398 printf %s "checking for $2... " >&6; }
2399 if eval \${$3+:} false; then :
2400   printf %s "(cached) " >&6
2401 else
2402   eval "$3=\$ac_header_compiler"
2403 fi
2404 eval ac_res=\$$3
2405                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 printf "%s\n" "$ac_res" >&6; }
2407 fi
2408   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409
2410 } # ac_fn_c_check_header_mongrel
2411
2412 # ac_fn_c_try_run LINENO
2413 # ----------------------
2414 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2415 # that executables *can* be run.
2416 ac_fn_c_try_run ()
2417 {
2418   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419   if { { ac_try="$ac_link"
2420 case "(($ac_try" in
2421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422   *) ac_try_echo=$ac_try;;
2423 esac
2424 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425 printf "%s\n" "$ac_try_echo"; } >&5
2426   (eval "$ac_link") 2>&5
2427   ac_status=$?
2428   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2429   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2430   { { case "(($ac_try" in
2431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432   *) ac_try_echo=$ac_try;;
2433 esac
2434 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435 printf "%s\n" "$ac_try_echo"; } >&5
2436   (eval "$ac_try") 2>&5
2437   ac_status=$?
2438   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2439   test $ac_status = 0; }; }; then :
2440   ac_retval=0
2441 else
2442   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2443        printf "%s\n" "$as_me: failed program was:" >&5
2444 sed 's/^/| /' conftest.$ac_ext >&5
2445
2446        ac_retval=$ac_status
2447 fi
2448   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2449   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450   as_fn_set_status $ac_retval
2451
2452 } # ac_fn_c_try_run
2453
2454 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2455 # -------------------------------------------------------
2456 # Tests whether HEADER exists and can be compiled using the include files in
2457 # INCLUDES, setting the cache variable VAR accordingly.
2458 ac_fn_c_check_header_compile ()
2459 {
2460   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2461   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462 printf %s "checking for $2... " >&6; }
2463 if eval \${$3+:} false; then :
2464   printf %s "(cached) " >&6
2465 else
2466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2467 /* end confdefs.h.  */
2468 $4
2469 #include <$2>
2470 _ACEOF
2471 if ac_fn_c_try_compile "$LINENO"; then :
2472   eval "$3=yes"
2473 else
2474   eval "$3=no"
2475 fi
2476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2477 fi
2478 eval ac_res=\$$3
2479                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480 printf "%s\n" "$ac_res" >&6; }
2481   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2482
2483 } # ac_fn_c_check_header_compile
2484
2485 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2486 # -------------------------------------------
2487 # Tests whether TYPE exists after having included INCLUDES, setting cache
2488 # variable VAR accordingly.
2489 ac_fn_c_check_type ()
2490 {
2491   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493 printf %s "checking for $2... " >&6; }
2494 if eval \${$3+:} false; then :
2495   printf %s "(cached) " >&6
2496 else
2497   eval "$3=no"
2498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499 /* end confdefs.h.  */
2500 $4
2501 int
2502 main ()
2503 {
2504 if (sizeof ($2))
2505          return 0;
2506   ;
2507   return 0;
2508 }
2509 _ACEOF
2510 if ac_fn_c_try_compile "$LINENO"; then :
2511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2512 /* end confdefs.h.  */
2513 $4
2514 int
2515 main ()
2516 {
2517 if (sizeof (($2)))
2518             return 0;
2519   ;
2520   return 0;
2521 }
2522 _ACEOF
2523 if ac_fn_c_try_compile "$LINENO"; then :
2524
2525 else
2526   eval "$3=yes"
2527 fi
2528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2529 fi
2530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2531 fi
2532 eval ac_res=\$$3
2533                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2534 printf "%s\n" "$ac_res" >&6; }
2535   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2536
2537 } # ac_fn_c_check_type
2538
2539 # ac_fn_c_try_link LINENO
2540 # -----------------------
2541 # Try to link conftest.$ac_ext, and return whether this succeeded.
2542 ac_fn_c_try_link ()
2543 {
2544   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2545   rm -f conftest.$ac_objext conftest$ac_exeext
2546   if { { ac_try="$ac_link"
2547 case "(($ac_try" in
2548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549   *) ac_try_echo=$ac_try;;
2550 esac
2551 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2552 printf "%s\n" "$ac_try_echo"; } >&5
2553   (eval "$ac_link") 2>conftest.err
2554   ac_status=$?
2555   if test -s conftest.err; then
2556     grep -v '^ *+' conftest.err >conftest.er1
2557     cat conftest.er1 >&5
2558     mv -f conftest.er1 conftest.err
2559   fi
2560   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561   test $ac_status = 0; } && {
2562          test -z "$ac_c_werror_flag" ||
2563          test ! -s conftest.err
2564        } && test -s conftest$ac_exeext && {
2565          test "$cross_compiling" = yes ||
2566          test -x conftest$ac_exeext
2567        }; then :
2568   ac_retval=0
2569 else
2570   printf "%s\n" "$as_me: failed program was:" >&5
2571 sed 's/^/| /' conftest.$ac_ext >&5
2572
2573         ac_retval=1
2574 fi
2575   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2576   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2577   # interfere with the next link command; also delete a directory that is
2578   # left behind by Apple's compiler.  We do this before executing the actions.
2579   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2580   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581   as_fn_set_status $ac_retval
2582
2583 } # ac_fn_c_try_link
2584
2585 # ac_fn_c_check_func LINENO FUNC VAR
2586 # ----------------------------------
2587 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2588 ac_fn_c_check_func ()
2589 {
2590   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592 printf %s "checking for $2... " >&6; }
2593 if eval \${$3+:} false; then :
2594   printf %s "(cached) " >&6
2595 else
2596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597 /* end confdefs.h.  */
2598 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2599    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2600 #define $2 innocuous_$2
2601
2602 /* System header to define __stub macros and hopefully few prototypes,
2603    which can conflict with char $2 (); below.  */
2604
2605 #include <limits.h>
2606 #undef $2
2607
2608 /* Override any GCC internal prototype to avoid an error.
2609    Use char because int might match the return type of a GCC
2610    builtin and then its argument prototype would still apply.  */
2611 #ifdef __cplusplus
2612 extern "C"
2613 #endif
2614 char $2 ();
2615 /* The GNU C library defines this for functions which it implements
2616     to always fail with ENOSYS.  Some functions are actually named
2617     something starting with __ and the normal name is an alias.  */
2618 #if defined __stub_$2 || defined __stub___$2
2619 choke me
2620 #endif
2621
2622 int
2623 main ()
2624 {
2625 return $2 ();
2626   ;
2627   return 0;
2628 }
2629 _ACEOF
2630 if ac_fn_c_try_link "$LINENO"; then :
2631   eval "$3=yes"
2632 else
2633   eval "$3=no"
2634 fi
2635 rm -f core conftest.err conftest.$ac_objext \
2636     conftest$ac_exeext conftest.$ac_ext
2637 fi
2638 eval ac_res=\$$3
2639                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2640 printf "%s\n" "$ac_res" >&6; }
2641   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2642
2643 } # ac_fn_c_check_func
2644
2645 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2646 # ---------------------------------------------
2647 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2648 # accordingly.
2649 ac_fn_c_check_decl ()
2650 {
2651   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2652   as_decl_name=`echo $2|sed 's/ *(.*//'`
2653   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2654   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2655 printf %s "checking whether $as_decl_name is declared... " >&6; }
2656 if eval \${$3+:} false; then :
2657   printf %s "(cached) " >&6
2658 else
2659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660 /* end confdefs.h.  */
2661 $4
2662 int
2663 main ()
2664 {
2665 #ifndef $as_decl_name
2666 #ifdef __cplusplus
2667   (void) $as_decl_use;
2668 #else
2669   (void) $as_decl_name;
2670 #endif
2671 #endif
2672
2673   ;
2674   return 0;
2675 }
2676 _ACEOF
2677 if ac_fn_c_try_compile "$LINENO"; then :
2678   eval "$3=yes"
2679 else
2680   eval "$3=no"
2681 fi
2682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683 fi
2684 eval ac_res=\$$3
2685                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2686 printf "%s\n" "$ac_res" >&6; }
2687   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2688
2689 } # ac_fn_c_check_decl
2690
2691 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2692 # --------------------------------------------
2693 # Tries to find the compile-time value of EXPR in a program that includes
2694 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2695 # computed
2696 ac_fn_c_compute_int ()
2697 {
2698   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2699   if test "$cross_compiling" = yes; then
2700     # Depending upon the size, compute the lo and hi bounds.
2701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2702 /* end confdefs.h.  */
2703 $4
2704 int
2705 main ()
2706 {
2707 static int test_array [1 - 2 * !(($2) >= 0)];
2708 test_array [0] = 0;
2709 return test_array [0];
2710
2711   ;
2712   return 0;
2713 }
2714 _ACEOF
2715 if ac_fn_c_try_compile "$LINENO"; then :
2716   ac_lo=0 ac_mid=0
2717   while :; do
2718     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719 /* end confdefs.h.  */
2720 $4
2721 int
2722 main ()
2723 {
2724 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2725 test_array [0] = 0;
2726 return test_array [0];
2727
2728   ;
2729   return 0;
2730 }
2731 _ACEOF
2732 if ac_fn_c_try_compile "$LINENO"; then :
2733   ac_hi=$ac_mid; break
2734 else
2735   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2736                         if test $ac_lo -le $ac_mid; then
2737                           ac_lo= ac_hi=
2738                           break
2739                         fi
2740                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2741 fi
2742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743   done
2744 else
2745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746 /* end confdefs.h.  */
2747 $4
2748 int
2749 main ()
2750 {
2751 static int test_array [1 - 2 * !(($2) < 0)];
2752 test_array [0] = 0;
2753 return test_array [0];
2754
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 if ac_fn_c_try_compile "$LINENO"; then :
2760   ac_hi=-1 ac_mid=-1
2761   while :; do
2762     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2763 /* end confdefs.h.  */
2764 $4
2765 int
2766 main ()
2767 {
2768 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2769 test_array [0] = 0;
2770 return test_array [0];
2771
2772   ;
2773   return 0;
2774 }
2775 _ACEOF
2776 if ac_fn_c_try_compile "$LINENO"; then :
2777   ac_lo=$ac_mid; break
2778 else
2779   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2780                         if test $ac_mid -le $ac_hi; then
2781                           ac_lo= ac_hi=
2782                           break
2783                         fi
2784                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2785 fi
2786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2787   done
2788 else
2789   ac_lo= ac_hi=
2790 fi
2791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2792 fi
2793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2794 # Binary search between lo and hi bounds.
2795 while test "x$ac_lo" != "x$ac_hi"; do
2796   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2798 /* end confdefs.h.  */
2799 $4
2800 int
2801 main ()
2802 {
2803 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2804 test_array [0] = 0;
2805 return test_array [0];
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 if ac_fn_c_try_compile "$LINENO"; then :
2812   ac_hi=$ac_mid
2813 else
2814   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2815 fi
2816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817 done
2818 case $ac_lo in #((
2819 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2820 '') ac_retval=1 ;;
2821 esac
2822   else
2823     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824 /* end confdefs.h.  */
2825 $4
2826 static long int longval () { return $2; }
2827 static unsigned long int ulongval () { return $2; }
2828 #include <stdio.h>
2829 #include <stdlib.h>
2830 int
2831 main ()
2832 {
2833
2834   FILE *f = fopen ("conftest.val", "w");
2835   if (! f)
2836     return 1;
2837   if (($2) < 0)
2838     {
2839       long int i = longval ();
2840       if (i != ($2))
2841         return 1;
2842       fprintf (f, "%ld", i);
2843     }
2844   else
2845     {
2846       unsigned long int i = ulongval ();
2847       if (i != ($2))
2848         return 1;
2849       fprintf (f, "%lu", i);
2850     }
2851   /* Do not output a trailing newline, as this causes \r\n confusion
2852      on some platforms.  */
2853   return ferror (f) || fclose (f) != 0;
2854
2855   ;
2856   return 0;
2857 }
2858 _ACEOF
2859 if ac_fn_c_try_run "$LINENO"; then :
2860   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2861 else
2862   ac_retval=1
2863 fi
2864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2865   conftest.$ac_objext conftest.beam conftest.$ac_ext
2866 rm -f conftest.val
2867
2868   fi
2869   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2870   as_fn_set_status $ac_retval
2871
2872 } # ac_fn_c_compute_int
2873
2874 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2875 # ----------------------------------------------------
2876 # Tries to find if the field MEMBER exists in type AGGR, after including
2877 # INCLUDES, setting cache variable VAR accordingly.
2878 ac_fn_c_check_member ()
2879 {
2880   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2881   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2882 printf %s "checking for $2.$3... " >&6; }
2883 if eval \${$4+:} false; then :
2884   printf %s "(cached) " >&6
2885 else
2886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887 /* end confdefs.h.  */
2888 $5
2889 int
2890 main ()
2891 {
2892 static $2 ac_aggr;
2893 if (ac_aggr.$3)
2894 return 0;
2895   ;
2896   return 0;
2897 }
2898 _ACEOF
2899 if ac_fn_c_try_compile "$LINENO"; then :
2900   eval "$4=yes"
2901 else
2902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h.  */
2904 $5
2905 int
2906 main ()
2907 {
2908 static $2 ac_aggr;
2909 if (sizeof ac_aggr.$3)
2910 return 0;
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 if ac_fn_c_try_compile "$LINENO"; then :
2916   eval "$4=yes"
2917 else
2918   eval "$4=no"
2919 fi
2920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2921 fi
2922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2923 fi
2924 eval ac_res=\$$4
2925                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2926 printf "%s\n" "$ac_res" >&6; }
2927   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2928
2929 } # ac_fn_c_check_member
2930 cat >config.log <<_ACEOF
2931 This file contains any messages produced by compilers while
2932 running configure, to aid debugging if configure makes a mistake.
2933
2934 It was created by GNU diffutils $as_me 3.3, which was
2935 generated by GNU Autoconf 2.69.79-0bdae.  Invocation command line was
2936
2937   $ $0 $@
2938
2939 _ACEOF
2940 exec 5>>config.log
2941 {
2942 cat <<_ASUNAME
2943 ## --------- ##
2944 ## Platform. ##
2945 ## --------- ##
2946
2947 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2948 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2949 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2950 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2951 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2952
2953 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2954 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2955
2956 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2957 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2958 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2959 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2960 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2961 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2962 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2963
2964 _ASUNAME
2965
2966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2967 for as_dir in $PATH
2968 do
2969   IFS=$as_save_IFS
2970   case $as_dir in #(((
2971     '') as_dir=./ ;;
2972     */) ;;
2973     *) as_dir=$as_dir/ ;;
2974   esac
2975     printf "%s\n" "PATH: $as_dir"
2976   done
2977 IFS=$as_save_IFS
2978
2979 } >&5
2980
2981 cat >&5 <<_ACEOF
2982
2983
2984 ## ----------- ##
2985 ## Core tests. ##
2986 ## ----------- ##
2987
2988 _ACEOF
2989
2990
2991 # Keep a trace of the command line.
2992 # Strip out --no-create and --no-recursion so they do not pile up.
2993 # Strip out --silent because we don't want to record it for future runs.
2994 # Also quote any args containing shell meta-characters.
2995 # Make two passes to allow for proper duplicate-argument suppression.
2996 ac_configure_args=
2997 ac_configure_args0=
2998 ac_configure_args1=
2999 ac_must_keep_next=false
3000 for ac_pass in 1 2
3001 do
3002   for ac_arg
3003   do
3004     case $ac_arg in
3005     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3006     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3007     | -silent | --silent | --silen | --sile | --sil)
3008       continue ;;
3009     *\'*)
3010       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3011     esac
3012     case $ac_pass in
3013     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3014     2)
3015       as_fn_append ac_configure_args1 " '$ac_arg'"
3016       if test $ac_must_keep_next = true; then
3017         ac_must_keep_next=false # Got value, back to normal.
3018       else
3019         case $ac_arg in
3020           *=* | --config-cache | -C | -disable-* | --disable-* \
3021           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3022           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3023           | -with-* | --with-* | -without-* | --without-* | --x)
3024             case "$ac_configure_args0 " in
3025               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3026             esac
3027             ;;
3028           -* ) ac_must_keep_next=true ;;
3029         esac
3030       fi
3031       as_fn_append ac_configure_args " '$ac_arg'"
3032       ;;
3033     esac
3034   done
3035 done
3036 { ac_configure_args0=; unset ac_configure_args0;}
3037 { ac_configure_args1=; unset ac_configure_args1;}
3038
3039 # When interrupted or exit'd, cleanup temporary files, and complete
3040 # config.log.  We remove comments because anyway the quotes in there
3041 # would cause problems or look ugly.
3042 # WARNING: Use '\'' to represent an apostrophe within the trap.
3043 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3044 trap 'exit_status=$?
3045   # Sanitize IFS.
3046   IFS=" ""      $as_nl"
3047   # Save into config.log some information that might help in debugging.
3048   {
3049     echo
3050
3051     printf "%s\n" "## ---------------- ##
3052 ## Cache variables. ##
3053 ## ---------------- ##"
3054     echo
3055     # The following way of writing the cache mishandles newlines in values,
3056 (
3057   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3058     eval ac_val=\$$ac_var
3059     case $ac_val in #(
3060     *${as_nl}*)
3061       case $ac_var in #(
3062       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3063 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3064       esac
3065       case $ac_var in #(
3066       _ | IFS | as_nl) ;; #(
3067       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3068       *) { eval $ac_var=; unset $ac_var;} ;;
3069       esac ;;
3070     esac
3071   done
3072   (set) 2>&1 |
3073     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3074     *${as_nl}ac_space=\ *)
3075       sed -n \
3076         "s/'\''/'\''\\\\'\'''\''/g;
3077           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3078       ;; #(
3079     *)
3080       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3081       ;;
3082     esac |
3083     sort
3084 )
3085     echo
3086
3087     printf "%s\n" "## ----------------- ##
3088 ## Output variables. ##
3089 ## ----------------- ##"
3090     echo
3091     for ac_var in $ac_subst_vars
3092     do
3093       eval ac_val=\$$ac_var
3094       case $ac_val in
3095       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3096       esac
3097       printf "%s\n" "$ac_var='\''$ac_val'\''"
3098     done | sort
3099     echo
3100
3101     if test -n "$ac_subst_files"; then
3102       printf "%s\n" "## ------------------- ##
3103 ## File substitutions. ##
3104 ## ------------------- ##"
3105       echo
3106       for ac_var in $ac_subst_files
3107       do
3108         eval ac_val=\$$ac_var
3109         case $ac_val in
3110         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3111         esac
3112         printf "%s\n" "$ac_var='\''$ac_val'\''"
3113       done | sort
3114       echo
3115     fi
3116
3117     if test -s confdefs.h; then
3118       printf "%s\n" "## ----------- ##
3119 ## confdefs.h. ##
3120 ## ----------- ##"
3121       echo
3122       cat confdefs.h
3123       echo
3124     fi
3125     test "$ac_signal" != 0 &&
3126       printf "%s\n" "$as_me: caught signal $ac_signal"
3127     printf "%s\n" "$as_me: exit $exit_status"
3128   } >&5
3129   rm -f core *.core core.conftest.* &&
3130     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3131     exit $exit_status
3132 ' 0
3133 for ac_signal in 1 2 13 15; do
3134   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3135 done
3136 ac_signal=0
3137
3138 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3139 rm -f -r conftest* confdefs.h
3140
3141 printf "%s\n" "/* confdefs.h */" > confdefs.h
3142
3143 # Predefined preprocessor variables.
3144
3145 cat >>confdefs.h <<_ACEOF
3146 #define PACKAGE_NAME "$PACKAGE_NAME"
3147 _ACEOF
3148
3149 cat >>confdefs.h <<_ACEOF
3150 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3151 _ACEOF
3152
3153 cat >>confdefs.h <<_ACEOF
3154 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3155 _ACEOF
3156
3157 cat >>confdefs.h <<_ACEOF
3158 #define PACKAGE_STRING "$PACKAGE_STRING"
3159 _ACEOF
3160
3161 cat >>confdefs.h <<_ACEOF
3162 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3163 _ACEOF
3164
3165 cat >>confdefs.h <<_ACEOF
3166 #define PACKAGE_URL "$PACKAGE_URL"
3167 _ACEOF
3168
3169
3170 # Let the site file select an alternate cache file if it wants to.
3171 # Prefer an explicitly selected file to automatically selected ones.
3172 ac_site_file1=NONE
3173 ac_site_file2=NONE
3174 if test -n "$CONFIG_SITE"; then
3175   # We do not want a PATH search for config.site.
3176   case $CONFIG_SITE in #((
3177     -*)  ac_site_file1=./$CONFIG_SITE;;
3178     */*) ac_site_file1=$CONFIG_SITE;;
3179     *)   ac_site_file1=./$CONFIG_SITE;;
3180   esac
3181 elif test "x$prefix" != xNONE; then
3182   ac_site_file1=$prefix/share/config.site
3183   ac_site_file2=$prefix/etc/config.site
3184 else
3185   ac_site_file1=$ac_default_prefix/share/config.site
3186   ac_site_file2=$ac_default_prefix/etc/config.site
3187 fi
3188 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3189 do
3190   test "x$ac_site_file" = xNONE && continue
3191   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3192     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3193 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3194     sed 's/^/| /' "$ac_site_file" >&5
3195     . "$ac_site_file" \
3196       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3197 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3198 as_fn_error $? "failed to load site script $ac_site_file
3199 See \`config.log' for more details" "$LINENO" 5; }
3200   fi
3201 done
3202
3203 if test -r "$cache_file"; then
3204   # Some versions of bash will fail to source /dev/null (special files
3205   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3206   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3207     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3208 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3209     case $cache_file in
3210       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3211       *)                      . "./$cache_file";;
3212     esac
3213   fi
3214 else
3215   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3216 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3217   >$cache_file
3218 fi
3219
3220 as_fn_append ac_func_list " btowc"
3221 as_fn_append ac_func_list " setrlimit"
3222 as_fn_append ac_header_list " ucontext.h"
3223 as_fn_append ac_func_list " sigaltstack"
3224 as_fn_append ac_header_list " unistd.h"
3225 as_fn_append ac_func_list " readlinkat"
3226 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3227 as_fn_append ac_header_list " sys/socket.h"
3228 as_fn_append ac_func_list " fcntl"
3229 as_fn_append ac_func_list " symlink"
3230 as_fn_append ac_func_list " mempcpy"
3231 as_fn_append ac_func_list " isblank"
3232 as_fn_append ac_func_list " iswctype"
3233 as_fn_append ac_func_list " mbsrtowcs"
3234 as_fn_append ac_func_list " wmemchr"
3235 as_fn_append ac_func_list " wmemcpy"
3236 as_fn_append ac_func_list " wmempcpy"
3237 as_fn_append ac_header_list " wctype.h"
3238 gl_fnmatch_required=GNU
3239 as_fn_append ac_header_list " sys/stat.h"
3240 as_fn_append ac_func_list " getdtablesize"
3241 gl_getopt_required=GNU
3242 as_fn_append ac_header_list " getopt.h"
3243 as_fn_append ac_func_list " gettimeofday"
3244 as_fn_append ac_func_list " nanotime"
3245 as_fn_append ac_header_list " sys/time.h"
3246 as_fn_append ac_header_list " iconv.h"
3247 as_fn_append ac_header_list " wchar.h"
3248 as_fn_append ac_header_list " stdint.h"
3249 as_fn_append ac_header_list " inttypes.h"
3250 as_fn_append ac_func_list " iswcntrl"
3251 as_fn_append ac_func_list " iswblank"
3252 as_fn_append ac_header_list " langinfo.h"
3253 as_fn_append ac_header_list " xlocale.h"
3254 as_fn_append ac_func_list " lstat"
3255 as_fn_append ac_func_list " mbsinit"
3256 as_fn_append ac_func_list " mbrtowc"
3257 as_fn_append ac_func_list " mbslen"
3258 as_fn_append ac_header_list " sys/mman.h"
3259 as_fn_append ac_func_list " mprotect"
3260 as_fn_append ac_func_list " mkstemp"
3261 as_fn_append ac_func_list " nl_langinfo"
3262 as_fn_append ac_header_list " sys/param.h"
3263 as_fn_append ac_func_list " readlink"
3264 as_fn_append ac_func_list " wcscoll"
3265 as_fn_append ac_func_list " secure_getenv"
3266 as_fn_append ac_func_list " sigaction"
3267 as_fn_append ac_func_list " siginterrupt"
3268 as_fn_append ac_func_list " tzset"
3269 as_fn_append ac_header_list " strings.h"
3270 as_fn_append ac_func_list " strndup"
3271 as_fn_append ac_func_list " strptime"
3272 as_fn_append ac_func_list " strtoumax"
3273 as_fn_append ac_header_list " sys/wait.h"
3274 as_fn_append ac_func_list " localtime_r"
3275 as_fn_append ac_func_list " vasnprintf"
3276 as_fn_append ac_header_list " features.h"
3277 as_fn_append ac_func_list " snprintf"
3278 as_fn_append ac_func_list " wcrtomb"
3279 as_fn_append ac_func_list " wcwidth"
3280 as_fn_append ac_func_list " newlocale"
3281 as_fn_append ac_func_list " setenv"
3282 as_fn_append ac_func_list " sleep"
3283 as_fn_append ac_func_list " usleep"
3284 as_fn_append ac_func_list " wctob"
3285 as_fn_append ac_func_list " sigprocmask"
3286 as_fn_append ac_func_list " strcasecoll"
3287 as_fn_append ac_func_list " stricoll"
3288 gt_needs="$gt_needs need-ngettext"
3289 # Check that the precious variables saved in the cache have kept the same
3290 # value.
3291 ac_cache_corrupted=false
3292 for ac_var in $ac_precious_vars; do
3293   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3294   eval ac_new_set=\$ac_env_${ac_var}_set
3295   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3296   eval ac_new_val=\$ac_env_${ac_var}_value
3297   case $ac_old_set,$ac_new_set in
3298     set,)
3299       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3300 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3301       ac_cache_corrupted=: ;;
3302     ,set)
3303       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3304 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3305       ac_cache_corrupted=: ;;
3306     ,);;
3307     *)
3308       if test "x$ac_old_val" != "x$ac_new_val"; then
3309         # differences in whitespace do not lead to failure.
3310         ac_old_val_w=`echo x $ac_old_val`
3311         ac_new_val_w=`echo x $ac_new_val`
3312         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3313           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3314 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3315           ac_cache_corrupted=:
3316         else
3317           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3318 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3319           eval $ac_var=\$ac_old_val
3320         fi
3321         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3322 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3323         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3324 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3325       fi;;
3326   esac
3327   # Pass precious variables to config.status.
3328   if test "$ac_new_set" = set; then
3329     case $ac_new_val in
3330     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3331     *) ac_arg=$ac_var=$ac_new_val ;;
3332     esac
3333     case " $ac_configure_args " in
3334       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3335       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3336     esac
3337   fi
3338 done
3339 if $ac_cache_corrupted; then
3340   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3341 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3342   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3343 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3344   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3345 fi
3346 ## -------------------- ##
3347 ## Main body of script. ##
3348 ## -------------------- ##
3349
3350 ac_ext=c
3351 ac_cpp='$CPP $CPPFLAGS'
3352 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3353 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3354 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3355
3356
3357
3358
3359 ac_aux_dir=
3360 for ac_dir in build-aux "$srcdir"/build-aux; do
3361   if test -f "$ac_dir/install-sh"; then
3362     ac_aux_dir=$ac_dir
3363     ac_install_sh="$ac_aux_dir/install-sh -c"
3364     break
3365   elif test -f "$ac_dir/install.sh"; then
3366     ac_aux_dir=$ac_dir
3367     ac_install_sh="$ac_aux_dir/install.sh -c"
3368     break
3369   elif test -f "$ac_dir/shtool"; then
3370     ac_aux_dir=$ac_dir
3371     ac_install_sh="$ac_aux_dir/shtool install -c"
3372     break
3373   fi
3374 done
3375 if test -z "$ac_aux_dir"; then
3376   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3377 fi
3378
3379 # These three variables are undocumented and unsupported,
3380 # and are intended to be withdrawn in a future Autoconf release.
3381 # They can cause serious problems if a builder's source tree is in a directory
3382 # whose full name contains unusual characters.
3383 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3384 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3385 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3386
3387
3388
3389
3390 am__api_version='1.13a'
3391
3392 # Find a good install program.  We prefer a C program (faster),
3393 # so one script is as good as another.  But avoid the broken or
3394 # incompatible versions:
3395 # SysV /etc/install, /usr/sbin/install
3396 # SunOS /usr/etc/install
3397 # IRIX /sbin/install
3398 # AIX /bin/install
3399 # AmigaOS /C/install, which installs bootblocks on floppy discs
3400 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3401 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3402 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3403 # OS/2's system install, which has a completely different semantic
3404 # ./install, which can be erroneously created by make from ./install.sh.
3405 # Reject install programs that cannot install multiple files.
3406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3407 printf %s "checking for a BSD-compatible install... " >&6; }
3408 if test -z "$INSTALL"; then
3409 if ${ac_cv_path_install+:} false; then :
3410   printf %s "(cached) " >&6
3411 else
3412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3413 for as_dir in $PATH
3414 do
3415   IFS=$as_save_IFS
3416   case $as_dir in #(((
3417     '') as_dir=./ ;;
3418     */) ;;
3419     *) as_dir=$as_dir/ ;;
3420   esac
3421     # Account for fact that we put trailing slashes in our PATH walk.
3422 case $as_dir in #((
3423   ./ | /[cC]/* | \
3424   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3425   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3426   /usr/ucb/* ) ;;
3427   *)
3428     # OSF1 and SCO ODT 3.0 have their own names for install.
3429     # Don't use installbsd from OSF since it installs stuff as root
3430     # by default.
3431     for ac_prog in ginstall scoinst install; do
3432       for ac_exec_ext in '' $ac_executable_extensions; do
3433         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3434           if test $ac_prog = install &&
3435             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3436             # AIX install.  It has an incompatible calling convention.
3437             :
3438           elif test $ac_prog = install &&
3439             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3440             # program-specific install script used by HP pwplus--don't use.
3441             :
3442           else
3443             rm -rf conftest.one conftest.two conftest.dir
3444             echo one > conftest.one
3445             echo two > conftest.two
3446             mkdir conftest.dir
3447             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3448               test -s conftest.one && test -s conftest.two &&
3449               test -s conftest.dir/conftest.one &&
3450               test -s conftest.dir/conftest.two
3451             then
3452               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3453               break 3
3454             fi
3455           fi
3456         fi
3457       done
3458     done
3459     ;;
3460 esac
3461
3462   done
3463 IFS=$as_save_IFS
3464
3465 rm -rf conftest.one conftest.two conftest.dir
3466
3467 fi
3468   if test "${ac_cv_path_install+set}" = set; then
3469     INSTALL=$ac_cv_path_install
3470   else
3471     # As a last resort, use the slow shell script.  Don't cache a
3472     # value for INSTALL within a source directory, because that will
3473     # break other packages using the cache if that directory is
3474     # removed, or if the value is a relative name.
3475     INSTALL=$ac_install_sh
3476   fi
3477 fi
3478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3479 printf "%s\n" "$INSTALL" >&6; }
3480
3481 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3482 # It thinks the first close brace ends the variable substitution.
3483 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3484
3485 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3486
3487 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3488
3489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3490 printf %s "checking whether build environment is sane... " >&6; }
3491 # Reject unsafe characters in $srcdir or the absolute working directory
3492 # name.  Accept space and tab only in the latter.
3493 am_lf='
3494 '
3495 case `pwd` in
3496   *[\\\"\#\$\&\'\`$am_lf]*)
3497     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3498 esac
3499 case $srcdir in
3500   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3501     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3502 esac
3503
3504 # Do 'set' in a subshell so we don't clobber the current shell's
3505 # arguments.  Must try -L first in case configure is actually a
3506 # symlink; some systems play weird games with the mod time of symlinks
3507 # (eg FreeBSD returns the mod time of the symlink's containing
3508 # directory).
3509 if (
3510    am_has_slept=no
3511    for am_try in 1 2; do
3512      echo "timestamp, slept: $am_has_slept" > conftest.file
3513      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3514      if test "$*" = "X"; then
3515         # -L didn't work.
3516         set X `ls -t "$srcdir/configure" conftest.file`
3517      fi
3518      if test "$*" != "X $srcdir/configure conftest.file" \
3519         && test "$*" != "X conftest.file $srcdir/configure"; then
3520
3521         # If neither matched, then we have a broken ls.  This can happen
3522         # if, for instance, CONFIG_SHELL is bash and it inherits a
3523         # broken ls alias from the environment.  This has actually
3524         # happened.  Such a system could not be considered "sane".
3525         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3526   alias in your environment" "$LINENO" 5
3527      fi
3528      if test "$2" = conftest.file || test $am_try -eq 2; then
3529        break
3530      fi
3531      # Just in case.
3532      sleep 1
3533      am_has_slept=yes
3534    done
3535    test "$2" = conftest.file
3536    )
3537 then
3538    # Ok.
3539    :
3540 else
3541    as_fn_error $? "newly created file is older than distributed files!
3542 Check your system clock" "$LINENO" 5
3543 fi
3544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3545 printf "%s\n" "yes" >&6; }
3546 # If we didn't sleep, we still need to ensure time stamps of config.status and
3547 # generated files are strictly newer.
3548 am_sleep_pid=
3549 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3550   ( sleep 1 ) &
3551   am_sleep_pid=$!
3552 fi
3553
3554 rm -f conftest.file
3555
3556 test "$program_prefix" != NONE &&
3557   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3558 # Use a double $ so make ignores it.
3559 test "$program_suffix" != NONE &&
3560   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3561 # Double any \ or $.
3562 # By default was `s,x,x', remove it if useless.
3563 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3564 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3565
3566 # expand $ac_aux_dir to an absolute path
3567 am_aux_dir=`cd $ac_aux_dir && pwd`
3568
3569 if test x"${MISSING+set}" != xset; then
3570   case $am_aux_dir in
3571   *\ * | *\     *)
3572     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3573   *)
3574     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3575   esac
3576 fi
3577 # Use eval to expand $SHELL
3578 if eval "$MISSING --is-lightweight"; then
3579   am_missing_run="$MISSING "
3580 else
3581   am_missing_run=
3582   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3583 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3584 fi
3585
3586 if test x"${install_sh}" != xset; then
3587   case $am_aux_dir in
3588   *\ * | *\     *)
3589     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3590   *)
3591     install_sh="\${SHELL} $am_aux_dir/install-sh"
3592   esac
3593 fi
3594
3595 # Installed binaries are usually stripped using 'strip' when the user
3596 # run "make install-strip".  However 'strip' might not be the right
3597 # tool to use in cross-compilation environments, therefore Automake
3598 # will honor the 'STRIP' environment variable to overrule this program.
3599 if test "$cross_compiling" != no; then
3600   if test -n "$ac_tool_prefix"; then
3601   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3602 set dummy ${ac_tool_prefix}strip; ac_word=$2
3603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604 printf %s "checking for $ac_word... " >&6; }
3605 if ${ac_cv_prog_STRIP+:} false; then :
3606   printf %s "(cached) " >&6
3607 else
3608   if test -n "$STRIP"; then
3609   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3610 else
3611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612 for as_dir in $PATH
3613 do
3614   IFS=$as_save_IFS
3615   case $as_dir in #(((
3616     '') as_dir=./ ;;
3617     */) ;;
3618     *) as_dir=$as_dir/ ;;
3619   esac
3620     for ac_exec_ext in '' $ac_executable_extensions; do
3621   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3622     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3623     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3624     break 2
3625   fi
3626 done
3627   done
3628 IFS=$as_save_IFS
3629
3630 fi
3631 fi
3632 STRIP=$ac_cv_prog_STRIP
3633 if test -n "$STRIP"; then
3634   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3635 printf "%s\n" "$STRIP" >&6; }
3636 else
3637   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638 printf "%s\n" "no" >&6; }
3639 fi
3640
3641
3642 fi
3643 if test -z "$ac_cv_prog_STRIP"; then
3644   ac_ct_STRIP=$STRIP
3645   # Extract the first word of "strip", so it can be a program name with args.
3646 set dummy strip; ac_word=$2
3647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648 printf %s "checking for $ac_word... " >&6; }
3649 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3650   printf %s "(cached) " >&6
3651 else
3652   if test -n "$ac_ct_STRIP"; then
3653   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3654 else
3655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656 for as_dir in $PATH
3657 do
3658   IFS=$as_save_IFS
3659   case $as_dir in #(((
3660     '') as_dir=./ ;;
3661     */) ;;
3662     *) as_dir=$as_dir/ ;;
3663   esac
3664     for ac_exec_ext in '' $ac_executable_extensions; do
3665   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3666     ac_cv_prog_ac_ct_STRIP="strip"
3667     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3668     break 2
3669   fi
3670 done
3671   done
3672 IFS=$as_save_IFS
3673
3674 fi
3675 fi
3676 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3677 if test -n "$ac_ct_STRIP"; then
3678   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3679 printf "%s\n" "$ac_ct_STRIP" >&6; }
3680 else
3681   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682 printf "%s\n" "no" >&6; }
3683 fi
3684
3685   if test "x$ac_ct_STRIP" = x; then
3686     STRIP=":"
3687   else
3688     case $cross_compiling:$ac_tool_warned in
3689 yes:)
3690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3692 ac_tool_warned=yes ;;
3693 esac
3694     STRIP=$ac_ct_STRIP
3695   fi
3696 else
3697   STRIP="$ac_cv_prog_STRIP"
3698 fi
3699
3700 fi
3701 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3702
3703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3704 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3705 if test -z "$MKDIR_P"; then
3706   if ${ac_cv_path_mkdir+:} false; then :
3707   printf %s "(cached) " >&6
3708 else
3709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3711 do
3712   IFS=$as_save_IFS
3713   case $as_dir in #(((
3714     '') as_dir=./ ;;
3715     */) ;;
3716     *) as_dir=$as_dir/ ;;
3717   esac
3718     for ac_prog in mkdir gmkdir; do
3719          for ac_exec_ext in '' $ac_executable_extensions; do
3720            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3721            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3722              'mkdir (GNU coreutils) '* | \
3723              'mkdir (coreutils) '* | \
3724              'mkdir (fileutils) '4.1*)
3725                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3726                break 3;;
3727            esac
3728          done
3729        done
3730   done
3731 IFS=$as_save_IFS
3732
3733 fi
3734
3735   test -d ./--version && rmdir ./--version
3736   if test "${ac_cv_path_mkdir+set}" = set; then
3737     MKDIR_P="$ac_cv_path_mkdir -p"
3738   else
3739     # As a last resort, use the slow shell script.  Don't cache a
3740     # value for MKDIR_P within a source directory, because that will
3741     # break other packages using the cache if that directory is
3742     # removed, or if the value is a relative name.
3743     MKDIR_P="$ac_install_sh -d"
3744   fi
3745 fi
3746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3747 printf "%s\n" "$MKDIR_P" >&6; }
3748
3749 for ac_prog in gawk mawk nawk awk
3750 do
3751   # Extract the first word of "$ac_prog", so it can be a program name with args.
3752 set dummy $ac_prog; ac_word=$2
3753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3754 printf %s "checking for $ac_word... " >&6; }
3755 if ${ac_cv_prog_AWK+:} false; then :
3756   printf %s "(cached) " >&6
3757 else
3758   if test -n "$AWK"; then
3759   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3760 else
3761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3762 for as_dir in $PATH
3763 do
3764   IFS=$as_save_IFS
3765   case $as_dir in #(((
3766     '') as_dir=./ ;;
3767     */) ;;
3768     *) as_dir=$as_dir/ ;;
3769   esac
3770     for ac_exec_ext in '' $ac_executable_extensions; do
3771   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3772     ac_cv_prog_AWK="$ac_prog"
3773     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3774     break 2
3775   fi
3776 done
3777   done
3778 IFS=$as_save_IFS
3779
3780 fi
3781 fi
3782 AWK=$ac_cv_prog_AWK
3783 if test -n "$AWK"; then
3784   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3785 printf "%s\n" "$AWK" >&6; }
3786 else
3787   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788 printf "%s\n" "no" >&6; }
3789 fi
3790
3791
3792   test -n "$AWK" && break
3793 done
3794
3795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3796 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3797 set x ${MAKE-make}
3798 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3799 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3800   printf %s "(cached) " >&6
3801 else
3802   cat >conftest.make <<\_ACEOF
3803 SHELL = /bin/sh
3804 all:
3805         @echo '@@@%%%=$(MAKE)=@@@%%%'
3806 _ACEOF
3807 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3808 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3809   *@@@%%%=?*=@@@%%%*)
3810     eval ac_cv_prog_make_${ac_make}_set=yes;;
3811   *)
3812     eval ac_cv_prog_make_${ac_make}_set=no;;
3813 esac
3814 rm -f conftest.make
3815 fi
3816 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3817   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3818 printf "%s\n" "yes" >&6; }
3819   SET_MAKE=
3820 else
3821   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3822 printf "%s\n" "no" >&6; }
3823   SET_MAKE="MAKE=${MAKE-make}"
3824 fi
3825
3826 # Check whether --enable-silent-rules was given.
3827 if test "${enable_silent_rules+set}" = set; then :
3828   enableval=$enable_silent_rules;
3829 fi
3830
3831 case $enable_silent_rules in # (((
3832   yes) AM_DEFAULT_VERBOSITY=0;;
3833    no) AM_DEFAULT_VERBOSITY=1;;
3834     *) AM_DEFAULT_VERBOSITY=1;;
3835 esac
3836 am_make=${MAKE-make}
3837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3838 printf %s "checking whether $am_make supports nested variables... " >&6; }
3839 if ${am_cv_make_support_nested_variables+:} false; then :
3840   printf %s "(cached) " >&6
3841 else
3842   if printf "%s\n" 'TRUE=$(BAR$(V))
3843 BAR0=false
3844 BAR1=true
3845 V=1
3846 am__doit:
3847         @$(TRUE)
3848 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3849   am_cv_make_support_nested_variables=yes
3850 else
3851   am_cv_make_support_nested_variables=no
3852 fi
3853 fi
3854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3855 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3856 if test $am_cv_make_support_nested_variables = yes; then
3857     AM_V='$(V)'
3858   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3859 else
3860   AM_V=$AM_DEFAULT_VERBOSITY
3861   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3862 fi
3863 AM_BACKSLASH='\'
3864
3865 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3866   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3867   # is not polluted with repeated "-I."
3868   am__isrc=' -I$(srcdir)'
3869   # test to see if srcdir already configured
3870   if test -f $srcdir/config.status; then
3871     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3872   fi
3873 fi
3874
3875 # test whether we have cygpath
3876 if test -z "$CYGPATH_W"; then
3877   if (cygpath --version) >/dev/null 2>/dev/null; then
3878     CYGPATH_W='cygpath -w'
3879   else
3880     CYGPATH_W=echo
3881   fi
3882 fi
3883
3884
3885 # Define the identity of the package.
3886  PACKAGE='diffutils'
3887  VERSION='3.3'
3888
3889
3890 cat >>confdefs.h <<_ACEOF
3891 #define PACKAGE "$PACKAGE"
3892 _ACEOF
3893
3894
3895 cat >>confdefs.h <<_ACEOF
3896 #define VERSION "$VERSION"
3897 _ACEOF
3898
3899 # Some tools Automake needs.
3900
3901 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3902
3903
3904 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3905
3906
3907 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3908
3909
3910 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3911
3912
3913 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3914
3915 # We need awk for the "check" target.  The system "awk" is bad on
3916 # some platforms.
3917 # Always define AMTAR for backward compatibility.  Yes, it's still used
3918 # in the wild :-(  We should find a proper way to deprecate it ...
3919 AMTAR='$${TAR-tar}'
3920
3921 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3922
3923
3924
3925
3926
3927 # POSIX will say in a future version that running "rm -f" with no argument
3928 # is OK; and we want to be able to make that assumption in our Makefile
3929 # recipes.  So use an aggressive probe to check that the usage we want is
3930 # actually supported "in the wild" to an acceptable degree.
3931 # See automake bug#10828.
3932 # To make any issue more visible, cause the running configure to be aborted
3933 # by default if the 'rm' program in use doesn't match our expectations; the
3934 # user can still override this though.
3935 if rm -f && rm -fr && rm -rf; then : OK; else
3936   cat >&2 <<'END'
3937 Oops!
3938
3939 Your 'rm' program seems unable to run without file operands specified
3940 on the command line, even when the '-f' option is present.  This is contrary
3941 to the behaviour of most rm programs out there, and not conforming with
3942 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3943
3944 Please tell bug-automake@gnu.org about your system, including the value
3945 of your $PATH and any error possibly output before this message.  This
3946 can help us improve future automake versions.
3947
3948 END
3949   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3950     echo 'Configuration will proceed anyway, since you have set the' >&2
3951     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3952     echo >&2
3953   else
3954     cat >&2 <<'END'
3955 Aborting the configuration process, to ensure you take notice of the issue.
3956
3957 You can download and install GNU coreutils to get an 'rm' implementation
3958 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3959
3960 If you want to complete the configuration process using your problematic
3961 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3962 to "yes", and re-run configure.
3963
3964 END
3965     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3966   fi
3967 fi
3968 # Check whether --enable-silent-rules was given.
3969 if test "${enable_silent_rules+set}" = set; then :
3970   enableval=$enable_silent_rules;
3971 fi
3972
3973 case $enable_silent_rules in # (((
3974   yes) AM_DEFAULT_VERBOSITY=0;;
3975    no) AM_DEFAULT_VERBOSITY=1;;
3976     *) AM_DEFAULT_VERBOSITY=0;;
3977 esac
3978 am_make=${MAKE-make}
3979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3980 printf %s "checking whether $am_make supports nested variables... " >&6; }
3981 if ${am_cv_make_support_nested_variables+:} false; then :
3982   printf %s "(cached) " >&6
3983 else
3984   if printf "%s\n" 'TRUE=$(BAR$(V))
3985 BAR0=false
3986 BAR1=true
3987 V=1
3988 am__doit:
3989         @$(TRUE)
3990 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3991   am_cv_make_support_nested_variables=yes
3992 else
3993   am_cv_make_support_nested_variables=no
3994 fi
3995 fi
3996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3997 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3998 if test $am_cv_make_support_nested_variables = yes; then
3999     AM_V='$(V)'
4000   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4001 else
4002   AM_V=$AM_DEFAULT_VERBOSITY
4003   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4004 fi
4005 AM_BACKSLASH='\'
4006  # make --enable-silent-rules the default.
4007
4008 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4009
4010
4011 for ac_prog in gawk mawk nawk awk
4012 do
4013   # Extract the first word of "$ac_prog", so it can be a program name with args.
4014 set dummy $ac_prog; ac_word=$2
4015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4016 printf %s "checking for $ac_word... " >&6; }
4017 if ${ac_cv_prog_AWK+:} false; then :
4018   printf %s "(cached) " >&6
4019 else
4020   if test -n "$AWK"; then
4021   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4022 else
4023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024 for as_dir in $PATH
4025 do
4026   IFS=$as_save_IFS
4027   case $as_dir in #(((
4028     '') as_dir=./ ;;
4029     */) ;;
4030     *) as_dir=$as_dir/ ;;
4031   esac
4032     for ac_exec_ext in '' $ac_executable_extensions; do
4033   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4034     ac_cv_prog_AWK="$ac_prog"
4035     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4036     break 2
4037   fi
4038 done
4039   done
4040 IFS=$as_save_IFS
4041
4042 fi
4043 fi
4044 AWK=$ac_cv_prog_AWK
4045 if test -n "$AWK"; then
4046   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4047 printf "%s\n" "$AWK" >&6; }
4048 else
4049   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4050 printf "%s\n" "no" >&6; }
4051 fi
4052
4053
4054   test -n "$AWK" && break
4055 done
4056
4057 ac_ext=c
4058 ac_cpp='$CPP $CPPFLAGS'
4059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4062 if test -n "$ac_tool_prefix"; then
4063   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4064 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066 printf %s "checking for $ac_word... " >&6; }
4067 if ${ac_cv_prog_CC+:} false; then :
4068   printf %s "(cached) " >&6
4069 else
4070   if test -n "$CC"; then
4071   ac_cv_prog_CC="$CC" # Let the user override the test.
4072 else
4073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4074 for as_dir in $PATH
4075 do
4076   IFS=$as_save_IFS
4077   case $as_dir in #(((
4078     '') as_dir=./ ;;
4079     */) ;;
4080     *) as_dir=$as_dir/ ;;
4081   esac
4082     for ac_exec_ext in '' $ac_executable_extensions; do
4083   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4084     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4085     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4086     break 2
4087   fi
4088 done
4089   done
4090 IFS=$as_save_IFS
4091
4092 fi
4093 fi
4094 CC=$ac_cv_prog_CC
4095 if test -n "$CC"; then
4096   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4097 printf "%s\n" "$CC" >&6; }
4098 else
4099   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100 printf "%s\n" "no" >&6; }
4101 fi
4102
4103
4104 fi
4105 if test -z "$ac_cv_prog_CC"; then
4106   ac_ct_CC=$CC
4107   # Extract the first word of "gcc", so it can be a program name with args.
4108 set dummy gcc; ac_word=$2
4109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4110 printf %s "checking for $ac_word... " >&6; }
4111 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4112   printf %s "(cached) " >&6
4113 else
4114   if test -n "$ac_ct_CC"; then
4115   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4116 else
4117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118 for as_dir in $PATH
4119 do
4120   IFS=$as_save_IFS
4121   case $as_dir in #(((
4122     '') as_dir=./ ;;
4123     */) ;;
4124     *) as_dir=$as_dir/ ;;
4125   esac
4126     for ac_exec_ext in '' $ac_executable_extensions; do
4127   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4128     ac_cv_prog_ac_ct_CC="gcc"
4129     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4130     break 2
4131   fi
4132 done
4133   done
4134 IFS=$as_save_IFS
4135
4136 fi
4137 fi
4138 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4139 if test -n "$ac_ct_CC"; then
4140   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4141 printf "%s\n" "$ac_ct_CC" >&6; }
4142 else
4143   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4144 printf "%s\n" "no" >&6; }
4145 fi
4146
4147   if test "x$ac_ct_CC" = x; then
4148     CC=""
4149   else
4150     case $cross_compiling:$ac_tool_warned in
4151 yes:)
4152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4153 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4154 ac_tool_warned=yes ;;
4155 esac
4156     CC=$ac_ct_CC
4157   fi
4158 else
4159   CC="$ac_cv_prog_CC"
4160 fi
4161
4162 if test -z "$CC"; then
4163           if test -n "$ac_tool_prefix"; then
4164     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4165 set dummy ${ac_tool_prefix}cc; ac_word=$2
4166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167 printf %s "checking for $ac_word... " >&6; }
4168 if ${ac_cv_prog_CC+:} false; then :
4169   printf %s "(cached) " >&6
4170 else
4171   if test -n "$CC"; then
4172   ac_cv_prog_CC="$CC" # Let the user override the test.
4173 else
4174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175 for as_dir in $PATH
4176 do
4177   IFS=$as_save_IFS
4178   case $as_dir in #(((
4179     '') as_dir=./ ;;
4180     */) ;;
4181     *) as_dir=$as_dir/ ;;
4182   esac
4183     for ac_exec_ext in '' $ac_executable_extensions; do
4184   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4185     ac_cv_prog_CC="${ac_tool_prefix}cc"
4186     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4187     break 2
4188   fi
4189 done
4190   done
4191 IFS=$as_save_IFS
4192
4193 fi
4194 fi
4195 CC=$ac_cv_prog_CC
4196 if test -n "$CC"; then
4197   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4198 printf "%s\n" "$CC" >&6; }
4199 else
4200   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201 printf "%s\n" "no" >&6; }
4202 fi
4203
4204
4205   fi
4206 fi
4207 if test -z "$CC"; then
4208   # Extract the first word of "cc", so it can be a program name with args.
4209 set dummy cc; ac_word=$2
4210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4211 printf %s "checking for $ac_word... " >&6; }
4212 if ${ac_cv_prog_CC+:} false; then :
4213   printf %s "(cached) " >&6
4214 else
4215   if test -n "$CC"; then
4216   ac_cv_prog_CC="$CC" # Let the user override the test.
4217 else
4218   ac_prog_rejected=no
4219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220 for as_dir in $PATH
4221 do
4222   IFS=$as_save_IFS
4223   case $as_dir in #(((
4224     '') as_dir=./ ;;
4225     */) ;;
4226     *) as_dir=$as_dir/ ;;
4227   esac
4228     for ac_exec_ext in '' $ac_executable_extensions; do
4229   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4230     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4231        ac_prog_rejected=yes
4232        continue
4233      fi
4234     ac_cv_prog_CC="cc"
4235     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4236     break 2
4237   fi
4238 done
4239   done
4240 IFS=$as_save_IFS
4241
4242 if test $ac_prog_rejected = yes; then
4243   # We found a bogon in the path, so make sure we never use it.
4244   set dummy $ac_cv_prog_CC
4245   shift
4246   if test $# != 0; then
4247     # We chose a different compiler from the bogus one.
4248     # However, it has the same basename, so the bogon will be chosen
4249     # first if we set CC to just the basename; use the full file name.
4250     shift
4251     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4252   fi
4253 fi
4254 fi
4255 fi
4256 CC=$ac_cv_prog_CC
4257 if test -n "$CC"; then
4258   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4259 printf "%s\n" "$CC" >&6; }
4260 else
4261   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4262 printf "%s\n" "no" >&6; }
4263 fi
4264
4265
4266 fi
4267 if test -z "$CC"; then
4268   if test -n "$ac_tool_prefix"; then
4269   for ac_prog in cl.exe
4270   do
4271     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4272 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4274 printf %s "checking for $ac_word... " >&6; }
4275 if ${ac_cv_prog_CC+:} false; then :
4276   printf %s "(cached) " >&6
4277 else
4278   if test -n "$CC"; then
4279   ac_cv_prog_CC="$CC" # Let the user override the test.
4280 else
4281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282 for as_dir in $PATH
4283 do
4284   IFS=$as_save_IFS
4285   case $as_dir in #(((
4286     '') as_dir=./ ;;
4287     */) ;;
4288     *) as_dir=$as_dir/ ;;
4289   esac
4290     for ac_exec_ext in '' $ac_executable_extensions; do
4291   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4292     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4293     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4294     break 2
4295   fi
4296 done
4297   done
4298 IFS=$as_save_IFS
4299
4300 fi
4301 fi
4302 CC=$ac_cv_prog_CC
4303 if test -n "$CC"; then
4304   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4305 printf "%s\n" "$CC" >&6; }
4306 else
4307   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308 printf "%s\n" "no" >&6; }
4309 fi
4310
4311
4312     test -n "$CC" && break
4313   done
4314 fi
4315 if test -z "$CC"; then
4316   ac_ct_CC=$CC
4317   for ac_prog in cl.exe
4318 do
4319   # Extract the first word of "$ac_prog", so it can be a program name with args.
4320 set dummy $ac_prog; ac_word=$2
4321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4322 printf %s "checking for $ac_word... " >&6; }
4323 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4324   printf %s "(cached) " >&6
4325 else
4326   if test -n "$ac_ct_CC"; then
4327   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4328 else
4329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330 for as_dir in $PATH
4331 do
4332   IFS=$as_save_IFS
4333   case $as_dir in #(((
4334     '') as_dir=./ ;;
4335     */) ;;
4336     *) as_dir=$as_dir/ ;;
4337   esac
4338     for ac_exec_ext in '' $ac_executable_extensions; do
4339   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4340     ac_cv_prog_ac_ct_CC="$ac_prog"
4341     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4342     break 2
4343   fi
4344 done
4345   done
4346 IFS=$as_save_IFS
4347
4348 fi
4349 fi
4350 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4351 if test -n "$ac_ct_CC"; then
4352   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4353 printf "%s\n" "$ac_ct_CC" >&6; }
4354 else
4355   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4356 printf "%s\n" "no" >&6; }
4357 fi
4358
4359
4360   test -n "$ac_ct_CC" && break
4361 done
4362
4363   if test "x$ac_ct_CC" = x; then
4364     CC=""
4365   else
4366     case $cross_compiling:$ac_tool_warned in
4367 yes:)
4368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4369 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4370 ac_tool_warned=yes ;;
4371 esac
4372     CC=$ac_ct_CC
4373   fi
4374 fi
4375
4376 fi
4377
4378
4379 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4380 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4381 as_fn_error $? "no acceptable C compiler found in \$PATH
4382 See \`config.log' for more details" "$LINENO" 5; }
4383
4384 # Provide some information about the compiler.
4385 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4386 set X $ac_compile
4387 ac_compiler=$2
4388 for ac_option in --version -v -V -qversion; do
4389   { { ac_try="$ac_compiler $ac_option >&5"
4390 case "(($ac_try" in
4391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4392   *) ac_try_echo=$ac_try;;
4393 esac
4394 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4395 printf "%s\n" "$ac_try_echo"; } >&5
4396   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4397   ac_status=$?
4398   if test -s conftest.err; then
4399     sed '10a\
4400 ... rest of stderr output deleted ...
4401          10q' conftest.err >conftest.er1
4402     cat conftest.er1 >&5
4403   fi
4404   rm -f conftest.er1 conftest.err
4405   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4406   test $ac_status = 0; }
4407 done
4408
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410 /* end confdefs.h.  */
4411
4412 int
4413 main ()
4414 {
4415
4416   ;
4417   return 0;
4418 }
4419 _ACEOF
4420 ac_clean_files_save=$ac_clean_files
4421 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4422 # Try to create an executable without -o first, disregard a.out.
4423 # It will help us diagnose broken compilers, and finding out an intuition
4424 # of exeext.
4425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4426 printf %s "checking whether the C compiler works... " >&6; }
4427 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4428
4429 # The possible output files:
4430 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4431
4432 ac_rmfiles=
4433 for ac_file in $ac_files
4434 do
4435   case $ac_file in
4436     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4437     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4438   esac
4439 done
4440 rm -f $ac_rmfiles
4441
4442 if { { ac_try="$ac_link_default"
4443 case "(($ac_try" in
4444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4445   *) ac_try_echo=$ac_try;;
4446 esac
4447 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4448 printf "%s\n" "$ac_try_echo"; } >&5
4449   (eval "$ac_link_default") 2>&5
4450   ac_status=$?
4451   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4452   test $ac_status = 0; }; then :
4453   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4454 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4455 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4456 # so that the user can short-circuit this test for compilers unknown to
4457 # Autoconf.
4458 for ac_file in $ac_files ''
4459 do
4460   test -f "$ac_file" || continue
4461   case $ac_file in
4462     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4463         ;;
4464     [ab].out )
4465         # We found the default executable, but exeext='' is most
4466         # certainly right.
4467         break;;
4468     *.* )
4469         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4470         then :; else
4471            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4472         fi
4473         # We set ac_cv_exeext here because the later test for it is not
4474         # safe: cross compilers may not add the suffix if given an `-o'
4475         # argument, so we may need to know it at that point already.
4476         # Even if this section looks crufty: it has the advantage of
4477         # actually working.
4478         break;;
4479     * )
4480         break;;
4481   esac
4482 done
4483 test "$ac_cv_exeext" = no && ac_cv_exeext=
4484
4485 else
4486   ac_file=''
4487 fi
4488 if test -z "$ac_file"; then :
4489   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490 printf "%s\n" "no" >&6; }
4491 printf "%s\n" "$as_me: failed program was:" >&5
4492 sed 's/^/| /' conftest.$ac_ext >&5
4493
4494 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4495 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4496 as_fn_error 77 "C compiler cannot create executables
4497 See \`config.log' for more details" "$LINENO" 5; }
4498 else
4499   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4500 printf "%s\n" "yes" >&6; }
4501 fi
4502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4503 printf %s "checking for C compiler default output file name... " >&6; }
4504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4505 printf "%s\n" "$ac_file" >&6; }
4506 ac_exeext=$ac_cv_exeext
4507
4508 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4509 ac_clean_files=$ac_clean_files_save
4510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4511 printf %s "checking for suffix of executables... " >&6; }
4512 if { { ac_try="$ac_link"
4513 case "(($ac_try" in
4514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4515   *) ac_try_echo=$ac_try;;
4516 esac
4517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4518 printf "%s\n" "$ac_try_echo"; } >&5
4519   (eval "$ac_link") 2>&5
4520   ac_status=$?
4521   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4522   test $ac_status = 0; }; then :
4523   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4524 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4525 # work properly (i.e., refer to `conftest.exe'), while it won't with
4526 # `rm'.
4527 for ac_file in conftest.exe conftest conftest.*; do
4528   test -f "$ac_file" || continue
4529   case $ac_file in
4530     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4531     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4532           break;;
4533     * ) break;;
4534   esac
4535 done
4536 else
4537   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4538 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4539 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4540 See \`config.log' for more details" "$LINENO" 5; }
4541 fi
4542 rm -f conftest conftest$ac_cv_exeext
4543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4544 printf "%s\n" "$ac_cv_exeext" >&6; }
4545
4546 rm -f conftest.$ac_ext
4547 EXEEXT=$ac_cv_exeext
4548 ac_exeext=$EXEEXT
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550 /* end confdefs.h.  */
4551 #include <stdio.h>
4552 int
4553 main ()
4554 {
4555 FILE *f = fopen ("conftest.out", "w");
4556  return ferror (f) || fclose (f) != 0;
4557
4558   ;
4559   return 0;
4560 }
4561 _ACEOF
4562 ac_clean_files="$ac_clean_files conftest.out"
4563 # Check that the compiler produces executables we can run.  If not, either
4564 # the compiler is broken, or we cross compile.
4565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4566 printf %s "checking whether we are cross compiling... " >&6; }
4567 if test "$cross_compiling" != yes; then
4568   { { ac_try="$ac_link"
4569 case "(($ac_try" in
4570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4571   *) ac_try_echo=$ac_try;;
4572 esac
4573 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4574 printf "%s\n" "$ac_try_echo"; } >&5
4575   (eval "$ac_link") 2>&5
4576   ac_status=$?
4577   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4578   test $ac_status = 0; }
4579   if { ac_try='./conftest$ac_cv_exeext'
4580   { { case "(($ac_try" in
4581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4582   *) ac_try_echo=$ac_try;;
4583 esac
4584 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4585 printf "%s\n" "$ac_try_echo"; } >&5
4586   (eval "$ac_try") 2>&5
4587   ac_status=$?
4588   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4589   test $ac_status = 0; }; }; then
4590     cross_compiling=no
4591   else
4592     if test "$cross_compiling" = maybe; then
4593         cross_compiling=yes
4594     else
4595         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4596 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4597 as_fn_error $? "cannot run C compiled programs.
4598 If you meant to cross compile, use \`--host'.
4599 See \`config.log' for more details" "$LINENO" 5; }
4600     fi
4601   fi
4602 fi
4603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4604 printf "%s\n" "$cross_compiling" >&6; }
4605
4606 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4607 ac_clean_files=$ac_clean_files_save
4608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4609 printf %s "checking for suffix of object files... " >&6; }
4610 if ${ac_cv_objext+:} false; then :
4611   printf %s "(cached) " >&6
4612 else
4613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4614 /* end confdefs.h.  */
4615
4616 int
4617 main ()
4618 {
4619
4620   ;
4621   return 0;
4622 }
4623 _ACEOF
4624 rm -f conftest.o conftest.obj
4625 if { { ac_try="$ac_compile"
4626 case "(($ac_try" in
4627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628   *) ac_try_echo=$ac_try;;
4629 esac
4630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4631 printf "%s\n" "$ac_try_echo"; } >&5
4632   (eval "$ac_compile") 2>&5
4633   ac_status=$?
4634   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4635   test $ac_status = 0; }; then :
4636   for ac_file in conftest.o conftest.obj conftest.*; do
4637   test -f "$ac_file" || continue;
4638   case $ac_file in
4639     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4640     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4641        break;;
4642   esac
4643 done
4644 else
4645   printf "%s\n" "$as_me: failed program was:" >&5
4646 sed 's/^/| /' conftest.$ac_ext >&5
4647
4648 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4649 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4650 as_fn_error $? "cannot compute suffix of object files: cannot compile
4651 See \`config.log' for more details" "$LINENO" 5; }
4652 fi
4653 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4654 fi
4655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4656 printf "%s\n" "$ac_cv_objext" >&6; }
4657 OBJEXT=$ac_cv_objext
4658 ac_objext=$OBJEXT
4659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4660 printf %s "checking whether we are using the GNU C compiler... " >&6; }
4661 if ${ac_cv_c_compiler_gnu+:} false; then :
4662   printf %s "(cached) " >&6
4663 else
4664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4665 /* end confdefs.h.  */
4666
4667 int
4668 main ()
4669 {
4670 #ifndef __GNUC__
4671        choke me
4672 #endif
4673
4674   ;
4675   return 0;
4676 }
4677 _ACEOF
4678 if ac_fn_c_try_compile "$LINENO"; then :
4679   ac_compiler_gnu=yes
4680 else
4681   ac_compiler_gnu=no
4682 fi
4683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4685
4686 fi
4687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4688 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4689 if test $ac_compiler_gnu = yes; then
4690   GCC=yes
4691 else
4692   GCC=
4693 fi
4694 ac_test_CFLAGS=${CFLAGS+set}
4695 ac_save_CFLAGS=$CFLAGS
4696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4697 printf %s "checking whether $CC accepts -g... " >&6; }
4698 if ${ac_cv_prog_cc_g+:} false; then :
4699   printf %s "(cached) " >&6
4700 else
4701   ac_save_c_werror_flag=$ac_c_werror_flag
4702    ac_c_werror_flag=yes
4703    ac_cv_prog_cc_g=no
4704    CFLAGS="-g"
4705    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4706 /* end confdefs.h.  */
4707
4708 int
4709 main ()
4710 {
4711
4712   ;
4713   return 0;
4714 }
4715 _ACEOF
4716 if ac_fn_c_try_compile "$LINENO"; then :
4717   ac_cv_prog_cc_g=yes
4718 else
4719   CFLAGS=""
4720       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4721 /* end confdefs.h.  */
4722
4723 int
4724 main ()
4725 {
4726
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 if ac_fn_c_try_compile "$LINENO"; then :
4732
4733 else
4734   ac_c_werror_flag=$ac_save_c_werror_flag
4735          CFLAGS="-g"
4736          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4737 /* end confdefs.h.  */
4738
4739 int
4740 main ()
4741 {
4742
4743   ;
4744   return 0;
4745 }
4746 _ACEOF
4747 if ac_fn_c_try_compile "$LINENO"; then :
4748   ac_cv_prog_cc_g=yes
4749 fi
4750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751 fi
4752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 fi
4754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4755    ac_c_werror_flag=$ac_save_c_werror_flag
4756 fi
4757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4758 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4759 if test "$ac_test_CFLAGS" = set; then
4760   CFLAGS=$ac_save_CFLAGS
4761 elif test $ac_cv_prog_cc_g = yes; then
4762   if test "$GCC" = yes; then
4763     CFLAGS="-g -O2"
4764   else
4765     CFLAGS="-g"
4766   fi
4767 else
4768   if test "$GCC" = yes; then
4769     CFLAGS="-O2"
4770   else
4771     CFLAGS=
4772   fi
4773 fi
4774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4775 printf %s "checking for $CC option to enable C11 features... " >&6; }
4776 if ${ac_cv_prog_cc_c11+:} false; then :
4777   printf %s "(cached) " >&6
4778 else
4779   ac_cv_prog_cc_c11=no
4780 ac_save_CC=$CC
4781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783 #include <stdarg.h>
4784 #include <stdbool.h>
4785 #include <stdlib.h>
4786 #include <wchar.h>
4787 #include <stdio.h>
4788
4789 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4790 #define debug(...) fprintf (stderr, __VA_ARGS__)
4791 #define showlist(...) puts (#__VA_ARGS__)
4792 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4793 static void
4794 test_varargs_macros (void)
4795 {
4796   int x = 1234;
4797   int y = 5678;
4798   debug ("Flag");
4799   debug ("X = %d\n", x);
4800   showlist (The first, second, and third items.);
4801   report (x>y, "x is %d but y is %d", x, y);
4802 }
4803
4804 // Check long long types.
4805 #define BIG64 18446744073709551615ull
4806 #define BIG32 4294967295ul
4807 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4808 #if !BIG_OK
4809   your preprocessor is broken;
4810 #endif
4811 #if BIG_OK
4812 #else
4813   your preprocessor is broken;
4814 #endif
4815 static long long int bignum = -9223372036854775807LL;
4816 static unsigned long long int ubignum = BIG64;
4817
4818 struct incomplete_array
4819 {
4820   int datasize;
4821   double data[];
4822 };
4823
4824 struct named_init {
4825   int number;
4826   const wchar_t *name;
4827   double average;
4828 };
4829
4830 typedef const char *ccp;
4831
4832 static inline int
4833 test_restrict (ccp restrict text)
4834 {
4835   // See if C++-style comments work.
4836   // Iterate through items via the restricted pointer.
4837   // Also check for declarations in for loops.
4838   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4839     continue;
4840   return 0;
4841 }
4842
4843 // Check varargs and va_copy.
4844 static bool
4845 test_varargs (const char *format, ...)
4846 {
4847   va_list args;
4848   va_start (args, format);
4849   va_list args_copy;
4850   va_copy (args_copy, args);
4851
4852   const char *str = "";
4853   int number = 0;
4854   float fnumber = 0;
4855
4856   while (*format)
4857     {
4858       switch (*format++)
4859         {
4860         case 's': // string
4861           str = va_arg (args_copy, const char *);
4862           break;
4863         case 'd': // int
4864           number = va_arg (args_copy, int);
4865           break;
4866         case 'f': // float
4867           fnumber = va_arg (args_copy, double);
4868           break;
4869         default:
4870           break;
4871         }
4872     }
4873   va_end (args_copy);
4874   va_end (args);
4875
4876   return *str && number && fnumber;
4877 }
4878 // Check _Alignas.
4879 char _Alignas (double) aligned_as_double;
4880 char _Alignas (0) no_special_alignment;
4881 extern char aligned_as_int;
4882 char _Alignas (0) _Alignas (int) aligned_as_int;
4883
4884 // Check _Alignof.
4885 enum
4886 {
4887   int_alignment = _Alignof (int),
4888   int_array_alignment = _Alignof (int[100]),
4889   char_alignment = _Alignof (char)
4890 };
4891 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4892
4893 // Check _Noreturn.
4894 int _Noreturn does_not_return (void) { for (;;) continue; }
4895
4896 // Check _Static_assert.
4897 struct test_static_assert
4898 {
4899   int x;
4900   _Static_assert (sizeof (int) <= sizeof (long int),
4901                   "_Static_assert does not work in struct");
4902   long int y;
4903 };
4904
4905 // Check UTF-8 literals.
4906 #define u8 syntax error!
4907 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4908
4909 // Check duplicate typedefs.
4910 typedef long *long_ptr;
4911 typedef long int *long_ptr;
4912 typedef long_ptr long_ptr;
4913
4914 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4915 struct anonymous
4916 {
4917   union {
4918     struct { int i; int j; };
4919     struct { int k; long int l; } w;
4920   };
4921   int m;
4922 } v1;
4923
4924 int
4925 main ()
4926 {
4927
4928   // Check bool.
4929   _Bool success = false;
4930
4931   // Check restrict.
4932   if (test_restrict ("String literal") == 0)
4933     success = true;
4934   char *restrict newvar = "Another string";
4935
4936   // Check varargs.
4937   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4938   test_varargs_macros ();
4939
4940   // Check flexible array members.
4941   struct incomplete_array *ia =
4942     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4943   ia->datasize = 10;
4944   for (int i = 0; i < ia->datasize; ++i)
4945     ia->data[i] = i * 1.234;
4946
4947   // Check named initializers.
4948   struct named_init ni = {
4949     .number = 34,
4950     .name = L"Test wide string",
4951     .average = 543.34343,
4952   };
4953
4954   ni.number = 58;
4955
4956   int dynamic_array[ni.number];
4957   dynamic_array[ni.number - 1] = 543;
4958
4959   // work around unused variable warnings
4960   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4961           || dynamic_array[ni.number - 1] != 543);
4962
4963   v1.i = 2;
4964   v1.w.k = 5;
4965   _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");
4966
4967   ;
4968   return 0;
4969 }
4970 _ACEOF
4971 for ac_arg in '' -std=gnu11
4972 do
4973   CC="$ac_save_CC $ac_arg"
4974   if ac_fn_c_try_compile "$LINENO"; then :
4975   ac_cv_prog_cc_c11=$ac_arg
4976 fi
4977 rm -f core conftest.err conftest.$ac_objext
4978   test "x$ac_cv_prog_cc_c11" != "xno" && break
4979 done
4980 rm -f conftest.$ac_ext
4981 CC=$ac_save_CC
4982
4983 fi
4984 # AC_CACHE_VAL
4985 ac_prog_cc_stdc_options=
4986 case "x$ac_cv_prog_cc_c11" in
4987   x)
4988     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4989 printf "%s\n" "none needed" >&6; } ;;
4990   xno)
4991     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4992 printf "%s\n" "unsupported" >&6; } ;;
4993   *)
4994     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4995     CC=$CC$ac_prog_cc_stdc_options
4996     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4997 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
4998 esac
4999 if test "x$ac_cv_prog_cc_c11" != xno; then :
5000   ac_prog_cc_stdc=c11
5001                  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5002 else
5003   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5004 printf %s "checking for $CC option to enable C99 features... " >&6; }
5005 if ${ac_cv_prog_cc_c99+:} false; then :
5006   printf %s "(cached) " >&6
5007 else
5008   ac_cv_prog_cc_c99=no
5009 ac_save_CC=$CC
5010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011 /* end confdefs.h.  */
5012 #include <stdarg.h>
5013 #include <stdbool.h>
5014 #include <stdlib.h>
5015 #include <wchar.h>
5016 #include <stdio.h>
5017
5018 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5019 #define debug(...) fprintf (stderr, __VA_ARGS__)
5020 #define showlist(...) puts (#__VA_ARGS__)
5021 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5022 static void
5023 test_varargs_macros (void)
5024 {
5025   int x = 1234;
5026   int y = 5678;
5027   debug ("Flag");
5028   debug ("X = %d\n", x);
5029   showlist (The first, second, and third items.);
5030   report (x>y, "x is %d but y is %d", x, y);
5031 }
5032
5033 // Check long long types.
5034 #define BIG64 18446744073709551615ull
5035 #define BIG32 4294967295ul
5036 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5037 #if !BIG_OK
5038   your preprocessor is broken;
5039 #endif
5040 #if BIG_OK
5041 #else
5042   your preprocessor is broken;
5043 #endif
5044 static long long int bignum = -9223372036854775807LL;
5045 static unsigned long long int ubignum = BIG64;
5046
5047 struct incomplete_array
5048 {
5049   int datasize;
5050   double data[];
5051 };
5052
5053 struct named_init {
5054   int number;
5055   const wchar_t *name;
5056   double average;
5057 };
5058
5059 typedef const char *ccp;
5060
5061 static inline int
5062 test_restrict (ccp restrict text)
5063 {
5064   // See if C++-style comments work.
5065   // Iterate through items via the restricted pointer.
5066   // Also check for declarations in for loops.
5067   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5068     continue;
5069   return 0;
5070 }
5071
5072 // Check varargs and va_copy.
5073 static bool
5074 test_varargs (const char *format, ...)
5075 {
5076   va_list args;
5077   va_start (args, format);
5078   va_list args_copy;
5079   va_copy (args_copy, args);
5080
5081   const char *str = "";
5082   int number = 0;
5083   float fnumber = 0;
5084
5085   while (*format)
5086     {
5087       switch (*format++)
5088         {
5089         case 's': // string
5090           str = va_arg (args_copy, const char *);
5091           break;
5092         case 'd': // int
5093           number = va_arg (args_copy, int);
5094           break;
5095         case 'f': // float
5096           fnumber = va_arg (args_copy, double);
5097           break;
5098         default:
5099           break;
5100         }
5101     }
5102   va_end (args_copy);
5103   va_end (args);
5104
5105   return *str && number && fnumber;
5106 }
5107 int
5108 main ()
5109 {
5110
5111   // Check bool.
5112   _Bool success = false;
5113
5114   // Check restrict.
5115   if (test_restrict ("String literal") == 0)
5116     success = true;
5117   char *restrict newvar = "Another string";
5118
5119   // Check varargs.
5120   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5121   test_varargs_macros ();
5122
5123   // Check flexible array members.
5124   struct incomplete_array *ia =
5125     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5126   ia->datasize = 10;
5127   for (int i = 0; i < ia->datasize; ++i)
5128     ia->data[i] = i * 1.234;
5129
5130   // Check named initializers.
5131   struct named_init ni = {
5132     .number = 34,
5133     .name = L"Test wide string",
5134     .average = 543.34343,
5135   };
5136
5137   ni.number = 58;
5138
5139   int dynamic_array[ni.number];
5140   dynamic_array[ni.number - 1] = 543;
5141
5142   // work around unused variable warnings
5143   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5144           || dynamic_array[ni.number - 1] != 543);
5145
5146   ;
5147   return 0;
5148 }
5149 _ACEOF
5150 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5151 do
5152   CC="$ac_save_CC $ac_arg"
5153   if ac_fn_c_try_compile "$LINENO"; then :
5154   ac_cv_prog_cc_c99=$ac_arg
5155 fi
5156 rm -f core conftest.err conftest.$ac_objext
5157   test "x$ac_cv_prog_cc_c99" != "xno" && break
5158 done
5159 rm -f conftest.$ac_ext
5160 CC=$ac_save_CC
5161
5162 fi
5163 # AC_CACHE_VAL
5164 ac_prog_cc_stdc_options=
5165 case "x$ac_cv_prog_cc_c99" in
5166   x)
5167     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5168 printf "%s\n" "none needed" >&6; } ;;
5169   xno)
5170     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5171 printf "%s\n" "unsupported" >&6; } ;;
5172   *)
5173     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5174     CC=$CC$ac_prog_cc_stdc_options
5175     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5176 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5177 esac
5178 if test "x$ac_cv_prog_cc_c99" != xno; then :
5179   ac_prog_cc_stdc=c99
5180                     ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5181 else
5182   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5183 printf %s "checking for $CC option to enable C89 features... " >&6; }
5184 if ${ac_cv_prog_cc_c89+:} false; then :
5185   printf %s "(cached) " >&6
5186 else
5187   ac_cv_prog_cc_c89=no
5188 ac_save_CC=$CC
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190 /* end confdefs.h.  */
5191 #include <stdarg.h>
5192 #include <stdio.h>
5193 struct stat;
5194 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5195 struct buf { int x; };
5196 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5197 static char *e (p, i)
5198      char **p;
5199      int i;
5200 {
5201   return p[i];
5202 }
5203 static char *f (char * (*g) (char **, int), char **p, ...)
5204 {
5205   char *s;
5206   va_list v;
5207   va_start (v,p);
5208   s = g (p, va_arg (v,int));
5209   va_end (v);
5210   return s;
5211 }
5212
5213 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5214    function prototypes and stuff, but not '\xHH' hex character constants.
5215    These don't provoke an error unfortunately, instead are silently treated
5216    as 'x'.  The following induces an error, until -std is added to get
5217    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5218    array size at least.  It's necessary to write '\x00'==0 to get something
5219    that's true only with -std.  */
5220 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5221
5222 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5223    inside strings and character constants.  */
5224 #define FOO(x) 'x'
5225 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5226
5227 int test (int i, double x);
5228 struct s1 {int (*f) (int a);};
5229 struct s2 {int (*f) (double a);};
5230 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5231 int argc;
5232 char **argv;
5233 int
5234 main ()
5235 {
5236 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5237   ;
5238   return 0;
5239 }
5240 _ACEOF
5241 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5242         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5243 do
5244   CC="$ac_save_CC $ac_arg"
5245   if ac_fn_c_try_compile "$LINENO"; then :
5246   ac_cv_prog_cc_c89=$ac_arg
5247 fi
5248 rm -f core conftest.err conftest.$ac_objext
5249   test "x$ac_cv_prog_cc_c89" != "xno" && break
5250 done
5251 rm -f conftest.$ac_ext
5252 CC=$ac_save_CC
5253
5254 fi
5255 # AC_CACHE_VAL
5256 ac_prog_cc_stdc_options=
5257 case "x$ac_cv_prog_cc_c89" in
5258   x)
5259     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5260 printf "%s\n" "none needed" >&6; } ;;
5261   xno)
5262     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5263 printf "%s\n" "unsupported" >&6; } ;;
5264   *)
5265     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5266     CC=$CC$ac_prog_cc_stdc_options
5267     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5268 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5269 esac
5270 if test "x$ac_cv_prog_cc_c89" != xno; then :
5271   ac_prog_cc_stdc=c89
5272                        ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5273 else
5274   ac_prog_cc_stdc=no
5275                        ac_cv_prog_cc_stdc=no
5276 fi
5277
5278 fi
5279
5280 fi
5281
5282 ac_ext=c
5283 ac_cpp='$CPP $CPPFLAGS'
5284 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5285 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5286 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5287
5288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5289 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5290 set dummy $CC; am__cc=`printf "%s\n" "$2" | \
5291                        sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5292 if eval \${am_cv_prog_cc_${am__cc}_c_o+:} false; then :
5293   printf %s "(cached) " >&6
5294 else
5295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5296 /* end confdefs.h.  */
5297
5298 int
5299 main ()
5300 {
5301
5302   ;
5303   return 0;
5304 }
5305 _ACEOF
5306 # Make sure it works both with $CC and with simple cc.
5307 # We do the test twice because some compilers refuse to overwrite an
5308 # existing .o file with -o, though they will create one.
5309 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5310 rm -f conftest2.*
5311 if { { case "(($ac_try" in
5312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5313   *) ac_try_echo=$ac_try;;
5314 esac
5315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5316 printf "%s\n" "$ac_try_echo"; } >&5
5317   (eval "$ac_try") 2>&5
5318   ac_status=$?
5319   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5320   test $ac_status = 0; } && test -f conftest2.$ac_objext
5321 then
5322   eval am_cv_prog_cc_${am__cc}_c_o=yes
5323 else
5324   eval am_cv_prog_cc_${am__cc}_c_o=no
5325 fi
5326 rm -f core conftest*
5327
5328 fi
5329 if eval test \"\$am_cv_prog_cc_${am__cc}_c_o\" = yes; then
5330   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331 printf "%s\n" "yes" >&6; }
5332 else
5333   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334 printf "%s\n" "no" >&6; }
5335   # Losing compiler, so wrap it with the 'compile' script.
5336   # FIXME: It is wrong to rewrite CC.
5337   # But if we don't then we get into trouble of one sort or another.
5338   # A longer-term fix would be to have automake use am__CC in this case,
5339   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5340   CC="$am_aux_dir/compile $CC"
5341 fi
5342 DEPDIR=.deps
5343
5344 ac_config_commands="$ac_config_commands depfiles"
5345
5346
5347 am_make=${MAKE-make}
5348 cat > confinc << 'END'
5349 am__doit:
5350         @echo this is the am__doit target
5351 .PHONY: am__doit
5352 END
5353 # If we don't find an include directive, just comment out the code.
5354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5355 printf %s "checking for style of include used by $am_make... " >&6; }
5356 am__include="#"
5357 am__quote=
5358 _am_result=none
5359 # First try GNU make style include.
5360 echo "include confinc" > confmf
5361 # Ignore all kinds of additional output from 'make'.
5362 case `$am_make -s -f confmf 2> /dev/null` in #(
5363 *the\ am__doit\ target*)
5364   am__include=include
5365   am__quote=
5366   _am_result=GNU
5367   ;;
5368 esac
5369 # Now try BSD make style include.
5370 if test "$am__include" = "#"; then
5371    echo '.include "confinc"' > confmf
5372    case `$am_make -s -f confmf 2> /dev/null` in #(
5373    *the\ am__doit\ target*)
5374      am__include=.include
5375      am__quote="\""
5376      _am_result=BSD
5377      ;;
5378    esac
5379 fi
5380
5381
5382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5383 printf "%s\n" "$_am_result" >&6; }
5384 rm -f confinc confmf
5385
5386 # Check whether --enable-dependency-tracking was given.
5387 if test "${enable_dependency_tracking+set}" = set; then :
5388   enableval=$enable_dependency_tracking;
5389 fi
5390
5391 if test "x$enable_dependency_tracking" != xno; then
5392   am_depcomp="$ac_aux_dir/depcomp"
5393   AMDEPBACKSLASH='\'
5394   am__nodep='_no'
5395 fi
5396  if test "x$enable_dependency_tracking" != xno; then
5397   AMDEP_TRUE=
5398   AMDEP_FALSE='#'
5399 else
5400   AMDEP_TRUE='#'
5401   AMDEP_FALSE=
5402 fi
5403
5404
5405
5406 depcc="$CC"   am_compiler_list=
5407
5408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5409 printf %s "checking dependency style of $depcc... " >&6; }
5410 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5411   printf %s "(cached) " >&6
5412 else
5413   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5414   # We make a subdir and do the tests there.  Otherwise we can end up
5415   # making bogus files that we don't know about and never remove.  For
5416   # instance it was reported that on HP-UX the gcc test will end up
5417   # making a dummy file named 'D' -- because '-MD' means "put the output
5418   # in D".
5419   rm -rf conftest.dir
5420   mkdir conftest.dir
5421   # Copy depcomp to subdir because otherwise we won't find it if we're
5422   # using a relative directory.
5423   cp "$am_depcomp" conftest.dir
5424   cd conftest.dir
5425   # We will build objects and dependencies in a subdirectory because
5426   # it helps to detect inapplicable dependency modes.  For instance
5427   # both Tru64's cc and ICC support -MD to output dependencies as a
5428   # side effect of compilation, but ICC will put the dependencies in
5429   # the current directory while Tru64 will put them in the object
5430   # directory.
5431   mkdir sub
5432
5433   am_cv_CC_dependencies_compiler_type=none
5434   if test "$am_compiler_list" = ""; then
5435      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5436   fi
5437   am__universal=false
5438   case " $depcc " in #(
5439      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5440      esac
5441
5442   for depmode in $am_compiler_list; do
5443     # Setup a source with many dependencies, because some compilers
5444     # like to wrap large dependency lists on column 80 (with \), and
5445     # we should not choose a depcomp mode which is confused by this.
5446     #
5447     # We need to recreate these files for each test, as the compiler may
5448     # overwrite some of them when testing with obscure command lines.
5449     # This happens at least with the AIX C compiler.
5450     : > sub/conftest.c
5451     for i in 1 2 3 4 5 6; do
5452       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5453       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5454       # Solaris 10 /bin/sh.
5455       echo '/* dummy */' > sub/conftst$i.h
5456     done
5457     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5458
5459     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5460     # mode.  It turns out that the SunPro C++ compiler does not properly
5461     # handle '-M -o', and we need to detect this.  Also, some Intel
5462     # versions had trouble with output in subdirs.
5463     am__obj=sub/conftest.${OBJEXT-o}
5464     am__minus_obj="-o $am__obj"
5465     case $depmode in
5466     gcc)
5467       # This depmode causes a compiler race in universal mode.
5468       test "$am__universal" = false || continue
5469       ;;
5470     nosideeffect)
5471       # After this tag, mechanisms are not by side-effect, so they'll
5472       # only be used when explicitly requested.
5473       if test "x$enable_dependency_tracking" = xyes; then
5474         continue
5475       else
5476         break
5477       fi
5478       ;;
5479     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5480       # This compiler won't grok '-c -o', but also, the minuso test has
5481       # not run yet.  These depmodes are late enough in the game, and
5482       # so weak that their functioning should not be impacted.
5483       am__obj=conftest.${OBJEXT-o}
5484       am__minus_obj=
5485       ;;
5486     none) break ;;
5487     esac
5488     if depmode=$depmode \
5489        source=sub/conftest.c object=$am__obj \
5490        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5491        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5492          >/dev/null 2>conftest.err &&
5493        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5494        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5495        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5496        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5497       # icc doesn't choke on unknown options, it will just issue warnings
5498       # or remarks (even with -Werror).  So we grep stderr for any message
5499       # that says an option was ignored or not supported.
5500       # When given -MP, icc 7.0 and 7.1 complain thusly:
5501       #   icc: Command line warning: ignoring option '-M'; no argument required
5502       # The diagnosis changed in icc 8.0:
5503       #   icc: Command line remark: option '-MP' not supported
5504       if (grep 'ignoring option' conftest.err ||
5505           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5506         am_cv_CC_dependencies_compiler_type=$depmode
5507         break
5508       fi
5509     fi
5510   done
5511
5512   cd ..
5513   rm -rf conftest.dir
5514 else
5515   am_cv_CC_dependencies_compiler_type=none
5516 fi
5517
5518 fi
5519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5520 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5521 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5522
5523  if
5524   test "x$enable_dependency_tracking" != xno \
5525   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5526   am__fastdepCC_TRUE=
5527   am__fastdepCC_FALSE='#'
5528 else
5529   am__fastdepCC_TRUE='#'
5530   am__fastdepCC_FALSE=
5531 fi
5532
5533
5534
5535 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
5536
5537 if test -n "$ac_tool_prefix"; then
5538   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5539 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541 printf %s "checking for $ac_word... " >&6; }
5542 if ${ac_cv_prog_RANLIB+:} false; then :
5543   printf %s "(cached) " >&6
5544 else
5545   if test -n "$RANLIB"; then
5546   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5547 else
5548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5549 for as_dir in $PATH
5550 do
5551   IFS=$as_save_IFS
5552   case $as_dir in #(((
5553     '') as_dir=./ ;;
5554     */) ;;
5555     *) as_dir=$as_dir/ ;;
5556   esac
5557     for ac_exec_ext in '' $ac_executable_extensions; do
5558   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5559     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5560     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5561     break 2
5562   fi
5563 done
5564   done
5565 IFS=$as_save_IFS
5566
5567 fi
5568 fi
5569 RANLIB=$ac_cv_prog_RANLIB
5570 if test -n "$RANLIB"; then
5571   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5572 printf "%s\n" "$RANLIB" >&6; }
5573 else
5574   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575 printf "%s\n" "no" >&6; }
5576 fi
5577
5578
5579 fi
5580 if test -z "$ac_cv_prog_RANLIB"; then
5581   ac_ct_RANLIB=$RANLIB
5582   # Extract the first word of "ranlib", so it can be a program name with args.
5583 set dummy ranlib; ac_word=$2
5584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585 printf %s "checking for $ac_word... " >&6; }
5586 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5587   printf %s "(cached) " >&6
5588 else
5589   if test -n "$ac_ct_RANLIB"; then
5590   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5591 else
5592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593 for as_dir in $PATH
5594 do
5595   IFS=$as_save_IFS
5596   case $as_dir in #(((
5597     '') as_dir=./ ;;
5598     */) ;;
5599     *) as_dir=$as_dir/ ;;
5600   esac
5601     for ac_exec_ext in '' $ac_executable_extensions; do
5602   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5603     ac_cv_prog_ac_ct_RANLIB="ranlib"
5604     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5605     break 2
5606   fi
5607 done
5608   done
5609 IFS=$as_save_IFS
5610
5611 fi
5612 fi
5613 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5614 if test -n "$ac_ct_RANLIB"; then
5615   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5616 printf "%s\n" "$ac_ct_RANLIB" >&6; }
5617 else
5618   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619 printf "%s\n" "no" >&6; }
5620 fi
5621
5622   if test "x$ac_ct_RANLIB" = x; then
5623     RANLIB=":"
5624   else
5625     case $cross_compiling:$ac_tool_warned in
5626 yes:)
5627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5628 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5629 ac_tool_warned=yes ;;
5630 esac
5631     RANLIB=$ac_ct_RANLIB
5632   fi
5633 else
5634   RANLIB="$ac_cv_prog_RANLIB"
5635 fi
5636
5637
5638 ac_ext=c
5639 ac_cpp='$CPP $CPPFLAGS'
5640 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5641 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5642 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5644 printf %s "checking how to run the C preprocessor... " >&6; }
5645 # On Suns, sometimes $CPP names a directory.
5646 if test -n "$CPP" && test -d "$CPP"; then
5647   CPP=
5648 fi
5649 if test -z "$CPP"; then
5650   if ${ac_cv_prog_CPP+:} false; then :
5651   printf %s "(cached) " >&6
5652 else
5653       # Double quotes because CPP needs to be expanded
5654     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5655     do
5656       ac_preproc_ok=false
5657 for ac_c_preproc_warn_flag in '' yes
5658 do
5659   # Use a header file that comes with gcc, so configuring glibc
5660   # with a fresh cross-compiler works.
5661   # On the NeXT, cc -E runs the code through the compiler's parser,
5662   # not just through cpp. "Syntax error" is here to catch this case.
5663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5664 /* end confdefs.h.  */
5665 #include <limits.h>
5666                      Syntax error
5667 _ACEOF
5668 if ac_fn_c_try_cpp "$LINENO"; then :
5669
5670 else
5671   # Broken: fails on valid input.
5672 continue
5673 fi
5674 rm -f conftest.err conftest.i conftest.$ac_ext
5675
5676   # OK, works on sane cases.  Now check whether nonexistent headers
5677   # can be detected and how.
5678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679 /* end confdefs.h.  */
5680 #include <ac_nonexistent.h>
5681 _ACEOF
5682 if ac_fn_c_try_cpp "$LINENO"; then :
5683   # Broken: success on invalid input.
5684 continue
5685 else
5686   # Passes both tests.
5687 ac_preproc_ok=:
5688 break
5689 fi
5690 rm -f conftest.err conftest.i conftest.$ac_ext
5691
5692 done
5693 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5694 rm -f conftest.i conftest.err conftest.$ac_ext
5695 if $ac_preproc_ok; then :
5696   break
5697 fi
5698
5699     done
5700     ac_cv_prog_CPP=$CPP
5701
5702 fi
5703   CPP=$ac_cv_prog_CPP
5704 else
5705   ac_cv_prog_CPP=$CPP
5706 fi
5707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5708 printf "%s\n" "$CPP" >&6; }
5709 ac_preproc_ok=false
5710 for ac_c_preproc_warn_flag in '' yes
5711 do
5712   # Use a header file that comes with gcc, so configuring glibc
5713   # with a fresh cross-compiler works.
5714   # On the NeXT, cc -E runs the code through the compiler's parser,
5715   # not just through cpp. "Syntax error" is here to catch this case.
5716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5717 /* end confdefs.h.  */
5718 #include <limits.h>
5719                      Syntax error
5720 _ACEOF
5721 if ac_fn_c_try_cpp "$LINENO"; then :
5722
5723 else
5724   # Broken: fails on valid input.
5725 continue
5726 fi
5727 rm -f conftest.err conftest.i conftest.$ac_ext
5728
5729   # OK, works on sane cases.  Now check whether nonexistent headers
5730   # can be detected and how.
5731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h.  */
5733 #include <ac_nonexistent.h>
5734 _ACEOF
5735 if ac_fn_c_try_cpp "$LINENO"; then :
5736   # Broken: success on invalid input.
5737 continue
5738 else
5739   # Passes both tests.
5740 ac_preproc_ok=:
5741 break
5742 fi
5743 rm -f conftest.err conftest.i conftest.$ac_ext
5744
5745 done
5746 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5747 rm -f conftest.i conftest.err conftest.$ac_ext
5748 if $ac_preproc_ok; then :
5749
5750 else
5751   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5752 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5753 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5754 See \`config.log' for more details" "$LINENO" 5; }
5755 fi
5756
5757 ac_ext=c
5758 ac_cpp='$CPP $CPPFLAGS'
5759 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5760 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5761 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5762
5763
5764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5765 printf %s "checking for grep that handles long lines and -e... " >&6; }
5766 if ${ac_cv_path_GREP+:} false; then :
5767   printf %s "(cached) " >&6
5768 else
5769   if test -z "$GREP"; then
5770   ac_path_GREP_found=false
5771   # Loop through the user's path and test for each of PROGNAME-LIST
5772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5773 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5774 do
5775   IFS=$as_save_IFS
5776   case $as_dir in #(((
5777     '') as_dir=./ ;;
5778     */) ;;
5779     *) as_dir=$as_dir/ ;;
5780   esac
5781     for ac_prog in grep ggrep; do
5782     for ac_exec_ext in '' $ac_executable_extensions; do
5783       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5784       as_fn_executable_p "$ac_path_GREP" || continue
5785 # Check for GNU ac_path_GREP and select it if it is found.
5786   # Check for GNU $ac_path_GREP
5787 case `"$ac_path_GREP" --version 2>&1` in
5788 *GNU*)
5789   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5790 *)
5791   ac_count=0
5792   printf %s 0123456789 >"conftest.in"
5793   while :
5794   do
5795     cat "conftest.in" "conftest.in" >"conftest.tmp"
5796     mv "conftest.tmp" "conftest.in"
5797     cp "conftest.in" "conftest.nl"
5798     printf "%s\n" 'GREP' >> "conftest.nl"
5799     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5800     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5801     as_fn_arith $ac_count + 1 && ac_count=$as_val
5802     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5803       # Best one so far, save it but keep looking for a better one
5804       ac_cv_path_GREP="$ac_path_GREP"
5805       ac_path_GREP_max=$ac_count
5806     fi
5807     # 10*(2^10) chars as input seems more than enough
5808     test $ac_count -gt 10 && break
5809   done
5810   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5811 esac
5812
5813       $ac_path_GREP_found && break 3
5814     done
5815   done
5816   done
5817 IFS=$as_save_IFS
5818   if test -z "$ac_cv_path_GREP"; then
5819     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5820   fi
5821 else
5822   ac_cv_path_GREP=$GREP
5823 fi
5824
5825 fi
5826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5827 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5828  GREP="$ac_cv_path_GREP"
5829
5830
5831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5832 printf %s "checking for egrep... " >&6; }
5833 if ${ac_cv_path_EGREP+:} false; then :
5834   printf %s "(cached) " >&6
5835 else
5836   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5837    then ac_cv_path_EGREP="$GREP -E"
5838    else
5839      if test -z "$EGREP"; then
5840   ac_path_EGREP_found=false
5841   # Loop through the user's path and test for each of PROGNAME-LIST
5842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5844 do
5845   IFS=$as_save_IFS
5846   case $as_dir in #(((
5847     '') as_dir=./ ;;
5848     */) ;;
5849     *) as_dir=$as_dir/ ;;
5850   esac
5851     for ac_prog in egrep; do
5852     for ac_exec_ext in '' $ac_executable_extensions; do
5853       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5854       as_fn_executable_p "$ac_path_EGREP" || continue
5855 # Check for GNU ac_path_EGREP and select it if it is found.
5856   # Check for GNU $ac_path_EGREP
5857 case `"$ac_path_EGREP" --version 2>&1` in
5858 *GNU*)
5859   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5860 *)
5861   ac_count=0
5862   printf %s 0123456789 >"conftest.in"
5863   while :
5864   do
5865     cat "conftest.in" "conftest.in" >"conftest.tmp"
5866     mv "conftest.tmp" "conftest.in"
5867     cp "conftest.in" "conftest.nl"
5868     printf "%s\n" 'EGREP' >> "conftest.nl"
5869     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5870     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5871     as_fn_arith $ac_count + 1 && ac_count=$as_val
5872     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5873       # Best one so far, save it but keep looking for a better one
5874       ac_cv_path_EGREP="$ac_path_EGREP"
5875       ac_path_EGREP_max=$ac_count
5876     fi
5877     # 10*(2^10) chars as input seems more than enough
5878     test $ac_count -gt 10 && break
5879   done
5880   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5881 esac
5882
5883       $ac_path_EGREP_found && break 3
5884     done
5885   done
5886   done
5887 IFS=$as_save_IFS
5888   if test -z "$ac_cv_path_EGREP"; then
5889     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5890   fi
5891 else
5892   ac_cv_path_EGREP=$EGREP
5893 fi
5894
5895    fi
5896 fi
5897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5898 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5899  EGREP="$ac_cv_path_EGREP"
5900
5901
5902
5903
5904   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5905 printf %s "checking for Minix Amsterdam compiler... " >&6; }
5906 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5907   printf %s "(cached) " >&6
5908 else
5909
5910       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5911 /* end confdefs.h.  */
5912
5913 #ifdef __ACK__
5914 Amsterdam
5915 #endif
5916
5917 _ACEOF
5918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5919   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5920   gl_cv_c_amsterdam_compiler=yes
5921 else
5922   gl_cv_c_amsterdam_compiler=no
5923 fi
5924 rm -rf conftest*
5925
5926
5927 fi
5928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5929 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
5930   if test -z "$AR"; then
5931     if test $gl_cv_c_amsterdam_compiler = yes; then
5932       AR='cc -c.a'
5933       if test -z "$ARFLAGS"; then
5934         ARFLAGS='-o'
5935       fi
5936     else
5937                   if test -n "$ac_tool_prefix"; then
5938   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5939 set dummy ${ac_tool_prefix}ar; ac_word=$2
5940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5941 printf %s "checking for $ac_word... " >&6; }
5942 if ${ac_cv_prog_AR+:} false; then :
5943   printf %s "(cached) " >&6
5944 else
5945   if test -n "$AR"; then
5946   ac_cv_prog_AR="$AR" # Let the user override the test.
5947 else
5948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949 for as_dir in $PATH
5950 do
5951   IFS=$as_save_IFS
5952   case $as_dir in #(((
5953     '') as_dir=./ ;;
5954     */) ;;
5955     *) as_dir=$as_dir/ ;;
5956   esac
5957     for ac_exec_ext in '' $ac_executable_extensions; do
5958   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5959     ac_cv_prog_AR="${ac_tool_prefix}ar"
5960     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5961     break 2
5962   fi
5963 done
5964   done
5965 IFS=$as_save_IFS
5966
5967 fi
5968 fi
5969 AR=$ac_cv_prog_AR
5970 if test -n "$AR"; then
5971   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5972 printf "%s\n" "$AR" >&6; }
5973 else
5974   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975 printf "%s\n" "no" >&6; }
5976 fi
5977
5978
5979 fi
5980 if test -z "$ac_cv_prog_AR"; then
5981   ac_ct_AR=$AR
5982   # Extract the first word of "ar", so it can be a program name with args.
5983 set dummy ar; ac_word=$2
5984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985 printf %s "checking for $ac_word... " >&6; }
5986 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5987   printf %s "(cached) " >&6
5988 else
5989   if test -n "$ac_ct_AR"; then
5990   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5991 else
5992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993 for as_dir in $PATH
5994 do
5995   IFS=$as_save_IFS
5996   case $as_dir in #(((
5997     '') as_dir=./ ;;
5998     */) ;;
5999     *) as_dir=$as_dir/ ;;
6000   esac
6001     for ac_exec_ext in '' $ac_executable_extensions; do
6002   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6003     ac_cv_prog_ac_ct_AR="ar"
6004     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6005     break 2
6006   fi
6007 done
6008   done
6009 IFS=$as_save_IFS
6010
6011 fi
6012 fi
6013 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6014 if test -n "$ac_ct_AR"; then
6015   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6016 printf "%s\n" "$ac_ct_AR" >&6; }
6017 else
6018   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019 printf "%s\n" "no" >&6; }
6020 fi
6021
6022   if test "x$ac_ct_AR" = x; then
6023     AR="ar"
6024   else
6025     case $cross_compiling:$ac_tool_warned in
6026 yes:)
6027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6028 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6029 ac_tool_warned=yes ;;
6030 esac
6031     AR=$ac_ct_AR
6032   fi
6033 else
6034   AR="$ac_cv_prog_AR"
6035 fi
6036
6037       if test -z "$ARFLAGS"; then
6038         ARFLAGS='cru'
6039       fi
6040     fi
6041   else
6042     if test -z "$ARFLAGS"; then
6043       ARFLAGS='cru'
6044     fi
6045   fi
6046
6047
6048   if test -z "$RANLIB"; then
6049     if test $gl_cv_c_amsterdam_compiler = yes; then
6050       RANLIB=':'
6051     else
6052             if test -n "$ac_tool_prefix"; then
6053   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6054 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6056 printf %s "checking for $ac_word... " >&6; }
6057 if ${ac_cv_prog_RANLIB+:} false; then :
6058   printf %s "(cached) " >&6
6059 else
6060   if test -n "$RANLIB"; then
6061   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6062 else
6063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064 for as_dir in $PATH
6065 do
6066   IFS=$as_save_IFS
6067   case $as_dir in #(((
6068     '') as_dir=./ ;;
6069     */) ;;
6070     *) as_dir=$as_dir/ ;;
6071   esac
6072     for ac_exec_ext in '' $ac_executable_extensions; do
6073   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6074     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6075     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6076     break 2
6077   fi
6078 done
6079   done
6080 IFS=$as_save_IFS
6081
6082 fi
6083 fi
6084 RANLIB=$ac_cv_prog_RANLIB
6085 if test -n "$RANLIB"; then
6086   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6087 printf "%s\n" "$RANLIB" >&6; }
6088 else
6089   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090 printf "%s\n" "no" >&6; }
6091 fi
6092
6093
6094 fi
6095 if test -z "$ac_cv_prog_RANLIB"; then
6096   ac_ct_RANLIB=$RANLIB
6097   # Extract the first word of "ranlib", so it can be a program name with args.
6098 set dummy ranlib; ac_word=$2
6099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6100 printf %s "checking for $ac_word... " >&6; }
6101 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6102   printf %s "(cached) " >&6
6103 else
6104   if test -n "$ac_ct_RANLIB"; then
6105   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6106 else
6107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6108 for as_dir in $PATH
6109 do
6110   IFS=$as_save_IFS
6111   case $as_dir in #(((
6112     '') as_dir=./ ;;
6113     */) ;;
6114     *) as_dir=$as_dir/ ;;
6115   esac
6116     for ac_exec_ext in '' $ac_executable_extensions; do
6117   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6118     ac_cv_prog_ac_ct_RANLIB="ranlib"
6119     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6120     break 2
6121   fi
6122 done
6123   done
6124 IFS=$as_save_IFS
6125
6126 fi
6127 fi
6128 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6129 if test -n "$ac_ct_RANLIB"; then
6130   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6131 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6132 else
6133   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134 printf "%s\n" "no" >&6; }
6135 fi
6136
6137   if test "x$ac_ct_RANLIB" = x; then
6138     RANLIB=":"
6139   else
6140     case $cross_compiling:$ac_tool_warned in
6141 yes:)
6142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6143 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6144 ac_tool_warned=yes ;;
6145 esac
6146     RANLIB=$ac_ct_RANLIB
6147   fi
6148 else
6149   RANLIB="$ac_cv_prog_RANLIB"
6150 fi
6151
6152     fi
6153   fi
6154
6155
6156
6157 # For better backward-compatibility.  Users are advised to stop
6158 # relying on this cache variable and C preprocessor symbol ASAP.
6159 eval ac_cv_prog_cc_${am__cc}_c_o=\$am_cv_prog_cc_${am__cc}_c_o
6160 if eval test \"\$ac_cv_prog_cc_${am__cc}_c_o\" != yes; then
6161
6162 printf "%s\n" "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
6163
6164 fi
6165
6166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6167 printf %s "checking for ANSI C header files... " >&6; }
6168 if ${ac_cv_header_stdc+:} false; then :
6169   printf %s "(cached) " >&6
6170 else
6171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6172 /* end confdefs.h.  */
6173 #include <stdlib.h>
6174 #include <stdarg.h>
6175 #include <string.h>
6176 #include <float.h>
6177
6178 int
6179 main ()
6180 {
6181
6182   ;
6183   return 0;
6184 }
6185 _ACEOF
6186 if ac_fn_c_try_compile "$LINENO"; then :
6187   ac_cv_header_stdc=yes
6188 else
6189   ac_cv_header_stdc=no
6190 fi
6191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6192
6193 if test $ac_cv_header_stdc = yes; then
6194   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6196 /* end confdefs.h.  */
6197 #include <string.h>
6198
6199 _ACEOF
6200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6201   $EGREP "memchr" >/dev/null 2>&1; then :
6202
6203 else
6204   ac_cv_header_stdc=no
6205 fi
6206 rm -rf conftest*
6207
6208 fi
6209
6210 if test $ac_cv_header_stdc = yes; then
6211   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6213 /* end confdefs.h.  */
6214 #include <stdlib.h>
6215
6216 _ACEOF
6217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6218   $EGREP "free" >/dev/null 2>&1; then :
6219
6220 else
6221   ac_cv_header_stdc=no
6222 fi
6223 rm -rf conftest*
6224
6225 fi
6226
6227 if test $ac_cv_header_stdc = yes; then
6228   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6229   if test "$cross_compiling" = yes; then :
6230   :
6231 else
6232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6233 /* end confdefs.h.  */
6234 #include <ctype.h>
6235 #include <stdlib.h>
6236 #if ((' ' & 0x0FF) == 0x020)
6237 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6238 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6239 #else
6240 # define ISLOWER(c) \
6241                    (('a' <= (c) && (c) <= 'i') \
6242                      || ('j' <= (c) && (c) <= 'r') \
6243                      || ('s' <= (c) && (c) <= 'z'))
6244 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6245 #endif
6246
6247 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6248 int
6249 main ()
6250 {
6251   int i;
6252   for (i = 0; i < 256; i++)
6253     if (XOR (islower (i), ISLOWER (i))
6254         || toupper (i) != TOUPPER (i))
6255       return 2;
6256   return 0;
6257 }
6258 _ACEOF
6259 if ac_fn_c_try_run "$LINENO"; then :
6260
6261 else
6262   ac_cv_header_stdc=no
6263 fi
6264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6265   conftest.$ac_objext conftest.beam conftest.$ac_ext
6266 fi
6267
6268 fi
6269 fi
6270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6271 printf "%s\n" "$ac_cv_header_stdc" >&6; }
6272 if test $ac_cv_header_stdc = yes; then
6273
6274 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6275
6276 fi
6277
6278 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6279 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6280                   inttypes.h stdint.h unistd.h
6281 do :
6282   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
6283 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6284 "
6285 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6286   cat >>confdefs.h <<_ACEOF
6287 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
6288 _ACEOF
6289
6290 fi
6291
6292 done
6293
6294
6295
6296   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6297 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6298   MINIX=yes
6299 else
6300   MINIX=
6301 fi
6302
6303
6304   if test "$MINIX" = yes; then
6305
6306 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6307
6308
6309 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6310
6311
6312 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6313
6314
6315 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6316
6317   fi
6318
6319
6320   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6321 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6322 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6323   printf %s "(cached) " >&6
6324 else
6325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6326 /* end confdefs.h.  */
6327
6328 #         define __EXTENSIONS__ 1
6329           $ac_includes_default
6330 int
6331 main ()
6332 {
6333
6334   ;
6335   return 0;
6336 }
6337 _ACEOF
6338 if ac_fn_c_try_compile "$LINENO"; then :
6339   ac_cv_safe_to_define___extensions__=yes
6340 else
6341   ac_cv_safe_to_define___extensions__=no
6342 fi
6343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6344 fi
6345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6346 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6347   test $ac_cv_safe_to_define___extensions__ = yes &&
6348     printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6349
6350   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6351
6352   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6353
6354   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6355
6356   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6357
6358   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6359
6360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6361 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6362 if ${ac_cv_should_define__xopen_source+:} false; then :
6363   printf %s "(cached) " >&6
6364 else
6365   ac_cv_should_define__xopen_source=no
6366      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h.  */
6368
6369           #include <wchar.h>
6370           mbstate_t x;
6371 int
6372 main ()
6373 {
6374
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 if ac_fn_c_try_compile "$LINENO"; then :
6380
6381 else
6382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383 /* end confdefs.h.  */
6384
6385              #define _XOPEN_SOURCE 500
6386              #include <wchar.h>
6387              mbstate_t x;
6388 int
6389 main ()
6390 {
6391
6392   ;
6393   return 0;
6394 }
6395 _ACEOF
6396 if ac_fn_c_try_compile "$LINENO"; then :
6397   ac_cv_should_define__xopen_source=yes
6398 fi
6399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6400 fi
6401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6402 fi
6403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6404 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6405   test $ac_cv_should_define__xopen_source = yes &&
6406     printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6407
6408
6409
6410
6411
6412
6413
6414
6415 # Make sure we can run config.sub.
6416 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6417   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6418
6419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6420 printf %s "checking build system type... " >&6; }
6421 if ${ac_cv_build+:} false; then :
6422   printf %s "(cached) " >&6
6423 else
6424   ac_build_alias=$build_alias
6425 test "x$ac_build_alias" = x &&
6426   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6427 test "x$ac_build_alias" = x &&
6428   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6429 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6430   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6431
6432 fi
6433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6434 printf "%s\n" "$ac_cv_build" >&6; }
6435 case $ac_cv_build in
6436 *-*-*) ;;
6437 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6438 esac
6439 build=$ac_cv_build
6440 ac_save_IFS=$IFS; IFS='-'
6441 set x $ac_cv_build
6442 shift
6443 build_cpu=$1
6444 build_vendor=$2
6445 shift; shift
6446 # Remember, the first character of IFS is used to create $*,
6447 # except with old shells:
6448 build_os=$*
6449 IFS=$ac_save_IFS
6450 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6451
6452
6453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6454 printf %s "checking host system type... " >&6; }
6455 if ${ac_cv_host+:} false; then :
6456   printf %s "(cached) " >&6
6457 else
6458   if test "x$host_alias" = x; then
6459   ac_cv_host=$ac_cv_build
6460 else
6461   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6462     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6463 fi
6464
6465 fi
6466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6467 printf "%s\n" "$ac_cv_host" >&6; }
6468 case $ac_cv_host in
6469 *-*-*) ;;
6470 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6471 esac
6472 host=$ac_cv_host
6473 ac_save_IFS=$IFS; IFS='-'
6474 set x $ac_cv_host
6475 shift
6476 host_cpu=$1
6477 host_vendor=$2
6478 shift; shift
6479 # Remember, the first character of IFS is used to create $*,
6480 # except with old shells:
6481 host_os=$*
6482 IFS=$ac_save_IFS
6483 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6484
6485
6486
6487
6488
6489   # IEEE behaviour is the default on all CPUs except Alpha and SH
6490   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6491   # and the GCC 4.1.2 manual).
6492   case "$host_cpu" in
6493     alpha*)
6494       # On Alpha systems, a compiler option provides the behaviour.
6495       # See the ieee(3) manual page, also available at
6496       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6497       if test -n "$GCC"; then
6498         # GCC has the option -mieee.
6499         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6500         CPPFLAGS="$CPPFLAGS -mieee"
6501       else
6502         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6503         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6504         CPPFLAGS="$CPPFLAGS -ieee"
6505       fi
6506       ;;
6507     sh*)
6508       if test -n "$GCC"; then
6509         # GCC has the option -mieee.
6510         CPPFLAGS="$CPPFLAGS -mieee"
6511       fi
6512       ;;
6513   esac
6514
6515 # Check whether --enable-largefile was given.
6516 if test "${enable_largefile+set}" = set; then :
6517   enableval=$enable_largefile;
6518 fi
6519
6520 if test "$enable_largefile" != no; then
6521
6522   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6523 printf %s "checking for special C compiler options needed for large files... " >&6; }
6524 if ${ac_cv_sys_largefile_CC+:} false; then :
6525   printf %s "(cached) " >&6
6526 else
6527   ac_cv_sys_largefile_CC=no
6528      if test "$GCC" != yes; then
6529        ac_save_CC=$CC
6530        while :; do
6531          # IRIX 6.2 and later do not support large files by default,
6532          # so use the C compiler's -n32 option if that helps.
6533          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h.  */
6535 #include <sys/types.h>
6536  /* Check that off_t can represent 2**63 - 1 correctly.
6537     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6538     since some C++ compilers masquerading as C compilers
6539     incorrectly reject 9223372036854775807.  */
6540 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6541   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6542                        && LARGE_OFF_T % 2147483647 == 1)
6543                       ? 1 : -1];
6544 int
6545 main ()
6546 {
6547
6548   ;
6549   return 0;
6550 }
6551 _ACEOF
6552          if ac_fn_c_try_compile "$LINENO"; then :
6553   break
6554 fi
6555 rm -f core conftest.err conftest.$ac_objext
6556          CC="$CC -n32"
6557          if ac_fn_c_try_compile "$LINENO"; then :
6558   ac_cv_sys_largefile_CC=' -n32'; break
6559 fi
6560 rm -f core conftest.err conftest.$ac_objext
6561          break
6562        done
6563        CC=$ac_save_CC
6564        rm -f conftest.$ac_ext
6565     fi
6566 fi
6567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6568 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
6569   if test "$ac_cv_sys_largefile_CC" != no; then
6570     CC=$CC$ac_cv_sys_largefile_CC
6571   fi
6572
6573   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6574 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6575 if ${ac_cv_sys_file_offset_bits+:} false; then :
6576   printf %s "(cached) " >&6
6577 else
6578   while :; do
6579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580 /* end confdefs.h.  */
6581 #include <sys/types.h>
6582  /* Check that off_t can represent 2**63 - 1 correctly.
6583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6584     since some C++ compilers masquerading as C compilers
6585     incorrectly reject 9223372036854775807.  */
6586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6588                        && LARGE_OFF_T % 2147483647 == 1)
6589                       ? 1 : -1];
6590 int
6591 main ()
6592 {
6593
6594   ;
6595   return 0;
6596 }
6597 _ACEOF
6598 if ac_fn_c_try_compile "$LINENO"; then :
6599   ac_cv_sys_file_offset_bits=no; break
6600 fi
6601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6603 /* end confdefs.h.  */
6604 #define _FILE_OFFSET_BITS 64
6605 #include <sys/types.h>
6606  /* Check that off_t can represent 2**63 - 1 correctly.
6607     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6608     since some C++ compilers masquerading as C compilers
6609     incorrectly reject 9223372036854775807.  */
6610 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6611   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6612                        && LARGE_OFF_T % 2147483647 == 1)
6613                       ? 1 : -1];
6614 int
6615 main ()
6616 {
6617
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 if ac_fn_c_try_compile "$LINENO"; then :
6623   ac_cv_sys_file_offset_bits=64; break
6624 fi
6625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6626   ac_cv_sys_file_offset_bits=unknown
6627   break
6628 done
6629 fi
6630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6631 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
6632 case $ac_cv_sys_file_offset_bits in #(
6633   no | unknown) ;;
6634   *)
6635 cat >>confdefs.h <<_ACEOF
6636 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6637 _ACEOF
6638 ;;
6639 esac
6640 rm -rf conftest*
6641   if test $ac_cv_sys_file_offset_bits = unknown; then
6642     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6643 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
6644 if ${ac_cv_sys_large_files+:} false; then :
6645   printf %s "(cached) " >&6
6646 else
6647   while :; do
6648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6649 /* end confdefs.h.  */
6650 #include <sys/types.h>
6651  /* Check that off_t can represent 2**63 - 1 correctly.
6652     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6653     since some C++ compilers masquerading as C compilers
6654     incorrectly reject 9223372036854775807.  */
6655 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6656   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6657                        && LARGE_OFF_T % 2147483647 == 1)
6658                       ? 1 : -1];
6659 int
6660 main ()
6661 {
6662
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 if ac_fn_c_try_compile "$LINENO"; then :
6668   ac_cv_sys_large_files=no; break
6669 fi
6670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6672 /* end confdefs.h.  */
6673 #define _LARGE_FILES 1
6674 #include <sys/types.h>
6675  /* Check that off_t can represent 2**63 - 1 correctly.
6676     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6677     since some C++ compilers masquerading as C compilers
6678     incorrectly reject 9223372036854775807.  */
6679 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6680   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6681                        && LARGE_OFF_T % 2147483647 == 1)
6682                       ? 1 : -1];
6683 int
6684 main ()
6685 {
6686
6687   ;
6688   return 0;
6689 }
6690 _ACEOF
6691 if ac_fn_c_try_compile "$LINENO"; then :
6692   ac_cv_sys_large_files=1; break
6693 fi
6694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6695   ac_cv_sys_large_files=unknown
6696   break
6697 done
6698 fi
6699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6700 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
6701 case $ac_cv_sys_large_files in #(
6702   no | unknown) ;;
6703   *)
6704 cat >>confdefs.h <<_ACEOF
6705 #define _LARGE_FILES $ac_cv_sys_large_files
6706 _ACEOF
6707 ;;
6708 esac
6709 rm -rf conftest*
6710   fi
6711
6712
6713 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6714
6715 fi
6716
6717
6718
6719
6720
6721   # Code from module alloca:
6722   # Code from module alloca-opt:
6723   # Code from module alloca-opt-tests:
6724   # Code from module allocator:
6725   # Code from module announce-gen:
6726   # Code from module areadlink:
6727   # Code from module areadlink-tests:
6728   # Code from module argmatch:
6729   # Code from module argmatch-tests:
6730   # Code from module binary-io:
6731   # Code from module binary-io-tests:
6732   # Code from module bitrotate:
6733   # Code from module bitrotate-tests:
6734   # Code from module btowc:
6735   # Code from module btowc-tests:
6736   # Code from module c-ctype:
6737   # Code from module c-ctype-tests:
6738   # Code from module c-stack:
6739   # Code from module c-stack-tests:
6740   # Code from module c-strcase:
6741   # Code from module c-strcase-tests:
6742   # Code from module c-strcaseeq:
6743   # Code from module careadlinkat:
6744   # Code from module clock-time:
6745   # Code from module close:
6746   # Code from module close-tests:
6747   # Code from module config-h:
6748   # Code from module configmake:
6749   # Code from module diffseq:
6750   # Code from module dirname:
6751   # Code from module dirname-lgpl:
6752   # Code from module dirname-tests:
6753   # Code from module do-release-commit-and-tag:
6754   # Code from module dosname:
6755   # Code from module double-slash-root:
6756   # Code from module dup2:
6757   # Code from module dup2-tests:
6758   # Code from module environ:
6759   # Code from module environ-tests:
6760   # Code from module errno:
6761   # Code from module errno-tests:
6762   # Code from module error:
6763   # Code from module exclude:
6764   # Code from module exclude-tests:
6765   # Code from module exitfail:
6766   # Code from module extensions:
6767
6768   # Code from module extern-inline:
6769   # Code from module fcntl:
6770   # Code from module fcntl-h:
6771   # Code from module fcntl-h-tests:
6772   # Code from module fcntl-tests:
6773   # Code from module fd-hook:
6774   # Code from module fdl:
6775   # Code from module fdopen:
6776   # Code from module fdopen-tests:
6777   # Code from module fgetc-tests:
6778   # Code from module file-type:
6779   # Code from module filenamecat:
6780   # Code from module filenamecat-lgpl:
6781   # Code from module filenamecat-tests:
6782   # Code from module float:
6783   # Code from module float-tests:
6784   # Code from module fnmatch:
6785   # Code from module fnmatch-gnu:
6786   # Code from module fnmatch-tests:
6787   # Code from module fpieee:
6788
6789   # Code from module fpucw:
6790   # Code from module fputc-tests:
6791   # Code from module fread-tests:
6792   # Code from module freopen:
6793   # Code from module freopen-safer:
6794   # Code from module freopen-safer-tests:
6795   # Code from module freopen-tests:
6796   # Code from module fstat:
6797   # Code from module fstat-tests:
6798   # Code from module fwrite-tests:
6799   # Code from module gendocs:
6800   # Code from module getcwd-lgpl:
6801   # Code from module getcwd-lgpl-tests:
6802   # Code from module getdtablesize:
6803   # Code from module getdtablesize-tests:
6804   # Code from module getopt:
6805   # Code from module getopt-gnu:
6806   # Code from module getopt-posix:
6807   # Code from module getopt-posix-tests:
6808   # Code from module getpagesize:
6809   # Code from module gettext-h:
6810   # Code from module gettime:
6811   # Code from module gettimeofday:
6812   # Code from module gettimeofday-tests:
6813   # Code from module git-version-gen:
6814   # Code from module gitlog-to-changelog:
6815   # Code from module gnu-make:
6816   # Code from module gnu-web-doc-update:
6817   # Code from module gnumakefile:
6818   # Code from module gnupload:
6819   # Code from module gperf:
6820   # Code from module hard-locale:
6821   # Code from module hash:
6822   # Code from module hash-pjw:
6823   # Code from module hash-tests:
6824   # Code from module havelib:
6825   # Code from module iconv:
6826   # Code from module iconv-h:
6827   # Code from module iconv-h-tests:
6828   # Code from module iconv-tests:
6829   # Code from module iconv_open:
6830   # Code from module ignore-value:
6831   # Code from module ignore-value-tests:
6832   # Code from module include_next:
6833   # Code from module inline:
6834   # Code from module intprops:
6835   # Code from module intprops-tests:
6836   # Code from module inttostr:
6837   # Code from module inttostr-tests:
6838   # Code from module inttypes:
6839   # Code from module inttypes-incomplete:
6840   # Code from module inttypes-tests:
6841   # Code from module iswblank:
6842   # Code from module iswblank-tests:
6843   # Code from module langinfo:
6844   # Code from module langinfo-tests:
6845   # Code from module largefile:
6846
6847   # Code from module libsigsegv:
6848   # Code from module localcharset:
6849   # Code from module locale:
6850   # Code from module locale-tests:
6851   # Code from module localeconv:
6852   # Code from module localeconv-tests:
6853   # Code from module lstat:
6854   # Code from module lstat-tests:
6855   # Code from module maintainer-makefile:
6856   # Code from module malloc-gnu:
6857   # Code from module malloc-gnu-tests:
6858   # Code from module malloc-posix:
6859   # Code from module malloca:
6860   # Code from module malloca-tests:
6861   # Code from module manywarnings:
6862   # Code from module mbchar:
6863   # Code from module mbiter:
6864   # Code from module mbrtowc:
6865   # Code from module mbrtowc-tests:
6866   # Code from module mbscasecmp:
6867   # Code from module mbscasecmp-tests:
6868   # Code from module mbsinit:
6869   # Code from module mbsinit-tests:
6870   # Code from module mbslen:
6871   # Code from module mbsrtowcs:
6872   # Code from module mbsrtowcs-tests:
6873   # Code from module mbsstr:
6874   # Code from module mbsstr-tests:
6875   # Code from module mbtowc:
6876   # Code from module mbuiter:
6877   # Code from module memchr:
6878   # Code from module memchr-tests:
6879   # Code from module mkstemp:
6880   # Code from module mktime:
6881   # Code from module msvc-inval:
6882   # Code from module msvc-nothrow:
6883   # Code from module multiarch:
6884   # Code from module nl_langinfo:
6885   # Code from module nl_langinfo-tests:
6886   # Code from module nocrash:
6887   # Code from module open:
6888   # Code from module open-tests:
6889   # Code from module pathmax:
6890   # Code from module pathmax-tests:
6891   # Code from module progname:
6892   # Code from module propername:
6893   # Code from module putenv:
6894   # Code from module quote:
6895   # Code from module quotearg:
6896   # Code from module quotearg-simple:
6897   # Code from module quotearg-simple-tests:
6898   # Code from module raise:
6899   # Code from module raise-tests:
6900   # Code from module readlink:
6901   # Code from module readlink-tests:
6902   # Code from module readme-release:
6903   # Code from module regex:
6904   # Code from module regex-tests:
6905   # Code from module same-inode:
6906   # Code from module secure_getenv:
6907   # Code from module setenv:
6908   # Code from module setenv-tests:
6909   # Code from module setlocale:
6910   # Code from module setlocale-tests:
6911   # Code from module sh-quote:
6912   # Code from module sh-quote-tests:
6913   # Code from module sigaction:
6914   # Code from module sigaction-tests:
6915   # Code from module signal:
6916   # Code from module signal-h:
6917   # Code from module signal-h-tests:
6918   # Code from module sigprocmask:
6919   # Code from module sigprocmask-tests:
6920   # Code from module size_max:
6921   # Code from module sleep:
6922   # Code from module sleep-tests:
6923   # Code from module snippet/_Noreturn:
6924   # Code from module snippet/arg-nonnull:
6925   # Code from module snippet/c++defs:
6926   # Code from module snippet/unused-parameter:
6927   # Code from module snippet/warn-on-use:
6928   # Code from module snprintf:
6929   # Code from module snprintf-tests:
6930   # Code from module ssize_t:
6931   # Code from module stat:
6932   # Code from module stat-macros:
6933   # Code from module stat-tests:
6934   # Code from module stat-time:
6935   # Code from module stat-time-tests:
6936   # Code from module stdarg:
6937
6938
6939
6940   # Code from module stdbool:
6941   # Code from module stdbool-tests:
6942   # Code from module stddef:
6943   # Code from module stddef-tests:
6944   # Code from module stdint:
6945   # Code from module stdint-tests:
6946   # Code from module stdio:
6947   # Code from module stdio-tests:
6948   # Code from module stdlib:
6949   # Code from module stdlib-tests:
6950   # Code from module strcase:
6951   # Code from module streq:
6952   # Code from module strerror:
6953   # Code from module strerror-override:
6954   # Code from module strerror-tests:
6955   # Code from module strftime:
6956   # Code from module strftime-tests:
6957   # Code from module striconv:
6958   # Code from module striconv-tests:
6959   # Code from module string:
6960   # Code from module string-tests:
6961   # Code from module strings:
6962   # Code from module strings-tests:
6963   # Code from module strndup:
6964   # Code from module strnlen:
6965   # Code from module strnlen-tests:
6966   # Code from module strnlen1:
6967   # Code from module strptime:
6968   # Code from module strtoull:
6969   # Code from module strtoull-tests:
6970   # Code from module strtoumax:
6971   # Code from module strtoumax-tests:
6972   # Code from module symlink:
6973   # Code from module symlink-tests:
6974   # Code from module sys_stat:
6975   # Code from module sys_stat-tests:
6976   # Code from module sys_time:
6977   # Code from module sys_time-tests:
6978   # Code from module sys_types:
6979   # Code from module sys_types-tests:
6980   # Code from module sys_wait:
6981   # Code from module sys_wait-tests:
6982   # Code from module system-quote:
6983   # Code from module tempname:
6984   # Code from module test-framework-sh:
6985   # Code from module test-framework-sh-tests:
6986   # Code from module time:
6987   # Code from module time-tests:
6988   # Code from module time_r:
6989   # Code from module timespec:
6990   # Code from module trim:
6991   # Code from module unistd:
6992   # Code from module unistd-tests:
6993   # Code from module unistr/base:
6994   # Code from module unistr/u8-mbtoucr:
6995   # Code from module unistr/u8-mbtoucr-tests:
6996   # Code from module unistr/u8-uctomb:
6997   # Code from module unistr/u8-uctomb-tests:
6998   # Code from module unitypes:
6999   # Code from module uniwidth/base:
7000   # Code from module uniwidth/width:
7001   # Code from module uniwidth/width-tests:
7002   # Code from module unlocked-io:
7003   # Code from module unsetenv:
7004   # Code from module unsetenv-tests:
7005   # Code from module update-copyright:
7006   # Code from module update-copyright-tests:
7007   # Code from module useless-if-before-free:
7008   # Code from module usleep:
7009   # Code from module usleep-tests:
7010   # Code from module vararrays:
7011   # Code from module vasnprintf:
7012   # Code from module vasnprintf-tests:
7013   # Code from module vasprintf:
7014   # Code from module vasprintf-tests:
7015   # Code from module vc-list-files:
7016   # Code from module vc-list-files-tests:
7017   # Code from module verify:
7018   # Code from module verify-tests:
7019   # Code from module version-etc:
7020   # Code from module version-etc-fsf:
7021   # Code from module version-etc-tests:
7022   # Code from module warnings:
7023   # Code from module wchar:
7024   # Code from module wchar-tests:
7025   # Code from module wcrtomb:
7026   # Code from module wcrtomb-tests:
7027   # Code from module wctob:
7028   # Code from module wctomb:
7029   # Code from module wctype-h:
7030   # Code from module wctype-h-tests:
7031   # Code from module wcwidth:
7032   # Code from module wcwidth-tests:
7033   # Code from module xalloc:
7034   # Code from module xalloc-die:
7035   # Code from module xalloc-die-tests:
7036   # Code from module xalloc-oversized:
7037   # Code from module xfreopen:
7038   # Code from module xreadlink:
7039   # Code from module xsize:
7040   # Code from module xstriconv:
7041   # Code from module xstrndup:
7042   # Code from module xstrtol:
7043   # Code from module xstrtol-tests:
7044   # Code from module xstrtoumax:
7045   # Code from module xstrtoumax-tests:
7046   # Code from module xvasprintf:
7047   # Code from module xvasprintf-tests:
7048
7049
7050
7051
7052
7053
7054
7055           LIBC_FATAL_STDERR_=1
7056   export LIBC_FATAL_STDERR_
7057
7058 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7059 if test "x$ac_cv_type_size_t" = xyes; then :
7060
7061 else
7062
7063 cat >>confdefs.h <<_ACEOF
7064 #define size_t unsigned int
7065 _ACEOF
7066
7067 fi
7068
7069 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7070 # for constant arguments.  Useless!
7071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7072 printf %s "checking for working alloca.h... " >&6; }
7073 if ${ac_cv_working_alloca_h+:} false; then :
7074   printf %s "(cached) " >&6
7075 else
7076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h.  */
7078 #include <alloca.h>
7079 int
7080 main ()
7081 {
7082 char *p = (char *) alloca (2 * sizeof (int));
7083                           if (p) return 0;
7084   ;
7085   return 0;
7086 }
7087 _ACEOF
7088 if ac_fn_c_try_link "$LINENO"; then :
7089   ac_cv_working_alloca_h=yes
7090 else
7091   ac_cv_working_alloca_h=no
7092 fi
7093 rm -f core conftest.err conftest.$ac_objext \
7094     conftest$ac_exeext conftest.$ac_ext
7095 fi
7096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7097 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7098 if test $ac_cv_working_alloca_h = yes; then
7099
7100 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7101
7102 fi
7103
7104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7105 printf %s "checking for alloca... " >&6; }
7106 if ${ac_cv_func_alloca_works+:} false; then :
7107   printf %s "(cached) " >&6
7108 else
7109   if test $ac_cv_working_alloca_h = yes; then
7110   ac_cv_func_alloca_works=yes
7111 else
7112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113 /* end confdefs.h.  */
7114 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
7115 # include <stdlib.h>
7116 #endif
7117 #include <stddef.h>
7118 #ifndef alloca
7119 # ifdef __GNUC__
7120 #  define alloca __builtin_alloca
7121 # elif defined _MSC_VER
7122 #  include <malloc.h>
7123 #  define alloca _alloca
7124 # else
7125 #  ifdef  __cplusplus
7126 extern "C"
7127 #  endif
7128 void *alloca (size_t);
7129 # endif
7130 #endif
7131
7132 int
7133 main ()
7134 {
7135 char *p = (char *) alloca (1);
7136                                     if (p) return 0;
7137   ;
7138   return 0;
7139 }
7140 _ACEOF
7141 if ac_fn_c_try_link "$LINENO"; then :
7142   ac_cv_func_alloca_works=yes
7143 else
7144   ac_cv_func_alloca_works=no
7145 fi
7146 rm -f core conftest.err conftest.$ac_objext \
7147     conftest$ac_exeext conftest.$ac_ext
7148 fi
7149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7150 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7151 fi
7152
7153 if test $ac_cv_func_alloca_works = yes; then
7154
7155 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7156
7157 else
7158   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7159 # that cause trouble.  Some versions do not even contain alloca or
7160 # contain a buggy version.  If you still want to use their alloca,
7161 # use ar to extract alloca.o from them instead of compiling alloca.c.
7162
7163
7164
7165
7166
7167 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7168
7169 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7170
7171
7172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7173 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7174 if ${ac_cv_os_cray+:} false; then :
7175   printf %s "(cached) " >&6
7176 else
7177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7178 /* end confdefs.h.  */
7179 #if defined CRAY && ! defined CRAY2
7180 webecray
7181 #else
7182 wenotbecray
7183 #endif
7184
7185 _ACEOF
7186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7187   $EGREP "webecray" >/dev/null 2>&1; then :
7188   ac_cv_os_cray=yes
7189 else
7190   ac_cv_os_cray=no
7191 fi
7192 rm -rf conftest*
7193
7194 fi
7195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7196 printf "%s\n" "$ac_cv_os_cray" >&6; }
7197 if test $ac_cv_os_cray = yes; then
7198   for ac_func in _getb67 GETB67 getb67; do
7199     as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7200 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7201 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7202
7203 cat >>confdefs.h <<_ACEOF
7204 #define CRAY_STACKSEG_END $ac_func
7205 _ACEOF
7206
7207     break
7208 fi
7209
7210   done
7211 fi
7212
7213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7214 printf %s "checking stack direction for C alloca... " >&6; }
7215 if ${ac_cv_c_stack_direction+:} false; then :
7216   printf %s "(cached) " >&6
7217 else
7218   if test "$cross_compiling" = yes; then :
7219   ac_cv_c_stack_direction=0
7220 else
7221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7222 /* end confdefs.h.  */
7223 $ac_includes_default
7224 int
7225 find_stack_direction (int *addr, int depth)
7226 {
7227   int dir, dummy = 0;
7228   if (! addr)
7229     addr = &dummy;
7230   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7231   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7232   return dir + dummy;
7233 }
7234
7235 int
7236 main (int argc, char **argv)
7237 {
7238   return find_stack_direction (0, argc + !argv + 20) < 0;
7239 }
7240 _ACEOF
7241 if ac_fn_c_try_run "$LINENO"; then :
7242   ac_cv_c_stack_direction=1
7243 else
7244   ac_cv_c_stack_direction=-1
7245 fi
7246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7247   conftest.$ac_objext conftest.beam conftest.$ac_ext
7248 fi
7249
7250 fi
7251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7252 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7253 cat >>confdefs.h <<_ACEOF
7254 #define STACK_DIRECTION $ac_cv_c_stack_direction
7255 _ACEOF
7256
7257
7258 fi
7259
7260
7261   GNULIB_BTOWC=0;
7262   GNULIB_WCTOB=0;
7263   GNULIB_MBSINIT=0;
7264   GNULIB_MBRTOWC=0;
7265   GNULIB_MBRLEN=0;
7266   GNULIB_MBSRTOWCS=0;
7267   GNULIB_MBSNRTOWCS=0;
7268   GNULIB_WCRTOMB=0;
7269   GNULIB_WCSRTOMBS=0;
7270   GNULIB_WCSNRTOMBS=0;
7271   GNULIB_WCWIDTH=0;
7272   GNULIB_WMEMCHR=0;
7273   GNULIB_WMEMCMP=0;
7274   GNULIB_WMEMCPY=0;
7275   GNULIB_WMEMMOVE=0;
7276   GNULIB_WMEMSET=0;
7277   GNULIB_WCSLEN=0;
7278   GNULIB_WCSNLEN=0;
7279   GNULIB_WCSCPY=0;
7280   GNULIB_WCPCPY=0;
7281   GNULIB_WCSNCPY=0;
7282   GNULIB_WCPNCPY=0;
7283   GNULIB_WCSCAT=0;
7284   GNULIB_WCSNCAT=0;
7285   GNULIB_WCSCMP=0;
7286   GNULIB_WCSNCMP=0;
7287   GNULIB_WCSCASECMP=0;
7288   GNULIB_WCSNCASECMP=0;
7289   GNULIB_WCSCOLL=0;
7290   GNULIB_WCSXFRM=0;
7291   GNULIB_WCSDUP=0;
7292   GNULIB_WCSCHR=0;
7293   GNULIB_WCSRCHR=0;
7294   GNULIB_WCSCSPN=0;
7295   GNULIB_WCSSPN=0;
7296   GNULIB_WCSPBRK=0;
7297   GNULIB_WCSSTR=0;
7298   GNULIB_WCSTOK=0;
7299   GNULIB_WCSWIDTH=0;
7300     HAVE_BTOWC=1;
7301   HAVE_MBSINIT=1;
7302   HAVE_MBRTOWC=1;
7303   HAVE_MBRLEN=1;
7304   HAVE_MBSRTOWCS=1;
7305   HAVE_MBSNRTOWCS=1;
7306   HAVE_WCRTOMB=1;
7307   HAVE_WCSRTOMBS=1;
7308   HAVE_WCSNRTOMBS=1;
7309   HAVE_WMEMCHR=1;
7310   HAVE_WMEMCMP=1;
7311   HAVE_WMEMCPY=1;
7312   HAVE_WMEMMOVE=1;
7313   HAVE_WMEMSET=1;
7314   HAVE_WCSLEN=1;
7315   HAVE_WCSNLEN=1;
7316   HAVE_WCSCPY=1;
7317   HAVE_WCPCPY=1;
7318   HAVE_WCSNCPY=1;
7319   HAVE_WCPNCPY=1;
7320   HAVE_WCSCAT=1;
7321   HAVE_WCSNCAT=1;
7322   HAVE_WCSCMP=1;
7323   HAVE_WCSNCMP=1;
7324   HAVE_WCSCASECMP=1;
7325   HAVE_WCSNCASECMP=1;
7326   HAVE_WCSCOLL=1;
7327   HAVE_WCSXFRM=1;
7328   HAVE_WCSDUP=1;
7329   HAVE_WCSCHR=1;
7330   HAVE_WCSRCHR=1;
7331   HAVE_WCSCSPN=1;
7332   HAVE_WCSSPN=1;
7333   HAVE_WCSPBRK=1;
7334   HAVE_WCSSTR=1;
7335   HAVE_WCSTOK=1;
7336   HAVE_WCSWIDTH=1;
7337   HAVE_DECL_WCTOB=1;
7338   HAVE_DECL_WCWIDTH=1;
7339   REPLACE_MBSTATE_T=0;
7340   REPLACE_BTOWC=0;
7341   REPLACE_WCTOB=0;
7342   REPLACE_MBSINIT=0;
7343   REPLACE_MBRTOWC=0;
7344   REPLACE_MBRLEN=0;
7345   REPLACE_MBSRTOWCS=0;
7346   REPLACE_MBSNRTOWCS=0;
7347   REPLACE_WCRTOMB=0;
7348   REPLACE_WCSRTOMBS=0;
7349   REPLACE_WCSNRTOMBS=0;
7350   REPLACE_WCWIDTH=0;
7351   REPLACE_WCSWIDTH=0;
7352
7353
7354             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7355 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7356 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7357   printf %s "(cached) " >&6
7358 else
7359   gl_cv_header_wchar_h_correct_inline=yes
7360      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7361 /* end confdefs.h.  */
7362
7363        #define wcstod renamed_wcstod
7364 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7365    <wchar.h>.
7366    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7367    included before <wchar.h>.  */
7368 #include <stddef.h>
7369 #include <stdio.h>
7370 #include <time.h>
7371 #include <wchar.h>
7372 extern int zero (void);
7373 int main () { return zero(); }
7374
7375 _ACEOF
7376      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7377   (eval $ac_compile) 2>&5
7378   ac_status=$?
7379   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7380   test $ac_status = 0; }; then
7381        mv conftest.$ac_objext conftest1.$ac_objext
7382        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383 /* end confdefs.h.  */
7384
7385          #define wcstod renamed_wcstod
7386 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7387    <wchar.h>.
7388    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7389    included before <wchar.h>.  */
7390 #include <stddef.h>
7391 #include <stdio.h>
7392 #include <time.h>
7393 #include <wchar.h>
7394 int zero (void) { return 0; }
7395
7396 _ACEOF
7397        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7398   (eval $ac_compile) 2>&5
7399   ac_status=$?
7400   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7401   test $ac_status = 0; }; then
7402          mv conftest.$ac_objext conftest2.$ac_objext
7403          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7404            :
7405          else
7406            gl_cv_header_wchar_h_correct_inline=no
7407          fi
7408        fi
7409      fi
7410      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
7411
7412 fi
7413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7414 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
7415   if test $gl_cv_header_wchar_h_correct_inline = no; then
7416     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7417 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7418 C99 mode. You have four options:
7419   - Add the flag -fgnu89-inline to CC and reconfigure, or
7420   - Fix your include files, using parts of
7421     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7422   - Use a gcc version older than 4.3, or
7423   - Don't use the flags -std=c99 or -std=gnu99.
7424 Configuration aborted." "$LINENO" 5
7425   fi
7426
7427
7428
7429
7430   for ac_func in $ac_func_list
7431 do :
7432   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7433 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7434 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7435   cat >>confdefs.h <<_ACEOF
7436 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
7437 _ACEOF
7438
7439 fi
7440 done
7441
7442
7443
7444
7445   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7446 printf %s "checking for nl_langinfo and CODESET... " >&6; }
7447 if ${am_cv_langinfo_codeset+:} false; then :
7448   printf %s "(cached) " >&6
7449 else
7450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451 /* end confdefs.h.  */
7452 #include <langinfo.h>
7453 int
7454 main ()
7455 {
7456 char* cs = nl_langinfo(CODESET); return !cs;
7457   ;
7458   return 0;
7459 }
7460 _ACEOF
7461 if ac_fn_c_try_link "$LINENO"; then :
7462   am_cv_langinfo_codeset=yes
7463 else
7464   am_cv_langinfo_codeset=no
7465 fi
7466 rm -f core conftest.err conftest.$ac_objext \
7467     conftest$ac_exeext conftest.$ac_ext
7468
7469 fi
7470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7471 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
7472   if test $am_cv_langinfo_codeset = yes; then
7473
7474 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7475
7476   fi
7477
7478
7479
7480
7481   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7482 printf %s "checking for a traditional french locale... " >&6; }
7483 if ${gt_cv_locale_fr+:} false; then :
7484   printf %s "(cached) " >&6
7485 else
7486
7487     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h.  */
7489
7490 #include <locale.h>
7491 #include <time.h>
7492 #if HAVE_LANGINFO_CODESET
7493 # include <langinfo.h>
7494 #endif
7495 #include <stdlib.h>
7496 #include <string.h>
7497 struct tm t;
7498 char buf[16];
7499 int main () {
7500   /* Check whether the given locale name is recognized by the system.  */
7501 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
7502   /* On native Windows, setlocale(category, "") looks at the system settings,
7503      not at the environment variables.  Also, when an encoding suffix such
7504      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7505      category of the locale to "C".  */
7506   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7507       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7508     return 1;
7509 #else
7510   if (setlocale (LC_ALL, "") == NULL) return 1;
7511 #endif
7512   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7513      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7514      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7515      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7516      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7517      some unit tests fail.
7518      On MirBSD 10, when an unsupported locale is specified, setlocale()
7519      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
7520 #if HAVE_LANGINFO_CODESET
7521   {
7522     const char *cs = nl_langinfo (CODESET);
7523     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7524         || strcmp (cs, "UTF-8") == 0)
7525       return 1;
7526   }
7527 #endif
7528 #ifdef __CYGWIN__
7529   /* On Cygwin, avoid locale names without encoding suffix, because the
7530      locale_charset() function relies on the encoding suffix.  Note that
7531      LC_ALL is set on the command line.  */
7532   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7533 #endif
7534   /* Check whether in the abbreviation of the second month, the second
7535      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7536      one byte long. This excludes the UTF-8 encoding.  */
7537   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7538   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7539 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
7540   /* Check whether the decimal separator is a comma.
7541      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7542      are nl_langinfo(RADIXCHAR) are both ".".  */
7543   if (localeconv () ->decimal_point[0] != ',') return 1;
7544 #endif
7545   return 0;
7546 }
7547
7548 _ACEOF
7549     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7550   (eval $ac_link) 2>&5
7551   ac_status=$?
7552   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7553   test $ac_status = 0; } && test -s conftest$ac_exeext; then
7554       case "$host_os" in
7555         # Handle native Windows specially, because there setlocale() interprets
7556         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7557         # "fr" or "fra" as "French" or "French_France.1252",
7558         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7559         # "ja" as "Japanese" or "Japanese_Japan.932",
7560         # and similar.
7561         mingw*)
7562           # Test for the native Windows locale name.
7563           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7564             gt_cv_locale_fr=French_France.1252
7565           else
7566             # None found.
7567             gt_cv_locale_fr=none
7568           fi
7569           ;;
7570         *)
7571           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7572           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7573           # configure script would override the LC_ALL setting. Likewise for
7574           # LC_CTYPE, which is also set at the beginning of the configure script.
7575           # Test for the usual locale name.
7576           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7577             gt_cv_locale_fr=fr_FR
7578           else
7579             # Test for the locale name with explicit encoding suffix.
7580             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7581               gt_cv_locale_fr=fr_FR.ISO-8859-1
7582             else
7583               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7584               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7585                 gt_cv_locale_fr=fr_FR.ISO8859-1
7586               else
7587                 # Test for the HP-UX locale name.
7588                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7589                   gt_cv_locale_fr=fr_FR.iso88591
7590                 else
7591                   # Test for the Solaris 7 locale name.
7592                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7593                     gt_cv_locale_fr=fr
7594                   else
7595                     # None found.
7596                     gt_cv_locale_fr=none
7597                   fi
7598                 fi
7599               fi
7600             fi
7601           fi
7602           ;;
7603       esac
7604     fi
7605     rm -fr conftest*
7606
7607 fi
7608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7609 printf "%s\n" "$gt_cv_locale_fr" >&6; }
7610   LOCALE_FR=$gt_cv_locale_fr
7611
7612
7613
7614
7615
7616
7617
7618   for ac_header in $ac_header_list
7619 do :
7620   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
7621 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7622 "
7623 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7624   cat >>confdefs.h <<_ACEOF
7625 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
7626 _ACEOF
7627
7628 fi
7629
7630 done
7631
7632
7633
7634
7635
7636
7637
7638
7639             case "$host_os" in
7640      sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
7641        FAULT_YIELDS_SIGBUS=1 ;;
7642      hpux*) # HP-UX
7643        FAULT_YIELDS_SIGBUS=1 ;;
7644      macos* | darwin*) # Mac OS X
7645        FAULT_YIELDS_SIGBUS=1 ;;
7646      gnu*) # Hurd
7647        FAULT_YIELDS_SIGBUS=1 ;;
7648      *)
7649        FAULT_YIELDS_SIGBUS=0 ;;
7650    esac
7651
7652 cat >>confdefs.h <<_ACEOF
7653 #define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS
7654 _ACEOF
7655
7656
7657    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
7658 printf %s "checking for working C stack overflow detection... " >&6; }
7659 if ${ac_cv_sys_stack_overflow_works+:} false; then :
7660   printf %s "(cached) " >&6
7661 else
7662   if test "$cross_compiling" = yes; then :
7663   ac_cv_sys_stack_overflow_works=cross-compiling
7664 else
7665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7666 /* end confdefs.h.  */
7667
7668             #include <unistd.h>
7669             #include <signal.h>
7670             #if HAVE_SETRLIMIT
7671             # include <sys/types.h>
7672             # include <sys/time.h>
7673             # include <sys/resource.h>
7674             #endif
7675             #ifndef SIGSTKSZ
7676             # define SIGSTKSZ 16384
7677             #endif
7678
7679             static union
7680             {
7681               char buffer[2 * SIGSTKSZ];
7682               long double ld;
7683               long u;
7684               void *p;
7685             } alternate_signal_stack;
7686
7687             static void
7688             segv_handler (int signo)
7689             {
7690               _exit (0);
7691             }
7692
7693             static int
7694             c_stack_action ()
7695             {
7696               stack_t st;
7697               struct sigaction act;
7698               int r;
7699
7700               st.ss_flags = 0;
7701               /* Use the midpoint to avoid Irix sigaltstack bug.  */
7702               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7703               st.ss_size = SIGSTKSZ;
7704               r = sigaltstack (&st, 0);
7705               if (r != 0)
7706                 return 1;
7707
7708               sigemptyset (&act.sa_mask);
7709               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
7710               act.sa_handler = segv_handler;
7711               #if FAULT_YIELDS_SIGBUS
7712               if (sigaction (SIGBUS, &act, 0) < 0)
7713                 return 2;
7714               #endif
7715               if (sigaction (SIGSEGV, &act, 0) < 0)
7716                 return 3;
7717               return 0;
7718             }
7719             static volatile int *
7720             recurse_1 (volatile int n, volatile int *p)
7721             {
7722               if (n >= 0)
7723                 *recurse_1 (n + 1, p) += n;
7724               return p;
7725             }
7726             static int
7727             recurse (volatile int n)
7728             {
7729               int sum = 0;
7730               return *recurse_1 (n, &sum);
7731             }
7732             int
7733             main ()
7734             {
7735               int result;
7736               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7737               /* Before starting the endless recursion, try to be friendly
7738                  to the user's machine.  On some Linux 2.2.x systems, there
7739                  is no stack limit for user processes at all.  We don't want
7740                  to kill such systems.  */
7741               struct rlimit rl;
7742               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7743               setrlimit (RLIMIT_STACK, &rl);
7744               #endif
7745
7746               result = c_stack_action ();
7747               if (result != 0)
7748                 return result;
7749               return recurse (0);
7750             }
7751
7752 _ACEOF
7753 if ac_fn_c_try_run "$LINENO"; then :
7754   ac_cv_sys_stack_overflow_works=yes
7755 else
7756   ac_cv_sys_stack_overflow_works=no
7757 fi
7758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7759   conftest.$ac_objext conftest.beam conftest.$ac_ext
7760 fi
7761
7762 fi
7763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
7764 printf "%s\n" "$ac_cv_sys_stack_overflow_works" >&6; }
7765
7766   if test $ac_cv_sys_stack_overflow_works = yes; then
7767
7768 printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
7769
7770
7771                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
7772 printf %s "checking for correct stack_t interpretation... " >&6; }
7773 if ${gl_cv_sigaltstack_low_base+:} false; then :
7774   printf %s "(cached) " >&6
7775 else
7776
7777       if test "$cross_compiling" = yes; then :
7778   gl_cv_sigaltstack_low_base=cross-compiling
7779 else
7780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7781 /* end confdefs.h.  */
7782
7783
7784 #include <stdlib.h>
7785 #include <signal.h>
7786 #if HAVE_SYS_SIGNAL_H
7787 # include <sys/signal.h>
7788 #endif
7789 #ifndef SIGSTKSZ
7790 # define SIGSTKSZ 16384
7791 #endif
7792 volatile char *stack_lower_bound;
7793 volatile char *stack_upper_bound;
7794 static void check_stack_location (volatile char *addr)
7795 {
7796   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
7797     exit (0);
7798   else
7799     exit (1);
7800 }
7801 static void stackoverflow_handler (int sig)
7802 {
7803   char dummy;
7804   check_stack_location (&dummy);
7805 }
7806 int main ()
7807 {
7808   char mystack[2 * SIGSTKSZ];
7809   stack_t altstack;
7810   struct sigaction action;
7811   /* Install the alternate stack.  */
7812   altstack.ss_sp = mystack + SIGSTKSZ;
7813   altstack.ss_size = SIGSTKSZ;
7814   stack_lower_bound = (char *) altstack.ss_sp;
7815   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
7816   altstack.ss_flags = 0; /* no SS_DISABLE */
7817   if (sigaltstack (&altstack, NULL) < 0)
7818     exit (2);
7819   /* Install the SIGSEGV handler.  */
7820   sigemptyset (&action.sa_mask);
7821   action.sa_handler = &stackoverflow_handler;
7822   action.sa_flags = SA_ONSTACK;
7823   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
7824     exit(3);
7825   /* Provoke a SIGSEGV.  */
7826   raise (SIGSEGV);
7827   exit (4);
7828 }
7829 _ACEOF
7830 if ac_fn_c_try_run "$LINENO"; then :
7831   gl_cv_sigaltstack_low_base=yes
7832 else
7833   gl_cv_sigaltstack_low_base=no
7834 fi
7835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7836   conftest.$ac_objext conftest.beam conftest.$ac_ext
7837 fi
7838
7839 fi
7840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
7841 printf "%s\n" "$gl_cv_sigaltstack_low_base" >&6; }
7842    if test "$gl_cv_sigaltstack_low_base" = no; then
7843
7844 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
7845
7846     fi
7847
7848    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
7849 printf %s "checking for precise C stack overflow detection... " >&6; }
7850 if ${ac_cv_sys_xsi_stack_overflow_heuristic+:} false; then :
7851   printf %s "(cached) " >&6
7852 else
7853   if test "$cross_compiling" = yes; then :
7854   ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
7855 else
7856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7857 /* end confdefs.h.  */
7858
7859             #include <unistd.h>
7860             #include <signal.h>
7861             #if HAVE_UCONTEXT_H
7862             # include <ucontext.h>
7863             #endif
7864             #if HAVE_SETRLIMIT
7865             # include <sys/types.h>
7866             # include <sys/time.h>
7867             # include <sys/resource.h>
7868             #endif
7869             #ifndef SIGSTKSZ
7870             # define SIGSTKSZ 16384
7871             #endif
7872
7873             static union
7874             {
7875               char buffer[2 * SIGSTKSZ];
7876               long double ld;
7877               long u;
7878               void *p;
7879             } alternate_signal_stack;
7880
7881             #if STACK_DIRECTION
7882             # define find_stack_direction(ptr) STACK_DIRECTION
7883             #else
7884             static int
7885             find_stack_direction (char const *addr)
7886             {
7887               char dummy;
7888               return (! addr ? find_stack_direction (&dummy)
7889                       : addr < &dummy ? 1 : -1);
7890             }
7891             #endif
7892
7893             static void
7894             segv_handler (int signo, siginfo_t *info, void *context)
7895             {
7896               if (0 < info->si_code)
7897                 {
7898                   /* For XSI heuristics to work, we need uc_stack to describe
7899                      the interrupted stack (as on Solaris), and not the
7900                      currently executing stack (as on Linux).  */
7901                   ucontext_t const *user_context = context;
7902                   char const *stack_min = user_context->uc_stack.ss_sp;
7903                   size_t stack_size = user_context->uc_stack.ss_size;
7904                   char const *faulting_address = info->si_addr;
7905                   size_t s = faulting_address - stack_min;
7906                   size_t page_size = sysconf (_SC_PAGESIZE);
7907                   if (find_stack_direction (0) < 0)
7908                     s += page_size;
7909                   if (s < stack_size + page_size)
7910                     _exit (0);
7911                   _exit (4);
7912                 }
7913               _exit (5);
7914             }
7915
7916             static int
7917             c_stack_action ()
7918             {
7919               stack_t st;
7920               struct sigaction act;
7921               int r;
7922
7923               st.ss_flags = 0;
7924               /* Use the midpoint to avoid Irix sigaltstack bug.  */
7925               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7926               st.ss_size = SIGSTKSZ;
7927               r = sigaltstack (&st, 0);
7928               if (r != 0)
7929                 return 1;
7930
7931               sigemptyset (&act.sa_mask);
7932               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
7933               act.sa_sigaction = segv_handler;
7934               #if FAULT_YIELDS_SIGBUS
7935               if (sigaction (SIGBUS, &act, 0) < 0)
7936                 return 2;
7937               #endif
7938               if (sigaction (SIGSEGV, &act, 0) < 0)
7939                 return 3;
7940               return 0;
7941             }
7942             static volatile int *
7943             recurse_1 (volatile int n, volatile int *p)
7944             {
7945               if (n >= 0)
7946                 *recurse_1 (n + 1, p) += n;
7947               return p;
7948             }
7949             static int
7950             recurse (volatile int n)
7951             {
7952               int sum = 0;
7953               return *recurse_1 (n, &sum);
7954             }
7955             int
7956             main ()
7957             {
7958               int result;
7959               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7960               /* Before starting the endless recursion, try to be friendly
7961                  to the user's machine.  On some Linux 2.2.x systems, there
7962                  is no stack limit for user processes at all.  We don't want
7963                  to kill such systems.  */
7964               struct rlimit rl;
7965               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7966               setrlimit (RLIMIT_STACK, &rl);
7967               #endif
7968
7969               result = c_stack_action ();
7970               if (result != 0)
7971                 return result;
7972               return recurse (0);
7973             }
7974
7975 _ACEOF
7976 if ac_fn_c_try_run "$LINENO"; then :
7977   ac_cv_sys_xsi_stack_overflow_heuristic=yes
7978 else
7979   ac_cv_sys_xsi_stack_overflow_heuristic=no
7980 fi
7981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7982   conftest.$ac_objext conftest.beam conftest.$ac_ext
7983 fi
7984
7985 fi
7986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
7987 printf "%s\n" "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
7988
7989    if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
7990
7991 printf "%s\n" "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
7992
7993    fi
7994   fi
7995
7996       if test "X$prefix" = "XNONE"; then
7997     acl_final_prefix="$ac_default_prefix"
7998   else
7999     acl_final_prefix="$prefix"
8000   fi
8001   if test "X$exec_prefix" = "XNONE"; then
8002     acl_final_exec_prefix='${prefix}'
8003   else
8004     acl_final_exec_prefix="$exec_prefix"
8005   fi
8006   acl_save_prefix="$prefix"
8007   prefix="$acl_final_prefix"
8008   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8009   prefix="$acl_save_prefix"
8010
8011
8012
8013 # Check whether --with-gnu-ld was given.
8014 if test "${with_gnu_ld+set}" = set; then :
8015   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8016 else
8017   with_gnu_ld=no
8018 fi
8019
8020 # Prepare PATH_SEPARATOR.
8021 # The user is always right.
8022 if test "${PATH_SEPARATOR+set}" != set; then
8023   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
8024   # contains only /bin. Note that ksh looks also at the FPATH variable,
8025   # so we have to set that as well for the test.
8026   PATH_SEPARATOR=:
8027   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8028     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8029            || PATH_SEPARATOR=';'
8030        }
8031 fi
8032
8033 ac_prog=ld
8034 if test "$GCC" = yes; then
8035   # Check if gcc -print-prog-name=ld gives a path.
8036   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8037 printf %s "checking for ld used by $CC... " >&6; }
8038   case $host in
8039   *-*-mingw*)
8040     # gcc leaves a trailing carriage return which upsets mingw
8041     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8042   *)
8043     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8044   esac
8045   case $ac_prog in
8046     # Accept absolute paths.
8047     [\\/]* | ?:[\\/]*)
8048       re_direlt='/[^/][^/]*/\.\./'
8049       # Canonicalize the pathname of ld
8050       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
8051       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
8052         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8053       done
8054       test -z "$LD" && LD="$ac_prog"
8055       ;;
8056   "")
8057     # If it fails, then pretend we aren't using GCC.
8058     ac_prog=ld
8059     ;;
8060   *)
8061     # If it is relative, then search for the first ld in PATH.
8062     with_gnu_ld=unknown
8063     ;;
8064   esac
8065 elif test "$with_gnu_ld" = yes; then
8066   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8067 printf %s "checking for GNU ld... " >&6; }
8068 else
8069   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8070 printf %s "checking for non-GNU ld... " >&6; }
8071 fi
8072 if ${acl_cv_path_LD+:} false; then :
8073   printf %s "(cached) " >&6
8074 else
8075   if test -z "$LD"; then
8076   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8077   for ac_dir in $PATH; do
8078     IFS="$acl_save_ifs"
8079     test -z "$ac_dir" && ac_dir=.
8080     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8081       acl_cv_path_LD="$ac_dir/$ac_prog"
8082       # Check to see if the program is GNU ld.  I'd rather use --version,
8083       # but apparently some variants of GNU ld only accept -v.
8084       # Break only if it was the GNU/non-GNU ld that we prefer.
8085       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
8086       *GNU* | *'with BFD'*)
8087         test "$with_gnu_ld" != no && break
8088         ;;
8089       *)
8090         test "$with_gnu_ld" != yes && break
8091         ;;
8092       esac
8093     fi
8094   done
8095   IFS="$acl_save_ifs"
8096 else
8097   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8098 fi
8099 fi
8100
8101 LD="$acl_cv_path_LD"
8102 if test -n "$LD"; then
8103   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8104 printf "%s\n" "$LD" >&6; }
8105 else
8106   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107 printf "%s\n" "no" >&6; }
8108 fi
8109 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8111 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8112 if ${acl_cv_prog_gnu_ld+:} false; then :
8113   printf %s "(cached) " >&6
8114 else
8115   # I'd rather use --version here, but apparently some GNU lds only accept -v.
8116 case `$LD -v 2>&1 </dev/null` in
8117 *GNU* | *'with BFD'*)
8118   acl_cv_prog_gnu_ld=yes
8119   ;;
8120 *)
8121   acl_cv_prog_gnu_ld=no
8122   ;;
8123 esac
8124 fi
8125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8126 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
8127 with_gnu_ld=$acl_cv_prog_gnu_ld
8128
8129
8130
8131
8132                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8133 printf %s "checking for shared library run path origin... " >&6; }
8134 if ${acl_cv_rpath+:} false; then :
8135   printf %s "(cached) " >&6
8136 else
8137
8138     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8139     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8140     . ./conftest.sh
8141     rm -f ./conftest.sh
8142     acl_cv_rpath=done
8143
8144 fi
8145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8146 printf "%s\n" "$acl_cv_rpath" >&6; }
8147   wl="$acl_cv_wl"
8148   acl_libext="$acl_cv_libext"
8149   acl_shlibext="$acl_cv_shlibext"
8150   acl_libname_spec="$acl_cv_libname_spec"
8151   acl_library_names_spec="$acl_cv_library_names_spec"
8152   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8153   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8154   acl_hardcode_direct="$acl_cv_hardcode_direct"
8155   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
8156     # Check whether --enable-rpath was given.
8157 if test "${enable_rpath+set}" = set; then :
8158   enableval=$enable_rpath; :
8159 else
8160   enable_rpath=yes
8161 fi
8162
8163
8164
8165
8166   acl_libdirstem=lib
8167   acl_libdirstem2=
8168   case "$host_os" in
8169     solaris*)
8170                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8171 printf %s "checking for 64-bit host... " >&6; }
8172 if ${gl_cv_solaris_64bit+:} false; then :
8173   printf %s "(cached) " >&6
8174 else
8175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8176 /* end confdefs.h.  */
8177
8178 #ifdef _LP64
8179 sixtyfour bits
8180 #endif
8181
8182 _ACEOF
8183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8184   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
8185   gl_cv_solaris_64bit=yes
8186 else
8187   gl_cv_solaris_64bit=no
8188 fi
8189 rm -rf conftest*
8190
8191
8192 fi
8193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8194 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
8195       if test $gl_cv_solaris_64bit = yes; then
8196         acl_libdirstem=lib/64
8197         case "$host_cpu" in
8198           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
8199           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8200         esac
8201       fi
8202       ;;
8203     *)
8204       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8205       if test -n "$searchpath"; then
8206         acl_save_IFS="${IFS=    }"; IFS=":"
8207         for searchdir in $searchpath; do
8208           if test -d "$searchdir"; then
8209             case "$searchdir" in
8210               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8211               */../ | */.. )
8212                 # Better ignore directories of this form. They are misleading.
8213                 ;;
8214               *) searchdir=`cd "$searchdir" && pwd`
8215                  case "$searchdir" in
8216                    */lib64 ) acl_libdirstem=lib64 ;;
8217                  esac ;;
8218             esac
8219           fi
8220         done
8221         IFS="$acl_save_IFS"
8222       fi
8223       ;;
8224   esac
8225   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241     use_additional=yes
8242
8243   acl_save_prefix="$prefix"
8244   prefix="$acl_final_prefix"
8245   acl_save_exec_prefix="$exec_prefix"
8246   exec_prefix="$acl_final_exec_prefix"
8247
8248     eval additional_includedir=\"$includedir\"
8249     eval additional_libdir=\"$libdir\"
8250
8251   exec_prefix="$acl_save_exec_prefix"
8252   prefix="$acl_save_prefix"
8253
8254
8255 # Check whether --with-libsigsegv-prefix was given.
8256 if test "${with_libsigsegv_prefix+set}" = set; then :
8257   withval=$with_libsigsegv_prefix;
8258     if test "X$withval" = "Xno"; then
8259       use_additional=no
8260     else
8261       if test "X$withval" = "X"; then
8262
8263   acl_save_prefix="$prefix"
8264   prefix="$acl_final_prefix"
8265   acl_save_exec_prefix="$exec_prefix"
8266   exec_prefix="$acl_final_exec_prefix"
8267
8268           eval additional_includedir=\"$includedir\"
8269           eval additional_libdir=\"$libdir\"
8270
8271   exec_prefix="$acl_save_exec_prefix"
8272   prefix="$acl_save_prefix"
8273
8274       else
8275         additional_includedir="$withval/include"
8276         additional_libdir="$withval/$acl_libdirstem"
8277         if test "$acl_libdirstem2" != "$acl_libdirstem" \
8278            && ! test -d "$withval/$acl_libdirstem"; then
8279           additional_libdir="$withval/$acl_libdirstem2"
8280         fi
8281       fi
8282     fi
8283
8284 fi
8285
8286       LIBSIGSEGV=
8287   LTLIBSIGSEGV=
8288   INCSIGSEGV=
8289   LIBSIGSEGV_PREFIX=
8290       HAVE_LIBSIGSEGV=
8291   rpathdirs=
8292   ltrpathdirs=
8293   names_already_handled=
8294   names_next_round='sigsegv '
8295   while test -n "$names_next_round"; do
8296     names_this_round="$names_next_round"
8297     names_next_round=
8298     for name in $names_this_round; do
8299       already_handled=
8300       for n in $names_already_handled; do
8301         if test "$n" = "$name"; then
8302           already_handled=yes
8303           break
8304         fi
8305       done
8306       if test -z "$already_handled"; then
8307         names_already_handled="$names_already_handled $name"
8308                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
8309         eval value=\"\$HAVE_LIB$uppername\"
8310         if test -n "$value"; then
8311           if test "$value" = yes; then
8312             eval value=\"\$LIB$uppername\"
8313             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
8314             eval value=\"\$LTLIB$uppername\"
8315             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
8316           else
8317                                     :
8318           fi
8319         else
8320                               found_dir=
8321           found_la=
8322           found_so=
8323           found_a=
8324           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
8325           if test -n "$acl_shlibext"; then
8326             shrext=".$acl_shlibext"             # typically: shrext=.so
8327           else
8328             shrext=
8329           fi
8330           if test $use_additional = yes; then
8331             dir="$additional_libdir"
8332                                     if test -n "$acl_shlibext"; then
8333               if test -f "$dir/$libname$shrext"; then
8334                 found_dir="$dir"
8335                 found_so="$dir/$libname$shrext"
8336               else
8337                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8338                   ver=`(cd "$dir" && \
8339                         for f in "$libname$shrext".*; do echo "$f"; done \
8340                         | sed -e "s,^$libname$shrext\\\\.,," \
8341                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8342                         | sed 1q ) 2>/dev/null`
8343                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8344                     found_dir="$dir"
8345                     found_so="$dir/$libname$shrext.$ver"
8346                   fi
8347                 else
8348                   eval library_names=\"$acl_library_names_spec\"
8349                   for f in $library_names; do
8350                     if test -f "$dir/$f"; then
8351                       found_dir="$dir"
8352                       found_so="$dir/$f"
8353                       break
8354                     fi
8355                   done
8356                 fi
8357               fi
8358             fi
8359                         if test "X$found_dir" = "X"; then
8360               if test -f "$dir/$libname.$acl_libext"; then
8361                 found_dir="$dir"
8362                 found_a="$dir/$libname.$acl_libext"
8363               fi
8364             fi
8365             if test "X$found_dir" != "X"; then
8366               if test -f "$dir/$libname.la"; then
8367                 found_la="$dir/$libname.la"
8368               fi
8369             fi
8370           fi
8371           if test "X$found_dir" = "X"; then
8372             for x in $LDFLAGS $LTLIBSIGSEGV; do
8373
8374   acl_save_prefix="$prefix"
8375   prefix="$acl_final_prefix"
8376   acl_save_exec_prefix="$exec_prefix"
8377   exec_prefix="$acl_final_exec_prefix"
8378   eval x=\"$x\"
8379   exec_prefix="$acl_save_exec_prefix"
8380   prefix="$acl_save_prefix"
8381
8382               case "$x" in
8383                 -L*)
8384                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8385                                     if test -n "$acl_shlibext"; then
8386                     if test -f "$dir/$libname$shrext"; then
8387                       found_dir="$dir"
8388                       found_so="$dir/$libname$shrext"
8389                     else
8390                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8391                         ver=`(cd "$dir" && \
8392                               for f in "$libname$shrext".*; do echo "$f"; done \
8393                               | sed -e "s,^$libname$shrext\\\\.,," \
8394                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8395                               | sed 1q ) 2>/dev/null`
8396                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8397                           found_dir="$dir"
8398                           found_so="$dir/$libname$shrext.$ver"
8399                         fi
8400                       else
8401                         eval library_names=\"$acl_library_names_spec\"
8402                         for f in $library_names; do
8403                           if test -f "$dir/$f"; then
8404                             found_dir="$dir"
8405                             found_so="$dir/$f"
8406                             break
8407                           fi
8408                         done
8409                       fi
8410                     fi
8411                   fi
8412                                     if test "X$found_dir" = "X"; then
8413                     if test -f "$dir/$libname.$acl_libext"; then
8414                       found_dir="$dir"
8415                       found_a="$dir/$libname.$acl_libext"
8416                     fi
8417                   fi
8418                   if test "X$found_dir" != "X"; then
8419                     if test -f "$dir/$libname.la"; then
8420                       found_la="$dir/$libname.la"
8421                     fi
8422                   fi
8423                   ;;
8424               esac
8425               if test "X$found_dir" != "X"; then
8426                 break
8427               fi
8428             done
8429           fi
8430           if test "X$found_dir" != "X"; then
8431                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
8432             if test "X$found_so" != "X"; then
8433                                                         if test "$enable_rpath" = no \
8434                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
8435                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
8436                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8437               else
8438                                                                                 haveit=
8439                 for x in $ltrpathdirs; do
8440                   if test "X$x" = "X$found_dir"; then
8441                     haveit=yes
8442                     break
8443                   fi
8444                 done
8445                 if test -z "$haveit"; then
8446                   ltrpathdirs="$ltrpathdirs $found_dir"
8447                 fi
8448                                 if test "$acl_hardcode_direct" = yes; then
8449                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8450                 else
8451                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
8452                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8453                                                             haveit=
8454                     for x in $rpathdirs; do
8455                       if test "X$x" = "X$found_dir"; then
8456                         haveit=yes
8457                         break
8458                       fi
8459                     done
8460                     if test -z "$haveit"; then
8461                       rpathdirs="$rpathdirs $found_dir"
8462                     fi
8463                   else
8464                                                                                 haveit=
8465                     for x in $LDFLAGS $LIBSIGSEGV; do
8466
8467   acl_save_prefix="$prefix"
8468   prefix="$acl_final_prefix"
8469   acl_save_exec_prefix="$exec_prefix"
8470   exec_prefix="$acl_final_exec_prefix"
8471   eval x=\"$x\"
8472   exec_prefix="$acl_save_exec_prefix"
8473   prefix="$acl_save_prefix"
8474
8475                       if test "X$x" = "X-L$found_dir"; then
8476                         haveit=yes
8477                         break
8478                       fi
8479                     done
8480                     if test -z "$haveit"; then
8481                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
8482                     fi
8483                     if test "$acl_hardcode_minus_L" != no; then
8484                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8485                     else
8486                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8487                     fi
8488                   fi
8489                 fi
8490               fi
8491             else
8492               if test "X$found_a" != "X"; then
8493                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
8494               else
8495                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
8496               fi
8497             fi
8498                         additional_includedir=
8499             case "$found_dir" in
8500               */$acl_libdirstem | */$acl_libdirstem/)
8501                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
8502                 if test "$name" = 'sigsegv'; then
8503                   LIBSIGSEGV_PREFIX="$basedir"
8504                 fi
8505                 additional_includedir="$basedir/include"
8506                 ;;
8507               */$acl_libdirstem2 | */$acl_libdirstem2/)
8508                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
8509                 if test "$name" = 'sigsegv'; then
8510                   LIBSIGSEGV_PREFIX="$basedir"
8511                 fi
8512                 additional_includedir="$basedir/include"
8513                 ;;
8514             esac
8515             if test "X$additional_includedir" != "X"; then
8516                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8517                 haveit=
8518                 if test "X$additional_includedir" = "X/usr/local/include"; then
8519                   if test -n "$GCC"; then
8520                     case $host_os in
8521                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8522                     esac
8523                   fi
8524                 fi
8525                 if test -z "$haveit"; then
8526                   for x in $CPPFLAGS $INCSIGSEGV; do
8527
8528   acl_save_prefix="$prefix"
8529   prefix="$acl_final_prefix"
8530   acl_save_exec_prefix="$exec_prefix"
8531   exec_prefix="$acl_final_exec_prefix"
8532   eval x=\"$x\"
8533   exec_prefix="$acl_save_exec_prefix"
8534   prefix="$acl_save_prefix"
8535
8536                     if test "X$x" = "X-I$additional_includedir"; then
8537                       haveit=yes
8538                       break
8539                     fi
8540                   done
8541                   if test -z "$haveit"; then
8542                     if test -d "$additional_includedir"; then
8543                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
8544                     fi
8545                   fi
8546                 fi
8547               fi
8548             fi
8549                         if test -n "$found_la"; then
8550                                                         save_libdir="$libdir"
8551               case "$found_la" in
8552                 */* | *\\*) . "$found_la" ;;
8553                 *) . "./$found_la" ;;
8554               esac
8555               libdir="$save_libdir"
8556                             for dep in $dependency_libs; do
8557                 case "$dep" in
8558                   -L*)
8559                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8560                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
8561                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
8562                       haveit=
8563                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
8564                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
8565                         if test -n "$GCC"; then
8566                           case $host_os in
8567                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8568                           esac
8569                         fi
8570                       fi
8571                       if test -z "$haveit"; then
8572                         haveit=
8573                         for x in $LDFLAGS $LIBSIGSEGV; do
8574
8575   acl_save_prefix="$prefix"
8576   prefix="$acl_final_prefix"
8577   acl_save_exec_prefix="$exec_prefix"
8578   exec_prefix="$acl_final_exec_prefix"
8579   eval x=\"$x\"
8580   exec_prefix="$acl_save_exec_prefix"
8581   prefix="$acl_save_prefix"
8582
8583                           if test "X$x" = "X-L$additional_libdir"; then
8584                             haveit=yes
8585                             break
8586                           fi
8587                         done
8588                         if test -z "$haveit"; then
8589                           if test -d "$additional_libdir"; then
8590                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
8591                           fi
8592                         fi
8593                         haveit=
8594                         for x in $LDFLAGS $LTLIBSIGSEGV; do
8595
8596   acl_save_prefix="$prefix"
8597   prefix="$acl_final_prefix"
8598   acl_save_exec_prefix="$exec_prefix"
8599   exec_prefix="$acl_final_exec_prefix"
8600   eval x=\"$x\"
8601   exec_prefix="$acl_save_exec_prefix"
8602   prefix="$acl_save_prefix"
8603
8604                           if test "X$x" = "X-L$additional_libdir"; then
8605                             haveit=yes
8606                             break
8607                           fi
8608                         done
8609                         if test -z "$haveit"; then
8610                           if test -d "$additional_libdir"; then
8611                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
8612                           fi
8613                         fi
8614                       fi
8615                     fi
8616                     ;;
8617                   -R*)
8618                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8619                     if test "$enable_rpath" != no; then
8620                                                                   haveit=
8621                       for x in $rpathdirs; do
8622                         if test "X$x" = "X$dir"; then
8623                           haveit=yes
8624                           break
8625                         fi
8626                       done
8627                       if test -z "$haveit"; then
8628                         rpathdirs="$rpathdirs $dir"
8629                       fi
8630                                                                   haveit=
8631                       for x in $ltrpathdirs; do
8632                         if test "X$x" = "X$dir"; then
8633                           haveit=yes
8634                           break
8635                         fi
8636                       done
8637                       if test -z "$haveit"; then
8638                         ltrpathdirs="$ltrpathdirs $dir"
8639                       fi
8640                     fi
8641                     ;;
8642                   -l*)
8643                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8644                     ;;
8645                   *.la)
8646                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8647                     ;;
8648                   *)
8649                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
8650                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
8651                     ;;
8652                 esac
8653               done
8654             fi
8655           else
8656                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8657             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
8658           fi
8659         fi
8660       fi
8661     done
8662   done
8663   if test "X$rpathdirs" != "X"; then
8664     if test -n "$acl_hardcode_libdir_separator"; then
8665                         alldirs=
8666       for found_dir in $rpathdirs; do
8667         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
8668       done
8669             acl_save_libdir="$libdir"
8670       libdir="$alldirs"
8671       eval flag=\"$acl_hardcode_libdir_flag_spec\"
8672       libdir="$acl_save_libdir"
8673       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8674     else
8675             for found_dir in $rpathdirs; do
8676         acl_save_libdir="$libdir"
8677         libdir="$found_dir"
8678         eval flag=\"$acl_hardcode_libdir_flag_spec\"
8679         libdir="$acl_save_libdir"
8680         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8681       done
8682     fi
8683   fi
8684   if test "X$ltrpathdirs" != "X"; then
8685             for found_dir in $ltrpathdirs; do
8686       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
8687     done
8688   fi
8689
8690
8691
8692
8693
8694
8695
8696         ac_save_CPPFLAGS="$CPPFLAGS"
8697
8698   for element in $INCSIGSEGV; do
8699     haveit=
8700     for x in $CPPFLAGS; do
8701
8702   acl_save_prefix="$prefix"
8703   prefix="$acl_final_prefix"
8704   acl_save_exec_prefix="$exec_prefix"
8705   exec_prefix="$acl_final_exec_prefix"
8706   eval x=\"$x\"
8707   exec_prefix="$acl_save_exec_prefix"
8708   prefix="$acl_save_prefix"
8709
8710       if test "X$x" = "X$element"; then
8711         haveit=yes
8712         break
8713       fi
8714     done
8715     if test -z "$haveit"; then
8716       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8717     fi
8718   done
8719
8720
8721   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
8722 printf %s "checking for libsigsegv... " >&6; }
8723 if ${ac_cv_libsigsegv+:} false; then :
8724   printf %s "(cached) " >&6
8725 else
8726
8727     ac_save_LIBS="$LIBS"
8728                                 case " $LIBSIGSEGV" in
8729       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
8730       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
8731     esac
8732     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8733 /* end confdefs.h.  */
8734 #include <sigsegv.h>
8735 int
8736 main ()
8737 {
8738 sigsegv_deinstall_handler();
8739   ;
8740   return 0;
8741 }
8742 _ACEOF
8743 if ac_fn_c_try_link "$LINENO"; then :
8744   ac_cv_libsigsegv=yes
8745 else
8746   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
8747 fi
8748 rm -f core conftest.err conftest.$ac_objext \
8749     conftest$ac_exeext conftest.$ac_ext
8750     LIBS="$ac_save_LIBS"
8751
8752 fi
8753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
8754 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
8755   if test "$ac_cv_libsigsegv" = yes; then
8756     HAVE_LIBSIGSEGV=yes
8757
8758 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
8759
8760     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
8761 printf %s "checking how to link with libsigsegv... " >&6; }
8762     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
8763 printf "%s\n" "$LIBSIGSEGV" >&6; }
8764   else
8765     HAVE_LIBSIGSEGV=no
8766             CPPFLAGS="$ac_save_CPPFLAGS"
8767     LIBSIGSEGV=
8768     LTLIBSIGSEGV=
8769     LIBSIGSEGV_PREFIX=
8770   fi
8771
8772
8773
8774
8775
8776
8777
8778     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
8779
8780
8781
8782
8783
8784
8785
8786
8787   GNULIB_CHDIR=0;
8788   GNULIB_CHOWN=0;
8789   GNULIB_CLOSE=0;
8790   GNULIB_DUP=0;
8791   GNULIB_DUP2=0;
8792   GNULIB_DUP3=0;
8793   GNULIB_ENVIRON=0;
8794   GNULIB_EUIDACCESS=0;
8795   GNULIB_FACCESSAT=0;
8796   GNULIB_FCHDIR=0;
8797   GNULIB_FCHOWNAT=0;
8798   GNULIB_FDATASYNC=0;
8799   GNULIB_FSYNC=0;
8800   GNULIB_FTRUNCATE=0;
8801   GNULIB_GETCWD=0;
8802   GNULIB_GETDOMAINNAME=0;
8803   GNULIB_GETDTABLESIZE=0;
8804   GNULIB_GETGROUPS=0;
8805   GNULIB_GETHOSTNAME=0;
8806   GNULIB_GETLOGIN=0;
8807   GNULIB_GETLOGIN_R=0;
8808   GNULIB_GETPAGESIZE=0;
8809   GNULIB_GETUSERSHELL=0;
8810   GNULIB_GROUP_MEMBER=0;
8811   GNULIB_ISATTY=0;
8812   GNULIB_LCHOWN=0;
8813   GNULIB_LINK=0;
8814   GNULIB_LINKAT=0;
8815   GNULIB_LSEEK=0;
8816   GNULIB_PIPE=0;
8817   GNULIB_PIPE2=0;
8818   GNULIB_PREAD=0;
8819   GNULIB_PWRITE=0;
8820   GNULIB_READ=0;
8821   GNULIB_READLINK=0;
8822   GNULIB_READLINKAT=0;
8823   GNULIB_RMDIR=0;
8824   GNULIB_SETHOSTNAME=0;
8825   GNULIB_SLEEP=0;
8826   GNULIB_SYMLINK=0;
8827   GNULIB_SYMLINKAT=0;
8828   GNULIB_TTYNAME_R=0;
8829   GNULIB_UNISTD_H_NONBLOCKING=0;
8830   GNULIB_UNISTD_H_SIGPIPE=0;
8831   GNULIB_UNLINK=0;
8832   GNULIB_UNLINKAT=0;
8833   GNULIB_USLEEP=0;
8834   GNULIB_WRITE=0;
8835     HAVE_CHOWN=1;
8836   HAVE_DUP2=1;
8837   HAVE_DUP3=1;
8838   HAVE_EUIDACCESS=1;
8839   HAVE_FACCESSAT=1;
8840   HAVE_FCHDIR=1;
8841   HAVE_FCHOWNAT=1;
8842   HAVE_FDATASYNC=1;
8843   HAVE_FSYNC=1;
8844   HAVE_FTRUNCATE=1;
8845   HAVE_GETDTABLESIZE=1;
8846   HAVE_GETGROUPS=1;
8847   HAVE_GETHOSTNAME=1;
8848   HAVE_GETLOGIN=1;
8849   HAVE_GETPAGESIZE=1;
8850   HAVE_GROUP_MEMBER=1;
8851   HAVE_LCHOWN=1;
8852   HAVE_LINK=1;
8853   HAVE_LINKAT=1;
8854   HAVE_PIPE=1;
8855   HAVE_PIPE2=1;
8856   HAVE_PREAD=1;
8857   HAVE_PWRITE=1;
8858   HAVE_READLINK=1;
8859   HAVE_READLINKAT=1;
8860   HAVE_SETHOSTNAME=1;
8861   HAVE_SLEEP=1;
8862   HAVE_SYMLINK=1;
8863   HAVE_SYMLINKAT=1;
8864   HAVE_UNLINKAT=1;
8865   HAVE_USLEEP=1;
8866   HAVE_DECL_ENVIRON=1;
8867   HAVE_DECL_FCHDIR=1;
8868   HAVE_DECL_FDATASYNC=1;
8869   HAVE_DECL_GETDOMAINNAME=1;
8870   HAVE_DECL_GETLOGIN_R=1;
8871   HAVE_DECL_GETPAGESIZE=1;
8872   HAVE_DECL_GETUSERSHELL=1;
8873   HAVE_DECL_SETHOSTNAME=1;
8874   HAVE_DECL_TTYNAME_R=1;
8875   HAVE_OS_H=0;
8876   HAVE_SYS_PARAM_H=0;
8877   REPLACE_CHOWN=0;
8878   REPLACE_CLOSE=0;
8879   REPLACE_DUP=0;
8880   REPLACE_DUP2=0;
8881   REPLACE_FCHOWNAT=0;
8882   REPLACE_FTRUNCATE=0;
8883   REPLACE_GETCWD=0;
8884   REPLACE_GETDOMAINNAME=0;
8885   REPLACE_GETLOGIN_R=0;
8886   REPLACE_GETGROUPS=0;
8887   REPLACE_GETPAGESIZE=0;
8888   REPLACE_ISATTY=0;
8889   REPLACE_LCHOWN=0;
8890   REPLACE_LINK=0;
8891   REPLACE_LINKAT=0;
8892   REPLACE_LSEEK=0;
8893   REPLACE_PREAD=0;
8894   REPLACE_PWRITE=0;
8895   REPLACE_READ=0;
8896   REPLACE_READLINK=0;
8897   REPLACE_RMDIR=0;
8898   REPLACE_SLEEP=0;
8899   REPLACE_SYMLINK=0;
8900   REPLACE_TTYNAME_R=0;
8901   REPLACE_UNLINK=0;
8902   REPLACE_UNLINKAT=0;
8903   REPLACE_USLEEP=0;
8904   REPLACE_WRITE=0;
8905   UNISTD_H_HAVE_WINSOCK2_H=0;
8906   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8907
8908
8909
8910
8911
8912
8913   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8914     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8915
8916 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8917
8918   else
8919     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8920   fi
8921
8922
8923
8924
8925
8926
8927   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8928 printf %s "checking whether // is distinct from /... " >&6; }
8929 if ${gl_cv_double_slash_root+:} false; then :
8930   printf %s "(cached) " >&6
8931 else
8932    if test x"$cross_compiling" = xyes ; then
8933         # When cross-compiling, there is no way to tell whether // is special
8934         # short of a list of hosts.  However, the only known hosts to date
8935         # that have a distinct // are Apollo DomainOS (too old to port to),
8936         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8937         # special semantics and is distinct from /, please report it to
8938         # <bug-gnulib@gnu.org>.
8939         case $host in
8940           *-cygwin | i370-ibm-openedition)
8941             gl_cv_double_slash_root=yes ;;
8942           *)
8943             # Be optimistic and assume that / and // are the same when we
8944             # don't know.
8945             gl_cv_double_slash_root='unknown, assuming no' ;;
8946         esac
8947       else
8948         set x `ls -di / // 2>/dev/null`
8949         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8950           gl_cv_double_slash_root=no
8951         else
8952           gl_cv_double_slash_root=yes
8953         fi
8954       fi
8955 fi
8956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8957 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8958   if test "$gl_cv_double_slash_root" = yes; then
8959
8960 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8961
8962   fi
8963
8964
8965
8966
8967
8968
8969
8970   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8971 printf %s "checking whether the preprocessor supports include_next... " >&6; }
8972 if ${gl_cv_have_include_next+:} false; then :
8973   printf %s "(cached) " >&6
8974 else
8975   rm -rf conftestd1a conftestd1b conftestd2
8976      mkdir conftestd1a conftestd1b conftestd2
8977                                                   cat <<EOF > conftestd1a/conftest.h
8978 #define DEFINED_IN_CONFTESTD1
8979 #include_next <conftest.h>
8980 #ifdef DEFINED_IN_CONFTESTD2
8981 int foo;
8982 #else
8983 #error "include_next doesn't work"
8984 #endif
8985 EOF
8986      cat <<EOF > conftestd1b/conftest.h
8987 #define DEFINED_IN_CONFTESTD1
8988 #include <stdio.h>
8989 #include_next <conftest.h>
8990 #ifdef DEFINED_IN_CONFTESTD2
8991 int foo;
8992 #else
8993 #error "include_next doesn't work"
8994 #endif
8995 EOF
8996      cat <<EOF > conftestd2/conftest.h
8997 #ifndef DEFINED_IN_CONFTESTD1
8998 #error "include_next test doesn't work"
8999 #endif
9000 #define DEFINED_IN_CONFTESTD2
9001 EOF
9002      gl_save_CPPFLAGS="$CPPFLAGS"
9003      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9004      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9005 /* end confdefs.h.  */
9006 #include <conftest.h>
9007 _ACEOF
9008 if ac_fn_c_try_compile "$LINENO"; then :
9009   gl_cv_have_include_next=yes
9010 else
9011   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9012         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9013 /* end confdefs.h.  */
9014 #include <conftest.h>
9015 _ACEOF
9016 if ac_fn_c_try_compile "$LINENO"; then :
9017   gl_cv_have_include_next=buggy
9018 else
9019   gl_cv_have_include_next=no
9020 fi
9021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9022
9023 fi
9024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9025      CPPFLAGS="$gl_save_CPPFLAGS"
9026      rm -rf conftestd1a conftestd1b conftestd2
9027
9028 fi
9029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9030 printf "%s\n" "$gl_cv_have_include_next" >&6; }
9031   PRAGMA_SYSTEM_HEADER=
9032   if test $gl_cv_have_include_next = yes; then
9033     INCLUDE_NEXT=include_next
9034     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9035     if test -n "$GCC"; then
9036       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9037     fi
9038   else
9039     if test $gl_cv_have_include_next = buggy; then
9040       INCLUDE_NEXT=include
9041       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9042     else
9043       INCLUDE_NEXT=include
9044       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9045     fi
9046   fi
9047
9048
9049
9050   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9051 printf %s "checking whether system header files limit the line length... " >&6; }
9052 if ${gl_cv_pragma_columns+:} false; then :
9053   printf %s "(cached) " >&6
9054 else
9055        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9056 /* end confdefs.h.  */
9057
9058 #ifdef __TANDEM
9059 choke me
9060 #endif
9061
9062 _ACEOF
9063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9064   $EGREP "choke me" >/dev/null 2>&1; then :
9065   gl_cv_pragma_columns=yes
9066 else
9067   gl_cv_pragma_columns=no
9068 fi
9069 rm -rf conftest*
9070
9071
9072 fi
9073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9074 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
9075   if test $gl_cv_pragma_columns = yes; then
9076     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9077   else
9078     PRAGMA_COLUMNS=
9079   fi
9080
9081
9082
9083
9084   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9085 printf %s "checking for complete errno.h... " >&6; }
9086 if ${gl_cv_header_errno_h_complete+:} false; then :
9087   printf %s "(cached) " >&6
9088 else
9089
9090     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9091 /* end confdefs.h.  */
9092
9093 #include <errno.h>
9094 #if !defined ETXTBSY
9095 booboo
9096 #endif
9097 #if !defined ENOMSG
9098 booboo
9099 #endif
9100 #if !defined EIDRM
9101 booboo
9102 #endif
9103 #if !defined ENOLINK
9104 booboo
9105 #endif
9106 #if !defined EPROTO
9107 booboo
9108 #endif
9109 #if !defined EMULTIHOP
9110 booboo
9111 #endif
9112 #if !defined EBADMSG
9113 booboo
9114 #endif
9115 #if !defined EOVERFLOW
9116 booboo
9117 #endif
9118 #if !defined ENOTSUP
9119 booboo
9120 #endif
9121 #if !defined ENETRESET
9122 booboo
9123 #endif
9124 #if !defined ECONNABORTED
9125 booboo
9126 #endif
9127 #if !defined ESTALE
9128 booboo
9129 #endif
9130 #if !defined EDQUOT
9131 booboo
9132 #endif
9133 #if !defined ECANCELED
9134 booboo
9135 #endif
9136 #if !defined EOWNERDEAD
9137 booboo
9138 #endif
9139 #if !defined ENOTRECOVERABLE
9140 booboo
9141 #endif
9142 #if !defined EILSEQ
9143 booboo
9144 #endif
9145
9146 _ACEOF
9147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9148   $EGREP "booboo" >/dev/null 2>&1; then :
9149   gl_cv_header_errno_h_complete=no
9150 else
9151   gl_cv_header_errno_h_complete=yes
9152 fi
9153 rm -rf conftest*
9154
9155
9156 fi
9157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9158 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
9159   if test $gl_cv_header_errno_h_complete = yes; then
9160     ERRNO_H=''
9161   else
9162
9163
9164
9165
9166
9167
9168
9169
9170      if test $gl_cv_have_include_next = yes; then
9171        gl_cv_next_errno_h='<'errno.h'>'
9172      else
9173        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9174 printf %s "checking absolute name of <errno.h>... " >&6; }
9175 if ${gl_cv_next_errno_h+:} false; then :
9176   printf %s "(cached) " >&6
9177 else
9178
9179                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180 /* end confdefs.h.  */
9181 #include <errno.h>
9182
9183 _ACEOF
9184                                                                                                                         case "$host_os" in
9185                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
9186                  *)    gl_absname_cpp="$ac_cpp" ;;
9187                esac
9188
9189                case "$host_os" in
9190                  mingw*)
9191                                                                                                                                      gl_dirsep_regex='[/\\]'
9192                    ;;
9193                  *)
9194                    gl_dirsep_regex='\/'
9195                    ;;
9196                esac
9197                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9198
9199                gl_header_literal_regex=`echo 'errno.h' \
9200                                         | sed -e "$gl_make_literal_regex_sed"`
9201                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9202                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9203                    s|^/[^/]|//&|
9204                    p
9205                    q
9206                  }'
9207                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9208                       sed -n "$gl_absolute_header_sed"`'"'
9209
9210
9211 fi
9212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9213 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
9214      fi
9215      NEXT_ERRNO_H=$gl_cv_next_errno_h
9216
9217      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9218        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9219        gl_next_as_first_directive='<'errno.h'>'
9220      else
9221        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9222        gl_next_as_first_directive=$gl_cv_next_errno_h
9223      fi
9224      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9225
9226
9227
9228
9229     ERRNO_H='errno.h'
9230   fi
9231
9232    if test -n "$ERRNO_H"; then
9233   GL_GENERATE_ERRNO_H_TRUE=
9234   GL_GENERATE_ERRNO_H_FALSE='#'
9235 else
9236   GL_GENERATE_ERRNO_H_TRUE='#'
9237   GL_GENERATE_ERRNO_H_FALSE=
9238 fi
9239
9240
9241   if test -n "$ERRNO_H"; then
9242     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9243 printf %s "checking for EMULTIHOP value... " >&6; }
9244 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9245   printf %s "(cached) " >&6
9246 else
9247
9248       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9249 /* end confdefs.h.  */
9250
9251 #include <errno.h>
9252 #ifdef EMULTIHOP
9253 yes
9254 #endif
9255
9256 _ACEOF
9257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9258   $EGREP "yes" >/dev/null 2>&1; then :
9259   gl_cv_header_errno_h_EMULTIHOP=yes
9260 else
9261   gl_cv_header_errno_h_EMULTIHOP=no
9262 fi
9263 rm -rf conftest*
9264
9265       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9266         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9267 /* end confdefs.h.  */
9268
9269 #define _XOPEN_SOURCE_EXTENDED 1
9270 #include <errno.h>
9271 #ifdef EMULTIHOP
9272 yes
9273 #endif
9274
9275 _ACEOF
9276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9277   $EGREP "yes" >/dev/null 2>&1; then :
9278   gl_cv_header_errno_h_EMULTIHOP=hidden
9279 fi
9280 rm -rf conftest*
9281
9282         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9283                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9284 #define _XOPEN_SOURCE_EXTENDED 1
9285 #include <errno.h>
9286 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9287 #include <stdio.h>
9288 #include <stdlib.h>
9289 "; then :
9290
9291 fi
9292
9293         fi
9294       fi
9295
9296 fi
9297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9298 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9299     case $gl_cv_header_errno_h_EMULTIHOP in
9300       yes | no)
9301         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9302         ;;
9303       *)
9304         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9305         ;;
9306     esac
9307
9308
9309   fi
9310
9311
9312   if test -n "$ERRNO_H"; then
9313     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9314 printf %s "checking for ENOLINK value... " >&6; }
9315 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9316   printf %s "(cached) " >&6
9317 else
9318
9319       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9320 /* end confdefs.h.  */
9321
9322 #include <errno.h>
9323 #ifdef ENOLINK
9324 yes
9325 #endif
9326
9327 _ACEOF
9328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9329   $EGREP "yes" >/dev/null 2>&1; then :
9330   gl_cv_header_errno_h_ENOLINK=yes
9331 else
9332   gl_cv_header_errno_h_ENOLINK=no
9333 fi
9334 rm -rf conftest*
9335
9336       if test $gl_cv_header_errno_h_ENOLINK = no; then
9337         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9338 /* end confdefs.h.  */
9339
9340 #define _XOPEN_SOURCE_EXTENDED 1
9341 #include <errno.h>
9342 #ifdef ENOLINK
9343 yes
9344 #endif
9345
9346 _ACEOF
9347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9348   $EGREP "yes" >/dev/null 2>&1; then :
9349   gl_cv_header_errno_h_ENOLINK=hidden
9350 fi
9351 rm -rf conftest*
9352
9353         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9354                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9355 #define _XOPEN_SOURCE_EXTENDED 1
9356 #include <errno.h>
9357 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9358 #include <stdio.h>
9359 #include <stdlib.h>
9360 "; then :
9361
9362 fi
9363
9364         fi
9365       fi
9366
9367 fi
9368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9369 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
9370     case $gl_cv_header_errno_h_ENOLINK in
9371       yes | no)
9372         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9373         ;;
9374       *)
9375         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9376         ;;
9377     esac
9378
9379
9380   fi
9381
9382
9383   if test -n "$ERRNO_H"; then
9384     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9385 printf %s "checking for EOVERFLOW value... " >&6; }
9386 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9387   printf %s "(cached) " >&6
9388 else
9389
9390       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391 /* end confdefs.h.  */
9392
9393 #include <errno.h>
9394 #ifdef EOVERFLOW
9395 yes
9396 #endif
9397
9398 _ACEOF
9399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9400   $EGREP "yes" >/dev/null 2>&1; then :
9401   gl_cv_header_errno_h_EOVERFLOW=yes
9402 else
9403   gl_cv_header_errno_h_EOVERFLOW=no
9404 fi
9405 rm -rf conftest*
9406
9407       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9408         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409 /* end confdefs.h.  */
9410
9411 #define _XOPEN_SOURCE_EXTENDED 1
9412 #include <errno.h>
9413 #ifdef EOVERFLOW
9414 yes
9415 #endif
9416
9417 _ACEOF
9418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9419   $EGREP "yes" >/dev/null 2>&1; then :
9420   gl_cv_header_errno_h_EOVERFLOW=hidden
9421 fi
9422 rm -rf conftest*
9423
9424         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9425                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
9426 #define _XOPEN_SOURCE_EXTENDED 1
9427 #include <errno.h>
9428 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9429 #include <stdio.h>
9430 #include <stdlib.h>
9431 "; then :
9432
9433 fi
9434
9435         fi
9436       fi
9437
9438 fi
9439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9440 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9441     case $gl_cv_header_errno_h_EOVERFLOW in
9442       yes | no)
9443         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9444         ;;
9445       *)
9446         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9447         ;;
9448     esac
9449
9450
9451   fi
9452
9453
9454 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9455 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9456   ac_have_decl=1
9457 else
9458   ac_have_decl=0
9459 fi
9460
9461 cat >>confdefs.h <<_ACEOF
9462 #define HAVE_DECL_STRERROR_R $ac_have_decl
9463 _ACEOF
9464
9465 for ac_func in strerror_r
9466 do :
9467   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9468 if test "x$ac_cv_func_strerror_r" = xyes; then :
9469   cat >>confdefs.h <<_ACEOF
9470 #define HAVE_STRERROR_R 1
9471 _ACEOF
9472
9473 fi
9474 done
9475
9476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9477 printf %s "checking whether strerror_r returns char *... " >&6; }
9478 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9479   printf %s "(cached) " >&6
9480 else
9481
9482     ac_cv_func_strerror_r_char_p=no
9483     if test $ac_cv_have_decl_strerror_r = yes; then
9484       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9485 /* end confdefs.h.  */
9486 $ac_includes_default
9487 int
9488 main ()
9489 {
9490
9491           char buf[100];
9492           char x = *strerror_r (0, buf, sizeof buf);
9493           char *p = strerror_r (0, buf, sizeof buf);
9494           return !p || x;
9495
9496   ;
9497   return 0;
9498 }
9499 _ACEOF
9500 if ac_fn_c_try_compile "$LINENO"; then :
9501   ac_cv_func_strerror_r_char_p=yes
9502 fi
9503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9504     else
9505       # strerror_r is not declared.  Choose between
9506       # systems that have relatively inaccessible declarations for the
9507       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9508       # former has a strerror_r that returns char*, while the latter
9509       # has a strerror_r that returns `int'.
9510       # This test should segfault on the DEC system.
9511       if test "$cross_compiling" = yes; then :
9512   :
9513 else
9514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9515 /* end confdefs.h.  */
9516 $ac_includes_default
9517         extern char *strerror_r ();
9518 int
9519 main ()
9520 {
9521 char buf[100];
9522           char x = *strerror_r (0, buf, sizeof buf);
9523           return ! isalpha (x);
9524   ;
9525   return 0;
9526 }
9527 _ACEOF
9528 if ac_fn_c_try_run "$LINENO"; then :
9529   ac_cv_func_strerror_r_char_p=yes
9530 fi
9531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9532   conftest.$ac_objext conftest.beam conftest.$ac_ext
9533 fi
9534
9535     fi
9536
9537 fi
9538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9539 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
9540 if test $ac_cv_func_strerror_r_char_p = yes; then
9541
9542 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9543
9544 fi
9545
9546
9547   XGETTEXT_EXTRA_OPTIONS=
9548
9549
9550
9551
9552
9553   GNULIB_FCNTL=0;
9554   GNULIB_NONBLOCKING=0;
9555   GNULIB_OPEN=0;
9556   GNULIB_OPENAT=0;
9557     HAVE_FCNTL=1;
9558   HAVE_OPENAT=1;
9559   REPLACE_FCNTL=0;
9560   REPLACE_OPEN=0;
9561   REPLACE_OPENAT=0;
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9573 printf %s "checking for working fcntl.h... " >&6; }
9574 if ${gl_cv_header_working_fcntl_h+:} false; then :
9575   printf %s "(cached) " >&6
9576 else
9577   if test "$cross_compiling" = yes; then :
9578   gl_cv_header_working_fcntl_h=cross-compiling
9579 else
9580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581 /* end confdefs.h.  */
9582 #include <sys/types.h>
9583            #include <sys/stat.h>
9584            #if HAVE_UNISTD_H
9585            # include <unistd.h>
9586            #else /* on Windows with MSVC */
9587            # include <io.h>
9588            # include <stdlib.h>
9589            # defined sleep(n) _sleep ((n) * 1000)
9590            #endif
9591            #include <fcntl.h>
9592            #ifndef O_NOATIME
9593             #define O_NOATIME 0
9594            #endif
9595            #ifndef O_NOFOLLOW
9596             #define O_NOFOLLOW 0
9597            #endif
9598            static int const constants[] =
9599             {
9600               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9601               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9602             };
9603
9604 int
9605 main ()
9606 {
9607
9608             int result = !constants;
9609             #if HAVE_SYMLINK
9610             {
9611               static char const sym[] = "conftest.sym";
9612               if (symlink ("/dev/null", sym) != 0)
9613                 result |= 2;
9614               else
9615                 {
9616                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9617                   if (fd >= 0)
9618                     {
9619                       close (fd);
9620                       result |= 4;
9621                     }
9622                 }
9623               if (unlink (sym) != 0 || symlink (".", sym) != 0)
9624                 result |= 2;
9625               else
9626                 {
9627                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9628                   if (fd >= 0)
9629                     {
9630                       close (fd);
9631                       result |= 4;
9632                     }
9633                 }
9634               unlink (sym);
9635             }
9636             #endif
9637             {
9638               static char const file[] = "confdefs.h";
9639               int fd = open (file, O_RDONLY | O_NOATIME);
9640               if (fd < 0)
9641                 result |= 8;
9642               else
9643                 {
9644                   struct stat st0;
9645                   if (fstat (fd, &st0) != 0)
9646                     result |= 16;
9647                   else
9648                     {
9649                       char c;
9650                       sleep (1);
9651                       if (read (fd, &c, 1) != 1)
9652                         result |= 24;
9653                       else
9654                         {
9655                           if (close (fd) != 0)
9656                             result |= 32;
9657                           else
9658                             {
9659                               struct stat st1;
9660                               if (stat (file, &st1) != 0)
9661                                 result |= 40;
9662                               else
9663                                 if (st0.st_atime != st1.st_atime)
9664                                   result |= 64;
9665                             }
9666                         }
9667                     }
9668                 }
9669             }
9670             return result;
9671   ;
9672   return 0;
9673 }
9674 _ACEOF
9675 if ac_fn_c_try_run "$LINENO"; then :
9676   gl_cv_header_working_fcntl_h=yes
9677 else
9678   case $? in #(
9679         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9680         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9681         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9682          *) gl_cv_header_working_fcntl_h='no';;
9683         esac
9684 fi
9685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9686   conftest.$ac_objext conftest.beam conftest.$ac_ext
9687 fi
9688
9689 fi
9690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9691 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
9692
9693   case $gl_cv_header_working_fcntl_h in #(
9694   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9695   *) ac_val=1;;
9696   esac
9697
9698 cat >>confdefs.h <<_ACEOF
9699 #define HAVE_WORKING_O_NOATIME $ac_val
9700 _ACEOF
9701
9702
9703   case $gl_cv_header_working_fcntl_h in #(
9704   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9705   *) ac_val=1;;
9706   esac
9707
9708 cat >>confdefs.h <<_ACEOF
9709 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9710 _ACEOF
9711
9712
9713 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9714 if test "x$ac_cv_type_pid_t" = xyes; then :
9715
9716 else
9717
9718 cat >>confdefs.h <<_ACEOF
9719 #define pid_t int
9720 _ACEOF
9721
9722 fi
9723
9724 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9725 if test "x$ac_cv_type_mode_t" = xyes; then :
9726
9727 else
9728
9729 cat >>confdefs.h <<_ACEOF
9730 #define mode_t int
9731 _ACEOF
9732
9733 fi
9734
9735
9736
9737
9738
9739
9740
9741
9742    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9743 printf %s "checking for mbstate_t... " >&6; }
9744 if ${ac_cv_type_mbstate_t+:} false; then :
9745   printf %s "(cached) " >&6
9746 else
9747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9748 /* end confdefs.h.  */
9749 $ac_includes_default
9750 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9751    <wchar.h>.
9752    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9753    included before <wchar.h>.  */
9754 #include <stddef.h>
9755 #include <stdio.h>
9756 #include <time.h>
9757 #include <wchar.h>
9758 int
9759 main ()
9760 {
9761 mbstate_t x; return sizeof x;
9762   ;
9763   return 0;
9764 }
9765 _ACEOF
9766 if ac_fn_c_try_compile "$LINENO"; then :
9767   ac_cv_type_mbstate_t=yes
9768 else
9769   ac_cv_type_mbstate_t=no
9770 fi
9771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9772 fi
9773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9774 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
9775    if test $ac_cv_type_mbstate_t = yes; then
9776
9777 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
9778
9779    else
9780
9781 printf "%s\n" "#define mbstate_t int" >>confdefs.h
9782
9783    fi
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800   GNULIB_DPRINTF=0;
9801   GNULIB_FCLOSE=0;
9802   GNULIB_FDOPEN=0;
9803   GNULIB_FFLUSH=0;
9804   GNULIB_FGETC=0;
9805   GNULIB_FGETS=0;
9806   GNULIB_FOPEN=0;
9807   GNULIB_FPRINTF=0;
9808   GNULIB_FPRINTF_POSIX=0;
9809   GNULIB_FPURGE=0;
9810   GNULIB_FPUTC=0;
9811   GNULIB_FPUTS=0;
9812   GNULIB_FREAD=0;
9813   GNULIB_FREOPEN=0;
9814   GNULIB_FSCANF=0;
9815   GNULIB_FSEEK=0;
9816   GNULIB_FSEEKO=0;
9817   GNULIB_FTELL=0;
9818   GNULIB_FTELLO=0;
9819   GNULIB_FWRITE=0;
9820   GNULIB_GETC=0;
9821   GNULIB_GETCHAR=0;
9822   GNULIB_GETDELIM=0;
9823   GNULIB_GETLINE=0;
9824   GNULIB_OBSTACK_PRINTF=0;
9825   GNULIB_OBSTACK_PRINTF_POSIX=0;
9826   GNULIB_PCLOSE=0;
9827   GNULIB_PERROR=0;
9828   GNULIB_POPEN=0;
9829   GNULIB_PRINTF=0;
9830   GNULIB_PRINTF_POSIX=0;
9831   GNULIB_PUTC=0;
9832   GNULIB_PUTCHAR=0;
9833   GNULIB_PUTS=0;
9834   GNULIB_REMOVE=0;
9835   GNULIB_RENAME=0;
9836   GNULIB_RENAMEAT=0;
9837   GNULIB_SCANF=0;
9838   GNULIB_SNPRINTF=0;
9839   GNULIB_SPRINTF_POSIX=0;
9840   GNULIB_STDIO_H_NONBLOCKING=0;
9841   GNULIB_STDIO_H_SIGPIPE=0;
9842   GNULIB_TMPFILE=0;
9843   GNULIB_VASPRINTF=0;
9844   GNULIB_VFSCANF=0;
9845   GNULIB_VSCANF=0;
9846   GNULIB_VDPRINTF=0;
9847   GNULIB_VFPRINTF=0;
9848   GNULIB_VFPRINTF_POSIX=0;
9849   GNULIB_VPRINTF=0;
9850   GNULIB_VPRINTF_POSIX=0;
9851   GNULIB_VSNPRINTF=0;
9852   GNULIB_VSPRINTF_POSIX=0;
9853     HAVE_DECL_FPURGE=1;
9854   HAVE_DECL_FSEEKO=1;
9855   HAVE_DECL_FTELLO=1;
9856   HAVE_DECL_GETDELIM=1;
9857   HAVE_DECL_GETLINE=1;
9858   HAVE_DECL_OBSTACK_PRINTF=1;
9859   HAVE_DECL_SNPRINTF=1;
9860   HAVE_DECL_VSNPRINTF=1;
9861   HAVE_DPRINTF=1;
9862   HAVE_FSEEKO=1;
9863   HAVE_FTELLO=1;
9864   HAVE_PCLOSE=1;
9865   HAVE_POPEN=1;
9866   HAVE_RENAMEAT=1;
9867   HAVE_VASPRINTF=1;
9868   HAVE_VDPRINTF=1;
9869   REPLACE_DPRINTF=0;
9870   REPLACE_FCLOSE=0;
9871   REPLACE_FDOPEN=0;
9872   REPLACE_FFLUSH=0;
9873   REPLACE_FOPEN=0;
9874   REPLACE_FPRINTF=0;
9875   REPLACE_FPURGE=0;
9876   REPLACE_FREOPEN=0;
9877   REPLACE_FSEEK=0;
9878   REPLACE_FSEEKO=0;
9879   REPLACE_FTELL=0;
9880   REPLACE_FTELLO=0;
9881   REPLACE_GETDELIM=0;
9882   REPLACE_GETLINE=0;
9883   REPLACE_OBSTACK_PRINTF=0;
9884   REPLACE_PERROR=0;
9885   REPLACE_POPEN=0;
9886   REPLACE_PRINTF=0;
9887   REPLACE_REMOVE=0;
9888   REPLACE_RENAME=0;
9889   REPLACE_RENAMEAT=0;
9890   REPLACE_SNPRINTF=0;
9891   REPLACE_SPRINTF=0;
9892   REPLACE_STDIO_READ_FUNCS=0;
9893   REPLACE_STDIO_WRITE_FUNCS=0;
9894   REPLACE_TMPFILE=0;
9895   REPLACE_VASPRINTF=0;
9896   REPLACE_VDPRINTF=0;
9897   REPLACE_VFPRINTF=0;
9898   REPLACE_VPRINTF=0;
9899   REPLACE_VSNPRINTF=0;
9900   REPLACE_VSPRINTF=0;
9901
9902
9903      GNULIB_FCHMODAT=0;
9904   GNULIB_FSTAT=0;
9905   GNULIB_FSTATAT=0;
9906   GNULIB_FUTIMENS=0;
9907   GNULIB_LCHMOD=0;
9908   GNULIB_LSTAT=0;
9909   GNULIB_MKDIRAT=0;
9910   GNULIB_MKFIFO=0;
9911   GNULIB_MKFIFOAT=0;
9912   GNULIB_MKNOD=0;
9913   GNULIB_MKNODAT=0;
9914   GNULIB_STAT=0;
9915   GNULIB_UTIMENSAT=0;
9916     HAVE_FCHMODAT=1;
9917   HAVE_FSTATAT=1;
9918   HAVE_FUTIMENS=1;
9919   HAVE_LCHMOD=1;
9920   HAVE_LSTAT=1;
9921   HAVE_MKDIRAT=1;
9922   HAVE_MKFIFO=1;
9923   HAVE_MKFIFOAT=1;
9924   HAVE_MKNOD=1;
9925   HAVE_MKNODAT=1;
9926   HAVE_UTIMENSAT=1;
9927   REPLACE_FSTAT=0;
9928   REPLACE_FSTATAT=0;
9929   REPLACE_FUTIMENS=0;
9930   REPLACE_LSTAT=0;
9931   REPLACE_MKDIR=0;
9932   REPLACE_MKFIFO=0;
9933   REPLACE_MKNOD=0;
9934   REPLACE_STAT=0;
9935   REPLACE_UTIMENSAT=0;
9936
9937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9938 printf %s "checking whether stat file-mode macros are broken... " >&6; }
9939 if ${ac_cv_header_stat_broken+:} false; then :
9940   printf %s "(cached) " >&6
9941 else
9942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9943 /* end confdefs.h.  */
9944 #include <sys/types.h>
9945 #include <sys/stat.h>
9946
9947 #if defined S_ISBLK && defined S_IFDIR
9948 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9949 #endif
9950
9951 #if defined S_ISBLK && defined S_IFCHR
9952 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9953 #endif
9954
9955 #if defined S_ISLNK && defined S_IFREG
9956 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9957 #endif
9958
9959 #if defined S_ISSOCK && defined S_IFREG
9960 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9961 #endif
9962
9963 _ACEOF
9964 if ac_fn_c_try_compile "$LINENO"; then :
9965   ac_cv_header_stat_broken=no
9966 else
9967   ac_cv_header_stat_broken=yes
9968 fi
9969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9970 fi
9971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9972 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
9973 if test $ac_cv_header_stat_broken = yes; then
9974
9975 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
9976
9977 fi
9978
9979
9980
9981
9982
9983   case "$host_os" in
9984     mingw*)
9985                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9986 printf %s "checking for 64-bit off_t... " >&6; }
9987 if ${gl_cv_type_off_t_64+:} false; then :
9988   printf %s "(cached) " >&6
9989 else
9990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9991 /* end confdefs.h.  */
9992 #include <sys/types.h>
9993                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9994
9995 int
9996 main ()
9997 {
9998
9999   ;
10000   return 0;
10001 }
10002 _ACEOF
10003 if ac_fn_c_try_compile "$LINENO"; then :
10004   gl_cv_type_off_t_64=yes
10005 else
10006   gl_cv_type_off_t_64=no
10007 fi
10008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10009
10010 fi
10011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10012 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
10013       if test $gl_cv_type_off_t_64 = no; then
10014         WINDOWS_64_BIT_OFF_T=1
10015       else
10016         WINDOWS_64_BIT_OFF_T=0
10017       fi
10018                   WINDOWS_64_BIT_ST_SIZE=1
10019       ;;
10020     *)
10021                                                       WINDOWS_64_BIT_OFF_T=0
10022       WINDOWS_64_BIT_ST_SIZE=0
10023       ;;
10024   esac
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040      if test $gl_cv_have_include_next = yes; then
10041        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10042      else
10043        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10044 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
10045 if ${gl_cv_next_sys_stat_h+:} false; then :
10046   printf %s "(cached) " >&6
10047 else
10048
10049              if test $ac_cv_header_sys_stat_h = yes; then
10050
10051
10052                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10053 /* end confdefs.h.  */
10054 #include <sys/stat.h>
10055
10056 _ACEOF
10057                                                                                                                         case "$host_os" in
10058                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10059                  *)    gl_absname_cpp="$ac_cpp" ;;
10060                esac
10061
10062                case "$host_os" in
10063                  mingw*)
10064                                                                                                                                      gl_dirsep_regex='[/\\]'
10065                    ;;
10066                  *)
10067                    gl_dirsep_regex='\/'
10068                    ;;
10069                esac
10070                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10071
10072                gl_header_literal_regex=`echo 'sys/stat.h' \
10073                                         | sed -e "$gl_make_literal_regex_sed"`
10074                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10075                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10076                    s|^/[^/]|//&|
10077                    p
10078                    q
10079                  }'
10080                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10081                       sed -n "$gl_absolute_header_sed"`'"'
10082           else
10083                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10084              fi
10085
10086
10087 fi
10088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10089 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
10090      fi
10091      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10092
10093      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10094        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10095        gl_next_as_first_directive='<'sys/stat.h'>'
10096      else
10097        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10098        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10099      fi
10100      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10113
10114 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10115
10116   fi
10117
10118       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10119      #include <sys/stat.h>
10120 "
10121 if test "x$ac_cv_type_nlink_t" = xyes; then :
10122
10123 else
10124
10125 printf "%s\n" "#define nlink_t int" >>confdefs.h
10126
10127 fi
10128
10129
10130
10131     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
10132     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10133     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10134 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
10135 if eval \${$as_gl_Symbol+:} false; then :
10136   printf %s "(cached) " >&6
10137 else
10138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h.  */
10140 #include <sys/stat.h>
10141
10142 int
10143 main ()
10144 {
10145 #undef $gl_func
10146   (void) $gl_func;
10147   ;
10148   return 0;
10149 }
10150 _ACEOF
10151 if ac_fn_c_try_compile "$LINENO"; then :
10152   eval "$as_gl_Symbol=yes"
10153 else
10154   eval "$as_gl_Symbol=no"
10155 fi
10156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10157 fi
10158 eval ac_res=\$$as_gl_Symbol
10159                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10160 printf "%s\n" "$ac_res" >&6; }
10161     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10162   cat >>confdefs.h <<_ACEOF
10163 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10164 _ACEOF
10165
10166                      eval ac_cv_have_decl_$gl_func=yes
10167 fi
10168       done
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188      if test $gl_cv_have_include_next = yes; then
10189        gl_cv_next_getopt_h='<'getopt.h'>'
10190      else
10191        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
10192 printf %s "checking absolute name of <getopt.h>... " >&6; }
10193 if ${gl_cv_next_getopt_h+:} false; then :
10194   printf %s "(cached) " >&6
10195 else
10196
10197              if test $ac_cv_header_getopt_h = yes; then
10198
10199
10200                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h.  */
10202 #include <getopt.h>
10203
10204 _ACEOF
10205                                                                                                                         case "$host_os" in
10206                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10207                  *)    gl_absname_cpp="$ac_cpp" ;;
10208                esac
10209
10210                case "$host_os" in
10211                  mingw*)
10212                                                                                                                                      gl_dirsep_regex='[/\\]'
10213                    ;;
10214                  *)
10215                    gl_dirsep_regex='\/'
10216                    ;;
10217                esac
10218                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10219
10220                gl_header_literal_regex=`echo 'getopt.h' \
10221                                         | sed -e "$gl_make_literal_regex_sed"`
10222                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10223                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10224                    s|^/[^/]|//&|
10225                    p
10226                    q
10227                  }'
10228                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10229                       sed -n "$gl_absolute_header_sed"`'"'
10230           else
10231                gl_cv_next_getopt_h='<'getopt.h'>'
10232              fi
10233
10234
10235 fi
10236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10237 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
10238      fi
10239      NEXT_GETOPT_H=$gl_cv_next_getopt_h
10240
10241      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10242        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10243        gl_next_as_first_directive='<'getopt.h'>'
10244      else
10245        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10246        gl_next_as_first_directive=$gl_cv_next_getopt_h
10247      fi
10248      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10249
10250
10251
10252
10253   if test $ac_cv_header_getopt_h = yes; then
10254     HAVE_GETOPT_H=1
10255   else
10256     HAVE_GETOPT_H=0
10257   fi
10258
10259
10260   gl_replace_getopt=
10261
10262     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10263     for ac_header in getopt.h
10264 do :
10265   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10266 if test "x$ac_cv_header_getopt_h" = xyes; then :
10267   cat >>confdefs.h <<_ACEOF
10268 #define HAVE_GETOPT_H 1
10269 _ACEOF
10270
10271 else
10272   gl_replace_getopt=yes
10273 fi
10274
10275 done
10276
10277   fi
10278
10279     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10280     for ac_func in getopt_long_only
10281 do :
10282   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10283 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
10284   cat >>confdefs.h <<_ACEOF
10285 #define HAVE_GETOPT_LONG_ONLY 1
10286 _ACEOF
10287
10288 else
10289   gl_replace_getopt=yes
10290 fi
10291 done
10292
10293   fi
10294
10295           if test -z "$gl_replace_getopt"; then
10296     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10297 printf %s "checking whether getopt is POSIX compatible... " >&6; }
10298 if ${gl_cv_func_getopt_posix+:} false; then :
10299   printf %s "(cached) " >&6
10300 else
10301
10302                                                 if test $cross_compiling = no; then
10303                               if test "$cross_compiling" = yes; then :
10304   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10305 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10306 as_fn_error $? "cannot run test program while cross compiling
10307 See \`config.log' for more details" "$LINENO" 5; }
10308 else
10309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10310 /* end confdefs.h.  */
10311
10312 #include <unistd.h>
10313 #include <stdlib.h>
10314 #include <string.h>
10315
10316 int
10317 main ()
10318 {
10319   static char program[] = "program";
10320   static char a[] = "-a";
10321   static char foo[] = "foo";
10322   static char bar[] = "bar";
10323   char *argv[] = { program, a, foo, bar, NULL };
10324   int c;
10325
10326   c = getopt (4, argv, "ab");
10327   if (!(c == 'a'))
10328     return 1;
10329   c = getopt (4, argv, "ab");
10330   if (!(c == -1))
10331     return 2;
10332   if (!(optind == 2))
10333     return 3;
10334   return 0;
10335 }
10336
10337 _ACEOF
10338 if ac_fn_c_try_run "$LINENO"; then :
10339   gl_cv_func_getopt_posix=maybe
10340 else
10341   gl_cv_func_getopt_posix=no
10342 fi
10343 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10344   conftest.$ac_objext conftest.beam conftest.$ac_ext
10345 fi
10346
10347           if test $gl_cv_func_getopt_posix = maybe; then
10348                                     if test "$cross_compiling" = yes; then :
10349   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10350 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10351 as_fn_error $? "cannot run test program while cross compiling
10352 See \`config.log' for more details" "$LINENO" 5; }
10353 else
10354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10355 /* end confdefs.h.  */
10356
10357 #include <unistd.h>
10358 #include <stdlib.h>
10359 #include <string.h>
10360
10361 int
10362 main ()
10363 {
10364   static char program[] = "program";
10365   static char donald[] = "donald";
10366   static char p[] = "-p";
10367   static char billy[] = "billy";
10368   static char duck[] = "duck";
10369   static char a[] = "-a";
10370   static char bar[] = "bar";
10371   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
10372   int c;
10373
10374   c = getopt (7, argv, "+abp:q:");
10375   if (!(c == -1))
10376     return 4;
10377   if (!(strcmp (argv[0], "program") == 0))
10378     return 5;
10379   if (!(strcmp (argv[1], "donald") == 0))
10380     return 6;
10381   if (!(strcmp (argv[2], "-p") == 0))
10382     return 7;
10383   if (!(strcmp (argv[3], "billy") == 0))
10384     return 8;
10385   if (!(strcmp (argv[4], "duck") == 0))
10386     return 9;
10387   if (!(strcmp (argv[5], "-a") == 0))
10388     return 10;
10389   if (!(strcmp (argv[6], "bar") == 0))
10390     return 11;
10391   if (!(optind == 1))
10392     return 12;
10393   return 0;
10394 }
10395
10396 _ACEOF
10397 if ac_fn_c_try_run "$LINENO"; then :
10398   gl_cv_func_getopt_posix=maybe
10399 else
10400   gl_cv_func_getopt_posix=no
10401 fi
10402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10403   conftest.$ac_objext conftest.beam conftest.$ac_ext
10404 fi
10405
10406           fi
10407           if test $gl_cv_func_getopt_posix = maybe; then
10408                         if test "$cross_compiling" = yes; then :
10409   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10410 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10411 as_fn_error $? "cannot run test program while cross compiling
10412 See \`config.log' for more details" "$LINENO" 5; }
10413 else
10414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10415 /* end confdefs.h.  */
10416
10417 #include <unistd.h>
10418 #include <stdlib.h>
10419 #include <string.h>
10420
10421 int
10422 main ()
10423 {
10424   static char program[] = "program";
10425   static char ab[] = "-ab";
10426   char *argv[3] = { program, ab, NULL };
10427   if (getopt (2, argv, "ab:") != 'a')
10428     return 13;
10429   if (getopt (2, argv, "ab:") != '?')
10430     return 14;
10431   if (optopt != 'b')
10432     return 15;
10433   if (optind != 2)
10434     return 16;
10435   return 0;
10436 }
10437
10438 _ACEOF
10439 if ac_fn_c_try_run "$LINENO"; then :
10440   gl_cv_func_getopt_posix=yes
10441 else
10442   gl_cv_func_getopt_posix=no
10443 fi
10444 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10445   conftest.$ac_objext conftest.beam conftest.$ac_ext
10446 fi
10447
10448           fi
10449         else
10450           case "$host_os" in
10451             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
10452             *)                       gl_cv_func_getopt_posix="guessing yes";;
10453           esac
10454         fi
10455
10456 fi
10457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10458 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
10459     case "$gl_cv_func_getopt_posix" in
10460       *no) gl_replace_getopt=yes ;;
10461     esac
10462   fi
10463
10464   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10465     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10466 printf %s "checking for working GNU getopt function... " >&6; }
10467 if ${gl_cv_func_getopt_gnu+:} false; then :
10468   printf %s "(cached) " >&6
10469 else
10470   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10471        # optstring is necessary for programs like m4 that have POSIX-mandated
10472        # semantics for supporting options interspersed with files.
10473        # Also, since getopt_long is a GNU extension, we require optind=0.
10474        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
10475        # so take care to revert to the correct (non-)export state.
10476        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
10477        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
10478          xx) gl_had_POSIXLY_CORRECT=exported ;;
10479          x)  gl_had_POSIXLY_CORRECT=yes      ;;
10480          *)  gl_had_POSIXLY_CORRECT=         ;;
10481        esac
10482        POSIXLY_CORRECT=1
10483        export POSIXLY_CORRECT
10484        if test "$cross_compiling" = yes; then :
10485            gl_cv_func_getopt_gnu="guessing no"
10486
10487 else
10488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10489 /* end confdefs.h.  */
10490 #include <getopt.h>
10491                            #include <stddef.h>
10492                            #include <string.h>
10493
10494 #include <stdlib.h>
10495 #if defined __MACH__ && defined __APPLE__
10496 /* Avoid a crash on Mac OS X.  */
10497 #include <mach/mach.h>
10498 #include <mach/mach_error.h>
10499 #include <mach/thread_status.h>
10500 #include <mach/exception.h>
10501 #include <mach/task.h>
10502 #include <pthread.h>
10503 /* The exception port on which our thread listens.  */
10504 static mach_port_t our_exception_port;
10505 /* The main function of the thread listening for exceptions of type
10506    EXC_BAD_ACCESS.  */
10507 static void *
10508 mach_exception_thread (void *arg)
10509 {
10510   /* Buffer for a message to be received.  */
10511   struct {
10512     mach_msg_header_t head;
10513     mach_msg_body_t msgh_body;
10514     char data[1024];
10515   } msg;
10516   mach_msg_return_t retval;
10517   /* Wait for a message on the exception port.  */
10518   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10519                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10520   if (retval != MACH_MSG_SUCCESS)
10521     abort ();
10522   exit (1);
10523 }
10524 static void
10525 nocrash_init (void)
10526 {
10527   mach_port_t self = mach_task_self ();
10528   /* Allocate a port on which the thread shall listen for exceptions.  */
10529   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10530       == KERN_SUCCESS) {
10531     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10532     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10533                                 MACH_MSG_TYPE_MAKE_SEND)
10534         == KERN_SUCCESS) {
10535       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10536          for us.  */
10537       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10538       /* Create the thread listening on the exception port.  */
10539       pthread_attr_t attr;
10540       pthread_t thread;
10541       if (pthread_attr_init (&attr) == 0
10542           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10543           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10544         pthread_attr_destroy (&attr);
10545         /* Replace the exception port info for these exceptions with our own.
10546            Note that we replace the exception port for the entire task, not only
10547            for a particular thread.  This has the effect that when our exception
10548            port gets the message, the thread specific exception port has already
10549            been asked, and we don't need to bother about it.
10550            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10551         task_set_exception_ports (self, mask, our_exception_port,
10552                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10553       }
10554     }
10555   }
10556 }
10557 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10558 /* Avoid a crash on native Windows.  */
10559 #define WIN32_LEAN_AND_MEAN
10560 #include <windows.h>
10561 #include <winerror.h>
10562 static LONG WINAPI
10563 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10564 {
10565   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10566     {
10567     case EXCEPTION_ACCESS_VIOLATION:
10568     case EXCEPTION_IN_PAGE_ERROR:
10569     case EXCEPTION_STACK_OVERFLOW:
10570     case EXCEPTION_GUARD_PAGE:
10571     case EXCEPTION_PRIV_INSTRUCTION:
10572     case EXCEPTION_ILLEGAL_INSTRUCTION:
10573     case EXCEPTION_DATATYPE_MISALIGNMENT:
10574     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10575     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10576       exit (1);
10577     }
10578   return EXCEPTION_CONTINUE_SEARCH;
10579 }
10580 static void
10581 nocrash_init (void)
10582 {
10583   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10584 }
10585 #else
10586 /* Avoid a crash on POSIX systems.  */
10587 #include <signal.h>
10588 /* A POSIX signal handler.  */
10589 static void
10590 exception_handler (int sig)
10591 {
10592   exit (1);
10593 }
10594 static void
10595 nocrash_init (void)
10596 {
10597 #ifdef SIGSEGV
10598   signal (SIGSEGV, exception_handler);
10599 #endif
10600 #ifdef SIGBUS
10601   signal (SIGBUS, exception_handler);
10602 #endif
10603 }
10604 #endif
10605
10606
10607 int
10608 main ()
10609 {
10610
10611              int result = 0;
10612
10613              nocrash_init();
10614
10615              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10616                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10617                 OSF/1 5.1, Solaris 10.  */
10618              {
10619                static char conftest[] = "conftest";
10620                static char plus[] = "-+";
10621                char *argv[3] = { conftest, plus, NULL };
10622                opterr = 0;
10623                if (getopt (2, argv, "+a") != '?')
10624                  result |= 1;
10625              }
10626              /* This code succeeds on glibc 2.8, mingw,
10627                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
10628                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
10629              {
10630                static char program[] = "program";
10631                static char p[] = "-p";
10632                static char foo[] = "foo";
10633                static char bar[] = "bar";
10634                char *argv[] = { program, p, foo, bar, NULL };
10635
10636                optind = 1;
10637                if (getopt (4, argv, "p::") != 'p')
10638                  result |= 2;
10639                else if (optarg != NULL)
10640                  result |= 4;
10641                else if (getopt (4, argv, "p::") != -1)
10642                  result |= 6;
10643                else if (optind != 2)
10644                  result |= 8;
10645              }
10646              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
10647              {
10648                static char program[] = "program";
10649                static char foo[] = "foo";
10650                static char p[] = "-p";
10651                char *argv[] = { program, foo, p, NULL };
10652                optind = 0;
10653                if (getopt (3, argv, "-p") != 1)
10654                  result |= 16;
10655                else if (getopt (3, argv, "-p") != 'p')
10656                  result |= 16;
10657              }
10658              /* This code fails on glibc 2.11.  */
10659              {
10660                static char program[] = "program";
10661                static char b[] = "-b";
10662                static char a[] = "-a";
10663                char *argv[] = { program, b, a, NULL };
10664                optind = opterr = 0;
10665                if (getopt (3, argv, "+:a:b") != 'b')
10666                  result |= 32;
10667                else if (getopt (3, argv, "+:a:b") != ':')
10668                  result |= 32;
10669              }
10670              /* This code dumps core on glibc 2.14.  */
10671              {
10672                static char program[] = "program";
10673                static char w[] = "-W";
10674                static char dummy[] = "dummy";
10675                char *argv[] = { program, w, dummy, NULL };
10676                optind = opterr = 1;
10677                if (getopt (3, argv, "W;") != 'W')
10678                  result |= 64;
10679              }
10680              return result;
10681
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 if ac_fn_c_try_run "$LINENO"; then :
10687   gl_cv_func_getopt_gnu=yes
10688 else
10689   gl_cv_func_getopt_gnu=no
10690 fi
10691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10692   conftest.$ac_objext conftest.beam conftest.$ac_ext
10693 fi
10694
10695        case $gl_had_POSIXLY_CORRECT in
10696          exported) ;;
10697          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
10698          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
10699        esac
10700
10701 fi
10702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
10703 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
10704     if test "$gl_cv_func_getopt_gnu" != yes; then
10705       gl_replace_getopt=yes
10706     else
10707       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
10708 printf %s "checking for working GNU getopt_long function... " >&6; }
10709 if ${gl_cv_func_getopt_long_gnu+:} false; then :
10710   printf %s "(cached) " >&6
10711 else
10712   if test "$cross_compiling" = yes; then :
10713               case "$host_os" in
10714               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
10715               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
10716             esac
10717
10718 else
10719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10720 /* end confdefs.h.  */
10721 #include <getopt.h>
10722                 #include <stddef.h>
10723                 #include <string.h>
10724
10725 int
10726 main ()
10727 {
10728 static const struct option long_options[] =
10729                   {
10730                     { "xtremely-",no_argument,       NULL, 1003 },
10731                     { "xtra",     no_argument,       NULL, 1001 },
10732                     { "xtreme",   no_argument,       NULL, 1002 },
10733                     { "xtremely", no_argument,       NULL, 1003 },
10734                     { NULL,       0,                 NULL, 0 }
10735                   };
10736                 /* This code fails on OpenBSD 5.0.  */
10737                 {
10738                   static char program[] = "program";
10739                   static char xtremel[] = "--xtremel";
10740                   char *argv[] = { program, xtremel, NULL };
10741                   int option_index;
10742                   optind = 1; opterr = 0;
10743                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
10744                     return 1;
10745                 }
10746                 return 0;
10747
10748   ;
10749   return 0;
10750 }
10751 _ACEOF
10752 if ac_fn_c_try_run "$LINENO"; then :
10753   gl_cv_func_getopt_long_gnu=yes
10754 else
10755   gl_cv_func_getopt_long_gnu=no
10756 fi
10757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10758   conftest.$ac_objext conftest.beam conftest.$ac_ext
10759 fi
10760
10761
10762 fi
10763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
10764 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
10765       case "$gl_cv_func_getopt_long_gnu" in
10766         *yes) ;;
10767         *) gl_replace_getopt=yes ;;
10768       esac
10769     fi
10770   fi
10771
10772
10773
10774
10775
10776
10777     REPLACE_GETOPT=0
10778     if test -n "$gl_replace_getopt"; then
10779       REPLACE_GETOPT=1
10780     fi
10781
10782   if test $REPLACE_GETOPT = 1; then
10783
10784   GETOPT_H=getopt.h
10785
10786 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
10787
10788
10789
10790   fi
10791
10792 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
10793 if test "x$ac_cv_have_decl_getenv" = xyes; then :
10794   ac_have_decl=1
10795 else
10796   ac_have_decl=0
10797 fi
10798
10799 cat >>confdefs.h <<_ACEOF
10800 #define HAVE_DECL_GETENV $ac_have_decl
10801 _ACEOF
10802
10803 :
10804
10805
10806
10807
10808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10809 printf %s "checking for C/C++ restrict keyword... " >&6; }
10810 if ${ac_cv_c_restrict+:} false; then :
10811   printf %s "(cached) " >&6
10812 else
10813   ac_cv_c_restrict=no
10814    # The order here caters to the fact that C++ does not require restrict.
10815    for ac_kw in __restrict __restrict__ _Restrict restrict; do
10816      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10817 /* end confdefs.h.  */
10818 typedef int * int_ptr;
10819         int foo (int_ptr $ac_kw ip) {
10820         return ip[0];
10821        }
10822 int
10823 main ()
10824 {
10825 int s[1];
10826         int * $ac_kw t = s;
10827         t[0] = 0;
10828         return foo(t)
10829   ;
10830   return 0;
10831 }
10832 _ACEOF
10833 if ac_fn_c_try_compile "$LINENO"; then :
10834   ac_cv_c_restrict=$ac_kw
10835 fi
10836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10837      test "$ac_cv_c_restrict" != no && break
10838    done
10839
10840 fi
10841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10842 printf "%s\n" "$ac_cv_c_restrict" >&6; }
10843
10844  case $ac_cv_c_restrict in
10845    restrict) ;;
10846    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
10847  ;;
10848    *)  cat >>confdefs.h <<_ACEOF
10849 #define restrict $ac_cv_c_restrict
10850 _ACEOF
10851  ;;
10852  esac
10853
10854
10855   GNULIB_GETTIMEOFDAY=0;
10856     HAVE_GETTIMEOFDAY=1;
10857   HAVE_STRUCT_TIMEVAL=1;
10858   HAVE_SYS_TIME_H=1;
10859   REPLACE_GETTIMEOFDAY=0;
10860   REPLACE_STRUCT_TIMEVAL=0;
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877      if test $gl_cv_have_include_next = yes; then
10878        gl_cv_next_sys_time_h='<'sys/time.h'>'
10879      else
10880        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10881 printf %s "checking absolute name of <sys/time.h>... " >&6; }
10882 if ${gl_cv_next_sys_time_h+:} false; then :
10883   printf %s "(cached) " >&6
10884 else
10885
10886              if test $ac_cv_header_sys_time_h = yes; then
10887
10888
10889                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10890 /* end confdefs.h.  */
10891 #include <sys/time.h>
10892
10893 _ACEOF
10894                                                                                                                         case "$host_os" in
10895                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10896                  *)    gl_absname_cpp="$ac_cpp" ;;
10897                esac
10898
10899                case "$host_os" in
10900                  mingw*)
10901                                                                                                                                      gl_dirsep_regex='[/\\]'
10902                    ;;
10903                  *)
10904                    gl_dirsep_regex='\/'
10905                    ;;
10906                esac
10907                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10908
10909                gl_header_literal_regex=`echo 'sys/time.h' \
10910                                         | sed -e "$gl_make_literal_regex_sed"`
10911                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10912                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10913                    s|^/[^/]|//&|
10914                    p
10915                    q
10916                  }'
10917                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10918                       sed -n "$gl_absolute_header_sed"`'"'
10919           else
10920                gl_cv_next_sys_time_h='<'sys/time.h'>'
10921              fi
10922
10923
10924 fi
10925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10926 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
10927      fi
10928      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10929
10930      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10931        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10932        gl_next_as_first_directive='<'sys/time.h'>'
10933      else
10934        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10935        gl_next_as_first_directive=$gl_cv_next_sys_time_h
10936      fi
10937      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10938
10939
10940
10941
10942
10943   if test $ac_cv_header_sys_time_h != yes; then
10944     HAVE_SYS_TIME_H=0
10945   fi
10946
10947
10948
10949
10950
10951   if test $ac_cv_header_sys_socket_h != yes; then
10952                     for ac_header in winsock2.h
10953 do :
10954   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10955 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10956   cat >>confdefs.h <<_ACEOF
10957 #define HAVE_WINSOCK2_H 1
10958 _ACEOF
10959
10960 fi
10961
10962 done
10963
10964   fi
10965   if test "$ac_cv_header_winsock2_h" = yes; then
10966     HAVE_WINSOCK2_H=1
10967     UNISTD_H_HAVE_WINSOCK2_H=1
10968     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10969   else
10970     HAVE_WINSOCK2_H=0
10971   fi
10972
10973
10974   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10975 printf %s "checking for struct timeval... " >&6; }
10976 if ${gl_cv_sys_struct_timeval+:} false; then :
10977   printf %s "(cached) " >&6
10978 else
10979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10980 /* end confdefs.h.  */
10981 #if HAVE_SYS_TIME_H
10982              #include <sys/time.h>
10983             #endif
10984             #include <time.h>
10985             #if HAVE_WINSOCK2_H
10986             # include <winsock2.h>
10987             #endif
10988
10989 int
10990 main ()
10991 {
10992 static struct timeval x; x.tv_sec = x.tv_usec;
10993   ;
10994   return 0;
10995 }
10996 _ACEOF
10997 if ac_fn_c_try_compile "$LINENO"; then :
10998   gl_cv_sys_struct_timeval=yes
10999 else
11000   gl_cv_sys_struct_timeval=no
11001 fi
11002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003
11004 fi
11005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11006 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
11007   if test $gl_cv_sys_struct_timeval != yes; then
11008     HAVE_STRUCT_TIMEVAL=0
11009   else
11010                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11011 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11012 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11013   printf %s "(cached) " >&6
11014 else
11015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11016 /* end confdefs.h.  */
11017 #if HAVE_SYS_TIME_H
11018                #include <sys/time.h>
11019               #endif
11020               #include <time.h>
11021               #if HAVE_WINSOCK2_H
11022               # include <winsock2.h>
11023               #endif
11024
11025 int
11026 main ()
11027 {
11028 static struct timeval x;
11029               typedef int verify_tv_sec_type[
11030                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11031               ];
11032
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 if ac_fn_c_try_compile "$LINENO"; then :
11038   gl_cv_sys_struct_timeval_tv_sec=yes
11039 else
11040   gl_cv_sys_struct_timeval_tv_sec=no
11041 fi
11042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11043
11044 fi
11045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11046 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11047     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11048       REPLACE_STRUCT_TIMEVAL=1
11049     fi
11050   fi
11051
11052
11053     for gl_func in gettimeofday; do
11054     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11055     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11056 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
11057 if eval \${$as_gl_Symbol+:} false; then :
11058   printf %s "(cached) " >&6
11059 else
11060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061 /* end confdefs.h.  */
11062
11063 #if HAVE_SYS_TIME_H
11064 # include <sys/time.h>
11065 #endif
11066 #include <time.h>
11067
11068 int
11069 main ()
11070 {
11071 #undef $gl_func
11072   (void) $gl_func;
11073   ;
11074   return 0;
11075 }
11076 _ACEOF
11077 if ac_fn_c_try_compile "$LINENO"; then :
11078   eval "$as_gl_Symbol=yes"
11079 else
11080   eval "$as_gl_Symbol=no"
11081 fi
11082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11083 fi
11084 eval ac_res=\$$as_gl_Symbol
11085                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11086 printf "%s\n" "$ac_res" >&6; }
11087     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11088   cat >>confdefs.h <<_ACEOF
11089 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11090 _ACEOF
11091
11092                      eval ac_cv_have_decl_$gl_func=yes
11093 fi
11094       done
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111     use_additional=yes
11112
11113   acl_save_prefix="$prefix"
11114   prefix="$acl_final_prefix"
11115   acl_save_exec_prefix="$exec_prefix"
11116   exec_prefix="$acl_final_exec_prefix"
11117
11118     eval additional_includedir=\"$includedir\"
11119     eval additional_libdir=\"$libdir\"
11120
11121   exec_prefix="$acl_save_exec_prefix"
11122   prefix="$acl_save_prefix"
11123
11124
11125 # Check whether --with-libiconv-prefix was given.
11126 if test "${with_libiconv_prefix+set}" = set; then :
11127   withval=$with_libiconv_prefix;
11128     if test "X$withval" = "Xno"; then
11129       use_additional=no
11130     else
11131       if test "X$withval" = "X"; then
11132
11133   acl_save_prefix="$prefix"
11134   prefix="$acl_final_prefix"
11135   acl_save_exec_prefix="$exec_prefix"
11136   exec_prefix="$acl_final_exec_prefix"
11137
11138           eval additional_includedir=\"$includedir\"
11139           eval additional_libdir=\"$libdir\"
11140
11141   exec_prefix="$acl_save_exec_prefix"
11142   prefix="$acl_save_prefix"
11143
11144       else
11145         additional_includedir="$withval/include"
11146         additional_libdir="$withval/$acl_libdirstem"
11147         if test "$acl_libdirstem2" != "$acl_libdirstem" \
11148            && ! test -d "$withval/$acl_libdirstem"; then
11149           additional_libdir="$withval/$acl_libdirstem2"
11150         fi
11151       fi
11152     fi
11153
11154 fi
11155
11156       LIBICONV=
11157   LTLIBICONV=
11158   INCICONV=
11159   LIBICONV_PREFIX=
11160       HAVE_LIBICONV=
11161   rpathdirs=
11162   ltrpathdirs=
11163   names_already_handled=
11164   names_next_round='iconv '
11165   while test -n "$names_next_round"; do
11166     names_this_round="$names_next_round"
11167     names_next_round=
11168     for name in $names_this_round; do
11169       already_handled=
11170       for n in $names_already_handled; do
11171         if test "$n" = "$name"; then
11172           already_handled=yes
11173           break
11174         fi
11175       done
11176       if test -z "$already_handled"; then
11177         names_already_handled="$names_already_handled $name"
11178                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11179         eval value=\"\$HAVE_LIB$uppername\"
11180         if test -n "$value"; then
11181           if test "$value" = yes; then
11182             eval value=\"\$LIB$uppername\"
11183             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11184             eval value=\"\$LTLIB$uppername\"
11185             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11186           else
11187                                     :
11188           fi
11189         else
11190                               found_dir=
11191           found_la=
11192           found_so=
11193           found_a=
11194           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
11195           if test -n "$acl_shlibext"; then
11196             shrext=".$acl_shlibext"             # typically: shrext=.so
11197           else
11198             shrext=
11199           fi
11200           if test $use_additional = yes; then
11201             dir="$additional_libdir"
11202                                     if test -n "$acl_shlibext"; then
11203               if test -f "$dir/$libname$shrext"; then
11204                 found_dir="$dir"
11205                 found_so="$dir/$libname$shrext"
11206               else
11207                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11208                   ver=`(cd "$dir" && \
11209                         for f in "$libname$shrext".*; do echo "$f"; done \
11210                         | sed -e "s,^$libname$shrext\\\\.,," \
11211                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11212                         | sed 1q ) 2>/dev/null`
11213                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11214                     found_dir="$dir"
11215                     found_so="$dir/$libname$shrext.$ver"
11216                   fi
11217                 else
11218                   eval library_names=\"$acl_library_names_spec\"
11219                   for f in $library_names; do
11220                     if test -f "$dir/$f"; then
11221                       found_dir="$dir"
11222                       found_so="$dir/$f"
11223                       break
11224                     fi
11225                   done
11226                 fi
11227               fi
11228             fi
11229                         if test "X$found_dir" = "X"; then
11230               if test -f "$dir/$libname.$acl_libext"; then
11231                 found_dir="$dir"
11232                 found_a="$dir/$libname.$acl_libext"
11233               fi
11234             fi
11235             if test "X$found_dir" != "X"; then
11236               if test -f "$dir/$libname.la"; then
11237                 found_la="$dir/$libname.la"
11238               fi
11239             fi
11240           fi
11241           if test "X$found_dir" = "X"; then
11242             for x in $LDFLAGS $LTLIBICONV; do
11243
11244   acl_save_prefix="$prefix"
11245   prefix="$acl_final_prefix"
11246   acl_save_exec_prefix="$exec_prefix"
11247   exec_prefix="$acl_final_exec_prefix"
11248   eval x=\"$x\"
11249   exec_prefix="$acl_save_exec_prefix"
11250   prefix="$acl_save_prefix"
11251
11252               case "$x" in
11253                 -L*)
11254                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11255                                     if test -n "$acl_shlibext"; then
11256                     if test -f "$dir/$libname$shrext"; then
11257                       found_dir="$dir"
11258                       found_so="$dir/$libname$shrext"
11259                     else
11260                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11261                         ver=`(cd "$dir" && \
11262                               for f in "$libname$shrext".*; do echo "$f"; done \
11263                               | sed -e "s,^$libname$shrext\\\\.,," \
11264                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11265                               | sed 1q ) 2>/dev/null`
11266                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11267                           found_dir="$dir"
11268                           found_so="$dir/$libname$shrext.$ver"
11269                         fi
11270                       else
11271                         eval library_names=\"$acl_library_names_spec\"
11272                         for f in $library_names; do
11273                           if test -f "$dir/$f"; then
11274                             found_dir="$dir"
11275                             found_so="$dir/$f"
11276                             break
11277                           fi
11278                         done
11279                       fi
11280                     fi
11281                   fi
11282                                     if test "X$found_dir" = "X"; then
11283                     if test -f "$dir/$libname.$acl_libext"; then
11284                       found_dir="$dir"
11285                       found_a="$dir/$libname.$acl_libext"
11286                     fi
11287                   fi
11288                   if test "X$found_dir" != "X"; then
11289                     if test -f "$dir/$libname.la"; then
11290                       found_la="$dir/$libname.la"
11291                     fi
11292                   fi
11293                   ;;
11294               esac
11295               if test "X$found_dir" != "X"; then
11296                 break
11297               fi
11298             done
11299           fi
11300           if test "X$found_dir" != "X"; then
11301                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11302             if test "X$found_so" != "X"; then
11303                                                         if test "$enable_rpath" = no \
11304                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11305                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11306                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11307               else
11308                                                                                 haveit=
11309                 for x in $ltrpathdirs; do
11310                   if test "X$x" = "X$found_dir"; then
11311                     haveit=yes
11312                     break
11313                   fi
11314                 done
11315                 if test -z "$haveit"; then
11316                   ltrpathdirs="$ltrpathdirs $found_dir"
11317                 fi
11318                                 if test "$acl_hardcode_direct" = yes; then
11319                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11320                 else
11321                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11322                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11323                                                             haveit=
11324                     for x in $rpathdirs; do
11325                       if test "X$x" = "X$found_dir"; then
11326                         haveit=yes
11327                         break
11328                       fi
11329                     done
11330                     if test -z "$haveit"; then
11331                       rpathdirs="$rpathdirs $found_dir"
11332                     fi
11333                   else
11334                                                                                 haveit=
11335                     for x in $LDFLAGS $LIBICONV; do
11336
11337   acl_save_prefix="$prefix"
11338   prefix="$acl_final_prefix"
11339   acl_save_exec_prefix="$exec_prefix"
11340   exec_prefix="$acl_final_exec_prefix"
11341   eval x=\"$x\"
11342   exec_prefix="$acl_save_exec_prefix"
11343   prefix="$acl_save_prefix"
11344
11345                       if test "X$x" = "X-L$found_dir"; then
11346                         haveit=yes
11347                         break
11348                       fi
11349                     done
11350                     if test -z "$haveit"; then
11351                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11352                     fi
11353                     if test "$acl_hardcode_minus_L" != no; then
11354                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11355                     else
11356                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11357                     fi
11358                   fi
11359                 fi
11360               fi
11361             else
11362               if test "X$found_a" != "X"; then
11363                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11364               else
11365                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11366               fi
11367             fi
11368                         additional_includedir=
11369             case "$found_dir" in
11370               */$acl_libdirstem | */$acl_libdirstem/)
11371                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11372                 if test "$name" = 'iconv'; then
11373                   LIBICONV_PREFIX="$basedir"
11374                 fi
11375                 additional_includedir="$basedir/include"
11376                 ;;
11377               */$acl_libdirstem2 | */$acl_libdirstem2/)
11378                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11379                 if test "$name" = 'iconv'; then
11380                   LIBICONV_PREFIX="$basedir"
11381                 fi
11382                 additional_includedir="$basedir/include"
11383                 ;;
11384             esac
11385             if test "X$additional_includedir" != "X"; then
11386                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11387                 haveit=
11388                 if test "X$additional_includedir" = "X/usr/local/include"; then
11389                   if test -n "$GCC"; then
11390                     case $host_os in
11391                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11392                     esac
11393                   fi
11394                 fi
11395                 if test -z "$haveit"; then
11396                   for x in $CPPFLAGS $INCICONV; do
11397
11398   acl_save_prefix="$prefix"
11399   prefix="$acl_final_prefix"
11400   acl_save_exec_prefix="$exec_prefix"
11401   exec_prefix="$acl_final_exec_prefix"
11402   eval x=\"$x\"
11403   exec_prefix="$acl_save_exec_prefix"
11404   prefix="$acl_save_prefix"
11405
11406                     if test "X$x" = "X-I$additional_includedir"; then
11407                       haveit=yes
11408                       break
11409                     fi
11410                   done
11411                   if test -z "$haveit"; then
11412                     if test -d "$additional_includedir"; then
11413                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11414                     fi
11415                   fi
11416                 fi
11417               fi
11418             fi
11419                         if test -n "$found_la"; then
11420                                                         save_libdir="$libdir"
11421               case "$found_la" in
11422                 */* | *\\*) . "$found_la" ;;
11423                 *) . "./$found_la" ;;
11424               esac
11425               libdir="$save_libdir"
11426                             for dep in $dependency_libs; do
11427                 case "$dep" in
11428                   -L*)
11429                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11430                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11431                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11432                       haveit=
11433                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11434                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11435                         if test -n "$GCC"; then
11436                           case $host_os in
11437                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11438                           esac
11439                         fi
11440                       fi
11441                       if test -z "$haveit"; then
11442                         haveit=
11443                         for x in $LDFLAGS $LIBICONV; do
11444
11445   acl_save_prefix="$prefix"
11446   prefix="$acl_final_prefix"
11447   acl_save_exec_prefix="$exec_prefix"
11448   exec_prefix="$acl_final_exec_prefix"
11449   eval x=\"$x\"
11450   exec_prefix="$acl_save_exec_prefix"
11451   prefix="$acl_save_prefix"
11452
11453                           if test "X$x" = "X-L$additional_libdir"; then
11454                             haveit=yes
11455                             break
11456                           fi
11457                         done
11458                         if test -z "$haveit"; then
11459                           if test -d "$additional_libdir"; then
11460                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11461                           fi
11462                         fi
11463                         haveit=
11464                         for x in $LDFLAGS $LTLIBICONV; do
11465
11466   acl_save_prefix="$prefix"
11467   prefix="$acl_final_prefix"
11468   acl_save_exec_prefix="$exec_prefix"
11469   exec_prefix="$acl_final_exec_prefix"
11470   eval x=\"$x\"
11471   exec_prefix="$acl_save_exec_prefix"
11472   prefix="$acl_save_prefix"
11473
11474                           if test "X$x" = "X-L$additional_libdir"; then
11475                             haveit=yes
11476                             break
11477                           fi
11478                         done
11479                         if test -z "$haveit"; then
11480                           if test -d "$additional_libdir"; then
11481                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11482                           fi
11483                         fi
11484                       fi
11485                     fi
11486                     ;;
11487                   -R*)
11488                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11489                     if test "$enable_rpath" != no; then
11490                                                                   haveit=
11491                       for x in $rpathdirs; do
11492                         if test "X$x" = "X$dir"; then
11493                           haveit=yes
11494                           break
11495                         fi
11496                       done
11497                       if test -z "$haveit"; then
11498                         rpathdirs="$rpathdirs $dir"
11499                       fi
11500                                                                   haveit=
11501                       for x in $ltrpathdirs; do
11502                         if test "X$x" = "X$dir"; then
11503                           haveit=yes
11504                           break
11505                         fi
11506                       done
11507                       if test -z "$haveit"; then
11508                         ltrpathdirs="$ltrpathdirs $dir"
11509                       fi
11510                     fi
11511                     ;;
11512                   -l*)
11513                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11514                     ;;
11515                   *.la)
11516                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11517                     ;;
11518                   *)
11519                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11520                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11521                     ;;
11522                 esac
11523               done
11524             fi
11525           else
11526                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11527             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11528           fi
11529         fi
11530       fi
11531     done
11532   done
11533   if test "X$rpathdirs" != "X"; then
11534     if test -n "$acl_hardcode_libdir_separator"; then
11535                         alldirs=
11536       for found_dir in $rpathdirs; do
11537         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11538       done
11539             acl_save_libdir="$libdir"
11540       libdir="$alldirs"
11541       eval flag=\"$acl_hardcode_libdir_flag_spec\"
11542       libdir="$acl_save_libdir"
11543       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11544     else
11545             for found_dir in $rpathdirs; do
11546         acl_save_libdir="$libdir"
11547         libdir="$found_dir"
11548         eval flag=\"$acl_hardcode_libdir_flag_spec\"
11549         libdir="$acl_save_libdir"
11550         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11551       done
11552     fi
11553   fi
11554   if test "X$ltrpathdirs" != "X"; then
11555             for found_dir in $ltrpathdirs; do
11556       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11557     done
11558   fi
11559
11560
11561
11562
11563
11564
11565
11566
11567   GNULIB_ICONV=0;
11568     ICONV_CONST=;
11569   REPLACE_ICONV=0;
11570   REPLACE_ICONV_OPEN=0;
11571   REPLACE_ICONV_UTF=0;
11572   ICONV_H='';
11573    if test -n "$ICONV_H"; then
11574   GL_GENERATE_ICONV_H_TRUE=
11575   GL_GENERATE_ICONV_H_FALSE='#'
11576 else
11577   GL_GENERATE_ICONV_H_TRUE='#'
11578   GL_GENERATE_ICONV_H_FALSE=
11579 fi
11580
11581
11582
11583
11584
11585
11586
11587           am_save_CPPFLAGS="$CPPFLAGS"
11588
11589   for element in $INCICONV; do
11590     haveit=
11591     for x in $CPPFLAGS; do
11592
11593   acl_save_prefix="$prefix"
11594   prefix="$acl_final_prefix"
11595   acl_save_exec_prefix="$exec_prefix"
11596   exec_prefix="$acl_final_exec_prefix"
11597   eval x=\"$x\"
11598   exec_prefix="$acl_save_exec_prefix"
11599   prefix="$acl_save_prefix"
11600
11601       if test "X$x" = "X$element"; then
11602         haveit=yes
11603         break
11604       fi
11605     done
11606     if test -z "$haveit"; then
11607       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11608     fi
11609   done
11610
11611
11612   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
11613 printf %s "checking for iconv... " >&6; }
11614 if ${am_cv_func_iconv+:} false; then :
11615   printf %s "(cached) " >&6
11616 else
11617
11618     am_cv_func_iconv="no, consider installing GNU libiconv"
11619     am_cv_lib_iconv=no
11620     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11621 /* end confdefs.h.  */
11622
11623 #include <stdlib.h>
11624 #include <iconv.h>
11625
11626 int
11627 main ()
11628 {
11629 iconv_t cd = iconv_open("","");
11630            iconv(cd,NULL,NULL,NULL,NULL);
11631            iconv_close(cd);
11632   ;
11633   return 0;
11634 }
11635 _ACEOF
11636 if ac_fn_c_try_link "$LINENO"; then :
11637   am_cv_func_iconv=yes
11638 fi
11639 rm -f core conftest.err conftest.$ac_objext \
11640     conftest$ac_exeext conftest.$ac_ext
11641     if test "$am_cv_func_iconv" != yes; then
11642       am_save_LIBS="$LIBS"
11643       LIBS="$LIBS $LIBICONV"
11644       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645 /* end confdefs.h.  */
11646
11647 #include <stdlib.h>
11648 #include <iconv.h>
11649
11650 int
11651 main ()
11652 {
11653 iconv_t cd = iconv_open("","");
11654              iconv(cd,NULL,NULL,NULL,NULL);
11655              iconv_close(cd);
11656   ;
11657   return 0;
11658 }
11659 _ACEOF
11660 if ac_fn_c_try_link "$LINENO"; then :
11661   am_cv_lib_iconv=yes
11662         am_cv_func_iconv=yes
11663 fi
11664 rm -f core conftest.err conftest.$ac_objext \
11665     conftest$ac_exeext conftest.$ac_ext
11666       LIBS="$am_save_LIBS"
11667     fi
11668
11669 fi
11670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
11671 printf "%s\n" "$am_cv_func_iconv" >&6; }
11672   if test "$am_cv_func_iconv" = yes; then
11673     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
11674 printf %s "checking for working iconv... " >&6; }
11675 if ${am_cv_func_iconv_works+:} false; then :
11676   printf %s "(cached) " >&6
11677 else
11678
11679                   am_save_LIBS="$LIBS"
11680       if test $am_cv_lib_iconv = yes; then
11681         LIBS="$LIBS $LIBICONV"
11682       fi
11683       if test "$cross_compiling" = yes; then :
11684
11685          case "$host_os" in
11686            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
11687            *)            am_cv_func_iconv_works="guessing yes" ;;
11688          esac
11689
11690 else
11691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h.  */
11693
11694 #include <iconv.h>
11695 #include <string.h>
11696 int main ()
11697 {
11698   int result = 0;
11699   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
11700      returns.  */
11701   {
11702     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
11703     if (cd_utf8_to_88591 != (iconv_t)(-1))
11704       {
11705         static const char input[] = "\342\202\254"; /* EURO SIGN */
11706         char buf[10];
11707         const char *inptr = input;
11708         size_t inbytesleft = strlen (input);
11709         char *outptr = buf;
11710         size_t outbytesleft = sizeof (buf);
11711         size_t res = iconv (cd_utf8_to_88591,
11712                             (char **) &inptr, &inbytesleft,
11713                             &outptr, &outbytesleft);
11714         if (res == 0)
11715           result |= 1;
11716         iconv_close (cd_utf8_to_88591);
11717       }
11718   }
11719   /* Test against Solaris 10 bug: Failures are not distinguishable from
11720      successful returns.  */
11721   {
11722     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
11723     if (cd_ascii_to_88591 != (iconv_t)(-1))
11724       {
11725         static const char input[] = "\263";
11726         char buf[10];
11727         const char *inptr = input;
11728         size_t inbytesleft = strlen (input);
11729         char *outptr = buf;
11730         size_t outbytesleft = sizeof (buf);
11731         size_t res = iconv (cd_ascii_to_88591,
11732                             (char **) &inptr, &inbytesleft,
11733                             &outptr, &outbytesleft);
11734         if (res == 0)
11735           result |= 2;
11736         iconv_close (cd_ascii_to_88591);
11737       }
11738   }
11739   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
11740   {
11741     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
11742     if (cd_88591_to_utf8 != (iconv_t)(-1))
11743       {
11744         static const char input[] = "\304";
11745         static char buf[2] = { (char)0xDE, (char)0xAD };
11746         const char *inptr = input;
11747         size_t inbytesleft = 1;
11748         char *outptr = buf;
11749         size_t outbytesleft = 1;
11750         size_t res = iconv (cd_88591_to_utf8,
11751                             (char **) &inptr, &inbytesleft,
11752                             &outptr, &outbytesleft);
11753         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
11754           result |= 4;
11755         iconv_close (cd_88591_to_utf8);
11756       }
11757   }
11758 #if 0 /* This bug could be worked around by the caller.  */
11759   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
11760   {
11761     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
11762     if (cd_88591_to_utf8 != (iconv_t)(-1))
11763       {
11764         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
11765         char buf[50];
11766         const char *inptr = input;
11767         size_t inbytesleft = strlen (input);
11768         char *outptr = buf;
11769         size_t outbytesleft = sizeof (buf);
11770         size_t res = iconv (cd_88591_to_utf8,
11771                             (char **) &inptr, &inbytesleft,
11772                             &outptr, &outbytesleft);
11773         if ((int)res > 0)
11774           result |= 8;
11775         iconv_close (cd_88591_to_utf8);
11776       }
11777   }
11778 #endif
11779   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
11780      provided.  */
11781   if (/* Try standardized names.  */
11782       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
11783       /* Try IRIX, OSF/1 names.  */
11784       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
11785       /* Try AIX names.  */
11786       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
11787       /* Try HP-UX names.  */
11788       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
11789     result |= 16;
11790   return result;
11791 }
11792 _ACEOF
11793 if ac_fn_c_try_run "$LINENO"; then :
11794   am_cv_func_iconv_works=yes
11795 else
11796   am_cv_func_iconv_works=no
11797 fi
11798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11799   conftest.$ac_objext conftest.beam conftest.$ac_ext
11800 fi
11801
11802       LIBS="$am_save_LIBS"
11803
11804 fi
11805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
11806 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
11807     case "$am_cv_func_iconv_works" in
11808       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
11809       *)   am_func_iconv=yes ;;
11810     esac
11811   else
11812     am_func_iconv=no am_cv_lib_iconv=no
11813   fi
11814   if test "$am_func_iconv" = yes; then
11815
11816 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
11817
11818   fi
11819   if test "$am_cv_lib_iconv" = yes; then
11820     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
11821 printf %s "checking how to link with libiconv... " >&6; }
11822     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
11823 printf "%s\n" "$LIBICONV" >&6; }
11824   else
11825             CPPFLAGS="$am_save_CPPFLAGS"
11826     LIBICONV=
11827     LTLIBICONV=
11828   fi
11829
11830
11831
11832   if test "$am_cv_func_iconv" = yes; then
11833     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
11834 printf %s "checking for iconv declaration... " >&6; }
11835     if ${am_cv_proto_iconv+:} false; then :
11836   printf %s "(cached) " >&6
11837 else
11838
11839       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840 /* end confdefs.h.  */
11841
11842 #include <stdlib.h>
11843 #include <iconv.h>
11844 extern
11845 #ifdef __cplusplus
11846 "C"
11847 #endif
11848 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
11849 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11850 #else
11851 size_t iconv();
11852 #endif
11853
11854 int
11855 main ()
11856 {
11857
11858   ;
11859   return 0;
11860 }
11861 _ACEOF
11862 if ac_fn_c_try_compile "$LINENO"; then :
11863   am_cv_proto_iconv_arg1=""
11864 else
11865   am_cv_proto_iconv_arg1="const"
11866 fi
11867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868       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);"
11869 fi
11870
11871     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11872     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
11873          $am_cv_proto_iconv" >&5
11874 printf "%s\n" "
11875          $am_cv_proto_iconv" >&6; }
11876
11877 cat >>confdefs.h <<_ACEOF
11878 #define ICONV_CONST $am_cv_proto_iconv_arg1
11879 _ACEOF
11880
11881
11882        if test -n "$am_cv_proto_iconv_arg1"; then
11883          ICONV_CONST="const"
11884        fi
11885
11886   fi
11887
11888
11889
11890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11891 printf %s "checking for inline... " >&6; }
11892 if ${ac_cv_c_inline+:} false; then :
11893   printf %s "(cached) " >&6
11894 else
11895   ac_cv_c_inline=no
11896 for ac_kw in inline __inline__ __inline; do
11897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898 /* end confdefs.h.  */
11899 #ifndef __cplusplus
11900 typedef int foo_t;
11901 static $ac_kw foo_t static_foo () {return 0; }
11902 $ac_kw foo_t foo () {return 0; }
11903 #endif
11904
11905 _ACEOF
11906 if ac_fn_c_try_compile "$LINENO"; then :
11907   ac_cv_c_inline=$ac_kw
11908 fi
11909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11910   test "$ac_cv_c_inline" != no && break
11911 done
11912
11913 fi
11914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11915 printf "%s\n" "$ac_cv_c_inline" >&6; }
11916
11917 case $ac_cv_c_inline in
11918   inline | yes) ;;
11919   *)
11920     case $ac_cv_c_inline in
11921       no) ac_val=;;
11922       *) ac_val=$ac_cv_c_inline;;
11923     esac
11924     cat >>confdefs.h <<_ACEOF
11925 #ifndef __cplusplus
11926 #define inline $ac_val
11927 #endif
11928 _ACEOF
11929     ;;
11930 esac
11931
11932 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11933 if test "x$ac_cv_type_off_t" = xyes; then :
11934
11935 else
11936
11937 cat >>confdefs.h <<_ACEOF
11938 #define off_t long int
11939 _ACEOF
11940
11941 fi
11942
11943
11944   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11945 printf %s "checking for unsigned long long int... " >&6; }
11946 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11947   printf %s "(cached) " >&6
11948 else
11949   ac_cv_type_unsigned_long_long_int=yes
11950      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11951        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h.  */
11953
11954   /* For now, do not test the preprocessor; as of 2007 there are too many
11955          implementations with broken preprocessors.  Perhaps this can
11956          be revisited in 2012.  In the meantime, code should not expect
11957          #if to work with literals wider than 32 bits.  */
11958       /* Test literals.  */
11959       long long int ll = 9223372036854775807ll;
11960       long long int nll = -9223372036854775807LL;
11961       unsigned long long int ull = 18446744073709551615ULL;
11962       /* Test constant expressions.   */
11963       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11964                      ? 1 : -1)];
11965       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11966                      ? 1 : -1)];
11967       int i = 63;
11968 int
11969 main ()
11970 {
11971 /* Test availability of runtime routines for shift and division.  */
11972       long long int llmax = 9223372036854775807ll;
11973       unsigned long long int ullmax = 18446744073709551615ull;
11974       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11975               | (llmax / ll) | (llmax % ll)
11976               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11977               | (ullmax / ull) | (ullmax % ull));
11978   ;
11979   return 0;
11980 }
11981
11982 _ACEOF
11983 if ac_fn_c_try_link "$LINENO"; then :
11984
11985 else
11986   ac_cv_type_unsigned_long_long_int=no
11987 fi
11988 rm -f core conftest.err conftest.$ac_objext \
11989     conftest$ac_exeext conftest.$ac_ext
11990      fi
11991 fi
11992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11993 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
11994   if test $ac_cv_type_unsigned_long_long_int = yes; then
11995
11996 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11997
11998   fi
11999
12000
12001
12002   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12003 printf %s "checking for long long int... " >&6; }
12004 if ${ac_cv_type_long_long_int+:} false; then :
12005   printf %s "(cached) " >&6
12006 else
12007   ac_cv_type_long_long_int=yes
12008       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12009         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12010         if test $ac_cv_type_long_long_int = yes; then
12011                                         if test "$cross_compiling" = yes; then :
12012   :
12013 else
12014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h.  */
12016 #include <limits.h>
12017                  #ifndef LLONG_MAX
12018                  # define HALF \
12019                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12020                  # define LLONG_MAX (HALF - 1 + HALF)
12021                  #endif
12022 int
12023 main ()
12024 {
12025 long long int n = 1;
12026                  int i;
12027                  for (i = 0; ; i++)
12028                    {
12029                      long long int m = n << i;
12030                      if (m >> i != n)
12031                        return 1;
12032                      if (LLONG_MAX / 2 < m)
12033                        break;
12034                    }
12035                  return 0;
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 if ac_fn_c_try_run "$LINENO"; then :
12041
12042 else
12043   ac_cv_type_long_long_int=no
12044 fi
12045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046   conftest.$ac_objext conftest.beam conftest.$ac_ext
12047 fi
12048
12049         fi
12050       fi
12051 fi
12052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12053 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
12054   if test $ac_cv_type_long_long_int = yes; then
12055
12056 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12057
12058   fi
12059
12060
12061
12062
12063
12064
12065     gl_cv_c_multiarch=no
12066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12067 /* end confdefs.h.  */
12068 #ifndef __APPLE_CC__
12069          not a universal capable compiler
12070         #endif
12071         typedef int dummy;
12072
12073 _ACEOF
12074 if ac_fn_c_try_compile "$LINENO"; then :
12075
12076                arch=
12077      prev=
12078      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12079        if test -n "$prev"; then
12080          case $word in
12081            i?86 | x86_64 | ppc | ppc64)
12082              if test -z "$arch" || test "$arch" = "$word"; then
12083                arch="$word"
12084              else
12085                gl_cv_c_multiarch=yes
12086              fi
12087              ;;
12088          esac
12089          prev=
12090        else
12091          if test "x$word" = "x-arch"; then
12092            prev=arch
12093          fi
12094        fi
12095      done
12096
12097 fi
12098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12099   if test $gl_cv_c_multiarch = yes; then
12100     APPLE_UNIVERSAL_BUILD=1
12101   else
12102     APPLE_UNIVERSAL_BUILD=0
12103   fi
12104
12105
12106
12107
12108
12109   if test $ac_cv_type_long_long_int = yes; then
12110     HAVE_LONG_LONG_INT=1
12111   else
12112     HAVE_LONG_LONG_INT=0
12113   fi
12114
12115
12116   if test $ac_cv_type_unsigned_long_long_int = yes; then
12117     HAVE_UNSIGNED_LONG_LONG_INT=1
12118   else
12119     HAVE_UNSIGNED_LONG_LONG_INT=0
12120   fi
12121
12122
12123
12124   if test $ac_cv_header_wchar_h = yes; then
12125     HAVE_WCHAR_H=1
12126   else
12127     HAVE_WCHAR_H=0
12128   fi
12129
12130
12131       if test $ac_cv_header_inttypes_h = yes; then
12132     HAVE_INTTYPES_H=1
12133   else
12134     HAVE_INTTYPES_H=0
12135   fi
12136
12137
12138       if test $ac_cv_header_sys_types_h = yes; then
12139     HAVE_SYS_TYPES_H=1
12140   else
12141     HAVE_SYS_TYPES_H=0
12142   fi
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154      if test $gl_cv_have_include_next = yes; then
12155        gl_cv_next_stdint_h='<'stdint.h'>'
12156      else
12157        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12158 printf %s "checking absolute name of <stdint.h>... " >&6; }
12159 if ${gl_cv_next_stdint_h+:} false; then :
12160   printf %s "(cached) " >&6
12161 else
12162
12163              if test $ac_cv_header_stdint_h = yes; then
12164
12165
12166                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167 /* end confdefs.h.  */
12168 #include <stdint.h>
12169
12170 _ACEOF
12171                                                                                                                         case "$host_os" in
12172                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12173                  *)    gl_absname_cpp="$ac_cpp" ;;
12174                esac
12175
12176                case "$host_os" in
12177                  mingw*)
12178                                                                                                                                      gl_dirsep_regex='[/\\]'
12179                    ;;
12180                  *)
12181                    gl_dirsep_regex='\/'
12182                    ;;
12183                esac
12184                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12185
12186                gl_header_literal_regex=`echo 'stdint.h' \
12187                                         | sed -e "$gl_make_literal_regex_sed"`
12188                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12189                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12190                    s|^/[^/]|//&|
12191                    p
12192                    q
12193                  }'
12194                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12195                       sed -n "$gl_absolute_header_sed"`'"'
12196           else
12197                gl_cv_next_stdint_h='<'stdint.h'>'
12198              fi
12199
12200
12201 fi
12202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12203 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
12204      fi
12205      NEXT_STDINT_H=$gl_cv_next_stdint_h
12206
12207      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12208        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12209        gl_next_as_first_directive='<'stdint.h'>'
12210      else
12211        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12212        gl_next_as_first_directive=$gl_cv_next_stdint_h
12213      fi
12214      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12215
12216
12217
12218
12219   if test $ac_cv_header_stdint_h = yes; then
12220     HAVE_STDINT_H=1
12221   else
12222     HAVE_STDINT_H=0
12223   fi
12224
12225
12226     if test $ac_cv_header_stdint_h = yes; then
12227     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12228 printf %s "checking whether stdint.h conforms to C99... " >&6; }
12229 if ${gl_cv_header_working_stdint_h+:} false; then :
12230   printf %s "(cached) " >&6
12231 else
12232   gl_cv_header_working_stdint_h=no
12233        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12234 /* end confdefs.h.  */
12235
12236
12237 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12238 #include <stdint.h>
12239 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12240 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12241 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12242 #endif
12243
12244
12245   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12246      included before <wchar.h>.  */
12247   #include <stddef.h>
12248   #include <signal.h>
12249   #if HAVE_WCHAR_H
12250   # include <stdio.h>
12251   # include <time.h>
12252   # include <wchar.h>
12253   #endif
12254
12255
12256 #ifdef INT8_MAX
12257 int8_t a1 = INT8_MAX;
12258 int8_t a1min = INT8_MIN;
12259 #endif
12260 #ifdef INT16_MAX
12261 int16_t a2 = INT16_MAX;
12262 int16_t a2min = INT16_MIN;
12263 #endif
12264 #ifdef INT32_MAX
12265 int32_t a3 = INT32_MAX;
12266 int32_t a3min = INT32_MIN;
12267 #endif
12268 #ifdef INT64_MAX
12269 int64_t a4 = INT64_MAX;
12270 int64_t a4min = INT64_MIN;
12271 #endif
12272 #ifdef UINT8_MAX
12273 uint8_t b1 = UINT8_MAX;
12274 #else
12275 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12276 #endif
12277 #ifdef UINT16_MAX
12278 uint16_t b2 = UINT16_MAX;
12279 #endif
12280 #ifdef UINT32_MAX
12281 uint32_t b3 = UINT32_MAX;
12282 #endif
12283 #ifdef UINT64_MAX
12284 uint64_t b4 = UINT64_MAX;
12285 #endif
12286 int_least8_t c1 = INT8_C (0x7f);
12287 int_least8_t c1max = INT_LEAST8_MAX;
12288 int_least8_t c1min = INT_LEAST8_MIN;
12289 int_least16_t c2 = INT16_C (0x7fff);
12290 int_least16_t c2max = INT_LEAST16_MAX;
12291 int_least16_t c2min = INT_LEAST16_MIN;
12292 int_least32_t c3 = INT32_C (0x7fffffff);
12293 int_least32_t c3max = INT_LEAST32_MAX;
12294 int_least32_t c3min = INT_LEAST32_MIN;
12295 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12296 int_least64_t c4max = INT_LEAST64_MAX;
12297 int_least64_t c4min = INT_LEAST64_MIN;
12298 uint_least8_t d1 = UINT8_C (0xff);
12299 uint_least8_t d1max = UINT_LEAST8_MAX;
12300 uint_least16_t d2 = UINT16_C (0xffff);
12301 uint_least16_t d2max = UINT_LEAST16_MAX;
12302 uint_least32_t d3 = UINT32_C (0xffffffff);
12303 uint_least32_t d3max = UINT_LEAST32_MAX;
12304 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12305 uint_least64_t d4max = UINT_LEAST64_MAX;
12306 int_fast8_t e1 = INT_FAST8_MAX;
12307 int_fast8_t e1min = INT_FAST8_MIN;
12308 int_fast16_t e2 = INT_FAST16_MAX;
12309 int_fast16_t e2min = INT_FAST16_MIN;
12310 int_fast32_t e3 = INT_FAST32_MAX;
12311 int_fast32_t e3min = INT_FAST32_MIN;
12312 int_fast64_t e4 = INT_FAST64_MAX;
12313 int_fast64_t e4min = INT_FAST64_MIN;
12314 uint_fast8_t f1 = UINT_FAST8_MAX;
12315 uint_fast16_t f2 = UINT_FAST16_MAX;
12316 uint_fast32_t f3 = UINT_FAST32_MAX;
12317 uint_fast64_t f4 = UINT_FAST64_MAX;
12318 #ifdef INTPTR_MAX
12319 intptr_t g = INTPTR_MAX;
12320 intptr_t gmin = INTPTR_MIN;
12321 #endif
12322 #ifdef UINTPTR_MAX
12323 uintptr_t h = UINTPTR_MAX;
12324 #endif
12325 intmax_t i = INTMAX_MAX;
12326 uintmax_t j = UINTMAX_MAX;
12327
12328 #include <limits.h> /* for CHAR_BIT */
12329 #define TYPE_MINIMUM(t) \
12330   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12331 #define TYPE_MAXIMUM(t) \
12332   ((t) ((t) 0 < (t) -1 \
12333         ? (t) -1 \
12334         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12335 struct s {
12336   int check_PTRDIFF:
12337       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12338       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12339       ? 1 : -1;
12340   /* Detect bug in FreeBSD 6.0 / ia64.  */
12341   int check_SIG_ATOMIC:
12342       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12343       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12344       ? 1 : -1;
12345   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12346   int check_WCHAR:
12347       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12348       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12349       ? 1 : -1;
12350   /* Detect bug in mingw.  */
12351   int check_WINT:
12352       WINT_MIN == TYPE_MINIMUM (wint_t)
12353       && WINT_MAX == TYPE_MAXIMUM (wint_t)
12354       ? 1 : -1;
12355
12356   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12357   int check_UINT8_C:
12358         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12359   int check_UINT16_C:
12360         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12361
12362   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12363 #ifdef UINT8_MAX
12364   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12365 #endif
12366 #ifdef UINT16_MAX
12367   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12368 #endif
12369 #ifdef UINT32_MAX
12370   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12371 #endif
12372 #ifdef UINT64_MAX
12373   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12374 #endif
12375   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12376   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12377   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12378   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12379   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12380   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12381   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12382   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12383   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12384   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12385   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12386 };
12387
12388 int
12389 main ()
12390 {
12391
12392   ;
12393   return 0;
12394 }
12395 _ACEOF
12396 if ac_fn_c_try_compile "$LINENO"; then :
12397                                                     if test "$cross_compiling" = yes; then :
12398                  gl_cv_header_working_stdint_h=yes
12399
12400 else
12401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12402 /* end confdefs.h.  */
12403
12404
12405 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12406 #include <stdint.h>
12407
12408
12409   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12410      included before <wchar.h>.  */
12411   #include <stddef.h>
12412   #include <signal.h>
12413   #if HAVE_WCHAR_H
12414   # include <stdio.h>
12415   # include <time.h>
12416   # include <wchar.h>
12417   #endif
12418
12419
12420 #include <stdio.h>
12421 #include <string.h>
12422 #define MVAL(macro) MVAL1(macro)
12423 #define MVAL1(expression) #expression
12424 static const char *macro_values[] =
12425   {
12426 #ifdef INT8_MAX
12427     MVAL (INT8_MAX),
12428 #endif
12429 #ifdef INT16_MAX
12430     MVAL (INT16_MAX),
12431 #endif
12432 #ifdef INT32_MAX
12433     MVAL (INT32_MAX),
12434 #endif
12435 #ifdef INT64_MAX
12436     MVAL (INT64_MAX),
12437 #endif
12438 #ifdef UINT8_MAX
12439     MVAL (UINT8_MAX),
12440 #endif
12441 #ifdef UINT16_MAX
12442     MVAL (UINT16_MAX),
12443 #endif
12444 #ifdef UINT32_MAX
12445     MVAL (UINT32_MAX),
12446 #endif
12447 #ifdef UINT64_MAX
12448     MVAL (UINT64_MAX),
12449 #endif
12450     NULL
12451   };
12452
12453 int
12454 main ()
12455 {
12456
12457   const char **mv;
12458   for (mv = macro_values; *mv != NULL; mv++)
12459     {
12460       const char *value = *mv;
12461       /* Test whether it looks like a cast expression.  */
12462       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12463           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12464           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12465           || strncmp (value, "((int)"/*)*/, 6) == 0
12466           || strncmp (value, "((signed short)"/*)*/, 15) == 0
12467           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12468         return mv - macro_values + 1;
12469     }
12470   return 0;
12471
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 if ac_fn_c_try_run "$LINENO"; then :
12477   gl_cv_header_working_stdint_h=yes
12478 fi
12479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12480   conftest.$ac_objext conftest.beam conftest.$ac_ext
12481 fi
12482
12483
12484 fi
12485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12486
12487 fi
12488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12489 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
12490   fi
12491   if test "$gl_cv_header_working_stdint_h" = yes; then
12492     STDINT_H=
12493   else
12494             for ac_header in sys/inttypes.h sys/bitypes.h
12495 do :
12496   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
12497 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12498 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12499   cat >>confdefs.h <<_ACEOF
12500 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
12501 _ACEOF
12502
12503 fi
12504
12505 done
12506
12507     if test $ac_cv_header_sys_inttypes_h = yes; then
12508       HAVE_SYS_INTTYPES_H=1
12509     else
12510       HAVE_SYS_INTTYPES_H=0
12511     fi
12512
12513     if test $ac_cv_header_sys_bitypes_h = yes; then
12514       HAVE_SYS_BITYPES_H=1
12515     else
12516       HAVE_SYS_BITYPES_H=0
12517     fi
12518
12519
12520
12521
12522   if test $APPLE_UNIVERSAL_BUILD = 0; then
12523
12524
12525   for gltype in ptrdiff_t size_t ; do
12526     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12527 printf %s "checking for bit size of $gltype... " >&6; }
12528 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12529   printf %s "(cached) " >&6
12530 else
12531   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12532   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12533      included before <wchar.h>.  */
12534   #include <stddef.h>
12535   #include <signal.h>
12536   #if HAVE_WCHAR_H
12537   # include <stdio.h>
12538   # include <time.h>
12539   # include <wchar.h>
12540   #endif
12541
12542 #include <limits.h>"; then :
12543
12544 else
12545   result=unknown
12546 fi
12547
12548        eval gl_cv_bitsizeof_${gltype}=\$result
12549
12550 fi
12551 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12552                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12553 printf "%s\n" "$ac_res" >&6; }
12554     eval result=\$gl_cv_bitsizeof_${gltype}
12555     if test $result = unknown; then
12556                                                 result=0
12557     fi
12558     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12559     cat >>confdefs.h <<_ACEOF
12560 #define BITSIZEOF_${GLTYPE} $result
12561 _ACEOF
12562
12563     eval BITSIZEOF_${GLTYPE}=\$result
12564   done
12565
12566
12567   fi
12568
12569
12570   for gltype in sig_atomic_t wchar_t wint_t ; do
12571     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12572 printf %s "checking for bit size of $gltype... " >&6; }
12573 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12574   printf %s "(cached) " >&6
12575 else
12576   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12577   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12578      included before <wchar.h>.  */
12579   #include <stddef.h>
12580   #include <signal.h>
12581   #if HAVE_WCHAR_H
12582   # include <stdio.h>
12583   # include <time.h>
12584   # include <wchar.h>
12585   #endif
12586
12587 #include <limits.h>"; then :
12588
12589 else
12590   result=unknown
12591 fi
12592
12593        eval gl_cv_bitsizeof_${gltype}=\$result
12594
12595 fi
12596 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12597                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12598 printf "%s\n" "$ac_res" >&6; }
12599     eval result=\$gl_cv_bitsizeof_${gltype}
12600     if test $result = unknown; then
12601                                                 result=0
12602     fi
12603     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12604     cat >>confdefs.h <<_ACEOF
12605 #define BITSIZEOF_${GLTYPE} $result
12606 _ACEOF
12607
12608     eval BITSIZEOF_${GLTYPE}=\$result
12609   done
12610
12611
12612
12613
12614   for gltype in sig_atomic_t wchar_t wint_t ; do
12615     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12616 printf %s "checking whether $gltype is signed... " >&6; }
12617 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12618   printf %s "(cached) " >&6
12619 else
12620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621 /* end confdefs.h.  */
12622
12623   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12624      included before <wchar.h>.  */
12625   #include <stddef.h>
12626   #include <signal.h>
12627   #if HAVE_WCHAR_H
12628   # include <stdio.h>
12629   # include <time.h>
12630   # include <wchar.h>
12631   #endif
12632
12633             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12634 int
12635 main ()
12636 {
12637
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 if ac_fn_c_try_compile "$LINENO"; then :
12643   result=yes
12644 else
12645   result=no
12646 fi
12647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12648        eval gl_cv_type_${gltype}_signed=\$result
12649
12650 fi
12651 eval ac_res=\$gl_cv_type_${gltype}_signed
12652                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12653 printf "%s\n" "$ac_res" >&6; }
12654     eval result=\$gl_cv_type_${gltype}_signed
12655     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12656     if test "$result" = yes; then
12657       cat >>confdefs.h <<_ACEOF
12658 #define HAVE_SIGNED_${GLTYPE} 1
12659 _ACEOF
12660
12661       eval HAVE_SIGNED_${GLTYPE}=1
12662     else
12663       eval HAVE_SIGNED_${GLTYPE}=0
12664     fi
12665   done
12666
12667
12668   gl_cv_type_ptrdiff_t_signed=yes
12669   gl_cv_type_size_t_signed=no
12670   if test $APPLE_UNIVERSAL_BUILD = 0; then
12671
12672
12673   for gltype in ptrdiff_t size_t ; do
12674     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12675 printf %s "checking for $gltype integer literal suffix... " >&6; }
12676 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12677   printf %s "(cached) " >&6
12678 else
12679   eval gl_cv_type_${gltype}_suffix=no
12680        eval result=\$gl_cv_type_${gltype}_signed
12681        if test "$result" = yes; then
12682          glsufu=
12683        else
12684          glsufu=u
12685        fi
12686        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12687          case $glsuf in
12688            '')  gltype1='int';;
12689            l)   gltype1='long int';;
12690            ll)  gltype1='long long int';;
12691            i64) gltype1='__int64';;
12692            u)   gltype1='unsigned int';;
12693            ul)  gltype1='unsigned long int';;
12694            ull) gltype1='unsigned long long int';;
12695            ui64)gltype1='unsigned __int64';;
12696          esac
12697          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698 /* end confdefs.h.  */
12699
12700   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12701      included before <wchar.h>.  */
12702   #include <stddef.h>
12703   #include <signal.h>
12704   #if HAVE_WCHAR_H
12705   # include <stdio.h>
12706   # include <time.h>
12707   # include <wchar.h>
12708   #endif
12709
12710               extern $gltype foo;
12711               extern $gltype1 foo;
12712 int
12713 main ()
12714 {
12715
12716   ;
12717   return 0;
12718 }
12719 _ACEOF
12720 if ac_fn_c_try_compile "$LINENO"; then :
12721   eval gl_cv_type_${gltype}_suffix=\$glsuf
12722 fi
12723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12724          eval result=\$gl_cv_type_${gltype}_suffix
12725          test "$result" != no && break
12726        done
12727 fi
12728 eval ac_res=\$gl_cv_type_${gltype}_suffix
12729                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12730 printf "%s\n" "$ac_res" >&6; }
12731     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12732     eval result=\$gl_cv_type_${gltype}_suffix
12733     test "$result" = no && result=
12734     eval ${GLTYPE}_SUFFIX=\$result
12735     cat >>confdefs.h <<_ACEOF
12736 #define ${GLTYPE}_SUFFIX $result
12737 _ACEOF
12738
12739   done
12740
12741
12742   fi
12743
12744
12745   for gltype in sig_atomic_t wchar_t wint_t ; do
12746     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12747 printf %s "checking for $gltype integer literal suffix... " >&6; }
12748 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12749   printf %s "(cached) " >&6
12750 else
12751   eval gl_cv_type_${gltype}_suffix=no
12752        eval result=\$gl_cv_type_${gltype}_signed
12753        if test "$result" = yes; then
12754          glsufu=
12755        else
12756          glsufu=u
12757        fi
12758        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12759          case $glsuf in
12760            '')  gltype1='int';;
12761            l)   gltype1='long int';;
12762            ll)  gltype1='long long int';;
12763            i64) gltype1='__int64';;
12764            u)   gltype1='unsigned int';;
12765            ul)  gltype1='unsigned long int';;
12766            ull) gltype1='unsigned long long int';;
12767            ui64)gltype1='unsigned __int64';;
12768          esac
12769          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12770 /* end confdefs.h.  */
12771
12772   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12773      included before <wchar.h>.  */
12774   #include <stddef.h>
12775   #include <signal.h>
12776   #if HAVE_WCHAR_H
12777   # include <stdio.h>
12778   # include <time.h>
12779   # include <wchar.h>
12780   #endif
12781
12782               extern $gltype foo;
12783               extern $gltype1 foo;
12784 int
12785 main ()
12786 {
12787
12788   ;
12789   return 0;
12790 }
12791 _ACEOF
12792 if ac_fn_c_try_compile "$LINENO"; then :
12793   eval gl_cv_type_${gltype}_suffix=\$glsuf
12794 fi
12795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12796          eval result=\$gl_cv_type_${gltype}_suffix
12797          test "$result" != no && break
12798        done
12799 fi
12800 eval ac_res=\$gl_cv_type_${gltype}_suffix
12801                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12802 printf "%s\n" "$ac_res" >&6; }
12803     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12804     eval result=\$gl_cv_type_${gltype}_suffix
12805     test "$result" = no && result=
12806     eval ${GLTYPE}_SUFFIX=\$result
12807     cat >>confdefs.h <<_ACEOF
12808 #define ${GLTYPE}_SUFFIX $result
12809 _ACEOF
12810
12811   done
12812
12813
12814
12815           if test $BITSIZEOF_WINT_T -lt 32; then
12816     BITSIZEOF_WINT_T=32
12817   fi
12818
12819     STDINT_H=stdint.h
12820   fi
12821
12822    if test -n "$STDINT_H"; then
12823   GL_GENERATE_STDINT_H_TRUE=
12824   GL_GENERATE_STDINT_H_FALSE='#'
12825 else
12826   GL_GENERATE_STDINT_H_TRUE='#'
12827   GL_GENERATE_STDINT_H_FALSE=
12828 fi
12829
12830
12831
12832
12833
12834   GNULIB_IMAXABS=0;
12835   GNULIB_IMAXDIV=0;
12836   GNULIB_STRTOIMAX=0;
12837   GNULIB_STRTOUMAX=0;
12838     HAVE_DECL_IMAXABS=1;
12839   HAVE_DECL_IMAXDIV=1;
12840   HAVE_DECL_STRTOIMAX=1;
12841   HAVE_DECL_STRTOUMAX=1;
12842   REPLACE_STRTOIMAX=0;
12843   INT32_MAX_LT_INTMAX_MAX=1;
12844   INT64_MAX_EQ_LONG_MAX='defined _LP64';
12845   PRI_MACROS_BROKEN=0;
12846   PRIPTR_PREFIX=__PRIPTR_PREFIX;
12847   UINT32_MAX_LT_UINTMAX_MAX=1;
12848   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864      if test $gl_cv_have_include_next = yes; then
12865        gl_cv_next_inttypes_h='<'inttypes.h'>'
12866      else
12867        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
12868 printf %s "checking absolute name of <inttypes.h>... " >&6; }
12869 if ${gl_cv_next_inttypes_h+:} false; then :
12870   printf %s "(cached) " >&6
12871 else
12872
12873              if test $ac_cv_header_inttypes_h = yes; then
12874
12875
12876                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877 /* end confdefs.h.  */
12878 #include <inttypes.h>
12879
12880 _ACEOF
12881                                                                                                                         case "$host_os" in
12882                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12883                  *)    gl_absname_cpp="$ac_cpp" ;;
12884                esac
12885
12886                case "$host_os" in
12887                  mingw*)
12888                                                                                                                                      gl_dirsep_regex='[/\\]'
12889                    ;;
12890                  *)
12891                    gl_dirsep_regex='\/'
12892                    ;;
12893                esac
12894                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12895
12896                gl_header_literal_regex=`echo 'inttypes.h' \
12897                                         | sed -e "$gl_make_literal_regex_sed"`
12898                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12899                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12900                    s|^/[^/]|//&|
12901                    p
12902                    q
12903                  }'
12904                                                             gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12905                       sed -n "$gl_absolute_header_sed"`'"'
12906           else
12907                gl_cv_next_inttypes_h='<'inttypes.h'>'
12908              fi
12909
12910
12911 fi
12912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
12913 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
12914      fi
12915      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
12916
12917      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12918        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12919        gl_next_as_first_directive='<'inttypes.h'>'
12920      else
12921        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12922        gl_next_as_first_directive=$gl_cv_next_inttypes_h
12923      fi
12924      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
12925
12926
12927
12928
12929
12930
12931
12932
12933     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
12934     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12935     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12936 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
12937 if eval \${$as_gl_Symbol+:} false; then :
12938   printf %s "(cached) " >&6
12939 else
12940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12941 /* end confdefs.h.  */
12942 #include <inttypes.h>
12943
12944 int
12945 main ()
12946 {
12947 #undef $gl_func
12948   (void) $gl_func;
12949   ;
12950   return 0;
12951 }
12952 _ACEOF
12953 if ac_fn_c_try_compile "$LINENO"; then :
12954   eval "$as_gl_Symbol=yes"
12955 else
12956   eval "$as_gl_Symbol=no"
12957 fi
12958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12959 fi
12960 eval ac_res=\$$as_gl_Symbol
12961                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12962 printf "%s\n" "$ac_res" >&6; }
12963     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12964   cat >>confdefs.h <<_ACEOF
12965 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12966 _ACEOF
12967
12968                      eval ac_cv_have_decl_$gl_func=yes
12969 fi
12970       done
12971
12972
12973
12974   for ac_header in inttypes.h
12975 do :
12976   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12977 if test "x$ac_cv_header_inttypes_h" = xyes; then :
12978   cat >>confdefs.h <<_ACEOF
12979 #define HAVE_INTTYPES_H 1
12980 _ACEOF
12981
12982 fi
12983
12984 done
12985
12986   if test $ac_cv_header_inttypes_h = yes; then
12987     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
12988 printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
12989 if ${gt_cv_inttypes_pri_broken+:} false; then :
12990   printf %s "(cached) " >&6
12991 else
12992
12993         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12994 /* end confdefs.h.  */
12995
12996 #include <inttypes.h>
12997 #ifdef PRId32
12998 char *p = PRId32;
12999 #endif
13000
13001 int
13002 main ()
13003 {
13004
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 if ac_fn_c_try_compile "$LINENO"; then :
13010   gt_cv_inttypes_pri_broken=no
13011 else
13012   gt_cv_inttypes_pri_broken=yes
13013 fi
13014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13015
13016 fi
13017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13018 printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
13019   fi
13020   if test "$gt_cv_inttypes_pri_broken" = yes; then
13021
13022 cat >>confdefs.h <<_ACEOF
13023 #define PRI_MACROS_BROKEN 1
13024 _ACEOF
13025
13026     PRI_MACROS_BROKEN=1
13027   else
13028     PRI_MACROS_BROKEN=0
13029   fi
13030
13031
13032
13033   GNULIB_ISWBLANK=0;
13034   GNULIB_WCTYPE=0;
13035   GNULIB_ISWCTYPE=0;
13036   GNULIB_WCTRANS=0;
13037   GNULIB_TOWCTRANS=0;
13038     HAVE_ISWBLANK=1;
13039   HAVE_WCTYPE_T=1;
13040   HAVE_WCTRANS_T=1;
13041   REPLACE_ISWBLANK=0;
13042
13043
13044
13045
13046   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13047 printf %s "checking for wint_t... " >&6; }
13048 if ${gt_cv_c_wint_t+:} false; then :
13049   printf %s "(cached) " >&6
13050 else
13051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13052 /* end confdefs.h.  */
13053
13054 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13055    <wchar.h>.
13056    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13057    before <wchar.h>.  */
13058 #include <stddef.h>
13059 #include <stdio.h>
13060 #include <time.h>
13061 #include <wchar.h>
13062             wint_t foo = (wchar_t)'\0';
13063 int
13064 main ()
13065 {
13066
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 if ac_fn_c_try_compile "$LINENO"; then :
13072   gt_cv_c_wint_t=yes
13073 else
13074   gt_cv_c_wint_t=no
13075 fi
13076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077 fi
13078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13079 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
13080   if test $gt_cv_c_wint_t = yes; then
13081
13082 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
13083
13084   fi
13085
13086
13087
13088
13089
13090
13091   if test $ac_cv_func_iswcntrl = yes; then
13092     HAVE_ISWCNTRL=1
13093   else
13094     HAVE_ISWCNTRL=0
13095   fi
13096
13097
13098
13099   if test $gt_cv_c_wint_t = yes; then
13100     HAVE_WINT_T=1
13101   else
13102     HAVE_WINT_T=0
13103   fi
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115      if test $gl_cv_have_include_next = yes; then
13116        gl_cv_next_wctype_h='<'wctype.h'>'
13117      else
13118        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13119 printf %s "checking absolute name of <wctype.h>... " >&6; }
13120 if ${gl_cv_next_wctype_h+:} false; then :
13121   printf %s "(cached) " >&6
13122 else
13123
13124              if test $ac_cv_header_wctype_h = yes; then
13125
13126
13127                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128 /* end confdefs.h.  */
13129 #include <wctype.h>
13130
13131 _ACEOF
13132                                                                                                                         case "$host_os" in
13133                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13134                  *)    gl_absname_cpp="$ac_cpp" ;;
13135                esac
13136
13137                case "$host_os" in
13138                  mingw*)
13139                                                                                                                                      gl_dirsep_regex='[/\\]'
13140                    ;;
13141                  *)
13142                    gl_dirsep_regex='\/'
13143                    ;;
13144                esac
13145                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13146
13147                gl_header_literal_regex=`echo 'wctype.h' \
13148                                         | sed -e "$gl_make_literal_regex_sed"`
13149                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13150                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13151                    s|^/[^/]|//&|
13152                    p
13153                    q
13154                  }'
13155                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13156                       sed -n "$gl_absolute_header_sed"`'"'
13157           else
13158                gl_cv_next_wctype_h='<'wctype.h'>'
13159              fi
13160
13161
13162 fi
13163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13164 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
13165      fi
13166      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13167
13168      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13169        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13170        gl_next_as_first_directive='<'wctype.h'>'
13171      else
13172        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13173        gl_next_as_first_directive=$gl_cv_next_wctype_h
13174      fi
13175      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13176
13177
13178
13179
13180   if test $ac_cv_header_wctype_h = yes; then
13181     if test $ac_cv_func_iswcntrl = yes; then
13182                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13183 printf %s "checking whether iswcntrl works... " >&6; }
13184 if ${gl_cv_func_iswcntrl_works+:} false; then :
13185   printf %s "(cached) " >&6
13186 else
13187
13188           if test "$cross_compiling" = yes; then :
13189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190 /* end confdefs.h.  */
13191 #include <stdlib.h>
13192                           #if __GNU_LIBRARY__ == 1
13193                           Linux libc5 i18n is broken.
13194                           #endif
13195 int
13196 main ()
13197 {
13198
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 if ac_fn_c_try_compile "$LINENO"; then :
13204   gl_cv_func_iswcntrl_works="guessing yes"
13205 else
13206   gl_cv_func_iswcntrl_works="guessing no"
13207 fi
13208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13209
13210 else
13211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13212 /* end confdefs.h.  */
13213
13214                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13215                   included before <wchar.h>.
13216                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13217                   must be included before <wchar.h>.  */
13218                #include <stddef.h>
13219                #include <stdio.h>
13220                #include <time.h>
13221                #include <wchar.h>
13222                #include <wctype.h>
13223                int main () { return iswprint ('x') == 0; }
13224
13225 _ACEOF
13226 if ac_fn_c_try_run "$LINENO"; then :
13227   gl_cv_func_iswcntrl_works=yes
13228 else
13229   gl_cv_func_iswcntrl_works=no
13230 fi
13231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13232   conftest.$ac_objext conftest.beam conftest.$ac_ext
13233 fi
13234
13235
13236 fi
13237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13238 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
13239     fi
13240     HAVE_WCTYPE_H=1
13241   else
13242     HAVE_WCTYPE_H=0
13243   fi
13244
13245
13246   case "$gl_cv_func_iswcntrl_works" in
13247     *yes) REPLACE_ISWCNTRL=0 ;;
13248     *)    REPLACE_ISWCNTRL=1 ;;
13249   esac
13250
13251
13252   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13253         :
13254   fi
13255
13256   if test $REPLACE_ISWCNTRL = 1; then
13257     REPLACE_TOWLOWER=1
13258   else
13259     for ac_func in towlower
13260 do :
13261   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13262 if test "x$ac_cv_func_towlower" = xyes; then :
13263   cat >>confdefs.h <<_ACEOF
13264 #define HAVE_TOWLOWER 1
13265 _ACEOF
13266
13267 fi
13268 done
13269
13270     if test $ac_cv_func_towlower = yes; then
13271       REPLACE_TOWLOWER=0
13272     else
13273       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13274              included before <wchar.h>.
13275              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13276              must be included before <wchar.h>.  */
13277           #include <stddef.h>
13278           #include <stdio.h>
13279           #include <time.h>
13280           #include <wchar.h>
13281           #if HAVE_WCTYPE_H
13282           # include <wctype.h>
13283           #endif
13284
13285 "
13286 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13287   ac_have_decl=1
13288 else
13289   ac_have_decl=0
13290 fi
13291
13292 cat >>confdefs.h <<_ACEOF
13293 #define HAVE_DECL_TOWLOWER $ac_have_decl
13294 _ACEOF
13295
13296       if test $ac_cv_have_decl_towlower = yes; then
13297                                 REPLACE_TOWLOWER=1
13298       else
13299         REPLACE_TOWLOWER=0
13300       fi
13301     fi
13302   fi
13303
13304
13305   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13306         :
13307   fi
13308
13309           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13310 printf %s "checking for wctype_t... " >&6; }
13311 if ${gl_cv_type_wctype_t+:} false; then :
13312   printf %s "(cached) " >&6
13313 else
13314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13315 /* end confdefs.h.  */
13316 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13317                included before <wchar.h>.
13318                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13319                must be included before <wchar.h>.  */
13320             #include <stddef.h>
13321             #include <stdio.h>
13322             #include <time.h>
13323             #include <wchar.h>
13324             #if HAVE_WCTYPE_H
13325             # include <wctype.h>
13326             #endif
13327             wctype_t a;
13328
13329 int
13330 main ()
13331 {
13332
13333   ;
13334   return 0;
13335 }
13336 _ACEOF
13337 if ac_fn_c_try_compile "$LINENO"; then :
13338   gl_cv_type_wctype_t=yes
13339 else
13340   gl_cv_type_wctype_t=no
13341 fi
13342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13343
13344 fi
13345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13346 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
13347   if test $gl_cv_type_wctype_t = no; then
13348     HAVE_WCTYPE_T=0
13349   fi
13350
13351       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13352 printf %s "checking for wctrans_t... " >&6; }
13353 if ${gl_cv_type_wctrans_t+:} false; then :
13354   printf %s "(cached) " >&6
13355 else
13356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13357 /* end confdefs.h.  */
13358 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13359                included before <wchar.h>.
13360                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13361                must be included before <wchar.h>.  */
13362             #include <stddef.h>
13363             #include <stdio.h>
13364             #include <time.h>
13365             #include <wchar.h>
13366             #include <wctype.h>
13367             wctrans_t a;
13368
13369 int
13370 main ()
13371 {
13372
13373   ;
13374   return 0;
13375 }
13376 _ACEOF
13377 if ac_fn_c_try_compile "$LINENO"; then :
13378   gl_cv_type_wctrans_t=yes
13379 else
13380   gl_cv_type_wctrans_t=no
13381 fi
13382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383
13384 fi
13385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13386 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
13387   if test $gl_cv_type_wctrans_t = no; then
13388     HAVE_WCTRANS_T=0
13389   fi
13390
13391
13392     for gl_func in wctype iswctype wctrans towctrans     ; do
13393     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13394     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13395 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
13396 if eval \${$as_gl_Symbol+:} false; then :
13397   printf %s "(cached) " >&6
13398 else
13399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h.  */
13401
13402 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13403    <wchar.h>.
13404    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13405    included before <wchar.h>.  */
13406 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13407 # include <stddef.h>
13408 # include <stdio.h>
13409 # include <time.h>
13410 # include <wchar.h>
13411 #endif
13412 #include <wctype.h>
13413
13414 int
13415 main ()
13416 {
13417 #undef $gl_func
13418   (void) $gl_func;
13419   ;
13420   return 0;
13421 }
13422 _ACEOF
13423 if ac_fn_c_try_compile "$LINENO"; then :
13424   eval "$as_gl_Symbol=yes"
13425 else
13426   eval "$as_gl_Symbol=no"
13427 fi
13428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429 fi
13430 eval ac_res=\$$as_gl_Symbol
13431                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13432 printf "%s\n" "$ac_res" >&6; }
13433     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13434   cat >>confdefs.h <<_ACEOF
13435 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13436 _ACEOF
13437
13438                      eval ac_cv_have_decl_$gl_func=yes
13439 fi
13440       done
13441
13442
13443
13444
13445
13446   GNULIB_NL_LANGINFO=0;
13447     HAVE_NL_LANGINFO=1;
13448   REPLACE_NL_LANGINFO=0;
13449
13450
13451
13452 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13453 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13454   ac_have_decl=1
13455 else
13456   ac_have_decl=0
13457 fi
13458
13459 cat >>confdefs.h <<_ACEOF
13460 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13461 _ACEOF
13462
13463
13464     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13465 printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13466 if ${ac_cv_gnu_library_2_1+:} false; then :
13467   printf %s "(cached) " >&6
13468 else
13469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470 /* end confdefs.h.  */
13471
13472 #include <features.h>
13473 #ifdef __GNU_LIBRARY__
13474  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13475   Lucky GNU user
13476  #endif
13477 #endif
13478 #ifdef __UCLIBC__
13479  Lucky user
13480 #endif
13481
13482 _ACEOF
13483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13484   $EGREP "Lucky" >/dev/null 2>&1; then :
13485   ac_cv_gnu_library_2_1=yes
13486 else
13487   ac_cv_gnu_library_2_1=no
13488 fi
13489 rm -rf conftest*
13490
13491
13492
13493 fi
13494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13495 printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
13496
13497     GLIBC21="$ac_cv_gnu_library_2_1"
13498
13499
13500
13501   GNULIB_LOCALECONV=0;
13502   GNULIB_SETLOCALE=0;
13503   GNULIB_DUPLOCALE=0;
13504     HAVE_DUPLOCALE=1;
13505   REPLACE_LOCALECONV=0;
13506   REPLACE_SETLOCALE=0;
13507   REPLACE_DUPLOCALE=0;
13508   REPLACE_STRUCT_LCONV=0;
13509
13510
13511     REPLACE_NULL=0;
13512   HAVE_WCHAR_T=1;
13513
13514
13515   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13516 printf %s "checking for wchar_t... " >&6; }
13517 if ${gt_cv_c_wchar_t+:} false; then :
13518   printf %s "(cached) " >&6
13519 else
13520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13521 /* end confdefs.h.  */
13522 #include <stddef.h>
13523             wchar_t foo = (wchar_t)'\0';
13524 int
13525 main ()
13526 {
13527
13528   ;
13529   return 0;
13530 }
13531 _ACEOF
13532 if ac_fn_c_try_compile "$LINENO"; then :
13533   gt_cv_c_wchar_t=yes
13534 else
13535   gt_cv_c_wchar_t=no
13536 fi
13537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13538 fi
13539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13540 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
13541   if test $gt_cv_c_wchar_t = yes; then
13542
13543 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
13544
13545   fi
13546
13547
13548
13549
13550   STDDEF_H=
13551   if test $gt_cv_c_wchar_t = no; then
13552     HAVE_WCHAR_T=0
13553     STDDEF_H=stddef.h
13554   fi
13555   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13556 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
13557 if ${gl_cv_decl_null_works+:} false; then :
13558   printf %s "(cached) " >&6
13559 else
13560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561 /* end confdefs.h.  */
13562 #include <stddef.h>
13563       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13564
13565 int
13566 main ()
13567 {
13568
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 if ac_fn_c_try_compile "$LINENO"; then :
13574   gl_cv_decl_null_works=yes
13575 else
13576   gl_cv_decl_null_works=no
13577 fi
13578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579 fi
13580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13581 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
13582   if test $gl_cv_decl_null_works = no; then
13583     REPLACE_NULL=1
13584     STDDEF_H=stddef.h
13585   fi
13586
13587    if test -n "$STDDEF_H"; then
13588   GL_GENERATE_STDDEF_H_TRUE=
13589   GL_GENERATE_STDDEF_H_FALSE='#'
13590 else
13591   GL_GENERATE_STDDEF_H_TRUE='#'
13592   GL_GENERATE_STDDEF_H_FALSE=
13593 fi
13594
13595   if test -n "$STDDEF_H"; then
13596
13597
13598
13599
13600
13601
13602
13603
13604      if test $gl_cv_have_include_next = yes; then
13605        gl_cv_next_stddef_h='<'stddef.h'>'
13606      else
13607        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13608 printf %s "checking absolute name of <stddef.h>... " >&6; }
13609 if ${gl_cv_next_stddef_h+:} false; then :
13610   printf %s "(cached) " >&6
13611 else
13612
13613                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13614 /* end confdefs.h.  */
13615 #include <stddef.h>
13616
13617 _ACEOF
13618                                                                                                                         case "$host_os" in
13619                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13620                  *)    gl_absname_cpp="$ac_cpp" ;;
13621                esac
13622
13623                case "$host_os" in
13624                  mingw*)
13625                                                                                                                                      gl_dirsep_regex='[/\\]'
13626                    ;;
13627                  *)
13628                    gl_dirsep_regex='\/'
13629                    ;;
13630                esac
13631                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13632
13633                gl_header_literal_regex=`echo 'stddef.h' \
13634                                         | sed -e "$gl_make_literal_regex_sed"`
13635                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13636                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13637                    s|^/[^/]|//&|
13638                    p
13639                    q
13640                  }'
13641                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13642                       sed -n "$gl_absolute_header_sed"`'"'
13643
13644
13645 fi
13646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13647 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
13648      fi
13649      NEXT_STDDEF_H=$gl_cv_next_stddef_h
13650
13651      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13652        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13653        gl_next_as_first_directive='<'stddef.h'>'
13654      else
13655        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13656        gl_next_as_first_directive=$gl_cv_next_stddef_h
13657      fi
13658      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13659
13660
13661
13662
13663   fi
13664
13665
13666
13667
13668
13669
13670       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
13671 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
13672 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
13673   printf %s "(cached) " >&6
13674 else
13675   rm -f conftest.sym conftest.file
13676      echo >conftest.file
13677      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
13678        if test "$cross_compiling" = yes; then :
13679   case "$host_os" in
13680                     # Guess yes on glibc systems.
13681             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
13682                     # If we don't know, assume the worst.
13683             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
13684           esac
13685
13686 else
13687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688 /* end confdefs.h.  */
13689 $ac_includes_default
13690 int
13691 main ()
13692 {
13693 struct stat sbuf;
13694               /* Linux will dereference the symlink and fail, as required by
13695                  POSIX.  That is better in the sense that it means we will not
13696                  have to compile and use the lstat wrapper.  */
13697               return lstat ("conftest.sym/", &sbuf) == 0;
13698
13699   ;
13700   return 0;
13701 }
13702 _ACEOF
13703 if ac_fn_c_try_run "$LINENO"; then :
13704   gl_cv_func_lstat_dereferences_slashed_symlink=yes
13705 else
13706   gl_cv_func_lstat_dereferences_slashed_symlink=no
13707 fi
13708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13709   conftest.$ac_objext conftest.beam conftest.$ac_ext
13710 fi
13711
13712      else
13713        # If the 'ln -s' command failed, then we probably don't even
13714        # have an lstat function.
13715        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
13716      fi
13717      rm -f conftest.sym conftest.file
13718
13719 fi
13720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
13721 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
13722   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
13723     *yes)
13724
13725 cat >>confdefs.h <<_ACEOF
13726 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
13727 _ACEOF
13728
13729       ;;
13730   esac
13731
13732
13733   GNULIB__EXIT=0;
13734   GNULIB_ATOLL=0;
13735   GNULIB_CALLOC_POSIX=0;
13736   GNULIB_CANONICALIZE_FILE_NAME=0;
13737   GNULIB_GETLOADAVG=0;
13738   GNULIB_GETSUBOPT=0;
13739   GNULIB_GRANTPT=0;
13740   GNULIB_MALLOC_POSIX=0;
13741   GNULIB_MBTOWC=0;
13742   GNULIB_MKDTEMP=0;
13743   GNULIB_MKOSTEMP=0;
13744   GNULIB_MKOSTEMPS=0;
13745   GNULIB_MKSTEMP=0;
13746   GNULIB_MKSTEMPS=0;
13747   GNULIB_POSIX_OPENPT=0;
13748   GNULIB_PTSNAME=0;
13749   GNULIB_PTSNAME_R=0;
13750   GNULIB_PUTENV=0;
13751   GNULIB_RANDOM=0;
13752   GNULIB_RANDOM_R=0;
13753   GNULIB_REALLOC_POSIX=0;
13754   GNULIB_REALPATH=0;
13755   GNULIB_RPMATCH=0;
13756   GNULIB_SECURE_GETENV=0;
13757   GNULIB_SETENV=0;
13758   GNULIB_STRTOD=0;
13759   GNULIB_STRTOLL=0;
13760   GNULIB_STRTOULL=0;
13761   GNULIB_SYSTEM_POSIX=0;
13762   GNULIB_UNLOCKPT=0;
13763   GNULIB_UNSETENV=0;
13764   GNULIB_WCTOMB=0;
13765     HAVE__EXIT=1;
13766   HAVE_ATOLL=1;
13767   HAVE_CANONICALIZE_FILE_NAME=1;
13768   HAVE_DECL_GETLOADAVG=1;
13769   HAVE_GETSUBOPT=1;
13770   HAVE_GRANTPT=1;
13771   HAVE_MKDTEMP=1;
13772   HAVE_MKOSTEMP=1;
13773   HAVE_MKOSTEMPS=1;
13774   HAVE_MKSTEMP=1;
13775   HAVE_MKSTEMPS=1;
13776   HAVE_POSIX_OPENPT=1;
13777   HAVE_PTSNAME=1;
13778   HAVE_PTSNAME_R=1;
13779   HAVE_RANDOM=1;
13780   HAVE_RANDOM_H=1;
13781   HAVE_RANDOM_R=1;
13782   HAVE_REALPATH=1;
13783   HAVE_RPMATCH=1;
13784   HAVE_SECURE_GETENV=1;
13785   HAVE_SETENV=1;
13786   HAVE_DECL_SETENV=1;
13787   HAVE_STRTOD=1;
13788   HAVE_STRTOLL=1;
13789   HAVE_STRTOULL=1;
13790   HAVE_STRUCT_RANDOM_DATA=1;
13791   HAVE_SYS_LOADAVG_H=0;
13792   HAVE_UNLOCKPT=1;
13793   HAVE_DECL_UNSETENV=1;
13794   REPLACE_CALLOC=0;
13795   REPLACE_CANONICALIZE_FILE_NAME=0;
13796   REPLACE_MALLOC=0;
13797   REPLACE_MBTOWC=0;
13798   REPLACE_MKSTEMP=0;
13799   REPLACE_PTSNAME=0;
13800   REPLACE_PTSNAME_R=0;
13801   REPLACE_PUTENV=0;
13802   REPLACE_RANDOM_R=0;
13803   REPLACE_REALLOC=0;
13804   REPLACE_REALPATH=0;
13805   REPLACE_SETENV=0;
13806   REPLACE_STRTOD=0;
13807   REPLACE_UNSETENV=0;
13808   REPLACE_WCTOMB=0;
13809
13810
13811   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13812 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13813 if ${gl_cv_func_malloc_posix+:} false; then :
13814   printf %s "(cached) " >&6
13815 else
13816
13817                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818 /* end confdefs.h.  */
13819
13820 int
13821 main ()
13822 {
13823 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13824              choke me
13825              #endif
13826
13827   ;
13828   return 0;
13829 }
13830 _ACEOF
13831 if ac_fn_c_try_compile "$LINENO"; then :
13832   gl_cv_func_malloc_posix=yes
13833 else
13834   gl_cv_func_malloc_posix=no
13835 fi
13836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13837
13838 fi
13839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13840 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
13841
13842
13843
13844       for ac_header in stdlib.h
13845 do :
13846   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13847 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13848   cat >>confdefs.h <<_ACEOF
13849 #define HAVE_STDLIB_H 1
13850 _ACEOF
13851
13852 fi
13853
13854 done
13855
13856   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13857 printf %s "checking for GNU libc compatible malloc... " >&6; }
13858 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13859   printf %s "(cached) " >&6
13860 else
13861   if test "$cross_compiling" = yes; then :
13862   case "$host_os" in
13863           # Guess yes on platforms where we know the result.
13864           *-gnu* | freebsd* | netbsd* | openbsd* \
13865           | hpux* | solaris* | cygwin* | mingw*)
13866             ac_cv_func_malloc_0_nonnull=yes ;;
13867           # If we don't know, assume the worst.
13868           *) ac_cv_func_malloc_0_nonnull=no ;;
13869         esac
13870
13871 else
13872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h.  */
13874 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13875             # include <stdlib.h>
13876             #else
13877             char *malloc ();
13878             #endif
13879
13880 int
13881 main ()
13882 {
13883 return ! malloc (0);
13884   ;
13885   return 0;
13886 }
13887
13888 _ACEOF
13889 if ac_fn_c_try_run "$LINENO"; then :
13890   ac_cv_func_malloc_0_nonnull=yes
13891 else
13892   ac_cv_func_malloc_0_nonnull=no
13893 fi
13894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895   conftest.$ac_objext conftest.beam conftest.$ac_ext
13896 fi
13897
13898
13899 fi
13900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13901 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
13902   if test $ac_cv_func_malloc_0_nonnull = yes; then :
13903   gl_cv_func_malloc_0_nonnull=1
13904 else
13905   gl_cv_func_malloc_0_nonnull=0
13906 fi
13907
13908
13909 cat >>confdefs.h <<_ACEOF
13910 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13911 _ACEOF
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13922 printf %s "checking for a traditional japanese locale... " >&6; }
13923 if ${gt_cv_locale_ja+:} false; then :
13924   printf %s "(cached) " >&6
13925 else
13926
13927     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928 /* end confdefs.h.  */
13929
13930 #include <locale.h>
13931 #include <time.h>
13932 #if HAVE_LANGINFO_CODESET
13933 # include <langinfo.h>
13934 #endif
13935 #include <stdlib.h>
13936 #include <string.h>
13937 struct tm t;
13938 char buf[16];
13939 int main ()
13940 {
13941   const char *p;
13942   /* Check whether the given locale name is recognized by the system.  */
13943 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13944   /* On native Windows, setlocale(category, "") looks at the system settings,
13945      not at the environment variables.  Also, when an encoding suffix such
13946      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13947      category of the locale to "C".  */
13948   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13949       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13950     return 1;
13951 #else
13952   if (setlocale (LC_ALL, "") == NULL) return 1;
13953 #endif
13954   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13955      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13956      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13957      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13958      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13959      some unit tests fail.
13960      On MirBSD 10, when an unsupported locale is specified, setlocale()
13961      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
13962 #if HAVE_LANGINFO_CODESET
13963   {
13964     const char *cs = nl_langinfo (CODESET);
13965     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13966         || strcmp (cs, "UTF-8") == 0)
13967       return 1;
13968   }
13969 #endif
13970 #ifdef __CYGWIN__
13971   /* On Cygwin, avoid locale names without encoding suffix, because the
13972      locale_charset() function relies on the encoding suffix.  Note that
13973      LC_ALL is set on the command line.  */
13974   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13975 #endif
13976   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
13977      on Cygwin 1.5.x.  */
13978   if (MB_CUR_MAX == 1)
13979     return 1;
13980   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13981      This excludes the UTF-8 encoding (except on MirBSD).  */
13982   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13983   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13984   for (p = buf; *p != '\0'; p++)
13985     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13986       return 1;
13987   return 0;
13988 }
13989
13990 _ACEOF
13991     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13992   (eval $ac_link) 2>&5
13993   ac_status=$?
13994   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13995   test $ac_status = 0; } && test -s conftest$ac_exeext; then
13996       case "$host_os" in
13997         # Handle native Windows specially, because there setlocale() interprets
13998         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13999         # "fr" or "fra" as "French" or "French_France.1252",
14000         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14001         # "ja" as "Japanese" or "Japanese_Japan.932",
14002         # and similar.
14003         mingw*)
14004           # Note that on native Windows, the Japanese locale is
14005           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14006           # cannot use it here.
14007           gt_cv_locale_ja=none
14008           ;;
14009         *)
14010           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14011           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14012           # configure script would override the LC_ALL setting. Likewise for
14013           # LC_CTYPE, which is also set at the beginning of the configure script.
14014           # Test for the AIX locale name.
14015           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14016             gt_cv_locale_ja=ja_JP
14017           else
14018             # Test for the locale name with explicit encoding suffix.
14019             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14020               gt_cv_locale_ja=ja_JP.EUC-JP
14021             else
14022               # Test for the HP-UX, OSF/1, NetBSD locale name.
14023               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14024                 gt_cv_locale_ja=ja_JP.eucJP
14025               else
14026                 # Test for the IRIX, FreeBSD locale name.
14027                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14028                   gt_cv_locale_ja=ja_JP.EUC
14029                 else
14030                   # Test for the Solaris 7 locale name.
14031                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14032                     gt_cv_locale_ja=ja
14033                   else
14034                     # Special test for NetBSD 1.6.
14035                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14036                       gt_cv_locale_ja=ja_JP.eucJP
14037                     else
14038                       # None found.
14039                       gt_cv_locale_ja=none
14040                     fi
14041                   fi
14042                 fi
14043               fi
14044             fi
14045           fi
14046           ;;
14047       esac
14048     fi
14049     rm -fr conftest*
14050
14051 fi
14052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14053 printf "%s\n" "$gt_cv_locale_ja" >&6; }
14054   LOCALE_JA=$gt_cv_locale_ja
14055
14056
14057
14058
14059
14060   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14061 printf %s "checking for a transitional chinese locale... " >&6; }
14062 if ${gt_cv_locale_zh_CN+:} false; then :
14063   printf %s "(cached) " >&6
14064 else
14065
14066     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067 /* end confdefs.h.  */
14068
14069 #include <locale.h>
14070 #include <stdlib.h>
14071 #include <time.h>
14072 #if HAVE_LANGINFO_CODESET
14073 # include <langinfo.h>
14074 #endif
14075 #include <stdlib.h>
14076 #include <string.h>
14077 struct tm t;
14078 char buf[16];
14079 int main ()
14080 {
14081   const char *p;
14082   /* Check whether the given locale name is recognized by the system.  */
14083 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14084   /* On native Windows, setlocale(category, "") looks at the system settings,
14085      not at the environment variables.  Also, when an encoding suffix such
14086      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14087      category of the locale to "C".  */
14088   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14089       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14090     return 1;
14091 #else
14092   if (setlocale (LC_ALL, "") == NULL) return 1;
14093 #endif
14094   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14095      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14096      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14097      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14098      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14099      some unit tests fail.
14100      On MirBSD 10, when an unsupported locale is specified, setlocale()
14101      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14102 #if HAVE_LANGINFO_CODESET
14103   {
14104     const char *cs = nl_langinfo (CODESET);
14105     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14106         || strcmp (cs, "UTF-8") == 0)
14107       return 1;
14108   }
14109 #endif
14110 #ifdef __CYGWIN__
14111   /* On Cygwin, avoid locale names without encoding suffix, because the
14112      locale_charset() function relies on the encoding suffix.  Note that
14113      LC_ALL is set on the command line.  */
14114   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14115 #endif
14116   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14117      This excludes the UTF-8 encoding (except on MirBSD).  */
14118   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14119   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14120   for (p = buf; *p != '\0'; p++)
14121     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14122       return 1;
14123   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14124      single wide character.  This excludes the GB2312 and GBK encodings.  */
14125   if (mblen ("\203\062\332\066", 5) != 4)
14126     return 1;
14127   return 0;
14128 }
14129
14130 _ACEOF
14131     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14132   (eval $ac_link) 2>&5
14133   ac_status=$?
14134   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14135   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14136       case "$host_os" in
14137         # Handle native Windows specially, because there setlocale() interprets
14138         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14139         # "fr" or "fra" as "French" or "French_France.1252",
14140         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14141         # "ja" as "Japanese" or "Japanese_Japan.932",
14142         # and similar.
14143         mingw*)
14144           # Test for the hypothetical native Windows locale name.
14145           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14146             gt_cv_locale_zh_CN=Chinese_China.54936
14147           else
14148             # None found.
14149             gt_cv_locale_zh_CN=none
14150           fi
14151           ;;
14152         solaris2.8)
14153           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14154           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14155           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14156           gt_cv_locale_zh_CN=none
14157           ;;
14158         *)
14159           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14160           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14161           # configure script would override the LC_ALL setting. Likewise for
14162           # LC_CTYPE, which is also set at the beginning of the configure script.
14163           # Test for the locale name without encoding suffix.
14164           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14165             gt_cv_locale_zh_CN=zh_CN
14166           else
14167             # Test for the locale name with explicit encoding suffix.
14168             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14169               gt_cv_locale_zh_CN=zh_CN.GB18030
14170             else
14171               # None found.
14172               gt_cv_locale_zh_CN=none
14173             fi
14174           fi
14175           ;;
14176       esac
14177     else
14178       # If there was a link error, due to mblen(), the system is so old that
14179       # it certainly doesn't have a chinese locale.
14180       gt_cv_locale_zh_CN=none
14181     fi
14182     rm -fr conftest*
14183
14184 fi
14185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14186 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
14187   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14188
14189
14190
14191
14192   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14193 printf %s "checking for a french Unicode locale... " >&6; }
14194 if ${gt_cv_locale_fr_utf8+:} false; then :
14195   printf %s "(cached) " >&6
14196 else
14197
14198     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199 /* end confdefs.h.  */
14200
14201 #include <locale.h>
14202 #include <time.h>
14203 #if HAVE_LANGINFO_CODESET
14204 # include <langinfo.h>
14205 #endif
14206 #include <stdlib.h>
14207 #include <string.h>
14208 struct tm t;
14209 char buf[16];
14210 int main () {
14211   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14212      imitates locale dependent behaviour by looking at the environment
14213      variables, and all locales use the UTF-8 encoding.  */
14214 #if !(defined __BEOS__ || defined __HAIKU__)
14215   /* Check whether the given locale name is recognized by the system.  */
14216 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14217   /* On native Windows, setlocale(category, "") looks at the system settings,
14218      not at the environment variables.  Also, when an encoding suffix such
14219      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14220      category of the locale to "C".  */
14221   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14222       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14223     return 1;
14224 # else
14225   if (setlocale (LC_ALL, "") == NULL) return 1;
14226 # endif
14227   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14228      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14229      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14230      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14231      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14232      some unit tests fail.  */
14233 # if HAVE_LANGINFO_CODESET
14234   {
14235     const char *cs = nl_langinfo (CODESET);
14236     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14237       return 1;
14238   }
14239 # endif
14240 # ifdef __CYGWIN__
14241   /* On Cygwin, avoid locale names without encoding suffix, because the
14242      locale_charset() function relies on the encoding suffix.  Note that
14243      LC_ALL is set on the command line.  */
14244   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14245 # endif
14246   /* Check whether in the abbreviation of the second month, the second
14247      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14248      two bytes long, with UTF-8 encoding.  */
14249   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14250   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14251       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14252     return 1;
14253 #endif
14254 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14255   /* Check whether the decimal separator is a comma.
14256      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14257      are nl_langinfo(RADIXCHAR) are both ".".  */
14258   if (localeconv () ->decimal_point[0] != ',') return 1;
14259 #endif
14260   return 0;
14261 }
14262
14263 _ACEOF
14264     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14265   (eval $ac_link) 2>&5
14266   ac_status=$?
14267   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14268   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14269       case "$host_os" in
14270         # Handle native Windows specially, because there setlocale() interprets
14271         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14272         # "fr" or "fra" as "French" or "French_France.1252",
14273         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14274         # "ja" as "Japanese" or "Japanese_Japan.932",
14275         # and similar.
14276         mingw*)
14277           # Test for the hypothetical native Windows locale name.
14278           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14279             gt_cv_locale_fr_utf8=French_France.65001
14280           else
14281             # None found.
14282             gt_cv_locale_fr_utf8=none
14283           fi
14284           ;;
14285         *)
14286           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14287           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14288           # configure script would override the LC_ALL setting. Likewise for
14289           # LC_CTYPE, which is also set at the beginning of the configure script.
14290           # Test for the usual locale name.
14291           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14292             gt_cv_locale_fr_utf8=fr_FR
14293           else
14294             # Test for the locale name with explicit encoding suffix.
14295             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14296               gt_cv_locale_fr_utf8=fr_FR.UTF-8
14297             else
14298               # Test for the Solaris 7 locale name.
14299               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14300                 gt_cv_locale_fr_utf8=fr.UTF-8
14301               else
14302                 # None found.
14303                 gt_cv_locale_fr_utf8=none
14304               fi
14305             fi
14306           fi
14307           ;;
14308       esac
14309     fi
14310     rm -fr conftest*
14311
14312 fi
14313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14314 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
14315   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14316
14317
14318
14319   GNULIB_FFSL=0;
14320   GNULIB_FFSLL=0;
14321   GNULIB_MEMCHR=0;
14322   GNULIB_MEMMEM=0;
14323   GNULIB_MEMPCPY=0;
14324   GNULIB_MEMRCHR=0;
14325   GNULIB_RAWMEMCHR=0;
14326   GNULIB_STPCPY=0;
14327   GNULIB_STPNCPY=0;
14328   GNULIB_STRCHRNUL=0;
14329   GNULIB_STRDUP=0;
14330   GNULIB_STRNCAT=0;
14331   GNULIB_STRNDUP=0;
14332   GNULIB_STRNLEN=0;
14333   GNULIB_STRPBRK=0;
14334   GNULIB_STRSEP=0;
14335   GNULIB_STRSTR=0;
14336   GNULIB_STRCASESTR=0;
14337   GNULIB_STRTOK_R=0;
14338   GNULIB_MBSLEN=0;
14339   GNULIB_MBSNLEN=0;
14340   GNULIB_MBSCHR=0;
14341   GNULIB_MBSRCHR=0;
14342   GNULIB_MBSSTR=0;
14343   GNULIB_MBSCASECMP=0;
14344   GNULIB_MBSNCASECMP=0;
14345   GNULIB_MBSPCASECMP=0;
14346   GNULIB_MBSCASESTR=0;
14347   GNULIB_MBSCSPN=0;
14348   GNULIB_MBSPBRK=0;
14349   GNULIB_MBSSPN=0;
14350   GNULIB_MBSSEP=0;
14351   GNULIB_MBSTOK_R=0;
14352   GNULIB_STRERROR=0;
14353   GNULIB_STRERROR_R=0;
14354   GNULIB_STRSIGNAL=0;
14355   GNULIB_STRVERSCMP=0;
14356   HAVE_MBSLEN=0;
14357     HAVE_FFSL=1;
14358   HAVE_FFSLL=1;
14359   HAVE_MEMCHR=1;
14360   HAVE_DECL_MEMMEM=1;
14361   HAVE_MEMPCPY=1;
14362   HAVE_DECL_MEMRCHR=1;
14363   HAVE_RAWMEMCHR=1;
14364   HAVE_STPCPY=1;
14365   HAVE_STPNCPY=1;
14366   HAVE_STRCHRNUL=1;
14367   HAVE_DECL_STRDUP=1;
14368   HAVE_DECL_STRNDUP=1;
14369   HAVE_DECL_STRNLEN=1;
14370   HAVE_STRPBRK=1;
14371   HAVE_STRSEP=1;
14372   HAVE_STRCASESTR=1;
14373   HAVE_DECL_STRTOK_R=1;
14374   HAVE_DECL_STRERROR_R=1;
14375   HAVE_DECL_STRSIGNAL=1;
14376   HAVE_STRVERSCMP=1;
14377   REPLACE_MEMCHR=0;
14378   REPLACE_MEMMEM=0;
14379   REPLACE_STPNCPY=0;
14380   REPLACE_STRDUP=0;
14381   REPLACE_STRSTR=0;
14382   REPLACE_STRCASESTR=0;
14383   REPLACE_STRCHRNUL=0;
14384   REPLACE_STRERROR=0;
14385   REPLACE_STRERROR_R=0;
14386   REPLACE_STRNCAT=0;
14387   REPLACE_STRNDUP=0;
14388   REPLACE_STRNLEN=0;
14389   REPLACE_STRSIGNAL=0;
14390   REPLACE_STRTOK_R=0;
14391   UNDEFINE_STRTOK_R=0;
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14404   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14405   # irrelevant for anonymous mappings.
14406   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14407 if test "x$ac_cv_func_mmap" = xyes; then :
14408   gl_have_mmap=yes
14409 else
14410   gl_have_mmap=no
14411 fi
14412
14413
14414   # Try to allow MAP_ANONYMOUS.
14415   gl_have_mmap_anonymous=no
14416   if test $gl_have_mmap = yes; then
14417     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14418 printf %s "checking for MAP_ANONYMOUS... " >&6; }
14419     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14420 /* end confdefs.h.  */
14421
14422 #include <sys/mman.h>
14423 #ifdef MAP_ANONYMOUS
14424     I cannot identify this map
14425 #endif
14426
14427 _ACEOF
14428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14429   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14430   gl_have_mmap_anonymous=yes
14431 fi
14432 rm -rf conftest*
14433
14434     if test $gl_have_mmap_anonymous != yes; then
14435       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436 /* end confdefs.h.  */
14437
14438 #include <sys/mman.h>
14439 #ifdef MAP_ANON
14440     I cannot identify this map
14441 #endif
14442
14443 _ACEOF
14444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14445   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14446
14447 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14448
14449          gl_have_mmap_anonymous=yes
14450 fi
14451 rm -rf conftest*
14452
14453     fi
14454     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14455 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
14456     if test $gl_have_mmap_anonymous = yes; then
14457
14458 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14459
14460     fi
14461   fi
14462
14463
14464
14465
14466
14467
14468   if test $HAVE_MEMCHR = 1; then
14469     # Detect platform-specific bugs in some versions of glibc:
14470     # memchr should not dereference anything with length 0
14471     #   http://bugzilla.redhat.com/499689
14472     # memchr should not dereference overestimated length after a match
14473     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14474     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14475     # Assume that memchr works on platforms that lack mprotect.
14476     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14477 printf %s "checking whether memchr works... " >&6; }
14478 if ${gl_cv_func_memchr_works+:} false; then :
14479   printf %s "(cached) " >&6
14480 else
14481   if test "$cross_compiling" = yes; then :
14482          gl_cv_func_memchr_works="guessing no"
14483 else
14484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14485 /* end confdefs.h.  */
14486
14487 #include <string.h>
14488 #if HAVE_SYS_MMAN_H
14489 # include <fcntl.h>
14490 # include <unistd.h>
14491 # include <sys/types.h>
14492 # include <sys/mman.h>
14493 # ifndef MAP_FILE
14494 #  define MAP_FILE 0
14495 # endif
14496 #endif
14497
14498 int
14499 main ()
14500 {
14501
14502   int result = 0;
14503   char *fence = NULL;
14504 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14505 # if HAVE_MAP_ANONYMOUS
14506   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14507   const int fd = -1;
14508 # else /* !HAVE_MAP_ANONYMOUS */
14509   const int flags = MAP_FILE | MAP_PRIVATE;
14510   int fd = open ("/dev/zero", O_RDONLY, 0666);
14511   if (fd >= 0)
14512 # endif
14513     {
14514       int pagesize = getpagesize ();
14515       char *two_pages =
14516         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14517                        flags, fd, 0);
14518       if (two_pages != (char *)(-1)
14519           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14520         fence = two_pages + pagesize;
14521     }
14522 #endif
14523   if (fence)
14524     {
14525       if (memchr (fence, 0, 0))
14526         result |= 1;
14527       strcpy (fence - 9, "12345678");
14528       if (memchr (fence - 9, 0, 79) != fence - 1)
14529         result |= 2;
14530       if (memchr (fence - 1, 0, 3) != fence - 1)
14531         result |= 4;
14532     }
14533   return result;
14534
14535   ;
14536   return 0;
14537 }
14538 _ACEOF
14539 if ac_fn_c_try_run "$LINENO"; then :
14540   gl_cv_func_memchr_works=yes
14541 else
14542   gl_cv_func_memchr_works=no
14543 fi
14544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14545   conftest.$ac_objext conftest.beam conftest.$ac_ext
14546 fi
14547
14548 fi
14549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14550 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
14551     if test "$gl_cv_func_memchr_works" != yes; then
14552       REPLACE_MEMCHR=1
14553     fi
14554   fi
14555
14556
14557
14558
14559   GNULIB_MKTIME=0;
14560   GNULIB_NANOSLEEP=0;
14561   GNULIB_STRPTIME=0;
14562   GNULIB_TIMEGM=0;
14563   GNULIB_TIME_R=0;
14564     HAVE_DECL_LOCALTIME_R=1;
14565   HAVE_NANOSLEEP=1;
14566   HAVE_STRPTIME=1;
14567   HAVE_TIMEGM=1;
14568         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14569   REPLACE_MKTIME=GNULIB_PORTCHECK;
14570   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14571   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14572
14573 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14574 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14575   ac_have_decl=1
14576 else
14577   ac_have_decl=0
14578 fi
14579
14580 cat >>confdefs.h <<_ACEOF
14581 #define HAVE_DECL_ALARM $ac_have_decl
14582 _ACEOF
14583
14584
14585
14586
14587
14588   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14589 printf %s "checking for promoted mode_t type... " >&6; }
14590 if ${gl_cv_promoted_mode_t+:} false; then :
14591   printf %s "(cached) " >&6
14592 else
14593
14594                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595 /* end confdefs.h.  */
14596 #include <sys/types.h>
14597 int
14598 main ()
14599 {
14600 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14601   ;
14602   return 0;
14603 }
14604 _ACEOF
14605 if ac_fn_c_try_compile "$LINENO"; then :
14606   gl_cv_promoted_mode_t='int'
14607 else
14608   gl_cv_promoted_mode_t='mode_t'
14609 fi
14610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14611
14612 fi
14613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14614 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
14615
14616 cat >>confdefs.h <<_ACEOF
14617 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14618 _ACEOF
14619
14620
14621
14622
14623
14624   GNULIB_PTHREAD_SIGMASK=0;
14625   GNULIB_RAISE=0;
14626   GNULIB_SIGNAL_H_SIGPIPE=0;
14627   GNULIB_SIGPROCMASK=0;
14628   GNULIB_SIGACTION=0;
14629     HAVE_POSIX_SIGNALBLOCKING=1;
14630   HAVE_PTHREAD_SIGMASK=1;
14631   HAVE_RAISE=1;
14632   HAVE_SIGSET_T=1;
14633   HAVE_SIGINFO_T=1;
14634   HAVE_SIGACTION=1;
14635   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
14636
14637   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
14638
14639   HAVE_SIGHANDLER_T=1;
14640   REPLACE_PTHREAD_SIGMASK=0;
14641   REPLACE_RAISE=0;
14642
14643
14644   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
14645       #include <signal.h>
14646       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
14647       #include <sys/types.h>
14648
14649 "
14650 if test "x$ac_cv_type_sigset_t" = xyes; then :
14651
14652 cat >>confdefs.h <<_ACEOF
14653 #define HAVE_SIGSET_T 1
14654 _ACEOF
14655
14656 gl_cv_type_sigset_t=yes
14657 else
14658   gl_cv_type_sigset_t=no
14659 fi
14660
14661   if test $gl_cv_type_sigset_t != yes; then
14662     HAVE_SIGSET_T=0
14663   fi
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14674 printf %s "checking for uid_t in sys/types.h... " >&6; }
14675 if ${ac_cv_type_uid_t+:} false; then :
14676   printf %s "(cached) " >&6
14677 else
14678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14679 /* end confdefs.h.  */
14680 #include <sys/types.h>
14681
14682 _ACEOF
14683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14684   $EGREP "uid_t" >/dev/null 2>&1; then :
14685   ac_cv_type_uid_t=yes
14686 else
14687   ac_cv_type_uid_t=no
14688 fi
14689 rm -rf conftest*
14690
14691 fi
14692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14693 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
14694 if test $ac_cv_type_uid_t = no; then
14695
14696 printf "%s\n" "#define uid_t int" >>confdefs.h
14697
14698
14699 printf "%s\n" "#define gid_t int" >>confdefs.h
14700
14701 fi
14702
14703 :
14704
14705
14706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14707 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
14708 if ${ac_cv_header_stdbool_h+:} false; then :
14709   printf %s "(cached) " >&6
14710 else
14711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712 /* end confdefs.h.  */
14713
14714              #include <stdbool.h>
14715              #ifndef bool
14716               "error: bool is not defined"
14717              #endif
14718              #ifndef false
14719               "error: false is not defined"
14720              #endif
14721              #if false
14722               "error: false is not 0"
14723              #endif
14724              #ifndef true
14725               "error: true is not defined"
14726              #endif
14727              #if true != 1
14728               "error: true is not 1"
14729              #endif
14730              #ifndef __bool_true_false_are_defined
14731               "error: __bool_true_false_are_defined is not defined"
14732              #endif
14733
14734              struct s { _Bool s: 1; _Bool t; } s;
14735
14736              char a[true == 1 ? 1 : -1];
14737              char b[false == 0 ? 1 : -1];
14738              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14739              char d[(bool) 0.5 == true ? 1 : -1];
14740              /* See body of main program for 'e'.  */
14741              char f[(_Bool) 0.0 == false ? 1 : -1];
14742              char g[true];
14743              char h[sizeof (_Bool)];
14744              char i[sizeof s.t];
14745              enum { j = false, k = true, l = false * true, m = true * 256 };
14746              /* The following fails for
14747                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14748              _Bool n[m];
14749              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14750              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14751              /* Catch a bug in an HP-UX C compiler.  See
14752                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14753                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14754               */
14755              _Bool q = true;
14756              _Bool *pq = &q;
14757
14758 int
14759 main ()
14760 {
14761
14762              bool e = &s;
14763              *pq |= q;
14764              *pq |= ! q;
14765              /* Refer to every declared value, to avoid compiler optimizations.  */
14766              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14767                      + !m + !n + !o + !p + !q + !pq);
14768
14769   ;
14770   return 0;
14771 }
14772 _ACEOF
14773 if ac_fn_c_try_compile "$LINENO"; then :
14774   ac_cv_header_stdbool_h=yes
14775 else
14776   ac_cv_header_stdbool_h=no
14777 fi
14778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 fi
14780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14781 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
14782    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14783 if test "x$ac_cv_type__Bool" = xyes; then :
14784
14785 cat >>confdefs.h <<_ACEOF
14786 #define HAVE__BOOL 1
14787 _ACEOF
14788
14789
14790 fi
14791
14792
14793
14794   GNULIB_FFS=0;
14795     HAVE_FFS=1;
14796   HAVE_STRCASECMP=1;
14797   HAVE_DECL_STRNCASECMP=1;
14798
14799
14800      REPLACE_STRERROR_0=0
14801   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
14802 printf %s "checking whether strerror(0) succeeds... " >&6; }
14803 if ${gl_cv_func_strerror_0_works+:} false; then :
14804   printf %s "(cached) " >&6
14805 else
14806   if test "$cross_compiling" = yes; then :
14807   case "$host_os" in
14808                  # Guess yes on glibc systems.
14809          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
14810                  # If we don't know, assume the worst.
14811          *)      gl_cv_func_strerror_0_works="guessing no" ;;
14812        esac
14813
14814 else
14815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816 /* end confdefs.h.  */
14817 #include <string.h>
14818            #include <errno.h>
14819
14820 int
14821 main ()
14822 {
14823 int result = 0;
14824            char *str;
14825            errno = 0;
14826            str = strerror (0);
14827            if (!*str) result |= 1;
14828            if (errno) result |= 2;
14829            if (strstr (str, "nknown") || strstr (str, "ndefined"))
14830              result |= 4;
14831            return result;
14832   ;
14833   return 0;
14834 }
14835 _ACEOF
14836 if ac_fn_c_try_run "$LINENO"; then :
14837   gl_cv_func_strerror_0_works=yes
14838 else
14839   gl_cv_func_strerror_0_works=no
14840 fi
14841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14842   conftest.$ac_objext conftest.beam conftest.$ac_ext
14843 fi
14844
14845
14846 fi
14847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
14848 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
14849   case "$gl_cv_func_strerror_0_works" in
14850     *yes) ;;
14851     *)
14852       REPLACE_STRERROR_0=1
14853
14854 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
14855
14856       ;;
14857   esac
14858
14859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14860 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14861 if ${ac_cv_struct_tm+:} false; then :
14862   printf %s "(cached) " >&6
14863 else
14864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14865 /* end confdefs.h.  */
14866 #include <sys/types.h>
14867 #include <time.h>
14868
14869 int
14870 main ()
14871 {
14872 struct tm tm;
14873                                      int *p = &tm.tm_sec;
14874                                      return !p;
14875   ;
14876   return 0;
14877 }
14878 _ACEOF
14879 if ac_fn_c_try_compile "$LINENO"; then :
14880   ac_cv_struct_tm=time.h
14881 else
14882   ac_cv_struct_tm=sys/time.h
14883 fi
14884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14885 fi
14886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14887 printf "%s\n" "$ac_cv_struct_tm" >&6; }
14888 if test $ac_cv_struct_tm = sys/time.h; then
14889
14890 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
14891
14892 fi
14893
14894 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14895 #include <$ac_cv_struct_tm>
14896
14897 "
14898 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14899
14900 cat >>confdefs.h <<_ACEOF
14901 #define HAVE_STRUCT_TM_TM_ZONE 1
14902 _ACEOF
14903
14904
14905 fi
14906
14907 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14908
14909 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
14910
14911 else
14912   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14913 "
14914 if test "x$ac_cv_have_decl_tzname" = xyes; then :
14915   ac_have_decl=1
14916 else
14917   ac_have_decl=0
14918 fi
14919
14920 cat >>confdefs.h <<_ACEOF
14921 #define HAVE_DECL_TZNAME $ac_have_decl
14922 _ACEOF
14923
14924   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14925 printf %s "checking for tzname... " >&6; }
14926 if ${ac_cv_var_tzname+:} false; then :
14927   printf %s "(cached) " >&6
14928 else
14929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14930 /* end confdefs.h.  */
14931 #include <time.h>
14932 #if !HAVE_DECL_TZNAME
14933 extern char *tzname[];
14934 #endif
14935
14936 int
14937 main ()
14938 {
14939 return tzname[0][0];
14940   ;
14941   return 0;
14942 }
14943 _ACEOF
14944 if ac_fn_c_try_link "$LINENO"; then :
14945   ac_cv_var_tzname=yes
14946 else
14947   ac_cv_var_tzname=no
14948 fi
14949 rm -f core conftest.err conftest.$ac_objext \
14950     conftest$ac_exeext conftest.$ac_ext
14951 fi
14952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14953 printf "%s\n" "$ac_cv_var_tzname" >&6; }
14954   if test $ac_cv_var_tzname = yes; then
14955
14956 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
14957
14958   fi
14959 fi
14960
14961
14962  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
14963 "
14964 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
14965
14966 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
14967
14968 fi
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984      if test $gl_cv_have_include_next = yes; then
14985        gl_cv_next_string_h='<'string.h'>'
14986      else
14987        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
14988 printf %s "checking absolute name of <string.h>... " >&6; }
14989 if ${gl_cv_next_string_h+:} false; then :
14990   printf %s "(cached) " >&6
14991 else
14992
14993                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14994 /* end confdefs.h.  */
14995 #include <string.h>
14996
14997 _ACEOF
14998                                                                                                                         case "$host_os" in
14999                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15000                  *)    gl_absname_cpp="$ac_cpp" ;;
15001                esac
15002
15003                case "$host_os" in
15004                  mingw*)
15005                                                                                                                                      gl_dirsep_regex='[/\\]'
15006                    ;;
15007                  *)
15008                    gl_dirsep_regex='\/'
15009                    ;;
15010                esac
15011                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15012
15013                gl_header_literal_regex=`echo 'string.h' \
15014                                         | sed -e "$gl_make_literal_regex_sed"`
15015                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15016                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15017                    s|^/[^/]|//&|
15018                    p
15019                    q
15020                  }'
15021                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15022                       sed -n "$gl_absolute_header_sed"`'"'
15023
15024
15025 fi
15026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15027 printf "%s\n" "$gl_cv_next_string_h" >&6; }
15028      fi
15029      NEXT_STRING_H=$gl_cv_next_string_h
15030
15031      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15032        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15033        gl_next_as_first_directive='<'string.h'>'
15034      else
15035        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15036        gl_next_as_first_directive=$gl_cv_next_string_h
15037      fi
15038      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15039
15040
15041
15042
15043
15044
15045     for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r      strerror_r strsignal strverscmp; do
15046     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15047     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15048 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
15049 if eval \${$as_gl_Symbol+:} false; then :
15050   printf %s "(cached) " >&6
15051 else
15052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h.  */
15054 #include <string.h>
15055
15056 int
15057 main ()
15058 {
15059 #undef $gl_func
15060   (void) $gl_func;
15061   ;
15062   return 0;
15063 }
15064 _ACEOF
15065 if ac_fn_c_try_compile "$LINENO"; then :
15066   eval "$as_gl_Symbol=yes"
15067 else
15068   eval "$as_gl_Symbol=no"
15069 fi
15070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15071 fi
15072 eval ac_res=\$$as_gl_Symbol
15073                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15074 printf "%s\n" "$ac_res" >&6; }
15075     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15076   cat >>confdefs.h <<_ACEOF
15077 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15078 _ACEOF
15079
15080                      eval ac_cv_have_decl_$gl_func=yes
15081 fi
15082       done
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099      if test $gl_cv_have_include_next = yes; then
15100        gl_cv_next_strings_h='<'strings.h'>'
15101      else
15102        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15103 printf %s "checking absolute name of <strings.h>... " >&6; }
15104 if ${gl_cv_next_strings_h+:} false; then :
15105   printf %s "(cached) " >&6
15106 else
15107
15108              if test $ac_cv_header_strings_h = yes; then
15109
15110
15111                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15112 /* end confdefs.h.  */
15113 #include <strings.h>
15114
15115 _ACEOF
15116                                                                                                                         case "$host_os" in
15117                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15118                  *)    gl_absname_cpp="$ac_cpp" ;;
15119                esac
15120
15121                case "$host_os" in
15122                  mingw*)
15123                                                                                                                                      gl_dirsep_regex='[/\\]'
15124                    ;;
15125                  *)
15126                    gl_dirsep_regex='\/'
15127                    ;;
15128                esac
15129                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15130
15131                gl_header_literal_regex=`echo 'strings.h' \
15132                                         | sed -e "$gl_make_literal_regex_sed"`
15133                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15134                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15135                    s|^/[^/]|//&|
15136                    p
15137                    q
15138                  }'
15139                                                             gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15140                       sed -n "$gl_absolute_header_sed"`'"'
15141           else
15142                gl_cv_next_strings_h='<'strings.h'>'
15143              fi
15144
15145
15146 fi
15147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15148 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
15149      fi
15150      NEXT_STRINGS_H=$gl_cv_next_strings_h
15151
15152      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15153        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15154        gl_next_as_first_directive='<'strings.h'>'
15155      else
15156        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15157        gl_next_as_first_directive=$gl_cv_next_strings_h
15158      fi
15159      NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15160
15161
15162
15163
15164   if test $ac_cv_header_strings_h = yes; then
15165     HAVE_STRINGS_H=1
15166   else
15167     HAVE_STRINGS_H=0
15168   fi
15169
15170
15171
15172     for gl_func in ffs strcasecmp strncasecmp; do
15173     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15174     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15175 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
15176 if eval \${$as_gl_Symbol+:} false; then :
15177   printf %s "(cached) " >&6
15178 else
15179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15180 /* end confdefs.h.  */
15181
15182     /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15183        <strings.h>.  */
15184     #include <sys/types.h>
15185     #include <strings.h>
15186
15187 int
15188 main ()
15189 {
15190 #undef $gl_func
15191   (void) $gl_func;
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 if ac_fn_c_try_compile "$LINENO"; then :
15197   eval "$as_gl_Symbol=yes"
15198 else
15199   eval "$as_gl_Symbol=no"
15200 fi
15201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15202 fi
15203 eval ac_res=\$$as_gl_Symbol
15204                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15205 printf "%s\n" "$ac_res" >&6; }
15206     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15207   cat >>confdefs.h <<_ACEOF
15208 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15209 _ACEOF
15210
15211                      eval ac_cv_have_decl_$gl_func=yes
15212 fi
15213       done
15214
15215
15216 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15217 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15218   ac_have_decl=1
15219 else
15220   ac_have_decl=0
15221 fi
15222
15223 cat >>confdefs.h <<_ACEOF
15224 #define HAVE_DECL_STRNDUP $ac_have_decl
15225 _ACEOF
15226
15227
15228
15229 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15230 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15231   ac_have_decl=1
15232 else
15233   ac_have_decl=0
15234 fi
15235
15236 cat >>confdefs.h <<_ACEOF
15237 #define HAVE_DECL_STRNLEN $ac_have_decl
15238 _ACEOF
15239
15240
15241
15242
15243
15244 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15245 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15246   ac_have_decl=1
15247 else
15248   ac_have_decl=0
15249 fi
15250
15251 cat >>confdefs.h <<_ACEOF
15252 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15253 _ACEOF
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273      if test $gl_cv_have_include_next = yes; then
15274        gl_cv_next_sys_types_h='<'sys/types.h'>'
15275      else
15276        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15277 printf %s "checking absolute name of <sys/types.h>... " >&6; }
15278 if ${gl_cv_next_sys_types_h+:} false; then :
15279   printf %s "(cached) " >&6
15280 else
15281
15282                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15283 /* end confdefs.h.  */
15284 #include <sys/types.h>
15285
15286 _ACEOF
15287                                                                                                                         case "$host_os" in
15288                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15289                  *)    gl_absname_cpp="$ac_cpp" ;;
15290                esac
15291
15292                case "$host_os" in
15293                  mingw*)
15294                                                                                                                                      gl_dirsep_regex='[/\\]'
15295                    ;;
15296                  *)
15297                    gl_dirsep_regex='\/'
15298                    ;;
15299                esac
15300                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15301
15302                gl_header_literal_regex=`echo 'sys/types.h' \
15303                                         | sed -e "$gl_make_literal_regex_sed"`
15304                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15305                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15306                    s|^/[^/]|//&|
15307                    p
15308                    q
15309                  }'
15310                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15311                       sed -n "$gl_absolute_header_sed"`'"'
15312
15313
15314 fi
15315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15316 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
15317      fi
15318      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15319
15320      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15321        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15322        gl_next_as_first_directive='<'sys/types.h'>'
15323      else
15324        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15325        gl_next_as_first_directive=$gl_cv_next_sys_types_h
15326      fi
15327      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340   GNULIB_WAITPID=0;
15341
15342
15343
15344
15345
15346   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15347 printf %s "checking for struct timespec in <time.h>... " >&6; }
15348 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15349   printf %s "(cached) " >&6
15350 else
15351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15352 /* end confdefs.h.  */
15353 #include <time.h>
15354
15355 int
15356 main ()
15357 {
15358 static struct timespec x; x.tv_sec = x.tv_nsec;
15359   ;
15360   return 0;
15361 }
15362 _ACEOF
15363 if ac_fn_c_try_compile "$LINENO"; then :
15364   gl_cv_sys_struct_timespec_in_time_h=yes
15365 else
15366   gl_cv_sys_struct_timespec_in_time_h=no
15367 fi
15368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15369 fi
15370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15371 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15372
15373   TIME_H_DEFINES_STRUCT_TIMESPEC=0
15374   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15375   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15376   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15377     TIME_H_DEFINES_STRUCT_TIMESPEC=1
15378   else
15379     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15380 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
15381 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15382   printf %s "(cached) " >&6
15383 else
15384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h.  */
15386 #include <sys/time.h>
15387
15388 int
15389 main ()
15390 {
15391 static struct timespec x; x.tv_sec = x.tv_nsec;
15392   ;
15393   return 0;
15394 }
15395 _ACEOF
15396 if ac_fn_c_try_compile "$LINENO"; then :
15397   gl_cv_sys_struct_timespec_in_sys_time_h=yes
15398 else
15399   gl_cv_sys_struct_timespec_in_sys_time_h=no
15400 fi
15401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15402 fi
15403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15404 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15405     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15406       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15407     else
15408       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15409 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
15410 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15411   printf %s "(cached) " >&6
15412 else
15413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h.  */
15415 #include <pthread.h>
15416
15417 int
15418 main ()
15419 {
15420 static struct timespec x; x.tv_sec = x.tv_nsec;
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 if ac_fn_c_try_compile "$LINENO"; then :
15426   gl_cv_sys_struct_timespec_in_pthread_h=yes
15427 else
15428   gl_cv_sys_struct_timespec_in_pthread_h=no
15429 fi
15430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15431 fi
15432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15433 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15434       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15435         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15436       fi
15437     fi
15438   fi
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454      if test $gl_cv_have_include_next = yes; then
15455        gl_cv_next_time_h='<'time.h'>'
15456      else
15457        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15458 printf %s "checking absolute name of <time.h>... " >&6; }
15459 if ${gl_cv_next_time_h+:} false; then :
15460   printf %s "(cached) " >&6
15461 else
15462
15463                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15464 /* end confdefs.h.  */
15465 #include <time.h>
15466
15467 _ACEOF
15468                                                                                                                         case "$host_os" in
15469                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
15470                  *)    gl_absname_cpp="$ac_cpp" ;;
15471                esac
15472
15473                case "$host_os" in
15474                  mingw*)
15475                                                                                                                                      gl_dirsep_regex='[/\\]'
15476                    ;;
15477                  *)
15478                    gl_dirsep_regex='\/'
15479                    ;;
15480                esac
15481                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15482
15483                gl_header_literal_regex=`echo 'time.h' \
15484                                         | sed -e "$gl_make_literal_regex_sed"`
15485                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15486                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15487                    s|^/[^/]|//&|
15488                    p
15489                    q
15490                  }'
15491                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15492                       sed -n "$gl_absolute_header_sed"`'"'
15493
15494
15495 fi
15496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15497 printf "%s\n" "$gl_cv_next_time_h" >&6; }
15498      fi
15499      NEXT_TIME_H=$gl_cv_next_time_h
15500
15501      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15502        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15503        gl_next_as_first_directive='<'time.h'>'
15504      else
15505        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15506        gl_next_as_first_directive=$gl_cv_next_time_h
15507      fi
15508      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15524 i\
15525 0
15526 q
15527 '
15528 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15529 i\
15530 0
15531 q
15532 '
15533 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;}
15534 i\
15535 0
15536 q
15537 '
15538
15539
15540   if test "$HAVE_LIBUNISTRING" = yes; then
15541     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15542     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15543     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15544   fi
15545
15546 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
15547 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
15548   ac_have_decl=1
15549 else
15550   ac_have_decl=0
15551 fi
15552
15553 cat >>confdefs.h <<_ACEOF
15554 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
15555 _ACEOF
15556
15557 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
15558 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
15559   ac_have_decl=1
15560 else
15561   ac_have_decl=0
15562 fi
15563
15564 cat >>confdefs.h <<_ACEOF
15565 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
15566 _ACEOF
15567
15568 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
15569 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
15570   ac_have_decl=1
15571 else
15572   ac_have_decl=0
15573 fi
15574
15575 cat >>confdefs.h <<_ACEOF
15576 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
15577 _ACEOF
15578
15579 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
15580 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
15581   ac_have_decl=1
15582 else
15583   ac_have_decl=0
15584 fi
15585
15586 cat >>confdefs.h <<_ACEOF
15587 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
15588 _ACEOF
15589
15590 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
15591 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
15592   ac_have_decl=1
15593 else
15594   ac_have_decl=0
15595 fi
15596
15597 cat >>confdefs.h <<_ACEOF
15598 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
15599 _ACEOF
15600
15601 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
15602 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
15603   ac_have_decl=1
15604 else
15605   ac_have_decl=0
15606 fi
15607
15608 cat >>confdefs.h <<_ACEOF
15609 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
15610 _ACEOF
15611
15612 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
15613 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
15614   ac_have_decl=1
15615 else
15616   ac_have_decl=0
15617 fi
15618
15619 cat >>confdefs.h <<_ACEOF
15620 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
15621 _ACEOF
15622
15623 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
15624 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
15625   ac_have_decl=1
15626 else
15627   ac_have_decl=0
15628 fi
15629
15630 cat >>confdefs.h <<_ACEOF
15631 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
15632 _ACEOF
15633
15634 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
15635 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
15636   ac_have_decl=1
15637 else
15638   ac_have_decl=0
15639 fi
15640
15641 cat >>confdefs.h <<_ACEOF
15642 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
15643 _ACEOF
15644
15645 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
15646 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
15647   ac_have_decl=1
15648 else
15649   ac_have_decl=0
15650 fi
15651
15652 cat >>confdefs.h <<_ACEOF
15653 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
15654 _ACEOF
15655
15656 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
15657 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
15658   ac_have_decl=1
15659 else
15660   ac_have_decl=0
15661 fi
15662
15663 cat >>confdefs.h <<_ACEOF
15664 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
15665 _ACEOF
15666
15667 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
15668 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
15669   ac_have_decl=1
15670 else
15671   ac_have_decl=0
15672 fi
15673
15674 cat >>confdefs.h <<_ACEOF
15675 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
15676 _ACEOF
15677
15678
15679
15680
15681
15682
15683
15684   if test $ac_cv_header_features_h = yes; then
15685     HAVE_FEATURES_H=1
15686   else
15687     HAVE_FEATURES_H=0
15688   fi
15689
15690
15691
15692   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
15693 printf %s "checking for inttypes.h... " >&6; }
15694 if ${gl_cv_header_inttypes_h+:} false; then :
15695   printf %s "(cached) " >&6
15696 else
15697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698 /* end confdefs.h.  */
15699
15700 #include <sys/types.h>
15701 #include <inttypes.h>
15702
15703 int
15704 main ()
15705 {
15706 uintmax_t i = (uintmax_t) -1; return !i;
15707   ;
15708   return 0;
15709 }
15710 _ACEOF
15711 if ac_fn_c_try_compile "$LINENO"; then :
15712   gl_cv_header_inttypes_h=yes
15713 else
15714   gl_cv_header_inttypes_h=no
15715 fi
15716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15717 fi
15718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
15719 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
15720   if test $gl_cv_header_inttypes_h = yes; then
15721
15722 cat >>confdefs.h <<_ACEOF
15723 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
15724 _ACEOF
15725
15726   fi
15727
15728
15729   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
15730 printf %s "checking for stdint.h... " >&6; }
15731 if ${gl_cv_header_stdint_h+:} false; then :
15732   printf %s "(cached) " >&6
15733 else
15734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15735 /* end confdefs.h.  */
15736 #include <sys/types.h>
15737             #include <stdint.h>
15738 int
15739 main ()
15740 {
15741 uintmax_t i = (uintmax_t) -1; return !i;
15742   ;
15743   return 0;
15744 }
15745 _ACEOF
15746 if ac_fn_c_try_compile "$LINENO"; then :
15747   gl_cv_header_stdint_h=yes
15748 else
15749   gl_cv_header_stdint_h=no
15750 fi
15751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15752 fi
15753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
15754 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
15755   if test $gl_cv_header_stdint_h = yes; then
15756
15757 cat >>confdefs.h <<_ACEOF
15758 #define HAVE_STDINT_H_WITH_UINTMAX 1
15759 _ACEOF
15760
15761   fi
15762
15763
15764
15765
15766   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
15767 printf %s "checking for intmax_t... " >&6; }
15768 if ${gt_cv_c_intmax_t+:} false; then :
15769   printf %s "(cached) " >&6
15770 else
15771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h.  */
15773
15774 #include <stddef.h>
15775 #include <stdlib.h>
15776 #if HAVE_STDINT_H_WITH_UINTMAX
15777 #include <stdint.h>
15778 #endif
15779 #if HAVE_INTTYPES_H_WITH_UINTMAX
15780 #include <inttypes.h>
15781 #endif
15782
15783 int
15784 main ()
15785 {
15786 intmax_t x = -1; return !x;
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 if ac_fn_c_try_compile "$LINENO"; then :
15792   gt_cv_c_intmax_t=yes
15793 else
15794   gt_cv_c_intmax_t=no
15795 fi
15796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15797 fi
15798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
15799 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
15800   if test $gt_cv_c_intmax_t = yes; then
15801
15802 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
15803
15804   else
15805
15806     test $ac_cv_type_long_long_int = yes \
15807       && ac_type='long long' \
15808       || ac_type='long'
15809
15810 cat >>confdefs.h <<_ACEOF
15811 #define intmax_t $ac_type
15812 _ACEOF
15813
15814   fi
15815
15816
15817   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
15818 printf %s "checking where to find the exponent in a 'double'... " >&6; }
15819 if ${gl_cv_cc_double_expbit0+:} false; then :
15820   printf %s "(cached) " >&6
15821 else
15822
15823       if test "$cross_compiling" = yes; then :
15824
15825                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15826 /* end confdefs.h.  */
15827
15828 #if defined arm || defined __arm || defined __arm__
15829   mixed_endianness
15830 #endif
15831
15832 _ACEOF
15833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15834   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
15835   gl_cv_cc_double_expbit0="unknown"
15836 else
15837
15838                                                          :
15839 if ${ac_cv_c_bigendian+:} false; then :
15840   printf %s "(cached) " >&6
15841 else
15842   ac_cv_c_bigendian=unknown
15843     # See if we're dealing with a universal compiler.
15844     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15845 /* end confdefs.h.  */
15846 #ifndef __APPLE_CC__
15847                not a universal capable compiler
15848              #endif
15849              typedef int dummy;
15850
15851 _ACEOF
15852 if ac_fn_c_try_compile "$LINENO"; then :
15853
15854         # Check for potential -arch flags.  It is not universal unless
15855         # there are at least two -arch flags with different values.
15856         ac_arch=
15857         ac_prev=
15858         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15859          if test -n "$ac_prev"; then
15860            case $ac_word in
15861              i?86 | x86_64 | ppc | ppc64)
15862                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15863                  ac_arch=$ac_word
15864                else
15865                  ac_cv_c_bigendian=universal
15866                  break
15867                fi
15868                ;;
15869            esac
15870            ac_prev=
15871          elif test "x$ac_word" = "x-arch"; then
15872            ac_prev=arch
15873          fi
15874        done
15875 fi
15876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877     if test $ac_cv_c_bigendian = unknown; then
15878       # See if sys/param.h defines the BYTE_ORDER macro.
15879       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880 /* end confdefs.h.  */
15881 #include <sys/types.h>
15882              #include <sys/param.h>
15883
15884 int
15885 main ()
15886 {
15887 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15888                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15889                      && LITTLE_ENDIAN)
15890               bogus endian macros
15891              #endif
15892
15893   ;
15894   return 0;
15895 }
15896 _ACEOF
15897 if ac_fn_c_try_compile "$LINENO"; then :
15898   # It does; now see whether it defined to BIG_ENDIAN or not.
15899          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h.  */
15901 #include <sys/types.h>
15902                 #include <sys/param.h>
15903
15904 int
15905 main ()
15906 {
15907 #if BYTE_ORDER != BIG_ENDIAN
15908                  not big endian
15909                 #endif
15910
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 if ac_fn_c_try_compile "$LINENO"; then :
15916   ac_cv_c_bigendian=yes
15917 else
15918   ac_cv_c_bigendian=no
15919 fi
15920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15921 fi
15922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15923     fi
15924     if test $ac_cv_c_bigendian = unknown; then
15925       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15926       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15927 /* end confdefs.h.  */
15928 #include <limits.h>
15929
15930 int
15931 main ()
15932 {
15933 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15934               bogus endian macros
15935              #endif
15936
15937   ;
15938   return 0;
15939 }
15940 _ACEOF
15941 if ac_fn_c_try_compile "$LINENO"; then :
15942   # It does; now see whether it defined to _BIG_ENDIAN or not.
15943          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15944 /* end confdefs.h.  */
15945 #include <limits.h>
15946
15947 int
15948 main ()
15949 {
15950 #ifndef _BIG_ENDIAN
15951                  not big endian
15952                 #endif
15953
15954   ;
15955   return 0;
15956 }
15957 _ACEOF
15958 if ac_fn_c_try_compile "$LINENO"; then :
15959   ac_cv_c_bigendian=yes
15960 else
15961   ac_cv_c_bigendian=no
15962 fi
15963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964 fi
15965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15966     fi
15967     if test $ac_cv_c_bigendian = unknown; then
15968       # Compile a test program.
15969       if test "$cross_compiling" = yes; then :
15970   # Try to guess by grepping values from an object file.
15971          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972 /* end confdefs.h.  */
15973 short int ascii_mm[] =
15974                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15975                 short int ascii_ii[] =
15976                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15977                 int use_ascii (int i) {
15978                   return ascii_mm[i] + ascii_ii[i];
15979                 }
15980                 short int ebcdic_ii[] =
15981                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15982                 short int ebcdic_mm[] =
15983                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15984                 int use_ebcdic (int i) {
15985                   return ebcdic_mm[i] + ebcdic_ii[i];
15986                 }
15987                 extern int foo;
15988
15989 int
15990 main ()
15991 {
15992 return use_ascii (foo) == use_ebcdic (foo);
15993   ;
15994   return 0;
15995 }
15996 _ACEOF
15997 if ac_fn_c_try_compile "$LINENO"; then :
15998   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15999               ac_cv_c_bigendian=yes
16000             fi
16001             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16002               if test "$ac_cv_c_bigendian" = unknown; then
16003                 ac_cv_c_bigendian=no
16004               else
16005                 # finding both strings is unlikely to happen, but who knows?
16006                 ac_cv_c_bigendian=unknown
16007               fi
16008             fi
16009 fi
16010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16011 else
16012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16013 /* end confdefs.h.  */
16014 $ac_includes_default
16015 int
16016 main ()
16017 {
16018
16019              /* Are we little or big endian?  From Harbison&Steele.  */
16020              union
16021              {
16022                long int l;
16023                char c[sizeof (long int)];
16024              } u;
16025              u.l = 1;
16026              return u.c[sizeof (long int) - 1] == 1;
16027
16028   ;
16029   return 0;
16030 }
16031 _ACEOF
16032 if ac_fn_c_try_run "$LINENO"; then :
16033   ac_cv_c_bigendian=no
16034 else
16035   ac_cv_c_bigendian=yes
16036 fi
16037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16038   conftest.$ac_objext conftest.beam conftest.$ac_ext
16039 fi
16040
16041     fi
16042 fi
16043 :
16044  case $ac_cv_c_bigendian in #(
16045    yes)
16046      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16047    no)
16048      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16049    universal)
16050
16051 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16052
16053      ;; #(
16054    *)
16055      gl_cv_cc_double_expbit0="unknown" ;;
16056  esac
16057
16058
16059 fi
16060 rm -rf conftest*
16061
16062
16063 else
16064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h.  */
16066
16067 #include <float.h>
16068 #include <stddef.h>
16069 #include <stdio.h>
16070 #include <string.h>
16071 #define NWORDS \
16072   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16073 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16074 static unsigned int ored_words[NWORDS];
16075 static unsigned int anded_words[NWORDS];
16076 static void add_to_ored_words (double x)
16077 {
16078   memory_double m;
16079   size_t i;
16080   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
16081   memset (&m, 0, sizeof (memory_double));
16082   m.value = x;
16083   for (i = 0; i < NWORDS; i++)
16084     {
16085       ored_words[i] |= m.word[i];
16086       anded_words[i] &= m.word[i];
16087     }
16088 }
16089 int main ()
16090 {
16091   size_t j;
16092   FILE *fp = fopen ("conftest.out", "w");
16093   if (fp == NULL)
16094     return 1;
16095   for (j = 0; j < NWORDS; j++)
16096     anded_words[j] = ~ (unsigned int) 0;
16097   add_to_ored_words (0.25);
16098   add_to_ored_words (0.5);
16099   add_to_ored_words (1.0);
16100   add_to_ored_words (2.0);
16101   add_to_ored_words (4.0);
16102   /* Remove bits that are common (e.g. if representation of the first mantissa
16103      bit is explicit).  */
16104   for (j = 0; j < NWORDS; j++)
16105     ored_words[j] &= ~anded_words[j];
16106   /* Now find the nonzero word.  */
16107   for (j = 0; j < NWORDS; j++)
16108     if (ored_words[j] != 0)
16109       break;
16110   if (j < NWORDS)
16111     {
16112       size_t i;
16113       for (i = j + 1; i < NWORDS; i++)
16114         if (ored_words[i] != 0)
16115           {
16116             fprintf (fp, "unknown");
16117             return (fclose (fp) != 0);
16118           }
16119       for (i = 0; ; i++)
16120         if ((ored_words[j] >> i) & 1)
16121           {
16122             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16123             return (fclose (fp) != 0);
16124           }
16125     }
16126   fprintf (fp, "unknown");
16127   return (fclose (fp) != 0);
16128 }
16129
16130 _ACEOF
16131 if ac_fn_c_try_run "$LINENO"; then :
16132   gl_cv_cc_double_expbit0=`cat conftest.out`
16133 else
16134   gl_cv_cc_double_expbit0="unknown"
16135 fi
16136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16137   conftest.$ac_objext conftest.beam conftest.$ac_ext
16138 fi
16139
16140       rm -f conftest.out
16141
16142 fi
16143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16144 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
16145   case "$gl_cv_cc_double_expbit0" in
16146     word*bit*)
16147       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16148       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16149
16150 cat >>confdefs.h <<_ACEOF
16151 #define DBL_EXPBIT0_WORD $word
16152 _ACEOF
16153
16154
16155 cat >>confdefs.h <<_ACEOF
16156 #define DBL_EXPBIT0_BIT $bit
16157 _ACEOF
16158
16159       ;;
16160   esac
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
16171 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
16172 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
16173   printf %s "(cached) " >&6
16174 else
16175
16176       if test "$cross_compiling" = yes; then :
16177
16178          case "$host_os" in
16179                                  # Guess yes on glibc systems.
16180            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
16181                                  # Guess yes on FreeBSD >= 5.
16182            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
16183            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16184                                  # Guess yes on Mac OS X >= 10.3.
16185            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
16186            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
16187                                  # Guess yes on OpenBSD >= 3.9.
16188            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
16189                                  gl_cv_func_snprintf_retval_c99="guessing no";;
16190            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
16191                                  # Guess yes on Solaris >= 2.10.
16192            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
16193            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
16194                                  # Guess yes on AIX >= 4.
16195            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
16196            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
16197                                  # Guess yes on NetBSD >= 3.
16198            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
16199                                  gl_cv_func_snprintf_retval_c99="guessing no";;
16200            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
16201                                  # Guess yes on BeOS.
16202            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
16203                                  # If we don't know, assume the worst.
16204            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
16205          esac
16206
16207 else
16208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209 /* end confdefs.h.  */
16210
16211 #include <stdio.h>
16212 #include <string.h>
16213 #if HAVE_SNPRINTF
16214 # define my_snprintf snprintf
16215 #else
16216 # include <stdarg.h>
16217 static int my_snprintf (char *buf, int size, const char *format, ...)
16218 {
16219   va_list args;
16220   int ret;
16221   va_start (args, format);
16222   ret = vsnprintf (buf, size, format, args);
16223   va_end (args);
16224   return ret;
16225 }
16226 #endif
16227 static char buf[100];
16228 int main ()
16229 {
16230   strcpy (buf, "ABCDEF");
16231   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
16232     return 1;
16233   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
16234     return 2;
16235   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
16236     return 3;
16237   return 0;
16238 }
16239 _ACEOF
16240 if ac_fn_c_try_run "$LINENO"; then :
16241   gl_cv_func_snprintf_retval_c99=yes
16242 else
16243   gl_cv_func_snprintf_retval_c99=no
16244 fi
16245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16246   conftest.$ac_objext conftest.beam conftest.$ac_ext
16247 fi
16248
16249
16250 fi
16251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
16252 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
16253
16254
16255
16256
16257
16258
16259   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16260 do :
16261   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
16262 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16263 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16264   cat >>confdefs.h <<_ACEOF
16265 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
16266 _ACEOF
16267
16268 fi
16269 done
16270
16271       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16272 "
16273 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16274   ac_have_decl=1
16275 else
16276   ac_have_decl=0
16277 fi
16278
16279 cat >>confdefs.h <<_ACEOF
16280 #define HAVE_DECL__SNPRINTF $ac_have_decl
16281 _ACEOF
16282
16283
16284
16285   case "$gl_cv_func_snprintf_retval_c99" in
16286     *yes)
16287
16288 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16289
16290       ;;
16291   esac
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16305 printf %s "checking if environ is properly declared... " >&6; }
16306   if ${gt_cv_var_environ_declaration+:} false; then :
16307   printf %s "(cached) " >&6
16308 else
16309
16310     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16311 /* end confdefs.h.  */
16312 #if HAVE_UNISTD_H
16313      #include <unistd.h>
16314      #endif
16315      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
16316      #include <stdlib.h>
16317
16318            extern struct { int foo; } environ;
16319 int
16320 main ()
16321 {
16322 environ.foo = 1;
16323   ;
16324   return 0;
16325 }
16326 _ACEOF
16327 if ac_fn_c_try_compile "$LINENO"; then :
16328   gt_cv_var_environ_declaration=no
16329 else
16330   gt_cv_var_environ_declaration=yes
16331 fi
16332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16333 fi
16334
16335   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16336 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
16337   if test $gt_cv_var_environ_declaration = yes; then
16338
16339 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16340
16341   fi
16342
16343
16344   if test $gt_cv_var_environ_declaration != yes; then
16345     HAVE_DECL_ENVIRON=0
16346   fi
16347
16348
16349
16350    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
16351 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
16352 if ${gl_cv_func_getcwd_null+:} false; then :
16353   printf %s "(cached) " >&6
16354 else
16355   if test "$cross_compiling" = yes; then :
16356   case "$host_os" in
16357                      # Guess yes on glibc systems.
16358             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
16359                      # Guess yes on Cygwin.
16360             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
16361                      # If we don't know, assume the worst.
16362             *)       gl_cv_func_getcwd_null="guessing no";;
16363           esac
16364
16365 else
16366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16367 /* end confdefs.h.  */
16368
16369 #        if HAVE_UNISTD_H
16370 #         include <unistd.h>
16371 #        else /* on Windows with MSVC */
16372 #         include <direct.h>
16373 #        endif
16374 #        ifndef getcwd
16375          char *getcwd ();
16376 #        endif
16377
16378 int
16379 main ()
16380 {
16381
16382 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16383 /* mingw cwd does not start with '/', but getcwd does allocate.
16384    However, mingw fails to honor non-zero size.  */
16385 #else
16386            if (chdir ("/") != 0)
16387              return 1;
16388            else
16389              {
16390                char *f = getcwd (NULL, 0);
16391                if (! f)
16392                  return 2;
16393                if (f[0] != '/')
16394                  return 3;
16395                if (f[1] != '\0')
16396                  return 4;
16397                return 0;
16398              }
16399 #endif
16400
16401   ;
16402   return 0;
16403 }
16404 _ACEOF
16405 if ac_fn_c_try_run "$LINENO"; then :
16406   gl_cv_func_getcwd_null=yes
16407 else
16408   gl_cv_func_getcwd_null=no
16409 fi
16410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16411   conftest.$ac_objext conftest.beam conftest.$ac_ext
16412 fi
16413
16414 fi
16415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
16416 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
16417
16418
16419   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
16420 printf %s "checking for getcwd with POSIX signature... " >&6; }
16421 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
16422   printf %s "(cached) " >&6
16423 else
16424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425 /* end confdefs.h.  */
16426 #include <unistd.h>
16427 int
16428 main ()
16429 {
16430 extern
16431            #ifdef __cplusplus
16432            "C"
16433            #endif
16434            char *getcwd (char *, size_t);
16435
16436   ;
16437   return 0;
16438 }
16439
16440 _ACEOF
16441 if ac_fn_c_try_compile "$LINENO"; then :
16442   gl_cv_func_getcwd_posix_signature=yes
16443 else
16444   gl_cv_func_getcwd_posix_signature=no
16445 fi
16446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16447
16448 fi
16449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
16450 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
16451
16452
16453
16454 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16455 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16456   ac_have_decl=1
16457 else
16458   ac_have_decl=0
16459 fi
16460
16461 cat >>confdefs.h <<_ACEOF
16462 #define HAVE_DECL_SETENV $ac_have_decl
16463 _ACEOF
16464
16465
16466
16467
16468
16469
16470   if test $ac_cv_have_decl_setenv = no; then
16471     HAVE_DECL_SETENV=0
16472   fi
16473
16474
16475
16476
16477
16478   for ac_header in search.h
16479 do :
16480   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16481 if test "x$ac_cv_header_search_h" = xyes; then :
16482   cat >>confdefs.h <<_ACEOF
16483 #define HAVE_SEARCH_H 1
16484 _ACEOF
16485
16486 fi
16487
16488 done
16489
16490   for ac_func in tsearch
16491 do :
16492   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16493 if test "x$ac_cv_func_tsearch" = xyes; then :
16494   cat >>confdefs.h <<_ACEOF
16495 #define HAVE_TSEARCH 1
16496 _ACEOF
16497
16498 fi
16499 done
16500
16501
16502
16503
16504
16505 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
16506 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
16507   ac_have_decl=1
16508 else
16509   ac_have_decl=0
16510 fi
16511
16512 cat >>confdefs.h <<_ACEOF
16513 #define HAVE_DECL_SNPRINTF $ac_have_decl
16514 _ACEOF
16515
16516 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16517 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
16518   ac_have_decl=1
16519 else
16520   ac_have_decl=0
16521 fi
16522
16523 cat >>confdefs.h <<_ACEOF
16524 #define HAVE_DECL_UNSETENV $ac_have_decl
16525 _ACEOF
16526
16527
16528
16529
16530
16531
16532    if false; then
16533   GL_COND_LIBTOOL_TRUE=
16534   GL_COND_LIBTOOL_FALSE='#'
16535 else
16536   GL_COND_LIBTOOL_TRUE='#'
16537   GL_COND_LIBTOOL_FALSE=
16538 fi
16539
16540   gl_cond_libtool=false
16541   gl_libdeps=
16542   gl_ltlibdeps=
16543   gl_m4_base='m4'
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553   gl_source_base='lib'
16554
16555
16556   if test $ac_cv_func_alloca_works = no; then
16557     :
16558   fi
16559
16560   # Define an additional variable used in the Makefile substitution.
16561   if test $ac_cv_working_alloca_h = yes; then
16562     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16563 printf %s "checking for alloca as a compiler built-in... " >&6; }
16564 if ${gl_cv_rpl_alloca+:} false; then :
16565   printf %s "(cached) " >&6
16566 else
16567
16568       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16569 /* end confdefs.h.  */
16570
16571 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16572         Need own alloca
16573 #endif
16574
16575 _ACEOF
16576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16577   $EGREP "Need own alloca" >/dev/null 2>&1; then :
16578   gl_cv_rpl_alloca=yes
16579 else
16580   gl_cv_rpl_alloca=no
16581 fi
16582 rm -rf conftest*
16583
16584
16585 fi
16586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16587 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
16588     if test $gl_cv_rpl_alloca = yes; then
16589
16590 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
16591
16592       ALLOCA_H=alloca.h
16593     else
16594                   ALLOCA_H=
16595     fi
16596   else
16597     ALLOCA_H=alloca.h
16598   fi
16599
16600    if test -n "$ALLOCA_H"; then
16601   GL_GENERATE_ALLOCA_H_TRUE=
16602   GL_GENERATE_ALLOCA_H_FALSE='#'
16603 else
16604   GL_GENERATE_ALLOCA_H_TRUE='#'
16605   GL_GENERATE_ALLOCA_H_FALSE=
16606 fi
16607
16608
16609
16610
16611
16612
16613
16614
16615   if test $ac_cv_func_btowc = no; then
16616     HAVE_BTOWC=0
16617   else
16618
16619
16620
16621
16622         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16623 printf %s "checking whether btowc(0) is correct... " >&6; }
16624 if ${gl_cv_func_btowc_nul+:} false; then :
16625   printf %s "(cached) " >&6
16626 else
16627
16628         if test "$cross_compiling" = yes; then :
16629
16630            case "$host_os" in
16631                       # Guess no on Cygwin.
16632              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16633                       # Guess yes otherwise.
16634              *)       gl_cv_func_btowc_nul="guessing yes" ;;
16635            esac
16636
16637 else
16638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16639 /* end confdefs.h.  */
16640
16641 #include <string.h>
16642 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16643    <wchar.h>.
16644    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16645    included before <wchar.h>.  */
16646 #include <stddef.h>
16647 #include <stdio.h>
16648 #include <time.h>
16649 #include <wchar.h>
16650 int main ()
16651 {
16652   if (btowc ('\0') != 0)
16653     return 1;
16654   return 0;
16655 }
16656 _ACEOF
16657 if ac_fn_c_try_run "$LINENO"; then :
16658   gl_cv_func_btowc_nul=yes
16659 else
16660   gl_cv_func_btowc_nul=no
16661 fi
16662 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16663   conftest.$ac_objext conftest.beam conftest.$ac_ext
16664 fi
16665
16666
16667 fi
16668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16669 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
16670
16671         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16672 printf %s "checking whether btowc(EOF) is correct... " >&6; }
16673 if ${gl_cv_func_btowc_eof+:} false; then :
16674   printf %s "(cached) " >&6
16675 else
16676
16677                         case "$host_os" in
16678                  # Guess no on IRIX.
16679           irix*) gl_cv_func_btowc_eof="guessing no" ;;
16680                  # Guess yes otherwise.
16681           *)     gl_cv_func_btowc_eof="guessing yes" ;;
16682         esac
16683         if test $LOCALE_FR != none; then
16684           if test "$cross_compiling" = yes; then :
16685   :
16686 else
16687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16688 /* end confdefs.h.  */
16689
16690 #include <locale.h>
16691 #include <string.h>
16692 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16693    <wchar.h>.
16694    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16695    included before <wchar.h>.  */
16696 #include <stddef.h>
16697 #include <stdio.h>
16698 #include <time.h>
16699 #include <wchar.h>
16700 int main ()
16701 {
16702   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16703     {
16704       if (btowc (EOF) != WEOF)
16705         return 1;
16706     }
16707   return 0;
16708 }
16709 _ACEOF
16710 if ac_fn_c_try_run "$LINENO"; then :
16711   gl_cv_func_btowc_eof=yes
16712 else
16713   gl_cv_func_btowc_eof=no
16714 fi
16715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16716   conftest.$ac_objext conftest.beam conftest.$ac_ext
16717 fi
16718
16719         fi
16720
16721 fi
16722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16723 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
16724
16725     case "$gl_cv_func_btowc_nul" in
16726       *yes) ;;
16727       *) REPLACE_BTOWC=1 ;;
16728     esac
16729     case "$gl_cv_func_btowc_eof" in
16730       *yes) ;;
16731       *) REPLACE_BTOWC=1 ;;
16732     esac
16733   fi
16734
16735   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16736
16737
16738
16739
16740
16741
16742
16743
16744   gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
16745
16746
16747   :
16748
16749   fi
16750
16751
16752
16753
16754
16755           GNULIB_BTOWC=1
16756
16757
16758
16759
16760
16761 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
16762
16763
16764
16765
16766
16767
16768
16769    # for STACK_DIRECTION
16770
16771
16772
16773    ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
16774 "
16775 if test "x$ac_cv_have_decl_sigaltstack" = xyes; then :
16776   ac_have_decl=1
16777 else
16778   ac_have_decl=0
16779 fi
16780
16781 cat >>confdefs.h <<_ACEOF
16782 #define HAVE_DECL_SIGALTSTACK $ac_have_decl
16783 _ACEOF
16784
16785
16786
16787
16788    ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
16789 "
16790 if test "x$ac_cv_type_stack_t" = xyes; then :
16791
16792 cat >>confdefs.h <<_ACEOF
16793 #define HAVE_STACK_T 1
16794 _ACEOF
16795
16796
16797 fi
16798
16799
16800       if test "$gl_cv_lib_sigsegv" = yes \
16801        && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
16802      LIBCSTACK=$LIBSIGSEGV
16803
16804      LTLIBCSTACK=$LTLIBSIGSEGV
16805
16806    fi
16807
16808
16809
16810
16811
16812
16813   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
16814   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
16815
16816   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
16817   # programs in the package would end up linked with that potentially-shared
16818   # library, inducing unnecessary run-time overhead.
16819   LIB_CLOCK_GETTIME=
16820
16821   gl_saved_libs=$LIBS
16822     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
16823 printf %s "checking for library containing clock_gettime... " >&6; }
16824 if ${ac_cv_search_clock_gettime+:} false; then :
16825   printf %s "(cached) " >&6
16826 else
16827   ac_func_search_save_LIBS=$LIBS
16828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16829 /* end confdefs.h.  */
16830
16831 /* Override any GCC internal prototype to avoid an error.
16832    Use char because int might match the return type of a GCC
16833    builtin and then its argument prototype would still apply.  */
16834 #ifdef __cplusplus
16835 extern "C"
16836 #endif
16837 char clock_gettime ();
16838 int
16839 main ()
16840 {
16841 return clock_gettime ();
16842   ;
16843   return 0;
16844 }
16845 _ACEOF
16846 for ac_lib in '' rt posix4; do
16847   if test -z "$ac_lib"; then
16848     ac_res="none required"
16849   else
16850     ac_res=-l$ac_lib
16851     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16852   fi
16853   if ac_fn_c_try_link "$LINENO"; then :
16854   ac_cv_search_clock_gettime=$ac_res
16855 fi
16856 rm -f core conftest.err conftest.$ac_objext \
16857     conftest$ac_exeext
16858   if ${ac_cv_search_clock_gettime+:} false; then :
16859   break
16860 fi
16861 done
16862 if ${ac_cv_search_clock_gettime+:} false; then :
16863
16864 else
16865   ac_cv_search_clock_gettime=no
16866 fi
16867 rm conftest.$ac_ext
16868 LIBS=$ac_func_search_save_LIBS
16869 fi
16870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
16871 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
16872 ac_res=$ac_cv_search_clock_gettime
16873 if test "$ac_res" != no; then :
16874   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16875   test "$ac_cv_search_clock_gettime" = "none required" ||
16876                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
16877 fi
16878
16879     for ac_func in clock_gettime clock_settime
16880 do :
16881   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
16882 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16883 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16884   cat >>confdefs.h <<_ACEOF
16885 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
16886 _ACEOF
16887
16888 fi
16889 done
16890
16891   LIBS=$gl_saved_libs
16892
16893
16894
16895
16896   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16897     REPLACE_CLOSE=1
16898   fi
16899
16900
16901
16902
16903
16904   if test $ac_cv_header_sys_socket_h != yes; then
16905                     for ac_header in winsock2.h
16906 do :
16907   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16908 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16909   cat >>confdefs.h <<_ACEOF
16910 #define HAVE_WINSOCK2_H 1
16911 _ACEOF
16912
16913 fi
16914
16915 done
16916
16917   fi
16918   if test "$ac_cv_header_winsock2_h" = yes; then
16919     HAVE_WINSOCK2_H=1
16920     UNISTD_H_HAVE_WINSOCK2_H=1
16921     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16922   else
16923     HAVE_WINSOCK2_H=0
16924   fi
16925
16926
16927     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16928                         REPLACE_CLOSE=1
16929     fi
16930
16931
16932
16933   if test $REPLACE_CLOSE = 1; then
16934
16935
16936
16937
16938
16939
16940
16941
16942   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16943
16944   fi
16945
16946
16947
16948
16949
16950           GNULIB_CLOSE=1
16951
16952
16953
16954
16955
16956 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16957
16958
16959
16960
16961
16962           if test "x$datarootdir" = x; then
16963     datarootdir='${datadir}'
16964
16965   fi
16966     if test "x$docdir" = x; then
16967     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16968
16969   fi
16970     if test "x$htmldir" = x; then
16971     htmldir='${docdir}'
16972
16973   fi
16974   if test "x$dvidir" = x; then
16975     dvidir='${docdir}'
16976
16977   fi
16978   if test "x$pdfdir" = x; then
16979     pdfdir='${docdir}'
16980
16981   fi
16982   if test "x$psdir" = x; then
16983     psdir='${docdir}'
16984
16985   fi
16986   if test "x$lispdir" = x; then
16987     lispdir='${datarootdir}/emacs/site-lisp'
16988
16989   fi
16990   if test "x$localedir" = x; then
16991     localedir='${datarootdir}/locale'
16992
16993   fi
16994
16995       pkglibexecdir='${libexecdir}/${PACKAGE}'
16996
16997
16998
16999
17000
17001
17002
17003 cat >>confdefs.h <<_ACEOF
17004 #define GNULIB_DIRNAME 1
17005 _ACEOF
17006
17007
17008
17009
17010
17011
17012
17013
17014   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17015 printf %s "checking whether // is distinct from /... " >&6; }
17016 if ${gl_cv_double_slash_root+:} false; then :
17017   printf %s "(cached) " >&6
17018 else
17019    if test x"$cross_compiling" = xyes ; then
17020         # When cross-compiling, there is no way to tell whether // is special
17021         # short of a list of hosts.  However, the only known hosts to date
17022         # that have a distinct // are Apollo DomainOS (too old to port to),
17023         # Cygwin, and z/OS.  If anyone knows of another system for which // has
17024         # special semantics and is distinct from /, please report it to
17025         # <bug-gnulib@gnu.org>.
17026         case $host in
17027           *-cygwin | i370-ibm-openedition)
17028             gl_cv_double_slash_root=yes ;;
17029           *)
17030             # Be optimistic and assume that / and // are the same when we
17031             # don't know.
17032             gl_cv_double_slash_root='unknown, assuming no' ;;
17033         esac
17034       else
17035         set x `ls -di / // 2>/dev/null`
17036         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17037           gl_cv_double_slash_root=no
17038         else
17039           gl_cv_double_slash_root=yes
17040         fi
17041       fi
17042 fi
17043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17044 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
17045   if test "$gl_cv_double_slash_root" = yes; then
17046
17047 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17048
17049   fi
17050
17051
17052
17053
17054
17055
17056 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
17057
17058
17059   if test $HAVE_DUP2 = 1; then
17060     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17061 printf %s "checking whether dup2 works... " >&6; }
17062 if ${gl_cv_func_dup2_works+:} false; then :
17063   printf %s "(cached) " >&6
17064 else
17065   if test "$cross_compiling" = yes; then :
17066   case "$host_os" in
17067            mingw*) # on this platform, dup2 always returns 0 for success
17068              gl_cv_func_dup2_works="guessing no" ;;
17069            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17070              gl_cv_func_dup2_works="guessing no" ;;
17071            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17072                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17073              gl_cv_func_dup2_works="guessing no" ;;
17074            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17075              gl_cv_func_dup2_works="guessing no" ;;
17076            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17077              gl_cv_func_dup2_works="guessing no" ;;
17078            *) gl_cv_func_dup2_works="guessing yes" ;;
17079          esac
17080 else
17081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082 /* end confdefs.h.  */
17083
17084          #include <unistd.h>
17085 #include <fcntl.h>
17086 #include <errno.h>
17087 int
17088 main ()
17089 {
17090 int result = 0;
17091 #ifdef FD_CLOEXEC
17092             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17093               result |= 1;
17094 #endif
17095             if (dup2 (1, 1) == 0)
17096               result |= 2;
17097 #ifdef FD_CLOEXEC
17098             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17099               result |= 4;
17100 #endif
17101             close (0);
17102             if (dup2 (0, 0) != -1)
17103               result |= 8;
17104             /* Many gnulib modules require POSIX conformance of EBADF.  */
17105             if (dup2 (2, 1000000) == -1 && errno != EBADF)
17106               result |= 16;
17107             /* Flush out a cygwin core dump.  */
17108             if (dup2 (2, -1) != -1 || errno != EBADF)
17109               result |= 32;
17110             return result;
17111
17112   ;
17113   return 0;
17114 }
17115
17116 _ACEOF
17117 if ac_fn_c_try_run "$LINENO"; then :
17118   gl_cv_func_dup2_works=yes
17119 else
17120   gl_cv_func_dup2_works=no
17121 fi
17122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17123   conftest.$ac_objext conftest.beam conftest.$ac_ext
17124 fi
17125
17126
17127 fi
17128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17129 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
17130     case "$gl_cv_func_dup2_works" in
17131       *yes) ;;
17132       *)
17133         REPLACE_DUP2=1
17134         ;;
17135     esac
17136   fi
17137
17138
17139   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17140
17141
17142
17143
17144
17145
17146
17147
17148   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17149
17150
17151   fi
17152
17153
17154
17155
17156
17157           GNULIB_DUP2=1
17158
17159
17160
17161
17162
17163 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17164
17165
17166
17167
17168
17169       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17170 printf %s "checking for error_at_line... " >&6; }
17171 if ${ac_cv_lib_error_at_line+:} false; then :
17172   printf %s "(cached) " >&6
17173 else
17174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17175 /* end confdefs.h.  */
17176 #include <error.h>
17177 int
17178 main ()
17179 {
17180 error_at_line (0, 0, "", 0, "an error occurred");
17181   ;
17182   return 0;
17183 }
17184 _ACEOF
17185 if ac_fn_c_try_link "$LINENO"; then :
17186   ac_cv_lib_error_at_line=yes
17187 else
17188   ac_cv_lib_error_at_line=no
17189 fi
17190 rm -f core conftest.err conftest.$ac_objext \
17191     conftest$ac_exeext conftest.$ac_ext
17192 fi
17193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17194 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
17195
17196   if test $ac_cv_lib_error_at_line = no; then
17197
17198
17199
17200
17201
17202
17203
17204
17205   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17206
17207
17208
17209   :
17210
17211   fi
17212
17213
17214   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17215
17216
17217
17218   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17219
17220
17221
17222
17223
17224
17225
17226   if test $ac_cv_func_fcntl = no; then
17227
17228
17229
17230   if test $ac_cv_func_fcntl = no; then
17231     HAVE_FCNTL=0
17232   else
17233     REPLACE_FCNTL=1
17234   fi
17235
17236   else
17237             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17238 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17239 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
17240   printf %s "(cached) " >&6
17241 else
17242   if test "$cross_compiling" = yes; then :
17243   # Guess that it works on glibc systems
17244           case $host_os in #((
17245             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
17246             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
17247           esac
17248 else
17249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250 /* end confdefs.h.  */
17251
17252 #include <fcntl.h>
17253 #include <errno.h>
17254
17255 int
17256 main ()
17257 {
17258 int result = 0;
17259       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17260       if (errno != EINVAL) result |= 2;
17261       return result;
17262
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 if ac_fn_c_try_run "$LINENO"; then :
17268   gl_cv_func_fcntl_f_dupfd_works=yes
17269 else
17270   gl_cv_func_fcntl_f_dupfd_works=no
17271 fi
17272 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17273   conftest.$ac_objext conftest.beam conftest.$ac_ext
17274 fi
17275
17276 fi
17277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17278 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17279     case $gl_cv_func_fcntl_f_dupfd_works in
17280       *yes) ;;
17281       *)
17282
17283
17284   if test $ac_cv_func_fcntl = no; then
17285     HAVE_FCNTL=0
17286   else
17287     REPLACE_FCNTL=1
17288   fi
17289
17290
17291 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17292  ;;
17293     esac
17294
17295         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17296 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17297 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
17298   printf %s "(cached) " >&6
17299 else
17300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17301 /* end confdefs.h.  */
17302
17303 #include <fcntl.h>
17304 #ifndef F_DUPFD_CLOEXEC
17305 choke me
17306 #endif
17307
17308 int
17309 main ()
17310 {
17311
17312   ;
17313   return 0;
17314 }
17315 _ACEOF
17316 if ac_fn_c_try_compile "$LINENO"; then :
17317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17318 /* end confdefs.h.  */
17319
17320 #ifdef __linux__
17321 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17322    it to support the semantics on older kernels that failed with EINVAL.  */
17323 choke me
17324 #endif
17325
17326 int
17327 main ()
17328 {
17329
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 if ac_fn_c_try_compile "$LINENO"; then :
17335   gl_cv_func_fcntl_f_dupfd_cloexec=yes
17336 else
17337   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17338 fi
17339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17340 else
17341   gl_cv_func_fcntl_f_dupfd_cloexec=no
17342 fi
17343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17344 fi
17345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17346 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17347     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17348
17349
17350
17351   if test $ac_cv_func_fcntl = no; then
17352     HAVE_FCNTL=0
17353   else
17354     REPLACE_FCNTL=1
17355   fi
17356
17357           fi
17358   fi
17359
17360
17361   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17362
17363
17364
17365
17366
17367
17368
17369
17370   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17371
17372   fi
17373
17374
17375
17376
17377
17378           GNULIB_FCNTL=1
17379
17380
17381
17382
17383
17384 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399      if test $gl_cv_have_include_next = yes; then
17400        gl_cv_next_fcntl_h='<'fcntl.h'>'
17401      else
17402        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17403 printf %s "checking absolute name of <fcntl.h>... " >&6; }
17404 if ${gl_cv_next_fcntl_h+:} false; then :
17405   printf %s "(cached) " >&6
17406 else
17407
17408                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17409 /* end confdefs.h.  */
17410 #include <fcntl.h>
17411
17412 _ACEOF
17413                                                                                                                         case "$host_os" in
17414                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17415                  *)    gl_absname_cpp="$ac_cpp" ;;
17416                esac
17417
17418                case "$host_os" in
17419                  mingw*)
17420                                                                                                                                      gl_dirsep_regex='[/\\]'
17421                    ;;
17422                  *)
17423                    gl_dirsep_regex='\/'
17424                    ;;
17425                esac
17426                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17427
17428                gl_header_literal_regex=`echo 'fcntl.h' \
17429                                         | sed -e "$gl_make_literal_regex_sed"`
17430                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17431                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17432                    s|^/[^/]|//&|
17433                    p
17434                    q
17435                  }'
17436                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17437                       sed -n "$gl_absolute_header_sed"`'"'
17438
17439
17440 fi
17441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17442 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
17443      fi
17444      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17445
17446      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17447        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17448        gl_next_as_first_directive='<'fcntl.h'>'
17449      else
17450        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17451        gl_next_as_first_directive=$gl_cv_next_fcntl_h
17452      fi
17453      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464     for gl_func in fcntl openat; do
17465     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17466     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17467 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
17468 if eval \${$as_gl_Symbol+:} false; then :
17469   printf %s "(cached) " >&6
17470 else
17471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17472 /* end confdefs.h.  */
17473 #include <fcntl.h>
17474
17475 int
17476 main ()
17477 {
17478 #undef $gl_func
17479   (void) $gl_func;
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 if ac_fn_c_try_compile "$LINENO"; then :
17485   eval "$as_gl_Symbol=yes"
17486 else
17487   eval "$as_gl_Symbol=no"
17488 fi
17489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17490 fi
17491 eval ac_res=\$$as_gl_Symbol
17492                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17493 printf "%s\n" "$ac_res" >&6; }
17494     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17495   cat >>confdefs.h <<_ACEOF
17496 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17497 _ACEOF
17498
17499                      eval ac_cv_have_decl_$gl_func=yes
17500 fi
17501       done
17502
17503
17504
17505
17506
17507
17508
17509 cat >>confdefs.h <<_ACEOF
17510 #define GNULIB_FILENAMECAT 1
17511 _ACEOF
17512
17513
17514
17515
17516
17517
17518
17519
17520   FLOAT_H=
17521   REPLACE_FLOAT_LDBL=0
17522   case "$host_os" in
17523     aix* | beos* | openbsd* | mirbsd* | irix*)
17524       FLOAT_H=float.h
17525       ;;
17526     freebsd*)
17527       case "$host_cpu" in
17528         i[34567]86 )
17529           FLOAT_H=float.h
17530           ;;
17531         x86_64 )
17532           # On x86_64 systems, the C compiler may still be generating
17533           # 32-bit code.
17534           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17535 /* end confdefs.h.  */
17536 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
17537              yes
17538              #endif
17539 _ACEOF
17540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17541   $EGREP "yes" >/dev/null 2>&1; then :
17542
17543 else
17544   FLOAT_H=float.h
17545 fi
17546 rm -rf conftest*
17547
17548           ;;
17549       esac
17550       ;;
17551     linux*)
17552       case "$host_cpu" in
17553         powerpc*)
17554           FLOAT_H=float.h
17555           ;;
17556       esac
17557       ;;
17558   esac
17559   case "$host_os" in
17560     aix* | freebsd* | linux*)
17561       if test -n "$FLOAT_H"; then
17562         REPLACE_FLOAT_LDBL=1
17563       fi
17564       ;;
17565   esac
17566
17567     REPLACE_ITOLD=0
17568   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
17569 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
17570 if ${gl_cv_func_itold_works+:} false; then :
17571   printf %s "(cached) " >&6
17572 else
17573
17574       if test "$cross_compiling" = yes; then :
17575   case "$host" in
17576            sparc*-*-linux*)
17577              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578 /* end confdefs.h.  */
17579 #if defined __LP64__ || defined __arch64__
17580                 yes
17581                 #endif
17582 _ACEOF
17583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17584   $EGREP "yes" >/dev/null 2>&1; then :
17585   gl_cv_func_itold_works="guessing no"
17586 else
17587   gl_cv_func_itold_works="guessing yes"
17588 fi
17589 rm -rf conftest*
17590
17591              ;;
17592            *) gl_cv_func_itold_works="guessing yes" ;;
17593          esac
17594
17595 else
17596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17597 /* end confdefs.h.  */
17598
17599 int i = -1;
17600 volatile long double ld;
17601 int main ()
17602 {
17603   ld += i * 1.0L;
17604   if (ld > 0)
17605     return 1;
17606   return 0;
17607 }
17608 _ACEOF
17609 if ac_fn_c_try_run "$LINENO"; then :
17610   gl_cv_func_itold_works=yes
17611 else
17612   gl_cv_func_itold_works=no
17613 fi
17614 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17615   conftest.$ac_objext conftest.beam conftest.$ac_ext
17616 fi
17617
17618
17619 fi
17620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
17621 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
17622   case "$gl_cv_func_itold_works" in
17623     *no)
17624       REPLACE_ITOLD=1
17625                   FLOAT_H=float.h
17626       ;;
17627   esac
17628
17629   if test -n "$FLOAT_H"; then
17630
17631
17632
17633
17634
17635
17636
17637
17638      if test $gl_cv_have_include_next = yes; then
17639        gl_cv_next_float_h='<'float.h'>'
17640      else
17641        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
17642 printf %s "checking absolute name of <float.h>... " >&6; }
17643 if ${gl_cv_next_float_h+:} false; then :
17644   printf %s "(cached) " >&6
17645 else
17646
17647                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17648 /* end confdefs.h.  */
17649 #include <float.h>
17650
17651 _ACEOF
17652                                                                                                                         case "$host_os" in
17653                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17654                  *)    gl_absname_cpp="$ac_cpp" ;;
17655                esac
17656
17657                case "$host_os" in
17658                  mingw*)
17659                                                                                                                                      gl_dirsep_regex='[/\\]'
17660                    ;;
17661                  *)
17662                    gl_dirsep_regex='\/'
17663                    ;;
17664                esac
17665                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17666
17667                gl_header_literal_regex=`echo 'float.h' \
17668                                         | sed -e "$gl_make_literal_regex_sed"`
17669                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17670                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17671                    s|^/[^/]|//&|
17672                    p
17673                    q
17674                  }'
17675                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17676                       sed -n "$gl_absolute_header_sed"`'"'
17677
17678
17679 fi
17680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
17681 printf "%s\n" "$gl_cv_next_float_h" >&6; }
17682      fi
17683      NEXT_FLOAT_H=$gl_cv_next_float_h
17684
17685      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17686        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17687        gl_next_as_first_directive='<'float.h'>'
17688      else
17689        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17690        gl_next_as_first_directive=$gl_cv_next_float_h
17691      fi
17692      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
17693
17694
17695
17696
17697   fi
17698
17699    if test -n "$FLOAT_H"; then
17700   GL_GENERATE_FLOAT_H_TRUE=
17701   GL_GENERATE_FLOAT_H_FALSE='#'
17702 else
17703   GL_GENERATE_FLOAT_H_TRUE='#'
17704   GL_GENERATE_FLOAT_H_FALSE=
17705 fi
17706
17707
17708
17709   if test $REPLACE_FLOAT_LDBL = 1; then
17710
17711
17712
17713
17714
17715
17716
17717
17718   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
17719
17720   fi
17721   if test $REPLACE_ITOLD = 1; then
17722
17723
17724
17725
17726
17727
17728
17729
17730   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
17731
17732   fi
17733
17734
17735
17736
17737
17738   FNMATCH_H=
17739   gl_fnmatch_required_lowercase=`
17740     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
17741   `
17742   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
17743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
17744 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
17745 if eval \${$gl_fnmatch_cache_var+:} false; then :
17746   printf %s "(cached) " >&6
17747 else
17748                            if test $gl_fnmatch_required = GNU; then
17749        gl_fnmatch_gnu_start=
17750        gl_fnmatch_gnu_end=
17751      else
17752        gl_fnmatch_gnu_start='#if 0'
17753        gl_fnmatch_gnu_end='#endif'
17754      fi
17755      if test "$cross_compiling" = yes; then :
17756   eval "$gl_fnmatch_cache_var=\"guessing no\""
17757 else
17758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17759 /* end confdefs.h.  */
17760 #include <fnmatch.h>
17761             static int
17762             y (char const *pattern, char const *string, int flags)
17763             {
17764               return fnmatch (pattern, string, flags) == 0;
17765             }
17766             static int
17767             n (char const *pattern, char const *string, int flags)
17768             {
17769               return fnmatch (pattern, string, flags) == FNM_NOMATCH;
17770             }
17771
17772 int
17773 main ()
17774 {
17775 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
17776             char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
17777             static char const A_1[] = { 'A' - 1, 0 };
17778             static char const A01[] = { 'A' + 1, 0 };
17779             static char const a_1[] = { 'a' - 1, 0 };
17780             static char const a01[] = { 'a' + 1, 0 };
17781             static char const bs_1[] = { '\\\\' - 1, 0 };
17782             static char const bs01[] = { '\\\\' + 1, 0 };
17783             int result = 0;
17784             if (!n ("a*", "", 0))
17785               return 1;
17786             if (!y ("a*", "abc", 0))
17787               return 1;
17788             if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
17789               return 1;
17790             if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
17791               return 2;
17792             if (!y ("a\\\\bc", "abc", 0))
17793               return 3;
17794             if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
17795               return 3;
17796             if (!y ("*x", ".x", 0))
17797               return 4;
17798             if (!n ("*x", ".x", FNM_PERIOD))
17799               return 4;
17800             if (!y (Apat, "\\\\", 0))
17801               return 5;
17802             if (!y (Apat, "A", 0))
17803               return 5;
17804             if (!y (apat, "\\\\", 0))
17805               return 5;
17806             if (!y (apat, "a", 0))
17807               return 5;
17808             if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
17809               return 5;
17810             if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
17811               return 5;
17812             if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
17813               return 5;
17814             if (!(y (apat, a01, 0) == ('a' < '\\\\')))
17815               return 5;
17816             if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
17817               return 5;
17818             if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
17819               return 5;
17820             if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
17821               return 5;
17822             if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
17823               return 5;
17824             $gl_fnmatch_gnu_start
17825             if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
17826               result |= 8;
17827             if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
17828               result |= 16;
17829             if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
17830               result |= 32;
17831             if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
17832               result |= 64;
17833             if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
17834               result |= 64;
17835             if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
17836               result |= 64;
17837             $gl_fnmatch_gnu_end
17838             return result;
17839
17840   ;
17841   return 0;
17842 }
17843 _ACEOF
17844 if ac_fn_c_try_run "$LINENO"; then :
17845   eval "$gl_fnmatch_cache_var=yes"
17846 else
17847   eval "$gl_fnmatch_cache_var=no"
17848 fi
17849 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17850   conftest.$ac_objext conftest.beam conftest.$ac_ext
17851 fi
17852
17853
17854 fi
17855 eval ac_res=\$$gl_fnmatch_cache_var
17856                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17857 printf "%s\n" "$ac_res" >&6; }
17858   eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
17859   if test "$gl_fnmatch_result" = yes; then
17860             rm -f "$gl_source_base/fnmatch.h"
17861   else
17862     FNMATCH_H=fnmatch.h
17863   fi
17864
17865    if test -n "$FNMATCH_H"; then
17866   GL_GENERATE_FNMATCH_H_TRUE=
17867   GL_GENERATE_FNMATCH_H_FALSE='#'
17868 else
17869   GL_GENERATE_FNMATCH_H_TRUE='#'
17870   GL_GENERATE_FNMATCH_H_FALSE=
17871 fi
17872
17873
17874   if test -n "$FNMATCH_H"; then
17875
17876
17877
17878
17879
17880
17881
17882
17883   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
17884
17885
17886
17887 cat >>confdefs.h <<_ACEOF
17888 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
17889 _ACEOF
17890
17891
17892   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
17893 "
17894 if test "x$ac_cv_have_decl_isblank" = xyes; then :
17895   ac_have_decl=1
17896 else
17897   ac_have_decl=0
17898 fi
17899
17900 cat >>confdefs.h <<_ACEOF
17901 #define HAVE_DECL_ISBLANK $ac_have_decl
17902 _ACEOF
17903
17904
17905
17906
17907   fi
17908
17909
17910
17911
17912
17913   if test -n "$FNMATCH_H"; then
17914
17915
17916
17917
17918
17919
17920
17921
17922   gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
17923
17924
17925
17926 cat >>confdefs.h <<_ACEOF
17927 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
17928 _ACEOF
17929
17930
17931   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
17932 "
17933 if test "x$ac_cv_have_decl_isblank" = xyes; then :
17934   ac_have_decl=1
17935 else
17936   ac_have_decl=0
17937 fi
17938
17939 cat >>confdefs.h <<_ACEOF
17940 #define HAVE_DECL_ISBLANK $ac_have_decl
17941 _ACEOF
17942
17943
17944
17945
17946   fi
17947
17948
17949
17950   case "$host_os" in
17951     mingw* | pw*)
17952       REPLACE_FREOPEN=1
17953       ;;
17954   esac
17955
17956   if test $REPLACE_FREOPEN = 1; then
17957
17958
17959
17960
17961
17962
17963
17964
17965   gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
17966
17967     :
17968   fi
17969
17970
17971
17972
17973
17974           GNULIB_FREOPEN=1
17975
17976
17977
17978
17979
17980 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
17981
17982
17983
17984
17985
17986 cat >>confdefs.h <<_ACEOF
17987 #define GNULIB_FREOPEN_SAFER 1
17988 _ACEOF
17989
17990
17991
17992
17993
17994
17995   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17996     REPLACE_FSTAT=1
17997   fi
17998
17999
18000   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
18001     REPLACE_FSTAT=1
18002   fi
18003
18004
18005
18006   if test $REPLACE_FSTAT = 1; then
18007
18008
18009
18010
18011
18012
18013
18014
18015   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
18016
18017     :
18018   fi
18019
18020
18021
18022
18023
18024           GNULIB_FSTAT=1
18025
18026
18027
18028
18029
18030 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
18031
18032
18033
18034
18035
18036
18037   if test $ac_cv_func_getdtablesize != yes; then
18038     HAVE_GETDTABLESIZE=0
18039   fi
18040
18041   if test $HAVE_GETDTABLESIZE = 0; then
18042
18043
18044
18045
18046
18047
18048
18049
18050   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
18051
18052     :
18053   fi
18054
18055
18056
18057
18058
18059           GNULIB_GETDTABLESIZE=1
18060
18061
18062
18063
18064
18065 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
18066
18067
18068
18069
18070
18071
18072
18073
18074   if test $REPLACE_GETOPT = 1; then
18075
18076
18077
18078
18079
18080
18081
18082
18083   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
18094
18095
18096
18097
18098         GNULIB_GL_UNISTD_H_GETOPT=1
18099   fi
18100
18101
18102
18103 printf "%s\n" "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
18104
18105
18106
18107
18108
18109
18110
18111     REPLACE_GETOPT=0
18112     if test -n "$gl_replace_getopt"; then
18113       REPLACE_GETOPT=1
18114     fi
18115
18116   if test $REPLACE_GETOPT = 1; then
18117
18118   GETOPT_H=getopt.h
18119
18120 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
18121
18122
18123
18124   fi
18125
18126   if test $REPLACE_GETOPT = 1; then
18127
18128
18129
18130
18131
18132
18133
18134
18135   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
18146
18147
18148
18149
18150         GNULIB_GL_UNISTD_H_GETOPT=1
18151   fi
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166   gl_gettimeofday_timezone=void
18167   if test $ac_cv_func_gettimeofday != yes; then
18168     HAVE_GETTIMEOFDAY=0
18169   else
18170
18171
18172
18173  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18174 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
18175 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
18176   printf %s "(cached) " >&6
18177 else
18178   if test "$cross_compiling" = yes; then :
18179   # When cross-compiling:
18180       case "$host_os" in
18181                 # Guess all is fine on glibc systems.
18182         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18183                 # If we don't know, assume the worst.
18184         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
18185       esac
18186
18187 else
18188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18189 /* end confdefs.h.  */
18190 #include <string.h>
18191           #include <sys/time.h>
18192           #include <time.h>
18193           #include <stdlib.h>
18194
18195 int
18196 main ()
18197 {
18198
18199           time_t t = 0;
18200           struct tm *lt;
18201           struct tm saved_lt;
18202           struct timeval tv;
18203           lt = localtime (&t);
18204           saved_lt = *lt;
18205           gettimeofday (&tv, NULL);
18206           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18207
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 if ac_fn_c_try_run "$LINENO"; then :
18213   gl_cv_func_gettimeofday_clobber=no
18214 else
18215   gl_cv_func_gettimeofday_clobber=yes
18216 fi
18217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18218   conftest.$ac_objext conftest.beam conftest.$ac_ext
18219 fi
18220
18221 fi
18222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18223 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
18224
18225  case "$gl_cv_func_gettimeofday_clobber" in
18226    *yes)
18227      REPLACE_GETTIMEOFDAY=1
18228
18229
18230 printf "%s\n" "#define gmtime rpl_gmtime" >>confdefs.h
18231
18232
18233 printf "%s\n" "#define localtime rpl_localtime" >>confdefs.h
18234
18235
18236
18237 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18238
18239      ;;
18240  esac
18241
18242     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18243 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
18244 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
18245   printf %s "(cached) " >&6
18246 else
18247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18248 /* end confdefs.h.  */
18249 #include <sys/time.h>
18250               struct timeval c;
18251               int gettimeofday (struct timeval *restrict, void *restrict);
18252
18253 int
18254 main ()
18255 {
18256 /* glibc uses struct timezone * rather than the POSIX void *
18257                  if _GNU_SOURCE is defined.  However, since the only portable
18258                  use of gettimeofday uses NULL as the second parameter, and
18259                  since the glibc definition is actually more typesafe, it is
18260                  not worth wrapping this to get a compliant signature.  */
18261               int (*f) (struct timeval *restrict, void *restrict)
18262                 = gettimeofday;
18263               int x = f (&c, 0);
18264               return !(x | c.tv_sec | c.tv_usec);
18265
18266   ;
18267   return 0;
18268 }
18269 _ACEOF
18270 if ac_fn_c_try_compile "$LINENO"; then :
18271   gl_cv_func_gettimeofday_posix_signature=yes
18272 else
18273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18274 /* end confdefs.h.  */
18275 #include <sys/time.h>
18276 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18277
18278 int
18279 main ()
18280 {
18281
18282   ;
18283   return 0;
18284 }
18285 _ACEOF
18286 if ac_fn_c_try_compile "$LINENO"; then :
18287   gl_cv_func_gettimeofday_posix_signature=almost
18288 else
18289   gl_cv_func_gettimeofday_posix_signature=no
18290 fi
18291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18292 fi
18293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18294 fi
18295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18296 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18297     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18298       gl_gettimeofday_timezone='struct timezone'
18299     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18300       REPLACE_GETTIMEOFDAY=1
18301     fi
18302         if test $REPLACE_STRUCT_TIMEVAL = 1; then
18303       REPLACE_GETTIMEOFDAY=1
18304     fi
18305
18306   fi
18307
18308 cat >>confdefs.h <<_ACEOF
18309 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
18310 _ACEOF
18311
18312
18313   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
18314
18315
18316
18317
18318
18319
18320
18321
18322   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
18323
18324
18325   for ac_header in sys/timeb.h
18326 do :
18327   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18328 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
18329   cat >>confdefs.h <<_ACEOF
18330 #define HAVE_SYS_TIMEB_H 1
18331 _ACEOF
18332
18333 fi
18334
18335 done
18336
18337   for ac_func in _ftime
18338 do :
18339   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18340 if test "x$ac_cv_func__ftime" = xyes; then :
18341   cat >>confdefs.h <<_ACEOF
18342 #define HAVE__FTIME 1
18343 _ACEOF
18344
18345 fi
18346 done
18347
18348
18349   fi
18350
18351
18352
18353
18354
18355           GNULIB_GETTIMEOFDAY=1
18356
18357
18358
18359
18360
18361 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
18362
18363
18364
18365
18366    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
18367   GNU_MAKE_TRUE=
18368   GNU_MAKE_FALSE='#'
18369 else
18370   GNU_MAKE_TRUE='#'
18371   GNU_MAKE_FALSE=
18372 fi
18373
18374
18375   # Autoconf 2.61a.99 and earlier don't support linking a file only
18376   # in VPATH builds.  But since GNUmakefile is for maintainer use
18377   # only, it does not matter if we skip the link with older autoconf.
18378   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
18379   # builds, so use a shell variable to bypass this.
18380   GNUmakefile=GNUmakefile
18381   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
18382
18383
18384   :
18385
18386
18387
18388
18389
18390
18391
18392           GNULIB_ICONV=1
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409      if test $gl_cv_have_include_next = yes; then
18410        gl_cv_next_iconv_h='<'iconv.h'>'
18411      else
18412        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
18413 printf %s "checking absolute name of <iconv.h>... " >&6; }
18414 if ${gl_cv_next_iconv_h+:} false; then :
18415   printf %s "(cached) " >&6
18416 else
18417
18418              if test $ac_cv_header_iconv_h = yes; then
18419
18420
18421                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18422 /* end confdefs.h.  */
18423 #include <iconv.h>
18424
18425 _ACEOF
18426                                                                                                                         case "$host_os" in
18427                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18428                  *)    gl_absname_cpp="$ac_cpp" ;;
18429                esac
18430
18431                case "$host_os" in
18432                  mingw*)
18433                                                                                                                                      gl_dirsep_regex='[/\\]'
18434                    ;;
18435                  *)
18436                    gl_dirsep_regex='\/'
18437                    ;;
18438                esac
18439                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18440
18441                gl_header_literal_regex=`echo 'iconv.h' \
18442                                         | sed -e "$gl_make_literal_regex_sed"`
18443                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18444                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18445                    s|^/[^/]|//&|
18446                    p
18447                    q
18448                  }'
18449                                                             gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18450                       sed -n "$gl_absolute_header_sed"`'"'
18451           else
18452                gl_cv_next_iconv_h='<'iconv.h'>'
18453              fi
18454
18455
18456 fi
18457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
18458 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
18459      fi
18460      NEXT_ICONV_H=$gl_cv_next_iconv_h
18461
18462      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18463        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18464        gl_next_as_first_directive='<'iconv.h'>'
18465      else
18466        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18467        gl_next_as_first_directive=$gl_cv_next_iconv_h
18468      fi
18469      NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479   if test "$am_cv_func_iconv" = yes; then
18480
18481
18482   ICONV_H='iconv.h'
18483    if test -n "$ICONV_H"; then
18484   GL_GENERATE_ICONV_H_TRUE=
18485   GL_GENERATE_ICONV_H_FALSE='#'
18486 else
18487   GL_GENERATE_ICONV_H_TRUE='#'
18488   GL_GENERATE_ICONV_H_FALSE=
18489 fi
18490
18491
18492             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18493 /* end confdefs.h.  */
18494
18495       #include <iconv.h>
18496       #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
18497        gnu_iconv
18498       #endif
18499
18500 _ACEOF
18501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18502   $EGREP "gnu_iconv" >/dev/null 2>&1; then :
18503   gl_func_iconv_gnu=yes
18504 else
18505   gl_func_iconv_gnu=no
18506 fi
18507 rm -rf conftest*
18508
18509     if test $gl_func_iconv_gnu = no; then
18510       iconv_flavor=
18511       case "$host_os" in
18512         aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
18513         irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
18514         hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
18515         osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
18516         solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
18517       esac
18518       if test -n "$iconv_flavor"; then
18519
18520 cat >>confdefs.h <<_ACEOF
18521 #define ICONV_FLAVOR $iconv_flavor
18522 _ACEOF
18523
18524
18525
18526
18527   ICONV_H='iconv.h'
18528    if test -n "$ICONV_H"; then
18529   GL_GENERATE_ICONV_H_TRUE=
18530   GL_GENERATE_ICONV_H_FALSE='#'
18531 else
18532   GL_GENERATE_ICONV_H_TRUE='#'
18533   GL_GENERATE_ICONV_H_FALSE=
18534 fi
18535
18536
18537   REPLACE_ICONV_OPEN=1
18538
18539       fi
18540     fi
18541
18542   fi
18543
18544   if test $REPLACE_ICONV_OPEN = 1; then
18545
18546
18547
18548
18549
18550
18551
18552
18553   gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
18554
18555   fi
18556   if test $REPLACE_ICONV = 1; then
18557
18558
18559
18560
18561
18562
18563
18564
18565   gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575   gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
18576
18577   fi
18578
18579
18580   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
18581 printf %s "checking whether the compiler generally respects inline... " >&6; }
18582 if ${gl_cv_c_inline_effective+:} false; then :
18583   printf %s "(cached) " >&6
18584 else
18585   if test $ac_cv_c_inline = no; then
18586        gl_cv_c_inline_effective=no
18587      else
18588                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18589 /* end confdefs.h.  */
18590
18591 int
18592 main ()
18593 {
18594 #ifdef __NO_INLINE__
18595                #error "inline is not effective"
18596              #endif
18597   ;
18598   return 0;
18599 }
18600 _ACEOF
18601 if ac_fn_c_try_compile "$LINENO"; then :
18602   gl_cv_c_inline_effective=yes
18603 else
18604   gl_cv_c_inline_effective=no
18605 fi
18606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18607      fi
18608
18609 fi
18610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
18611 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
18612   if test $gl_cv_c_inline_effective = yes; then
18613
18614 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
18615
18616   fi
18617
18618
18619
18620
18621   :
18622
18623   :
18624   :
18625   :
18626   :
18627
18628
18629
18630
18631
18632
18633   PRIPTR_PREFIX=
18634   if test -n "$STDINT_H"; then
18635         PRIPTR_PREFIX='"l"'
18636   else
18637         for glpfx in '' l ll I64; do
18638       case $glpfx in
18639         '')  gltype1='int';;
18640         l)   gltype1='long int';;
18641         ll)  gltype1='long long int';;
18642         I64) gltype1='__int64';;
18643       esac
18644       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18645 /* end confdefs.h.  */
18646 #include <stdint.h>
18647            extern intptr_t foo;
18648            extern $gltype1 foo;
18649 int
18650 main ()
18651 {
18652
18653   ;
18654   return 0;
18655 }
18656 _ACEOF
18657 if ac_fn_c_try_compile "$LINENO"; then :
18658   PRIPTR_PREFIX='"'$glpfx'"'
18659 fi
18660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18661       test -n "$PRIPTR_PREFIX" && break
18662     done
18663   fi
18664
18665
18666
18667   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18668 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
18669 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
18670   printf %s "(cached) " >&6
18671 else
18672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18673 /* end confdefs.h.  */
18674 /* Work also in C++ mode.  */
18675             #define __STDC_LIMIT_MACROS 1
18676
18677             /* Work if build is not clean.  */
18678             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18679
18680             #include <limits.h>
18681             #if HAVE_STDINT_H
18682              #include <stdint.h>
18683             #endif
18684
18685             #if defined INT32_MAX && defined INTMAX_MAX
18686              #define CONDITION (INT32_MAX < INTMAX_MAX)
18687             #elif HAVE_LONG_LONG_INT
18688              #define CONDITION (sizeof (int) < sizeof (long long int))
18689             #else
18690              #define CONDITION 0
18691             #endif
18692             int test[CONDITION ? 1 : -1];
18693 int
18694 main ()
18695 {
18696
18697   ;
18698   return 0;
18699 }
18700 _ACEOF
18701 if ac_fn_c_try_compile "$LINENO"; then :
18702   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18703 else
18704   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
18705 fi
18706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18707 fi
18708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18709 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18710   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18711     INT32_MAX_LT_INTMAX_MAX=1;
18712   else
18713     INT32_MAX_LT_INTMAX_MAX=0;
18714   fi
18715
18716
18717   if test $APPLE_UNIVERSAL_BUILD = 0; then
18718
18719   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18720 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
18721 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
18722   printf %s "(cached) " >&6
18723 else
18724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18725 /* end confdefs.h.  */
18726 /* Work also in C++ mode.  */
18727             #define __STDC_LIMIT_MACROS 1
18728
18729             /* Work if build is not clean.  */
18730             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18731
18732             #include <limits.h>
18733             #if HAVE_STDINT_H
18734              #include <stdint.h>
18735             #endif
18736
18737             #if defined INT64_MAX
18738              #define CONDITION (INT64_MAX == LONG_MAX)
18739             #elif HAVE_LONG_LONG_INT
18740              #define CONDITION (sizeof (long long int) == sizeof (long int))
18741             #else
18742              #define CONDITION 0
18743             #endif
18744             int test[CONDITION ? 1 : -1];
18745 int
18746 main ()
18747 {
18748
18749   ;
18750   return 0;
18751 }
18752 _ACEOF
18753 if ac_fn_c_try_compile "$LINENO"; then :
18754   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18755 else
18756   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
18757 fi
18758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18759 fi
18760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18761 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18762   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18763     INT64_MAX_EQ_LONG_MAX=1;
18764   else
18765     INT64_MAX_EQ_LONG_MAX=0;
18766   fi
18767
18768
18769   else
18770     INT64_MAX_EQ_LONG_MAX=-1
18771   fi
18772
18773   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18774 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
18775 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
18776   printf %s "(cached) " >&6
18777 else
18778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18779 /* end confdefs.h.  */
18780 /* Work also in C++ mode.  */
18781             #define __STDC_LIMIT_MACROS 1
18782
18783             /* Work if build is not clean.  */
18784             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18785
18786             #include <limits.h>
18787             #if HAVE_STDINT_H
18788              #include <stdint.h>
18789             #endif
18790
18791             #if defined UINT32_MAX && defined UINTMAX_MAX
18792              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18793             #elif HAVE_LONG_LONG_INT
18794              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18795             #else
18796              #define CONDITION 0
18797             #endif
18798             int test[CONDITION ? 1 : -1];
18799 int
18800 main ()
18801 {
18802
18803   ;
18804   return 0;
18805 }
18806 _ACEOF
18807 if ac_fn_c_try_compile "$LINENO"; then :
18808   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18809 else
18810   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
18811 fi
18812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18813 fi
18814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18815 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18816   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18817     UINT32_MAX_LT_UINTMAX_MAX=1;
18818   else
18819     UINT32_MAX_LT_UINTMAX_MAX=0;
18820   fi
18821
18822
18823   if test $APPLE_UNIVERSAL_BUILD = 0; then
18824
18825   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18826 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
18827 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
18828   printf %s "(cached) " >&6
18829 else
18830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18831 /* end confdefs.h.  */
18832 /* Work also in C++ mode.  */
18833             #define __STDC_LIMIT_MACROS 1
18834
18835             /* Work if build is not clean.  */
18836             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18837
18838             #include <limits.h>
18839             #if HAVE_STDINT_H
18840              #include <stdint.h>
18841             #endif
18842
18843             #if defined UINT64_MAX
18844              #define CONDITION (UINT64_MAX == ULONG_MAX)
18845             #elif HAVE_LONG_LONG_INT
18846              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18847             #else
18848              #define CONDITION 0
18849             #endif
18850             int test[CONDITION ? 1 : -1];
18851 int
18852 main ()
18853 {
18854
18855   ;
18856   return 0;
18857 }
18858 _ACEOF
18859 if ac_fn_c_try_compile "$LINENO"; then :
18860   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18861 else
18862   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
18863 fi
18864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18865 fi
18866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18867 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18868   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18869     UINT64_MAX_EQ_ULONG_MAX=1;
18870   else
18871     UINT64_MAX_EQ_ULONG_MAX=0;
18872   fi
18873
18874
18875   else
18876     UINT64_MAX_EQ_ULONG_MAX=-1
18877   fi
18878
18879
18880
18881
18882
18883
18884
18885
18886   ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
18887 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18888    <wchar.h>.
18889    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
18890    before <wchar.h>.  */
18891 #include <stddef.h>
18892 #include <stdio.h>
18893 #include <time.h>
18894 #include <wchar.h>
18895 #include <wctype.h>
18896
18897 "
18898 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
18899   ac_have_decl=1
18900 else
18901   ac_have_decl=0
18902 fi
18903
18904 cat >>confdefs.h <<_ACEOF
18905 #define HAVE_DECL_ISWBLANK $ac_have_decl
18906 _ACEOF
18907
18908   if test $ac_cv_func_iswblank = no; then
18909     HAVE_ISWBLANK=0
18910     if test $ac_cv_have_decl_iswblank = yes; then
18911       REPLACE_ISWBLANK=1
18912     fi
18913   fi
18914   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
18915         :
18916   else
18917     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
18918             :
18919     fi
18920   fi
18921
18922
18923   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
18924     :
18925   else
18926     if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
18927
18928
18929
18930
18931
18932
18933
18934
18935   gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
18936
18937     fi
18938   fi
18939
18940
18941
18942
18943
18944           GNULIB_ISWBLANK=1
18945
18946
18947
18948
18949
18950 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968      if test $gl_cv_have_include_next = yes; then
18969        gl_cv_next_langinfo_h='<'langinfo.h'>'
18970      else
18971        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
18972 printf %s "checking absolute name of <langinfo.h>... " >&6; }
18973 if ${gl_cv_next_langinfo_h+:} false; then :
18974   printf %s "(cached) " >&6
18975 else
18976
18977              if test $ac_cv_header_langinfo_h = yes; then
18978
18979
18980                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18981 /* end confdefs.h.  */
18982 #include <langinfo.h>
18983
18984 _ACEOF
18985                                                                                                                         case "$host_os" in
18986                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18987                  *)    gl_absname_cpp="$ac_cpp" ;;
18988                esac
18989
18990                case "$host_os" in
18991                  mingw*)
18992                                                                                                                                      gl_dirsep_regex='[/\\]'
18993                    ;;
18994                  *)
18995                    gl_dirsep_regex='\/'
18996                    ;;
18997                esac
18998                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18999
19000                gl_header_literal_regex=`echo 'langinfo.h' \
19001                                         | sed -e "$gl_make_literal_regex_sed"`
19002                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19003                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19004                    s|^/[^/]|//&|
19005                    p
19006                    q
19007                  }'
19008                                                             gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19009                       sed -n "$gl_absolute_header_sed"`'"'
19010           else
19011                gl_cv_next_langinfo_h='<'langinfo.h'>'
19012              fi
19013
19014
19015 fi
19016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
19017 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
19018      fi
19019      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
19020
19021      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19022        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19023        gl_next_as_first_directive='<'langinfo.h'>'
19024      else
19025        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19026        gl_next_as_first_directive=$gl_cv_next_langinfo_h
19027      fi
19028      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
19029
19030
19031
19032
19033
19034     HAVE_LANGINFO_CODESET=0
19035   HAVE_LANGINFO_T_FMT_AMPM=0
19036   HAVE_LANGINFO_ERA=0
19037   HAVE_LANGINFO_YESEXPR=0
19038
19039   if test $ac_cv_header_langinfo_h = yes; then
19040     HAVE_LANGINFO_H=1
19041             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
19042 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
19043 if ${gl_cv_header_langinfo_codeset+:} false; then :
19044   printf %s "(cached) " >&6
19045 else
19046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19047 /* end confdefs.h.  */
19048 #include <langinfo.h>
19049 int a = CODESET;
19050
19051 int
19052 main ()
19053 {
19054
19055   ;
19056   return 0;
19057 }
19058 _ACEOF
19059 if ac_fn_c_try_compile "$LINENO"; then :
19060   gl_cv_header_langinfo_codeset=yes
19061 else
19062   gl_cv_header_langinfo_codeset=no
19063 fi
19064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19065
19066 fi
19067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
19068 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
19069     if test $gl_cv_header_langinfo_codeset = yes; then
19070       HAVE_LANGINFO_CODESET=1
19071     fi
19072     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
19073 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
19074 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
19075   printf %s "(cached) " >&6
19076 else
19077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19078 /* end confdefs.h.  */
19079 #include <langinfo.h>
19080 int a = T_FMT_AMPM;
19081
19082 int
19083 main ()
19084 {
19085
19086   ;
19087   return 0;
19088 }
19089 _ACEOF
19090 if ac_fn_c_try_compile "$LINENO"; then :
19091   gl_cv_header_langinfo_t_fmt_ampm=yes
19092 else
19093   gl_cv_header_langinfo_t_fmt_ampm=no
19094 fi
19095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19096
19097 fi
19098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
19099 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
19100     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
19101       HAVE_LANGINFO_T_FMT_AMPM=1
19102     fi
19103     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
19104 printf %s "checking whether langinfo.h defines ERA... " >&6; }
19105 if ${gl_cv_header_langinfo_era+:} false; then :
19106   printf %s "(cached) " >&6
19107 else
19108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19109 /* end confdefs.h.  */
19110 #include <langinfo.h>
19111 int a = ERA;
19112
19113 int
19114 main ()
19115 {
19116
19117   ;
19118   return 0;
19119 }
19120 _ACEOF
19121 if ac_fn_c_try_compile "$LINENO"; then :
19122   gl_cv_header_langinfo_era=yes
19123 else
19124   gl_cv_header_langinfo_era=no
19125 fi
19126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19127
19128 fi
19129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
19130 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
19131     if test $gl_cv_header_langinfo_era = yes; then
19132       HAVE_LANGINFO_ERA=1
19133     fi
19134     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
19135 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
19136 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
19137   printf %s "(cached) " >&6
19138 else
19139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19140 /* end confdefs.h.  */
19141 #include <langinfo.h>
19142 int a = YESEXPR;
19143
19144 int
19145 main ()
19146 {
19147
19148   ;
19149   return 0;
19150 }
19151 _ACEOF
19152 if ac_fn_c_try_compile "$LINENO"; then :
19153   gl_cv_header_langinfo_yesexpr=yes
19154 else
19155   gl_cv_header_langinfo_yesexpr=no
19156 fi
19157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19158
19159 fi
19160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
19161 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
19162     if test $gl_cv_header_langinfo_yesexpr = yes; then
19163       HAVE_LANGINFO_YESEXPR=1
19164     fi
19165   else
19166     HAVE_LANGINFO_H=0
19167   fi
19168
19169
19170
19171
19172
19173
19174
19175     for gl_func in nl_langinfo; do
19176     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19177     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19178 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
19179 if eval \${$as_gl_Symbol+:} false; then :
19180   printf %s "(cached) " >&6
19181 else
19182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19183 /* end confdefs.h.  */
19184 #include <langinfo.h>
19185
19186 int
19187 main ()
19188 {
19189 #undef $gl_func
19190   (void) $gl_func;
19191   ;
19192   return 0;
19193 }
19194 _ACEOF
19195 if ac_fn_c_try_compile "$LINENO"; then :
19196   eval "$as_gl_Symbol=yes"
19197 else
19198   eval "$as_gl_Symbol=no"
19199 fi
19200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19201 fi
19202 eval ac_res=\$$as_gl_Symbol
19203                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19204 printf "%s\n" "$ac_res" >&6; }
19205     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19206   cat >>confdefs.h <<_ACEOF
19207 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19208 _ACEOF
19209
19210                      eval ac_cv_have_decl_$gl_func=yes
19211 fi
19212       done
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230     use_additional=yes
19231
19232   acl_save_prefix="$prefix"
19233   prefix="$acl_final_prefix"
19234   acl_save_exec_prefix="$exec_prefix"
19235   exec_prefix="$acl_final_exec_prefix"
19236
19237     eval additional_includedir=\"$includedir\"
19238     eval additional_libdir=\"$libdir\"
19239
19240   exec_prefix="$acl_save_exec_prefix"
19241   prefix="$acl_save_prefix"
19242
19243
19244 # Check whether --with-libsigsegv-prefix was given.
19245 if test "${with_libsigsegv_prefix+set}" = set; then :
19246   withval=$with_libsigsegv_prefix;
19247     if test "X$withval" = "Xno"; then
19248       use_additional=no
19249     else
19250       if test "X$withval" = "X"; then
19251
19252   acl_save_prefix="$prefix"
19253   prefix="$acl_final_prefix"
19254   acl_save_exec_prefix="$exec_prefix"
19255   exec_prefix="$acl_final_exec_prefix"
19256
19257           eval additional_includedir=\"$includedir\"
19258           eval additional_libdir=\"$libdir\"
19259
19260   exec_prefix="$acl_save_exec_prefix"
19261   prefix="$acl_save_prefix"
19262
19263       else
19264         additional_includedir="$withval/include"
19265         additional_libdir="$withval/$acl_libdirstem"
19266         if test "$acl_libdirstem2" != "$acl_libdirstem" \
19267            && ! test -d "$withval/$acl_libdirstem"; then
19268           additional_libdir="$withval/$acl_libdirstem2"
19269         fi
19270       fi
19271     fi
19272
19273 fi
19274
19275       LIBSIGSEGV=
19276   LTLIBSIGSEGV=
19277   INCSIGSEGV=
19278   LIBSIGSEGV_PREFIX=
19279       HAVE_LIBSIGSEGV=
19280   rpathdirs=
19281   ltrpathdirs=
19282   names_already_handled=
19283   names_next_round='sigsegv '
19284   while test -n "$names_next_round"; do
19285     names_this_round="$names_next_round"
19286     names_next_round=
19287     for name in $names_this_round; do
19288       already_handled=
19289       for n in $names_already_handled; do
19290         if test "$n" = "$name"; then
19291           already_handled=yes
19292           break
19293         fi
19294       done
19295       if test -z "$already_handled"; then
19296         names_already_handled="$names_already_handled $name"
19297                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
19298         eval value=\"\$HAVE_LIB$uppername\"
19299         if test -n "$value"; then
19300           if test "$value" = yes; then
19301             eval value=\"\$LIB$uppername\"
19302             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
19303             eval value=\"\$LTLIB$uppername\"
19304             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
19305           else
19306                                     :
19307           fi
19308         else
19309                               found_dir=
19310           found_la=
19311           found_so=
19312           found_a=
19313           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
19314           if test -n "$acl_shlibext"; then
19315             shrext=".$acl_shlibext"             # typically: shrext=.so
19316           else
19317             shrext=
19318           fi
19319           if test $use_additional = yes; then
19320             dir="$additional_libdir"
19321                                     if test -n "$acl_shlibext"; then
19322               if test -f "$dir/$libname$shrext"; then
19323                 found_dir="$dir"
19324                 found_so="$dir/$libname$shrext"
19325               else
19326                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
19327                   ver=`(cd "$dir" && \
19328                         for f in "$libname$shrext".*; do echo "$f"; done \
19329                         | sed -e "s,^$libname$shrext\\\\.,," \
19330                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
19331                         | sed 1q ) 2>/dev/null`
19332                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
19333                     found_dir="$dir"
19334                     found_so="$dir/$libname$shrext.$ver"
19335                   fi
19336                 else
19337                   eval library_names=\"$acl_library_names_spec\"
19338                   for f in $library_names; do
19339                     if test -f "$dir/$f"; then
19340                       found_dir="$dir"
19341                       found_so="$dir/$f"
19342                       break
19343                     fi
19344                   done
19345                 fi
19346               fi
19347             fi
19348                         if test "X$found_dir" = "X"; then
19349               if test -f "$dir/$libname.$acl_libext"; then
19350                 found_dir="$dir"
19351                 found_a="$dir/$libname.$acl_libext"
19352               fi
19353             fi
19354             if test "X$found_dir" != "X"; then
19355               if test -f "$dir/$libname.la"; then
19356                 found_la="$dir/$libname.la"
19357               fi
19358             fi
19359           fi
19360           if test "X$found_dir" = "X"; then
19361             for x in $LDFLAGS $LTLIBSIGSEGV; do
19362
19363   acl_save_prefix="$prefix"
19364   prefix="$acl_final_prefix"
19365   acl_save_exec_prefix="$exec_prefix"
19366   exec_prefix="$acl_final_exec_prefix"
19367   eval x=\"$x\"
19368   exec_prefix="$acl_save_exec_prefix"
19369   prefix="$acl_save_prefix"
19370
19371               case "$x" in
19372                 -L*)
19373                   dir=`echo "X$x" | sed -e 's/^X-L//'`
19374                                     if test -n "$acl_shlibext"; then
19375                     if test -f "$dir/$libname$shrext"; then
19376                       found_dir="$dir"
19377                       found_so="$dir/$libname$shrext"
19378                     else
19379                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
19380                         ver=`(cd "$dir" && \
19381                               for f in "$libname$shrext".*; do echo "$f"; done \
19382                               | sed -e "s,^$libname$shrext\\\\.,," \
19383                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
19384                               | sed 1q ) 2>/dev/null`
19385                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
19386                           found_dir="$dir"
19387                           found_so="$dir/$libname$shrext.$ver"
19388                         fi
19389                       else
19390                         eval library_names=\"$acl_library_names_spec\"
19391                         for f in $library_names; do
19392                           if test -f "$dir/$f"; then
19393                             found_dir="$dir"
19394                             found_so="$dir/$f"
19395                             break
19396                           fi
19397                         done
19398                       fi
19399                     fi
19400                   fi
19401                                     if test "X$found_dir" = "X"; then
19402                     if test -f "$dir/$libname.$acl_libext"; then
19403                       found_dir="$dir"
19404                       found_a="$dir/$libname.$acl_libext"
19405                     fi
19406                   fi
19407                   if test "X$found_dir" != "X"; then
19408                     if test -f "$dir/$libname.la"; then
19409                       found_la="$dir/$libname.la"
19410                     fi
19411                   fi
19412                   ;;
19413               esac
19414               if test "X$found_dir" != "X"; then
19415                 break
19416               fi
19417             done
19418           fi
19419           if test "X$found_dir" != "X"; then
19420                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
19421             if test "X$found_so" != "X"; then
19422                                                         if test "$enable_rpath" = no \
19423                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
19424                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
19425                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
19426               else
19427                                                                                 haveit=
19428                 for x in $ltrpathdirs; do
19429                   if test "X$x" = "X$found_dir"; then
19430                     haveit=yes
19431                     break
19432                   fi
19433                 done
19434                 if test -z "$haveit"; then
19435                   ltrpathdirs="$ltrpathdirs $found_dir"
19436                 fi
19437                                 if test "$acl_hardcode_direct" = yes; then
19438                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
19439                 else
19440                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
19441                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
19442                                                             haveit=
19443                     for x in $rpathdirs; do
19444                       if test "X$x" = "X$found_dir"; then
19445                         haveit=yes
19446                         break
19447                       fi
19448                     done
19449                     if test -z "$haveit"; then
19450                       rpathdirs="$rpathdirs $found_dir"
19451                     fi
19452                   else
19453                                                                                 haveit=
19454                     for x in $LDFLAGS $LIBSIGSEGV; do
19455
19456   acl_save_prefix="$prefix"
19457   prefix="$acl_final_prefix"
19458   acl_save_exec_prefix="$exec_prefix"
19459   exec_prefix="$acl_final_exec_prefix"
19460   eval x=\"$x\"
19461   exec_prefix="$acl_save_exec_prefix"
19462   prefix="$acl_save_prefix"
19463
19464                       if test "X$x" = "X-L$found_dir"; then
19465                         haveit=yes
19466                         break
19467                       fi
19468                     done
19469                     if test -z "$haveit"; then
19470                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
19471                     fi
19472                     if test "$acl_hardcode_minus_L" != no; then
19473                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
19474                     else
19475                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
19476                     fi
19477                   fi
19478                 fi
19479               fi
19480             else
19481               if test "X$found_a" != "X"; then
19482                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
19483               else
19484                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
19485               fi
19486             fi
19487                         additional_includedir=
19488             case "$found_dir" in
19489               */$acl_libdirstem | */$acl_libdirstem/)
19490                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
19491                 if test "$name" = 'sigsegv'; then
19492                   LIBSIGSEGV_PREFIX="$basedir"
19493                 fi
19494                 additional_includedir="$basedir/include"
19495                 ;;
19496               */$acl_libdirstem2 | */$acl_libdirstem2/)
19497                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
19498                 if test "$name" = 'sigsegv'; then
19499                   LIBSIGSEGV_PREFIX="$basedir"
19500                 fi
19501                 additional_includedir="$basedir/include"
19502                 ;;
19503             esac
19504             if test "X$additional_includedir" != "X"; then
19505                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
19506                 haveit=
19507                 if test "X$additional_includedir" = "X/usr/local/include"; then
19508                   if test -n "$GCC"; then
19509                     case $host_os in
19510                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
19511                     esac
19512                   fi
19513                 fi
19514                 if test -z "$haveit"; then
19515                   for x in $CPPFLAGS $INCSIGSEGV; do
19516
19517   acl_save_prefix="$prefix"
19518   prefix="$acl_final_prefix"
19519   acl_save_exec_prefix="$exec_prefix"
19520   exec_prefix="$acl_final_exec_prefix"
19521   eval x=\"$x\"
19522   exec_prefix="$acl_save_exec_prefix"
19523   prefix="$acl_save_prefix"
19524
19525                     if test "X$x" = "X-I$additional_includedir"; then
19526                       haveit=yes
19527                       break
19528                     fi
19529                   done
19530                   if test -z "$haveit"; then
19531                     if test -d "$additional_includedir"; then
19532                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
19533                     fi
19534                   fi
19535                 fi
19536               fi
19537             fi
19538                         if test -n "$found_la"; then
19539                                                         save_libdir="$libdir"
19540               case "$found_la" in
19541                 */* | *\\*) . "$found_la" ;;
19542                 *) . "./$found_la" ;;
19543               esac
19544               libdir="$save_libdir"
19545                             for dep in $dependency_libs; do
19546                 case "$dep" in
19547                   -L*)
19548                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19549                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
19550                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
19551                       haveit=
19552                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
19553                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
19554                         if test -n "$GCC"; then
19555                           case $host_os in
19556                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
19557                           esac
19558                         fi
19559                       fi
19560                       if test -z "$haveit"; then
19561                         haveit=
19562                         for x in $LDFLAGS $LIBSIGSEGV; do
19563
19564   acl_save_prefix="$prefix"
19565   prefix="$acl_final_prefix"
19566   acl_save_exec_prefix="$exec_prefix"
19567   exec_prefix="$acl_final_exec_prefix"
19568   eval x=\"$x\"
19569   exec_prefix="$acl_save_exec_prefix"
19570   prefix="$acl_save_prefix"
19571
19572                           if test "X$x" = "X-L$additional_libdir"; then
19573                             haveit=yes
19574                             break
19575                           fi
19576                         done
19577                         if test -z "$haveit"; then
19578                           if test -d "$additional_libdir"; then
19579                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
19580                           fi
19581                         fi
19582                         haveit=
19583                         for x in $LDFLAGS $LTLIBSIGSEGV; do
19584
19585   acl_save_prefix="$prefix"
19586   prefix="$acl_final_prefix"
19587   acl_save_exec_prefix="$exec_prefix"
19588   exec_prefix="$acl_final_exec_prefix"
19589   eval x=\"$x\"
19590   exec_prefix="$acl_save_exec_prefix"
19591   prefix="$acl_save_prefix"
19592
19593                           if test "X$x" = "X-L$additional_libdir"; then
19594                             haveit=yes
19595                             break
19596                           fi
19597                         done
19598                         if test -z "$haveit"; then
19599                           if test -d "$additional_libdir"; then
19600                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
19601                           fi
19602                         fi
19603                       fi
19604                     fi
19605                     ;;
19606                   -R*)
19607                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
19608                     if test "$enable_rpath" != no; then
19609                                                                   haveit=
19610                       for x in $rpathdirs; do
19611                         if test "X$x" = "X$dir"; then
19612                           haveit=yes
19613                           break
19614                         fi
19615                       done
19616                       if test -z "$haveit"; then
19617                         rpathdirs="$rpathdirs $dir"
19618                       fi
19619                                                                   haveit=
19620                       for x in $ltrpathdirs; do
19621                         if test "X$x" = "X$dir"; then
19622                           haveit=yes
19623                           break
19624                         fi
19625                       done
19626                       if test -z "$haveit"; then
19627                         ltrpathdirs="$ltrpathdirs $dir"
19628                       fi
19629                     fi
19630                     ;;
19631                   -l*)
19632                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19633                     ;;
19634                   *.la)
19635                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19636                     ;;
19637                   *)
19638                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
19639                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
19640                     ;;
19641                 esac
19642               done
19643             fi
19644           else
19645                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
19646             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
19647           fi
19648         fi
19649       fi
19650     done
19651   done
19652   if test "X$rpathdirs" != "X"; then
19653     if test -n "$acl_hardcode_libdir_separator"; then
19654                         alldirs=
19655       for found_dir in $rpathdirs; do
19656         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
19657       done
19658             acl_save_libdir="$libdir"
19659       libdir="$alldirs"
19660       eval flag=\"$acl_hardcode_libdir_flag_spec\"
19661       libdir="$acl_save_libdir"
19662       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
19663     else
19664             for found_dir in $rpathdirs; do
19665         acl_save_libdir="$libdir"
19666         libdir="$found_dir"
19667         eval flag=\"$acl_hardcode_libdir_flag_spec\"
19668         libdir="$acl_save_libdir"
19669         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
19670       done
19671     fi
19672   fi
19673   if test "X$ltrpathdirs" != "X"; then
19674             for found_dir in $ltrpathdirs; do
19675       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
19676     done
19677   fi
19678
19679
19680
19681
19682
19683
19684
19685         ac_save_CPPFLAGS="$CPPFLAGS"
19686
19687   for element in $INCSIGSEGV; do
19688     haveit=
19689     for x in $CPPFLAGS; do
19690
19691   acl_save_prefix="$prefix"
19692   prefix="$acl_final_prefix"
19693   acl_save_exec_prefix="$exec_prefix"
19694   exec_prefix="$acl_final_exec_prefix"
19695   eval x=\"$x\"
19696   exec_prefix="$acl_save_exec_prefix"
19697   prefix="$acl_save_prefix"
19698
19699       if test "X$x" = "X$element"; then
19700         haveit=yes
19701         break
19702       fi
19703     done
19704     if test -z "$haveit"; then
19705       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19706     fi
19707   done
19708
19709
19710   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
19711 printf %s "checking for libsigsegv... " >&6; }
19712 if ${ac_cv_libsigsegv+:} false; then :
19713   printf %s "(cached) " >&6
19714 else
19715
19716     ac_save_LIBS="$LIBS"
19717                                 case " $LIBSIGSEGV" in
19718       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
19719       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
19720     esac
19721     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19722 /* end confdefs.h.  */
19723 #include <sigsegv.h>
19724 int
19725 main ()
19726 {
19727 sigsegv_deinstall_handler();
19728   ;
19729   return 0;
19730 }
19731 _ACEOF
19732 if ac_fn_c_try_link "$LINENO"; then :
19733   ac_cv_libsigsegv=yes
19734 else
19735   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
19736 fi
19737 rm -f core conftest.err conftest.$ac_objext \
19738     conftest$ac_exeext conftest.$ac_ext
19739     LIBS="$ac_save_LIBS"
19740
19741 fi
19742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
19743 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
19744   if test "$ac_cv_libsigsegv" = yes; then
19745     HAVE_LIBSIGSEGV=yes
19746
19747 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
19748
19749     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
19750 printf %s "checking how to link with libsigsegv... " >&6; }
19751     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
19752 printf "%s\n" "$LIBSIGSEGV" >&6; }
19753   else
19754     HAVE_LIBSIGSEGV=no
19755             CPPFLAGS="$ac_save_CPPFLAGS"
19756     LIBSIGSEGV=
19757     LTLIBSIGSEGV=
19758     LIBSIGSEGV_PREFIX=
19759   fi
19760
19761
19762
19763
19764
19765
19766
19767     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787   case "$host_os" in
19788     solaris*)
19789
19790 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
19791
19792       ;;
19793   esac
19794
19795   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
19796 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
19797 if ${gl_cv_header_locale_h_posix2001+:} false; then :
19798   printf %s "(cached) " >&6
19799 else
19800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19801 /* end confdefs.h.  */
19802 #include <locale.h>
19803             int x = LC_MESSAGES;
19804             int y = sizeof (((struct lconv *) 0)->decimal_point);
19805 int
19806 main ()
19807 {
19808
19809   ;
19810   return 0;
19811 }
19812 _ACEOF
19813 if ac_fn_c_try_compile "$LINENO"; then :
19814   gl_cv_header_locale_h_posix2001=yes
19815 else
19816   gl_cv_header_locale_h_posix2001=no
19817 fi
19818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19819 fi
19820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
19821 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
19822
19823
19824   if test $ac_cv_header_xlocale_h = yes; then
19825     HAVE_XLOCALE_H=1
19826                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
19827 printf %s "checking whether locale.h defines locale_t... " >&6; }
19828 if ${gl_cv_header_locale_has_locale_t+:} false; then :
19829   printf %s "(cached) " >&6
19830 else
19831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19832 /* end confdefs.h.  */
19833 #include <locale.h>
19834               locale_t x;
19835 int
19836 main ()
19837 {
19838
19839   ;
19840   return 0;
19841 }
19842 _ACEOF
19843 if ac_fn_c_try_compile "$LINENO"; then :
19844   gl_cv_header_locale_has_locale_t=yes
19845 else
19846   gl_cv_header_locale_has_locale_t=no
19847 fi
19848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19849
19850 fi
19851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
19852 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
19853     if test $gl_cv_header_locale_has_locale_t = yes; then
19854       gl_cv_header_locale_h_needs_xlocale_h=no
19855     else
19856       gl_cv_header_locale_h_needs_xlocale_h=yes
19857     fi
19858   else
19859     HAVE_XLOCALE_H=0
19860     gl_cv_header_locale_h_needs_xlocale_h=no
19861   fi
19862
19863
19864           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
19865 printf %s "checking whether struct lconv is properly defined... " >&6; }
19866 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
19867   printf %s "(cached) " >&6
19868 else
19869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19870 /* end confdefs.h.  */
19871 #include <locale.h>
19872             struct lconv l;
19873             int x = sizeof (l.decimal_point);
19874             int y = sizeof (l.int_p_cs_precedes);
19875 int
19876 main ()
19877 {
19878
19879   ;
19880   return 0;
19881 }
19882 _ACEOF
19883 if ac_fn_c_try_compile "$LINENO"; then :
19884   gl_cv_sys_struct_lconv_ok=yes
19885 else
19886   gl_cv_sys_struct_lconv_ok=no
19887 fi
19888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19889
19890 fi
19891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
19892 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
19893   if test $gl_cv_sys_struct_lconv_ok = no; then
19894     REPLACE_STRUCT_LCONV=1
19895   fi
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905      if test $gl_cv_have_include_next = yes; then
19906        gl_cv_next_locale_h='<'locale.h'>'
19907      else
19908        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
19909 printf %s "checking absolute name of <locale.h>... " >&6; }
19910 if ${gl_cv_next_locale_h+:} false; then :
19911   printf %s "(cached) " >&6
19912 else
19913
19914                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19915 /* end confdefs.h.  */
19916 #include <locale.h>
19917
19918 _ACEOF
19919                                                                                                                         case "$host_os" in
19920                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19921                  *)    gl_absname_cpp="$ac_cpp" ;;
19922                esac
19923
19924                case "$host_os" in
19925                  mingw*)
19926                                                                                                                                      gl_dirsep_regex='[/\\]'
19927                    ;;
19928                  *)
19929                    gl_dirsep_regex='\/'
19930                    ;;
19931                esac
19932                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19933
19934                gl_header_literal_regex=`echo 'locale.h' \
19935                                         | sed -e "$gl_make_literal_regex_sed"`
19936                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19937                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19938                    s|^/[^/]|//&|
19939                    p
19940                    q
19941                  }'
19942                                                             gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19943                       sed -n "$gl_absolute_header_sed"`'"'
19944
19945
19946 fi
19947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
19948 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
19949      fi
19950      NEXT_LOCALE_H=$gl_cv_next_locale_h
19951
19952      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19953        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19954        gl_next_as_first_directive='<'locale.h'>'
19955      else
19956        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19957        gl_next_as_first_directive=$gl_cv_next_locale_h
19958      fi
19959      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
19960
19961
19962
19963
19964
19965
19966     for gl_func in setlocale duplocale; do
19967     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19968     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19969 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
19970 if eval \${$as_gl_Symbol+:} false; then :
19971   printf %s "(cached) " >&6
19972 else
19973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19974 /* end confdefs.h.  */
19975 #include <locale.h>
19976 /* Some systems provide declarations in a non-standard header.  */
19977 #if HAVE_XLOCALE_H
19978 # include <xlocale.h>
19979 #endif
19980
19981 int
19982 main ()
19983 {
19984 #undef $gl_func
19985   (void) $gl_func;
19986   ;
19987   return 0;
19988 }
19989 _ACEOF
19990 if ac_fn_c_try_compile "$LINENO"; then :
19991   eval "$as_gl_Symbol=yes"
19992 else
19993   eval "$as_gl_Symbol=no"
19994 fi
19995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19996 fi
19997 eval ac_res=\$$as_gl_Symbol
19998                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19999 printf "%s\n" "$ac_res" >&6; }
20000     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20001   cat >>confdefs.h <<_ACEOF
20002 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20003 _ACEOF
20004
20005                      eval ac_cv_have_decl_$gl_func=yes
20006 fi
20007       done
20008
20009
20010
20011
20012
20013
20014   if test $REPLACE_STRUCT_LCONV = 1; then
20015     REPLACE_LOCALECONV=1
20016   fi
20017
20018   if test $REPLACE_LOCALECONV = 1; then
20019
20020
20021
20022
20023
20024
20025
20026
20027   gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
20028
20029
20030   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
20031 "
20032 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
20033
20034 cat >>confdefs.h <<_ACEOF
20035 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
20036 _ACEOF
20037
20038
20039 fi
20040
20041
20042   fi
20043
20044
20045
20046
20047
20048           GNULIB_LOCALECONV=1
20049
20050
20051
20052
20053
20054 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
20055
20056
20057
20058
20059
20060
20061   if test $ac_cv_func_lstat = yes; then
20062
20063     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
20064       *no)
20065         REPLACE_LSTAT=1
20066         ;;
20067     esac
20068   else
20069     HAVE_LSTAT=0
20070   fi
20071
20072   if test $REPLACE_LSTAT = 1; then
20073
20074
20075
20076
20077
20078
20079
20080
20081   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
20082
20083     :
20084   fi
20085
20086
20087
20088
20089
20090           GNULIB_LSTAT=1
20091
20092
20093
20094
20095
20096 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
20097
20098
20099
20100
20101
20102
20103
20104       for ac_header in stdlib.h
20105 do :
20106   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
20107 if test "x$ac_cv_header_stdlib_h" = xyes; then :
20108   cat >>confdefs.h <<_ACEOF
20109 #define HAVE_STDLIB_H 1
20110 _ACEOF
20111
20112 fi
20113
20114 done
20115
20116   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
20117 printf %s "checking for GNU libc compatible malloc... " >&6; }
20118 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
20119   printf %s "(cached) " >&6
20120 else
20121   if test "$cross_compiling" = yes; then :
20122   case "$host_os" in
20123           # Guess yes on platforms where we know the result.
20124           *-gnu* | freebsd* | netbsd* | openbsd* \
20125           | hpux* | solaris* | cygwin* | mingw*)
20126             ac_cv_func_malloc_0_nonnull=yes ;;
20127           # If we don't know, assume the worst.
20128           *) ac_cv_func_malloc_0_nonnull=no ;;
20129         esac
20130
20131 else
20132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20133 /* end confdefs.h.  */
20134 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
20135             # include <stdlib.h>
20136             #else
20137             char *malloc ();
20138             #endif
20139
20140 int
20141 main ()
20142 {
20143 return ! malloc (0);
20144   ;
20145   return 0;
20146 }
20147
20148 _ACEOF
20149 if ac_fn_c_try_run "$LINENO"; then :
20150   ac_cv_func_malloc_0_nonnull=yes
20151 else
20152   ac_cv_func_malloc_0_nonnull=no
20153 fi
20154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20155   conftest.$ac_objext conftest.beam conftest.$ac_ext
20156 fi
20157
20158
20159 fi
20160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
20161 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
20162   if test $ac_cv_func_malloc_0_nonnull = yes; then :
20163
20164 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
20165
20166 else
20167   printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
20168
20169      REPLACE_MALLOC=1
20170
20171 fi
20172
20173
20174   if test $REPLACE_MALLOC = 1; then
20175
20176
20177
20178
20179
20180
20181
20182
20183   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
20184
20185   fi
20186
20187
20188 cat >>confdefs.h <<_ACEOF
20189 #define GNULIB_MALLOC_GNU 1
20190 _ACEOF
20191
20192
20193
20194
20195
20196   if test $gl_cv_func_malloc_posix = yes; then
20197
20198 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
20199
20200   else
20201     REPLACE_MALLOC=1
20202   fi
20203
20204   if test $REPLACE_MALLOC = 1; then
20205
20206
20207
20208
20209
20210
20211
20212
20213   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
20214
20215   fi
20216
20217
20218
20219
20220
20221           GNULIB_MALLOC_POSIX=1
20222
20223
20224
20225
20226
20227 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240   :
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20253
20254
20255
20256      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20257 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
20258 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
20259   printf %s "(cached) " >&6
20260 else
20261
20262                   case "$host_os" in
20263                      # Guess no on AIX and OSF/1.
20264         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20265                      # Guess yes otherwise.
20266         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20267       esac
20268       if test $LOCALE_JA != none; then
20269         if test "$cross_compiling" = yes; then :
20270   :
20271 else
20272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20273 /* end confdefs.h.  */
20274
20275 #include <locale.h>
20276 #include <string.h>
20277 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20278    <wchar.h>.
20279    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20280    included before <wchar.h>.  */
20281 #include <stddef.h>
20282 #include <stdio.h>
20283 #include <time.h>
20284 #include <wchar.h>
20285 int main ()
20286 {
20287   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20288     {
20289       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20290       mbstate_t state;
20291       wchar_t wc;
20292
20293       memset (&state, '\0', sizeof (mbstate_t));
20294       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20295         if (mbsinit (&state))
20296           return 1;
20297     }
20298   return 0;
20299 }
20300 _ACEOF
20301 if ac_fn_c_try_run "$LINENO"; then :
20302   gl_cv_func_mbrtowc_incomplete_state=yes
20303 else
20304   gl_cv_func_mbrtowc_incomplete_state=no
20305 fi
20306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20307   conftest.$ac_objext conftest.beam conftest.$ac_ext
20308 fi
20309
20310       fi
20311
20312 fi
20313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20314 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20315
20316
20317
20318
20319      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20320 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
20321 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
20322   printf %s "(cached) " >&6
20323 else
20324
20325                   case "$host_os" in
20326                     # Guess no on Solaris 8.
20327         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20328                     # Guess yes otherwise.
20329         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20330       esac
20331       if test $LOCALE_ZH_CN != none; then
20332         if test "$cross_compiling" = yes; then :
20333   :
20334 else
20335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20336 /* end confdefs.h.  */
20337
20338 #include <locale.h>
20339 #include <stdlib.h>
20340 #include <string.h>
20341 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20342    <wchar.h>.
20343    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20344    included before <wchar.h>.  */
20345 #include <stddef.h>
20346 #include <stdio.h>
20347 #include <time.h>
20348 #include <wchar.h>
20349 int main ()
20350 {
20351   /* This fails on Solaris 8:
20352      mbrtowc returns 2, and sets wc to 0x00F0.
20353      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
20354   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20355     {
20356       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20357       mbstate_t state;
20358       wchar_t wc;
20359
20360       memset (&state, '\0', sizeof (mbstate_t));
20361       if (mbrtowc (&wc, input + 3, 6, &state) != 4
20362           && mbtowc (&wc, input + 3, 6) == 4)
20363         return 1;
20364     }
20365   return 0;
20366 }
20367 _ACEOF
20368 if ac_fn_c_try_run "$LINENO"; then :
20369   gl_cv_func_mbrtowc_sanitycheck=yes
20370 else
20371   gl_cv_func_mbrtowc_sanitycheck=no
20372 fi
20373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20374   conftest.$ac_objext conftest.beam conftest.$ac_ext
20375 fi
20376
20377       fi
20378
20379 fi
20380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20381 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
20382
20383     REPLACE_MBSTATE_T=0
20384     case "$gl_cv_func_mbrtowc_incomplete_state" in
20385       *yes) ;;
20386       *) REPLACE_MBSTATE_T=1 ;;
20387     esac
20388     case "$gl_cv_func_mbrtowc_sanitycheck" in
20389       *yes) ;;
20390       *) REPLACE_MBSTATE_T=1 ;;
20391     esac
20392   else
20393     REPLACE_MBSTATE_T=1
20394   fi
20395
20396
20397
20398   if test $ac_cv_func_mbrtowc = no; then
20399     HAVE_MBRTOWC=0
20400     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
20401 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20402    <wchar.h>.
20403    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20404    included before <wchar.h>.  */
20405 #include <stddef.h>
20406 #include <stdio.h>
20407 #include <time.h>
20408 #include <wchar.h>
20409
20410 "
20411 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
20412   ac_have_decl=1
20413 else
20414   ac_have_decl=0
20415 fi
20416
20417 cat >>confdefs.h <<_ACEOF
20418 #define HAVE_DECL_MBRTOWC $ac_have_decl
20419 _ACEOF
20420
20421     if test $ac_cv_have_decl_mbrtowc = yes; then
20422                         REPLACE_MBRTOWC=1
20423     fi
20424   else
20425     if test $REPLACE_MBSTATE_T = 1; then
20426       REPLACE_MBRTOWC=1
20427     else
20428
20429
20430
20431      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
20432 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
20433 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
20434   printf %s "(cached) " >&6
20435 else
20436
20437                   case "$host_os" in
20438                   # Guess no on Solaris.
20439         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
20440                   # Guess yes otherwise.
20441         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
20442       esac
20443       if test $LOCALE_FR_UTF8 != none; then
20444         if test "$cross_compiling" = yes; then :
20445   :
20446 else
20447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20448 /* end confdefs.h.  */
20449
20450 #include <locale.h>
20451 #include <stdlib.h>
20452 #include <string.h>
20453 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20454    <wchar.h>.
20455    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20456    included before <wchar.h>.  */
20457 #include <stddef.h>
20458 #include <stdio.h>
20459 #include <time.h>
20460 #include <wchar.h>
20461 int main ()
20462 {
20463   int result = 0;
20464
20465   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20466     {
20467       char input[] = "\303\237er";
20468       mbstate_t state;
20469       wchar_t wc;
20470       size_t ret;
20471
20472       memset (&state, '\0', sizeof (mbstate_t));
20473       wc = (wchar_t) 0xBADFACE;
20474       ret = mbrtowc (&wc, input, 5, &state);
20475       if (ret != 2)
20476         result |= 1;
20477       if (!mbsinit (&state))
20478         result |= 2;
20479
20480       memset (&state, '\0', sizeof (mbstate_t));
20481       ret = mbrtowc (NULL, input, 5, &state);
20482       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
20483         result |= 4;
20484       if (!mbsinit (&state))
20485         result |= 8;
20486     }
20487   return result;
20488 }
20489 _ACEOF
20490 if ac_fn_c_try_run "$LINENO"; then :
20491   gl_cv_func_mbrtowc_null_arg1=yes
20492 else
20493   gl_cv_func_mbrtowc_null_arg1=no
20494 fi
20495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20496   conftest.$ac_objext conftest.beam conftest.$ac_ext
20497 fi
20498
20499       fi
20500
20501 fi
20502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
20503 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
20504
20505
20506
20507
20508      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
20509 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
20510 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
20511   printf %s "(cached) " >&6
20512 else
20513
20514                   case "$host_os" in
20515               # Guess no on OSF/1.
20516         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
20517               # Guess yes otherwise.
20518         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
20519       esac
20520       if test $LOCALE_FR_UTF8 != none; then
20521         if test "$cross_compiling" = yes; then :
20522   :
20523 else
20524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20525 /* end confdefs.h.  */
20526
20527 #include <locale.h>
20528 #include <string.h>
20529 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20530    <wchar.h>.
20531    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20532    included before <wchar.h>.  */
20533 #include <stddef.h>
20534 #include <stdio.h>
20535 #include <time.h>
20536 #include <wchar.h>
20537 int main ()
20538 {
20539   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20540     {
20541       mbstate_t state;
20542       wchar_t wc;
20543       int ret;
20544
20545       memset (&state, '\0', sizeof (mbstate_t));
20546       wc = (wchar_t) 0xBADFACE;
20547       mbrtowc (&wc, NULL, 5, &state);
20548       /* Check that wc was not modified.  */
20549       if (wc != (wchar_t) 0xBADFACE)
20550         return 1;
20551     }
20552   return 0;
20553 }
20554 _ACEOF
20555 if ac_fn_c_try_run "$LINENO"; then :
20556   gl_cv_func_mbrtowc_null_arg2=yes
20557 else
20558   gl_cv_func_mbrtowc_null_arg2=no
20559 fi
20560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20561   conftest.$ac_objext conftest.beam conftest.$ac_ext
20562 fi
20563
20564       fi
20565
20566 fi
20567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
20568 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
20569
20570
20571
20572
20573
20574
20575   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
20576 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
20577 if ${gl_cv_func_mbrtowc_retval+:} false; then :
20578   printf %s "(cached) " >&6
20579 else
20580
20581                   case "$host_os" in
20582                                    # Guess no on HP-UX, Solaris, native Windows.
20583         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
20584                                    # Guess yes otherwise.
20585         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
20586       esac
20587       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
20588          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
20589         if test "$cross_compiling" = yes; then :
20590   :
20591 else
20592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20593 /* end confdefs.h.  */
20594
20595 #include <locale.h>
20596 #include <string.h>
20597 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20598    <wchar.h>.
20599    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20600    included before <wchar.h>.  */
20601 #include <stddef.h>
20602 #include <stdio.h>
20603 #include <time.h>
20604 #include <wchar.h>
20605 int main ()
20606 {
20607   int result = 0;
20608   int found_some_locale = 0;
20609   /* This fails on Solaris.  */
20610   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20611     {
20612       char input[] = "B\303\274\303\237er"; /* "Büßer" */
20613       mbstate_t state;
20614       wchar_t wc;
20615
20616       memset (&state, '\0', sizeof (mbstate_t));
20617       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20618         {
20619           input[1] = '\0';
20620           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
20621             result |= 1;
20622         }
20623       found_some_locale = 1;
20624     }
20625   /* This fails on HP-UX 11.11.  */
20626   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20627     {
20628       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20629       mbstate_t state;
20630       wchar_t wc;
20631
20632       memset (&state, '\0', sizeof (mbstate_t));
20633       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20634         {
20635           input[1] = '\0';
20636           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
20637             result |= 2;
20638         }
20639       found_some_locale = 1;
20640     }
20641   /* This fails on native Windows.  */
20642   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
20643     {
20644       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
20645       mbstate_t state;
20646       wchar_t wc;
20647
20648       memset (&state, '\0', sizeof (mbstate_t));
20649       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20650         {
20651           input[3] = '\0';
20652           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20653             result |= 4;
20654         }
20655       found_some_locale = 1;
20656     }
20657   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
20658     {
20659       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
20660       mbstate_t state;
20661       wchar_t wc;
20662
20663       memset (&state, '\0', sizeof (mbstate_t));
20664       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20665         {
20666           input[3] = '\0';
20667           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20668             result |= 8;
20669         }
20670       found_some_locale = 1;
20671     }
20672   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
20673     {
20674       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
20675       mbstate_t state;
20676       wchar_t wc;
20677
20678       memset (&state, '\0', sizeof (mbstate_t));
20679       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20680         {
20681           input[3] = '\0';
20682           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20683             result |= 16;
20684         }
20685       found_some_locale = 1;
20686     }
20687   return (found_some_locale ? result : 77);
20688 }
20689 _ACEOF
20690 if ac_fn_c_try_run "$LINENO"; then :
20691   gl_cv_func_mbrtowc_retval=yes
20692 else
20693   if test $? != 77; then
20694              gl_cv_func_mbrtowc_retval=no
20695            fi
20696
20697 fi
20698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20699   conftest.$ac_objext conftest.beam conftest.$ac_ext
20700 fi
20701
20702       fi
20703
20704 fi
20705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
20706 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
20707
20708
20709
20710
20711      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
20712 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
20713 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
20714   printf %s "(cached) " >&6
20715 else
20716
20717                   case "$host_os" in
20718                        # Guess no on Solaris 8 and 9.
20719         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
20720                        # Guess yes otherwise.
20721         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
20722       esac
20723       if test $LOCALE_ZH_CN != none; then
20724         if test "$cross_compiling" = yes; then :
20725   :
20726 else
20727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20728 /* end confdefs.h.  */
20729
20730 #include <locale.h>
20731 #include <string.h>
20732 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20733    <wchar.h>.
20734    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20735    included before <wchar.h>.  */
20736 #include <stddef.h>
20737 #include <stdio.h>
20738 #include <time.h>
20739 #include <wchar.h>
20740 int main ()
20741 {
20742   /* This fails on Solaris 8 and 9.  */
20743   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20744     {
20745       mbstate_t state;
20746       wchar_t wc;
20747
20748       memset (&state, '\0', sizeof (mbstate_t));
20749       if (mbrtowc (&wc, "", 1, &state) != 0)
20750         return 1;
20751     }
20752   return 0;
20753 }
20754 _ACEOF
20755 if ac_fn_c_try_run "$LINENO"; then :
20756   gl_cv_func_mbrtowc_nul_retval=yes
20757 else
20758   gl_cv_func_mbrtowc_nul_retval=no
20759 fi
20760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20761   conftest.$ac_objext conftest.beam conftest.$ac_ext
20762 fi
20763
20764       fi
20765
20766 fi
20767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
20768 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
20769
20770       case "$gl_cv_func_mbrtowc_null_arg1" in
20771         *yes) ;;
20772         *)
20773 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
20774
20775            REPLACE_MBRTOWC=1
20776            ;;
20777       esac
20778       case "$gl_cv_func_mbrtowc_null_arg2" in
20779         *yes) ;;
20780         *)
20781 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
20782
20783            REPLACE_MBRTOWC=1
20784            ;;
20785       esac
20786       case "$gl_cv_func_mbrtowc_retval" in
20787         *yes) ;;
20788         *)
20789 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
20790
20791            REPLACE_MBRTOWC=1
20792            ;;
20793       esac
20794       case "$gl_cv_func_mbrtowc_nul_retval" in
20795         *yes) ;;
20796         *)
20797 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
20798
20799            REPLACE_MBRTOWC=1
20800            ;;
20801       esac
20802     fi
20803   fi
20804
20805   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
20806
20807
20808
20809
20810
20811
20812
20813
20814   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
20815
20816
20817   :
20818
20819   fi
20820
20821
20822
20823
20824
20825           GNULIB_MBRTOWC=1
20826
20827
20828
20829
20830
20831 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
20832
20833
20834
20835
20836
20837
20838
20839
20840           GNULIB_MBSCASECMP=1
20841
20842
20843
20844
20845
20846 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20862
20863
20864
20865      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20866 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
20867 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
20868   printf %s "(cached) " >&6
20869 else
20870
20871                   case "$host_os" in
20872                      # Guess no on AIX and OSF/1.
20873         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20874                      # Guess yes otherwise.
20875         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20876       esac
20877       if test $LOCALE_JA != none; then
20878         if test "$cross_compiling" = yes; then :
20879   :
20880 else
20881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20882 /* end confdefs.h.  */
20883
20884 #include <locale.h>
20885 #include <string.h>
20886 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20887    <wchar.h>.
20888    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20889    included before <wchar.h>.  */
20890 #include <stddef.h>
20891 #include <stdio.h>
20892 #include <time.h>
20893 #include <wchar.h>
20894 int main ()
20895 {
20896   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20897     {
20898       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20899       mbstate_t state;
20900       wchar_t wc;
20901
20902       memset (&state, '\0', sizeof (mbstate_t));
20903       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20904         if (mbsinit (&state))
20905           return 1;
20906     }
20907   return 0;
20908 }
20909 _ACEOF
20910 if ac_fn_c_try_run "$LINENO"; then :
20911   gl_cv_func_mbrtowc_incomplete_state=yes
20912 else
20913   gl_cv_func_mbrtowc_incomplete_state=no
20914 fi
20915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20916   conftest.$ac_objext conftest.beam conftest.$ac_ext
20917 fi
20918
20919       fi
20920
20921 fi
20922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20923 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20924
20925
20926
20927
20928      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20929 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
20930 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
20931   printf %s "(cached) " >&6
20932 else
20933
20934                   case "$host_os" in
20935                     # Guess no on Solaris 8.
20936         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20937                     # Guess yes otherwise.
20938         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20939       esac
20940       if test $LOCALE_ZH_CN != none; then
20941         if test "$cross_compiling" = yes; then :
20942   :
20943 else
20944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20945 /* end confdefs.h.  */
20946
20947 #include <locale.h>
20948 #include <stdlib.h>
20949 #include <string.h>
20950 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20951    <wchar.h>.
20952    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20953    included before <wchar.h>.  */
20954 #include <stddef.h>
20955 #include <stdio.h>
20956 #include <time.h>
20957 #include <wchar.h>
20958 int main ()
20959 {
20960   /* This fails on Solaris 8:
20961      mbrtowc returns 2, and sets wc to 0x00F0.
20962      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
20963   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20964     {
20965       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20966       mbstate_t state;
20967       wchar_t wc;
20968
20969       memset (&state, '\0', sizeof (mbstate_t));
20970       if (mbrtowc (&wc, input + 3, 6, &state) != 4
20971           && mbtowc (&wc, input + 3, 6) == 4)
20972         return 1;
20973     }
20974   return 0;
20975 }
20976 _ACEOF
20977 if ac_fn_c_try_run "$LINENO"; then :
20978   gl_cv_func_mbrtowc_sanitycheck=yes
20979 else
20980   gl_cv_func_mbrtowc_sanitycheck=no
20981 fi
20982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20983   conftest.$ac_objext conftest.beam conftest.$ac_ext
20984 fi
20985
20986       fi
20987
20988 fi
20989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20990 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
20991
20992     REPLACE_MBSTATE_T=0
20993     case "$gl_cv_func_mbrtowc_incomplete_state" in
20994       *yes) ;;
20995       *) REPLACE_MBSTATE_T=1 ;;
20996     esac
20997     case "$gl_cv_func_mbrtowc_sanitycheck" in
20998       *yes) ;;
20999       *) REPLACE_MBSTATE_T=1 ;;
21000     esac
21001   else
21002     REPLACE_MBSTATE_T=1
21003   fi
21004
21005
21006
21007   if test $ac_cv_func_mbsinit = no; then
21008     HAVE_MBSINIT=0
21009     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
21010 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21011    <wchar.h>.
21012    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21013    included before <wchar.h>.  */
21014 #include <stddef.h>
21015 #include <stdio.h>
21016 #include <time.h>
21017 #include <wchar.h>
21018
21019 "
21020 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
21021   ac_have_decl=1
21022 else
21023   ac_have_decl=0
21024 fi
21025
21026 cat >>confdefs.h <<_ACEOF
21027 #define HAVE_DECL_MBSINIT $ac_have_decl
21028 _ACEOF
21029
21030     if test $ac_cv_have_decl_mbsinit = yes; then
21031                         REPLACE_MBSINIT=1
21032     fi
21033   else
21034     if test $REPLACE_MBSTATE_T = 1; then
21035       REPLACE_MBSINIT=1
21036     else
21037                         case "$host_os" in
21038         mingw*) REPLACE_MBSINIT=1 ;;
21039       esac
21040     fi
21041   fi
21042
21043   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
21044
21045
21046
21047
21048
21049
21050
21051
21052   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
21053
21054
21055   :
21056
21057   fi
21058
21059
21060
21061
21062
21063           GNULIB_MBSINIT=1
21064
21065
21066
21067
21068
21069 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
21070
21071
21072
21073
21074
21075
21076   if test $ac_cv_func_mbslen = yes; then
21077     HAVE_MBSLEN=1
21078   else
21079     HAVE_MBSLEN=0
21080   fi
21081
21082
21083
21084
21085
21086
21087           GNULIB_MBSLEN=1
21088
21089
21090
21091
21092
21093 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21108
21109
21110
21111      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21112 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
21113 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21114   printf %s "(cached) " >&6
21115 else
21116
21117                   case "$host_os" in
21118                      # Guess no on AIX and OSF/1.
21119         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21120                      # Guess yes otherwise.
21121         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21122       esac
21123       if test $LOCALE_JA != none; then
21124         if test "$cross_compiling" = yes; then :
21125   :
21126 else
21127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21128 /* end confdefs.h.  */
21129
21130 #include <locale.h>
21131 #include <string.h>
21132 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21133    <wchar.h>.
21134    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21135    included before <wchar.h>.  */
21136 #include <stddef.h>
21137 #include <stdio.h>
21138 #include <time.h>
21139 #include <wchar.h>
21140 int main ()
21141 {
21142   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21143     {
21144       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21145       mbstate_t state;
21146       wchar_t wc;
21147
21148       memset (&state, '\0', sizeof (mbstate_t));
21149       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21150         if (mbsinit (&state))
21151           return 1;
21152     }
21153   return 0;
21154 }
21155 _ACEOF
21156 if ac_fn_c_try_run "$LINENO"; then :
21157   gl_cv_func_mbrtowc_incomplete_state=yes
21158 else
21159   gl_cv_func_mbrtowc_incomplete_state=no
21160 fi
21161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21162   conftest.$ac_objext conftest.beam conftest.$ac_ext
21163 fi
21164
21165       fi
21166
21167 fi
21168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21169 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21170
21171
21172
21173
21174      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21175 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
21176 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21177   printf %s "(cached) " >&6
21178 else
21179
21180                   case "$host_os" in
21181                     # Guess no on Solaris 8.
21182         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21183                     # Guess yes otherwise.
21184         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21185       esac
21186       if test $LOCALE_ZH_CN != none; then
21187         if test "$cross_compiling" = yes; then :
21188   :
21189 else
21190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21191 /* end confdefs.h.  */
21192
21193 #include <locale.h>
21194 #include <stdlib.h>
21195 #include <string.h>
21196 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21197    <wchar.h>.
21198    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21199    included before <wchar.h>.  */
21200 #include <stddef.h>
21201 #include <stdio.h>
21202 #include <time.h>
21203 #include <wchar.h>
21204 int main ()
21205 {
21206   /* This fails on Solaris 8:
21207      mbrtowc returns 2, and sets wc to 0x00F0.
21208      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21209   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21210     {
21211       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21212       mbstate_t state;
21213       wchar_t wc;
21214
21215       memset (&state, '\0', sizeof (mbstate_t));
21216       if (mbrtowc (&wc, input + 3, 6, &state) != 4
21217           && mbtowc (&wc, input + 3, 6) == 4)
21218         return 1;
21219     }
21220   return 0;
21221 }
21222 _ACEOF
21223 if ac_fn_c_try_run "$LINENO"; then :
21224   gl_cv_func_mbrtowc_sanitycheck=yes
21225 else
21226   gl_cv_func_mbrtowc_sanitycheck=no
21227 fi
21228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21229   conftest.$ac_objext conftest.beam conftest.$ac_ext
21230 fi
21231
21232       fi
21233
21234 fi
21235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21236 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21237
21238     REPLACE_MBSTATE_T=0
21239     case "$gl_cv_func_mbrtowc_incomplete_state" in
21240       *yes) ;;
21241       *) REPLACE_MBSTATE_T=1 ;;
21242     esac
21243     case "$gl_cv_func_mbrtowc_sanitycheck" in
21244       *yes) ;;
21245       *) REPLACE_MBSTATE_T=1 ;;
21246     esac
21247   else
21248     REPLACE_MBSTATE_T=1
21249   fi
21250
21251
21252
21253   if test $ac_cv_func_mbsrtowcs = no; then
21254     HAVE_MBSRTOWCS=0
21255     ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
21256 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21257    <wchar.h>.
21258    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21259    included before <wchar.h>.  */
21260 #include <stddef.h>
21261 #include <stdio.h>
21262 #include <time.h>
21263 #include <wchar.h>
21264
21265 "
21266 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
21267   ac_have_decl=1
21268 else
21269   ac_have_decl=0
21270 fi
21271
21272 cat >>confdefs.h <<_ACEOF
21273 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
21274 _ACEOF
21275
21276     if test $ac_cv_have_decl_mbsrtowcs = yes; then
21277                         REPLACE_MBSRTOWCS=1
21278     fi
21279   else
21280     if test $REPLACE_MBSTATE_T = 1; then
21281       REPLACE_MBSRTOWCS=1
21282     else
21283
21284
21285
21286
21287
21288
21289      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
21290 printf %s "checking whether mbsrtowcs works... " >&6; }
21291 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
21292   printf %s "(cached) " >&6
21293 else
21294
21295                   case "$host_os" in
21296                                    # Guess no on HP-UX, Solaris, mingw.
21297         hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
21298                                    # Guess yes otherwise.
21299         *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
21300       esac
21301       if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
21302         if test "$cross_compiling" = yes; then :
21303   :
21304 else
21305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21306 /* end confdefs.h.  */
21307
21308 #include <locale.h>
21309 #include <string.h>
21310 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21311    <wchar.h>.
21312    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21313    included before <wchar.h>.  */
21314 #include <stddef.h>
21315 #include <stdio.h>
21316 #include <time.h>
21317 #include <wchar.h>
21318 int main ()
21319 {
21320   int result = 0;
21321   /* Test whether the function supports a NULL destination argument.
21322      This fails on native Windows.  */
21323   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21324     {
21325       const char input[] = "\337er";
21326       const char *src = input;
21327       mbstate_t state;
21328
21329       memset (&state, '\0', sizeof (mbstate_t));
21330       if (mbsrtowcs (NULL, &src, 1, &state) != 3
21331           || src != input)
21332         result |= 1;
21333     }
21334   /* Test whether the function works when started with a conversion state
21335      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
21336   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21337     {
21338       const char input[] = "B\303\274\303\237er";
21339       mbstate_t state;
21340
21341       memset (&state, '\0', sizeof (mbstate_t));
21342       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21343         if (!mbsinit (&state))
21344           {
21345             const char *src = input + 2;
21346             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21347               result |= 2;
21348           }
21349     }
21350   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21351     {
21352       const char input[] = "<\306\374\313\334\270\354>";
21353       mbstate_t state;
21354
21355       memset (&state, '\0', sizeof (mbstate_t));
21356       if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
21357         if (!mbsinit (&state))
21358           {
21359             const char *src = input + 4;
21360             if (mbsrtowcs (NULL, &src, 10, &state) != 3)
21361               result |= 4;
21362           }
21363     }
21364   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21365     {
21366       const char input[] = "B\250\271\201\060\211\070er";
21367       mbstate_t state;
21368
21369       memset (&state, '\0', sizeof (mbstate_t));
21370       if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21371         if (!mbsinit (&state))
21372           {
21373             const char *src = input + 2;
21374             if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21375               result |= 8;
21376           }
21377     }
21378   return result;
21379 }
21380 _ACEOF
21381 if ac_fn_c_try_run "$LINENO"; then :
21382   gl_cv_func_mbsrtowcs_works=yes
21383 else
21384   gl_cv_func_mbsrtowcs_works=no
21385 fi
21386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21387   conftest.$ac_objext conftest.beam conftest.$ac_ext
21388 fi
21389
21390       fi
21391
21392 fi
21393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
21394 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
21395
21396       case "$gl_cv_func_mbsrtowcs_works" in
21397         *yes) ;;
21398         *) REPLACE_MBSRTOWCS=1 ;;
21399       esac
21400     fi
21401   fi
21402
21403   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
21404
21405
21406
21407
21408
21409
21410
21411
21412   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422   gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
21423
21424
21425   :
21426
21427   fi
21428
21429
21430
21431
21432
21433           GNULIB_MBSRTOWCS=1
21434
21435
21436
21437
21438
21439 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
21440
21441
21442
21443
21444
21445
21446
21447
21448           GNULIB_MBSSTR=1
21449
21450
21451
21452
21453
21454 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
21455
21456
21457
21458
21459
21460
21461   if false; then
21462     REPLACE_MBTOWC=1
21463   fi
21464
21465   if test $REPLACE_MBTOWC = 1; then
21466
21467
21468
21469
21470
21471
21472
21473
21474   gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
21475
21476
21477   :
21478
21479   fi
21480
21481
21482
21483
21484
21485           GNULIB_MBTOWC=1
21486
21487
21488
21489
21490
21491 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
21492
21493
21494
21495
21496
21497   :
21498
21499
21500   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
21501
21502
21503
21504
21505
21506
21507
21508
21509   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
21510
21511
21512   for ac_header in bp-sym.h
21513 do :
21514   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
21515 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
21516   cat >>confdefs.h <<_ACEOF
21517 #define HAVE_BP_SYM_H 1
21518 _ACEOF
21519
21520 fi
21521
21522 done
21523
21524
21525   fi
21526
21527
21528
21529
21530
21531           GNULIB_MEMCHR=1
21532
21533
21534
21535
21536
21537 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
21538
21539
21540
21541
21542
21543
21544
21545   if test $ac_cv_func_mkstemp = yes; then
21546     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
21547 printf %s "checking for working mkstemp... " >&6; }
21548 if ${gl_cv_func_working_mkstemp+:} false; then :
21549   printf %s "(cached) " >&6
21550 else
21551
21552         mkdir conftest.mkstemp
21553         if test "$cross_compiling" = yes; then :
21554   case "$host_os" in
21555                      # Guess yes on glibc systems.
21556              *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
21557                      # If we don't know, assume the worst.
21558              *)      gl_cv_func_working_mkstemp="guessing no" ;;
21559            esac
21560
21561 else
21562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21563 /* end confdefs.h.  */
21564 $ac_includes_default
21565 int
21566 main ()
21567 {
21568 int result = 0;
21569               int i;
21570               off_t large = (off_t) 4294967295u;
21571               if (large < 0)
21572                 large = 2147483647;
21573               umask (0);
21574               for (i = 0; i < 70; i++)
21575                 {
21576                   char templ[] = "conftest.mkstemp/coXXXXXX";
21577                   int (*mkstemp_function) (char *) = mkstemp;
21578                   int fd = mkstemp_function (templ);
21579                   if (fd < 0)
21580                     result |= 1;
21581                   else
21582                     {
21583                       struct stat st;
21584                       if (lseek (fd, large, SEEK_SET) != large)
21585                         result |= 2;
21586                       if (fstat (fd, &st) < 0)
21587                         result |= 4;
21588                       else if (st.st_mode & 0077)
21589                         result |= 8;
21590                       if (close (fd))
21591                         result |= 16;
21592                     }
21593                 }
21594               return result;
21595   ;
21596   return 0;
21597 }
21598 _ACEOF
21599 if ac_fn_c_try_run "$LINENO"; then :
21600   gl_cv_func_working_mkstemp=yes
21601 else
21602   gl_cv_func_working_mkstemp=no
21603 fi
21604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21605   conftest.$ac_objext conftest.beam conftest.$ac_ext
21606 fi
21607
21608         rm -rf conftest.mkstemp
21609
21610 fi
21611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
21612 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
21613     case "$gl_cv_func_working_mkstemp" in
21614       *yes) ;;
21615       *)
21616         REPLACE_MKSTEMP=1
21617         ;;
21618     esac
21619   else
21620     HAVE_MKSTEMP=0
21621   fi
21622
21623   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
21624
21625
21626
21627
21628
21629
21630
21631
21632   gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
21633
21634
21635
21636   fi
21637
21638
21639
21640
21641
21642           GNULIB_MKSTEMP=1
21643
21644
21645
21646
21647
21648 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658   if test $APPLE_UNIVERSAL_BUILD = 1; then
21659     # A universal build on Apple Mac OS X platforms.
21660     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
21661     # But we need a configuration result that is valid in both modes.
21662     gl_cv_func_working_mktime=no
21663   fi
21664   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
21665 printf %s "checking for working mktime... " >&6; }
21666 if ${gl_cv_func_working_mktime+:} false; then :
21667   printf %s "(cached) " >&6
21668 else
21669   if test "$cross_compiling" = yes; then :
21670   gl_cv_func_working_mktime=no
21671 else
21672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21673 /* end confdefs.h.  */
21674 /* Test program from Paul Eggert and Tony Leneis.  */
21675 #include <limits.h>
21676 #include <stdlib.h>
21677 #include <time.h>
21678
21679 #ifdef HAVE_UNISTD_H
21680 # include <unistd.h>
21681 #endif
21682
21683 #if HAVE_DECL_ALARM
21684 # include <signal.h>
21685 #endif
21686
21687 /* Work around redefinition to rpl_putenv by other config tests.  */
21688 #undef putenv
21689
21690 static time_t time_t_max;
21691 static time_t time_t_min;
21692
21693 /* Values we'll use to set the TZ environment variable.  */
21694 static char *tz_strings[] = {
21695   (char *) 0, "TZ=GMT0", "TZ=JST-9",
21696   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
21697 };
21698 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
21699
21700 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
21701    Based on a problem report from Andreas Jaeger.  */
21702 static int
21703 spring_forward_gap ()
21704 {
21705   /* glibc (up to about 1998-10-07) failed this test. */
21706   struct tm tm;
21707
21708   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21709      instead of "TZ=America/Vancouver" in order to detect the bug even
21710      on systems that don't support the Olson extension, or don't have the
21711      full zoneinfo tables installed.  */
21712   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21713
21714   tm.tm_year = 98;
21715   tm.tm_mon = 3;
21716   tm.tm_mday = 5;
21717   tm.tm_hour = 2;
21718   tm.tm_min = 0;
21719   tm.tm_sec = 0;
21720   tm.tm_isdst = -1;
21721   return mktime (&tm) != (time_t) -1;
21722 }
21723
21724 static int
21725 mktime_test1 (time_t now)
21726 {
21727   struct tm *lt;
21728   return ! (lt = localtime (&now)) || mktime (lt) == now;
21729 }
21730
21731 static int
21732 mktime_test (time_t now)
21733 {
21734   return (mktime_test1 (now)
21735           && mktime_test1 ((time_t) (time_t_max - now))
21736           && mktime_test1 ((time_t) (time_t_min + now)));
21737 }
21738
21739 static int
21740 irix_6_4_bug ()
21741 {
21742   /* Based on code from Ariel Faigon.  */
21743   struct tm tm;
21744   tm.tm_year = 96;
21745   tm.tm_mon = 3;
21746   tm.tm_mday = 0;
21747   tm.tm_hour = 0;
21748   tm.tm_min = 0;
21749   tm.tm_sec = 0;
21750   tm.tm_isdst = -1;
21751   mktime (&tm);
21752   return tm.tm_mon == 2 && tm.tm_mday == 31;
21753 }
21754
21755 static int
21756 bigtime_test (int j)
21757 {
21758   struct tm tm;
21759   time_t now;
21760   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
21761   now = mktime (&tm);
21762   if (now != (time_t) -1)
21763     {
21764       struct tm *lt = localtime (&now);
21765       if (! (lt
21766              && lt->tm_year == tm.tm_year
21767              && lt->tm_mon == tm.tm_mon
21768              && lt->tm_mday == tm.tm_mday
21769              && lt->tm_hour == tm.tm_hour
21770              && lt->tm_min == tm.tm_min
21771              && lt->tm_sec == tm.tm_sec
21772              && lt->tm_yday == tm.tm_yday
21773              && lt->tm_wday == tm.tm_wday
21774              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
21775                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
21776         return 0;
21777     }
21778   return 1;
21779 }
21780
21781 static int
21782 year_2050_test ()
21783 {
21784   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
21785      ignoring leap seconds.  */
21786   unsigned long int answer = 2527315200UL;
21787
21788   struct tm tm;
21789   time_t t;
21790   tm.tm_year = 2050 - 1900;
21791   tm.tm_mon = 2 - 1;
21792   tm.tm_mday = 1;
21793   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
21794   tm.tm_isdst = -1;
21795
21796   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21797      instead of "TZ=America/Vancouver" in order to detect the bug even
21798      on systems that don't support the Olson extension, or don't have the
21799      full zoneinfo tables installed.  */
21800   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21801
21802   t = mktime (&tm);
21803
21804   /* Check that the result is either a failure, or close enough
21805      to the correct answer that we can assume the discrepancy is
21806      due to leap seconds.  */
21807   return (t == (time_t) -1
21808           || (0 < t && answer - 120 <= t && t <= answer + 120));
21809 }
21810
21811 int
21812 main ()
21813 {
21814   int result = 0;
21815   time_t t, delta;
21816   int i, j;
21817   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
21818   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
21819
21820 #if HAVE_DECL_ALARM
21821   /* This test makes some buggy mktime implementations loop.
21822      Give up after 60 seconds; a mktime slower than that
21823      isn't worth using anyway.  */
21824   signal (SIGALRM, SIG_DFL);
21825   alarm (60);
21826 #endif
21827
21828   time_t_max = (! time_t_signed
21829                 ? (time_t) -1
21830                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
21831                    * 2 + 1));
21832   time_t_min = (! time_t_signed
21833                 ? (time_t) 0
21834                 : time_t_signed_magnitude
21835                 ? ~ (time_t) 0
21836                 : ~ time_t_max);
21837
21838   delta = time_t_max / 997; /* a suitable prime number */
21839   for (i = 0; i < N_STRINGS; i++)
21840     {
21841       if (tz_strings[i])
21842         putenv (tz_strings[i]);
21843
21844       for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
21845         if (! mktime_test (t))
21846           result |= 1;
21847       if ((result & 2) == 0
21848           && ! (mktime_test ((time_t) 1)
21849                 && mktime_test ((time_t) (60 * 60))
21850                 && mktime_test ((time_t) (60 * 60 * 24))))
21851         result |= 2;
21852
21853       for (j = 1; (result & 4) == 0; j <<= 1)
21854         {
21855           if (! bigtime_test (j))
21856             result |= 4;
21857           if (INT_MAX / 2 < j)
21858             break;
21859         }
21860       if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
21861         result |= 8;
21862     }
21863   if (! irix_6_4_bug ())
21864     result |= 16;
21865   if (! spring_forward_gap ())
21866     result |= 32;
21867   if (! year_2050_test ())
21868     result |= 64;
21869   return result;
21870 }
21871 _ACEOF
21872 if ac_fn_c_try_run "$LINENO"; then :
21873   gl_cv_func_working_mktime=yes
21874 else
21875   gl_cv_func_working_mktime=no
21876 fi
21877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21878   conftest.$ac_objext conftest.beam conftest.$ac_ext
21879 fi
21880
21881
21882 fi
21883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
21884 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
21885
21886   if test $gl_cv_func_working_mktime = no; then
21887     REPLACE_MKTIME=1
21888   else
21889     REPLACE_MKTIME=0
21890   fi
21891
21892   if test $REPLACE_MKTIME = 1; then
21893
21894
21895
21896
21897
21898
21899
21900
21901   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
21902
21903     :
21904   fi
21905
21906
21907
21908
21909
21910           GNULIB_MKTIME=1
21911
21912
21913
21914
21915
21916 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
21917
21918
21919
21920
21921
21922   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
21923     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
21924
21925 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
21926
21927   else
21928     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
21929   fi
21930
21931
21932   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21933
21934
21935
21936
21937
21938
21939
21940
21941   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
21942
21943   fi
21944
21945
21946
21947   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21948
21949
21950
21951
21952
21953
21954
21955
21956   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
21957
21958   fi
21959
21960
21961
21962
21963
21964      if test $ac_cv_func_nl_langinfo = yes; then
21965     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
21966     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
21967 printf %s "checking whether YESEXPR works... " >&6; }
21968 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
21969   printf %s "(cached) " >&6
21970 else
21971   if test "$cross_compiling" = yes; then :
21972
21973          case "$host_os" in
21974                    # Guess no on irix systems.
21975            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
21976                    # Guess yes elsewhere.
21977            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
21978          esac
21979
21980 else
21981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21982 /* end confdefs.h.  */
21983 #include <langinfo.h>
21984
21985 int
21986 main ()
21987 {
21988 return !*nl_langinfo(YESEXPR);
21989
21990   ;
21991   return 0;
21992 }
21993 _ACEOF
21994 if ac_fn_c_try_run "$LINENO"; then :
21995   gl_cv_func_nl_langinfo_yesexpr_works=yes
21996 else
21997   gl_cv_func_nl_langinfo_yesexpr_works=no
21998 fi
21999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22000   conftest.$ac_objext conftest.beam conftest.$ac_ext
22001 fi
22002
22003
22004 fi
22005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
22006 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
22007     case $gl_cv_func_nl_langinfo_yesexpr_works in
22008       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
22009       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
22010     esac
22011
22012 cat >>confdefs.h <<_ACEOF
22013 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
22014 _ACEOF
22015
22016     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
22017         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
22018       :
22019     else
22020       REPLACE_NL_LANGINFO=1
22021
22022 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
22023
22024     fi
22025   else
22026     HAVE_NL_LANGINFO=0
22027   fi
22028
22029   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
22030
22031
22032
22033
22034
22035
22036
22037
22038   gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
22039
22040   fi
22041
22042
22043
22044
22045
22046           GNULIB_NL_LANGINFO=1
22047
22048
22049
22050
22051
22052 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
22053
22054
22055
22056
22057
22058   case "$host_os" in
22059     mingw* | pw*)
22060       REPLACE_OPEN=1
22061       ;;
22062     *)
22063
22064       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22065 printf %s "checking whether open recognizes a trailing slash... " >&6; }
22066 if ${gl_cv_func_open_slash+:} false; then :
22067   printf %s "(cached) " >&6
22068 else
22069   # Assume that if we have lstat, we can also check symlinks.
22070           if test $ac_cv_func_lstat = yes; then
22071             touch conftest.tmp
22072             ln -s conftest.tmp conftest.lnk
22073           fi
22074           if test "$cross_compiling" = yes; then :
22075
22076              case "$host_os" in
22077                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22078                  gl_cv_func_open_slash="guessing no" ;;
22079                *)
22080                  gl_cv_func_open_slash="guessing yes" ;;
22081              esac
22082
22083 else
22084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22085 /* end confdefs.h.  */
22086
22087 #include <fcntl.h>
22088 #if HAVE_UNISTD_H
22089 # include <unistd.h>
22090 #endif
22091 int main ()
22092 {
22093   int result = 0;
22094 #if HAVE_LSTAT
22095   if (open ("conftest.lnk/", O_RDONLY) != -1)
22096     result |= 1;
22097 #endif
22098   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22099     result |= 2;
22100   return result;
22101 }
22102 _ACEOF
22103 if ac_fn_c_try_run "$LINENO"; then :
22104   gl_cv_func_open_slash=yes
22105 else
22106   gl_cv_func_open_slash=no
22107 fi
22108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22109   conftest.$ac_objext conftest.beam conftest.$ac_ext
22110 fi
22111
22112           rm -f conftest.sl conftest.tmp conftest.lnk
22113
22114 fi
22115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22116 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
22117       case "$gl_cv_func_open_slash" in
22118         *no)
22119
22120 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22121
22122           REPLACE_OPEN=1
22123           ;;
22124       esac
22125       ;;
22126   esac
22127
22128
22129
22130   if test $REPLACE_OPEN = 1; then
22131
22132
22133
22134
22135
22136
22137
22138
22139   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
22140
22141
22142
22143   :
22144
22145   fi
22146
22147
22148
22149
22150
22151           GNULIB_OPEN=1
22152
22153
22154
22155
22156
22157 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
22158
22159
22160
22161
22162
22163
22164   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22165 "
22166 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
22167   ac_have_decl=1
22168 else
22169   ac_have_decl=0
22170 fi
22171
22172 cat >>confdefs.h <<_ACEOF
22173 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
22174 _ACEOF
22175
22176   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22177 "
22178 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
22179   ac_have_decl=1
22180 else
22181   ac_have_decl=0
22182 fi
22183
22184 cat >>confdefs.h <<_ACEOF
22185 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
22186 _ACEOF
22187
22188
22189
22190   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
22191
22192
22193
22194   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
22195
22196
22197       :
22198
22199
22200   :
22201
22202
22203
22204
22205
22206   for ac_func in raise
22207 do :
22208   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
22209 if test "x$ac_cv_func_raise" = xyes; then :
22210   cat >>confdefs.h <<_ACEOF
22211 #define HAVE_RAISE 1
22212 _ACEOF
22213
22214 fi
22215 done
22216
22217   if test $ac_cv_func_raise = no; then
22218     HAVE_RAISE=0
22219   else
22220     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22221       REPLACE_RAISE=1
22222     fi
22223
22224
22225
22226
22227   if test $gl_cv_type_sigset_t = yes; then
22228     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
22229 if test "x$ac_cv_func_sigprocmask" = xyes; then :
22230   gl_cv_func_sigprocmask=1
22231 fi
22232
22233   fi
22234   if test -z "$gl_cv_func_sigprocmask"; then
22235     HAVE_POSIX_SIGNALBLOCKING=0
22236   fi
22237
22238       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
22239         :
22240       fi
22241
22242   fi
22243
22244   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
22245
22246
22247
22248
22249
22250
22251
22252
22253   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
22254
22255     :
22256   fi
22257
22258
22259
22260
22261
22262           GNULIB_RAISE=1
22263
22264
22265
22266
22267
22268 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
22269
22270
22271
22272
22273
22274
22275   if test $ac_cv_func_readlink = no; then
22276     HAVE_READLINK=0
22277   else
22278     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22279 printf %s "checking whether readlink signature is correct... " >&6; }
22280 if ${gl_cv_decl_readlink_works+:} false; then :
22281   printf %s "(cached) " >&6
22282 else
22283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22284 /* end confdefs.h.  */
22285 #include <unistd.h>
22286       /* Cause compilation failure if original declaration has wrong type.  */
22287       ssize_t readlink (const char *, char *, size_t);
22288 int
22289 main ()
22290 {
22291
22292   ;
22293   return 0;
22294 }
22295 _ACEOF
22296 if ac_fn_c_try_compile "$LINENO"; then :
22297   gl_cv_decl_readlink_works=yes
22298 else
22299   gl_cv_decl_readlink_works=no
22300 fi
22301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22302 fi
22303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22304 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
22305             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22306 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
22307 if ${gl_cv_func_readlink_works+:} false; then :
22308   printf %s "(cached) " >&6
22309 else
22310   # We have readlink, so assume ln -s works.
22311        ln -s conftest.no-such conftest.link
22312        ln -s conftest.link conftest.lnk2
22313        if test "$cross_compiling" = yes; then :
22314   case "$host_os" in
22315                     # Guess yes on glibc systems.
22316             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22317                     # If we don't know, assume the worst.
22318             *)      gl_cv_func_readlink_works="guessing no" ;;
22319           esac
22320
22321 else
22322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22323 /* end confdefs.h.  */
22324 #include <unistd.h>
22325
22326 int
22327 main ()
22328 {
22329 char buf[20];
22330       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22331   ;
22332   return 0;
22333 }
22334 _ACEOF
22335 if ac_fn_c_try_run "$LINENO"; then :
22336   gl_cv_func_readlink_works=yes
22337 else
22338   gl_cv_func_readlink_works=no
22339 fi
22340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22341   conftest.$ac_objext conftest.beam conftest.$ac_ext
22342 fi
22343
22344       rm -f conftest.link conftest.lnk2
22345 fi
22346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22347 printf "%s\n" "$gl_cv_func_readlink_works" >&6; }
22348     case "$gl_cv_func_readlink_works" in
22349       *yes)
22350         if test "$gl_cv_decl_readlink_works" != yes; then
22351           REPLACE_READLINK=1
22352         fi
22353         ;;
22354       *)
22355
22356 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22357
22358         REPLACE_READLINK=1
22359         ;;
22360     esac
22361   fi
22362
22363   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22364
22365
22366
22367
22368
22369
22370
22371
22372   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22373
22374
22375   :
22376
22377   fi
22378
22379
22380
22381
22382
22383           GNULIB_READLINK=1
22384
22385
22386
22387
22388
22389 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
22390
22391
22392
22393
22394
22395 # Check whether --with-included-regex was given.
22396 if test "${with_included_regex+set}" = set; then :
22397   withval=$with_included_regex;
22398 fi
22399
22400
22401   case $with_included_regex in #(
22402   yes|no) ac_use_included_regex=$with_included_regex
22403         ;;
22404   '')
22405     # If the system regex support is good enough that it passes the
22406     # following run test, then default to *not* using the included regex.c.
22407     # If cross compiling, assume the test would fail and use the included
22408     # regex.c.
22409
22410     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
22411 printf %s "checking for working re_compile_pattern... " >&6; }
22412 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
22413   printf %s "(cached) " >&6
22414 else
22415   if test "$cross_compiling" = yes; then :
22416          gl_cv_func_re_compile_pattern_working=no
22417 else
22418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22419 /* end confdefs.h.  */
22420 #include <regex.h>
22421
22422             #include <locale.h>
22423             #include <limits.h>
22424             #include <string.h>
22425             #if HAVE_DECL_ALARM
22426             # include <unistd.h>
22427             # include <signal.h>
22428             #endif
22429
22430 int
22431 main ()
22432 {
22433 int result = 0;
22434             static struct re_pattern_buffer regex;
22435             unsigned char folded_chars[UCHAR_MAX + 1];
22436             int i;
22437             const char *s;
22438             struct re_registers regs;
22439
22440 #if HAVE_DECL_ALARM
22441             /* Some builds of glibc go into an infinite loop on this test.  */
22442             signal (SIGALRM, SIG_DFL);
22443             alarm (2);
22444 #endif
22445             if (setlocale (LC_ALL, "en_US.UTF-8"))
22446               {
22447                 {
22448                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
22449                      This test needs valgrind to catch the bug on Debian
22450                      GNU/Linux 3.1 x86, but it might catch the bug better
22451                      on other platforms and it shouldn't hurt to try the
22452                      test here.  */
22453                   static char const pat[] = "insert into";
22454                   static char const data[] =
22455                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
22456                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
22457                                  | RE_ICASE);
22458                   memset (&regex, 0, sizeof regex);
22459                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
22460                   if (s)
22461                     result |= 1;
22462                   else if (re_search (&regex, data, sizeof data - 1,
22463                                       0, sizeof data - 1, &regs)
22464                            != -1)
22465                     result |= 1;
22466                 }
22467
22468                 {
22469                   /* This test is from glibc bug 15078.
22470                      The test case is from Andreas Schwab in
22471                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
22472                      */
22473                   static char const pat[] = "[^x]x";
22474                   static char const data[] =
22475                     "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80"
22476                     "\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax";
22477                   re_set_syntax (0);
22478                   memset (&regex, 0, sizeof regex);
22479                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
22480                   if (s)
22481                     result |= 1;
22482                   else if (re_search (&regex, data, sizeof data - 1,
22483                                       0, sizeof data - 1, 0)
22484                            != 21)
22485                     result |= 1;
22486                 }
22487
22488                 if (! setlocale (LC_ALL, "C"))
22489                   return 1;
22490               }
22491
22492             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
22493             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
22494             memset (&regex, 0, sizeof regex);
22495             s = re_compile_pattern ("a[^x]b", 6, &regex);
22496             if (s)
22497               result |= 2;
22498             /* This should fail, but succeeds for glibc-2.5.  */
22499             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
22500               result |= 2;
22501
22502             /* This regular expression is from Spencer ere test number 75
22503                in grep-2.3.  */
22504             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
22505             memset (&regex, 0, sizeof regex);
22506             for (i = 0; i <= UCHAR_MAX; i++)
22507               folded_chars[i] = i;
22508             regex.translate = folded_chars;
22509             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
22510             /* This should fail with _Invalid character class name_ error.  */
22511             if (!s)
22512               result |= 4;
22513
22514             /* Ensure that [b-a] is diagnosed as invalid, when
22515                using RE_NO_EMPTY_RANGES. */
22516             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
22517             memset (&regex, 0, sizeof regex);
22518             s = re_compile_pattern ("a[b-a]", 6, &regex);
22519             if (s == 0)
22520               result |= 8;
22521
22522             /* This should succeed, but does not for glibc-2.1.3.  */
22523             memset (&regex, 0, sizeof regex);
22524             s = re_compile_pattern ("{1", 2, &regex);
22525             if (s)
22526               result |= 8;
22527
22528             /* The following example is derived from a problem report
22529                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
22530             memset (&regex, 0, sizeof regex);
22531             s = re_compile_pattern ("[an\371]*n", 7, &regex);
22532             if (s)
22533               result |= 8;
22534             /* This should match, but does not for glibc-2.2.1.  */
22535             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
22536               result |= 8;
22537
22538             memset (&regex, 0, sizeof regex);
22539             s = re_compile_pattern ("x", 1, &regex);
22540             if (s)
22541               result |= 8;
22542             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
22543             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
22544               result |= 8;
22545
22546             /* The version of regex.c in older versions of gnulib
22547                ignored RE_ICASE.  Detect that problem too.  */
22548             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
22549             memset (&regex, 0, sizeof regex);
22550             s = re_compile_pattern ("x", 1, &regex);
22551             if (s)
22552               result |= 16;
22553             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
22554               result |= 16;
22555
22556             /* Catch a bug reported by Vin Shelton in
22557                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
22558                */
22559             re_set_syntax (RE_SYNTAX_POSIX_BASIC
22560                            & ~RE_CONTEXT_INVALID_DUP
22561                            & ~RE_NO_EMPTY_RANGES);
22562             memset (&regex, 0, sizeof regex);
22563             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
22564             if (s)
22565               result |= 32;
22566
22567             /* REG_STARTEND was added to glibc on 2004-01-15.
22568                Reject older versions.  */
22569             if (! REG_STARTEND)
22570               result |= 64;
22571
22572 #if 0
22573             /* It would be nice to reject hosts whose regoff_t values are too
22574                narrow (including glibc on hosts with 64-bit ptrdiff_t and
22575                32-bit int), but we should wait until glibc implements this
22576                feature.  Otherwise, support for equivalence classes and
22577                multibyte collation symbols would always be broken except
22578                when compiling --without-included-regex.   */
22579             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
22580                 || sizeof (regoff_t) < sizeof (ssize_t))
22581               result |= 64;
22582 #endif
22583
22584             return result;
22585
22586   ;
22587   return 0;
22588 }
22589 _ACEOF
22590 if ac_fn_c_try_run "$LINENO"; then :
22591   gl_cv_func_re_compile_pattern_working=yes
22592 else
22593   gl_cv_func_re_compile_pattern_working=no
22594 fi
22595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22596   conftest.$ac_objext conftest.beam conftest.$ac_ext
22597 fi
22598
22599 fi
22600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
22601 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
22602     case $gl_cv_func_re_compile_pattern_working in #(
22603     yes) ac_use_included_regex=no;; #(
22604     no) ac_use_included_regex=yes;;
22605     esac
22606     ;;
22607   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
22608     ;;
22609   esac
22610
22611   if test $ac_use_included_regex = yes; then
22612
22613 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
22614
22615
22616 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
22617
22618
22619 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
22620
22621
22622 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
22623
22624
22625 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
22626
22627
22628 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
22629
22630
22631 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
22632
22633
22634 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
22635
22636
22637 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
22638
22639
22640 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
22641
22642
22643 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
22644
22645
22646 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
22647
22648
22649 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
22650
22651
22652 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
22653
22654
22655 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
22656
22657
22658 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
22659
22660
22661 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
22662
22663   fi
22664
22665   if test $ac_use_included_regex = yes; then
22666
22667
22668
22669
22670
22671
22672
22673
22674   gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
22675
22676
22677
22678
22679
22680
22681
22682   for ac_header in libintl.h
22683 do :
22684   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
22685 if test "x$ac_cv_header_libintl_h" = xyes; then :
22686   cat >>confdefs.h <<_ACEOF
22687 #define HAVE_LIBINTL_H 1
22688 _ACEOF
22689
22690 fi
22691
22692 done
22693
22694
22695   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
22696 "
22697 if test "x$ac_cv_have_decl_isblank" = xyes; then :
22698   ac_have_decl=1
22699 else
22700   ac_have_decl=0
22701 fi
22702
22703 cat >>confdefs.h <<_ACEOF
22704 #define HAVE_DECL_ISBLANK $ac_have_decl
22705 _ACEOF
22706
22707
22708   fi
22709
22710
22711
22712
22713
22714   if test $ac_cv_func_secure_getenv = no; then
22715     HAVE_SECURE_GETENV=0
22716   fi
22717
22718   if test $HAVE_SECURE_GETENV = 0; then
22719
22720
22721
22722
22723
22724
22725
22726
22727   gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
22728
22729
22730   for ac_func in __secure_getenv
22731 do :
22732   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
22733 if test "x$ac_cv_func___secure_getenv" = xyes; then :
22734   cat >>confdefs.h <<_ACEOF
22735 #define HAVE___SECURE_GETENV 1
22736 _ACEOF
22737
22738 fi
22739 done
22740
22741   if test $ac_cv_func___secure_getenv = no; then
22742     for ac_func in issetugid
22743 do :
22744   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
22745 if test "x$ac_cv_func_issetugid" = xyes; then :
22746   cat >>confdefs.h <<_ACEOF
22747 #define HAVE_ISSETUGID 1
22748 _ACEOF
22749
22750 fi
22751 done
22752
22753   fi
22754
22755   fi
22756
22757
22758
22759
22760
22761           GNULIB_SECURE_GETENV=1
22762
22763
22764
22765
22766
22767 printf "%s\n" "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
22768
22769
22770
22771
22772
22773
22774   if test $ac_cv_func_sigaction = yes; then
22775     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
22776 "
22777 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
22778
22779 cat >>confdefs.h <<_ACEOF
22780 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
22781 _ACEOF
22782
22783
22784 fi
22785
22786     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
22787       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
22788     fi
22789   else
22790     HAVE_SIGACTION=0
22791   fi
22792
22793   if test $HAVE_SIGACTION = 0; then
22794
22795
22796
22797
22798
22799
22800
22801
22802   gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
22803
22804
22805
22806
22807
22808
22809
22810   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
22811 #include <signal.h>
22812
22813 "
22814 if test "x$ac_cv_type_siginfo_t" = xyes; then :
22815
22816 cat >>confdefs.h <<_ACEOF
22817 #define HAVE_SIGINFO_T 1
22818 _ACEOF
22819
22820
22821 fi
22822
22823   if test $ac_cv_type_siginfo_t = no; then
22824     HAVE_SIGINFO_T=0
22825   fi
22826
22827   fi
22828
22829
22830
22831
22832
22833           GNULIB_SIGACTION=1
22834
22835
22836
22837
22838
22839 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854      if test $gl_cv_have_include_next = yes; then
22855        gl_cv_next_signal_h='<'signal.h'>'
22856      else
22857        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22858 printf %s "checking absolute name of <signal.h>... " >&6; }
22859 if ${gl_cv_next_signal_h+:} false; then :
22860   printf %s "(cached) " >&6
22861 else
22862
22863                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22864 /* end confdefs.h.  */
22865 #include <signal.h>
22866
22867 _ACEOF
22868                                                                                                                         case "$host_os" in
22869                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
22870                  *)    gl_absname_cpp="$ac_cpp" ;;
22871                esac
22872
22873                case "$host_os" in
22874                  mingw*)
22875                                                                                                                                      gl_dirsep_regex='[/\\]'
22876                    ;;
22877                  *)
22878                    gl_dirsep_regex='\/'
22879                    ;;
22880                esac
22881                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22882
22883                gl_header_literal_regex=`echo 'signal.h' \
22884                                         | sed -e "$gl_make_literal_regex_sed"`
22885                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22886                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22887                    s|^/[^/]|//&|
22888                    p
22889                    q
22890                  }'
22891                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22892                       sed -n "$gl_absolute_header_sed"`'"'
22893
22894
22895 fi
22896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22897 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
22898      fi
22899      NEXT_SIGNAL_H=$gl_cv_next_signal_h
22900
22901      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22902        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22903        gl_next_as_first_directive='<'signal.h'>'
22904      else
22905        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22906        gl_next_as_first_directive=$gl_cv_next_signal_h
22907      fi
22908      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22909
22910
22911
22912
22913
22914 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
22915 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
22916   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22917 #include <signal.h>
22918
22919 "
22920 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
22921
22922 else
22923   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22924 fi
22925
22926
22927
22928
22929
22930
22931
22932   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22933 #include <signal.h>
22934
22935 "
22936 if test "x$ac_cv_type_sighandler_t" = xyes; then :
22937
22938 else
22939   HAVE_SIGHANDLER_T=0
22940 fi
22941
22942
22943
22944     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
22945     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22946     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22947 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
22948 if eval \${$as_gl_Symbol+:} false; then :
22949   printf %s "(cached) " >&6
22950 else
22951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22952 /* end confdefs.h.  */
22953 #include <signal.h>
22954
22955 int
22956 main ()
22957 {
22958 #undef $gl_func
22959   (void) $gl_func;
22960   ;
22961   return 0;
22962 }
22963 _ACEOF
22964 if ac_fn_c_try_compile "$LINENO"; then :
22965   eval "$as_gl_Symbol=yes"
22966 else
22967   eval "$as_gl_Symbol=no"
22968 fi
22969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22970 fi
22971 eval ac_res=\$$as_gl_Symbol
22972                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22973 printf "%s\n" "$ac_res" >&6; }
22974     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22975   cat >>confdefs.h <<_ACEOF
22976 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22977 _ACEOF
22978
22979                      eval ac_cv_have_decl_$gl_func=yes
22980 fi
22981       done
22982
22983
22984
22985
22986
22987   if test $gl_cv_type_sigset_t = yes; then
22988     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
22989 if test "x$ac_cv_func_sigprocmask" = xyes; then :
22990   gl_cv_func_sigprocmask=1
22991 fi
22992
22993   fi
22994   if test -z "$gl_cv_func_sigprocmask"; then
22995     HAVE_POSIX_SIGNALBLOCKING=0
22996   fi
22997
22998   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
22999
23000
23001
23002
23003
23004
23005
23006
23007   gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
23008
23009     :
23010   fi
23011
23012
23013
23014
23015
23016           GNULIB_SIGPROCMASK=1
23017
23018
23019
23020
23021
23022 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
23023
23024
23025
23026
23027   for ac_header in stdint.h
23028 do :
23029   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
23030 if test "x$ac_cv_header_stdint_h" = xyes; then :
23031   cat >>confdefs.h <<_ACEOF
23032 #define HAVE_STDINT_H 1
23033 _ACEOF
23034
23035 fi
23036
23037 done
23038
23039     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
23040 printf %s "checking for SIZE_MAX... " >&6; }
23041 if ${gl_cv_size_max+:} false; then :
23042   printf %s "(cached) " >&6
23043 else
23044
23045     gl_cv_size_max=
23046     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23047 /* end confdefs.h.  */
23048
23049 #include <limits.h>
23050 #if HAVE_STDINT_H
23051 #include <stdint.h>
23052 #endif
23053 #ifdef SIZE_MAX
23054 Found it
23055 #endif
23056
23057 _ACEOF
23058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23059   $EGREP "Found it" >/dev/null 2>&1; then :
23060   gl_cv_size_max=yes
23061 fi
23062 rm -rf conftest*
23063
23064     if test -z "$gl_cv_size_max"; then
23065                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
23066 #include <limits.h>"; then :
23067
23068 else
23069   size_t_bits_minus_1=
23070 fi
23071
23072       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
23073
23074 else
23075   fits_in_uint=
23076 fi
23077
23078       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
23079         if test $fits_in_uint = 1; then
23080                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23081 /* end confdefs.h.  */
23082 #include <stddef.h>
23083                  extern size_t foo;
23084                  extern unsigned long foo;
23085
23086 int
23087 main ()
23088 {
23089
23090   ;
23091   return 0;
23092 }
23093 _ACEOF
23094 if ac_fn_c_try_compile "$LINENO"; then :
23095   fits_in_uint=0
23096 fi
23097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23098         fi
23099                                 if test $fits_in_uint = 1; then
23100           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
23101         else
23102           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
23103         fi
23104       else
23105                 gl_cv_size_max='((size_t)~(size_t)0)'
23106       fi
23107     fi
23108
23109 fi
23110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
23111 printf "%s\n" "$gl_cv_size_max" >&6; }
23112   if test "$gl_cv_size_max" != yes; then
23113
23114 cat >>confdefs.h <<_ACEOF
23115 #define SIZE_MAX $gl_cv_size_max
23116 _ACEOF
23117
23118   fi
23119
23120
23121
23122   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23123 printf %s "checking for ssize_t... " >&6; }
23124 if ${gt_cv_ssize_t+:} false; then :
23125   printf %s "(cached) " >&6
23126 else
23127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23128 /* end confdefs.h.  */
23129 #include <sys/types.h>
23130 int
23131 main ()
23132 {
23133 int x = sizeof (ssize_t *) + sizeof (ssize_t);
23134             return !x;
23135   ;
23136   return 0;
23137 }
23138 _ACEOF
23139 if ac_fn_c_try_compile "$LINENO"; then :
23140   gt_cv_ssize_t=yes
23141 else
23142   gt_cv_ssize_t=no
23143 fi
23144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23145 fi
23146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23147 printf "%s\n" "$gt_cv_ssize_t" >&6; }
23148   if test $gt_cv_ssize_t = no; then
23149
23150 printf "%s\n" "#define ssize_t int" >>confdefs.h
23151
23152   fi
23153
23154
23155
23156
23157     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23158 printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
23159 if ${gl_cv_func_stat_dir_slash+:} false; then :
23160   printf %s "(cached) " >&6
23161 else
23162   if test "$cross_compiling" = yes; then :
23163   case $host_os in
23164             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23165             *) gl_cv_func_stat_dir_slash="guessing yes";;
23166           esac
23167 else
23168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23169 /* end confdefs.h.  */
23170 #include <sys/stat.h>
23171
23172 int
23173 main ()
23174 {
23175 struct stat st; return stat (".", &st) != stat ("./", &st);
23176   ;
23177   return 0;
23178 }
23179 _ACEOF
23180 if ac_fn_c_try_run "$LINENO"; then :
23181   gl_cv_func_stat_dir_slash=yes
23182 else
23183   gl_cv_func_stat_dir_slash=no
23184 fi
23185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23186   conftest.$ac_objext conftest.beam conftest.$ac_ext
23187 fi
23188
23189 fi
23190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23191 printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
23192         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23193 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
23194 if ${gl_cv_func_stat_file_slash+:} false; then :
23195   printf %s "(cached) " >&6
23196 else
23197   touch conftest.tmp
23198        # Assume that if we have lstat, we can also check symlinks.
23199        if test $ac_cv_func_lstat = yes; then
23200          ln -s conftest.tmp conftest.lnk
23201        fi
23202        if test "$cross_compiling" = yes; then :
23203   case "$host_os" in
23204                     # Guess yes on glibc systems.
23205             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23206                     # If we don't know, assume the worst.
23207             *)      gl_cv_func_stat_file_slash="guessing no" ;;
23208           esac
23209
23210 else
23211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23212 /* end confdefs.h.  */
23213 #include <sys/stat.h>
23214
23215 int
23216 main ()
23217 {
23218 int result = 0;
23219       struct stat st;
23220       if (!stat ("conftest.tmp/", &st))
23221         result |= 1;
23222 #if HAVE_LSTAT
23223       if (!stat ("conftest.lnk/", &st))
23224         result |= 2;
23225 #endif
23226       return result;
23227
23228   ;
23229   return 0;
23230 }
23231 _ACEOF
23232 if ac_fn_c_try_run "$LINENO"; then :
23233   gl_cv_func_stat_file_slash=yes
23234 else
23235   gl_cv_func_stat_file_slash=no
23236 fi
23237 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23238   conftest.$ac_objext conftest.beam conftest.$ac_ext
23239 fi
23240
23241        rm -f conftest.tmp conftest.lnk
23242 fi
23243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23244 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
23245   case $gl_cv_func_stat_dir_slash in
23246     *no) REPLACE_STAT=1
23247
23248 printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23249 ;;
23250   esac
23251   case $gl_cv_func_stat_file_slash in
23252     *no) REPLACE_STAT=1
23253
23254 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23255 ;;
23256   esac
23257
23258   if test $REPLACE_STAT = 1; then
23259
23260
23261
23262
23263
23264
23265
23266
23267   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
23268
23269     :
23270   fi
23271
23272
23273
23274
23275
23276           GNULIB_STAT=1
23277
23278
23279
23280
23281
23282 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
23283
23284
23285
23286
23287
23288
23289
23290   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>
23291      #include <sys/stat.h>
23292 "
23293 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
23294
23295 cat >>confdefs.h <<_ACEOF
23296 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23297 _ACEOF
23298
23299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23300 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23301 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
23302   printf %s "(cached) " >&6
23303 else
23304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23305 /* end confdefs.h.  */
23306
23307             #include <sys/types.h>
23308             #include <sys/stat.h>
23309             #if HAVE_SYS_TIME_H
23310             # include <sys/time.h>
23311             #endif
23312             #include <time.h>
23313             struct timespec ts;
23314             struct stat st;
23315
23316 int
23317 main ()
23318 {
23319
23320             st.st_atim = ts;
23321
23322   ;
23323   return 0;
23324 }
23325 _ACEOF
23326 if ac_fn_c_try_compile "$LINENO"; then :
23327   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
23328 else
23329   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
23330 fi
23331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23332 fi
23333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23334 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23335      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
23336
23337 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
23338
23339      fi
23340 else
23341   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>
23342         #include <sys/stat.h>
23343 "
23344 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
23345
23346 cat >>confdefs.h <<_ACEOF
23347 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23348 _ACEOF
23349
23350
23351 else
23352   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23353            #include <sys/stat.h>
23354 "
23355 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
23356
23357 cat >>confdefs.h <<_ACEOF
23358 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
23359 _ACEOF
23360
23361
23362 else
23363   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>
23364               #include <sys/stat.h>
23365 "
23366 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
23367
23368 cat >>confdefs.h <<_ACEOF
23369 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23370 _ACEOF
23371
23372
23373 fi
23374
23375 fi
23376
23377 fi
23378
23379 fi
23380
23381
23382
23383
23384
23385   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>
23386      #include <sys/stat.h>
23387 "
23388 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
23389
23390 cat >>confdefs.h <<_ACEOF
23391 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23392 _ACEOF
23393
23394
23395 else
23396   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23397         #include <sys/stat.h>
23398 "
23399 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
23400
23401 cat >>confdefs.h <<_ACEOF
23402 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23403 _ACEOF
23404
23405
23406 else
23407   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>
23408           #include <sys/stat.h>
23409 "
23410 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
23411
23412 cat >>confdefs.h <<_ACEOF
23413 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
23414 _ACEOF
23415
23416
23417 fi
23418
23419 fi
23420
23421 fi
23422
23423
23424
23425   STDARG_H=''
23426   NEXT_STDARG_H='<stdarg.h>'
23427   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
23428 printf %s "checking for va_copy... " >&6; }
23429   if ${gl_cv_func_va_copy+:} false; then :
23430   printf %s "(cached) " >&6
23431 else
23432
23433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23434 /* end confdefs.h.  */
23435 #include <stdarg.h>
23436 int
23437 main ()
23438 {
23439
23440 #ifndef va_copy
23441 void (*func) (va_list, va_list) = va_copy;
23442 #endif
23443
23444   ;
23445   return 0;
23446 }
23447 _ACEOF
23448 if ac_fn_c_try_compile "$LINENO"; then :
23449   gl_cv_func_va_copy=yes
23450 else
23451   gl_cv_func_va_copy=no
23452 fi
23453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23454 fi
23455
23456   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
23457 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
23458   if test $gl_cv_func_va_copy = no; then
23459                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23460 /* end confdefs.h.  */
23461 #if defined _AIX && !defined __GNUC__
23462         AIX vaccine
23463        #endif
23464
23465 _ACEOF
23466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23467   $EGREP "vaccine" >/dev/null 2>&1; then :
23468   gl_aixcc=yes
23469 else
23470   gl_aixcc=no
23471 fi
23472 rm -rf conftest*
23473
23474     if test $gl_aixcc = yes; then
23475             STDARG_H=stdarg.h
23476
23477
23478
23479
23480
23481
23482
23483
23484      if test $gl_cv_have_include_next = yes; then
23485        gl_cv_next_stdarg_h='<'stdarg.h'>'
23486      else
23487        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
23488 printf %s "checking absolute name of <stdarg.h>... " >&6; }
23489 if ${gl_cv_next_stdarg_h+:} false; then :
23490   printf %s "(cached) " >&6
23491 else
23492
23493                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23494 /* end confdefs.h.  */
23495 #include <stdarg.h>
23496
23497 _ACEOF
23498                                                                                                                         case "$host_os" in
23499                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
23500                  *)    gl_absname_cpp="$ac_cpp" ;;
23501                esac
23502
23503                case "$host_os" in
23504                  mingw*)
23505                                                                                                                                      gl_dirsep_regex='[/\\]'
23506                    ;;
23507                  *)
23508                    gl_dirsep_regex='\/'
23509                    ;;
23510                esac
23511                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23512
23513                gl_header_literal_regex=`echo 'stdarg.h' \
23514                                         | sed -e "$gl_make_literal_regex_sed"`
23515                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23516                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23517                    s|^/[^/]|//&|
23518                    p
23519                    q
23520                  }'
23521                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23522                       sed -n "$gl_absolute_header_sed"`'"'
23523
23524
23525 fi
23526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
23527 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
23528      fi
23529      NEXT_STDARG_H=$gl_cv_next_stdarg_h
23530
23531      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23532        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23533        gl_next_as_first_directive='<'stdarg.h'>'
23534      else
23535        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23536        gl_next_as_first_directive=$gl_cv_next_stdarg_h
23537      fi
23538      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
23539
23540
23541
23542
23543             if test "$gl_cv_next_stdarg_h" = '""'; then
23544         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
23545         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
23546       fi
23547     else
23548
23549   saved_as_echo_n="$as_echo_n"
23550   as_echo_n=':'
23551   if ${gl_cv_func___va_copy+:} false; then :
23552   printf %s "(cached) " >&6
23553 else
23554
23555         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23556 /* end confdefs.h.  */
23557 #include <stdarg.h>
23558 int
23559 main ()
23560 {
23561
23562 #ifndef __va_copy
23563 error, bail out
23564 #endif
23565
23566   ;
23567   return 0;
23568 }
23569 _ACEOF
23570 if ac_fn_c_try_compile "$LINENO"; then :
23571   gl_cv_func___va_copy=yes
23572 else
23573   gl_cv_func___va_copy=no
23574 fi
23575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23576 fi
23577
23578   as_echo_n="$saved_as_echo_n"
23579
23580       if test $gl_cv_func___va_copy = yes; then
23581
23582 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
23583
23584       else
23585
23586
23587 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
23588
23589       fi
23590     fi
23591   fi
23592
23593    if test -n "$STDARG_H"; then
23594   GL_GENERATE_STDARG_H_TRUE=
23595   GL_GENERATE_STDARG_H_FALSE='#'
23596 else
23597   GL_GENERATE_STDARG_H_TRUE='#'
23598   GL_GENERATE_STDARG_H_FALSE=
23599 fi
23600
23601
23602
23603
23604
23605
23606   # Define two additional variables used in the Makefile substitution.
23607
23608   if test "$ac_cv_header_stdbool_h" = yes; then
23609     STDBOOL_H=''
23610   else
23611     STDBOOL_H='stdbool.h'
23612   fi
23613
23614    if test -n "$STDBOOL_H"; then
23615   GL_GENERATE_STDBOOL_H_TRUE=
23616   GL_GENERATE_STDBOOL_H_FALSE='#'
23617 else
23618   GL_GENERATE_STDBOOL_H_TRUE='#'
23619   GL_GENERATE_STDBOOL_H_FALSE=
23620 fi
23621
23622
23623   if test "$ac_cv_type__Bool" = yes; then
23624     HAVE__BOOL=1
23625   else
23626     HAVE__BOOL=0
23627   fi
23628
23629
23630
23631
23632
23633   STDDEF_H=
23634   if test $gt_cv_c_wchar_t = no; then
23635     HAVE_WCHAR_T=0
23636     STDDEF_H=stddef.h
23637   fi
23638   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23639 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
23640 if ${gl_cv_decl_null_works+:} false; then :
23641   printf %s "(cached) " >&6
23642 else
23643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23644 /* end confdefs.h.  */
23645 #include <stddef.h>
23646       int test[2 * (sizeof NULL == sizeof (void *)) -1];
23647
23648 int
23649 main ()
23650 {
23651
23652   ;
23653   return 0;
23654 }
23655 _ACEOF
23656 if ac_fn_c_try_compile "$LINENO"; then :
23657   gl_cv_decl_null_works=yes
23658 else
23659   gl_cv_decl_null_works=no
23660 fi
23661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23662 fi
23663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23664 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
23665   if test $gl_cv_decl_null_works = no; then
23666     REPLACE_NULL=1
23667     STDDEF_H=stddef.h
23668   fi
23669
23670    if test -n "$STDDEF_H"; then
23671   GL_GENERATE_STDDEF_H_TRUE=
23672   GL_GENERATE_STDDEF_H_FALSE='#'
23673 else
23674   GL_GENERATE_STDDEF_H_TRUE='#'
23675   GL_GENERATE_STDDEF_H_FALSE=
23676 fi
23677
23678   if test -n "$STDDEF_H"; then
23679
23680
23681
23682
23683
23684
23685
23686
23687      if test $gl_cv_have_include_next = yes; then
23688        gl_cv_next_stddef_h='<'stddef.h'>'
23689      else
23690        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23691 printf %s "checking absolute name of <stddef.h>... " >&6; }
23692 if ${gl_cv_next_stddef_h+:} false; then :
23693   printf %s "(cached) " >&6
23694 else
23695
23696                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23697 /* end confdefs.h.  */
23698 #include <stddef.h>
23699
23700 _ACEOF
23701                                                                                                                         case "$host_os" in
23702                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
23703                  *)    gl_absname_cpp="$ac_cpp" ;;
23704                esac
23705
23706                case "$host_os" in
23707                  mingw*)
23708                                                                                                                                      gl_dirsep_regex='[/\\]'
23709                    ;;
23710                  *)
23711                    gl_dirsep_regex='\/'
23712                    ;;
23713                esac
23714                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23715
23716                gl_header_literal_regex=`echo 'stddef.h' \
23717                                         | sed -e "$gl_make_literal_regex_sed"`
23718                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23719                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23720                    s|^/[^/]|//&|
23721                    p
23722                    q
23723                  }'
23724                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23725                       sed -n "$gl_absolute_header_sed"`'"'
23726
23727
23728 fi
23729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23730 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
23731      fi
23732      NEXT_STDDEF_H=$gl_cv_next_stddef_h
23733
23734      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23735        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23736        gl_next_as_first_directive='<'stddef.h'>'
23737      else
23738        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23739        gl_next_as_first_directive=$gl_cv_next_stddef_h
23740      fi
23741      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23742
23743
23744
23745
23746   fi
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759      if test $gl_cv_have_include_next = yes; then
23760        gl_cv_next_stdio_h='<'stdio.h'>'
23761      else
23762        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23763 printf %s "checking absolute name of <stdio.h>... " >&6; }
23764 if ${gl_cv_next_stdio_h+:} false; then :
23765   printf %s "(cached) " >&6
23766 else
23767
23768                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23769 /* end confdefs.h.  */
23770 #include <stdio.h>
23771
23772 _ACEOF
23773                                                                                                                         case "$host_os" in
23774                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
23775                  *)    gl_absname_cpp="$ac_cpp" ;;
23776                esac
23777
23778                case "$host_os" in
23779                  mingw*)
23780                                                                                                                                      gl_dirsep_regex='[/\\]'
23781                    ;;
23782                  *)
23783                    gl_dirsep_regex='\/'
23784                    ;;
23785                esac
23786                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23787
23788                gl_header_literal_regex=`echo 'stdio.h' \
23789                                         | sed -e "$gl_make_literal_regex_sed"`
23790                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23791                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23792                    s|^/[^/]|//&|
23793                    p
23794                    q
23795                  }'
23796                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23797                       sed -n "$gl_absolute_header_sed"`'"'
23798
23799
23800 fi
23801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23802 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
23803      fi
23804      NEXT_STDIO_H=$gl_cv_next_stdio_h
23805
23806      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23807        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23808        gl_next_as_first_directive='<'stdio.h'>'
23809      else
23810        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23811        gl_next_as_first_directive=$gl_cv_next_stdio_h
23812      fi
23813      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23814
23815
23816
23817
23818
23819       GNULIB_FSCANF=1
23820
23821
23822 cat >>confdefs.h <<_ACEOF
23823 #define GNULIB_FSCANF 1
23824 _ACEOF
23825
23826
23827   GNULIB_SCANF=1
23828
23829
23830 cat >>confdefs.h <<_ACEOF
23831 #define GNULIB_SCANF 1
23832 _ACEOF
23833
23834
23835   GNULIB_FGETC=1
23836   GNULIB_GETC=1
23837   GNULIB_GETCHAR=1
23838   GNULIB_FGETS=1
23839   GNULIB_FREAD=1
23840
23841
23842       GNULIB_FPRINTF=1
23843   GNULIB_PRINTF=1
23844   GNULIB_VFPRINTF=1
23845   GNULIB_VPRINTF=1
23846   GNULIB_FPUTC=1
23847   GNULIB_PUTC=1
23848   GNULIB_PUTCHAR=1
23849   GNULIB_FPUTS=1
23850   GNULIB_PUTS=1
23851   GNULIB_FWRITE=1
23852
23853
23854
23855
23856     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
23857     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23858     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23859 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
23860 if eval \${$as_gl_Symbol+:} false; then :
23861   printf %s "(cached) " >&6
23862 else
23863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23864 /* end confdefs.h.  */
23865 #include <stdio.h>
23866
23867 int
23868 main ()
23869 {
23870 #undef $gl_func
23871   (void) $gl_func;
23872   ;
23873   return 0;
23874 }
23875 _ACEOF
23876 if ac_fn_c_try_compile "$LINENO"; then :
23877   eval "$as_gl_Symbol=yes"
23878 else
23879   eval "$as_gl_Symbol=no"
23880 fi
23881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23882 fi
23883 eval ac_res=\$$as_gl_Symbol
23884                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23885 printf "%s\n" "$ac_res" >&6; }
23886     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23887   cat >>confdefs.h <<_ACEOF
23888 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23889 _ACEOF
23890
23891                      eval ac_cv_have_decl_$gl_func=yes
23892 fi
23893       done
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906      if test $gl_cv_have_include_next = yes; then
23907        gl_cv_next_stdlib_h='<'stdlib.h'>'
23908      else
23909        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23910 printf %s "checking absolute name of <stdlib.h>... " >&6; }
23911 if ${gl_cv_next_stdlib_h+:} false; then :
23912   printf %s "(cached) " >&6
23913 else
23914
23915                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23916 /* end confdefs.h.  */
23917 #include <stdlib.h>
23918
23919 _ACEOF
23920                                                                                                                         case "$host_os" in
23921                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
23922                  *)    gl_absname_cpp="$ac_cpp" ;;
23923                esac
23924
23925                case "$host_os" in
23926                  mingw*)
23927                                                                                                                                      gl_dirsep_regex='[/\\]'
23928                    ;;
23929                  *)
23930                    gl_dirsep_regex='\/'
23931                    ;;
23932                esac
23933                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23934
23935                gl_header_literal_regex=`echo 'stdlib.h' \
23936                                         | sed -e "$gl_make_literal_regex_sed"`
23937                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23938                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23939                    s|^/[^/]|//&|
23940                    p
23941                    q
23942                  }'
23943                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23944                       sed -n "$gl_absolute_header_sed"`'"'
23945
23946
23947 fi
23948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23949 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
23950      fi
23951      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23952
23953      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23954        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23955        gl_next_as_first_directive='<'stdlib.h'>'
23956      else
23957        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23958        gl_next_as_first_directive=$gl_cv_next_stdlib_h
23959      fi
23960      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23961
23962
23963
23964
23965
23966
23967     for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r random random_r realpath rpmatch     secure_getenv setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
23968     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23969     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23970 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
23971 if eval \${$as_gl_Symbol+:} false; then :
23972   printf %s "(cached) " >&6
23973 else
23974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23975 /* end confdefs.h.  */
23976 #include <stdlib.h>
23977 #if HAVE_SYS_LOADAVG_H
23978 # include <sys/loadavg.h>
23979 #endif
23980 #if HAVE_RANDOM_H
23981 # include <random.h>
23982 #endif
23983
23984 int
23985 main ()
23986 {
23987 #undef $gl_func
23988   (void) $gl_func;
23989   ;
23990   return 0;
23991 }
23992 _ACEOF
23993 if ac_fn_c_try_compile "$LINENO"; then :
23994   eval "$as_gl_Symbol=yes"
23995 else
23996   eval "$as_gl_Symbol=no"
23997 fi
23998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23999 fi
24000 eval ac_res=\$$as_gl_Symbol
24001                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24002 printf "%s\n" "$ac_res" >&6; }
24003     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24004   cat >>confdefs.h <<_ACEOF
24005 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24006 _ACEOF
24007
24008                      eval ac_cv_have_decl_$gl_func=yes
24009 fi
24010       done
24011
24012
24013
24014
24015
24016   for ac_func in strcasecmp
24017 do :
24018   ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
24019 if test "x$ac_cv_func_strcasecmp" = xyes; then :
24020   cat >>confdefs.h <<_ACEOF
24021 #define HAVE_STRCASECMP 1
24022 _ACEOF
24023
24024 fi
24025 done
24026
24027   if test $ac_cv_func_strcasecmp = no; then
24028     HAVE_STRCASECMP=0
24029   fi
24030
24031
24032
24033   for ac_func in strncasecmp
24034 do :
24035   ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
24036 if test "x$ac_cv_func_strncasecmp" = xyes; then :
24037   cat >>confdefs.h <<_ACEOF
24038 #define HAVE_STRNCASECMP 1
24039 _ACEOF
24040
24041 fi
24042 done
24043
24044   if test $ac_cv_func_strncasecmp = yes; then
24045     HAVE_STRNCASECMP=1
24046   else
24047     HAVE_STRNCASECMP=0
24048   fi
24049   ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
24050 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
24051   ac_have_decl=1
24052 else
24053   ac_have_decl=0
24054 fi
24055
24056 cat >>confdefs.h <<_ACEOF
24057 #define HAVE_DECL_STRNCASECMP $ac_have_decl
24058 _ACEOF
24059
24060   if test $ac_cv_have_decl_strncasecmp = no; then
24061     HAVE_DECL_STRNCASECMP=0
24062   fi
24063
24064
24065   if test $HAVE_STRCASECMP = 0; then
24066
24067
24068
24069
24070
24071
24072
24073
24074   gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
24075
24076
24077   :
24078
24079   fi
24080   if test $HAVE_STRNCASECMP = 0; then
24081
24082
24083
24084
24085
24086
24087
24088
24089   gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
24090
24091
24092   :
24093
24094   fi
24095
24096
24097
24098
24099
24100   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24101     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
24102 printf %s "checking for working strerror function... " >&6; }
24103 if ${gl_cv_func_working_strerror+:} false; then :
24104   printf %s "(cached) " >&6
24105 else
24106   if test "$cross_compiling" = yes; then :
24107   case "$host_os" in
24108                    # Guess yes on glibc systems.
24109            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
24110                    # If we don't know, assume the worst.
24111            *)      gl_cv_func_working_strerror="guessing no" ;;
24112          esac
24113
24114 else
24115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24116 /* end confdefs.h.  */
24117 #include <string.h>
24118
24119 int
24120 main ()
24121 {
24122 if (!*strerror (-2)) return 1;
24123   ;
24124   return 0;
24125 }
24126 _ACEOF
24127 if ac_fn_c_try_run "$LINENO"; then :
24128   gl_cv_func_working_strerror=yes
24129 else
24130   gl_cv_func_working_strerror=no
24131 fi
24132 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24133   conftest.$ac_objext conftest.beam conftest.$ac_ext
24134 fi
24135
24136
24137 fi
24138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
24139 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
24140     case "$gl_cv_func_working_strerror" in
24141       *yes) ;;
24142       *)
24143                         REPLACE_STRERROR=1
24144         ;;
24145     esac
24146
24147   else
24148             REPLACE_STRERROR=1
24149   fi
24150
24151   if test $REPLACE_STRERROR = 1; then
24152
24153
24154
24155
24156
24157
24158
24159
24160   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
24161
24162   fi
24163
24164
24165 cat >>confdefs.h <<_ACEOF
24166 #define GNULIB_STRERROR 1
24167 _ACEOF
24168
24169
24170
24171
24172
24173
24174
24175           GNULIB_STRERROR=1
24176
24177
24178
24179
24180
24181 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
24182
24183
24184
24185
24186
24187   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
24188
24189
24190
24191
24192
24193
24194
24195
24196   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
24197
24198
24199
24200
24201
24202   if test $ac_cv_header_sys_socket_h != yes; then
24203                     for ac_header in winsock2.h
24204 do :
24205   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24206 if test "x$ac_cv_header_winsock2_h" = xyes; then :
24207   cat >>confdefs.h <<_ACEOF
24208 #define HAVE_WINSOCK2_H 1
24209 _ACEOF
24210
24211 fi
24212
24213 done
24214
24215   fi
24216   if test "$ac_cv_header_winsock2_h" = yes; then
24217     HAVE_WINSOCK2_H=1
24218     UNISTD_H_HAVE_WINSOCK2_H=1
24219     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24220   else
24221     HAVE_WINSOCK2_H=0
24222   fi
24223
24224
24225   fi
24226
24227
24228  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
24229
24230
24231
24232
24233
24234
24235
24236 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
24237
24238
24239
24240   if test $gl_cond_libtool = false; then
24241     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
24242     gl_libdeps="$gl_libdeps $LIBICONV"
24243   fi
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256   if test $ac_cv_have_decl_strndup = no; then
24257     HAVE_DECL_STRNDUP=0
24258   fi
24259
24260   if test $ac_cv_func_strndup = yes; then
24261     HAVE_STRNDUP=1
24262     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
24263     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
24264 printf %s "checking for working strndup... " >&6; }
24265 if ${gl_cv_func_strndup_works+:} false; then :
24266   printf %s "(cached) " >&6
24267 else
24268   if test "$cross_compiling" = yes; then :
24269
24270           case $host_os in
24271             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
24272             *)               gl_cv_func_strndup_works="guessing yes";;
24273           esac
24274
24275 else
24276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24277 /* end confdefs.h.  */
24278
24279          #include <string.h>
24280                            #include <stdlib.h>
24281 int
24282 main ()
24283 {
24284
24285 #if !HAVE_DECL_STRNDUP
24286   extern
24287   #ifdef __cplusplus
24288   "C"
24289   #endif
24290   char *strndup (const char *, size_t);
24291 #endif
24292   char *s;
24293   s = strndup ("some longer string", 15);
24294   free (s);
24295   s = strndup ("shorter string", 13);
24296   return s[13] != '\0';
24297   ;
24298   return 0;
24299 }
24300 _ACEOF
24301 if ac_fn_c_try_run "$LINENO"; then :
24302   gl_cv_func_strndup_works=yes
24303 else
24304   gl_cv_func_strndup_works=no
24305 fi
24306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24307   conftest.$ac_objext conftest.beam conftest.$ac_ext
24308 fi
24309
24310 fi
24311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
24312 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
24313     case $gl_cv_func_strndup_works in
24314       *no) REPLACE_STRNDUP=1 ;;
24315     esac
24316   else
24317     HAVE_STRNDUP=0
24318   fi
24319
24320   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
24321
24322
24323
24324
24325
24326
24327
24328
24329   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
24330
24331   fi
24332
24333
24334
24335
24336
24337           GNULIB_STRNDUP=1
24338
24339
24340
24341
24342
24343 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353   if test $ac_cv_have_decl_strnlen = no; then
24354     HAVE_DECL_STRNLEN=0
24355   else
24356
24357          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
24358 printf %s "checking for working strnlen... " >&6; }
24359 if ${ac_cv_func_strnlen_working+:} false; then :
24360   printf %s "(cached) " >&6
24361 else
24362   if test "$cross_compiling" = yes; then :
24363   # Guess no on AIX systems, yes otherwise.
24364                 case "$host_os" in
24365                   aix*) ac_cv_func_strnlen_working=no;;
24366                   *)    ac_cv_func_strnlen_working=yes;;
24367                 esac
24368 else
24369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24370 /* end confdefs.h.  */
24371 $ac_includes_default
24372 int
24373 main ()
24374 {
24375
24376 #define S "foobar"
24377 #define S_LEN (sizeof S - 1)
24378
24379   /* At least one implementation is buggy: that of AIX 4.3 would
24380      give strnlen (S, 1) == 3.  */
24381
24382   int i;
24383   for (i = 0; i < S_LEN + 1; ++i)
24384     {
24385       int expected = i <= S_LEN ? i : S_LEN;
24386       if (strnlen (S, i) != expected)
24387         return 1;
24388     }
24389   return 0;
24390
24391   ;
24392   return 0;
24393 }
24394 _ACEOF
24395 if ac_fn_c_try_run "$LINENO"; then :
24396   ac_cv_func_strnlen_working=yes
24397 else
24398   ac_cv_func_strnlen_working=no
24399 fi
24400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24401   conftest.$ac_objext conftest.beam conftest.$ac_ext
24402 fi
24403
24404 fi
24405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
24406 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
24407 test $ac_cv_func_strnlen_working = no && :
24408
24409
24410     if test $ac_cv_func_strnlen_working = no; then
24411       REPLACE_STRNLEN=1
24412     fi
24413   fi
24414
24415   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
24416
24417
24418
24419
24420
24421
24422
24423
24424   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
24425
24426     :
24427   fi
24428
24429
24430
24431
24432
24433           GNULIB_STRNLEN=1
24434
24435
24436
24437
24438
24439 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
24440
24441
24442
24443
24444
24445
24446
24447   if test $ac_cv_func_strptime != yes; then
24448     HAVE_STRPTIME=0
24449   fi
24450
24451   if test $HAVE_STRPTIME = 0; then
24452
24453
24454
24455
24456
24457
24458
24459
24460   gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
24461
24462
24463
24464   :
24465
24466   fi
24467
24468
24469
24470
24471
24472           GNULIB_STRPTIME=1
24473
24474
24475
24476
24477
24478 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
24479
24480
24481
24482
24483
24484
24485   if test "$ac_cv_type_unsigned_long_long_int" = yes; then
24486     for ac_func in strtoull
24487 do :
24488   ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
24489 if test "x$ac_cv_func_strtoull" = xyes; then :
24490   cat >>confdefs.h <<_ACEOF
24491 #define HAVE_STRTOULL 1
24492 _ACEOF
24493
24494 fi
24495 done
24496
24497     if test $ac_cv_func_strtoull = no; then
24498       HAVE_STRTOULL=0
24499     fi
24500   fi
24501
24502   if test $HAVE_STRTOULL = 0; then
24503
24504
24505
24506
24507
24508
24509
24510
24511   gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
24512
24513
24514   :
24515
24516   fi
24517
24518
24519
24520
24521
24522           GNULIB_STRTOULL=1
24523
24524
24525
24526
24527
24528 printf "%s\n" "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
24529
24530
24531
24532
24533
24534
24535
24536
24537   if test "$ac_cv_have_decl_strtoumax" != yes; then
24538     HAVE_DECL_STRTOUMAX=0
24539   fi
24540
24541   if test $ac_cv_func_strtoumax = no; then
24542
24543
24544
24545
24546
24547
24548
24549
24550   gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
24551
24552
24553   ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
24554 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
24555   ac_have_decl=1
24556 else
24557   ac_have_decl=0
24558 fi
24559
24560 cat >>confdefs.h <<_ACEOF
24561 #define HAVE_DECL_STRTOULL $ac_have_decl
24562 _ACEOF
24563
24564
24565
24566   fi
24567
24568
24569
24570
24571
24572           GNULIB_STRTOUMAX=1
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591      if test $gl_cv_have_include_next = yes; then
24592        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24593      else
24594        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24595 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
24596 if ${gl_cv_next_sys_stat_h+:} false; then :
24597   printf %s "(cached) " >&6
24598 else
24599
24600              if test $ac_cv_header_sys_stat_h = yes; then
24601
24602
24603                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24604 /* end confdefs.h.  */
24605 #include <sys/stat.h>
24606
24607 _ACEOF
24608                                                                                                                         case "$host_os" in
24609                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24610                  *)    gl_absname_cpp="$ac_cpp" ;;
24611                esac
24612
24613                case "$host_os" in
24614                  mingw*)
24615                                                                                                                                      gl_dirsep_regex='[/\\]'
24616                    ;;
24617                  *)
24618                    gl_dirsep_regex='\/'
24619                    ;;
24620                esac
24621                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24622
24623                gl_header_literal_regex=`echo 'sys/stat.h' \
24624                                         | sed -e "$gl_make_literal_regex_sed"`
24625                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24626                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24627                    s|^/[^/]|//&|
24628                    p
24629                    q
24630                  }'
24631                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24632                       sed -n "$gl_absolute_header_sed"`'"'
24633           else
24634                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24635              fi
24636
24637
24638 fi
24639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24640 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
24641      fi
24642      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
24643
24644      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24645        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24646        gl_next_as_first_directive='<'sys/stat.h'>'
24647      else
24648        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24649        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24650      fi
24651      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
24664
24665 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
24666
24667   fi
24668
24669       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24670      #include <sys/stat.h>
24671 "
24672 if test "x$ac_cv_type_nlink_t" = xyes; then :
24673
24674 else
24675
24676 printf "%s\n" "#define nlink_t int" >>confdefs.h
24677
24678 fi
24679
24680
24681
24682     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
24683     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24684     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24685 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
24686 if eval \${$as_gl_Symbol+:} false; then :
24687   printf %s "(cached) " >&6
24688 else
24689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24690 /* end confdefs.h.  */
24691 #include <sys/stat.h>
24692
24693 int
24694 main ()
24695 {
24696 #undef $gl_func
24697   (void) $gl_func;
24698   ;
24699   return 0;
24700 }
24701 _ACEOF
24702 if ac_fn_c_try_compile "$LINENO"; then :
24703   eval "$as_gl_Symbol=yes"
24704 else
24705   eval "$as_gl_Symbol=no"
24706 fi
24707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24708 fi
24709 eval ac_res=\$$as_gl_Symbol
24710                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24711 printf "%s\n" "$ac_res" >&6; }
24712     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24713   cat >>confdefs.h <<_ACEOF
24714 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24715 _ACEOF
24716
24717                      eval ac_cv_have_decl_$gl_func=yes
24718 fi
24719       done
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741      if test $gl_cv_have_include_next = yes; then
24742        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24743      else
24744        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
24745 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
24746 if ${gl_cv_next_sys_wait_h+:} false; then :
24747   printf %s "(cached) " >&6
24748 else
24749
24750              if test $ac_cv_header_sys_wait_h = yes; then
24751
24752
24753                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24754 /* end confdefs.h.  */
24755 #include <sys/wait.h>
24756
24757 _ACEOF
24758                                                                                                                         case "$host_os" in
24759                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24760                  *)    gl_absname_cpp="$ac_cpp" ;;
24761                esac
24762
24763                case "$host_os" in
24764                  mingw*)
24765                                                                                                                                      gl_dirsep_regex='[/\\]'
24766                    ;;
24767                  *)
24768                    gl_dirsep_regex='\/'
24769                    ;;
24770                esac
24771                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24772
24773                gl_header_literal_regex=`echo 'sys/wait.h' \
24774                                         | sed -e "$gl_make_literal_regex_sed"`
24775                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24776                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24777                    s|^/[^/]|//&|
24778                    p
24779                    q
24780                  }'
24781                                                             gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24782                       sed -n "$gl_absolute_header_sed"`'"'
24783           else
24784                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24785              fi
24786
24787
24788 fi
24789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
24790 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
24791      fi
24792      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
24793
24794      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24795        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24796        gl_next_as_first_directive='<'sys/wait.h'>'
24797      else
24798        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24799        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
24800      fi
24801      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
24802
24803
24804
24805
24806
24807
24808
24809
24810     for gl_func in waitpid; do
24811     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24812     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24813 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
24814 if eval \${$as_gl_Symbol+:} false; then :
24815   printf %s "(cached) " >&6
24816 else
24817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818 /* end confdefs.h.  */
24819 #include <sys/wait.h>
24820 int
24821 main ()
24822 {
24823 #undef $gl_func
24824   (void) $gl_func;
24825   ;
24826   return 0;
24827 }
24828 _ACEOF
24829 if ac_fn_c_try_compile "$LINENO"; then :
24830   eval "$as_gl_Symbol=yes"
24831 else
24832   eval "$as_gl_Symbol=no"
24833 fi
24834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24835 fi
24836 eval ac_res=\$$as_gl_Symbol
24837                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24838 printf "%s\n" "$ac_res" >&6; }
24839     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24840   cat >>confdefs.h <<_ACEOF
24841 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24842 _ACEOF
24843
24844                      eval ac_cv_have_decl_$gl_func=yes
24845 fi
24846       done
24847
24848
24849
24850
24851
24852   :
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864       ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
24865 "
24866 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
24867   ac_have_decl=1
24868 else
24869   ac_have_decl=0
24870 fi
24871
24872 cat >>confdefs.h <<_ACEOF
24873 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
24874 _ACEOF
24875
24876   if test $ac_cv_have_decl_localtime_r = no; then
24877     HAVE_DECL_LOCALTIME_R=0
24878   fi
24879
24880
24881   if test $ac_cv_func_localtime_r = yes; then
24882     HAVE_LOCALTIME_R=1
24883     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
24884 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
24885 if ${gl_cv_time_r_posix+:} false; then :
24886   printf %s "(cached) " >&6
24887 else
24888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24889 /* end confdefs.h.  */
24890 #include <time.h>
24891 int
24892 main ()
24893 {
24894 /* We don't need to append 'restrict's to the argument types,
24895                  even though the POSIX signature has the 'restrict's,
24896                  since C99 says they can't affect type compatibility.  */
24897               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
24898               if (ptr) return 0;
24899               /* Check the return type is a pointer.
24900                  On HP-UX 10 it is 'int'.  */
24901               *localtime_r (0, 0);
24902   ;
24903   return 0;
24904 }
24905
24906 _ACEOF
24907 if ac_fn_c_try_compile "$LINENO"; then :
24908   gl_cv_time_r_posix=yes
24909 else
24910   gl_cv_time_r_posix=no
24911 fi
24912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24913
24914 fi
24915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
24916 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
24917     if test $gl_cv_time_r_posix = yes; then
24918       REPLACE_LOCALTIME_R=0
24919     else
24920       REPLACE_LOCALTIME_R=1
24921     fi
24922   else
24923     HAVE_LOCALTIME_R=0
24924   fi
24925
24926   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
24927
24928
24929
24930
24931
24932
24933
24934
24935   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
24936
24937
24938   :
24939
24940   fi
24941
24942
24943
24944
24945
24946           GNULIB_TIME_R=1
24947
24948
24949
24950
24951
24952 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
24953
24954
24955
24956   :
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969      if test $gl_cv_have_include_next = yes; then
24970        gl_cv_next_unistd_h='<'unistd.h'>'
24971      else
24972        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24973 printf %s "checking absolute name of <unistd.h>... " >&6; }
24974 if ${gl_cv_next_unistd_h+:} false; then :
24975   printf %s "(cached) " >&6
24976 else
24977
24978              if test $ac_cv_header_unistd_h = yes; then
24979
24980
24981                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24982 /* end confdefs.h.  */
24983 #include <unistd.h>
24984
24985 _ACEOF
24986                                                                                                                         case "$host_os" in
24987                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24988                  *)    gl_absname_cpp="$ac_cpp" ;;
24989                esac
24990
24991                case "$host_os" in
24992                  mingw*)
24993                                                                                                                                      gl_dirsep_regex='[/\\]'
24994                    ;;
24995                  *)
24996                    gl_dirsep_regex='\/'
24997                    ;;
24998                esac
24999                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25000
25001                gl_header_literal_regex=`echo 'unistd.h' \
25002                                         | sed -e "$gl_make_literal_regex_sed"`
25003                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25004                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25005                    s|^/[^/]|//&|
25006                    p
25007                    q
25008                  }'
25009                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25010                       sed -n "$gl_absolute_header_sed"`'"'
25011           else
25012                gl_cv_next_unistd_h='<'unistd.h'>'
25013              fi
25014
25015
25016 fi
25017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25018 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
25019      fi
25020      NEXT_UNISTD_H=$gl_cv_next_unistd_h
25021
25022      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25023        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25024        gl_next_as_first_directive='<'unistd.h'>'
25025      else
25026        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25027        gl_next_as_first_directive=$gl_cv_next_unistd_h
25028      fi
25029      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
25030
25031
25032
25033
25034   if test $ac_cv_header_unistd_h = yes; then
25035     HAVE_UNISTD_H=1
25036   else
25037     HAVE_UNISTD_H=0
25038   fi
25039
25040
25041
25042
25043
25044
25045
25046     for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r     unlink unlinkat usleep; do
25047     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25048     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25049 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
25050 if eval \${$as_gl_Symbol+:} false; then :
25051   printf %s "(cached) " >&6
25052 else
25053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25054 /* end confdefs.h.  */
25055
25056 #if HAVE_UNISTD_H
25057 # include <unistd.h>
25058 #endif
25059 /* Some systems declare various items in the wrong headers.  */
25060 #if !(defined __GLIBC__ && !defined __UCLIBC__)
25061 # include <fcntl.h>
25062 # include <stdio.h>
25063 # include <stdlib.h>
25064 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25065 #  include <io.h>
25066 # endif
25067 #endif
25068
25069 int
25070 main ()
25071 {
25072 #undef $gl_func
25073   (void) $gl_func;
25074   ;
25075   return 0;
25076 }
25077 _ACEOF
25078 if ac_fn_c_try_compile "$LINENO"; then :
25079   eval "$as_gl_Symbol=yes"
25080 else
25081   eval "$as_gl_Symbol=no"
25082 fi
25083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25084 fi
25085 eval ac_res=\$$as_gl_Symbol
25086                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25087 printf "%s\n" "$ac_res" >&6; }
25088     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25089   cat >>confdefs.h <<_ACEOF
25090 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25091 _ACEOF
25092
25093                      eval ac_cv_have_decl_$gl_func=yes
25094 fi
25095       done
25096
25097
25098
25099
25100       if  { test "$HAVE_LIBUNISTRING" != yes \
25101     || {
25102
25103
25104
25105             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25106             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25107                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25108                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25109                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 2
25110                          }
25111                     }
25112                }
25113
25114
25115
25116
25117        }
25118   }; then
25119     LIBUNISTRING_UNISTR_H='unistr.h'
25120   else
25121     LIBUNISTRING_UNISTR_H=
25122   fi
25123
25124
25125
25126
25127 cat >>confdefs.h <<_ACEOF
25128 #define GNULIB_UNISTR_U8_MBTOUCR 1
25129 _ACEOF
25130
25131
25132
25133
25134        if  { test "$HAVE_LIBUNISTRING" != yes \
25135     || {
25136
25137
25138
25139             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25140             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25141                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25142                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25143                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
25144                          }
25145                     }
25146                }
25147
25148
25149
25150
25151        }
25152   }; then
25153   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
25154   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
25155 else
25156   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
25157   LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
25158 fi
25159
25160
25161
25162
25163 cat >>confdefs.h <<_ACEOF
25164 #define GNULIB_UNISTR_U8_UCTOMB 1
25165 _ACEOF
25166
25167
25168
25169
25170        if  { test "$HAVE_LIBUNISTRING" != yes \
25171     || {
25172
25173
25174
25175             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25176             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25177                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25178                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25179                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
25180                          }
25181                     }
25182                }
25183
25184
25185
25186
25187        }
25188   }; then
25189   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
25190   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
25191 else
25192   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
25193   LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
25194 fi
25195
25196
25197
25198
25199       if  { test "$HAVE_LIBUNISTRING" != yes \
25200     || {
25201
25202
25203
25204             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25205             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25206                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25207                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25208                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
25209                          }
25210                     }
25211                }
25212
25213
25214
25215
25216        }
25217   }; then
25218     LIBUNISTRING_UNITYPES_H='unitypes.h'
25219   else
25220     LIBUNISTRING_UNITYPES_H=
25221   fi
25222
25223
25224
25225
25226       if  { test "$HAVE_LIBUNISTRING" != yes \
25227     || {
25228
25229
25230
25231             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25232             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25233                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25234                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25235                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
25236                          }
25237                     }
25238                }
25239
25240
25241
25242
25243        }
25244   }; then
25245     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
25246   else
25247     LIBUNISTRING_UNIWIDTH_H=
25248   fi
25249
25250
25251
25252
25253        if  { test "$HAVE_LIBUNISTRING" != yes \
25254     || {
25255
25256
25257
25258             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
25259             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
25260                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
25261                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
25262                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
25263                          }
25264                     }
25265                }
25266
25267
25268
25269
25270        }
25271   }; then
25272   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
25273   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
25274 else
25275   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
25276   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
25277 fi
25278
25279
25280
25281
25282 printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
25303 printf %s "checking for variable-length arrays... " >&6; }
25304 if ${ac_cv_c_vararrays+:} false; then :
25305   printf %s "(cached) " >&6
25306 else
25307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25308 /* end confdefs.h.  */
25309
25310 int
25311 main ()
25312 {
25313 static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];
25314   ;
25315   return 0;
25316 }
25317 _ACEOF
25318 if ac_fn_c_try_compile "$LINENO"; then :
25319   ac_cv_c_vararrays=yes
25320 else
25321   ac_cv_c_vararrays=no
25322 fi
25323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25324 fi
25325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
25326 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
25327   if test $ac_cv_c_vararrays = yes; then
25328
25329 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
25330
25331   fi
25332
25333
25334
25335   if test $ac_cv_func_vasnprintf = no; then
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
25377
25378   if test $ac_cv_func_vasnprintf = yes; then
25379
25380 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
25381
25382   fi
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
25395 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
25396
25397 else
25398
25399 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
25400
25401
25402 fi
25403
25404
25405
25406
25407
25408
25409
25410   fi
25411
25412
25413   for ac_func in vasprintf
25414 do :
25415   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
25416 if test "x$ac_cv_func_vasprintf" = xyes; then :
25417   cat >>confdefs.h <<_ACEOF
25418 #define HAVE_VASPRINTF 1
25419 _ACEOF
25420
25421 fi
25422 done
25423
25424   if test $ac_cv_func_vasprintf = no; then
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
25445
25446
25447   if test $ac_cv_func_vasprintf = yes; then
25448     REPLACE_VASPRINTF=1
25449   else
25450     HAVE_VASPRINTF=0
25451   fi
25452
25453
25454
25455
25456
25457
25458
25459
25460   fi
25461
25462
25463
25464
25465
25466
25467           GNULIB_VASPRINTF=1
25468
25469
25470
25471
25472
25473 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
25474
25475
25476
25477
25478
25479   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
25480
25481
25482
25483   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
25484
25485
25486 # Check whether --with-packager was given.
25487 if test "${with_packager+set}" = set; then :
25488   withval=$with_packager;       case $withval in
25489         yes|no) ;;
25490         *)
25491 cat >>confdefs.h <<_ACEOF
25492 #define PACKAGE_PACKAGER "$withval"
25493 _ACEOF
25494  ;;
25495       esac
25496
25497 fi
25498
25499
25500
25501 # Check whether --with-packager-version was given.
25502 if test "${with_packager_version+set}" = set; then :
25503   withval=$with_packager_version;       case $withval in
25504         yes|no) ;;
25505         *)
25506 cat >>confdefs.h <<_ACEOF
25507 #define PACKAGE_PACKAGER_VERSION "$withval"
25508 _ACEOF
25509  ;;
25510       esac
25511
25512 fi
25513
25514
25515
25516 # Check whether --with-packager-bug-reports was given.
25517 if test "${with_packager_bug_reports+set}" = set; then :
25518   withval=$with_packager_bug_reports;       case $withval in
25519         yes|no) ;;
25520         *)
25521 cat >>confdefs.h <<_ACEOF
25522 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
25523 _ACEOF
25524  ;;
25525       esac
25526
25527 fi
25528
25529
25530   if test "X$with_packager" = "X" && \
25531      test "X$with_packager_version$with_packager_bug_reports" != "X"
25532   then
25533     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
25534   fi
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548      if test $gl_cv_have_include_next = yes; then
25549        gl_cv_next_wchar_h='<'wchar.h'>'
25550      else
25551        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25552 printf %s "checking absolute name of <wchar.h>... " >&6; }
25553 if ${gl_cv_next_wchar_h+:} false; then :
25554   printf %s "(cached) " >&6
25555 else
25556
25557              if test $ac_cv_header_wchar_h = yes; then
25558
25559
25560                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25561 /* end confdefs.h.  */
25562 #include <wchar.h>
25563
25564 _ACEOF
25565                                                                                                                         case "$host_os" in
25566                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25567                  *)    gl_absname_cpp="$ac_cpp" ;;
25568                esac
25569
25570                case "$host_os" in
25571                  mingw*)
25572                                                                                                                                      gl_dirsep_regex='[/\\]'
25573                    ;;
25574                  *)
25575                    gl_dirsep_regex='\/'
25576                    ;;
25577                esac
25578                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25579
25580                gl_header_literal_regex=`echo 'wchar.h' \
25581                                         | sed -e "$gl_make_literal_regex_sed"`
25582                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25583                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25584                    s|^/[^/]|//&|
25585                    p
25586                    q
25587                  }'
25588                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25589                       sed -n "$gl_absolute_header_sed"`'"'
25590           else
25591                gl_cv_next_wchar_h='<'wchar.h'>'
25592              fi
25593
25594
25595 fi
25596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25597 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
25598      fi
25599      NEXT_WCHAR_H=$gl_cv_next_wchar_h
25600
25601      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25602        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25603        gl_next_as_first_directive='<'wchar.h'>'
25604      else
25605        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25606        gl_next_as_first_directive=$gl_cv_next_wchar_h
25607      fi
25608      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25609
25610
25611
25612
25613   if test $ac_cv_header_wchar_h = yes; then
25614     HAVE_WCHAR_H=1
25615   else
25616     HAVE_WCHAR_H=0
25617   fi
25618
25619
25620
25621
25622
25623   if test $gt_cv_c_wint_t = yes; then
25624     HAVE_WINT_T=1
25625   else
25626     HAVE_WINT_T=0
25627   fi
25628
25629
25630
25631     for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
25632     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25633     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25634 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
25635 if eval \${$as_gl_Symbol+:} false; then :
25636   printf %s "(cached) " >&6
25637 else
25638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25639 /* end confdefs.h.  */
25640
25641 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25642    <wchar.h>.
25643    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25644    included before <wchar.h>.  */
25645 #if !(defined __GLIBC__ && !defined __UCLIBC__)
25646 # include <stddef.h>
25647 # include <stdio.h>
25648 # include <time.h>
25649 #endif
25650 #include <wchar.h>
25651
25652 int
25653 main ()
25654 {
25655 #undef $gl_func
25656   (void) $gl_func;
25657   ;
25658   return 0;
25659 }
25660 _ACEOF
25661 if ac_fn_c_try_compile "$LINENO"; then :
25662   eval "$as_gl_Symbol=yes"
25663 else
25664   eval "$as_gl_Symbol=no"
25665 fi
25666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25667 fi
25668 eval ac_res=\$$as_gl_Symbol
25669                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25670 printf "%s\n" "$ac_res" >&6; }
25671     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25672   cat >>confdefs.h <<_ACEOF
25673 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25674 _ACEOF
25675
25676                      eval ac_cv_have_decl_$gl_func=yes
25677 fi
25678       done
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25692
25693
25694
25695      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25696 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
25697 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25698   printf %s "(cached) " >&6
25699 else
25700
25701                   case "$host_os" in
25702                      # Guess no on AIX and OSF/1.
25703         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25704                      # Guess yes otherwise.
25705         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25706       esac
25707       if test $LOCALE_JA != none; then
25708         if test "$cross_compiling" = yes; then :
25709   :
25710 else
25711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25712 /* end confdefs.h.  */
25713
25714 #include <locale.h>
25715 #include <string.h>
25716 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25717    <wchar.h>.
25718    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25719    included before <wchar.h>.  */
25720 #include <stddef.h>
25721 #include <stdio.h>
25722 #include <time.h>
25723 #include <wchar.h>
25724 int main ()
25725 {
25726   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25727     {
25728       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25729       mbstate_t state;
25730       wchar_t wc;
25731
25732       memset (&state, '\0', sizeof (mbstate_t));
25733       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25734         if (mbsinit (&state))
25735           return 1;
25736     }
25737   return 0;
25738 }
25739 _ACEOF
25740 if ac_fn_c_try_run "$LINENO"; then :
25741   gl_cv_func_mbrtowc_incomplete_state=yes
25742 else
25743   gl_cv_func_mbrtowc_incomplete_state=no
25744 fi
25745 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25746   conftest.$ac_objext conftest.beam conftest.$ac_ext
25747 fi
25748
25749       fi
25750
25751 fi
25752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25753 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25754
25755
25756
25757
25758      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25759 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
25760 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25761   printf %s "(cached) " >&6
25762 else
25763
25764                   case "$host_os" in
25765                     # Guess no on Solaris 8.
25766         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25767                     # Guess yes otherwise.
25768         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25769       esac
25770       if test $LOCALE_ZH_CN != none; then
25771         if test "$cross_compiling" = yes; then :
25772   :
25773 else
25774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25775 /* end confdefs.h.  */
25776
25777 #include <locale.h>
25778 #include <stdlib.h>
25779 #include <string.h>
25780 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25781    <wchar.h>.
25782    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25783    included before <wchar.h>.  */
25784 #include <stddef.h>
25785 #include <stdio.h>
25786 #include <time.h>
25787 #include <wchar.h>
25788 int main ()
25789 {
25790   /* This fails on Solaris 8:
25791      mbrtowc returns 2, and sets wc to 0x00F0.
25792      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
25793   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25794     {
25795       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25796       mbstate_t state;
25797       wchar_t wc;
25798
25799       memset (&state, '\0', sizeof (mbstate_t));
25800       if (mbrtowc (&wc, input + 3, 6, &state) != 4
25801           && mbtowc (&wc, input + 3, 6) == 4)
25802         return 1;
25803     }
25804   return 0;
25805 }
25806 _ACEOF
25807 if ac_fn_c_try_run "$LINENO"; then :
25808   gl_cv_func_mbrtowc_sanitycheck=yes
25809 else
25810   gl_cv_func_mbrtowc_sanitycheck=no
25811 fi
25812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25813   conftest.$ac_objext conftest.beam conftest.$ac_ext
25814 fi
25815
25816       fi
25817
25818 fi
25819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25820 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25821
25822     REPLACE_MBSTATE_T=0
25823     case "$gl_cv_func_mbrtowc_incomplete_state" in
25824       *yes) ;;
25825       *) REPLACE_MBSTATE_T=1 ;;
25826     esac
25827     case "$gl_cv_func_mbrtowc_sanitycheck" in
25828       *yes) ;;
25829       *) REPLACE_MBSTATE_T=1 ;;
25830     esac
25831   else
25832     REPLACE_MBSTATE_T=1
25833   fi
25834
25835
25836
25837   if test $ac_cv_func_wcrtomb = no; then
25838     HAVE_WCRTOMB=0
25839     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
25840 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25841    <wchar.h>.
25842    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25843    included before <wchar.h>.  */
25844 #include <stddef.h>
25845 #include <stdio.h>
25846 #include <time.h>
25847 #include <wchar.h>
25848
25849 "
25850 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
25851   ac_have_decl=1
25852 else
25853   ac_have_decl=0
25854 fi
25855
25856 cat >>confdefs.h <<_ACEOF
25857 #define HAVE_DECL_WCRTOMB $ac_have_decl
25858 _ACEOF
25859
25860     if test $ac_cv_have_decl_wcrtomb = yes; then
25861                         REPLACE_WCRTOMB=1
25862     fi
25863   else
25864     if test $REPLACE_MBSTATE_T = 1; then
25865       REPLACE_WCRTOMB=1
25866     else
25867
25868
25869
25870
25871
25872              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
25873 printf %s "checking whether wcrtomb return value is correct... " >&6; }
25874 if ${gl_cv_func_wcrtomb_retval+:} false; then :
25875   printf %s "(cached) " >&6
25876 else
25877
25878                               case "$host_os" in
25879                                      # Guess no on AIX 4, OSF/1 and Solaris.
25880             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
25881                                      # Guess yes otherwise.
25882             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
25883           esac
25884           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25885             if test "$cross_compiling" = yes; then :
25886   :
25887 else
25888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25889 /* end confdefs.h.  */
25890
25891 #include <locale.h>
25892 #include <string.h>
25893 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25894    <wchar.h>.
25895    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25896    included before <wchar.h>.  */
25897 #include <stddef.h>
25898 #include <stdio.h>
25899 #include <time.h>
25900 #include <wchar.h>
25901 int main ()
25902 {
25903   int result = 0;
25904   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25905     {
25906       if (wcrtomb (NULL, 0, NULL) != 1)
25907         result |= 1;
25908     }
25909   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25910     {
25911       if (wcrtomb (NULL, 0, NULL) != 1)
25912         result |= 2;
25913     }
25914   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25915     {
25916       if (wcrtomb (NULL, 0, NULL) != 1)
25917         result |= 4;
25918     }
25919   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25920     {
25921       if (wcrtomb (NULL, 0, NULL) != 1)
25922         result |= 8;
25923     }
25924   return result;
25925 }
25926 _ACEOF
25927 if ac_fn_c_try_run "$LINENO"; then :
25928   gl_cv_func_wcrtomb_retval=yes
25929 else
25930   gl_cv_func_wcrtomb_retval=no
25931 fi
25932 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25933   conftest.$ac_objext conftest.beam conftest.$ac_ext
25934 fi
25935
25936           fi
25937
25938 fi
25939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
25940 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
25941       case "$gl_cv_func_wcrtomb_retval" in
25942         *yes) ;;
25943         *) REPLACE_WCRTOMB=1 ;;
25944       esac
25945     fi
25946   fi
25947
25948   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
25949
25950
25951
25952
25953
25954
25955
25956
25957   gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
25958
25959
25960   :
25961
25962   fi
25963
25964
25965
25966
25967
25968           GNULIB_WCRTOMB=1
25969
25970
25971
25972
25973
25974 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
25975
25976
25977
25978
25979
25980
25981
25982
25983   if test $ac_cv_func_iswcntrl = yes; then
25984     HAVE_ISWCNTRL=1
25985   else
25986     HAVE_ISWCNTRL=0
25987   fi
25988
25989
25990
25991   if test $gt_cv_c_wint_t = yes; then
25992     HAVE_WINT_T=1
25993   else
25994     HAVE_WINT_T=0
25995   fi
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007      if test $gl_cv_have_include_next = yes; then
26008        gl_cv_next_wctype_h='<'wctype.h'>'
26009      else
26010        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
26011 printf %s "checking absolute name of <wctype.h>... " >&6; }
26012 if ${gl_cv_next_wctype_h+:} false; then :
26013   printf %s "(cached) " >&6
26014 else
26015
26016              if test $ac_cv_header_wctype_h = yes; then
26017
26018
26019                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26020 /* end confdefs.h.  */
26021 #include <wctype.h>
26022
26023 _ACEOF
26024                                                                                                                         case "$host_os" in
26025                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26026                  *)    gl_absname_cpp="$ac_cpp" ;;
26027                esac
26028
26029                case "$host_os" in
26030                  mingw*)
26031                                                                                                                                      gl_dirsep_regex='[/\\]'
26032                    ;;
26033                  *)
26034                    gl_dirsep_regex='\/'
26035                    ;;
26036                esac
26037                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26038
26039                gl_header_literal_regex=`echo 'wctype.h' \
26040                                         | sed -e "$gl_make_literal_regex_sed"`
26041                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26042                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26043                    s|^/[^/]|//&|
26044                    p
26045                    q
26046                  }'
26047                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26048                       sed -n "$gl_absolute_header_sed"`'"'
26049           else
26050                gl_cv_next_wctype_h='<'wctype.h'>'
26051              fi
26052
26053
26054 fi
26055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
26056 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
26057      fi
26058      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
26059
26060      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26061        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26062        gl_next_as_first_directive='<'wctype.h'>'
26063      else
26064        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26065        gl_next_as_first_directive=$gl_cv_next_wctype_h
26066      fi
26067      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
26068
26069
26070
26071
26072   if test $ac_cv_header_wctype_h = yes; then
26073     if test $ac_cv_func_iswcntrl = yes; then
26074                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
26075 printf %s "checking whether iswcntrl works... " >&6; }
26076 if ${gl_cv_func_iswcntrl_works+:} false; then :
26077   printf %s "(cached) " >&6
26078 else
26079
26080           if test "$cross_compiling" = yes; then :
26081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26082 /* end confdefs.h.  */
26083 #include <stdlib.h>
26084                           #if __GNU_LIBRARY__ == 1
26085                           Linux libc5 i18n is broken.
26086                           #endif
26087 int
26088 main ()
26089 {
26090
26091   ;
26092   return 0;
26093 }
26094 _ACEOF
26095 if ac_fn_c_try_compile "$LINENO"; then :
26096   gl_cv_func_iswcntrl_works="guessing yes"
26097 else
26098   gl_cv_func_iswcntrl_works="guessing no"
26099 fi
26100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26101
26102 else
26103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26104 /* end confdefs.h.  */
26105
26106                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26107                   included before <wchar.h>.
26108                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26109                   must be included before <wchar.h>.  */
26110                #include <stddef.h>
26111                #include <stdio.h>
26112                #include <time.h>
26113                #include <wchar.h>
26114                #include <wctype.h>
26115                int main () { return iswprint ('x') == 0; }
26116
26117 _ACEOF
26118 if ac_fn_c_try_run "$LINENO"; then :
26119   gl_cv_func_iswcntrl_works=yes
26120 else
26121   gl_cv_func_iswcntrl_works=no
26122 fi
26123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26124   conftest.$ac_objext conftest.beam conftest.$ac_ext
26125 fi
26126
26127
26128 fi
26129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
26130 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
26131     fi
26132     HAVE_WCTYPE_H=1
26133   else
26134     HAVE_WCTYPE_H=0
26135   fi
26136
26137
26138   case "$gl_cv_func_iswcntrl_works" in
26139     *yes) REPLACE_ISWCNTRL=0 ;;
26140     *)    REPLACE_ISWCNTRL=1 ;;
26141   esac
26142
26143
26144   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
26145         :
26146   fi
26147
26148   if test $REPLACE_ISWCNTRL = 1; then
26149     REPLACE_TOWLOWER=1
26150   else
26151     for ac_func in towlower
26152 do :
26153   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
26154 if test "x$ac_cv_func_towlower" = xyes; then :
26155   cat >>confdefs.h <<_ACEOF
26156 #define HAVE_TOWLOWER 1
26157 _ACEOF
26158
26159 fi
26160 done
26161
26162     if test $ac_cv_func_towlower = yes; then
26163       REPLACE_TOWLOWER=0
26164     else
26165       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26166              included before <wchar.h>.
26167              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26168              must be included before <wchar.h>.  */
26169           #include <stddef.h>
26170           #include <stdio.h>
26171           #include <time.h>
26172           #include <wchar.h>
26173           #if HAVE_WCTYPE_H
26174           # include <wctype.h>
26175           #endif
26176
26177 "
26178 if test "x$ac_cv_have_decl_towlower" = xyes; then :
26179   ac_have_decl=1
26180 else
26181   ac_have_decl=0
26182 fi
26183
26184 cat >>confdefs.h <<_ACEOF
26185 #define HAVE_DECL_TOWLOWER $ac_have_decl
26186 _ACEOF
26187
26188       if test $ac_cv_have_decl_towlower = yes; then
26189                                 REPLACE_TOWLOWER=1
26190       else
26191         REPLACE_TOWLOWER=0
26192       fi
26193     fi
26194   fi
26195
26196
26197   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
26198         :
26199   fi
26200
26201           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
26202 printf %s "checking for wctype_t... " >&6; }
26203 if ${gl_cv_type_wctype_t+:} false; then :
26204   printf %s "(cached) " >&6
26205 else
26206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26207 /* end confdefs.h.  */
26208 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26209                included before <wchar.h>.
26210                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26211                must be included before <wchar.h>.  */
26212             #include <stddef.h>
26213             #include <stdio.h>
26214             #include <time.h>
26215             #include <wchar.h>
26216             #if HAVE_WCTYPE_H
26217             # include <wctype.h>
26218             #endif
26219             wctype_t a;
26220
26221 int
26222 main ()
26223 {
26224
26225   ;
26226   return 0;
26227 }
26228 _ACEOF
26229 if ac_fn_c_try_compile "$LINENO"; then :
26230   gl_cv_type_wctype_t=yes
26231 else
26232   gl_cv_type_wctype_t=no
26233 fi
26234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26235
26236 fi
26237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
26238 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
26239   if test $gl_cv_type_wctype_t = no; then
26240     HAVE_WCTYPE_T=0
26241   fi
26242
26243       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
26244 printf %s "checking for wctrans_t... " >&6; }
26245 if ${gl_cv_type_wctrans_t+:} false; then :
26246   printf %s "(cached) " >&6
26247 else
26248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26249 /* end confdefs.h.  */
26250 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26251                included before <wchar.h>.
26252                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26253                must be included before <wchar.h>.  */
26254             #include <stddef.h>
26255             #include <stdio.h>
26256             #include <time.h>
26257             #include <wchar.h>
26258             #include <wctype.h>
26259             wctrans_t a;
26260
26261 int
26262 main ()
26263 {
26264
26265   ;
26266   return 0;
26267 }
26268 _ACEOF
26269 if ac_fn_c_try_compile "$LINENO"; then :
26270   gl_cv_type_wctrans_t=yes
26271 else
26272   gl_cv_type_wctrans_t=no
26273 fi
26274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26275
26276 fi
26277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
26278 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
26279   if test $gl_cv_type_wctrans_t = no; then
26280     HAVE_WCTRANS_T=0
26281   fi
26282
26283
26284     for gl_func in wctype iswctype wctrans towctrans     ; do
26285     as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26286     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26287 printf %s "checking whether $gl_func is declared without a macro... " >&6; }
26288 if eval \${$as_gl_Symbol+:} false; then :
26289   printf %s "(cached) " >&6
26290 else
26291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26292 /* end confdefs.h.  */
26293
26294 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26295    <wchar.h>.
26296    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26297    included before <wchar.h>.  */
26298 #if !(defined __GLIBC__ && !defined __UCLIBC__)
26299 # include <stddef.h>
26300 # include <stdio.h>
26301 # include <time.h>
26302 # include <wchar.h>
26303 #endif
26304 #include <wctype.h>
26305
26306 int
26307 main ()
26308 {
26309 #undef $gl_func
26310   (void) $gl_func;
26311   ;
26312   return 0;
26313 }
26314 _ACEOF
26315 if ac_fn_c_try_compile "$LINENO"; then :
26316   eval "$as_gl_Symbol=yes"
26317 else
26318   eval "$as_gl_Symbol=no"
26319 fi
26320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26321 fi
26322 eval ac_res=\$$as_gl_Symbol
26323                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26324 printf "%s\n" "$ac_res" >&6; }
26325     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26326   cat >>confdefs.h <<_ACEOF
26327 #define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26328 _ACEOF
26329
26330                      eval ac_cv_have_decl_$gl_func=yes
26331 fi
26332       done
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
26347 /* AIX 3.2.5 declares wcwidth in <string.h>. */
26348 #include <string.h>
26349 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26350    <wchar.h>.
26351    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
26352    before <wchar.h>.  */
26353 #include <stddef.h>
26354 #include <stdio.h>
26355 #include <time.h>
26356 #include <wchar.h>
26357
26358 "
26359 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
26360   ac_have_decl=1
26361 else
26362   ac_have_decl=0
26363 fi
26364
26365 cat >>confdefs.h <<_ACEOF
26366 #define HAVE_DECL_WCWIDTH $ac_have_decl
26367 _ACEOF
26368
26369   if test $ac_cv_have_decl_wcwidth != yes; then
26370     HAVE_DECL_WCWIDTH=0
26371   fi
26372
26373   if test $ac_cv_func_wcwidth = yes; then
26374     HAVE_WCWIDTH=1
26375                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
26376 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
26377 if ${gl_cv_func_wcwidth_works+:} false; then :
26378   printf %s "(cached) " >&6
26379 else
26380
26381         if test "$cross_compiling" = yes; then :
26382
26383            case "$host_os" in
26384                      # Guess yes on glibc and AIX 7 systems.
26385              *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
26386              *)                  gl_cv_func_wcwidth_works="guessing no";;
26387            esac
26388
26389 else
26390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26391 /* end confdefs.h.  */
26392
26393 #include <locale.h>
26394 /* AIX 3.2.5 declares wcwidth in <string.h>. */
26395 #include <string.h>
26396 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26397    <wchar.h>.
26398    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
26399    before <wchar.h>.  */
26400 #include <stddef.h>
26401 #include <stdio.h>
26402 #include <time.h>
26403 #include <wchar.h>
26404 #if !HAVE_DECL_WCWIDTH
26405 extern
26406 # ifdef __cplusplus
26407 "C"
26408 # endif
26409 int wcwidth (int);
26410 #endif
26411 int main ()
26412 {
26413   int result = 0;
26414   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
26415     {
26416       if (wcwidth (0x0301) > 0)
26417         result |= 1;
26418       if (wcwidth (0x05B0) > 0)
26419         result |= 2;
26420       if (wcwidth (0x200B) > 0)
26421         result |= 4;
26422     }
26423   return result;
26424 }
26425 _ACEOF
26426 if ac_fn_c_try_run "$LINENO"; then :
26427   gl_cv_func_wcwidth_works=yes
26428 else
26429   gl_cv_func_wcwidth_works=no
26430 fi
26431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26432   conftest.$ac_objext conftest.beam conftest.$ac_ext
26433 fi
26434
26435
26436 fi
26437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
26438 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
26439     case "$gl_cv_func_wcwidth_works" in
26440       *yes) ;;
26441       *no) REPLACE_WCWIDTH=1 ;;
26442     esac
26443   else
26444     HAVE_WCWIDTH=0
26445   fi
26446
26447   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
26448
26449
26450
26451
26452
26453
26454
26455
26456   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
26457
26458   fi
26459
26460
26461
26462
26463
26464           GNULIB_WCWIDTH=1
26465
26466
26467
26468
26469
26470 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
26471
26472
26473
26474   :
26475
26476
26477   for ac_header in stdint.h
26478 do :
26479   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26480 if test "x$ac_cv_header_stdint_h" = xyes; then :
26481   cat >>confdefs.h <<_ACEOF
26482 #define HAVE_STDINT_H 1
26483 _ACEOF
26484
26485 fi
26486
26487 done
26488
26489
26490
26491
26492   :
26493
26494
26495
26496   :
26497
26498   :
26499
26500
26501   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
26502
26503   # End of code from modules
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513   gltests_libdeps=
26514   gltests_ltlibdeps=
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524   gl_source_base='gnulib-tests'
26525   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
26526
26527   gl_module_indicator_condition=$gltests_WITNESS
26528
26529
26530
26531
26532   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
26533 printf %s "checking for a traditional french locale... " >&6; }
26534 if ${gt_cv_locale_fr+:} false; then :
26535   printf %s "(cached) " >&6
26536 else
26537
26538     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26539 /* end confdefs.h.  */
26540
26541 #include <locale.h>
26542 #include <time.h>
26543 #if HAVE_LANGINFO_CODESET
26544 # include <langinfo.h>
26545 #endif
26546 #include <stdlib.h>
26547 #include <string.h>
26548 struct tm t;
26549 char buf[16];
26550 int main () {
26551   /* Check whether the given locale name is recognized by the system.  */
26552 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
26553   /* On native Windows, setlocale(category, "") looks at the system settings,
26554      not at the environment variables.  Also, when an encoding suffix such
26555      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
26556      category of the locale to "C".  */
26557   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
26558       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
26559     return 1;
26560 #else
26561   if (setlocale (LC_ALL, "") == NULL) return 1;
26562 #endif
26563   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
26564      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
26565      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
26566      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
26567      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
26568      some unit tests fail.
26569      On MirBSD 10, when an unsupported locale is specified, setlocale()
26570      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
26571 #if HAVE_LANGINFO_CODESET
26572   {
26573     const char *cs = nl_langinfo (CODESET);
26574     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
26575         || strcmp (cs, "UTF-8") == 0)
26576       return 1;
26577   }
26578 #endif
26579 #ifdef __CYGWIN__
26580   /* On Cygwin, avoid locale names without encoding suffix, because the
26581      locale_charset() function relies on the encoding suffix.  Note that
26582      LC_ALL is set on the command line.  */
26583   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
26584 #endif
26585   /* Check whether in the abbreviation of the second month, the second
26586      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
26587      one byte long. This excludes the UTF-8 encoding.  */
26588   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
26589   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
26590 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
26591   /* Check whether the decimal separator is a comma.
26592      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
26593      are nl_langinfo(RADIXCHAR) are both ".".  */
26594   if (localeconv () ->decimal_point[0] != ',') return 1;
26595 #endif
26596   return 0;
26597 }
26598
26599 _ACEOF
26600     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
26601   (eval $ac_link) 2>&5
26602   ac_status=$?
26603   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26604   test $ac_status = 0; } && test -s conftest$ac_exeext; then
26605       case "$host_os" in
26606         # Handle native Windows specially, because there setlocale() interprets
26607         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
26608         # "fr" or "fra" as "French" or "French_France.1252",
26609         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
26610         # "ja" as "Japanese" or "Japanese_Japan.932",
26611         # and similar.
26612         mingw*)
26613           # Test for the native Windows locale name.
26614           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26615             gt_cv_locale_fr=French_France.1252
26616           else
26617             # None found.
26618             gt_cv_locale_fr=none
26619           fi
26620           ;;
26621         *)
26622           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
26623           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
26624           # configure script would override the LC_ALL setting. Likewise for
26625           # LC_CTYPE, which is also set at the beginning of the configure script.
26626           # Test for the usual locale name.
26627           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26628             gt_cv_locale_fr=fr_FR
26629           else
26630             # Test for the locale name with explicit encoding suffix.
26631             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26632               gt_cv_locale_fr=fr_FR.ISO-8859-1
26633             else
26634               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
26635               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26636                 gt_cv_locale_fr=fr_FR.ISO8859-1
26637               else
26638                 # Test for the HP-UX locale name.
26639                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26640                   gt_cv_locale_fr=fr_FR.iso88591
26641                 else
26642                   # Test for the Solaris 7 locale name.
26643                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26644                     gt_cv_locale_fr=fr
26645                   else
26646                     # None found.
26647                     gt_cv_locale_fr=none
26648                   fi
26649                 fi
26650               fi
26651             fi
26652           fi
26653           ;;
26654       esac
26655     fi
26656     rm -fr conftest*
26657
26658 fi
26659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
26660 printf "%s\n" "$gt_cv_locale_fr" >&6; }
26661   LOCALE_FR=$gt_cv_locale_fr
26662
26663
26664
26665
26666   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
26667 printf %s "checking for a french Unicode locale... " >&6; }
26668 if ${gt_cv_locale_fr_utf8+:} false; then :
26669   printf %s "(cached) " >&6
26670 else
26671
26672     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26673 /* end confdefs.h.  */
26674
26675 #include <locale.h>
26676 #include <time.h>
26677 #if HAVE_LANGINFO_CODESET
26678 # include <langinfo.h>
26679 #endif
26680 #include <stdlib.h>
26681 #include <string.h>
26682 struct tm t;
26683 char buf[16];
26684 int main () {
26685   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
26686      imitates locale dependent behaviour by looking at the environment
26687      variables, and all locales use the UTF-8 encoding.  */
26688 #if !(defined __BEOS__ || defined __HAIKU__)
26689   /* Check whether the given locale name is recognized by the system.  */
26690 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
26691   /* On native Windows, setlocale(category, "") looks at the system settings,
26692      not at the environment variables.  Also, when an encoding suffix such
26693      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
26694      category of the locale to "C".  */
26695   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
26696       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
26697     return 1;
26698 # else
26699   if (setlocale (LC_ALL, "") == NULL) return 1;
26700 # endif
26701   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
26702      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
26703      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
26704      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
26705      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
26706      some unit tests fail.  */
26707 # if HAVE_LANGINFO_CODESET
26708   {
26709     const char *cs = nl_langinfo (CODESET);
26710     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
26711       return 1;
26712   }
26713 # endif
26714 # ifdef __CYGWIN__
26715   /* On Cygwin, avoid locale names without encoding suffix, because the
26716      locale_charset() function relies on the encoding suffix.  Note that
26717      LC_ALL is set on the command line.  */
26718   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
26719 # endif
26720   /* Check whether in the abbreviation of the second month, the second
26721      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
26722      two bytes long, with UTF-8 encoding.  */
26723   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
26724   if (strftime (buf, sizeof (buf), "%b", &t) < 4
26725       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
26726     return 1;
26727 #endif
26728 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
26729   /* Check whether the decimal separator is a comma.
26730      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
26731      are nl_langinfo(RADIXCHAR) are both ".".  */
26732   if (localeconv () ->decimal_point[0] != ',') return 1;
26733 #endif
26734   return 0;
26735 }
26736
26737 _ACEOF
26738     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
26739   (eval $ac_link) 2>&5
26740   ac_status=$?
26741   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26742   test $ac_status = 0; } && test -s conftest$ac_exeext; then
26743       case "$host_os" in
26744         # Handle native Windows specially, because there setlocale() interprets
26745         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
26746         # "fr" or "fra" as "French" or "French_France.1252",
26747         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
26748         # "ja" as "Japanese" or "Japanese_Japan.932",
26749         # and similar.
26750         mingw*)
26751           # Test for the hypothetical native Windows locale name.
26752           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26753             gt_cv_locale_fr_utf8=French_France.65001
26754           else
26755             # None found.
26756             gt_cv_locale_fr_utf8=none
26757           fi
26758           ;;
26759         *)
26760           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
26761           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
26762           # configure script would override the LC_ALL setting. Likewise for
26763           # LC_CTYPE, which is also set at the beginning of the configure script.
26764           # Test for the usual locale name.
26765           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26766             gt_cv_locale_fr_utf8=fr_FR
26767           else
26768             # Test for the locale name with explicit encoding suffix.
26769             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26770               gt_cv_locale_fr_utf8=fr_FR.UTF-8
26771             else
26772               # Test for the Solaris 7 locale name.
26773               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26774                 gt_cv_locale_fr_utf8=fr.UTF-8
26775               else
26776                 # None found.
26777                 gt_cv_locale_fr_utf8=none
26778               fi
26779             fi
26780           fi
26781           ;;
26782       esac
26783     fi
26784     rm -fr conftest*
26785
26786 fi
26787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
26788 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
26789   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
26790
26791
26792
26793
26794
26795   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
26796 printf %s "checking for a traditional french locale... " >&6; }
26797 if ${gt_cv_locale_fr+:} false; then :
26798   printf %s "(cached) " >&6
26799 else
26800
26801     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26802 /* end confdefs.h.  */
26803
26804 #include <locale.h>
26805 #include <time.h>
26806 #if HAVE_LANGINFO_CODESET
26807 # include <langinfo.h>
26808 #endif
26809 #include <stdlib.h>
26810 #include <string.h>
26811 struct tm t;
26812 char buf[16];
26813 int main () {
26814   /* Check whether the given locale name is recognized by the system.  */
26815 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
26816   /* On native Windows, setlocale(category, "") looks at the system settings,
26817      not at the environment variables.  Also, when an encoding suffix such
26818      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
26819      category of the locale to "C".  */
26820   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
26821       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
26822     return 1;
26823 #else
26824   if (setlocale (LC_ALL, "") == NULL) return 1;
26825 #endif
26826   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
26827      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
26828      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
26829      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
26830      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
26831      some unit tests fail.
26832      On MirBSD 10, when an unsupported locale is specified, setlocale()
26833      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
26834 #if HAVE_LANGINFO_CODESET
26835   {
26836     const char *cs = nl_langinfo (CODESET);
26837     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
26838         || strcmp (cs, "UTF-8") == 0)
26839       return 1;
26840   }
26841 #endif
26842 #ifdef __CYGWIN__
26843   /* On Cygwin, avoid locale names without encoding suffix, because the
26844      locale_charset() function relies on the encoding suffix.  Note that
26845      LC_ALL is set on the command line.  */
26846   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
26847 #endif
26848   /* Check whether in the abbreviation of the second month, the second
26849      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
26850      one byte long. This excludes the UTF-8 encoding.  */
26851   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
26852   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
26853 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
26854   /* Check whether the decimal separator is a comma.
26855      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
26856      are nl_langinfo(RADIXCHAR) are both ".".  */
26857   if (localeconv () ->decimal_point[0] != ',') return 1;
26858 #endif
26859   return 0;
26860 }
26861
26862 _ACEOF
26863     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
26864   (eval $ac_link) 2>&5
26865   ac_status=$?
26866   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26867   test $ac_status = 0; } && test -s conftest$ac_exeext; then
26868       case "$host_os" in
26869         # Handle native Windows specially, because there setlocale() interprets
26870         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
26871         # "fr" or "fra" as "French" or "French_France.1252",
26872         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
26873         # "ja" as "Japanese" or "Japanese_Japan.932",
26874         # and similar.
26875         mingw*)
26876           # Test for the native Windows locale name.
26877           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26878             gt_cv_locale_fr=French_France.1252
26879           else
26880             # None found.
26881             gt_cv_locale_fr=none
26882           fi
26883           ;;
26884         *)
26885           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
26886           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
26887           # configure script would override the LC_ALL setting. Likewise for
26888           # LC_CTYPE, which is also set at the beginning of the configure script.
26889           # Test for the usual locale name.
26890           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26891             gt_cv_locale_fr=fr_FR
26892           else
26893             # Test for the locale name with explicit encoding suffix.
26894             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26895               gt_cv_locale_fr=fr_FR.ISO-8859-1
26896             else
26897               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
26898               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26899                 gt_cv_locale_fr=fr_FR.ISO8859-1
26900               else
26901                 # Test for the HP-UX locale name.
26902                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26903                   gt_cv_locale_fr=fr_FR.iso88591
26904                 else
26905                   # Test for the Solaris 7 locale name.
26906                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
26907                     gt_cv_locale_fr=fr
26908                   else
26909                     # None found.
26910                     gt_cv_locale_fr=none
26911                   fi
26912                 fi
26913               fi
26914             fi
26915           fi
26916           ;;
26917       esac
26918     fi
26919     rm -fr conftest*
26920
26921 fi
26922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
26923 printf "%s\n" "$gt_cv_locale_fr" >&6; }
26924   LOCALE_FR=$gt_cv_locale_fr
26925
26926
26927
26928
26929
26930   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
26931 printf %s "checking for a turkish Unicode locale... " >&6; }
26932 if ${gt_cv_locale_tr_utf8+:} false; then :
26933   printf %s "(cached) " >&6
26934 else
26935
26936     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26937 /* end confdefs.h.  */
26938
26939 #include <locale.h>
26940 #include <time.h>
26941 #if HAVE_LANGINFO_CODESET
26942 # include <langinfo.h>
26943 #endif
26944 #include <stdlib.h>
26945 #include <string.h>
26946 struct tm t;
26947 char buf[16];
26948 int main () {
26949   /* On BeOS, locales are not implemented in libc.  Rather, libintl
26950      imitates locale dependent behaviour by looking at the environment
26951      variables, and all locales use the UTF-8 encoding.  But BeOS does not
26952      implement the Turkish upper-/lowercase mappings.  Therefore, let this
26953      program return 1 on BeOS.  */
26954   /* Check whether the given locale name is recognized by the system.  */
26955 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
26956   /* On native Windows, setlocale(category, "") looks at the system settings,
26957      not at the environment variables.  Also, when an encoding suffix such
26958      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
26959      category of the locale to "C".  */
26960   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
26961       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
26962     return 1;
26963 #else
26964   if (setlocale (LC_ALL, "") == NULL) return 1;
26965 #endif
26966   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
26967      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
26968      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
26969      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
26970      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
26971      some unit tests fail.  */
26972 #if HAVE_LANGINFO_CODESET
26973   {
26974     const char *cs = nl_langinfo (CODESET);
26975     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
26976       return 1;
26977   }
26978 #endif
26979 #ifdef __CYGWIN__
26980   /* On Cygwin, avoid locale names without encoding suffix, because the
26981      locale_charset() function relies on the encoding suffix.  Note that
26982      LC_ALL is set on the command line.  */
26983   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
26984 #endif
26985   /* Check whether in the abbreviation of the eighth month, the second
26986      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
26987      two bytes long, with UTF-8 encoding.  */
26988   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
26989   if (strftime (buf, sizeof (buf), "%b", &t) < 4
26990       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
26991     return 1;
26992   /* Check whether the upper-/lowercase mappings are as expected for
26993      Turkish.  */
26994   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
26995       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
26996     return 1;
26997   return 0;
26998 }
26999
27000 _ACEOF
27001     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27002   (eval $ac_link) 2>&5
27003   ac_status=$?
27004   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27005   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27006       case "$host_os" in
27007         # Handle native Windows specially, because there setlocale() interprets
27008         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27009         # "fr" or "fra" as "French" or "French_France.1252",
27010         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27011         # "ja" as "Japanese" or "Japanese_Japan.932",
27012         # and similar.
27013         mingw*)
27014           # Test for the hypothetical native Windows locale name.
27015           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27016             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
27017           else
27018             # None found.
27019             gt_cv_locale_tr_utf8=none
27020           fi
27021           ;;
27022         *)
27023           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27024           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27025           # configure script would override the LC_ALL setting. Likewise for
27026           # LC_CTYPE, which is also set at the beginning of the configure script.
27027           # Test for the usual locale name.
27028           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27029             gt_cv_locale_tr_utf8=tr_TR
27030           else
27031             # Test for the locale name with explicit encoding suffix.
27032             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27033               gt_cv_locale_tr_utf8=tr_TR.UTF-8
27034             else
27035               # Test for the Solaris 7 locale name.
27036               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27037                 gt_cv_locale_tr_utf8=tr.UTF-8
27038               else
27039                 # None found.
27040                 gt_cv_locale_tr_utf8=none
27041               fi
27042             fi
27043           fi
27044           ;;
27045       esac
27046     else
27047       gt_cv_locale_tr_utf8=none
27048     fi
27049     rm -fr conftest*
27050
27051 fi
27052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
27053 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
27054   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
27055
27056
27057
27058
27059
27060
27061
27062
27063     if test "$GNULIB_ENVIRON" != 1; then
27064         if test "$GNULIB_ENVIRON" = 0; then
27065       GNULIB_ENVIRON=$gl_module_indicator_condition
27066     else
27067       GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)"
27068     fi
27069   fi
27070
27071
27072
27073
27074
27075 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
27076
27077
27078
27079
27080
27081
27082   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27083     REPLACE_FDOPEN=1
27084   else
27085         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
27086 printf %s "checking whether fdopen sets errno... " >&6; }
27087 if ${gl_cv_func_fdopen_works+:} false; then :
27088   printf %s "(cached) " >&6
27089 else
27090
27091         if test "$cross_compiling" = yes; then :
27092   case "$host_os" in
27093              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
27094              *)      gl_cv_func_fdopen_works="guessing yes" ;;
27095            esac
27096
27097 else
27098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27099 /* end confdefs.h.  */
27100
27101 #include <stdio.h>
27102 #include <errno.h>
27103 int
27104 main (void)
27105 {
27106   FILE *fp;
27107   errno = 0;
27108   fp = fdopen (-1, "r");
27109   if (fp == NULL && errno == 0)
27110     return 1;
27111   return 0;
27112 }
27113 _ACEOF
27114 if ac_fn_c_try_run "$LINENO"; then :
27115   gl_cv_func_fdopen_works=yes
27116 else
27117   gl_cv_func_fdopen_works=no
27118 fi
27119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27120   conftest.$ac_objext conftest.beam conftest.$ac_ext
27121 fi
27122
27123
27124 fi
27125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
27126 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
27127     case "$gl_cv_func_fdopen_works" in
27128       *no) REPLACE_FDOPEN=1 ;;
27129     esac
27130   fi
27131
27132   if test $REPLACE_FDOPEN = 1; then
27133
27134
27135
27136
27137
27138
27139
27140
27141   gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
27142
27143
27144   fi
27145
27146
27147
27148
27149
27150     if test "$GNULIB_FDOPEN" != 1; then
27151         if test "$GNULIB_FDOPEN" = 0; then
27152       GNULIB_FDOPEN=$gl_module_indicator_condition
27153     else
27154       GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
27155     fi
27156   fi
27157
27158
27159
27160
27161
27162 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
27163
27164
27165
27166
27167
27168
27169
27170
27171   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
27172   *yes,yes) ;;
27173   *)
27174         REPLACE_GETCWD=1
27175     ;;
27176   esac
27177
27178   if test $REPLACE_GETCWD = 1; then
27179
27180
27181
27182
27183
27184
27185
27186
27187   gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
27188
27189   fi
27190
27191
27192
27193
27194
27195     if test "$GNULIB_GETCWD" != 1; then
27196         if test "$GNULIB_GETCWD" = 0; then
27197       GNULIB_GETCWD=$gl_module_indicator_condition
27198     else
27199       GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
27200     fi
27201   fi
27202
27203
27204
27205
27206
27207 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
27208
27209
27210
27211
27212
27213
27214   for ac_func in getpagesize
27215 do :
27216   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
27217 if test "x$ac_cv_func_getpagesize" = xyes; then :
27218   cat >>confdefs.h <<_ACEOF
27219 #define HAVE_GETPAGESIZE 1
27220 _ACEOF
27221
27222 fi
27223 done
27224
27225   if test $ac_cv_func_getpagesize = no; then
27226     HAVE_GETPAGESIZE=0
27227     for ac_header in OS.h
27228 do :
27229   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
27230 if test "x$ac_cv_header_OS_h" = xyes; then :
27231   cat >>confdefs.h <<_ACEOF
27232 #define HAVE_OS_H 1
27233 _ACEOF
27234
27235 fi
27236
27237 done
27238
27239     if test $ac_cv_header_OS_h = yes; then
27240       HAVE_OS_H=1
27241     fi
27242     for ac_header in sys/param.h
27243 do :
27244   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
27245 if test "x$ac_cv_header_sys_param_h" = xyes; then :
27246   cat >>confdefs.h <<_ACEOF
27247 #define HAVE_SYS_PARAM_H 1
27248 _ACEOF
27249
27250 fi
27251
27252 done
27253
27254     if test $ac_cv_header_sys_param_h = yes; then
27255       HAVE_SYS_PARAM_H=1
27256     fi
27257   fi
27258   case "$host_os" in
27259     mingw*)
27260       REPLACE_GETPAGESIZE=1
27261       ;;
27262   esac
27263       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
27264 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
27265
27266 else
27267   HAVE_DECL_GETPAGESIZE=0
27268 fi
27269
27270
27271   if test $REPLACE_GETPAGESIZE = 1; then
27272
27273
27274
27275
27276
27277
27278
27279
27280   gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
27281
27282   fi
27283
27284
27285
27286
27287
27288     if test "$GNULIB_GETPAGESIZE" != 1; then
27289         if test "$GNULIB_GETPAGESIZE" = 0; then
27290       GNULIB_GETPAGESIZE=$gl_module_indicator_condition
27291     else
27292       GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
27293     fi
27294   fi
27295
27296
27297
27298
27299
27300 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
27301
27302
27303
27304
27305
27306
27307
27308   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
27309 printf %s "checking for a traditional french locale... " >&6; }
27310 if ${gt_cv_locale_fr+:} false; then :
27311   printf %s "(cached) " >&6
27312 else
27313
27314     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27315 /* end confdefs.h.  */
27316
27317 #include <locale.h>
27318 #include <time.h>
27319 #if HAVE_LANGINFO_CODESET
27320 # include <langinfo.h>
27321 #endif
27322 #include <stdlib.h>
27323 #include <string.h>
27324 struct tm t;
27325 char buf[16];
27326 int main () {
27327   /* Check whether the given locale name is recognized by the system.  */
27328 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27329   /* On native Windows, setlocale(category, "") looks at the system settings,
27330      not at the environment variables.  Also, when an encoding suffix such
27331      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
27332      category of the locale to "C".  */
27333   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
27334       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
27335     return 1;
27336 #else
27337   if (setlocale (LC_ALL, "") == NULL) return 1;
27338 #endif
27339   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
27340      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
27341      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
27342      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
27343      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
27344      some unit tests fail.
27345      On MirBSD 10, when an unsupported locale is specified, setlocale()
27346      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
27347 #if HAVE_LANGINFO_CODESET
27348   {
27349     const char *cs = nl_langinfo (CODESET);
27350     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
27351         || strcmp (cs, "UTF-8") == 0)
27352       return 1;
27353   }
27354 #endif
27355 #ifdef __CYGWIN__
27356   /* On Cygwin, avoid locale names without encoding suffix, because the
27357      locale_charset() function relies on the encoding suffix.  Note that
27358      LC_ALL is set on the command line.  */
27359   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
27360 #endif
27361   /* Check whether in the abbreviation of the second month, the second
27362      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
27363      one byte long. This excludes the UTF-8 encoding.  */
27364   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
27365   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
27366 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
27367   /* Check whether the decimal separator is a comma.
27368      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
27369      are nl_langinfo(RADIXCHAR) are both ".".  */
27370   if (localeconv () ->decimal_point[0] != ',') return 1;
27371 #endif
27372   return 0;
27373 }
27374
27375 _ACEOF
27376     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27377   (eval $ac_link) 2>&5
27378   ac_status=$?
27379   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27380   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27381       case "$host_os" in
27382         # Handle native Windows specially, because there setlocale() interprets
27383         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27384         # "fr" or "fra" as "French" or "French_France.1252",
27385         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27386         # "ja" as "Japanese" or "Japanese_Japan.932",
27387         # and similar.
27388         mingw*)
27389           # Test for the native Windows locale name.
27390           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27391             gt_cv_locale_fr=French_France.1252
27392           else
27393             # None found.
27394             gt_cv_locale_fr=none
27395           fi
27396           ;;
27397         *)
27398           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27399           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27400           # configure script would override the LC_ALL setting. Likewise for
27401           # LC_CTYPE, which is also set at the beginning of the configure script.
27402           # Test for the usual locale name.
27403           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27404             gt_cv_locale_fr=fr_FR
27405           else
27406             # Test for the locale name with explicit encoding suffix.
27407             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27408               gt_cv_locale_fr=fr_FR.ISO-8859-1
27409             else
27410               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
27411               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27412                 gt_cv_locale_fr=fr_FR.ISO8859-1
27413               else
27414                 # Test for the HP-UX locale name.
27415                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27416                   gt_cv_locale_fr=fr_FR.iso88591
27417                 else
27418                   # Test for the Solaris 7 locale name.
27419                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27420                     gt_cv_locale_fr=fr
27421                   else
27422                     # None found.
27423                     gt_cv_locale_fr=none
27424                   fi
27425                 fi
27426               fi
27427             fi
27428           fi
27429           ;;
27430       esac
27431     fi
27432     rm -fr conftest*
27433
27434 fi
27435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
27436 printf "%s\n" "$gt_cv_locale_fr" >&6; }
27437   LOCALE_FR=$gt_cv_locale_fr
27438
27439
27440
27441
27442   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
27443 printf %s "checking for a french Unicode locale... " >&6; }
27444 if ${gt_cv_locale_fr_utf8+:} false; then :
27445   printf %s "(cached) " >&6
27446 else
27447
27448     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27449 /* end confdefs.h.  */
27450
27451 #include <locale.h>
27452 #include <time.h>
27453 #if HAVE_LANGINFO_CODESET
27454 # include <langinfo.h>
27455 #endif
27456 #include <stdlib.h>
27457 #include <string.h>
27458 struct tm t;
27459 char buf[16];
27460 int main () {
27461   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
27462      imitates locale dependent behaviour by looking at the environment
27463      variables, and all locales use the UTF-8 encoding.  */
27464 #if !(defined __BEOS__ || defined __HAIKU__)
27465   /* Check whether the given locale name is recognized by the system.  */
27466 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27467   /* On native Windows, setlocale(category, "") looks at the system settings,
27468      not at the environment variables.  Also, when an encoding suffix such
27469      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
27470      category of the locale to "C".  */
27471   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
27472       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
27473     return 1;
27474 # else
27475   if (setlocale (LC_ALL, "") == NULL) return 1;
27476 # endif
27477   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
27478      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
27479      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
27480      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
27481      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
27482      some unit tests fail.  */
27483 # if HAVE_LANGINFO_CODESET
27484   {
27485     const char *cs = nl_langinfo (CODESET);
27486     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
27487       return 1;
27488   }
27489 # endif
27490 # ifdef __CYGWIN__
27491   /* On Cygwin, avoid locale names without encoding suffix, because the
27492      locale_charset() function relies on the encoding suffix.  Note that
27493      LC_ALL is set on the command line.  */
27494   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
27495 # endif
27496   /* Check whether in the abbreviation of the second month, the second
27497      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
27498      two bytes long, with UTF-8 encoding.  */
27499   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
27500   if (strftime (buf, sizeof (buf), "%b", &t) < 4
27501       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
27502     return 1;
27503 #endif
27504 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
27505   /* Check whether the decimal separator is a comma.
27506      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
27507      are nl_langinfo(RADIXCHAR) are both ".".  */
27508   if (localeconv () ->decimal_point[0] != ',') return 1;
27509 #endif
27510   return 0;
27511 }
27512
27513 _ACEOF
27514     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27515   (eval $ac_link) 2>&5
27516   ac_status=$?
27517   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27518   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27519       case "$host_os" in
27520         # Handle native Windows specially, because there setlocale() interprets
27521         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27522         # "fr" or "fra" as "French" or "French_France.1252",
27523         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27524         # "ja" as "Japanese" or "Japanese_Japan.932",
27525         # and similar.
27526         mingw*)
27527           # Test for the hypothetical native Windows locale name.
27528           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27529             gt_cv_locale_fr_utf8=French_France.65001
27530           else
27531             # None found.
27532             gt_cv_locale_fr_utf8=none
27533           fi
27534           ;;
27535         *)
27536           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27537           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27538           # configure script would override the LC_ALL setting. Likewise for
27539           # LC_CTYPE, which is also set at the beginning of the configure script.
27540           # Test for the usual locale name.
27541           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27542             gt_cv_locale_fr_utf8=fr_FR
27543           else
27544             # Test for the locale name with explicit encoding suffix.
27545             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27546               gt_cv_locale_fr_utf8=fr_FR.UTF-8
27547             else
27548               # Test for the Solaris 7 locale name.
27549               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27550                 gt_cv_locale_fr_utf8=fr.UTF-8
27551               else
27552                 # None found.
27553                 gt_cv_locale_fr_utf8=none
27554               fi
27555             fi
27556           fi
27557           ;;
27558       esac
27559     fi
27560     rm -fr conftest*
27561
27562 fi
27563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
27564 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
27565   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
27566
27567
27568
27569
27570
27571   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
27572 printf %s "checking for a traditional japanese locale... " >&6; }
27573 if ${gt_cv_locale_ja+:} false; then :
27574   printf %s "(cached) " >&6
27575 else
27576
27577     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27578 /* end confdefs.h.  */
27579
27580 #include <locale.h>
27581 #include <time.h>
27582 #if HAVE_LANGINFO_CODESET
27583 # include <langinfo.h>
27584 #endif
27585 #include <stdlib.h>
27586 #include <string.h>
27587 struct tm t;
27588 char buf[16];
27589 int main ()
27590 {
27591   const char *p;
27592   /* Check whether the given locale name is recognized by the system.  */
27593 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27594   /* On native Windows, setlocale(category, "") looks at the system settings,
27595      not at the environment variables.  Also, when an encoding suffix such
27596      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
27597      category of the locale to "C".  */
27598   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
27599       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
27600     return 1;
27601 #else
27602   if (setlocale (LC_ALL, "") == NULL) return 1;
27603 #endif
27604   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
27605      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
27606      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
27607      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
27608      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
27609      some unit tests fail.
27610      On MirBSD 10, when an unsupported locale is specified, setlocale()
27611      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
27612 #if HAVE_LANGINFO_CODESET
27613   {
27614     const char *cs = nl_langinfo (CODESET);
27615     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
27616         || strcmp (cs, "UTF-8") == 0)
27617       return 1;
27618   }
27619 #endif
27620 #ifdef __CYGWIN__
27621   /* On Cygwin, avoid locale names without encoding suffix, because the
27622      locale_charset() function relies on the encoding suffix.  Note that
27623      LC_ALL is set on the command line.  */
27624   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
27625 #endif
27626   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
27627      on Cygwin 1.5.x.  */
27628   if (MB_CUR_MAX == 1)
27629     return 1;
27630   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
27631      This excludes the UTF-8 encoding (except on MirBSD).  */
27632   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
27633   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
27634   for (p = buf; *p != '\0'; p++)
27635     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
27636       return 1;
27637   return 0;
27638 }
27639
27640 _ACEOF
27641     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27642   (eval $ac_link) 2>&5
27643   ac_status=$?
27644   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27645   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27646       case "$host_os" in
27647         # Handle native Windows specially, because there setlocale() interprets
27648         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27649         # "fr" or "fra" as "French" or "French_France.1252",
27650         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27651         # "ja" as "Japanese" or "Japanese_Japan.932",
27652         # and similar.
27653         mingw*)
27654           # Note that on native Windows, the Japanese locale is
27655           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
27656           # cannot use it here.
27657           gt_cv_locale_ja=none
27658           ;;
27659         *)
27660           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27661           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27662           # configure script would override the LC_ALL setting. Likewise for
27663           # LC_CTYPE, which is also set at the beginning of the configure script.
27664           # Test for the AIX locale name.
27665           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27666             gt_cv_locale_ja=ja_JP
27667           else
27668             # Test for the locale name with explicit encoding suffix.
27669             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27670               gt_cv_locale_ja=ja_JP.EUC-JP
27671             else
27672               # Test for the HP-UX, OSF/1, NetBSD locale name.
27673               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27674                 gt_cv_locale_ja=ja_JP.eucJP
27675               else
27676                 # Test for the IRIX, FreeBSD locale name.
27677                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27678                   gt_cv_locale_ja=ja_JP.EUC
27679                 else
27680                   # Test for the Solaris 7 locale name.
27681                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27682                     gt_cv_locale_ja=ja
27683                   else
27684                     # Special test for NetBSD 1.6.
27685                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
27686                       gt_cv_locale_ja=ja_JP.eucJP
27687                     else
27688                       # None found.
27689                       gt_cv_locale_ja=none
27690                     fi
27691                   fi
27692                 fi
27693               fi
27694             fi
27695           fi
27696           ;;
27697       esac
27698     fi
27699     rm -fr conftest*
27700
27701 fi
27702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
27703 printf "%s\n" "$gt_cv_locale_ja" >&6; }
27704   LOCALE_JA=$gt_cv_locale_ja
27705
27706
27707
27708
27709
27710   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
27711 printf %s "checking for a transitional chinese locale... " >&6; }
27712 if ${gt_cv_locale_zh_CN+:} false; then :
27713   printf %s "(cached) " >&6
27714 else
27715
27716     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27717 /* end confdefs.h.  */
27718
27719 #include <locale.h>
27720 #include <stdlib.h>
27721 #include <time.h>
27722 #if HAVE_LANGINFO_CODESET
27723 # include <langinfo.h>
27724 #endif
27725 #include <stdlib.h>
27726 #include <string.h>
27727 struct tm t;
27728 char buf[16];
27729 int main ()
27730 {
27731   const char *p;
27732   /* Check whether the given locale name is recognized by the system.  */
27733 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27734   /* On native Windows, setlocale(category, "") looks at the system settings,
27735      not at the environment variables.  Also, when an encoding suffix such
27736      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
27737      category of the locale to "C".  */
27738   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
27739       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
27740     return 1;
27741 #else
27742   if (setlocale (LC_ALL, "") == NULL) return 1;
27743 #endif
27744   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
27745      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
27746      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
27747      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
27748      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
27749      some unit tests fail.
27750      On MirBSD 10, when an unsupported locale is specified, setlocale()
27751      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
27752 #if HAVE_LANGINFO_CODESET
27753   {
27754     const char *cs = nl_langinfo (CODESET);
27755     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
27756         || strcmp (cs, "UTF-8") == 0)
27757       return 1;
27758   }
27759 #endif
27760 #ifdef __CYGWIN__
27761   /* On Cygwin, avoid locale names without encoding suffix, because the
27762      locale_charset() function relies on the encoding suffix.  Note that
27763      LC_ALL is set on the command line.  */
27764   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
27765 #endif
27766   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
27767      This excludes the UTF-8 encoding (except on MirBSD).  */
27768   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
27769   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
27770   for (p = buf; *p != '\0'; p++)
27771     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
27772       return 1;
27773   /* Check whether a typical GB18030 multibyte sequence is recognized as a
27774      single wide character.  This excludes the GB2312 and GBK encodings.  */
27775   if (mblen ("\203\062\332\066", 5) != 4)
27776     return 1;
27777   return 0;
27778 }
27779
27780 _ACEOF
27781     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27782   (eval $ac_link) 2>&5
27783   ac_status=$?
27784   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27785   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27786       case "$host_os" in
27787         # Handle native Windows specially, because there setlocale() interprets
27788         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27789         # "fr" or "fra" as "French" or "French_France.1252",
27790         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27791         # "ja" as "Japanese" or "Japanese_Japan.932",
27792         # and similar.
27793         mingw*)
27794           # Test for the hypothetical native Windows locale name.
27795           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27796             gt_cv_locale_zh_CN=Chinese_China.54936
27797           else
27798             # None found.
27799             gt_cv_locale_zh_CN=none
27800           fi
27801           ;;
27802         solaris2.8)
27803           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
27804           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
27805           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
27806           gt_cv_locale_zh_CN=none
27807           ;;
27808         *)
27809           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27810           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27811           # configure script would override the LC_ALL setting. Likewise for
27812           # LC_CTYPE, which is also set at the beginning of the configure script.
27813           # Test for the locale name without encoding suffix.
27814           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27815             gt_cv_locale_zh_CN=zh_CN
27816           else
27817             # Test for the locale name with explicit encoding suffix.
27818             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27819               gt_cv_locale_zh_CN=zh_CN.GB18030
27820             else
27821               # None found.
27822               gt_cv_locale_zh_CN=none
27823             fi
27824           fi
27825           ;;
27826       esac
27827     else
27828       # If there was a link error, due to mblen(), the system is so old that
27829       # it certainly doesn't have a chinese locale.
27830       gt_cv_locale_zh_CN=none
27831     fi
27832     rm -fr conftest*
27833
27834 fi
27835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
27836 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
27837   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
27838
27839
27840
27841
27842
27843   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
27844 printf %s "checking for a turkish Unicode locale... " >&6; }
27845 if ${gt_cv_locale_tr_utf8+:} false; then :
27846   printf %s "(cached) " >&6
27847 else
27848
27849     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27850 /* end confdefs.h.  */
27851
27852 #include <locale.h>
27853 #include <time.h>
27854 #if HAVE_LANGINFO_CODESET
27855 # include <langinfo.h>
27856 #endif
27857 #include <stdlib.h>
27858 #include <string.h>
27859 struct tm t;
27860 char buf[16];
27861 int main () {
27862   /* On BeOS, locales are not implemented in libc.  Rather, libintl
27863      imitates locale dependent behaviour by looking at the environment
27864      variables, and all locales use the UTF-8 encoding.  But BeOS does not
27865      implement the Turkish upper-/lowercase mappings.  Therefore, let this
27866      program return 1 on BeOS.  */
27867   /* Check whether the given locale name is recognized by the system.  */
27868 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27869   /* On native Windows, setlocale(category, "") looks at the system settings,
27870      not at the environment variables.  Also, when an encoding suffix such
27871      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
27872      category of the locale to "C".  */
27873   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
27874       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
27875     return 1;
27876 #else
27877   if (setlocale (LC_ALL, "") == NULL) return 1;
27878 #endif
27879   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
27880      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
27881      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
27882      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
27883      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
27884      some unit tests fail.  */
27885 #if HAVE_LANGINFO_CODESET
27886   {
27887     const char *cs = nl_langinfo (CODESET);
27888     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
27889       return 1;
27890   }
27891 #endif
27892 #ifdef __CYGWIN__
27893   /* On Cygwin, avoid locale names without encoding suffix, because the
27894      locale_charset() function relies on the encoding suffix.  Note that
27895      LC_ALL is set on the command line.  */
27896   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
27897 #endif
27898   /* Check whether in the abbreviation of the eighth month, the second
27899      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
27900      two bytes long, with UTF-8 encoding.  */
27901   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
27902   if (strftime (buf, sizeof (buf), "%b", &t) < 4
27903       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
27904     return 1;
27905   /* Check whether the upper-/lowercase mappings are as expected for
27906      Turkish.  */
27907   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
27908       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
27909     return 1;
27910   return 0;
27911 }
27912
27913 _ACEOF
27914     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
27915   (eval $ac_link) 2>&5
27916   ac_status=$?
27917   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27918   test $ac_status = 0; } && test -s conftest$ac_exeext; then
27919       case "$host_os" in
27920         # Handle native Windows specially, because there setlocale() interprets
27921         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
27922         # "fr" or "fra" as "French" or "French_France.1252",
27923         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
27924         # "ja" as "Japanese" or "Japanese_Japan.932",
27925         # and similar.
27926         mingw*)
27927           # Test for the hypothetical native Windows locale name.
27928           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27929             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
27930           else
27931             # None found.
27932             gt_cv_locale_tr_utf8=none
27933           fi
27934           ;;
27935         *)
27936           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
27937           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
27938           # configure script would override the LC_ALL setting. Likewise for
27939           # LC_CTYPE, which is also set at the beginning of the configure script.
27940           # Test for the usual locale name.
27941           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27942             gt_cv_locale_tr_utf8=tr_TR
27943           else
27944             # Test for the locale name with explicit encoding suffix.
27945             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27946               gt_cv_locale_tr_utf8=tr_TR.UTF-8
27947             else
27948               # Test for the Solaris 7 locale name.
27949               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
27950                 gt_cv_locale_tr_utf8=tr.UTF-8
27951               else
27952                 # None found.
27953                 gt_cv_locale_tr_utf8=none
27954               fi
27955             fi
27956           fi
27957           ;;
27958       esac
27959     else
27960       gt_cv_locale_tr_utf8=none
27961     fi
27962     rm -fr conftest*
27963
27964 fi
27965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
27966 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
27967   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
27968
27969
27970
27971
27972   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
27973 printf %s "checking for a french Unicode locale... " >&6; }
27974 if ${gt_cv_locale_fr_utf8+:} false; then :
27975   printf %s "(cached) " >&6
27976 else
27977
27978     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27979 /* end confdefs.h.  */
27980
27981 #include <locale.h>
27982 #include <time.h>
27983 #if HAVE_LANGINFO_CODESET
27984 # include <langinfo.h>
27985 #endif
27986 #include <stdlib.h>
27987 #include <string.h>
27988 struct tm t;
27989 char buf[16];
27990 int main () {
27991   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
27992      imitates locale dependent behaviour by looking at the environment
27993      variables, and all locales use the UTF-8 encoding.  */
27994 #if !(defined __BEOS__ || defined __HAIKU__)
27995   /* Check whether the given locale name is recognized by the system.  */
27996 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
27997   /* On native Windows, setlocale(category, "") looks at the system settings,
27998      not at the environment variables.  Also, when an encoding suffix such
27999      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28000      category of the locale to "C".  */
28001   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28002       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28003     return 1;
28004 # else
28005   if (setlocale (LC_ALL, "") == NULL) return 1;
28006 # endif
28007   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28008      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28009      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28010      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28011      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28012      some unit tests fail.  */
28013 # if HAVE_LANGINFO_CODESET
28014   {
28015     const char *cs = nl_langinfo (CODESET);
28016     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
28017       return 1;
28018   }
28019 # endif
28020 # ifdef __CYGWIN__
28021   /* On Cygwin, avoid locale names without encoding suffix, because the
28022      locale_charset() function relies on the encoding suffix.  Note that
28023      LC_ALL is set on the command line.  */
28024   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28025 # endif
28026   /* Check whether in the abbreviation of the second month, the second
28027      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
28028      two bytes long, with UTF-8 encoding.  */
28029   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28030   if (strftime (buf, sizeof (buf), "%b", &t) < 4
28031       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
28032     return 1;
28033 #endif
28034 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
28035   /* Check whether the decimal separator is a comma.
28036      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
28037      are nl_langinfo(RADIXCHAR) are both ".".  */
28038   if (localeconv () ->decimal_point[0] != ',') return 1;
28039 #endif
28040   return 0;
28041 }
28042
28043 _ACEOF
28044     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28045   (eval $ac_link) 2>&5
28046   ac_status=$?
28047   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28048   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28049       case "$host_os" in
28050         # Handle native Windows specially, because there setlocale() interprets
28051         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28052         # "fr" or "fra" as "French" or "French_France.1252",
28053         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28054         # "ja" as "Japanese" or "Japanese_Japan.932",
28055         # and similar.
28056         mingw*)
28057           # Test for the hypothetical native Windows locale name.
28058           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28059             gt_cv_locale_fr_utf8=French_France.65001
28060           else
28061             # None found.
28062             gt_cv_locale_fr_utf8=none
28063           fi
28064           ;;
28065         *)
28066           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28067           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28068           # configure script would override the LC_ALL setting. Likewise for
28069           # LC_CTYPE, which is also set at the beginning of the configure script.
28070           # Test for the usual locale name.
28071           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28072             gt_cv_locale_fr_utf8=fr_FR
28073           else
28074             # Test for the locale name with explicit encoding suffix.
28075             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28076               gt_cv_locale_fr_utf8=fr_FR.UTF-8
28077             else
28078               # Test for the Solaris 7 locale name.
28079               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28080                 gt_cv_locale_fr_utf8=fr.UTF-8
28081               else
28082                 # None found.
28083                 gt_cv_locale_fr_utf8=none
28084               fi
28085             fi
28086           fi
28087           ;;
28088       esac
28089     fi
28090     rm -fr conftest*
28091
28092 fi
28093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
28094 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
28095   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
28096
28097
28098
28099
28100
28101   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
28102 printf %s "checking for a traditional french locale... " >&6; }
28103 if ${gt_cv_locale_fr+:} false; then :
28104   printf %s "(cached) " >&6
28105 else
28106
28107     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28108 /* end confdefs.h.  */
28109
28110 #include <locale.h>
28111 #include <time.h>
28112 #if HAVE_LANGINFO_CODESET
28113 # include <langinfo.h>
28114 #endif
28115 #include <stdlib.h>
28116 #include <string.h>
28117 struct tm t;
28118 char buf[16];
28119 int main () {
28120   /* Check whether the given locale name is recognized by the system.  */
28121 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28122   /* On native Windows, setlocale(category, "") looks at the system settings,
28123      not at the environment variables.  Also, when an encoding suffix such
28124      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28125      category of the locale to "C".  */
28126   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28127       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28128     return 1;
28129 #else
28130   if (setlocale (LC_ALL, "") == NULL) return 1;
28131 #endif
28132   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28133      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28134      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28135      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28136      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28137      some unit tests fail.
28138      On MirBSD 10, when an unsupported locale is specified, setlocale()
28139      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
28140 #if HAVE_LANGINFO_CODESET
28141   {
28142     const char *cs = nl_langinfo (CODESET);
28143     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
28144         || strcmp (cs, "UTF-8") == 0)
28145       return 1;
28146   }
28147 #endif
28148 #ifdef __CYGWIN__
28149   /* On Cygwin, avoid locale names without encoding suffix, because the
28150      locale_charset() function relies on the encoding suffix.  Note that
28151      LC_ALL is set on the command line.  */
28152   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28153 #endif
28154   /* Check whether in the abbreviation of the second month, the second
28155      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
28156      one byte long. This excludes the UTF-8 encoding.  */
28157   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28158   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
28159 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
28160   /* Check whether the decimal separator is a comma.
28161      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
28162      are nl_langinfo(RADIXCHAR) are both ".".  */
28163   if (localeconv () ->decimal_point[0] != ',') return 1;
28164 #endif
28165   return 0;
28166 }
28167
28168 _ACEOF
28169     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28170   (eval $ac_link) 2>&5
28171   ac_status=$?
28172   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28173   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28174       case "$host_os" in
28175         # Handle native Windows specially, because there setlocale() interprets
28176         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28177         # "fr" or "fra" as "French" or "French_France.1252",
28178         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28179         # "ja" as "Japanese" or "Japanese_Japan.932",
28180         # and similar.
28181         mingw*)
28182           # Test for the native Windows locale name.
28183           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28184             gt_cv_locale_fr=French_France.1252
28185           else
28186             # None found.
28187             gt_cv_locale_fr=none
28188           fi
28189           ;;
28190         *)
28191           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28192           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28193           # configure script would override the LC_ALL setting. Likewise for
28194           # LC_CTYPE, which is also set at the beginning of the configure script.
28195           # Test for the usual locale name.
28196           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28197             gt_cv_locale_fr=fr_FR
28198           else
28199             # Test for the locale name with explicit encoding suffix.
28200             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28201               gt_cv_locale_fr=fr_FR.ISO-8859-1
28202             else
28203               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
28204               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28205                 gt_cv_locale_fr=fr_FR.ISO8859-1
28206               else
28207                 # Test for the HP-UX locale name.
28208                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28209                   gt_cv_locale_fr=fr_FR.iso88591
28210                 else
28211                   # Test for the Solaris 7 locale name.
28212                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28213                     gt_cv_locale_fr=fr
28214                   else
28215                     # None found.
28216                     gt_cv_locale_fr=none
28217                   fi
28218                 fi
28219               fi
28220             fi
28221           fi
28222           ;;
28223       esac
28224     fi
28225     rm -fr conftest*
28226
28227 fi
28228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
28229 printf "%s\n" "$gt_cv_locale_fr" >&6; }
28230   LOCALE_FR=$gt_cv_locale_fr
28231
28232
28233
28234
28235   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
28236 printf %s "checking for a french Unicode locale... " >&6; }
28237 if ${gt_cv_locale_fr_utf8+:} false; then :
28238   printf %s "(cached) " >&6
28239 else
28240
28241     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28242 /* end confdefs.h.  */
28243
28244 #include <locale.h>
28245 #include <time.h>
28246 #if HAVE_LANGINFO_CODESET
28247 # include <langinfo.h>
28248 #endif
28249 #include <stdlib.h>
28250 #include <string.h>
28251 struct tm t;
28252 char buf[16];
28253 int main () {
28254   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
28255      imitates locale dependent behaviour by looking at the environment
28256      variables, and all locales use the UTF-8 encoding.  */
28257 #if !(defined __BEOS__ || defined __HAIKU__)
28258   /* Check whether the given locale name is recognized by the system.  */
28259 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28260   /* On native Windows, setlocale(category, "") looks at the system settings,
28261      not at the environment variables.  Also, when an encoding suffix such
28262      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28263      category of the locale to "C".  */
28264   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28265       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28266     return 1;
28267 # else
28268   if (setlocale (LC_ALL, "") == NULL) return 1;
28269 # endif
28270   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28271      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28272      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28273      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28274      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28275      some unit tests fail.  */
28276 # if HAVE_LANGINFO_CODESET
28277   {
28278     const char *cs = nl_langinfo (CODESET);
28279     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
28280       return 1;
28281   }
28282 # endif
28283 # ifdef __CYGWIN__
28284   /* On Cygwin, avoid locale names without encoding suffix, because the
28285      locale_charset() function relies on the encoding suffix.  Note that
28286      LC_ALL is set on the command line.  */
28287   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28288 # endif
28289   /* Check whether in the abbreviation of the second month, the second
28290      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
28291      two bytes long, with UTF-8 encoding.  */
28292   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28293   if (strftime (buf, sizeof (buf), "%b", &t) < 4
28294       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
28295     return 1;
28296 #endif
28297 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
28298   /* Check whether the decimal separator is a comma.
28299      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
28300      are nl_langinfo(RADIXCHAR) are both ".".  */
28301   if (localeconv () ->decimal_point[0] != ',') return 1;
28302 #endif
28303   return 0;
28304 }
28305
28306 _ACEOF
28307     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28308   (eval $ac_link) 2>&5
28309   ac_status=$?
28310   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28311   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28312       case "$host_os" in
28313         # Handle native Windows specially, because there setlocale() interprets
28314         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28315         # "fr" or "fra" as "French" or "French_France.1252",
28316         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28317         # "ja" as "Japanese" or "Japanese_Japan.932",
28318         # and similar.
28319         mingw*)
28320           # Test for the hypothetical native Windows locale name.
28321           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28322             gt_cv_locale_fr_utf8=French_France.65001
28323           else
28324             # None found.
28325             gt_cv_locale_fr_utf8=none
28326           fi
28327           ;;
28328         *)
28329           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28330           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28331           # configure script would override the LC_ALL setting. Likewise for
28332           # LC_CTYPE, which is also set at the beginning of the configure script.
28333           # Test for the usual locale name.
28334           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28335             gt_cv_locale_fr_utf8=fr_FR
28336           else
28337             # Test for the locale name with explicit encoding suffix.
28338             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28339               gt_cv_locale_fr_utf8=fr_FR.UTF-8
28340             else
28341               # Test for the Solaris 7 locale name.
28342               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28343                 gt_cv_locale_fr_utf8=fr.UTF-8
28344               else
28345                 # None found.
28346                 gt_cv_locale_fr_utf8=none
28347               fi
28348             fi
28349           fi
28350           ;;
28351       esac
28352     fi
28353     rm -fr conftest*
28354
28355 fi
28356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
28357 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
28358   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
28359
28360
28361
28362
28363
28364   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
28365 printf %s "checking for a traditional japanese locale... " >&6; }
28366 if ${gt_cv_locale_ja+:} false; then :
28367   printf %s "(cached) " >&6
28368 else
28369
28370     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28371 /* end confdefs.h.  */
28372
28373 #include <locale.h>
28374 #include <time.h>
28375 #if HAVE_LANGINFO_CODESET
28376 # include <langinfo.h>
28377 #endif
28378 #include <stdlib.h>
28379 #include <string.h>
28380 struct tm t;
28381 char buf[16];
28382 int main ()
28383 {
28384   const char *p;
28385   /* Check whether the given locale name is recognized by the system.  */
28386 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28387   /* On native Windows, setlocale(category, "") looks at the system settings,
28388      not at the environment variables.  Also, when an encoding suffix such
28389      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28390      category of the locale to "C".  */
28391   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28392       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28393     return 1;
28394 #else
28395   if (setlocale (LC_ALL, "") == NULL) return 1;
28396 #endif
28397   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28398      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28399      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28400      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28401      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28402      some unit tests fail.
28403      On MirBSD 10, when an unsupported locale is specified, setlocale()
28404      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
28405 #if HAVE_LANGINFO_CODESET
28406   {
28407     const char *cs = nl_langinfo (CODESET);
28408     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
28409         || strcmp (cs, "UTF-8") == 0)
28410       return 1;
28411   }
28412 #endif
28413 #ifdef __CYGWIN__
28414   /* On Cygwin, avoid locale names without encoding suffix, because the
28415      locale_charset() function relies on the encoding suffix.  Note that
28416      LC_ALL is set on the command line.  */
28417   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28418 #endif
28419   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
28420      on Cygwin 1.5.x.  */
28421   if (MB_CUR_MAX == 1)
28422     return 1;
28423   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
28424      This excludes the UTF-8 encoding (except on MirBSD).  */
28425   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28426   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
28427   for (p = buf; *p != '\0'; p++)
28428     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
28429       return 1;
28430   return 0;
28431 }
28432
28433 _ACEOF
28434     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28435   (eval $ac_link) 2>&5
28436   ac_status=$?
28437   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28438   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28439       case "$host_os" in
28440         # Handle native Windows specially, because there setlocale() interprets
28441         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28442         # "fr" or "fra" as "French" or "French_France.1252",
28443         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28444         # "ja" as "Japanese" or "Japanese_Japan.932",
28445         # and similar.
28446         mingw*)
28447           # Note that on native Windows, the Japanese locale is
28448           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
28449           # cannot use it here.
28450           gt_cv_locale_ja=none
28451           ;;
28452         *)
28453           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28454           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28455           # configure script would override the LC_ALL setting. Likewise for
28456           # LC_CTYPE, which is also set at the beginning of the configure script.
28457           # Test for the AIX locale name.
28458           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28459             gt_cv_locale_ja=ja_JP
28460           else
28461             # Test for the locale name with explicit encoding suffix.
28462             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28463               gt_cv_locale_ja=ja_JP.EUC-JP
28464             else
28465               # Test for the HP-UX, OSF/1, NetBSD locale name.
28466               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28467                 gt_cv_locale_ja=ja_JP.eucJP
28468               else
28469                 # Test for the IRIX, FreeBSD locale name.
28470                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28471                   gt_cv_locale_ja=ja_JP.EUC
28472                 else
28473                   # Test for the Solaris 7 locale name.
28474                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28475                     gt_cv_locale_ja=ja
28476                   else
28477                     # Special test for NetBSD 1.6.
28478                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
28479                       gt_cv_locale_ja=ja_JP.eucJP
28480                     else
28481                       # None found.
28482                       gt_cv_locale_ja=none
28483                     fi
28484                   fi
28485                 fi
28486               fi
28487             fi
28488           fi
28489           ;;
28490       esac
28491     fi
28492     rm -fr conftest*
28493
28494 fi
28495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
28496 printf "%s\n" "$gt_cv_locale_ja" >&6; }
28497   LOCALE_JA=$gt_cv_locale_ja
28498
28499
28500
28501
28502
28503   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
28504 printf %s "checking for a transitional chinese locale... " >&6; }
28505 if ${gt_cv_locale_zh_CN+:} false; then :
28506   printf %s "(cached) " >&6
28507 else
28508
28509     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28510 /* end confdefs.h.  */
28511
28512 #include <locale.h>
28513 #include <stdlib.h>
28514 #include <time.h>
28515 #if HAVE_LANGINFO_CODESET
28516 # include <langinfo.h>
28517 #endif
28518 #include <stdlib.h>
28519 #include <string.h>
28520 struct tm t;
28521 char buf[16];
28522 int main ()
28523 {
28524   const char *p;
28525   /* Check whether the given locale name is recognized by the system.  */
28526 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28527   /* On native Windows, setlocale(category, "") looks at the system settings,
28528      not at the environment variables.  Also, when an encoding suffix such
28529      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28530      category of the locale to "C".  */
28531   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28532       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28533     return 1;
28534 #else
28535   if (setlocale (LC_ALL, "") == NULL) return 1;
28536 #endif
28537   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28538      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28539      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28540      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28541      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28542      some unit tests fail.
28543      On MirBSD 10, when an unsupported locale is specified, setlocale()
28544      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
28545 #if HAVE_LANGINFO_CODESET
28546   {
28547     const char *cs = nl_langinfo (CODESET);
28548     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
28549         || strcmp (cs, "UTF-8") == 0)
28550       return 1;
28551   }
28552 #endif
28553 #ifdef __CYGWIN__
28554   /* On Cygwin, avoid locale names without encoding suffix, because the
28555      locale_charset() function relies on the encoding suffix.  Note that
28556      LC_ALL is set on the command line.  */
28557   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28558 #endif
28559   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
28560      This excludes the UTF-8 encoding (except on MirBSD).  */
28561   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28562   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
28563   for (p = buf; *p != '\0'; p++)
28564     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
28565       return 1;
28566   /* Check whether a typical GB18030 multibyte sequence is recognized as a
28567      single wide character.  This excludes the GB2312 and GBK encodings.  */
28568   if (mblen ("\203\062\332\066", 5) != 4)
28569     return 1;
28570   return 0;
28571 }
28572
28573 _ACEOF
28574     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28575   (eval $ac_link) 2>&5
28576   ac_status=$?
28577   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28578   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28579       case "$host_os" in
28580         # Handle native Windows specially, because there setlocale() interprets
28581         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28582         # "fr" or "fra" as "French" or "French_France.1252",
28583         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28584         # "ja" as "Japanese" or "Japanese_Japan.932",
28585         # and similar.
28586         mingw*)
28587           # Test for the hypothetical native Windows locale name.
28588           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28589             gt_cv_locale_zh_CN=Chinese_China.54936
28590           else
28591             # None found.
28592             gt_cv_locale_zh_CN=none
28593           fi
28594           ;;
28595         solaris2.8)
28596           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
28597           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
28598           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
28599           gt_cv_locale_zh_CN=none
28600           ;;
28601         *)
28602           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28603           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28604           # configure script would override the LC_ALL setting. Likewise for
28605           # LC_CTYPE, which is also set at the beginning of the configure script.
28606           # Test for the locale name without encoding suffix.
28607           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28608             gt_cv_locale_zh_CN=zh_CN
28609           else
28610             # Test for the locale name with explicit encoding suffix.
28611             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28612               gt_cv_locale_zh_CN=zh_CN.GB18030
28613             else
28614               # None found.
28615               gt_cv_locale_zh_CN=none
28616             fi
28617           fi
28618           ;;
28619       esac
28620     else
28621       # If there was a link error, due to mblen(), the system is so old that
28622       # it certainly doesn't have a chinese locale.
28623       gt_cv_locale_zh_CN=none
28624     fi
28625     rm -fr conftest*
28626
28627 fi
28628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
28629 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
28630   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
28631
28632
28633
28634
28635   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
28636 printf %s "checking for a french Unicode locale... " >&6; }
28637 if ${gt_cv_locale_fr_utf8+:} false; then :
28638   printf %s "(cached) " >&6
28639 else
28640
28641     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28642 /* end confdefs.h.  */
28643
28644 #include <locale.h>
28645 #include <time.h>
28646 #if HAVE_LANGINFO_CODESET
28647 # include <langinfo.h>
28648 #endif
28649 #include <stdlib.h>
28650 #include <string.h>
28651 struct tm t;
28652 char buf[16];
28653 int main () {
28654   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
28655      imitates locale dependent behaviour by looking at the environment
28656      variables, and all locales use the UTF-8 encoding.  */
28657 #if !(defined __BEOS__ || defined __HAIKU__)
28658   /* Check whether the given locale name is recognized by the system.  */
28659 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28660   /* On native Windows, setlocale(category, "") looks at the system settings,
28661      not at the environment variables.  Also, when an encoding suffix such
28662      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28663      category of the locale to "C".  */
28664   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28665       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28666     return 1;
28667 # else
28668   if (setlocale (LC_ALL, "") == NULL) return 1;
28669 # endif
28670   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28671      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28672      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28673      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28674      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28675      some unit tests fail.  */
28676 # if HAVE_LANGINFO_CODESET
28677   {
28678     const char *cs = nl_langinfo (CODESET);
28679     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
28680       return 1;
28681   }
28682 # endif
28683 # ifdef __CYGWIN__
28684   /* On Cygwin, avoid locale names without encoding suffix, because the
28685      locale_charset() function relies on the encoding suffix.  Note that
28686      LC_ALL is set on the command line.  */
28687   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28688 # endif
28689   /* Check whether in the abbreviation of the second month, the second
28690      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
28691      two bytes long, with UTF-8 encoding.  */
28692   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28693   if (strftime (buf, sizeof (buf), "%b", &t) < 4
28694       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
28695     return 1;
28696 #endif
28697 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
28698   /* Check whether the decimal separator is a comma.
28699      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
28700      are nl_langinfo(RADIXCHAR) are both ".".  */
28701   if (localeconv () ->decimal_point[0] != ',') return 1;
28702 #endif
28703   return 0;
28704 }
28705
28706 _ACEOF
28707     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28708   (eval $ac_link) 2>&5
28709   ac_status=$?
28710   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28711   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28712       case "$host_os" in
28713         # Handle native Windows specially, because there setlocale() interprets
28714         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28715         # "fr" or "fra" as "French" or "French_France.1252",
28716         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28717         # "ja" as "Japanese" or "Japanese_Japan.932",
28718         # and similar.
28719         mingw*)
28720           # Test for the hypothetical native Windows locale name.
28721           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28722             gt_cv_locale_fr_utf8=French_France.65001
28723           else
28724             # None found.
28725             gt_cv_locale_fr_utf8=none
28726           fi
28727           ;;
28728         *)
28729           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28730           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28731           # configure script would override the LC_ALL setting. Likewise for
28732           # LC_CTYPE, which is also set at the beginning of the configure script.
28733           # Test for the usual locale name.
28734           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28735             gt_cv_locale_fr_utf8=fr_FR
28736           else
28737             # Test for the locale name with explicit encoding suffix.
28738             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28739               gt_cv_locale_fr_utf8=fr_FR.UTF-8
28740             else
28741               # Test for the Solaris 7 locale name.
28742               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28743                 gt_cv_locale_fr_utf8=fr.UTF-8
28744               else
28745                 # None found.
28746                 gt_cv_locale_fr_utf8=none
28747               fi
28748             fi
28749           fi
28750           ;;
28751       esac
28752     fi
28753     rm -fr conftest*
28754
28755 fi
28756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
28757 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
28758   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
28759
28760
28761
28762
28763
28764   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
28765 printf %s "checking for a transitional chinese locale... " >&6; }
28766 if ${gt_cv_locale_zh_CN+:} false; then :
28767   printf %s "(cached) " >&6
28768 else
28769
28770     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28771 /* end confdefs.h.  */
28772
28773 #include <locale.h>
28774 #include <stdlib.h>
28775 #include <time.h>
28776 #if HAVE_LANGINFO_CODESET
28777 # include <langinfo.h>
28778 #endif
28779 #include <stdlib.h>
28780 #include <string.h>
28781 struct tm t;
28782 char buf[16];
28783 int main ()
28784 {
28785   const char *p;
28786   /* Check whether the given locale name is recognized by the system.  */
28787 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28788   /* On native Windows, setlocale(category, "") looks at the system settings,
28789      not at the environment variables.  Also, when an encoding suffix such
28790      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28791      category of the locale to "C".  */
28792   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28793       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28794     return 1;
28795 #else
28796   if (setlocale (LC_ALL, "") == NULL) return 1;
28797 #endif
28798   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28799      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28800      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28801      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28802      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28803      some unit tests fail.
28804      On MirBSD 10, when an unsupported locale is specified, setlocale()
28805      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
28806 #if HAVE_LANGINFO_CODESET
28807   {
28808     const char *cs = nl_langinfo (CODESET);
28809     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
28810         || strcmp (cs, "UTF-8") == 0)
28811       return 1;
28812   }
28813 #endif
28814 #ifdef __CYGWIN__
28815   /* On Cygwin, avoid locale names without encoding suffix, because the
28816      locale_charset() function relies on the encoding suffix.  Note that
28817      LC_ALL is set on the command line.  */
28818   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
28819 #endif
28820   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
28821      This excludes the UTF-8 encoding (except on MirBSD).  */
28822   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
28823   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
28824   for (p = buf; *p != '\0'; p++)
28825     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
28826       return 1;
28827   /* Check whether a typical GB18030 multibyte sequence is recognized as a
28828      single wide character.  This excludes the GB2312 and GBK encodings.  */
28829   if (mblen ("\203\062\332\066", 5) != 4)
28830     return 1;
28831   return 0;
28832 }
28833
28834 _ACEOF
28835     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28836   (eval $ac_link) 2>&5
28837   ac_status=$?
28838   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28839   test $ac_status = 0; } && test -s conftest$ac_exeext; then
28840       case "$host_os" in
28841         # Handle native Windows specially, because there setlocale() interprets
28842         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
28843         # "fr" or "fra" as "French" or "French_France.1252",
28844         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
28845         # "ja" as "Japanese" or "Japanese_Japan.932",
28846         # and similar.
28847         mingw*)
28848           # Test for the hypothetical native Windows locale name.
28849           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28850             gt_cv_locale_zh_CN=Chinese_China.54936
28851           else
28852             # None found.
28853             gt_cv_locale_zh_CN=none
28854           fi
28855           ;;
28856         solaris2.8)
28857           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
28858           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
28859           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
28860           gt_cv_locale_zh_CN=none
28861           ;;
28862         *)
28863           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
28864           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
28865           # configure script would override the LC_ALL setting. Likewise for
28866           # LC_CTYPE, which is also set at the beginning of the configure script.
28867           # Test for the locale name without encoding suffix.
28868           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28869             gt_cv_locale_zh_CN=zh_CN
28870           else
28871             # Test for the locale name with explicit encoding suffix.
28872             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
28873               gt_cv_locale_zh_CN=zh_CN.GB18030
28874             else
28875               # None found.
28876               gt_cv_locale_zh_CN=none
28877             fi
28878           fi
28879           ;;
28880       esac
28881     else
28882       # If there was a link error, due to mblen(), the system is so old that
28883       # it certainly doesn't have a chinese locale.
28884       gt_cv_locale_zh_CN=none
28885     fi
28886     rm -fr conftest*
28887
28888 fi
28889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
28890 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
28891   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
28892
28893
28894
28895
28896
28897   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
28898   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
28899   # irrelevant for anonymous mappings.
28900   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
28901 if test "x$ac_cv_func_mmap" = xyes; then :
28902   gl_have_mmap=yes
28903 else
28904   gl_have_mmap=no
28905 fi
28906
28907
28908   # Try to allow MAP_ANONYMOUS.
28909   gl_have_mmap_anonymous=no
28910   if test $gl_have_mmap = yes; then
28911     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
28912 printf %s "checking for MAP_ANONYMOUS... " >&6; }
28913     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28914 /* end confdefs.h.  */
28915
28916 #include <sys/mman.h>
28917 #ifdef MAP_ANONYMOUS
28918     I cannot identify this map
28919 #endif
28920
28921 _ACEOF
28922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28923   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
28924   gl_have_mmap_anonymous=yes
28925 fi
28926 rm -rf conftest*
28927
28928     if test $gl_have_mmap_anonymous != yes; then
28929       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28930 /* end confdefs.h.  */
28931
28932 #include <sys/mman.h>
28933 #ifdef MAP_ANON
28934     I cannot identify this map
28935 #endif
28936
28937 _ACEOF
28938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28939   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
28940
28941 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
28942
28943          gl_have_mmap_anonymous=yes
28944 fi
28945 rm -rf conftest*
28946
28947     fi
28948     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
28949 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
28950     if test $gl_have_mmap_anonymous = yes; then
28951
28952 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
28953
28954     fi
28955   fi
28956
28957
28958
28959
28960
28961
28962   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
28963 printf %s "checking for a traditional french locale... " >&6; }
28964 if ${gt_cv_locale_fr+:} false; then :
28965   printf %s "(cached) " >&6
28966 else
28967
28968     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28969 /* end confdefs.h.  */
28970
28971 #include <locale.h>
28972 #include <time.h>
28973 #if HAVE_LANGINFO_CODESET
28974 # include <langinfo.h>
28975 #endif
28976 #include <stdlib.h>
28977 #include <string.h>
28978 struct tm t;
28979 char buf[16];
28980 int main () {
28981   /* Check whether the given locale name is recognized by the system.  */
28982 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
28983   /* On native Windows, setlocale(category, "") looks at the system settings,
28984      not at the environment variables.  Also, when an encoding suffix such
28985      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
28986      category of the locale to "C".  */
28987   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
28988       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
28989     return 1;
28990 #else
28991   if (setlocale (LC_ALL, "") == NULL) return 1;
28992 #endif
28993   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
28994      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
28995      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
28996      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
28997      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
28998      some unit tests fail.
28999      On MirBSD 10, when an unsupported locale is specified, setlocale()
29000      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29001 #if HAVE_LANGINFO_CODESET
29002   {
29003     const char *cs = nl_langinfo (CODESET);
29004     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29005         || strcmp (cs, "UTF-8") == 0)
29006       return 1;
29007   }
29008 #endif
29009 #ifdef __CYGWIN__
29010   /* On Cygwin, avoid locale names without encoding suffix, because the
29011      locale_charset() function relies on the encoding suffix.  Note that
29012      LC_ALL is set on the command line.  */
29013   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29014 #endif
29015   /* Check whether in the abbreviation of the second month, the second
29016      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29017      one byte long. This excludes the UTF-8 encoding.  */
29018   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29019   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29020 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
29021   /* Check whether the decimal separator is a comma.
29022      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29023      are nl_langinfo(RADIXCHAR) are both ".".  */
29024   if (localeconv () ->decimal_point[0] != ',') return 1;
29025 #endif
29026   return 0;
29027 }
29028
29029 _ACEOF
29030     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29031   (eval $ac_link) 2>&5
29032   ac_status=$?
29033   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29034   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29035       case "$host_os" in
29036         # Handle native Windows specially, because there setlocale() interprets
29037         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29038         # "fr" or "fra" as "French" or "French_France.1252",
29039         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29040         # "ja" as "Japanese" or "Japanese_Japan.932",
29041         # and similar.
29042         mingw*)
29043           # Test for the native Windows locale name.
29044           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29045             gt_cv_locale_fr=French_France.1252
29046           else
29047             # None found.
29048             gt_cv_locale_fr=none
29049           fi
29050           ;;
29051         *)
29052           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29053           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29054           # configure script would override the LC_ALL setting. Likewise for
29055           # LC_CTYPE, which is also set at the beginning of the configure script.
29056           # Test for the usual locale name.
29057           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29058             gt_cv_locale_fr=fr_FR
29059           else
29060             # Test for the locale name with explicit encoding suffix.
29061             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29062               gt_cv_locale_fr=fr_FR.ISO-8859-1
29063             else
29064               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29065               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29066                 gt_cv_locale_fr=fr_FR.ISO8859-1
29067               else
29068                 # Test for the HP-UX locale name.
29069                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29070                   gt_cv_locale_fr=fr_FR.iso88591
29071                 else
29072                   # Test for the Solaris 7 locale name.
29073                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29074                     gt_cv_locale_fr=fr
29075                   else
29076                     # None found.
29077                     gt_cv_locale_fr=none
29078                   fi
29079                 fi
29080               fi
29081             fi
29082           fi
29083           ;;
29084       esac
29085     fi
29086     rm -fr conftest*
29087
29088 fi
29089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29090 printf "%s\n" "$gt_cv_locale_fr" >&6; }
29091   LOCALE_FR=$gt_cv_locale_fr
29092
29093
29094
29095
29096   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
29097 printf %s "checking for a french Unicode locale... " >&6; }
29098 if ${gt_cv_locale_fr_utf8+:} false; then :
29099   printf %s "(cached) " >&6
29100 else
29101
29102     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29103 /* end confdefs.h.  */
29104
29105 #include <locale.h>
29106 #include <time.h>
29107 #if HAVE_LANGINFO_CODESET
29108 # include <langinfo.h>
29109 #endif
29110 #include <stdlib.h>
29111 #include <string.h>
29112 struct tm t;
29113 char buf[16];
29114 int main () {
29115   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
29116      imitates locale dependent behaviour by looking at the environment
29117      variables, and all locales use the UTF-8 encoding.  */
29118 #if !(defined __BEOS__ || defined __HAIKU__)
29119   /* Check whether the given locale name is recognized by the system.  */
29120 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29121   /* On native Windows, setlocale(category, "") looks at the system settings,
29122      not at the environment variables.  Also, when an encoding suffix such
29123      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
29124      category of the locale to "C".  */
29125   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29126       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29127     return 1;
29128 # else
29129   if (setlocale (LC_ALL, "") == NULL) return 1;
29130 # endif
29131   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29132      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29133      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29134      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29135      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29136      some unit tests fail.  */
29137 # if HAVE_LANGINFO_CODESET
29138   {
29139     const char *cs = nl_langinfo (CODESET);
29140     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
29141       return 1;
29142   }
29143 # endif
29144 # ifdef __CYGWIN__
29145   /* On Cygwin, avoid locale names without encoding suffix, because the
29146      locale_charset() function relies on the encoding suffix.  Note that
29147      LC_ALL is set on the command line.  */
29148   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29149 # endif
29150   /* Check whether in the abbreviation of the second month, the second
29151      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
29152      two bytes long, with UTF-8 encoding.  */
29153   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29154   if (strftime (buf, sizeof (buf), "%b", &t) < 4
29155       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
29156     return 1;
29157 #endif
29158 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
29159   /* Check whether the decimal separator is a comma.
29160      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29161      are nl_langinfo(RADIXCHAR) are both ".".  */
29162   if (localeconv () ->decimal_point[0] != ',') return 1;
29163 #endif
29164   return 0;
29165 }
29166
29167 _ACEOF
29168     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29169   (eval $ac_link) 2>&5
29170   ac_status=$?
29171   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29172   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29173       case "$host_os" in
29174         # Handle native Windows specially, because there setlocale() interprets
29175         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29176         # "fr" or "fra" as "French" or "French_France.1252",
29177         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29178         # "ja" as "Japanese" or "Japanese_Japan.932",
29179         # and similar.
29180         mingw*)
29181           # Test for the hypothetical native Windows locale name.
29182           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29183             gt_cv_locale_fr_utf8=French_France.65001
29184           else
29185             # None found.
29186             gt_cv_locale_fr_utf8=none
29187           fi
29188           ;;
29189         *)
29190           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29191           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29192           # configure script would override the LC_ALL setting. Likewise for
29193           # LC_CTYPE, which is also set at the beginning of the configure script.
29194           # Test for the usual locale name.
29195           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29196             gt_cv_locale_fr_utf8=fr_FR
29197           else
29198             # Test for the locale name with explicit encoding suffix.
29199             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29200               gt_cv_locale_fr_utf8=fr_FR.UTF-8
29201             else
29202               # Test for the Solaris 7 locale name.
29203               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29204                 gt_cv_locale_fr_utf8=fr.UTF-8
29205               else
29206                 # None found.
29207                 gt_cv_locale_fr_utf8=none
29208               fi
29209             fi
29210           fi
29211           ;;
29212       esac
29213     fi
29214     rm -fr conftest*
29215
29216 fi
29217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
29218 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
29219   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
29220
29221
29222
29223
29224      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
29225 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
29226 if ${gl_cv_func_svid_putenv+:} false; then :
29227   printf %s "(cached) " >&6
29228 else
29229   if test "$cross_compiling" = yes; then :
29230                case "$host_os" in
29231                         # Guess yes on glibc systems.
29232                 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
29233                         # If we don't know, assume the worst.
29234                 *)      gl_cv_func_svid_putenv="guessing no" ;;
29235               esac
29236
29237 else
29238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29239 /* end confdefs.h.  */
29240 $ac_includes_default
29241 int
29242 main ()
29243 {
29244
29245     /* Put it in env.  */
29246     if (putenv ("CONFTEST_putenv=val"))
29247       return 1;
29248
29249     /* Try to remove it.  */
29250     if (putenv ("CONFTEST_putenv"))
29251       return 2;
29252
29253     /* Make sure it was deleted.  */
29254     if (getenv ("CONFTEST_putenv") != 0)
29255       return 3;
29256
29257     return 0;
29258
29259   ;
29260   return 0;
29261 }
29262 _ACEOF
29263 if ac_fn_c_try_run "$LINENO"; then :
29264   gl_cv_func_svid_putenv=yes
29265 else
29266   gl_cv_func_svid_putenv=no
29267 fi
29268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29269   conftest.$ac_objext conftest.beam conftest.$ac_ext
29270 fi
29271
29272
29273 fi
29274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
29275 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
29276   case "$gl_cv_func_svid_putenv" in
29277     *yes) ;;
29278     *)
29279       REPLACE_PUTENV=1
29280       ;;
29281   esac
29282
29283   if test $REPLACE_PUTENV = 1; then
29284
29285
29286
29287
29288
29289
29290
29291
29292   gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
29293
29294
29295   ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
29296 if test "x$ac_cv_have_decl__putenv" = xyes; then :
29297   ac_have_decl=1
29298 else
29299   ac_have_decl=0
29300 fi
29301
29302 cat >>confdefs.h <<_ACEOF
29303 #define HAVE_DECL__PUTENV $ac_have_decl
29304 _ACEOF
29305
29306
29307   fi
29308
29309
29310
29311
29312
29313     if test "$GNULIB_PUTENV" != 1; then
29314         if test "$GNULIB_PUTENV" = 0; then
29315       GNULIB_PUTENV=$gl_module_indicator_condition
29316     else
29317       GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
29318     fi
29319   fi
29320
29321
29322
29323
29324
29325 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
29326
29327
29328
29329
29330
29331      if test $ac_cv_func_setenv = no; then
29332     HAVE_SETENV=0
29333   else
29334     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
29335 printf %s "checking whether setenv validates arguments... " >&6; }
29336 if ${gl_cv_func_setenv_works+:} false; then :
29337   printf %s "(cached) " >&6
29338 else
29339   if test "$cross_compiling" = yes; then :
29340   case "$host_os" in
29341                  # Guess yes on glibc systems.
29342          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
29343                  # If we don't know, assume the worst.
29344          *)      gl_cv_func_setenv_works="guessing no" ;;
29345        esac
29346
29347 else
29348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29349 /* end confdefs.h.  */
29350
29351        #include <stdlib.h>
29352        #include <errno.h>
29353        #include <string.h>
29354
29355 int
29356 main ()
29357 {
29358
29359        int result = 0;
29360        {
29361          if (setenv ("", "", 0) != -1)
29362            result |= 1;
29363          else if (errno != EINVAL)
29364            result |= 2;
29365        }
29366        {
29367          if (setenv ("a", "=", 1) != 0)
29368            result |= 4;
29369          else if (strcmp (getenv ("a"), "=") != 0)
29370            result |= 8;
29371        }
29372        return result;
29373
29374   ;
29375   return 0;
29376 }
29377 _ACEOF
29378 if ac_fn_c_try_run "$LINENO"; then :
29379   gl_cv_func_setenv_works=yes
29380 else
29381   gl_cv_func_setenv_works=no
29382 fi
29383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29384   conftest.$ac_objext conftest.beam conftest.$ac_ext
29385 fi
29386
29387 fi
29388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
29389 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
29390     case "$gl_cv_func_setenv_works" in
29391       *yes) ;;
29392       *)
29393         REPLACE_SETENV=1
29394         ;;
29395     esac
29396   fi
29397
29398   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
29399
29400
29401
29402
29403
29404
29405
29406
29407   gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext"
29408
29409   fi
29410
29411
29412
29413
29414
29415     if test "$GNULIB_SETENV" != 1; then
29416         if test "$GNULIB_SETENV" = 0; then
29417       GNULIB_SETENV=$gl_module_indicator_condition
29418     else
29419       GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)"
29420     fi
29421   fi
29422
29423
29424
29425
29426
29427 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
29428
29429
29430
29431
29432
29433
29434   case "$host_os" in
29435             mingw*) REPLACE_SETLOCALE=1 ;;
29436             cygwin*)
29437       case `uname -r` in
29438         1.5.*) REPLACE_SETLOCALE=1 ;;
29439       esac
29440       ;;
29441   esac
29442
29443   if test $REPLACE_SETLOCALE = 1; then
29444
29445
29446
29447
29448
29449
29450
29451
29452   gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
29453
29454
29455   :
29456
29457   fi
29458
29459
29460
29461
29462
29463     if test "$GNULIB_SETLOCALE" != 1; then
29464         if test "$GNULIB_SETLOCALE" = 0; then
29465       GNULIB_SETLOCALE=$gl_module_indicator_condition
29466     else
29467       GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
29468     fi
29469   fi
29470
29471
29472
29473
29474
29475 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
29476
29477
29478
29479
29480
29481
29482   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
29483 printf %s "checking for a traditional french locale... " >&6; }
29484 if ${gt_cv_locale_fr+:} false; then :
29485   printf %s "(cached) " >&6
29486 else
29487
29488     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29489 /* end confdefs.h.  */
29490
29491 #include <locale.h>
29492 #include <time.h>
29493 #if HAVE_LANGINFO_CODESET
29494 # include <langinfo.h>
29495 #endif
29496 #include <stdlib.h>
29497 #include <string.h>
29498 struct tm t;
29499 char buf[16];
29500 int main () {
29501   /* Check whether the given locale name is recognized by the system.  */
29502 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29503   /* On native Windows, setlocale(category, "") looks at the system settings,
29504      not at the environment variables.  Also, when an encoding suffix such
29505      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
29506      category of the locale to "C".  */
29507   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29508       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29509     return 1;
29510 #else
29511   if (setlocale (LC_ALL, "") == NULL) return 1;
29512 #endif
29513   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29514      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29515      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29516      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29517      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29518      some unit tests fail.
29519      On MirBSD 10, when an unsupported locale is specified, setlocale()
29520      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29521 #if HAVE_LANGINFO_CODESET
29522   {
29523     const char *cs = nl_langinfo (CODESET);
29524     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29525         || strcmp (cs, "UTF-8") == 0)
29526       return 1;
29527   }
29528 #endif
29529 #ifdef __CYGWIN__
29530   /* On Cygwin, avoid locale names without encoding suffix, because the
29531      locale_charset() function relies on the encoding suffix.  Note that
29532      LC_ALL is set on the command line.  */
29533   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29534 #endif
29535   /* Check whether in the abbreviation of the second month, the second
29536      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29537      one byte long. This excludes the UTF-8 encoding.  */
29538   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29539   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29540 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
29541   /* Check whether the decimal separator is a comma.
29542      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29543      are nl_langinfo(RADIXCHAR) are both ".".  */
29544   if (localeconv () ->decimal_point[0] != ',') return 1;
29545 #endif
29546   return 0;
29547 }
29548
29549 _ACEOF
29550     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29551   (eval $ac_link) 2>&5
29552   ac_status=$?
29553   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29554   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29555       case "$host_os" in
29556         # Handle native Windows specially, because there setlocale() interprets
29557         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29558         # "fr" or "fra" as "French" or "French_France.1252",
29559         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29560         # "ja" as "Japanese" or "Japanese_Japan.932",
29561         # and similar.
29562         mingw*)
29563           # Test for the native Windows locale name.
29564           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29565             gt_cv_locale_fr=French_France.1252
29566           else
29567             # None found.
29568             gt_cv_locale_fr=none
29569           fi
29570           ;;
29571         *)
29572           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29573           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29574           # configure script would override the LC_ALL setting. Likewise for
29575           # LC_CTYPE, which is also set at the beginning of the configure script.
29576           # Test for the usual locale name.
29577           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29578             gt_cv_locale_fr=fr_FR
29579           else
29580             # Test for the locale name with explicit encoding suffix.
29581             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29582               gt_cv_locale_fr=fr_FR.ISO-8859-1
29583             else
29584               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29585               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29586                 gt_cv_locale_fr=fr_FR.ISO8859-1
29587               else
29588                 # Test for the HP-UX locale name.
29589                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29590                   gt_cv_locale_fr=fr_FR.iso88591
29591                 else
29592                   # Test for the Solaris 7 locale name.
29593                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29594                     gt_cv_locale_fr=fr
29595                   else
29596                     # None found.
29597                     gt_cv_locale_fr=none
29598                   fi
29599                 fi
29600               fi
29601             fi
29602           fi
29603           ;;
29604       esac
29605     fi
29606     rm -fr conftest*
29607
29608 fi
29609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29610 printf "%s\n" "$gt_cv_locale_fr" >&6; }
29611   LOCALE_FR=$gt_cv_locale_fr
29612
29613
29614
29615
29616   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
29617 printf %s "checking for a french Unicode locale... " >&6; }
29618 if ${gt_cv_locale_fr_utf8+:} false; then :
29619   printf %s "(cached) " >&6
29620 else
29621
29622     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29623 /* end confdefs.h.  */
29624
29625 #include <locale.h>
29626 #include <time.h>
29627 #if HAVE_LANGINFO_CODESET
29628 # include <langinfo.h>
29629 #endif
29630 #include <stdlib.h>
29631 #include <string.h>
29632 struct tm t;
29633 char buf[16];
29634 int main () {
29635   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
29636      imitates locale dependent behaviour by looking at the environment
29637      variables, and all locales use the UTF-8 encoding.  */
29638 #if !(defined __BEOS__ || defined __HAIKU__)
29639   /* Check whether the given locale name is recognized by the system.  */
29640 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29641   /* On native Windows, setlocale(category, "") looks at the system settings,
29642      not at the environment variables.  Also, when an encoding suffix such
29643      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
29644      category of the locale to "C".  */
29645   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29646       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29647     return 1;
29648 # else
29649   if (setlocale (LC_ALL, "") == NULL) return 1;
29650 # endif
29651   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29652      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29653      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29654      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29655      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29656      some unit tests fail.  */
29657 # if HAVE_LANGINFO_CODESET
29658   {
29659     const char *cs = nl_langinfo (CODESET);
29660     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
29661       return 1;
29662   }
29663 # endif
29664 # ifdef __CYGWIN__
29665   /* On Cygwin, avoid locale names without encoding suffix, because the
29666      locale_charset() function relies on the encoding suffix.  Note that
29667      LC_ALL is set on the command line.  */
29668   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29669 # endif
29670   /* Check whether in the abbreviation of the second month, the second
29671      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
29672      two bytes long, with UTF-8 encoding.  */
29673   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29674   if (strftime (buf, sizeof (buf), "%b", &t) < 4
29675       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
29676     return 1;
29677 #endif
29678 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
29679   /* Check whether the decimal separator is a comma.
29680      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29681      are nl_langinfo(RADIXCHAR) are both ".".  */
29682   if (localeconv () ->decimal_point[0] != ',') return 1;
29683 #endif
29684   return 0;
29685 }
29686
29687 _ACEOF
29688     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29689   (eval $ac_link) 2>&5
29690   ac_status=$?
29691   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29692   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29693       case "$host_os" in
29694         # Handle native Windows specially, because there setlocale() interprets
29695         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29696         # "fr" or "fra" as "French" or "French_France.1252",
29697         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29698         # "ja" as "Japanese" or "Japanese_Japan.932",
29699         # and similar.
29700         mingw*)
29701           # Test for the hypothetical native Windows locale name.
29702           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29703             gt_cv_locale_fr_utf8=French_France.65001
29704           else
29705             # None found.
29706             gt_cv_locale_fr_utf8=none
29707           fi
29708           ;;
29709         *)
29710           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29711           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29712           # configure script would override the LC_ALL setting. Likewise for
29713           # LC_CTYPE, which is also set at the beginning of the configure script.
29714           # Test for the usual locale name.
29715           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29716             gt_cv_locale_fr_utf8=fr_FR
29717           else
29718             # Test for the locale name with explicit encoding suffix.
29719             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29720               gt_cv_locale_fr_utf8=fr_FR.UTF-8
29721             else
29722               # Test for the Solaris 7 locale name.
29723               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29724                 gt_cv_locale_fr_utf8=fr.UTF-8
29725               else
29726                 # None found.
29727                 gt_cv_locale_fr_utf8=none
29728               fi
29729             fi
29730           fi
29731           ;;
29732       esac
29733     fi
29734     rm -fr conftest*
29735
29736 fi
29737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
29738 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
29739   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
29740
29741
29742
29743
29744
29745   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
29746 printf %s "checking for a traditional japanese locale... " >&6; }
29747 if ${gt_cv_locale_ja+:} false; then :
29748   printf %s "(cached) " >&6
29749 else
29750
29751     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29752 /* end confdefs.h.  */
29753
29754 #include <locale.h>
29755 #include <time.h>
29756 #if HAVE_LANGINFO_CODESET
29757 # include <langinfo.h>
29758 #endif
29759 #include <stdlib.h>
29760 #include <string.h>
29761 struct tm t;
29762 char buf[16];
29763 int main ()
29764 {
29765   const char *p;
29766   /* Check whether the given locale name is recognized by the system.  */
29767 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29768   /* On native Windows, setlocale(category, "") looks at the system settings,
29769      not at the environment variables.  Also, when an encoding suffix such
29770      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
29771      category of the locale to "C".  */
29772   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29773       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29774     return 1;
29775 #else
29776   if (setlocale (LC_ALL, "") == NULL) return 1;
29777 #endif
29778   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29779      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29780      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29781      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29782      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29783      some unit tests fail.
29784      On MirBSD 10, when an unsupported locale is specified, setlocale()
29785      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29786 #if HAVE_LANGINFO_CODESET
29787   {
29788     const char *cs = nl_langinfo (CODESET);
29789     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29790         || strcmp (cs, "UTF-8") == 0)
29791       return 1;
29792   }
29793 #endif
29794 #ifdef __CYGWIN__
29795   /* On Cygwin, avoid locale names without encoding suffix, because the
29796      locale_charset() function relies on the encoding suffix.  Note that
29797      LC_ALL is set on the command line.  */
29798   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29799 #endif
29800   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
29801      on Cygwin 1.5.x.  */
29802   if (MB_CUR_MAX == 1)
29803     return 1;
29804   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
29805      This excludes the UTF-8 encoding (except on MirBSD).  */
29806   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29807   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
29808   for (p = buf; *p != '\0'; p++)
29809     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
29810       return 1;
29811   return 0;
29812 }
29813
29814 _ACEOF
29815     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29816   (eval $ac_link) 2>&5
29817   ac_status=$?
29818   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29819   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29820       case "$host_os" in
29821         # Handle native Windows specially, because there setlocale() interprets
29822         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29823         # "fr" or "fra" as "French" or "French_France.1252",
29824         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29825         # "ja" as "Japanese" or "Japanese_Japan.932",
29826         # and similar.
29827         mingw*)
29828           # Note that on native Windows, the Japanese locale is
29829           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
29830           # cannot use it here.
29831           gt_cv_locale_ja=none
29832           ;;
29833         *)
29834           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29835           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29836           # configure script would override the LC_ALL setting. Likewise for
29837           # LC_CTYPE, which is also set at the beginning of the configure script.
29838           # Test for the AIX locale name.
29839           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29840             gt_cv_locale_ja=ja_JP
29841           else
29842             # Test for the locale name with explicit encoding suffix.
29843             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29844               gt_cv_locale_ja=ja_JP.EUC-JP
29845             else
29846               # Test for the HP-UX, OSF/1, NetBSD locale name.
29847               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29848                 gt_cv_locale_ja=ja_JP.eucJP
29849               else
29850                 # Test for the IRIX, FreeBSD locale name.
29851                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29852                   gt_cv_locale_ja=ja_JP.EUC
29853                 else
29854                   # Test for the Solaris 7 locale name.
29855                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29856                     gt_cv_locale_ja=ja
29857                   else
29858                     # Special test for NetBSD 1.6.
29859                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
29860                       gt_cv_locale_ja=ja_JP.eucJP
29861                     else
29862                       # None found.
29863                       gt_cv_locale_ja=none
29864                     fi
29865                   fi
29866                 fi
29867               fi
29868             fi
29869           fi
29870           ;;
29871       esac
29872     fi
29873     rm -fr conftest*
29874
29875 fi
29876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
29877 printf "%s\n" "$gt_cv_locale_ja" >&6; }
29878   LOCALE_JA=$gt_cv_locale_ja
29879
29880
29881
29882
29883
29884   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
29885 printf %s "checking for a transitional chinese locale... " >&6; }
29886 if ${gt_cv_locale_zh_CN+:} false; then :
29887   printf %s "(cached) " >&6
29888 else
29889
29890     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29891 /* end confdefs.h.  */
29892
29893 #include <locale.h>
29894 #include <stdlib.h>
29895 #include <time.h>
29896 #if HAVE_LANGINFO_CODESET
29897 # include <langinfo.h>
29898 #endif
29899 #include <stdlib.h>
29900 #include <string.h>
29901 struct tm t;
29902 char buf[16];
29903 int main ()
29904 {
29905   const char *p;
29906   /* Check whether the given locale name is recognized by the system.  */
29907 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29908   /* On native Windows, setlocale(category, "") looks at the system settings,
29909      not at the environment variables.  Also, when an encoding suffix such
29910      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
29911      category of the locale to "C".  */
29912   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29913       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29914     return 1;
29915 #else
29916   if (setlocale (LC_ALL, "") == NULL) return 1;
29917 #endif
29918   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29919      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29920      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29921      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29922      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29923      some unit tests fail.
29924      On MirBSD 10, when an unsupported locale is specified, setlocale()
29925      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29926 #if HAVE_LANGINFO_CODESET
29927   {
29928     const char *cs = nl_langinfo (CODESET);
29929     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29930         || strcmp (cs, "UTF-8") == 0)
29931       return 1;
29932   }
29933 #endif
29934 #ifdef __CYGWIN__
29935   /* On Cygwin, avoid locale names without encoding suffix, because the
29936      locale_charset() function relies on the encoding suffix.  Note that
29937      LC_ALL is set on the command line.  */
29938   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29939 #endif
29940   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
29941      This excludes the UTF-8 encoding (except on MirBSD).  */
29942   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29943   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
29944   for (p = buf; *p != '\0'; p++)
29945     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
29946       return 1;
29947   /* Check whether a typical GB18030 multibyte sequence is recognized as a
29948      single wide character.  This excludes the GB2312 and GBK encodings.  */
29949   if (mblen ("\203\062\332\066", 5) != 4)
29950     return 1;
29951   return 0;
29952 }
29953
29954 _ACEOF
29955     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29956   (eval $ac_link) 2>&5
29957   ac_status=$?
29958   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29959   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29960       case "$host_os" in
29961         # Handle native Windows specially, because there setlocale() interprets
29962         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29963         # "fr" or "fra" as "French" or "French_France.1252",
29964         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29965         # "ja" as "Japanese" or "Japanese_Japan.932",
29966         # and similar.
29967         mingw*)
29968           # Test for the hypothetical native Windows locale name.
29969           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29970             gt_cv_locale_zh_CN=Chinese_China.54936
29971           else
29972             # None found.
29973             gt_cv_locale_zh_CN=none
29974           fi
29975           ;;
29976         solaris2.8)
29977           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
29978           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
29979           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
29980           gt_cv_locale_zh_CN=none
29981           ;;
29982         *)
29983           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29984           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
29985           # configure script would override the LC_ALL setting. Likewise for
29986           # LC_CTYPE, which is also set at the beginning of the configure script.
29987           # Test for the locale name without encoding suffix.
29988           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29989             gt_cv_locale_zh_CN=zh_CN
29990           else
29991             # Test for the locale name with explicit encoding suffix.
29992             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29993               gt_cv_locale_zh_CN=zh_CN.GB18030
29994             else
29995               # None found.
29996               gt_cv_locale_zh_CN=none
29997             fi
29998           fi
29999           ;;
30000       esac
30001     else
30002       # If there was a link error, due to mblen(), the system is so old that
30003       # it certainly doesn't have a chinese locale.
30004       gt_cv_locale_zh_CN=none
30005     fi
30006     rm -fr conftest*
30007
30008 fi
30009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
30010 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
30011   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
30012
30013
30014
30015
30016                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
30017 "
30018 if test "x$ac_cv_have_decl_sleep" = xyes; then :
30019   ac_have_decl=1
30020 else
30021   ac_have_decl=0
30022 fi
30023
30024 cat >>confdefs.h <<_ACEOF
30025 #define HAVE_DECL_SLEEP $ac_have_decl
30026 _ACEOF
30027
30028
30029   if test $ac_cv_have_decl_sleep != yes; then
30030     HAVE_SLEEP=0
30031   else
30032         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
30033 printf %s "checking for working sleep... " >&6; }
30034 if ${gl_cv_func_sleep_works+:} false; then :
30035   printf %s "(cached) " >&6
30036 else
30037   if test "$cross_compiling" = yes; then :
30038   case "$host_os" in
30039                  # Guess yes on glibc systems.
30040          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
30041                  # If we don't know, assume the worst.
30042          *)      gl_cv_func_sleep_works="guessing no" ;;
30043        esac
30044
30045 else
30046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30047 /* end confdefs.h.  */
30048
30049 #include <errno.h>
30050 #include <unistd.h>
30051 #include <signal.h>
30052 static void
30053 handle_alarm (int sig)
30054 {
30055   if (sig != SIGALRM)
30056     _exit (2);
30057 }
30058
30059 int
30060 main ()
30061 {
30062
30063     /* Failure to compile this test due to missing alarm is okay,
30064        since all such platforms (mingw) also lack sleep.  */
30065     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
30066     unsigned int remaining;
30067     signal (SIGALRM, handle_alarm);
30068     alarm (1);
30069     remaining = sleep (pentecost);
30070     if (remaining > pentecost)
30071       return 3;
30072     if (remaining <= pentecost - 10)
30073       return 4;
30074     return 0;
30075
30076   ;
30077   return 0;
30078 }
30079 _ACEOF
30080 if ac_fn_c_try_run "$LINENO"; then :
30081   gl_cv_func_sleep_works=yes
30082 else
30083   gl_cv_func_sleep_works=no
30084 fi
30085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30086   conftest.$ac_objext conftest.beam conftest.$ac_ext
30087 fi
30088
30089 fi
30090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
30091 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
30092     case "$gl_cv_func_sleep_works" in
30093       *yes) ;;
30094       *)
30095         REPLACE_SLEEP=1
30096         ;;
30097     esac
30098   fi
30099
30100   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
30101
30102
30103
30104
30105
30106
30107
30108
30109   gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
30110
30111   fi
30112
30113
30114
30115
30116
30117     if test "$GNULIB_SLEEP" != 1; then
30118         if test "$GNULIB_SLEEP" = 0; then
30119       GNULIB_SLEEP=$gl_module_indicator_condition
30120     else
30121       GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
30122     fi
30123   fi
30124
30125
30126
30127
30128
30129 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
30130
30131
30132
30133
30134
30135
30136   gl_cv_func_snprintf_usable=no
30137   for ac_func in snprintf
30138 do :
30139   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30140 if test "x$ac_cv_func_snprintf" = xyes; then :
30141   cat >>confdefs.h <<_ACEOF
30142 #define HAVE_SNPRINTF 1
30143 _ACEOF
30144
30145 fi
30146 done
30147
30148   if test $ac_cv_func_snprintf = yes; then
30149
30150
30151
30152   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
30153 printf %s "checking whether snprintf respects a size of 1... " >&6; }
30154 if ${gl_cv_func_snprintf_size1+:} false; then :
30155   printf %s "(cached) " >&6
30156 else
30157
30158       if test "$cross_compiling" = yes; then :
30159   gl_cv_func_snprintf_size1="guessing yes"
30160 else
30161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30162 /* end confdefs.h.  */
30163
30164 #include <stdio.h>
30165 #if HAVE_SNPRINTF
30166 # define my_snprintf snprintf
30167 #else
30168 # include <stdarg.h>
30169 static int my_snprintf (char *buf, int size, const char *format, ...)
30170 {
30171   va_list args;
30172   int ret;
30173   va_start (args, format);
30174   ret = vsnprintf (buf, size, format, args);
30175   va_end (args);
30176   return ret;
30177 }
30178 #endif
30179 int main()
30180 {
30181   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
30182   my_snprintf (buf, 1, "%d", 12345);
30183   return buf[1] != 'E';
30184 }
30185 _ACEOF
30186 if ac_fn_c_try_run "$LINENO"; then :
30187   gl_cv_func_snprintf_size1=yes
30188 else
30189   gl_cv_func_snprintf_size1=no
30190 fi
30191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30192   conftest.$ac_objext conftest.beam conftest.$ac_ext
30193 fi
30194
30195
30196 fi
30197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
30198 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
30199
30200     case "$gl_cv_func_snprintf_size1" in
30201       *yes)
30202
30203         case "$gl_cv_func_snprintf_retval_c99" in
30204           *yes)
30205
30206
30207      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
30208 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
30209 if ${gl_cv_func_printf_positions+:} false; then :
30210   printf %s "(cached) " >&6
30211 else
30212
30213       if test "$cross_compiling" = yes; then :
30214
30215          case "$host_os" in
30216            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
30217                          gl_cv_func_printf_positions="guessing no";;
30218            beos*)        gl_cv_func_printf_positions="guessing no";;
30219            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
30220            *)            gl_cv_func_printf_positions="guessing yes";;
30221          esac
30222
30223 else
30224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30225 /* end confdefs.h.  */
30226
30227 #include <stdio.h>
30228 #include <string.h>
30229 /* The string "%2$d %1$d", with dollar characters protected from the shell's
30230    dollar expansion (possibly an autoconf bug).  */
30231 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
30232 static char buf[100];
30233 int main ()
30234 {
30235   sprintf (buf, format, 33, 55);
30236   return (strcmp (buf, "55 33") != 0);
30237 }
30238 _ACEOF
30239 if ac_fn_c_try_run "$LINENO"; then :
30240   gl_cv_func_printf_positions=yes
30241 else
30242   gl_cv_func_printf_positions=no
30243 fi
30244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30245   conftest.$ac_objext conftest.beam conftest.$ac_ext
30246 fi
30247
30248
30249 fi
30250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
30251 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
30252
30253             case "$gl_cv_func_printf_positions" in
30254               *yes)
30255                 gl_cv_func_snprintf_usable=yes
30256                 ;;
30257             esac
30258             ;;
30259         esac
30260         ;;
30261     esac
30262   fi
30263   if test $gl_cv_func_snprintf_usable = no; then
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274   gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
30275
30276   if test $ac_cv_func_snprintf = yes; then
30277     REPLACE_SNPRINTF=1
30278   fi
30279   :
30280
30281   fi
30282
30283   if test $ac_cv_have_decl_snprintf = no; then
30284     HAVE_DECL_SNPRINTF=0
30285   fi
30286
30287
30288
30289
30290
30291
30292     if test "$GNULIB_SNPRINTF" != 1; then
30293         if test "$GNULIB_SNPRINTF" = 0; then
30294       GNULIB_SNPRINTF=$gl_module_indicator_condition
30295     else
30296       GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)"
30297     fi
30298   fi
30299
30300
30301
30302
30303
30304 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
30305
30306
30307
30308
30309
30310 cat >>confdefs.h <<_ACEOF
30311 #define GNULIB_SNPRINTF $gl_module_indicator_condition
30312 _ACEOF
30313
30314
30315
30316
30317
30318
30319
30320   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
30321   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
30322   # irrelevant for anonymous mappings.
30323   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
30324 if test "x$ac_cv_func_mmap" = xyes; then :
30325   gl_have_mmap=yes
30326 else
30327   gl_have_mmap=no
30328 fi
30329
30330
30331   # Try to allow MAP_ANONYMOUS.
30332   gl_have_mmap_anonymous=no
30333   if test $gl_have_mmap = yes; then
30334     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
30335 printf %s "checking for MAP_ANONYMOUS... " >&6; }
30336     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30337 /* end confdefs.h.  */
30338
30339 #include <sys/mman.h>
30340 #ifdef MAP_ANONYMOUS
30341     I cannot identify this map
30342 #endif
30343
30344 _ACEOF
30345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30346   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
30347   gl_have_mmap_anonymous=yes
30348 fi
30349 rm -rf conftest*
30350
30351     if test $gl_have_mmap_anonymous != yes; then
30352       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30353 /* end confdefs.h.  */
30354
30355 #include <sys/mman.h>
30356 #ifdef MAP_ANON
30357     I cannot identify this map
30358 #endif
30359
30360 _ACEOF
30361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30362   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
30363
30364 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
30365
30366          gl_have_mmap_anonymous=yes
30367 fi
30368 rm -rf conftest*
30369
30370     fi
30371     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
30372 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
30373     if test $gl_have_mmap_anonymous = yes; then
30374
30375 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
30376
30377     fi
30378   fi
30379
30380
30381
30382
30383
30384
30385         if test $ac_cv_func_symlink = no; then
30386     HAVE_SYMLINK=0
30387   else
30388     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
30389 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
30390 if ${gl_cv_func_symlink_works+:} false; then :
30391   printf %s "(cached) " >&6
30392 else
30393   if test "$cross_compiling" = yes; then :
30394   case "$host_os" in
30395                     # Guess yes on glibc systems.
30396             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
30397                     # If we don't know, assume the worst.
30398             *)      gl_cv_func_symlink_works="guessing no" ;;
30399           esac
30400
30401 else
30402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30403 /* end confdefs.h.  */
30404 #include <unistd.h>
30405
30406 int
30407 main ()
30408 {
30409 int result = 0;
30410              if (!symlink ("a", "conftest.link/"))
30411                result |= 1;
30412              if (symlink ("conftest.f", "conftest.lnk2"))
30413                result |= 2;
30414              else if (!symlink ("a", "conftest.lnk2/"))
30415                result |= 4;
30416              return result;
30417
30418   ;
30419   return 0;
30420 }
30421 _ACEOF
30422 if ac_fn_c_try_run "$LINENO"; then :
30423   gl_cv_func_symlink_works=yes
30424 else
30425   gl_cv_func_symlink_works=no
30426 fi
30427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30428   conftest.$ac_objext conftest.beam conftest.$ac_ext
30429 fi
30430
30431       rm -f conftest.f conftest.link conftest.lnk2
30432 fi
30433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
30434 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
30435     case "$gl_cv_func_symlink_works" in
30436       *yes) ;;
30437       *)
30438         REPLACE_SYMLINK=1
30439         ;;
30440     esac
30441   fi
30442
30443   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
30444
30445
30446
30447
30448
30449
30450
30451
30452   gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
30453
30454   fi
30455
30456
30457
30458
30459
30460     if test "$GNULIB_SYMLINK" != 1; then
30461         if test "$GNULIB_SYMLINK" = 0; then
30462       GNULIB_SYMLINK=$gl_module_indicator_condition
30463     else
30464       GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
30465     fi
30466   fi
30467
30468
30469
30470
30471
30472 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
30473
30474
30475
30476
30477
30478
30479   if test $ac_cv_have_decl_unsetenv = no; then
30480     HAVE_DECL_UNSETENV=0
30481   fi
30482   for ac_func in unsetenv
30483 do :
30484   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30485 if test "x$ac_cv_func_unsetenv" = xyes; then :
30486   cat >>confdefs.h <<_ACEOF
30487 #define HAVE_UNSETENV 1
30488 _ACEOF
30489
30490 fi
30491 done
30492
30493   if test $ac_cv_func_unsetenv = no; then
30494     HAVE_UNSETENV=0
30495   else
30496     HAVE_UNSETENV=1
30497         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30498 printf %s "checking for unsetenv() return type... " >&6; }
30499 if ${gt_cv_func_unsetenv_ret+:} false; then :
30500   printf %s "(cached) " >&6
30501 else
30502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503 /* end confdefs.h.  */
30504
30505 #undef _BSD
30506 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30507 #include <stdlib.h>
30508 extern
30509 #ifdef __cplusplus
30510 "C"
30511 #endif
30512 int unsetenv (const char *name);
30513
30514 int
30515 main ()
30516 {
30517
30518   ;
30519   return 0;
30520 }
30521 _ACEOF
30522 if ac_fn_c_try_compile "$LINENO"; then :
30523   gt_cv_func_unsetenv_ret='int'
30524 else
30525   gt_cv_func_unsetenv_ret='void'
30526 fi
30527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30528 fi
30529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30530 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
30531     if test $gt_cv_func_unsetenv_ret = 'void'; then
30532
30533 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
30534
30535       REPLACE_UNSETENV=1
30536     fi
30537
30538                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30539 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
30540 if ${gl_cv_func_unsetenv_works+:} false; then :
30541   printf %s "(cached) " >&6
30542 else
30543   if test "$cross_compiling" = yes; then :
30544   case "$host_os" in
30545                  # Guess yes on glibc systems.
30546          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
30547                  # If we don't know, assume the worst.
30548          *)      gl_cv_func_unsetenv_works="guessing no" ;;
30549        esac
30550
30551 else
30552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30553 /* end confdefs.h.  */
30554
30555        #include <stdlib.h>
30556        #include <errno.h>
30557        extern char **environ;
30558
30559 int
30560 main ()
30561 {
30562
30563        char entry1[] = "a=1";
30564        char entry2[] = "b=2";
30565        char *env[] = { entry1, entry2, NULL };
30566        if (putenv ((char *) "a=1")) return 1;
30567        if (putenv (entry2)) return 2;
30568        entry2[0] = 'a';
30569        unsetenv ("a");
30570        if (getenv ("a")) return 3;
30571        if (!unsetenv ("") || errno != EINVAL) return 4;
30572        entry2[0] = 'b';
30573        environ = env;
30574        if (!getenv ("a")) return 5;
30575        entry2[0] = 'a';
30576        unsetenv ("a");
30577        if (getenv ("a")) return 6;
30578
30579   ;
30580   return 0;
30581 }
30582 _ACEOF
30583 if ac_fn_c_try_run "$LINENO"; then :
30584   gl_cv_func_unsetenv_works=yes
30585 else
30586   gl_cv_func_unsetenv_works=no
30587 fi
30588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30589   conftest.$ac_objext conftest.beam conftest.$ac_ext
30590 fi
30591
30592 fi
30593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30594 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
30595     case "$gl_cv_func_unsetenv_works" in
30596       *yes) ;;
30597       *)
30598         REPLACE_UNSETENV=1
30599         ;;
30600     esac
30601   fi
30602
30603   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
30604
30605
30606
30607
30608
30609
30610
30611
30612   gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext"
30613
30614
30615
30616
30617
30618   fi
30619
30620
30621
30622
30623
30624     if test "$GNULIB_UNSETENV" != 1; then
30625         if test "$GNULIB_UNSETENV" = 0; then
30626       GNULIB_UNSETENV=$gl_module_indicator_condition
30627     else
30628       GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)"
30629     fi
30630   fi
30631
30632
30633
30634
30635
30636 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30637
30638
30639
30640   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
30641
30642
30643
30644
30645
30646   ac_fn_c_check_type "$LINENO" "useconds_t" "ac_cv_type_useconds_t" "$ac_includes_default"
30647 if test "x$ac_cv_type_useconds_t" = xyes; then :
30648
30649 else
30650
30651 printf "%s\n" "#define useconds_t unsigned int" >>confdefs.h
30652
30653 fi
30654
30655   if test $ac_cv_func_usleep = no; then
30656     HAVE_USLEEP=0
30657   else
30658             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether usleep allows large arguments" >&5
30659 printf %s "checking whether usleep allows large arguments... " >&6; }
30660 if ${gl_cv_func_usleep_works+:} false; then :
30661   printf %s "(cached) " >&6
30662 else
30663   if test "$cross_compiling" = yes; then :
30664   case "$host_os" in
30665                    # Guess yes on glibc systems.
30666            *-gnu*) gl_cv_func_usleep_works="guessing yes" ;;
30667                    # If we don't know, assume the worst.
30668            *)      gl_cv_func_usleep_works="guessing no" ;;
30669          esac
30670
30671 else
30672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30673 /* end confdefs.h.  */
30674
30675 #include <unistd.h>
30676
30677 int
30678 main ()
30679 {
30680 return !!usleep (1000000);
30681   ;
30682   return 0;
30683 }
30684 _ACEOF
30685 if ac_fn_c_try_run "$LINENO"; then :
30686   gl_cv_func_usleep_works=yes
30687 else
30688   gl_cv_func_usleep_works=no
30689 fi
30690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30691   conftest.$ac_objext conftest.beam conftest.$ac_ext
30692 fi
30693
30694 fi
30695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5
30696 printf "%s\n" "$gl_cv_func_usleep_works" >&6; }
30697     case "$gl_cv_func_usleep_works" in
30698       *yes) ;;
30699       *)
30700         REPLACE_USLEEP=1
30701         ;;
30702     esac
30703   fi
30704
30705   if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then
30706
30707
30708
30709
30710
30711
30712
30713
30714   gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
30715
30716   fi
30717
30718
30719
30720
30721
30722     if test "$GNULIB_USLEEP" != 1; then
30723         if test "$GNULIB_USLEEP" = 0; then
30724       GNULIB_USLEEP=$gl_module_indicator_condition
30725     else
30726       GNULIB_USLEEP="($GNULIB_USLEEP || $gl_module_indicator_condition)"
30727     fi
30728   fi
30729
30730
30731
30732
30733
30734 printf "%s\n" "#define GNULIB_TEST_USLEEP 1" >>confdefs.h
30735
30736
30737
30738   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
30739
30740
30741
30742
30743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
30744 printf %s "checking for a traditional french locale... " >&6; }
30745 if ${gt_cv_locale_fr+:} false; then :
30746   printf %s "(cached) " >&6
30747 else
30748
30749     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750 /* end confdefs.h.  */
30751
30752 #include <locale.h>
30753 #include <time.h>
30754 #if HAVE_LANGINFO_CODESET
30755 # include <langinfo.h>
30756 #endif
30757 #include <stdlib.h>
30758 #include <string.h>
30759 struct tm t;
30760 char buf[16];
30761 int main () {
30762   /* Check whether the given locale name is recognized by the system.  */
30763 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
30764   /* On native Windows, setlocale(category, "") looks at the system settings,
30765      not at the environment variables.  Also, when an encoding suffix such
30766      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30767      category of the locale to "C".  */
30768   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30769       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30770     return 1;
30771 #else
30772   if (setlocale (LC_ALL, "") == NULL) return 1;
30773 #endif
30774   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30775      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30776      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30777      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30778      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30779      some unit tests fail.
30780      On MirBSD 10, when an unsupported locale is specified, setlocale()
30781      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
30782 #if HAVE_LANGINFO_CODESET
30783   {
30784     const char *cs = nl_langinfo (CODESET);
30785     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
30786         || strcmp (cs, "UTF-8") == 0)
30787       return 1;
30788   }
30789 #endif
30790 #ifdef __CYGWIN__
30791   /* On Cygwin, avoid locale names without encoding suffix, because the
30792      locale_charset() function relies on the encoding suffix.  Note that
30793      LC_ALL is set on the command line.  */
30794   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30795 #endif
30796   /* Check whether in the abbreviation of the second month, the second
30797      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
30798      one byte long. This excludes the UTF-8 encoding.  */
30799   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30800   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
30801 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
30802   /* Check whether the decimal separator is a comma.
30803      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30804      are nl_langinfo(RADIXCHAR) are both ".".  */
30805   if (localeconv () ->decimal_point[0] != ',') return 1;
30806 #endif
30807   return 0;
30808 }
30809
30810 _ACEOF
30811     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30812   (eval $ac_link) 2>&5
30813   ac_status=$?
30814   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30815   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30816       case "$host_os" in
30817         # Handle native Windows specially, because there setlocale() interprets
30818         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30819         # "fr" or "fra" as "French" or "French_France.1252",
30820         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30821         # "ja" as "Japanese" or "Japanese_Japan.932",
30822         # and similar.
30823         mingw*)
30824           # Test for the native Windows locale name.
30825           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30826             gt_cv_locale_fr=French_France.1252
30827           else
30828             # None found.
30829             gt_cv_locale_fr=none
30830           fi
30831           ;;
30832         *)
30833           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30834           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30835           # configure script would override the LC_ALL setting. Likewise for
30836           # LC_CTYPE, which is also set at the beginning of the configure script.
30837           # Test for the usual locale name.
30838           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30839             gt_cv_locale_fr=fr_FR
30840           else
30841             # Test for the locale name with explicit encoding suffix.
30842             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30843               gt_cv_locale_fr=fr_FR.ISO-8859-1
30844             else
30845               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
30846               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30847                 gt_cv_locale_fr=fr_FR.ISO8859-1
30848               else
30849                 # Test for the HP-UX locale name.
30850                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30851                   gt_cv_locale_fr=fr_FR.iso88591
30852                 else
30853                   # Test for the Solaris 7 locale name.
30854                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30855                     gt_cv_locale_fr=fr
30856                   else
30857                     # None found.
30858                     gt_cv_locale_fr=none
30859                   fi
30860                 fi
30861               fi
30862             fi
30863           fi
30864           ;;
30865       esac
30866     fi
30867     rm -fr conftest*
30868
30869 fi
30870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
30871 printf "%s\n" "$gt_cv_locale_fr" >&6; }
30872   LOCALE_FR=$gt_cv_locale_fr
30873
30874
30875
30876
30877   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
30878 printf %s "checking for a french Unicode locale... " >&6; }
30879 if ${gt_cv_locale_fr_utf8+:} false; then :
30880   printf %s "(cached) " >&6
30881 else
30882
30883     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884 /* end confdefs.h.  */
30885
30886 #include <locale.h>
30887 #include <time.h>
30888 #if HAVE_LANGINFO_CODESET
30889 # include <langinfo.h>
30890 #endif
30891 #include <stdlib.h>
30892 #include <string.h>
30893 struct tm t;
30894 char buf[16];
30895 int main () {
30896   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
30897      imitates locale dependent behaviour by looking at the environment
30898      variables, and all locales use the UTF-8 encoding.  */
30899 #if !(defined __BEOS__ || defined __HAIKU__)
30900   /* Check whether the given locale name is recognized by the system.  */
30901 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
30902   /* On native Windows, setlocale(category, "") looks at the system settings,
30903      not at the environment variables.  Also, when an encoding suffix such
30904      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30905      category of the locale to "C".  */
30906   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30907       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30908     return 1;
30909 # else
30910   if (setlocale (LC_ALL, "") == NULL) return 1;
30911 # endif
30912   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30913      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30914      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30915      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30916      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30917      some unit tests fail.  */
30918 # if HAVE_LANGINFO_CODESET
30919   {
30920     const char *cs = nl_langinfo (CODESET);
30921     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
30922       return 1;
30923   }
30924 # endif
30925 # ifdef __CYGWIN__
30926   /* On Cygwin, avoid locale names without encoding suffix, because the
30927      locale_charset() function relies on the encoding suffix.  Note that
30928      LC_ALL is set on the command line.  */
30929   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30930 # endif
30931   /* Check whether in the abbreviation of the second month, the second
30932      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
30933      two bytes long, with UTF-8 encoding.  */
30934   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30935   if (strftime (buf, sizeof (buf), "%b", &t) < 4
30936       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
30937     return 1;
30938 #endif
30939 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
30940   /* Check whether the decimal separator is a comma.
30941      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30942      are nl_langinfo(RADIXCHAR) are both ".".  */
30943   if (localeconv () ->decimal_point[0] != ',') return 1;
30944 #endif
30945   return 0;
30946 }
30947
30948 _ACEOF
30949     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30950   (eval $ac_link) 2>&5
30951   ac_status=$?
30952   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30953   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30954       case "$host_os" in
30955         # Handle native Windows specially, because there setlocale() interprets
30956         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30957         # "fr" or "fra" as "French" or "French_France.1252",
30958         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30959         # "ja" as "Japanese" or "Japanese_Japan.932",
30960         # and similar.
30961         mingw*)
30962           # Test for the hypothetical native Windows locale name.
30963           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30964             gt_cv_locale_fr_utf8=French_France.65001
30965           else
30966             # None found.
30967             gt_cv_locale_fr_utf8=none
30968           fi
30969           ;;
30970         *)
30971           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30972           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30973           # configure script would override the LC_ALL setting. Likewise for
30974           # LC_CTYPE, which is also set at the beginning of the configure script.
30975           # Test for the usual locale name.
30976           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30977             gt_cv_locale_fr_utf8=fr_FR
30978           else
30979             # Test for the locale name with explicit encoding suffix.
30980             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30981               gt_cv_locale_fr_utf8=fr_FR.UTF-8
30982             else
30983               # Test for the Solaris 7 locale name.
30984               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30985                 gt_cv_locale_fr_utf8=fr.UTF-8
30986               else
30987                 # None found.
30988                 gt_cv_locale_fr_utf8=none
30989               fi
30990             fi
30991           fi
30992           ;;
30993       esac
30994     fi
30995     rm -fr conftest*
30996
30997 fi
30998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
30999 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
31000   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
31001
31002
31003
31004
31005
31006   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
31007 printf %s "checking for a traditional japanese locale... " >&6; }
31008 if ${gt_cv_locale_ja+:} false; then :
31009   printf %s "(cached) " >&6
31010 else
31011
31012     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31013 /* end confdefs.h.  */
31014
31015 #include <locale.h>
31016 #include <time.h>
31017 #if HAVE_LANGINFO_CODESET
31018 # include <langinfo.h>
31019 #endif
31020 #include <stdlib.h>
31021 #include <string.h>
31022 struct tm t;
31023 char buf[16];
31024 int main ()
31025 {
31026   const char *p;
31027   /* Check whether the given locale name is recognized by the system.  */
31028 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31029   /* On native Windows, setlocale(category, "") looks at the system settings,
31030      not at the environment variables.  Also, when an encoding suffix such
31031      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
31032      category of the locale to "C".  */
31033   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31034       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31035     return 1;
31036 #else
31037   if (setlocale (LC_ALL, "") == NULL) return 1;
31038 #endif
31039   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31040      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31041      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31042      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31043      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31044      some unit tests fail.
31045      On MirBSD 10, when an unsupported locale is specified, setlocale()
31046      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31047 #if HAVE_LANGINFO_CODESET
31048   {
31049     const char *cs = nl_langinfo (CODESET);
31050     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31051         || strcmp (cs, "UTF-8") == 0)
31052       return 1;
31053   }
31054 #endif
31055 #ifdef __CYGWIN__
31056   /* On Cygwin, avoid locale names without encoding suffix, because the
31057      locale_charset() function relies on the encoding suffix.  Note that
31058      LC_ALL is set on the command line.  */
31059   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31060 #endif
31061   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
31062      on Cygwin 1.5.x.  */
31063   if (MB_CUR_MAX == 1)
31064     return 1;
31065   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31066      This excludes the UTF-8 encoding (except on MirBSD).  */
31067   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31068   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31069   for (p = buf; *p != '\0'; p++)
31070     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31071       return 1;
31072   return 0;
31073 }
31074
31075 _ACEOF
31076     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31077   (eval $ac_link) 2>&5
31078   ac_status=$?
31079   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31080   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31081       case "$host_os" in
31082         # Handle native Windows specially, because there setlocale() interprets
31083         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31084         # "fr" or "fra" as "French" or "French_France.1252",
31085         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31086         # "ja" as "Japanese" or "Japanese_Japan.932",
31087         # and similar.
31088         mingw*)
31089           # Note that on native Windows, the Japanese locale is
31090           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
31091           # cannot use it here.
31092           gt_cv_locale_ja=none
31093           ;;
31094         *)
31095           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31096           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31097           # configure script would override the LC_ALL setting. Likewise for
31098           # LC_CTYPE, which is also set at the beginning of the configure script.
31099           # Test for the AIX locale name.
31100           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31101             gt_cv_locale_ja=ja_JP
31102           else
31103             # Test for the locale name with explicit encoding suffix.
31104             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31105               gt_cv_locale_ja=ja_JP.EUC-JP
31106             else
31107               # Test for the HP-UX, OSF/1, NetBSD locale name.
31108               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31109                 gt_cv_locale_ja=ja_JP.eucJP
31110               else
31111                 # Test for the IRIX, FreeBSD locale name.
31112                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31113                   gt_cv_locale_ja=ja_JP.EUC
31114                 else
31115                   # Test for the Solaris 7 locale name.
31116                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31117                     gt_cv_locale_ja=ja
31118                   else
31119                     # Special test for NetBSD 1.6.
31120                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
31121                       gt_cv_locale_ja=ja_JP.eucJP
31122                     else
31123                       # None found.
31124                       gt_cv_locale_ja=none
31125                     fi
31126                   fi
31127                 fi
31128               fi
31129             fi
31130           fi
31131           ;;
31132       esac
31133     fi
31134     rm -fr conftest*
31135
31136 fi
31137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
31138 printf "%s\n" "$gt_cv_locale_ja" >&6; }
31139   LOCALE_JA=$gt_cv_locale_ja
31140
31141
31142
31143
31144
31145   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
31146 printf %s "checking for a transitional chinese locale... " >&6; }
31147 if ${gt_cv_locale_zh_CN+:} false; then :
31148   printf %s "(cached) " >&6
31149 else
31150
31151     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31152 /* end confdefs.h.  */
31153
31154 #include <locale.h>
31155 #include <stdlib.h>
31156 #include <time.h>
31157 #if HAVE_LANGINFO_CODESET
31158 # include <langinfo.h>
31159 #endif
31160 #include <stdlib.h>
31161 #include <string.h>
31162 struct tm t;
31163 char buf[16];
31164 int main ()
31165 {
31166   const char *p;
31167   /* Check whether the given locale name is recognized by the system.  */
31168 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31169   /* On native Windows, setlocale(category, "") looks at the system settings,
31170      not at the environment variables.  Also, when an encoding suffix such
31171      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
31172      category of the locale to "C".  */
31173   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31174       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31175     return 1;
31176 #else
31177   if (setlocale (LC_ALL, "") == NULL) return 1;
31178 #endif
31179   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31180      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31181      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31182      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31183      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31184      some unit tests fail.
31185      On MirBSD 10, when an unsupported locale is specified, setlocale()
31186      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31187 #if HAVE_LANGINFO_CODESET
31188   {
31189     const char *cs = nl_langinfo (CODESET);
31190     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31191         || strcmp (cs, "UTF-8") == 0)
31192       return 1;
31193   }
31194 #endif
31195 #ifdef __CYGWIN__
31196   /* On Cygwin, avoid locale names without encoding suffix, because the
31197      locale_charset() function relies on the encoding suffix.  Note that
31198      LC_ALL is set on the command line.  */
31199   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31200 #endif
31201   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31202      This excludes the UTF-8 encoding (except on MirBSD).  */
31203   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31204   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31205   for (p = buf; *p != '\0'; p++)
31206     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31207       return 1;
31208   /* Check whether a typical GB18030 multibyte sequence is recognized as a
31209      single wide character.  This excludes the GB2312 and GBK encodings.  */
31210   if (mblen ("\203\062\332\066", 5) != 4)
31211     return 1;
31212   return 0;
31213 }
31214
31215 _ACEOF
31216     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31217   (eval $ac_link) 2>&5
31218   ac_status=$?
31219   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31220   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31221       case "$host_os" in
31222         # Handle native Windows specially, because there setlocale() interprets
31223         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31224         # "fr" or "fra" as "French" or "French_France.1252",
31225         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31226         # "ja" as "Japanese" or "Japanese_Japan.932",
31227         # and similar.
31228         mingw*)
31229           # Test for the hypothetical native Windows locale name.
31230           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31231             gt_cv_locale_zh_CN=Chinese_China.54936
31232           else
31233             # None found.
31234             gt_cv_locale_zh_CN=none
31235           fi
31236           ;;
31237         solaris2.8)
31238           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
31239           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
31240           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
31241           gt_cv_locale_zh_CN=none
31242           ;;
31243         *)
31244           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31245           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31246           # configure script would override the LC_ALL setting. Likewise for
31247           # LC_CTYPE, which is also set at the beginning of the configure script.
31248           # Test for the locale name without encoding suffix.
31249           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31250             gt_cv_locale_zh_CN=zh_CN
31251           else
31252             # Test for the locale name with explicit encoding suffix.
31253             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31254               gt_cv_locale_zh_CN=zh_CN.GB18030
31255             else
31256               # None found.
31257               gt_cv_locale_zh_CN=none
31258             fi
31259           fi
31260           ;;
31261       esac
31262     else
31263       # If there was a link error, due to mblen(), the system is so old that
31264       # it certainly doesn't have a chinese locale.
31265       gt_cv_locale_zh_CN=none
31266     fi
31267     rm -fr conftest*
31268
31269 fi
31270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
31271 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
31272   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
31273
31274
31275
31276
31277
31278
31279   if test $ac_cv_func_wctob = no; then
31280     HAVE_WCTOB=0
31281     HAVE_DECL_WCTOB=0
31282   else
31283     HAVE_WCTOB=1
31284
31285
31286
31287          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
31288 printf %s "checking whether wctob works... " >&6; }
31289 if ${gl_cv_func_wctob_works+:} false; then :
31290   printf %s "(cached) " >&6
31291 else
31292
31293                         case "$host_os" in
31294             # Guess no on Solaris <= 9 and Cygwin.
31295           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
31296             gl_cv_func_wctob_works="guessing no" ;;
31297             # Guess yes otherwise.
31298           *) gl_cv_func_wctob_works="guessing yes" ;;
31299         esac
31300         case "$host_os" in
31301           cygwin*)
31302             if test "$cross_compiling" = yes; then :
31303   :
31304 else
31305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31306 /* end confdefs.h.  */
31307
31308 #include <locale.h>
31309 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31310    <wchar.h>.
31311    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31312    included before <wchar.h>.  */
31313 #include <stddef.h>
31314 #include <stdio.h>
31315 #include <time.h>
31316 #include <wchar.h>
31317
31318 register long global __asm__ ("%ebx");
31319
31320 int main ()
31321 {
31322   setlocale (LC_ALL, "en_US.UTF-8");
31323
31324   global = 0x12345678;
31325   if (wctob (0x00FC) != -1)
31326     return 1;
31327   if (global != 0x12345678)
31328     return 2;
31329   return 0;
31330 }
31331 _ACEOF
31332 if ac_fn_c_try_run "$LINENO"; then :
31333   :
31334 else
31335   gl_cv_func_wctob_works=no
31336 fi
31337 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31338   conftest.$ac_objext conftest.beam conftest.$ac_ext
31339 fi
31340
31341             ;;
31342         esac
31343         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
31344           if test "$cross_compiling" = yes; then :
31345   :
31346 else
31347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31348 /* end confdefs.h.  */
31349
31350 #include <locale.h>
31351 #include <string.h>
31352 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31353    <wchar.h>.
31354    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31355    included before <wchar.h>.  */
31356 #include <stddef.h>
31357 #include <stdio.h>
31358 #include <time.h>
31359 #include <wchar.h>
31360 int main ()
31361 {
31362   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31363     {
31364       wchar_t wc;
31365
31366       if (mbtowc (&wc, "\374", 1) == 1)
31367         if (wctob (wc) != (unsigned char) '\374')
31368           return 1;
31369     }
31370   return 0;
31371 }
31372 _ACEOF
31373 if ac_fn_c_try_run "$LINENO"; then :
31374   gl_cv_func_wctob_works=yes
31375 else
31376   gl_cv_func_wctob_works=no
31377 fi
31378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31379   conftest.$ac_objext conftest.beam conftest.$ac_ext
31380 fi
31381
31382         fi
31383
31384 fi
31385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
31386 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
31387     case "$gl_cv_func_wctob_works" in
31388       *yes) ;;
31389       *) REPLACE_WCTOB=1 ;;
31390     esac
31391     if test $REPLACE_WCTOB = 0; then
31392
31393             ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
31394 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31395    <wchar.h>.
31396    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
31397    before <wchar.h>.  */
31398 #include <stddef.h>
31399 #include <stdio.h>
31400 #include <time.h>
31401 #include <wchar.h>
31402
31403 "
31404 if test "x$ac_cv_have_decl_wctob" = xyes; then :
31405   ac_have_decl=1
31406 else
31407   ac_have_decl=0
31408 fi
31409
31410 cat >>confdefs.h <<_ACEOF
31411 #define HAVE_DECL_WCTOB $ac_have_decl
31412 _ACEOF
31413
31414       if test $ac_cv_have_decl_wctob != yes; then
31415         HAVE_DECL_WCTOB=0
31416       fi
31417     fi
31418   fi
31419
31420   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
31421
31422
31423
31424
31425
31426
31427
31428
31429   gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
31430
31431
31432   :
31433
31434   fi
31435
31436
31437
31438
31439
31440     if test "$GNULIB_WCTOB" != 1; then
31441         if test "$GNULIB_WCTOB" = 0; then
31442       GNULIB_WCTOB=$gl_module_indicator_condition
31443     else
31444       GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
31445     fi
31446   fi
31447
31448
31449
31450
31451
31452 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
31453
31454
31455
31456
31457
31458
31459   if false; then
31460     REPLACE_WCTOMB=1
31461   fi
31462
31463   if test $REPLACE_WCTOMB = 1; then
31464
31465
31466
31467
31468
31469
31470
31471
31472   gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
31473
31474
31475   :
31476
31477   fi
31478
31479
31480
31481
31482
31483     if test "$GNULIB_WCTOMB" != 1; then
31484         if test "$GNULIB_WCTOMB" = 0; then
31485       GNULIB_WCTOMB=$gl_module_indicator_condition
31486     else
31487       GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
31488     fi
31489   fi
31490
31491
31492
31493
31494
31495 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509   LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
31510
31511   LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
31512
31513   LIBTESTS_LIBDEPS="$gltests_libdeps"
31514
31515
31516
31517 # Check whether --enable-gcc-warnings was given.
31518 if test "${enable_gcc_warnings+set}" = set; then :
31519   enableval=$enable_gcc_warnings; case $enableval in
31520      yes|no) ;;
31521      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
31522    esac
31523    gl_gcc_warnings=$enableval
31524 else
31525   if test -d "$srcdir"/.git; then
31526      gl_gcc_warnings=yes
31527    else
31528      gl_gcc_warnings=no
31529    fi
31530
31531 fi
31532
31533
31534 if test "$gl_gcc_warnings" = yes; then
31535   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
31536 printf %s "checking whether C compiler handles -Werror... " >&6; }
31537 if ${gl_cv_warn_c__Werror+:} false; then :
31538   printf %s "(cached) " >&6
31539 else
31540
31541   gl_save_compiler_FLAGS="$CFLAGS"
31542   as_fn_append CFLAGS " -Werror"
31543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31544 /* end confdefs.h.  */
31545
31546 int
31547 main ()
31548 {
31549
31550   ;
31551   return 0;
31552 }
31553 _ACEOF
31554 if ac_fn_c_try_compile "$LINENO"; then :
31555   gl_cv_warn_c__Werror=yes
31556 else
31557   gl_cv_warn_c__Werror=no
31558 fi
31559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31560   CFLAGS="$gl_save_compiler_FLAGS"
31561
31562 fi
31563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
31564 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
31565 if test "x$gl_cv_warn_c__Werror" = xyes; then :
31566   as_fn_append WERROR_CFLAGS " -Werror"
31567 fi
31568
31569
31570
31571
31572   nw=
31573   # This, $nw, is the list of warnings we disable.
31574   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
31575   nw="$nw -Waggregate-return"       # anachronistic
31576   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
31577   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
31578   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
31579   nw="$nw -Wtraditional"            # Warns on #elif which we use often
31580   nw="$nw -Wcast-qual"              # Too many warnings for now
31581   nw="$nw -Wconversion"             # Too many warnings for now
31582   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
31583   nw="$nw -Wsign-conversion"        # Too many warnings for now
31584   nw="$nw -Wtraditional-conversion" # Too many warnings for now
31585   nw="$nw -Wunreachable-code"       # Too many warnings for now
31586   nw="$nw -Wpadded"                 # Our structs are not padded
31587   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
31588   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
31589   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
31590   nw="$nw -Wvla"                    # warnings in gettext.h
31591   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
31592   nw="$nw -Wswitch-enum"            # Too many warnings for now
31593   nw="$nw -Wswitch-default"         # Too many warnings for now
31594   nw="$nw -Wstack-protector"        # not worth working around
31595   # things I might fix soon:
31596   nw="$nw -Wfloat-equal"            # sort.c, seq.c
31597   nw="$nw -Wmissing-format-attribute" # copy.c
31598   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
31599   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
31600   nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
31601   nw="$nw -Wformat-extra-args"      # sdiff.c
31602   # ?? -Wstrict-overflow
31603
31604
31605
31606   if test -n "$GCC"; then
31607
31608             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
31609 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
31610     if ${gl_cv_cc_nomfi_supported+:} false; then :
31611   printf %s "(cached) " >&6
31612 else
31613
31614       gl_save_CFLAGS="$CFLAGS"
31615       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
31616       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31617 /* end confdefs.h.  */
31618
31619 int
31620 main ()
31621 {
31622
31623   ;
31624   return 0;
31625 }
31626 _ACEOF
31627 if ac_fn_c_try_compile "$LINENO"; then :
31628   gl_cv_cc_nomfi_supported=yes
31629 else
31630   gl_cv_cc_nomfi_supported=no
31631 fi
31632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31633       CFLAGS="$gl_save_CFLAGS"
31634 fi
31635
31636     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
31637 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
31638
31639     if test "$gl_cv_cc_nomfi_supported" = yes; then
31640                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
31641 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
31642       if ${gl_cv_cc_nomfi_needed+:} false; then :
31643   printf %s "(cached) " >&6
31644 else
31645
31646         gl_save_CFLAGS="$CFLAGS"
31647         CFLAGS="$CFLAGS -W -Werror"
31648         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31649 /* end confdefs.h.  */
31650 void f (void)
31651                {
31652                  typedef struct { int a; int b; } s_t;
31653                  s_t s1 = { 0, };
31654                }
31655
31656 int
31657 main ()
31658 {
31659
31660   ;
31661   return 0;
31662 }
31663 _ACEOF
31664 if ac_fn_c_try_compile "$LINENO"; then :
31665   gl_cv_cc_nomfi_needed=no
31666 else
31667   gl_cv_cc_nomfi_needed=yes
31668 fi
31669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31670         CFLAGS="$gl_save_CFLAGS"
31671
31672 fi
31673
31674       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
31675 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
31676     fi
31677
31678                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
31679 printf %s "checking whether -Wuninitialized is supported... " >&6; }
31680     if ${gl_cv_cc_uninitialized_supported+:} false; then :
31681   printf %s "(cached) " >&6
31682 else
31683
31684       gl_save_CFLAGS="$CFLAGS"
31685       CFLAGS="$CFLAGS -Werror -Wuninitialized"
31686       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31687 /* end confdefs.h.  */
31688
31689 int
31690 main ()
31691 {
31692
31693   ;
31694   return 0;
31695 }
31696 _ACEOF
31697 if ac_fn_c_try_compile "$LINENO"; then :
31698   gl_cv_cc_uninitialized_supported=yes
31699 else
31700   gl_cv_cc_uninitialized_supported=no
31701 fi
31702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31703       CFLAGS="$gl_save_CFLAGS"
31704 fi
31705
31706     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
31707 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
31708
31709   fi
31710
31711   # List all gcc warning categories.
31712   gl_manywarn_set=
31713   for gl_manywarn_item in \
31714     -W \
31715     -Wabi \
31716     -Waddress \
31717     -Wall \
31718     -Warray-bounds \
31719     -Wattributes \
31720     -Wbad-function-cast \
31721     -Wbuiltin-macro-redefined \
31722     -Wcast-align \
31723     -Wchar-subscripts \
31724     -Wclobbered \
31725     -Wcomment \
31726     -Wcomments \
31727     -Wcoverage-mismatch \
31728     -Wcpp \
31729     -Wdeprecated \
31730     -Wdeprecated-declarations \
31731     -Wdisabled-optimization \
31732     -Wdiv-by-zero \
31733     -Wdouble-promotion \
31734     -Wempty-body \
31735     -Wendif-labels \
31736     -Wenum-compare \
31737     -Wextra \
31738     -Wformat-contains-nul \
31739     -Wformat-extra-args \
31740     -Wformat-nonliteral \
31741     -Wformat-security \
31742     -Wformat-y2k \
31743     -Wformat-zero-length \
31744     -Wformat=2 \
31745     -Wfree-nonheap-object \
31746     -Wignored-qualifiers \
31747     -Wimplicit \
31748     -Wimplicit-function-declaration \
31749     -Wimplicit-int \
31750     -Winit-self \
31751     -Winline \
31752     -Wint-to-pointer-cast \
31753     -Winvalid-memory-model \
31754     -Winvalid-pch \
31755     -Wjump-misses-init \
31756     -Wlogical-op \
31757     -Wmain \
31758     -Wmaybe-uninitialized \
31759     -Wmissing-braces \
31760     -Wmissing-declarations \
31761     -Wmissing-field-initializers \
31762     -Wmissing-format-attribute \
31763     -Wmissing-include-dirs \
31764     -Wmissing-noreturn \
31765     -Wmissing-parameter-type \
31766     -Wmissing-prototypes \
31767     -Wmudflap \
31768     -Wmultichar \
31769     -Wnarrowing \
31770     -Wnested-externs \
31771     -Wnonnull \
31772     -Wnormalized=nfc \
31773     -Wold-style-declaration \
31774     -Wold-style-definition \
31775     -Woverflow \
31776     -Woverlength-strings \
31777     -Woverride-init \
31778     -Wpacked \
31779     -Wpacked-bitfield-compat \
31780     -Wparentheses \
31781     -Wpointer-arith \
31782     -Wpointer-sign \
31783     -Wpointer-to-int-cast \
31784     -Wpragmas \
31785     -Wreturn-type \
31786     -Wsequence-point \
31787     -Wshadow \
31788     -Wsizeof-pointer-memaccess \
31789     -Wstack-protector \
31790     -Wstrict-aliasing \
31791     -Wstrict-overflow \
31792     -Wstrict-prototypes \
31793     -Wsuggest-attribute=const \
31794     -Wsuggest-attribute=format \
31795     -Wsuggest-attribute=noreturn \
31796     -Wsuggest-attribute=pure \
31797     -Wswitch \
31798     -Wswitch-default \
31799     -Wsync-nand \
31800     -Wsystem-headers \
31801     -Wtrampolines \
31802     -Wtrigraphs \
31803     -Wtype-limits \
31804     -Wuninitialized \
31805     -Wunknown-pragmas \
31806     -Wunreachable-code \
31807     -Wunsafe-loop-optimizations \
31808     -Wunused \
31809     -Wunused-but-set-parameter \
31810     -Wunused-but-set-variable \
31811     -Wunused-function \
31812     -Wunused-label \
31813     -Wunused-local-typedefs \
31814     -Wunused-macros \
31815     -Wunused-parameter \
31816     -Wunused-result \
31817     -Wunused-value \
31818     -Wunused-variable \
31819     -Wvarargs \
31820     -Wvariadic-macros \
31821     -Wvector-operation-performance \
31822     -Wvla \
31823     -Wvolatile-register-var \
31824     -Wwrite-strings \
31825     \
31826     ; do
31827     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
31828   done
31829
31830   # Disable specific options as needed.
31831   if test "$gl_cv_cc_nomfi_needed" = yes; then
31832     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
31833   fi
31834
31835   if test "$gl_cv_cc_uninitialized_supported" = no; then
31836     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
31837   fi
31838
31839   ws=$gl_manywarn_set
31840
31841
31842   gl_warn_set=
31843   set x $ws; shift
31844   for gl_warn_item
31845   do
31846     case " $nw " in
31847       *" $gl_warn_item "*)
31848         ;;
31849       *)
31850         gl_warn_set="$gl_warn_set $gl_warn_item"
31851         ;;
31852     esac
31853   done
31854   ws=$gl_warn_set
31855
31856   for w in $ws; do
31857     as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
31858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
31859 printf %s "checking whether C compiler handles $w... " >&6; }
31860 if eval \${$as_gl_Warn+:} false; then :
31861   printf %s "(cached) " >&6
31862 else
31863
31864   gl_save_compiler_FLAGS="$CFLAGS"
31865   as_fn_append CFLAGS " $w"
31866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31867 /* end confdefs.h.  */
31868
31869 int
31870 main ()
31871 {
31872
31873   ;
31874   return 0;
31875 }
31876 _ACEOF
31877 if ac_fn_c_try_compile "$LINENO"; then :
31878   eval "$as_gl_Warn=yes"
31879 else
31880   eval "$as_gl_Warn=no"
31881 fi
31882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31883   CFLAGS="$gl_save_compiler_FLAGS"
31884
31885 fi
31886 eval ac_res=\$$as_gl_Warn
31887                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31888 printf "%s\n" "$ac_res" >&6; }
31889 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
31890   as_fn_append WARN_CFLAGS " $w"
31891 fi
31892
31893
31894   done
31895   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
31896 printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
31897 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
31898   printf %s "(cached) " >&6
31899 else
31900
31901   gl_save_compiler_FLAGS="$CFLAGS"
31902   as_fn_append CFLAGS " -Wno-missing-field-initializers"
31903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31904 /* end confdefs.h.  */
31905
31906 int
31907 main ()
31908 {
31909
31910   ;
31911   return 0;
31912 }
31913 _ACEOF
31914 if ac_fn_c_try_compile "$LINENO"; then :
31915   gl_cv_warn_c__Wno_missing_field_initializers=yes
31916 else
31917   gl_cv_warn_c__Wno_missing_field_initializers=no
31918 fi
31919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31920   CFLAGS="$gl_save_compiler_FLAGS"
31921
31922 fi
31923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
31924 printf "%s\n" "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
31925 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
31926   as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
31927 fi
31928
31929  # We need this one
31930   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
31931 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
31932 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
31933   printf %s "(cached) " >&6
31934 else
31935
31936   gl_save_compiler_FLAGS="$CFLAGS"
31937   as_fn_append CFLAGS " -Wno-sign-compare"
31938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31939 /* end confdefs.h.  */
31940
31941 int
31942 main ()
31943 {
31944
31945   ;
31946   return 0;
31947 }
31948 _ACEOF
31949 if ac_fn_c_try_compile "$LINENO"; then :
31950   gl_cv_warn_c__Wno_sign_compare=yes
31951 else
31952   gl_cv_warn_c__Wno_sign_compare=no
31953 fi
31954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31955   CFLAGS="$gl_save_compiler_FLAGS"
31956
31957 fi
31958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
31959 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
31960 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
31961   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
31962 fi
31963
31964      # Too many warnings for now
31965   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
31966 printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
31967 if ${gl_cv_warn_c__Wno_pointer_sign+:} false; then :
31968   printf %s "(cached) " >&6
31969 else
31970
31971   gl_save_compiler_FLAGS="$CFLAGS"
31972   as_fn_append CFLAGS " -Wno-pointer-sign"
31973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31974 /* end confdefs.h.  */
31975
31976 int
31977 main ()
31978 {
31979
31980   ;
31981   return 0;
31982 }
31983 _ACEOF
31984 if ac_fn_c_try_compile "$LINENO"; then :
31985   gl_cv_warn_c__Wno_pointer_sign=yes
31986 else
31987   gl_cv_warn_c__Wno_pointer_sign=no
31988 fi
31989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31990   CFLAGS="$gl_save_compiler_FLAGS"
31991
31992 fi
31993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
31994 printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
31995 if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes; then :
31996   as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
31997 fi
31998
31999      # Too many warnings for now
32000   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
32001 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
32002 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
32003   printf %s "(cached) " >&6
32004 else
32005
32006   gl_save_compiler_FLAGS="$CFLAGS"
32007   as_fn_append CFLAGS " -Wno-unused-parameter"
32008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32009 /* end confdefs.h.  */
32010
32011 int
32012 main ()
32013 {
32014
32015   ;
32016   return 0;
32017 }
32018 _ACEOF
32019 if ac_fn_c_try_compile "$LINENO"; then :
32020   gl_cv_warn_c__Wno_unused_parameter=yes
32021 else
32022   gl_cv_warn_c__Wno_unused_parameter=no
32023 fi
32024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32025   CFLAGS="$gl_save_compiler_FLAGS"
32026
32027 fi
32028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
32029 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
32030 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
32031   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
32032 fi
32033
32034  # Too many warnings for now
32035   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
32036 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
32037 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
32038   printf %s "(cached) " >&6
32039 else
32040
32041   gl_save_compiler_FLAGS="$CFLAGS"
32042   as_fn_append CFLAGS " -Wno-format-nonliteral"
32043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32044 /* end confdefs.h.  */
32045
32046 int
32047 main ()
32048 {
32049
32050   ;
32051   return 0;
32052 }
32053 _ACEOF
32054 if ac_fn_c_try_compile "$LINENO"; then :
32055   gl_cv_warn_c__Wno_format_nonliteral=yes
32056 else
32057   gl_cv_warn_c__Wno_format_nonliteral=no
32058 fi
32059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32060   CFLAGS="$gl_save_compiler_FLAGS"
32061
32062 fi
32063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
32064 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
32065 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
32066   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
32067 fi
32068
32069
32070
32071   # In spite of excluding -Wlogical-op above, it is enabled, as of
32072   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
32073   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
32074 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
32075 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
32076   printf %s "(cached) " >&6
32077 else
32078
32079   gl_save_compiler_FLAGS="$CFLAGS"
32080   as_fn_append CFLAGS " -Wno-logical-op"
32081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32082 /* end confdefs.h.  */
32083
32084 int
32085 main ()
32086 {
32087
32088   ;
32089   return 0;
32090 }
32091 _ACEOF
32092 if ac_fn_c_try_compile "$LINENO"; then :
32093   gl_cv_warn_c__Wno_logical_op=yes
32094 else
32095   gl_cv_warn_c__Wno_logical_op=no
32096 fi
32097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32098   CFLAGS="$gl_save_compiler_FLAGS"
32099
32100 fi
32101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
32102 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
32103 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
32104   as_fn_append WARN_CFLAGS " -Wno-logical-op"
32105 fi
32106
32107
32108
32109   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
32110 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
32111 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
32112   printf %s "(cached) " >&6
32113 else
32114
32115   gl_save_compiler_FLAGS="$CFLAGS"
32116   as_fn_append CFLAGS " -fdiagnostics-show-option"
32117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32118 /* end confdefs.h.  */
32119
32120 int
32121 main ()
32122 {
32123
32124   ;
32125   return 0;
32126 }
32127 _ACEOF
32128 if ac_fn_c_try_compile "$LINENO"; then :
32129   gl_cv_warn_c__fdiagnostics_show_option=yes
32130 else
32131   gl_cv_warn_c__fdiagnostics_show_option=no
32132 fi
32133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32134   CFLAGS="$gl_save_compiler_FLAGS"
32135
32136 fi
32137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
32138 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
32139 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
32140   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
32141 fi
32142
32143
32144   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
32145 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
32146 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
32147   printf %s "(cached) " >&6
32148 else
32149
32150   gl_save_compiler_FLAGS="$CFLAGS"
32151   as_fn_append CFLAGS " -funit-at-a-time"
32152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32153 /* end confdefs.h.  */
32154
32155 int
32156 main ()
32157 {
32158
32159   ;
32160   return 0;
32161 }
32162 _ACEOF
32163 if ac_fn_c_try_compile "$LINENO"; then :
32164   gl_cv_warn_c__funit_at_a_time=yes
32165 else
32166   gl_cv_warn_c__funit_at_a_time=no
32167 fi
32168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32169   CFLAGS="$gl_save_compiler_FLAGS"
32170
32171 fi
32172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
32173 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
32174 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
32175   as_fn_append WARN_CFLAGS " -funit-at-a-time"
32176 fi
32177
32178
32179
32180
32181
32182
32183 printf "%s\n" "#define lint 1" >>confdefs.h
32184
32185
32186 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
32187
32188
32189 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
32190
32191
32192   # We use a slightly smaller set of warning options for lib/.
32193   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
32194   nw=
32195   nw="$nw -Wunused-macros"
32196   nw="$nw -Wmissing-prototypes"
32197   nw="$nw -Wold-style-definition"
32198
32199   gl_warn_set=
32200   set x $WARN_CFLAGS; shift
32201   for gl_warn_item
32202   do
32203     case " $nw " in
32204       *" $gl_warn_item "*)
32205         ;;
32206       *)
32207         gl_warn_set="$gl_warn_set $gl_warn_item"
32208         ;;
32209     esac
32210   done
32211   GNULIB_WARN_CFLAGS=$gl_warn_set
32212
32213
32214 fi
32215
32216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
32217 printf %s "checking for inline... " >&6; }
32218 if ${ac_cv_c_inline+:} false; then :
32219   printf %s "(cached) " >&6
32220 else
32221   ac_cv_c_inline=no
32222 for ac_kw in inline __inline__ __inline; do
32223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224 /* end confdefs.h.  */
32225 #ifndef __cplusplus
32226 typedef int foo_t;
32227 static $ac_kw foo_t static_foo () {return 0; }
32228 $ac_kw foo_t foo () {return 0; }
32229 #endif
32230
32231 _ACEOF
32232 if ac_fn_c_try_compile "$LINENO"; then :
32233   ac_cv_c_inline=$ac_kw
32234 fi
32235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32236   test "$ac_cv_c_inline" != no && break
32237 done
32238
32239 fi
32240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
32241 printf "%s\n" "$ac_cv_c_inline" >&6; }
32242
32243 case $ac_cv_c_inline in
32244   inline | yes) ;;
32245   *)
32246     case $ac_cv_c_inline in
32247       no) ac_val=;;
32248       *) ac_val=$ac_cv_c_inline;;
32249     esac
32250     cat >>confdefs.h <<_ACEOF
32251 #ifndef __cplusplus
32252 #define inline $ac_val
32253 #endif
32254 _ACEOF
32255     ;;
32256 esac
32257
32258
32259   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
32260 printf %s "checking for variable-length arrays... " >&6; }
32261 if ${ac_cv_c_vararrays+:} false; then :
32262   printf %s "(cached) " >&6
32263 else
32264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32265 /* end confdefs.h.  */
32266
32267 int
32268 main ()
32269 {
32270 static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];
32271   ;
32272   return 0;
32273 }
32274 _ACEOF
32275 if ac_fn_c_try_compile "$LINENO"; then :
32276   ac_cv_c_vararrays=yes
32277 else
32278   ac_cv_c_vararrays=no
32279 fi
32280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32281 fi
32282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
32283 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
32284   if test $ac_cv_c_vararrays = yes; then
32285
32286 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
32287
32288   fi
32289
32290
32291
32292 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
32293
32294
32295 # Extract the first word of "pr", so it can be a program name with args.
32296 set dummy pr; ac_word=$2
32297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32298 printf %s "checking for $ac_word... " >&6; }
32299 if ${ac_cv_path_PR_PROGRAM+:} false; then :
32300   printf %s "(cached) " >&6
32301 else
32302   case $PR_PROGRAM in
32303   [\\/]* | ?:[\\/]*)
32304   ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
32305   ;;
32306   *)
32307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32308 for as_dir in $PATH
32309 do
32310   IFS=$as_save_IFS
32311   case $as_dir in #(((
32312     '') as_dir=./ ;;
32313     */) ;;
32314     *) as_dir=$as_dir/ ;;
32315   esac
32316     for ac_exec_ext in '' $ac_executable_extensions; do
32317   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
32318     ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
32319     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
32320     break 2
32321   fi
32322 done
32323   done
32324 IFS=$as_save_IFS
32325
32326   test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
32327   ;;
32328 esac
32329 fi
32330 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
32331 if test -n "$PR_PROGRAM"; then
32332   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
32333 printf "%s\n" "$PR_PROGRAM" >&6; }
32334 else
32335   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
32336 printf "%s\n" "no" >&6; }
32337 fi
32338
32339
32340
32341 cat >>confdefs.h <<_ACEOF
32342 #define PR_PROGRAM "$PR_PROGRAM"
32343 _ACEOF
32344
32345
32346 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32347 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32348
32349 cat >>confdefs.h <<_ACEOF
32350 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32351 _ACEOF
32352
32353
32354 fi
32355
32356 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
32357 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
32358
32359 cat >>confdefs.h <<_ACEOF
32360 #define HAVE_STRUCT_STAT_ST_RDEV 1
32361 _ACEOF
32362
32363
32364 fi
32365
32366 ac_header_dirent=no
32367 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
32368   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
32369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
32370 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
32371 if eval \${$as_ac_Header+:} false; then :
32372   printf %s "(cached) " >&6
32373 else
32374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32375 /* end confdefs.h.  */
32376 #include <sys/types.h>
32377 #include <$ac_hdr>
32378
32379 int
32380 main ()
32381 {
32382 if ((DIR *) 0)
32383 return 0;
32384   ;
32385   return 0;
32386 }
32387 _ACEOF
32388 if ac_fn_c_try_compile "$LINENO"; then :
32389   eval "$as_ac_Header=yes"
32390 else
32391   eval "$as_ac_Header=no"
32392 fi
32393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32394 fi
32395 eval ac_res=\$$as_ac_Header
32396                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32397 printf "%s\n" "$ac_res" >&6; }
32398 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
32399   cat >>confdefs.h <<_ACEOF
32400 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
32401 _ACEOF
32402
32403 ac_header_dirent=$ac_hdr; break
32404 fi
32405
32406 done
32407 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
32408 if test $ac_header_dirent = dirent.h; then
32409   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
32410 printf %s "checking for library containing opendir... " >&6; }
32411 if ${ac_cv_search_opendir+:} false; then :
32412   printf %s "(cached) " >&6
32413 else
32414   ac_func_search_save_LIBS=$LIBS
32415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32416 /* end confdefs.h.  */
32417
32418 /* Override any GCC internal prototype to avoid an error.
32419    Use char because int might match the return type of a GCC
32420    builtin and then its argument prototype would still apply.  */
32421 #ifdef __cplusplus
32422 extern "C"
32423 #endif
32424 char opendir ();
32425 int
32426 main ()
32427 {
32428 return opendir ();
32429   ;
32430   return 0;
32431 }
32432 _ACEOF
32433 for ac_lib in '' dir; do
32434   if test -z "$ac_lib"; then
32435     ac_res="none required"
32436   else
32437     ac_res=-l$ac_lib
32438     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32439   fi
32440   if ac_fn_c_try_link "$LINENO"; then :
32441   ac_cv_search_opendir=$ac_res
32442 fi
32443 rm -f core conftest.err conftest.$ac_objext \
32444     conftest$ac_exeext
32445   if ${ac_cv_search_opendir+:} false; then :
32446   break
32447 fi
32448 done
32449 if ${ac_cv_search_opendir+:} false; then :
32450
32451 else
32452   ac_cv_search_opendir=no
32453 fi
32454 rm conftest.$ac_ext
32455 LIBS=$ac_func_search_save_LIBS
32456 fi
32457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
32458 printf "%s\n" "$ac_cv_search_opendir" >&6; }
32459 ac_res=$ac_cv_search_opendir
32460 if test "$ac_res" != no; then :
32461   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32462
32463 fi
32464
32465 else
32466   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
32467 printf %s "checking for library containing opendir... " >&6; }
32468 if ${ac_cv_search_opendir+:} false; then :
32469   printf %s "(cached) " >&6
32470 else
32471   ac_func_search_save_LIBS=$LIBS
32472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32473 /* end confdefs.h.  */
32474
32475 /* Override any GCC internal prototype to avoid an error.
32476    Use char because int might match the return type of a GCC
32477    builtin and then its argument prototype would still apply.  */
32478 #ifdef __cplusplus
32479 extern "C"
32480 #endif
32481 char opendir ();
32482 int
32483 main ()
32484 {
32485 return opendir ();
32486   ;
32487   return 0;
32488 }
32489 _ACEOF
32490 for ac_lib in '' x; do
32491   if test -z "$ac_lib"; then
32492     ac_res="none required"
32493   else
32494     ac_res=-l$ac_lib
32495     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32496   fi
32497   if ac_fn_c_try_link "$LINENO"; then :
32498   ac_cv_search_opendir=$ac_res
32499 fi
32500 rm -f core conftest.err conftest.$ac_objext \
32501     conftest$ac_exeext
32502   if ${ac_cv_search_opendir+:} false; then :
32503   break
32504 fi
32505 done
32506 if ${ac_cv_search_opendir+:} false; then :
32507
32508 else
32509   ac_cv_search_opendir=no
32510 fi
32511 rm conftest.$ac_ext
32512 LIBS=$ac_func_search_save_LIBS
32513 fi
32514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
32515 printf "%s\n" "$ac_cv_search_opendir" >&6; }
32516 ac_res=$ac_cv_search_opendir
32517 if test "$ac_res" != no; then :
32518   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32519
32520 fi
32521
32522 fi
32523
32524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
32525 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
32526 if ${ac_cv_header_sys_wait_h+:} false; then :
32527   printf %s "(cached) " >&6
32528 else
32529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32530 /* end confdefs.h.  */
32531 #include <sys/types.h>
32532 #include <sys/wait.h>
32533 #ifndef WEXITSTATUS
32534 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
32535 #endif
32536 #ifndef WIFEXITED
32537 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
32538 #endif
32539
32540 int
32541 main ()
32542 {
32543   int s;
32544   wait (&s);
32545   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
32546   ;
32547   return 0;
32548 }
32549 _ACEOF
32550 if ac_fn_c_try_compile "$LINENO"; then :
32551   ac_cv_header_sys_wait_h=yes
32552 else
32553   ac_cv_header_sys_wait_h=no
32554 fi
32555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32556 fi
32557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
32558 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
32559 if test $ac_cv_header_sys_wait_h = yes; then
32560
32561 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
32562
32563 fi
32564
32565 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
32566 if test "x$ac_cv_type_pid_t" = xyes; then :
32567
32568 else
32569
32570 cat >>confdefs.h <<_ACEOF
32571 #define pid_t int
32572 _ACEOF
32573
32574 fi
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584 if test $ac_cv_func_sigprocmask = no; then
32585   for ac_func in sigblock
32586 do :
32587   ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
32588 if test "x$ac_cv_func_sigblock" = xyes; then :
32589   cat >>confdefs.h <<_ACEOF
32590 #define HAVE_SIGBLOCK 1
32591 _ACEOF
32592
32593 fi
32594 done
32595
32596 fi
32597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
32598 printf %s "checking whether closedir returns void... " >&6; }
32599 if ${ac_cv_func_closedir_void+:} false; then :
32600   printf %s "(cached) " >&6
32601 else
32602   if test "$cross_compiling" = yes; then :
32603   ac_cv_func_closedir_void=yes
32604 else
32605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32606 /* end confdefs.h.  */
32607 $ac_includes_default
32608 #include <$ac_header_dirent>
32609 #ifndef __cplusplus
32610 int closedir ();
32611 #endif
32612
32613 int
32614 main ()
32615 {
32616 return closedir (opendir (".")) != 0;
32617   ;
32618   return 0;
32619 }
32620 _ACEOF
32621 if ac_fn_c_try_run "$LINENO"; then :
32622   ac_cv_func_closedir_void=no
32623 else
32624   ac_cv_func_closedir_void=yes
32625 fi
32626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32627   conftest.$ac_objext conftest.beam conftest.$ac_ext
32628 fi
32629
32630 fi
32631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
32632 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
32633 if test $ac_cv_func_closedir_void = yes; then
32634
32635 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
32636
32637 fi
32638
32639 for ac_header in vfork.h
32640 do :
32641   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
32642 if test "x$ac_cv_header_vfork_h" = xyes; then :
32643   cat >>confdefs.h <<_ACEOF
32644 #define HAVE_VFORK_H 1
32645 _ACEOF
32646
32647 fi
32648
32649 done
32650
32651 for ac_func in fork vfork
32652 do :
32653   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
32654 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32655 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
32656   cat >>confdefs.h <<_ACEOF
32657 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
32658 _ACEOF
32659
32660 fi
32661 done
32662
32663 if test "x$ac_cv_func_fork" = xyes; then
32664   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
32665 printf %s "checking for working fork... " >&6; }
32666 if ${ac_cv_func_fork_works+:} false; then :
32667   printf %s "(cached) " >&6
32668 else
32669   if test "$cross_compiling" = yes; then :
32670   ac_cv_func_fork_works=cross
32671 else
32672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32673 /* end confdefs.h.  */
32674 $ac_includes_default
32675 int
32676 main ()
32677 {
32678
32679           /* By Ruediger Kuhlmann. */
32680           return fork () < 0;
32681
32682   ;
32683   return 0;
32684 }
32685 _ACEOF
32686 if ac_fn_c_try_run "$LINENO"; then :
32687   ac_cv_func_fork_works=yes
32688 else
32689   ac_cv_func_fork_works=no
32690 fi
32691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32692   conftest.$ac_objext conftest.beam conftest.$ac_ext
32693 fi
32694
32695 fi
32696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
32697 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
32698
32699 else
32700   ac_cv_func_fork_works=$ac_cv_func_fork
32701 fi
32702 if test "x$ac_cv_func_fork_works" = xcross; then
32703   case $host in
32704     *-*-amigaos* | *-*-msdosdjgpp*)
32705       # Override, as these systems have only a dummy fork() stub
32706       ac_cv_func_fork_works=no
32707       ;;
32708     *)
32709       ac_cv_func_fork_works=yes
32710       ;;
32711   esac
32712   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
32713 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
32714 fi
32715 ac_cv_func_vfork_works=$ac_cv_func_vfork
32716 if test "x$ac_cv_func_vfork" = xyes; then
32717   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
32718 printf %s "checking for working vfork... " >&6; }
32719 if ${ac_cv_func_vfork_works+:} false; then :
32720   printf %s "(cached) " >&6
32721 else
32722   if test "$cross_compiling" = yes; then :
32723   ac_cv_func_vfork_works=cross
32724 else
32725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32726 /* end confdefs.h.  */
32727 /* Thanks to Paul Eggert for this test.  */
32728 $ac_includes_default
32729 #include <signal.h>
32730 #include <sys/wait.h>
32731 #ifdef HAVE_VFORK_H
32732 # include <vfork.h>
32733 #endif
32734
32735 static void
32736 do_nothing (int sig)
32737 {
32738   (void) sig;
32739 }
32740
32741 /* On some sparc systems, changes by the child to local and incoming
32742    argument registers are propagated back to the parent.  The compiler
32743    is told about this with #include <vfork.h>, but some compilers
32744    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
32745    static variable whose address is put into a register that is
32746    clobbered by the vfork.  */
32747 static void
32748 sparc_address_test (int arg)
32749 {
32750   static pid_t child;
32751   if (!child) {
32752     child = vfork ();
32753     if (child < 0) {
32754       perror ("vfork");
32755       _exit(2);
32756     }
32757     if (!child) {
32758       arg = getpid();
32759       write(-1, "", 0);
32760       _exit (arg);
32761     }
32762   }
32763 }
32764
32765 int
32766 main ()
32767 {
32768   pid_t parent = getpid ();
32769   pid_t child;
32770
32771   sparc_address_test (0);
32772
32773   /* On Solaris 2.4, changes by the child to the signal handler
32774      also munge signal handlers in the parent.  To detect this,
32775      start by putting the parent's handler in a known state.  */
32776   signal (SIGTERM, SIG_DFL);
32777
32778   child = vfork ();
32779
32780   if (child == 0) {
32781     /* Here is another test for sparc vfork register problems.  This
32782        test uses lots of local variables, at least as many local
32783        variables as main has allocated so far including compiler
32784        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
32785        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
32786        reuse the register of parent for one of the local variables,
32787        since it will think that parent can't possibly be used any more
32788        in this routine.  Assigning to the local variable will thus
32789        munge parent in the parent process.  */
32790     pid_t
32791       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
32792       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
32793     /* Convince the compiler that p..p7 are live; otherwise, it might
32794        use the same hardware register for all 8 local variables.  */
32795     if (p != p1 || p != p2 || p != p3 || p != p4
32796         || p != p5 || p != p6 || p != p7)
32797       _exit(1);
32798
32799     /* Alter the child's signal handler.  */
32800     if (signal (SIGTERM, do_nothing) != SIG_DFL)
32801       _exit(1);
32802
32803     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
32804        from child file descriptors.  If the child closes a descriptor
32805        before it execs or exits, this munges the parent's descriptor
32806        as well.  Test for this by closing stdout in the child.  */
32807     _exit(close(fileno(stdout)) != 0);
32808   } else {
32809     int status;
32810     struct stat st;
32811
32812     while (wait(&status) != child)
32813       ;
32814     return (
32815          /* Was there some problem with vforking?  */
32816          child < 0
32817
32818          /* Did the child munge the parent's signal handler?  */
32819          || signal (SIGTERM, SIG_DFL) != SIG_DFL
32820
32821          /* Did the child fail?  (This shouldn't happen.)  */
32822          || status
32823
32824          /* Did the vfork/compiler bug occur?  */
32825          || parent != getpid()
32826
32827          /* Did the file descriptor bug occur?  */
32828          || fstat(fileno(stdout), &st) != 0
32829          );
32830   }
32831 }
32832 _ACEOF
32833 if ac_fn_c_try_run "$LINENO"; then :
32834   ac_cv_func_vfork_works=yes
32835 else
32836   ac_cv_func_vfork_works=no
32837 fi
32838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32839   conftest.$ac_objext conftest.beam conftest.$ac_ext
32840 fi
32841
32842 fi
32843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
32844 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
32845
32846 fi;
32847 if test "x$ac_cv_func_fork_works" = xcross; then
32848   ac_cv_func_vfork_works=$ac_cv_func_vfork
32849   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
32850 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
32851 fi
32852
32853 if test "x$ac_cv_func_vfork_works" = xyes; then
32854
32855 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
32856
32857 else
32858
32859 printf "%s\n" "#define vfork fork" >>confdefs.h
32860
32861 fi
32862 if test "x$ac_cv_func_fork_works" = xyes; then
32863
32864 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
32865
32866 fi
32867
32868
32869 # When .tarball-version exists, we're building from a tarball
32870 # and must not make man/*.1 files depend on the generated src/version.c,
32871 # because that would induce a requirement to run the help2man perl script.
32872 # We are not yet prepared to make perl a build-from-tarball requirement.
32873 # Hence, here we detect .tarball-version existence.  When not present,
32874 # we define a variable to be used in man/Makefile.am to induce the
32875 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
32876 # but not when built from a tarball.
32877
32878 test -f $srcdir/.tarball-version \
32879   && SRC_VERSION_C= \
32880   || SRC_VERSION_C=../src/version.c
32881
32882
32883   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
32884 printf %s "checking whether NLS is requested... " >&6; }
32885     # Check whether --enable-nls was given.
32886 if test "${enable_nls+set}" = set; then :
32887   enableval=$enable_nls; USE_NLS=$enableval
32888 else
32889   USE_NLS=yes
32890 fi
32891
32892   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
32893 printf "%s\n" "$USE_NLS" >&6; }
32894
32895
32896
32897
32898       GETTEXT_MACRO_VERSION=0.18
32899
32900
32901
32902
32903 # Prepare PATH_SEPARATOR.
32904 # The user is always right.
32905 if test "${PATH_SEPARATOR+set}" != set; then
32906   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
32907   # contains only /bin. Note that ksh looks also at the FPATH variable,
32908   # so we have to set that as well for the test.
32909   PATH_SEPARATOR=:
32910   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
32911     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
32912            || PATH_SEPARATOR=';'
32913        }
32914 fi
32915
32916 # Find out how to test for executable files. Don't use a zero-byte file,
32917 # as systems may use methods other than mode bits to determine executability.
32918 cat >conf$$.file <<_ASEOF
32919 #! /bin/sh
32920 exit 0
32921 _ASEOF
32922 chmod +x conf$$.file
32923 if test -x conf$$.file >/dev/null 2>&1; then
32924   ac_executable_p="test -x"
32925 else
32926   ac_executable_p="test -f"
32927 fi
32928 rm -f conf$$.file
32929
32930 # Extract the first word of "msgfmt", so it can be a program name with args.
32931 set dummy msgfmt; ac_word=$2
32932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32933 printf %s "checking for $ac_word... " >&6; }
32934 if ${ac_cv_path_MSGFMT+:} false; then :
32935   printf %s "(cached) " >&6
32936 else
32937   case "$MSGFMT" in
32938   [\\/]* | ?:[\\/]*)
32939     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
32940     ;;
32941   *)
32942     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
32943     for ac_dir in $PATH; do
32944       IFS="$ac_save_IFS"
32945       test -z "$ac_dir" && ac_dir=.
32946       for ac_exec_ext in '' $ac_executable_extensions; do
32947         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
32948           echo "$as_me: trying $ac_dir/$ac_word..." >&5
32949           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
32950      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
32951             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
32952             break 2
32953           fi
32954         fi
32955       done
32956     done
32957     IFS="$ac_save_IFS"
32958   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
32959     ;;
32960 esac
32961 fi
32962 MSGFMT="$ac_cv_path_MSGFMT"
32963 if test "$MSGFMT" != ":"; then
32964   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
32965 printf "%s\n" "$MSGFMT" >&6; }
32966 else
32967   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
32968 printf "%s\n" "no" >&6; }
32969 fi
32970
32971   # Extract the first word of "gmsgfmt", so it can be a program name with args.
32972 set dummy gmsgfmt; ac_word=$2
32973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32974 printf %s "checking for $ac_word... " >&6; }
32975 if ${ac_cv_path_GMSGFMT+:} false; then :
32976   printf %s "(cached) " >&6
32977 else
32978   case $GMSGFMT in
32979   [\\/]* | ?:[\\/]*)
32980   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
32981   ;;
32982   *)
32983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32984 for as_dir in $PATH
32985 do
32986   IFS=$as_save_IFS
32987   case $as_dir in #(((
32988     '') as_dir=./ ;;
32989     */) ;;
32990     *) as_dir=$as_dir/ ;;
32991   esac
32992     for ac_exec_ext in '' $ac_executable_extensions; do
32993   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
32994     ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
32995     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
32996     break 2
32997   fi
32998 done
32999   done
33000 IFS=$as_save_IFS
33001
33002   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
33003   ;;
33004 esac
33005 fi
33006 GMSGFMT=$ac_cv_path_GMSGFMT
33007 if test -n "$GMSGFMT"; then
33008   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
33009 printf "%s\n" "$GMSGFMT" >&6; }
33010 else
33011   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
33012 printf "%s\n" "no" >&6; }
33013 fi
33014
33015
33016
33017     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
33018     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
33019     *) MSGFMT_015=$MSGFMT ;;
33020   esac
33021
33022   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
33023     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
33024     *) GMSGFMT_015=$GMSGFMT ;;
33025   esac
33026
33027
33028
33029 # Prepare PATH_SEPARATOR.
33030 # The user is always right.
33031 if test "${PATH_SEPARATOR+set}" != set; then
33032   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
33033   # contains only /bin. Note that ksh looks also at the FPATH variable,
33034   # so we have to set that as well for the test.
33035   PATH_SEPARATOR=:
33036   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
33037     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
33038            || PATH_SEPARATOR=';'
33039        }
33040 fi
33041
33042 # Find out how to test for executable files. Don't use a zero-byte file,
33043 # as systems may use methods other than mode bits to determine executability.
33044 cat >conf$$.file <<_ASEOF
33045 #! /bin/sh
33046 exit 0
33047 _ASEOF
33048 chmod +x conf$$.file
33049 if test -x conf$$.file >/dev/null 2>&1; then
33050   ac_executable_p="test -x"
33051 else
33052   ac_executable_p="test -f"
33053 fi
33054 rm -f conf$$.file
33055
33056 # Extract the first word of "xgettext", so it can be a program name with args.
33057 set dummy xgettext; ac_word=$2
33058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33059 printf %s "checking for $ac_word... " >&6; }
33060 if ${ac_cv_path_XGETTEXT+:} false; then :
33061   printf %s "(cached) " >&6
33062 else
33063   case "$XGETTEXT" in
33064   [\\/]* | ?:[\\/]*)
33065     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
33066     ;;
33067   *)
33068     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
33069     for ac_dir in $PATH; do
33070       IFS="$ac_save_IFS"
33071       test -z "$ac_dir" && ac_dir=.
33072       for ac_exec_ext in '' $ac_executable_extensions; do
33073         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
33074           echo "$as_me: trying $ac_dir/$ac_word..." >&5
33075           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
33076      (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
33077             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
33078             break 2
33079           fi
33080         fi
33081       done
33082     done
33083     IFS="$ac_save_IFS"
33084   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
33085     ;;
33086 esac
33087 fi
33088 XGETTEXT="$ac_cv_path_XGETTEXT"
33089 if test "$XGETTEXT" != ":"; then
33090   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
33091 printf "%s\n" "$XGETTEXT" >&6; }
33092 else
33093   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
33094 printf "%s\n" "no" >&6; }
33095 fi
33096
33097     rm -f messages.po
33098
33099     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
33100     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
33101     *) XGETTEXT_015=$XGETTEXT ;;
33102   esac
33103
33104
33105
33106 # Prepare PATH_SEPARATOR.
33107 # The user is always right.
33108 if test "${PATH_SEPARATOR+set}" != set; then
33109   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
33110   # contains only /bin. Note that ksh looks also at the FPATH variable,
33111   # so we have to set that as well for the test.
33112   PATH_SEPARATOR=:
33113   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
33114     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
33115            || PATH_SEPARATOR=';'
33116        }
33117 fi
33118
33119 # Find out how to test for executable files. Don't use a zero-byte file,
33120 # as systems may use methods other than mode bits to determine executability.
33121 cat >conf$$.file <<_ASEOF
33122 #! /bin/sh
33123 exit 0
33124 _ASEOF
33125 chmod +x conf$$.file
33126 if test -x conf$$.file >/dev/null 2>&1; then
33127   ac_executable_p="test -x"
33128 else
33129   ac_executable_p="test -f"
33130 fi
33131 rm -f conf$$.file
33132
33133 # Extract the first word of "msgmerge", so it can be a program name with args.
33134 set dummy msgmerge; ac_word=$2
33135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33136 printf %s "checking for $ac_word... " >&6; }
33137 if ${ac_cv_path_MSGMERGE+:} false; then :
33138   printf %s "(cached) " >&6
33139 else
33140   case "$MSGMERGE" in
33141   [\\/]* | ?:[\\/]*)
33142     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
33143     ;;
33144   *)
33145     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
33146     for ac_dir in $PATH; do
33147       IFS="$ac_save_IFS"
33148       test -z "$ac_dir" && ac_dir=.
33149       for ac_exec_ext in '' $ac_executable_extensions; do
33150         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
33151           echo "$as_me: trying $ac_dir/$ac_word..." >&5
33152           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
33153             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
33154             break 2
33155           fi
33156         fi
33157       done
33158     done
33159     IFS="$ac_save_IFS"
33160   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
33161     ;;
33162 esac
33163 fi
33164 MSGMERGE="$ac_cv_path_MSGMERGE"
33165 if test "$MSGMERGE" != ":"; then
33166   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
33167 printf "%s\n" "$MSGMERGE" >&6; }
33168 else
33169   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
33170 printf "%s\n" "no" >&6; }
33171 fi
33172
33173
33174         test -n "$localedir" || localedir='${datadir}/locale'
33175
33176
33177     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
33178
33179
33180   ac_config_commands="$ac_config_commands po-directories"
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
33208 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
33209 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
33210   printf %s "(cached) " >&6
33211 else
33212   gt_save_LIBS="$LIBS"
33213      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
33214      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33215 /* end confdefs.h.  */
33216 #include <CoreFoundation/CFPreferences.h>
33217 int
33218 main ()
33219 {
33220 CFPreferencesCopyAppValue(NULL, NULL)
33221   ;
33222   return 0;
33223 }
33224 _ACEOF
33225 if ac_fn_c_try_link "$LINENO"; then :
33226   gt_cv_func_CFPreferencesCopyAppValue=yes
33227 else
33228   gt_cv_func_CFPreferencesCopyAppValue=no
33229 fi
33230 rm -f core conftest.err conftest.$ac_objext \
33231     conftest$ac_exeext conftest.$ac_ext
33232      LIBS="$gt_save_LIBS"
33233 fi
33234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
33235 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
33236   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
33237
33238 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
33239
33240   fi
33241     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
33242 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
33243 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
33244   printf %s "(cached) " >&6
33245 else
33246   gt_save_LIBS="$LIBS"
33247      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
33248      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33249 /* end confdefs.h.  */
33250 #include <CoreFoundation/CFLocale.h>
33251 int
33252 main ()
33253 {
33254 CFLocaleCopyCurrent();
33255   ;
33256   return 0;
33257 }
33258 _ACEOF
33259 if ac_fn_c_try_link "$LINENO"; then :
33260   gt_cv_func_CFLocaleCopyCurrent=yes
33261 else
33262   gt_cv_func_CFLocaleCopyCurrent=no
33263 fi
33264 rm -f core conftest.err conftest.$ac_objext \
33265     conftest$ac_exeext conftest.$ac_ext
33266      LIBS="$gt_save_LIBS"
33267 fi
33268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
33269 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
33270   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
33271
33272 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
33273
33274   fi
33275   INTL_MACOSX_LIBS=
33276   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
33277     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
33278   fi
33279
33280
33281
33282
33283
33284
33285   LIBINTL=
33286   LTLIBINTL=
33287   POSUB=
33288
33289     case " $gt_needs " in
33290     *" need-formatstring-macros "*) gt_api_version=3 ;;
33291     *" need-ngettext "*) gt_api_version=2 ;;
33292     *) gt_api_version=1 ;;
33293   esac
33294   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
33295   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
33296
33297     if test "$USE_NLS" = "yes"; then
33298     gt_use_preinstalled_gnugettext=no
33299
33300
33301         if test $gt_api_version -ge 3; then
33302           gt_revision_test_code='
33303 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
33304 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
33305 #endif
33306 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
33307 '
33308         else
33309           gt_revision_test_code=
33310         fi
33311         if test $gt_api_version -ge 2; then
33312           gt_expression_test_code=' + * ngettext ("", "", 0)'
33313         else
33314           gt_expression_test_code=
33315         fi
33316
33317         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
33318 printf %s "checking for GNU gettext in libc... " >&6; }
33319 if eval \${$gt_func_gnugettext_libc+:} false; then :
33320   printf %s "(cached) " >&6
33321 else
33322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33323 /* end confdefs.h.  */
33324
33325 #include <libintl.h>
33326 $gt_revision_test_code
33327 extern int _nl_msg_cat_cntr;
33328 extern int *_nl_domain_bindings;
33329
33330 int
33331 main ()
33332 {
33333
33334 bindtextdomain ("", "");
33335 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
33336
33337   ;
33338   return 0;
33339 }
33340 _ACEOF
33341 if ac_fn_c_try_link "$LINENO"; then :
33342   eval "$gt_func_gnugettext_libc=yes"
33343 else
33344   eval "$gt_func_gnugettext_libc=no"
33345 fi
33346 rm -f core conftest.err conftest.$ac_objext \
33347     conftest$ac_exeext conftest.$ac_ext
33348 fi
33349 eval ac_res=\$$gt_func_gnugettext_libc
33350                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33351 printf "%s\n" "$ac_res" >&6; }
33352
33353         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
33354
33355
33356
33357
33358
33359           am_save_CPPFLAGS="$CPPFLAGS"
33360
33361   for element in $INCICONV; do
33362     haveit=
33363     for x in $CPPFLAGS; do
33364
33365   acl_save_prefix="$prefix"
33366   prefix="$acl_final_prefix"
33367   acl_save_exec_prefix="$exec_prefix"
33368   exec_prefix="$acl_final_exec_prefix"
33369   eval x=\"$x\"
33370   exec_prefix="$acl_save_exec_prefix"
33371   prefix="$acl_save_prefix"
33372
33373       if test "X$x" = "X$element"; then
33374         haveit=yes
33375         break
33376       fi
33377     done
33378     if test -z "$haveit"; then
33379       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
33380     fi
33381   done
33382
33383
33384   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
33385 printf %s "checking for iconv... " >&6; }
33386 if ${am_cv_func_iconv+:} false; then :
33387   printf %s "(cached) " >&6
33388 else
33389
33390     am_cv_func_iconv="no, consider installing GNU libiconv"
33391     am_cv_lib_iconv=no
33392     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33393 /* end confdefs.h.  */
33394
33395 #include <stdlib.h>
33396 #include <iconv.h>
33397
33398 int
33399 main ()
33400 {
33401 iconv_t cd = iconv_open("","");
33402            iconv(cd,NULL,NULL,NULL,NULL);
33403            iconv_close(cd);
33404   ;
33405   return 0;
33406 }
33407 _ACEOF
33408 if ac_fn_c_try_link "$LINENO"; then :
33409   am_cv_func_iconv=yes
33410 fi
33411 rm -f core conftest.err conftest.$ac_objext \
33412     conftest$ac_exeext conftest.$ac_ext
33413     if test "$am_cv_func_iconv" != yes; then
33414       am_save_LIBS="$LIBS"
33415       LIBS="$LIBS $LIBICONV"
33416       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33417 /* end confdefs.h.  */
33418
33419 #include <stdlib.h>
33420 #include <iconv.h>
33421
33422 int
33423 main ()
33424 {
33425 iconv_t cd = iconv_open("","");
33426              iconv(cd,NULL,NULL,NULL,NULL);
33427              iconv_close(cd);
33428   ;
33429   return 0;
33430 }
33431 _ACEOF
33432 if ac_fn_c_try_link "$LINENO"; then :
33433   am_cv_lib_iconv=yes
33434         am_cv_func_iconv=yes
33435 fi
33436 rm -f core conftest.err conftest.$ac_objext \
33437     conftest$ac_exeext conftest.$ac_ext
33438       LIBS="$am_save_LIBS"
33439     fi
33440
33441 fi
33442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
33443 printf "%s\n" "$am_cv_func_iconv" >&6; }
33444   if test "$am_cv_func_iconv" = yes; then
33445     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
33446 printf %s "checking for working iconv... " >&6; }
33447 if ${am_cv_func_iconv_works+:} false; then :
33448   printf %s "(cached) " >&6
33449 else
33450
33451                   am_save_LIBS="$LIBS"
33452       if test $am_cv_lib_iconv = yes; then
33453         LIBS="$LIBS $LIBICONV"
33454       fi
33455       if test "$cross_compiling" = yes; then :
33456
33457          case "$host_os" in
33458            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
33459            *)            am_cv_func_iconv_works="guessing yes" ;;
33460          esac
33461
33462 else
33463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33464 /* end confdefs.h.  */
33465
33466 #include <iconv.h>
33467 #include <string.h>
33468 int main ()
33469 {
33470   int result = 0;
33471   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
33472      returns.  */
33473   {
33474     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
33475     if (cd_utf8_to_88591 != (iconv_t)(-1))
33476       {
33477         static const char input[] = "\342\202\254"; /* EURO SIGN */
33478         char buf[10];
33479         const char *inptr = input;
33480         size_t inbytesleft = strlen (input);
33481         char *outptr = buf;
33482         size_t outbytesleft = sizeof (buf);
33483         size_t res = iconv (cd_utf8_to_88591,
33484                             (char **) &inptr, &inbytesleft,
33485                             &outptr, &outbytesleft);
33486         if (res == 0)
33487           result |= 1;
33488         iconv_close (cd_utf8_to_88591);
33489       }
33490   }
33491   /* Test against Solaris 10 bug: Failures are not distinguishable from
33492      successful returns.  */
33493   {
33494     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
33495     if (cd_ascii_to_88591 != (iconv_t)(-1))
33496       {
33497         static const char input[] = "\263";
33498         char buf[10];
33499         const char *inptr = input;
33500         size_t inbytesleft = strlen (input);
33501         char *outptr = buf;
33502         size_t outbytesleft = sizeof (buf);
33503         size_t res = iconv (cd_ascii_to_88591,
33504                             (char **) &inptr, &inbytesleft,
33505                             &outptr, &outbytesleft);
33506         if (res == 0)
33507           result |= 2;
33508         iconv_close (cd_ascii_to_88591);
33509       }
33510   }
33511   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
33512   {
33513     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
33514     if (cd_88591_to_utf8 != (iconv_t)(-1))
33515       {
33516         static const char input[] = "\304";
33517         static char buf[2] = { (char)0xDE, (char)0xAD };
33518         const char *inptr = input;
33519         size_t inbytesleft = 1;
33520         char *outptr = buf;
33521         size_t outbytesleft = 1;
33522         size_t res = iconv (cd_88591_to_utf8,
33523                             (char **) &inptr, &inbytesleft,
33524                             &outptr, &outbytesleft);
33525         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
33526           result |= 4;
33527         iconv_close (cd_88591_to_utf8);
33528       }
33529   }
33530 #if 0 /* This bug could be worked around by the caller.  */
33531   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
33532   {
33533     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
33534     if (cd_88591_to_utf8 != (iconv_t)(-1))
33535       {
33536         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
33537         char buf[50];
33538         const char *inptr = input;
33539         size_t inbytesleft = strlen (input);
33540         char *outptr = buf;
33541         size_t outbytesleft = sizeof (buf);
33542         size_t res = iconv (cd_88591_to_utf8,
33543                             (char **) &inptr, &inbytesleft,
33544                             &outptr, &outbytesleft);
33545         if ((int)res > 0)
33546           result |= 8;
33547         iconv_close (cd_88591_to_utf8);
33548       }
33549   }
33550 #endif
33551   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
33552      provided.  */
33553   if (/* Try standardized names.  */
33554       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
33555       /* Try IRIX, OSF/1 names.  */
33556       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
33557       /* Try AIX names.  */
33558       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
33559       /* Try HP-UX names.  */
33560       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
33561     result |= 16;
33562   return result;
33563 }
33564 _ACEOF
33565 if ac_fn_c_try_run "$LINENO"; then :
33566   am_cv_func_iconv_works=yes
33567 else
33568   am_cv_func_iconv_works=no
33569 fi
33570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33571   conftest.$ac_objext conftest.beam conftest.$ac_ext
33572 fi
33573
33574       LIBS="$am_save_LIBS"
33575
33576 fi
33577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
33578 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
33579     case "$am_cv_func_iconv_works" in
33580       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
33581       *)   am_func_iconv=yes ;;
33582     esac
33583   else
33584     am_func_iconv=no am_cv_lib_iconv=no
33585   fi
33586   if test "$am_func_iconv" = yes; then
33587
33588 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
33589
33590   fi
33591   if test "$am_cv_lib_iconv" = yes; then
33592     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
33593 printf %s "checking how to link with libiconv... " >&6; }
33594     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
33595 printf "%s\n" "$LIBICONV" >&6; }
33596   else
33597             CPPFLAGS="$am_save_CPPFLAGS"
33598     LIBICONV=
33599     LTLIBICONV=
33600   fi
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612     use_additional=yes
33613
33614   acl_save_prefix="$prefix"
33615   prefix="$acl_final_prefix"
33616   acl_save_exec_prefix="$exec_prefix"
33617   exec_prefix="$acl_final_exec_prefix"
33618
33619     eval additional_includedir=\"$includedir\"
33620     eval additional_libdir=\"$libdir\"
33621
33622   exec_prefix="$acl_save_exec_prefix"
33623   prefix="$acl_save_prefix"
33624
33625
33626 # Check whether --with-libintl-prefix was given.
33627 if test "${with_libintl_prefix+set}" = set; then :
33628   withval=$with_libintl_prefix;
33629     if test "X$withval" = "Xno"; then
33630       use_additional=no
33631     else
33632       if test "X$withval" = "X"; then
33633
33634   acl_save_prefix="$prefix"
33635   prefix="$acl_final_prefix"
33636   acl_save_exec_prefix="$exec_prefix"
33637   exec_prefix="$acl_final_exec_prefix"
33638
33639           eval additional_includedir=\"$includedir\"
33640           eval additional_libdir=\"$libdir\"
33641
33642   exec_prefix="$acl_save_exec_prefix"
33643   prefix="$acl_save_prefix"
33644
33645       else
33646         additional_includedir="$withval/include"
33647         additional_libdir="$withval/$acl_libdirstem"
33648         if test "$acl_libdirstem2" != "$acl_libdirstem" \
33649            && ! test -d "$withval/$acl_libdirstem"; then
33650           additional_libdir="$withval/$acl_libdirstem2"
33651         fi
33652       fi
33653     fi
33654
33655 fi
33656
33657       LIBINTL=
33658   LTLIBINTL=
33659   INCINTL=
33660   LIBINTL_PREFIX=
33661       HAVE_LIBINTL=
33662   rpathdirs=
33663   ltrpathdirs=
33664   names_already_handled=
33665   names_next_round='intl '
33666   while test -n "$names_next_round"; do
33667     names_this_round="$names_next_round"
33668     names_next_round=
33669     for name in $names_this_round; do
33670       already_handled=
33671       for n in $names_already_handled; do
33672         if test "$n" = "$name"; then
33673           already_handled=yes
33674           break
33675         fi
33676       done
33677       if test -z "$already_handled"; then
33678         names_already_handled="$names_already_handled $name"
33679                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
33680         eval value=\"\$HAVE_LIB$uppername\"
33681         if test -n "$value"; then
33682           if test "$value" = yes; then
33683             eval value=\"\$LIB$uppername\"
33684             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
33685             eval value=\"\$LTLIB$uppername\"
33686             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
33687           else
33688                                     :
33689           fi
33690         else
33691                               found_dir=
33692           found_la=
33693           found_so=
33694           found_a=
33695           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
33696           if test -n "$acl_shlibext"; then
33697             shrext=".$acl_shlibext"             # typically: shrext=.so
33698           else
33699             shrext=
33700           fi
33701           if test $use_additional = yes; then
33702             dir="$additional_libdir"
33703                                     if test -n "$acl_shlibext"; then
33704               if test -f "$dir/$libname$shrext"; then
33705                 found_dir="$dir"
33706                 found_so="$dir/$libname$shrext"
33707               else
33708                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33709                   ver=`(cd "$dir" && \
33710                         for f in "$libname$shrext".*; do echo "$f"; done \
33711                         | sed -e "s,^$libname$shrext\\\\.,," \
33712                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33713                         | sed 1q ) 2>/dev/null`
33714                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
33715                     found_dir="$dir"
33716                     found_so="$dir/$libname$shrext.$ver"
33717                   fi
33718                 else
33719                   eval library_names=\"$acl_library_names_spec\"
33720                   for f in $library_names; do
33721                     if test -f "$dir/$f"; then
33722                       found_dir="$dir"
33723                       found_so="$dir/$f"
33724                       break
33725                     fi
33726                   done
33727                 fi
33728               fi
33729             fi
33730                         if test "X$found_dir" = "X"; then
33731               if test -f "$dir/$libname.$acl_libext"; then
33732                 found_dir="$dir"
33733                 found_a="$dir/$libname.$acl_libext"
33734               fi
33735             fi
33736             if test "X$found_dir" != "X"; then
33737               if test -f "$dir/$libname.la"; then
33738                 found_la="$dir/$libname.la"
33739               fi
33740             fi
33741           fi
33742           if test "X$found_dir" = "X"; then
33743             for x in $LDFLAGS $LTLIBINTL; do
33744
33745   acl_save_prefix="$prefix"
33746   prefix="$acl_final_prefix"
33747   acl_save_exec_prefix="$exec_prefix"
33748   exec_prefix="$acl_final_exec_prefix"
33749   eval x=\"$x\"
33750   exec_prefix="$acl_save_exec_prefix"
33751   prefix="$acl_save_prefix"
33752
33753               case "$x" in
33754                 -L*)
33755                   dir=`echo "X$x" | sed -e 's/^X-L//'`
33756                                     if test -n "$acl_shlibext"; then
33757                     if test -f "$dir/$libname$shrext"; then
33758                       found_dir="$dir"
33759                       found_so="$dir/$libname$shrext"
33760                     else
33761                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33762                         ver=`(cd "$dir" && \
33763                               for f in "$libname$shrext".*; do echo "$f"; done \
33764                               | sed -e "s,^$libname$shrext\\\\.,," \
33765                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33766                               | sed 1q ) 2>/dev/null`
33767                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
33768                           found_dir="$dir"
33769                           found_so="$dir/$libname$shrext.$ver"
33770                         fi
33771                       else
33772                         eval library_names=\"$acl_library_names_spec\"
33773                         for f in $library_names; do
33774                           if test -f "$dir/$f"; then
33775                             found_dir="$dir"
33776                             found_so="$dir/$f"
33777                             break
33778                           fi
33779                         done
33780                       fi
33781                     fi
33782                   fi
33783                                     if test "X$found_dir" = "X"; then
33784                     if test -f "$dir/$libname.$acl_libext"; then
33785                       found_dir="$dir"
33786                       found_a="$dir/$libname.$acl_libext"
33787                     fi
33788                   fi
33789                   if test "X$found_dir" != "X"; then
33790                     if test -f "$dir/$libname.la"; then
33791                       found_la="$dir/$libname.la"
33792                     fi
33793                   fi
33794                   ;;
33795               esac
33796               if test "X$found_dir" != "X"; then
33797                 break
33798               fi
33799             done
33800           fi
33801           if test "X$found_dir" != "X"; then
33802                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
33803             if test "X$found_so" != "X"; then
33804                                                         if test "$enable_rpath" = no \
33805                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
33806                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
33807                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
33808               else
33809                                                                                 haveit=
33810                 for x in $ltrpathdirs; do
33811                   if test "X$x" = "X$found_dir"; then
33812                     haveit=yes
33813                     break
33814                   fi
33815                 done
33816                 if test -z "$haveit"; then
33817                   ltrpathdirs="$ltrpathdirs $found_dir"
33818                 fi
33819                                 if test "$acl_hardcode_direct" = yes; then
33820                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
33821                 else
33822                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
33823                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
33824                                                             haveit=
33825                     for x in $rpathdirs; do
33826                       if test "X$x" = "X$found_dir"; then
33827                         haveit=yes
33828                         break
33829                       fi
33830                     done
33831                     if test -z "$haveit"; then
33832                       rpathdirs="$rpathdirs $found_dir"
33833                     fi
33834                   else
33835                                                                                 haveit=
33836                     for x in $LDFLAGS $LIBINTL; do
33837
33838   acl_save_prefix="$prefix"
33839   prefix="$acl_final_prefix"
33840   acl_save_exec_prefix="$exec_prefix"
33841   exec_prefix="$acl_final_exec_prefix"
33842   eval x=\"$x\"
33843   exec_prefix="$acl_save_exec_prefix"
33844   prefix="$acl_save_prefix"
33845
33846                       if test "X$x" = "X-L$found_dir"; then
33847                         haveit=yes
33848                         break
33849                       fi
33850                     done
33851                     if test -z "$haveit"; then
33852                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
33853                     fi
33854                     if test "$acl_hardcode_minus_L" != no; then
33855                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
33856                     else
33857                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
33858                     fi
33859                   fi
33860                 fi
33861               fi
33862             else
33863               if test "X$found_a" != "X"; then
33864                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
33865               else
33866                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
33867               fi
33868             fi
33869                         additional_includedir=
33870             case "$found_dir" in
33871               */$acl_libdirstem | */$acl_libdirstem/)
33872                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
33873                 if test "$name" = 'intl'; then
33874                   LIBINTL_PREFIX="$basedir"
33875                 fi
33876                 additional_includedir="$basedir/include"
33877                 ;;
33878               */$acl_libdirstem2 | */$acl_libdirstem2/)
33879                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
33880                 if test "$name" = 'intl'; then
33881                   LIBINTL_PREFIX="$basedir"
33882                 fi
33883                 additional_includedir="$basedir/include"
33884                 ;;
33885             esac
33886             if test "X$additional_includedir" != "X"; then
33887                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
33888                 haveit=
33889                 if test "X$additional_includedir" = "X/usr/local/include"; then
33890                   if test -n "$GCC"; then
33891                     case $host_os in
33892                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33893                     esac
33894                   fi
33895                 fi
33896                 if test -z "$haveit"; then
33897                   for x in $CPPFLAGS $INCINTL; do
33898
33899   acl_save_prefix="$prefix"
33900   prefix="$acl_final_prefix"
33901   acl_save_exec_prefix="$exec_prefix"
33902   exec_prefix="$acl_final_exec_prefix"
33903   eval x=\"$x\"
33904   exec_prefix="$acl_save_exec_prefix"
33905   prefix="$acl_save_prefix"
33906
33907                     if test "X$x" = "X-I$additional_includedir"; then
33908                       haveit=yes
33909                       break
33910                     fi
33911                   done
33912                   if test -z "$haveit"; then
33913                     if test -d "$additional_includedir"; then
33914                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
33915                     fi
33916                   fi
33917                 fi
33918               fi
33919             fi
33920                         if test -n "$found_la"; then
33921                                                         save_libdir="$libdir"
33922               case "$found_la" in
33923                 */* | *\\*) . "$found_la" ;;
33924                 *) . "./$found_la" ;;
33925               esac
33926               libdir="$save_libdir"
33927                             for dep in $dependency_libs; do
33928                 case "$dep" in
33929                   -L*)
33930                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33931                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
33932                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
33933                       haveit=
33934                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
33935                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
33936                         if test -n "$GCC"; then
33937                           case $host_os in
33938                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33939                           esac
33940                         fi
33941                       fi
33942                       if test -z "$haveit"; then
33943                         haveit=
33944                         for x in $LDFLAGS $LIBINTL; do
33945
33946   acl_save_prefix="$prefix"
33947   prefix="$acl_final_prefix"
33948   acl_save_exec_prefix="$exec_prefix"
33949   exec_prefix="$acl_final_exec_prefix"
33950   eval x=\"$x\"
33951   exec_prefix="$acl_save_exec_prefix"
33952   prefix="$acl_save_prefix"
33953
33954                           if test "X$x" = "X-L$additional_libdir"; then
33955                             haveit=yes
33956                             break
33957                           fi
33958                         done
33959                         if test -z "$haveit"; then
33960                           if test -d "$additional_libdir"; then
33961                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
33962                           fi
33963                         fi
33964                         haveit=
33965                         for x in $LDFLAGS $LTLIBINTL; do
33966
33967   acl_save_prefix="$prefix"
33968   prefix="$acl_final_prefix"
33969   acl_save_exec_prefix="$exec_prefix"
33970   exec_prefix="$acl_final_exec_prefix"
33971   eval x=\"$x\"
33972   exec_prefix="$acl_save_exec_prefix"
33973   prefix="$acl_save_prefix"
33974
33975                           if test "X$x" = "X-L$additional_libdir"; then
33976                             haveit=yes
33977                             break
33978                           fi
33979                         done
33980                         if test -z "$haveit"; then
33981                           if test -d "$additional_libdir"; then
33982                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
33983                           fi
33984                         fi
33985                       fi
33986                     fi
33987                     ;;
33988                   -R*)
33989                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
33990                     if test "$enable_rpath" != no; then
33991                                                                   haveit=
33992                       for x in $rpathdirs; do
33993                         if test "X$x" = "X$dir"; then
33994                           haveit=yes
33995                           break
33996                         fi
33997                       done
33998                       if test -z "$haveit"; then
33999                         rpathdirs="$rpathdirs $dir"
34000                       fi
34001                                                                   haveit=
34002                       for x in $ltrpathdirs; do
34003                         if test "X$x" = "X$dir"; then
34004                           haveit=yes
34005                           break
34006                         fi
34007                       done
34008                       if test -z "$haveit"; then
34009                         ltrpathdirs="$ltrpathdirs $dir"
34010                       fi
34011                     fi
34012                     ;;
34013                   -l*)
34014                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34015                     ;;
34016                   *.la)
34017                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34018                     ;;
34019                   *)
34020                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
34021                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
34022                     ;;
34023                 esac
34024               done
34025             fi
34026           else
34027                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
34028             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
34029           fi
34030         fi
34031       fi
34032     done
34033   done
34034   if test "X$rpathdirs" != "X"; then
34035     if test -n "$acl_hardcode_libdir_separator"; then
34036                         alldirs=
34037       for found_dir in $rpathdirs; do
34038         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34039       done
34040             acl_save_libdir="$libdir"
34041       libdir="$alldirs"
34042       eval flag=\"$acl_hardcode_libdir_flag_spec\"
34043       libdir="$acl_save_libdir"
34044       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
34045     else
34046             for found_dir in $rpathdirs; do
34047         acl_save_libdir="$libdir"
34048         libdir="$found_dir"
34049         eval flag=\"$acl_hardcode_libdir_flag_spec\"
34050         libdir="$acl_save_libdir"
34051         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
34052       done
34053     fi
34054   fi
34055   if test "X$ltrpathdirs" != "X"; then
34056             for found_dir in $ltrpathdirs; do
34057       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
34058     done
34059   fi
34060
34061
34062
34063
34064
34065
34066           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
34067 printf %s "checking for GNU gettext in libintl... " >&6; }
34068 if eval \${$gt_func_gnugettext_libintl+:} false; then :
34069   printf %s "(cached) " >&6
34070 else
34071   gt_save_CPPFLAGS="$CPPFLAGS"
34072             CPPFLAGS="$CPPFLAGS $INCINTL"
34073             gt_save_LIBS="$LIBS"
34074             LIBS="$LIBS $LIBINTL"
34075                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34076 /* end confdefs.h.  */
34077
34078 #include <libintl.h>
34079 $gt_revision_test_code
34080 extern int _nl_msg_cat_cntr;
34081 extern
34082 #ifdef __cplusplus
34083 "C"
34084 #endif
34085 const char *_nl_expand_alias (const char *);
34086
34087 int
34088 main ()
34089 {
34090
34091 bindtextdomain ("", "");
34092 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
34093
34094   ;
34095   return 0;
34096 }
34097 _ACEOF
34098 if ac_fn_c_try_link "$LINENO"; then :
34099   eval "$gt_func_gnugettext_libintl=yes"
34100 else
34101   eval "$gt_func_gnugettext_libintl=no"
34102 fi
34103 rm -f core conftest.err conftest.$ac_objext \
34104     conftest$ac_exeext conftest.$ac_ext
34105                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
34106               LIBS="$LIBS $LIBICONV"
34107               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34108 /* end confdefs.h.  */
34109
34110 #include <libintl.h>
34111 $gt_revision_test_code
34112 extern int _nl_msg_cat_cntr;
34113 extern
34114 #ifdef __cplusplus
34115 "C"
34116 #endif
34117 const char *_nl_expand_alias (const char *);
34118
34119 int
34120 main ()
34121 {
34122
34123 bindtextdomain ("", "");
34124 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
34125
34126   ;
34127   return 0;
34128 }
34129 _ACEOF
34130 if ac_fn_c_try_link "$LINENO"; then :
34131   LIBINTL="$LIBINTL $LIBICONV"
34132                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
34133                  eval "$gt_func_gnugettext_libintl=yes"
34134
34135 fi
34136 rm -f core conftest.err conftest.$ac_objext \
34137     conftest$ac_exeext conftest.$ac_ext
34138             fi
34139             CPPFLAGS="$gt_save_CPPFLAGS"
34140             LIBS="$gt_save_LIBS"
34141 fi
34142 eval ac_res=\$$gt_func_gnugettext_libintl
34143                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34144 printf "%s\n" "$ac_res" >&6; }
34145         fi
34146
34147                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
34148            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
34149                 && test "$PACKAGE" != gettext-runtime \
34150                 && test "$PACKAGE" != gettext-tools; }; then
34151           gt_use_preinstalled_gnugettext=yes
34152         else
34153                     LIBINTL=
34154           LTLIBINTL=
34155           INCINTL=
34156         fi
34157
34158
34159
34160     if test -n "$INTL_MACOSX_LIBS"; then
34161       if test "$gt_use_preinstalled_gnugettext" = "yes" \
34162          || test "$nls_cv_use_gnu_gettext" = "yes"; then
34163                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
34164         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
34165       fi
34166     fi
34167
34168     if test "$gt_use_preinstalled_gnugettext" = "yes" \
34169        || test "$nls_cv_use_gnu_gettext" = "yes"; then
34170
34171 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
34172
34173     else
34174       USE_NLS=no
34175     fi
34176   fi
34177
34178   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
34179 printf %s "checking whether to use NLS... " >&6; }
34180   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
34181 printf "%s\n" "$USE_NLS" >&6; }
34182   if test "$USE_NLS" = "yes"; then
34183     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
34184 printf %s "checking where the gettext function comes from... " >&6; }
34185     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
34186       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
34187         gt_source="external libintl"
34188       else
34189         gt_source="libc"
34190       fi
34191     else
34192       gt_source="included intl directory"
34193     fi
34194     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
34195 printf "%s\n" "$gt_source" >&6; }
34196   fi
34197
34198   if test "$USE_NLS" = "yes"; then
34199
34200     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
34201       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
34202         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
34203 printf %s "checking how to link with libintl... " >&6; }
34204         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
34205 printf "%s\n" "$LIBINTL" >&6; }
34206
34207   for element in $INCINTL; do
34208     haveit=
34209     for x in $CPPFLAGS; do
34210
34211   acl_save_prefix="$prefix"
34212   prefix="$acl_final_prefix"
34213   acl_save_exec_prefix="$exec_prefix"
34214   exec_prefix="$acl_final_exec_prefix"
34215   eval x=\"$x\"
34216   exec_prefix="$acl_save_exec_prefix"
34217   prefix="$acl_save_prefix"
34218
34219       if test "X$x" = "X$element"; then
34220         haveit=yes
34221         break
34222       fi
34223     done
34224     if test -z "$haveit"; then
34225       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34226     fi
34227   done
34228
34229       fi
34230
34231
34232 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
34233
34234
34235 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
34236
34237     fi
34238
34239         POSUB=po
34240   fi
34241
34242
34243
34244     INTLLIBS="$LIBINTL"
34245
34246
34247
34248
34249
34250
34251
34252 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
34253
34254 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
34255
34256 cat >confcache <<\_ACEOF
34257 # This file is a shell script that caches the results of configure
34258 # tests run on this system so they can be shared between configure
34259 # scripts and configure runs, see configure's option --config-cache.
34260 # It is not useful on other systems.  If it contains results you don't
34261 # want to keep, you may remove or edit it.
34262 #
34263 # config.status only pays attention to the cache file if you give it
34264 # the --recheck option to rerun configure.
34265 #
34266 # `ac_cv_env_foo' variables (set or unset) will be overridden when
34267 # loading this file, other *unset* `ac_cv_foo' will be assigned the
34268 # following values.
34269
34270 _ACEOF
34271
34272 # The following way of writing the cache mishandles newlines in values,
34273 # but we know of no workaround that is simple, portable, and efficient.
34274 # So, we kill variables containing newlines.
34275 # Ultrix sh set writes to stderr and can't be redirected directly,
34276 # and sets the high bit in the cache file unless we assign to the vars.
34277 (
34278   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
34279     eval ac_val=\$$ac_var
34280     case $ac_val in #(
34281     *${as_nl}*)
34282       case $ac_var in #(
34283       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
34284 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
34285       esac
34286       case $ac_var in #(
34287       _ | IFS | as_nl) ;; #(
34288       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34289       *) { eval $ac_var=; unset $ac_var;} ;;
34290       esac ;;
34291     esac
34292   done
34293
34294   (set) 2>&1 |
34295     case $as_nl`(ac_space=' '; set) 2>&1` in #(
34296     *${as_nl}ac_space=\ *)
34297       # `set' does not quote correctly, so add quotes: double-quote
34298       # substitution turns \\\\ into \\, and sed turns \\ into \.
34299       sed -n \
34300         "s/'/'\\\\''/g;
34301           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34302       ;; #(
34303     *)
34304       # `set' quotes correctly as required by POSIX, so do not add quotes.
34305       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34306       ;;
34307     esac |
34308     sort
34309 ) |
34310   sed '
34311      /^ac_cv_env_/b end
34312      t clear
34313      :clear
34314      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
34315      t end
34316      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34317      :end' >>confcache
34318 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34319   if test -w "$cache_file"; then
34320     if test "x$cache_file" != "x/dev/null"; then
34321       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
34322 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
34323       if test ! -f "$cache_file" || test -h "$cache_file"; then
34324         cat confcache >"$cache_file"
34325       else
34326         case $cache_file in #(
34327         */* | ?:*)
34328           mv -f confcache "$cache_file"$$ &&
34329           mv -f "$cache_file"$$ "$cache_file" ;; #(
34330         *)
34331           mv -f confcache "$cache_file" ;;
34332         esac
34333       fi
34334     fi
34335   else
34336     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
34337 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
34338   fi
34339 fi
34340 rm -f confcache
34341
34342 test "x$prefix" = xNONE && prefix=$ac_default_prefix
34343 # Let make expand exec_prefix.
34344 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34345
34346 DEFS=-DHAVE_CONFIG_H
34347
34348 ac_libobjs=
34349 ac_ltlibobjs=
34350 U=
34351 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34352   # 1. Remove the extension, and $U if already installed.
34353   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34354   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
34355   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34356   #    will be set to the directory where LIBOBJS objects are built.
34357   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34358   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
34359 done
34360 LIBOBJS=$ac_libobjs
34361
34362 LTLIBOBJS=$ac_ltlibobjs
34363
34364
34365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
34366 printf %s "checking that generated files are newer than configure... " >&6; }
34367    if test -n "$am_sleep_pid"; then
34368      # Hide warnings about reused PIDs.
34369      wait $am_sleep_pid 2>/dev/null
34370    fi
34371    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
34372 printf "%s\n" "done" >&6; }
34373  if test -n "$EXEEXT"; then
34374   am__EXEEXT_TRUE=
34375   am__EXEEXT_FALSE='#'
34376 else
34377   am__EXEEXT_TRUE='#'
34378   am__EXEEXT_FALSE=
34379 fi
34380
34381 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
34382   as_fn_error $? "conditional \"AMDEP\" was never defined.
34383 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34384 fi
34385 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
34386   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
34387 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34388 fi
34389 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
34390   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
34391 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34392 fi
34393 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
34394   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
34395 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34396 fi
34397 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
34398 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
34399   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
34400 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34401 fi
34402 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
34403   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
34404 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34405 fi
34406 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
34407   as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
34408 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34409 fi
34410 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
34411   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
34412 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34413 fi
34414 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
34415   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
34416 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34417 fi
34418 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
34419   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
34420 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34421 fi
34422 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
34423   as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
34424 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34425 fi
34426 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
34427   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
34428 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34429 fi
34430 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
34431   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
34432 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34433 fi
34434 CONFIG_INCLUDE=lib/config.h
34435
34436 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
34437   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
34438 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34439 fi
34440 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
34441   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
34442 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34443 fi
34444 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
34445   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
34446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34447 fi
34448 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
34449   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
34450 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34451 fi
34452 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
34453   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
34454 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34455 fi
34456 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
34457   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
34458 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34459 fi
34460
34461
34462     gl_libobjs=
34463     gl_ltlibobjs=
34464     if test -n "$gl_LIBOBJS"; then
34465       # Remove the extension.
34466       sed_drop_objext='s/\.o$//;s/\.obj$//'
34467       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34468         gl_libobjs="$gl_libobjs $i.$ac_objext"
34469         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
34470       done
34471     fi
34472     gl_LIBOBJS=$gl_libobjs
34473
34474     gl_LTLIBOBJS=$gl_ltlibobjs
34475
34476
34477
34478     gltests_libobjs=
34479     gltests_ltlibobjs=
34480     if test -n "$gltests_LIBOBJS"; then
34481       # Remove the extension.
34482       sed_drop_objext='s/\.o$//;s/\.obj$//'
34483       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34484         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
34485         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
34486       done
34487     fi
34488     gltests_LIBOBJS=$gltests_libobjs
34489
34490     gltests_LTLIBOBJS=$gltests_ltlibobjs
34491
34492
34493
34494 : "${CONFIG_STATUS=./config.status}"
34495 ac_write_fail=0
34496 ac_clean_files_save=$ac_clean_files
34497 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
34499 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
34500 as_write_fail=0
34501 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
34502 #! $SHELL
34503 # Generated by $as_me.
34504 # Run this file to recreate the current configuration.
34505 # Compiler output produced by configure, useful for debugging
34506 # configure, is in config.log if it exists.
34507
34508 debug=false
34509 ac_cs_recheck=false
34510 ac_cs_silent=false
34511
34512 SHELL=\${CONFIG_SHELL-$SHELL}
34513 export SHELL
34514 _ASEOF
34515 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
34516 ## -------------------- ##
34517 ## M4sh Initialization. ##
34518 ## -------------------- ##
34519
34520 # Be more Bourne compatible
34521 DUALCASE=1; export DUALCASE # for MKS sh
34522 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
34523   emulate sh
34524   NULLCMD=:
34525   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34526   # is contrary to our usage.  Disable this feature.
34527   alias -g '${1+"$@"}'='"$@"'
34528   setopt NO_GLOB_SUBST
34529 else
34530   case `(set -o) 2>/dev/null` in #(
34531   *posix*) :
34532     set -o posix ;; #(
34533   *) :
34534      ;;
34535 esac
34536 fi
34537
34538
34539 # The user is always right.
34540 if test "${PATH_SEPARATOR+set}" != set; then
34541   PATH_SEPARATOR=:
34542   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34543     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34544       PATH_SEPARATOR=';'
34545   }
34546 fi
34547
34548
34549 # IFS
34550 # We need space, tab and new line, in precisely that order.  Quoting is
34551 # there to prevent editors from complaining about space-tab.
34552 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
34553 # splitting by setting IFS to empty value.)
34554 as_nl='
34555 '
34556 export as_nl
34557 IFS=" ""        $as_nl"
34558
34559 # Find who we are.  Look in the path if we contain no directory separator.
34560 as_myself=
34561 case $0 in #((
34562   *[\\/]* ) as_myself=$0 ;;
34563   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34564 for as_dir in $PATH
34565 do
34566   IFS=$as_save_IFS
34567   case $as_dir in #(((
34568     '') as_dir=./ ;;
34569     */) ;;
34570     *) as_dir=$as_dir/ ;;
34571   esac
34572     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
34573   done
34574 IFS=$as_save_IFS
34575
34576      ;;
34577 esac
34578 # We did not find ourselves, most probably we were run as `sh COMMAND'
34579 # in which case we are not to be found in the path.
34580 if test "x$as_myself" = x; then
34581   as_myself=$0
34582 fi
34583 if test ! -f "$as_myself"; then
34584   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34585   exit 1
34586 fi
34587
34588 # Unset variables that we do not need and which cause bugs (e.g. in
34589 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
34590 # suppresses any "Segmentation fault" message there.  '((' could
34591 # trigger a bug in pdksh 5.2.14.
34592 for as_var in BASH_ENV ENV MAIL MAILPATH
34593 do eval test x\${$as_var+set} = xset \
34594   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34595 done
34596 PS1='$ '
34597 PS2='> '
34598 PS4='+ '
34599
34600 # NLS nuisances.
34601 LC_ALL=C
34602 export LC_ALL
34603 LANGUAGE=C
34604 export LANGUAGE
34605
34606 # CDPATH.
34607 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34608
34609
34610 # as_fn_error STATUS ERROR [LINENO LOG_FD]
34611 # ----------------------------------------
34612 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34613 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34614 # script with STATUS, using 1 if that was 0.
34615 as_fn_error ()
34616 {
34617   as_status=$1; test $as_status -eq 0 && as_status=1
34618   if test "$4"; then
34619     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34620     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34621   fi
34622   printf "%s\n" "$as_me: error: $2" >&2
34623   as_fn_exit $as_status
34624 } # as_fn_error
34625
34626
34627 # as_fn_set_status STATUS
34628 # -----------------------
34629 # Set $? to STATUS, without forking.
34630 as_fn_set_status ()
34631 {
34632   return $1
34633 } # as_fn_set_status
34634
34635 # as_fn_exit STATUS
34636 # -----------------
34637 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34638 as_fn_exit ()
34639 {
34640   set +e
34641   as_fn_set_status $1
34642   exit $1
34643 } # as_fn_exit
34644
34645 # as_fn_unset VAR
34646 # ---------------
34647 # Portably unset VAR.
34648 as_fn_unset ()
34649 {
34650   { eval $1=; unset $1;}
34651 }
34652 as_unset=as_fn_unset
34653 # as_fn_append VAR VALUE
34654 # ----------------------
34655 # Append the text in VALUE to the end of the definition contained in VAR. Take
34656 # advantage of any shell optimizations that allow amortized linear growth over
34657 # repeated appends, instead of the typical quadratic growth present in naive
34658 # implementations.
34659 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34660   eval 'as_fn_append ()
34661   {
34662     eval $1+=\$2
34663   }'
34664 else
34665   as_fn_append ()
34666   {
34667     eval $1=\$$1\$2
34668   }
34669 fi # as_fn_append
34670
34671 # as_fn_arith ARG...
34672 # ------------------
34673 # Perform arithmetic evaluation on the ARGs, and store the result in the
34674 # global $as_val. Take advantage of shells that can avoid forks. The arguments
34675 # must be portable across $(()) and expr.
34676 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34677   eval 'as_fn_arith ()
34678   {
34679     as_val=$(( $* ))
34680   }'
34681 else
34682   as_fn_arith ()
34683   {
34684     as_val=`expr "$@" || test $? -eq 1`
34685   }
34686 fi # as_fn_arith
34687
34688
34689 if expr a : '\(a\)' >/dev/null 2>&1 &&
34690    test "X`expr 00001 : '.*\(...\)'`" = X001; then
34691   as_expr=expr
34692 else
34693   as_expr=false
34694 fi
34695
34696 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34697   as_basename=basename
34698 else
34699   as_basename=false
34700 fi
34701
34702 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34703   as_dirname=dirname
34704 else
34705   as_dirname=false
34706 fi
34707
34708 as_me=`$as_basename -- "$0" ||
34709 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34710          X"$0" : 'X\(//\)$' \| \
34711          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34712 printf "%s\n" X/"$0" |
34713     sed '/^.*\/\([^/][^/]*\)\/*$/{
34714             s//\1/
34715             q
34716           }
34717           /^X\/\(\/\/\)$/{
34718             s//\1/
34719             q
34720           }
34721           /^X\/\(\/\).*/{
34722             s//\1/
34723             q
34724           }
34725           s/.*/./; q'`
34726
34727 # Avoid depending upon Character Ranges.
34728 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34729 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34730 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34731 as_cr_digits='0123456789'
34732 as_cr_alnum=$as_cr_Letters$as_cr_digits
34733
34734 ECHO_C= ECHO_N= ECHO_T=
34735 case `echo -n x` in #(((((
34736 -n*)
34737   case `echo 'xy\c'` in
34738   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
34739   xy)  ECHO_C='\c';;
34740   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34741        ECHO_T=' ';;
34742   esac;;
34743 *)
34744   ECHO_N='-n';;
34745 esac
34746
34747 rm -f conf$$ conf$$.exe conf$$.file
34748 if test -d conf$$.dir; then
34749   rm -f conf$$.dir/conf$$.file
34750 else
34751   rm -f conf$$.dir
34752   mkdir conf$$.dir 2>/dev/null
34753 fi
34754 if (echo >conf$$.file) 2>/dev/null; then
34755   if ln -s conf$$.file conf$$ 2>/dev/null; then
34756     as_ln_s='ln -s'
34757     # ... but there are two gotchas:
34758     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34759     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34760     # In both cases, we have to default to `cp -pR'.
34761     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34762       as_ln_s='cp -pR'
34763   elif ln conf$$.file conf$$ 2>/dev/null; then
34764     as_ln_s=ln
34765   else
34766     as_ln_s='cp -pR'
34767   fi
34768 else
34769   as_ln_s='cp -pR'
34770 fi
34771 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34772 rmdir conf$$.dir 2>/dev/null
34773
34774
34775 # as_fn_mkdir_p
34776 # -------------
34777 # Create "$as_dir" as a directory, including parents if necessary.
34778 as_fn_mkdir_p ()
34779 {
34780
34781   case $as_dir in #(
34782   -*) as_dir=./$as_dir;;
34783   esac
34784   test -d "$as_dir" || eval $as_mkdir_p || {
34785     as_dirs=
34786     while :; do
34787       case $as_dir in #(
34788       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34789       *) as_qdir=$as_dir;;
34790       esac
34791       as_dirs="'$as_qdir' $as_dirs"
34792       as_dir=`$as_dirname -- "$as_dir" ||
34793 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34794          X"$as_dir" : 'X\(//\)[^/]' \| \
34795          X"$as_dir" : 'X\(//\)$' \| \
34796          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34797 printf "%s\n" X"$as_dir" |
34798     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34799             s//\1/
34800             q
34801           }
34802           /^X\(\/\/\)[^/].*/{
34803             s//\1/
34804             q
34805           }
34806           /^X\(\/\/\)$/{
34807             s//\1/
34808             q
34809           }
34810           /^X\(\/\).*/{
34811             s//\1/
34812             q
34813           }
34814           s/.*/./; q'`
34815       test -d "$as_dir" && break
34816     done
34817     test -z "$as_dirs" || eval "mkdir $as_dirs"
34818   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34819
34820
34821 } # as_fn_mkdir_p
34822 if mkdir -p . 2>/dev/null; then
34823   as_mkdir_p='mkdir -p "$as_dir"'
34824 else
34825   test -d ./-p && rmdir ./-p
34826   as_mkdir_p=false
34827 fi
34828
34829
34830 # as_fn_executable_p FILE
34831 # -----------------------
34832 # Test if FILE is an executable regular file.
34833 as_fn_executable_p ()
34834 {
34835   test -f "$1" && test -x "$1"
34836 } # as_fn_executable_p
34837 as_test_x='test -x'
34838 as_executable_p=as_fn_executable_p
34839
34840 # Sed expression to map a string onto a valid CPP name.
34841 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34842
34843 # Sed expression to map a string onto a valid variable name.
34844 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34845
34846
34847 exec 6>&1
34848 ## ----------------------------------- ##
34849 ## Main body of $CONFIG_STATUS script. ##
34850 ## ----------------------------------- ##
34851 _ASEOF
34852 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34853
34854 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34855 # Save the log message, to keep $0 and so on meaningful, and to
34856 # report actual input values of CONFIG_FILES etc. instead of their
34857 # values after options handling.
34858 ac_log="
34859 This file was extended by GNU diffutils $as_me 3.3, which was
34860 generated by GNU Autoconf 2.69.79-0bdae.  Invocation command line was
34861
34862   CONFIG_FILES    = $CONFIG_FILES
34863   CONFIG_HEADERS  = $CONFIG_HEADERS
34864   CONFIG_LINKS    = $CONFIG_LINKS
34865   CONFIG_COMMANDS = $CONFIG_COMMANDS
34866   $ $0 $@
34867
34868 on `(hostname || uname -n) 2>/dev/null | sed 1q`
34869 "
34870
34871 _ACEOF
34872
34873 case $ac_config_files in *"
34874 "*) set x $ac_config_files; shift; ac_config_files=$*;;
34875 esac
34876
34877 case $ac_config_headers in *"
34878 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34879 esac
34880
34881
34882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34883 # Files that config.status was made for.
34884 config_files="$ac_config_files"
34885 config_headers="$ac_config_headers"
34886 config_links="$ac_config_links"
34887 config_commands="$ac_config_commands"
34888
34889 _ACEOF
34890
34891 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34892 ac_cs_usage="\
34893 \`$as_me' instantiates files and other configuration actions
34894 from templates according to the current configuration.  Unless the files
34895 and actions are specified as TAGs, all are instantiated by default.
34896
34897 Usage: $0 [OPTION]... [TAG]...
34898
34899   -h, --help       print this help, then exit
34900   -V, --version    print version number and configuration settings, then exit
34901       --config     print configuration, then exit
34902   -q, --quiet, --silent
34903                    do not print progress messages
34904   -d, --debug      don't remove temporary files
34905       --recheck    update $as_me by reconfiguring in the same conditions
34906       --file=FILE[:TEMPLATE]
34907                    instantiate the configuration file FILE
34908       --header=FILE[:TEMPLATE]
34909                    instantiate the configuration header FILE
34910
34911 Configuration files:
34912 $config_files
34913
34914 Configuration headers:
34915 $config_headers
34916
34917 Configuration links:
34918 $config_links
34919
34920 Configuration commands:
34921 $config_commands
34922
34923 Report bugs to <bug-diffutils@gnu.org>.
34924 GNU diffutils home page: <http://www.gnu.org/software/diffutils/>.
34925 General help using GNU software: <http://www.gnu.org/gethelp/>."
34926
34927 _ACEOF
34928 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34929 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34930 ac_cs_version="\\
34931 GNU diffutils config.status 3.3
34932 configured by $0, generated by GNU Autoconf 2.69.79-0bdae,
34933   with options \\"\$ac_cs_config\\"
34934
34935 Copyright (C)  Free Software Foundation, Inc.
34936 This config.status script is free software; the Free Software Foundation
34937 gives unlimited permission to copy, distribute and modify it."
34938
34939 ac_pwd='$ac_pwd'
34940 srcdir='$srcdir'
34941 INSTALL='$INSTALL'
34942 MKDIR_P='$MKDIR_P'
34943 AWK='$AWK'
34944 test -n "\$AWK" || AWK=awk
34945 _ACEOF
34946
34947 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34948 # The default lists apply if the user does not specify any file.
34949 ac_need_defaults=:
34950 while test $# != 0
34951 do
34952   case $1 in
34953   --*=?*)
34954     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34955     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34956     ac_shift=:
34957     ;;
34958   --*=)
34959     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34960     ac_optarg=
34961     ac_shift=:
34962     ;;
34963   *)
34964     ac_option=$1
34965     ac_optarg=$2
34966     ac_shift=shift
34967     ;;
34968   esac
34969
34970   case $ac_option in
34971   # Handling of the options.
34972   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34973     ac_cs_recheck=: ;;
34974   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34975     printf "%s\n" "$ac_cs_version"; exit ;;
34976   --config | --confi | --conf | --con | --co | --c )
34977     printf "%s\n" "$ac_cs_config"; exit ;;
34978   --debug | --debu | --deb | --de | --d | -d )
34979     debug=: ;;
34980   --file | --fil | --fi | --f )
34981     $ac_shift
34982     case $ac_optarg in
34983     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34984     '') as_fn_error $? "missing file argument" ;;
34985     esac
34986     as_fn_append CONFIG_FILES " '$ac_optarg'"
34987     ac_need_defaults=false;;
34988   --header | --heade | --head | --hea )
34989     $ac_shift
34990     case $ac_optarg in
34991     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34992     esac
34993     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34994     ac_need_defaults=false;;
34995   --he | --h)
34996     # Conflict between --help and --header
34997     as_fn_error $? "ambiguous option: \`$1'
34998 Try \`$0 --help' for more information.";;
34999   --help | --hel | -h )
35000     printf "%s\n" "$ac_cs_usage"; exit ;;
35001   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
35002   | -silent | --silent | --silen | --sile | --sil | --si | --s)
35003     ac_cs_silent=: ;;
35004
35005   # This is an error.
35006   -*) as_fn_error $? "unrecognized option: \`$1'
35007 Try \`$0 --help' for more information." ;;
35008
35009   *) as_fn_append ac_config_targets " $1"
35010      ac_need_defaults=false ;;
35011
35012   esac
35013   shift
35014 done
35015
35016 ac_configure_extra_args=
35017
35018 if $ac_cs_silent; then
35019   exec 6>/dev/null
35020   ac_configure_extra_args="$ac_configure_extra_args --silent"
35021 fi
35022
35023 _ACEOF
35024 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35025 if \$ac_cs_recheck; then
35026   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
35027   shift
35028   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
35029   CONFIG_SHELL='$SHELL'
35030   export CONFIG_SHELL
35031   exec "\$@"
35032 fi
35033
35034 _ACEOF
35035 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35036 exec 5>>config.log
35037 {
35038   echo
35039   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
35040 ## Running $as_me. ##
35041 _ASBOX
35042   printf "%s\n" "$ac_log"
35043 } >&5
35044
35045 _ACEOF
35046 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35047 #
35048 # INIT-COMMANDS
35049 #
35050 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
35051 GNUmakefile=$GNUmakefile
35052 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
35053     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
35054     # from automake < 1.5.
35055     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
35056     # Capture the value of LINGUAS because we need it to compute CATALOGS.
35057     LINGUAS="${LINGUAS-%UNSET%}"
35058
35059
35060 _ACEOF
35061
35062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35063
35064 # Handling of arguments.
35065 for ac_config_target in $ac_config_targets
35066 do
35067   case $ac_config_target in
35068     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
35069     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
35070     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
35071     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
35072     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
35073     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
35074     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
35075     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
35076     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
35077     "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
35078     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
35079     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
35080
35081   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
35082   esac
35083 done
35084
35085
35086 # If the user did not use the arguments to specify the items to instantiate,
35087 # then the envvar interface is used.  Set only those that are not.
35088 # We use the long form for the default assignment because of an extremely
35089 # bizarre bug on SunOS 4.1.3.
35090 if $ac_need_defaults; then
35091   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
35092   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
35093   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
35094   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
35095 fi
35096
35097 # Have a temporary directory for convenience.  Make it in the build tree
35098 # simply because there is no reason against having it here, and in addition,
35099 # creating and moving files from /tmp can sometimes cause problems.
35100 # Hook for its removal unless debugging.
35101 # Note that there is a small window in which the directory will not be cleaned:
35102 # after its creation but before its name has been assigned to `$tmp'.
35103 $debug ||
35104 {
35105   tmp= ac_tmp=
35106   trap 'exit_status=$?
35107   : "${ac_tmp:=$tmp}"
35108   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
35109 ' 0
35110   trap 'as_fn_exit 1' 1 2 13 15
35111 }
35112 # Create a (secure) tmp directory for tmp files.
35113
35114 {
35115   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
35116   test -d "$tmp"
35117 }  ||
35118 {
35119   tmp=./conf$$-$RANDOM
35120   (umask 077 && mkdir "$tmp")
35121 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
35122 ac_tmp=$tmp
35123
35124 # Set up the scripts for CONFIG_FILES section.
35125 # No need to generate them if there are no CONFIG_FILES.
35126 # This happens for instance with `./config.status config.h'.
35127 if test -n "$CONFIG_FILES"; then
35128
35129
35130 ac_cr=`echo X | tr X '\015'`
35131 # On cygwin, bash can eat \r inside `` if the user requested igncr.
35132 # But we know of no other shell where ac_cr would be empty at this
35133 # point, so we can use a bashism as a fallback.
35134 if test "x$ac_cr" = x; then
35135   eval ac_cr=\$\'\\r\'
35136 fi
35137 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
35138 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
35139   ac_cs_awk_cr='\\r'
35140 else
35141   ac_cs_awk_cr=$ac_cr
35142 fi
35143
35144 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
35145 _ACEOF
35146
35147
35148 {
35149   echo "cat >conf$$subs.awk <<_ACEOF" &&
35150   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
35151   echo "_ACEOF"
35152 } >conf$$subs.sh ||
35153   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35154 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
35155 ac_delim='%!_!# '
35156 for ac_last_try in false false false false false :; do
35157   . ./conf$$subs.sh ||
35158     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35159
35160   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
35161   if test $ac_delim_n = $ac_delim_num; then
35162     break
35163   elif $ac_last_try; then
35164     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35165   else
35166     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35167   fi
35168 done
35169 rm -f conf$$subs.sh
35170
35171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35172 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
35173 _ACEOF
35174 sed -n '
35175 h
35176 s/^/S["/; s/!.*/"]=/
35177 p
35178 g
35179 s/^[^!]*!//
35180 :repl
35181 t repl
35182 s/'"$ac_delim"'$//
35183 t delim
35184 :nl
35185 h
35186 s/\(.\{148\}\)..*/\1/
35187 t more1
35188 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
35189 p
35190 n
35191 b repl
35192 :more1
35193 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35194 p
35195 g
35196 s/.\{148\}//
35197 t nl
35198 :delim
35199 h
35200 s/\(.\{148\}\)..*/\1/
35201 t more2
35202 s/["\\]/\\&/g; s/^/"/; s/$/"/
35203 p
35204 b
35205 :more2
35206 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35207 p
35208 g
35209 s/.\{148\}//
35210 t delim
35211 ' <conf$$subs.awk | sed '
35212 /^[^""]/{
35213   N
35214   s/\n//
35215 }
35216 ' >>$CONFIG_STATUS || ac_write_fail=1
35217 rm -f conf$$subs.awk
35218 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35219 _ACAWK
35220 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
35221   for (key in S) S_is_set[key] = 1
35222   FS = "\a"
35223
35224 }
35225 {
35226   line = $ 0
35227   nfields = split(line, field, "@")
35228   substed = 0
35229   len = length(field[1])
35230   for (i = 2; i < nfields; i++) {
35231     key = field[i]
35232     keylen = length(key)
35233     if (S_is_set[key]) {
35234       value = S[key]
35235       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
35236       len += length(value) + length(field[++i])
35237       substed = 1
35238     } else
35239       len += 1 + keylen
35240   }
35241
35242   print line
35243 }
35244
35245 _ACAWK
35246 _ACEOF
35247 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35248 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
35249   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
35250 else
35251   cat
35252 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
35253   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
35254 _ACEOF
35255
35256 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
35257 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
35258 # trailing colons and then remove the whole line if VPATH becomes empty
35259 # (actually we leave an empty line to preserve line numbers).
35260 if test "x$srcdir" = x.; then
35261   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
35262 h
35263 s///
35264 s/^/:/
35265 s/[      ]*$/:/
35266 s/:\$(srcdir):/:/g
35267 s/:\${srcdir}:/:/g
35268 s/:@srcdir@:/:/g
35269 s/^:*//
35270 s/:*$//
35271 x
35272 s/\(=[   ]*\).*/\1/
35273 G
35274 s/\n//
35275 s/^[^=]*=[       ]*$//
35276 }'
35277 fi
35278
35279 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35280 fi # test -n "$CONFIG_FILES"
35281
35282 # Set up the scripts for CONFIG_HEADERS section.
35283 # No need to generate them if there are no CONFIG_HEADERS.
35284 # This happens for instance with `./config.status Makefile'.
35285 if test -n "$CONFIG_HEADERS"; then
35286 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
35287 BEGIN {
35288 _ACEOF
35289
35290 # Transform confdefs.h into an awk script `defines.awk', embedded as
35291 # here-document in config.status, that substitutes the proper values into
35292 # config.h.in to produce config.h.
35293
35294 # Create a delimiter string that does not exist in confdefs.h, to ease
35295 # handling of long lines.
35296 ac_delim='%!_!# '
35297 for ac_last_try in false false :; do
35298   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
35299   if test -z "$ac_tt"; then
35300     break
35301   elif $ac_last_try; then
35302     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
35303   else
35304     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35305   fi
35306 done
35307
35308 # For the awk script, D is an array of macro values keyed by name,
35309 # likewise P contains macro parameters if any.  Preserve backslash
35310 # newline sequences.
35311
35312 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
35313 sed -n '
35314 s/.\{148\}/&'"$ac_delim"'/g
35315 t rset
35316 :rset
35317 s/^[     ]*#[    ]*define[       ][      ]*/ /
35318 t def
35319 d
35320 :def
35321 s/\\$//
35322 t bsnl
35323 s/["\\]/\\&/g
35324 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
35325 D["\1"]=" \3"/p
35326 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
35327 d
35328 :bsnl
35329 s/["\\]/\\&/g
35330 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
35331 D["\1"]=" \3\\\\\\n"\\/p
35332 t cont
35333 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
35334 t cont
35335 d
35336 :cont
35337 n
35338 s/.\{148\}/&'"$ac_delim"'/g
35339 t clear
35340 :clear
35341 s/\\$//
35342 t bsnlc
35343 s/["\\]/\\&/g; s/^/"/; s/$/"/p
35344 d
35345 :bsnlc
35346 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
35347 b cont
35348 ' <confdefs.h | sed '
35349 s/'"$ac_delim"'/"\\\
35350 "/g' >>$CONFIG_STATUS || ac_write_fail=1
35351
35352 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35353   for (key in D) D_is_set[key] = 1
35354   FS = "\a"
35355 }
35356 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
35357   line = \$ 0
35358   split(line, arg, " ")
35359   if (arg[1] == "#") {
35360     defundef = arg[2]
35361     mac1 = arg[3]
35362   } else {
35363     defundef = substr(arg[1], 2)
35364     mac1 = arg[2]
35365   }
35366   split(mac1, mac2, "(") #)
35367   macro = mac2[1]
35368   prefix = substr(line, 1, index(line, defundef) - 1)
35369   if (D_is_set[macro]) {
35370     # Preserve the white space surrounding the "#".
35371     print prefix "define", macro P[macro] D[macro]
35372     next
35373   } else {
35374     # Replace #undef with comments.  This is necessary, for example,
35375     # in the case of _POSIX_SOURCE, which is predefined and required
35376     # on some systems where configure will not decide to define it.
35377     if (defundef == "undef") {
35378       print "/*", prefix defundef, macro, "*/"
35379       next
35380     }
35381   }
35382 }
35383 { print }
35384 _ACAWK
35385 _ACEOF
35386 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35387   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
35388 fi # test -n "$CONFIG_HEADERS"
35389
35390
35391 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
35392 shift
35393 for ac_tag
35394 do
35395   case $ac_tag in
35396   :[FHLC]) ac_mode=$ac_tag; continue;;
35397   esac
35398   case $ac_mode$ac_tag in
35399   :[FHL]*:*);;
35400   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
35401   :[FH]-) ac_tag=-:-;;
35402   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
35403   esac
35404   ac_save_IFS=$IFS
35405   IFS=:
35406   set x $ac_tag
35407   IFS=$ac_save_IFS
35408   shift
35409   ac_file=$1
35410   shift
35411
35412   case $ac_mode in
35413   :L) ac_source=$1;;
35414   :[FH])
35415     ac_file_inputs=
35416     for ac_f
35417     do
35418       case $ac_f in
35419       -) ac_f="$ac_tmp/stdin";;
35420       *) # Look for the file first in the build tree, then in the source tree
35421          # (if the path is not absolute).  The absolute path cannot be DOS-style,
35422          # because $ac_f cannot contain `:'.
35423          test -f "$ac_f" ||
35424            case $ac_f in
35425            [\\/$]*) false;;
35426            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
35427            esac ||
35428            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
35429       esac
35430       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
35431       as_fn_append ac_file_inputs " '$ac_f'"
35432     done
35433
35434     # Let's still pretend it is `configure' which instantiates (i.e., don't
35435     # use $as_me), people would be surprised to read:
35436     #    /* config.h.  Generated by config.status.  */
35437     configure_input='Generated from '`
35438           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
35439         `' by configure.'
35440     if test x"$ac_file" != x-; then
35441       configure_input="$ac_file.  $configure_input"
35442       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
35443 printf "%s\n" "$as_me: creating $ac_file" >&6;}
35444     fi
35445     # Neutralize special characters interpreted by sed in replacement strings.
35446     case $configure_input in #(
35447     *\&* | *\|* | *\\* )
35448        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
35449        sed 's/[\\\\&|]/\\\\&/g'`;; #(
35450     *) ac_sed_conf_input=$configure_input;;
35451     esac
35452
35453     case $ac_tag in
35454     *:-:* | *:-) cat >"$ac_tmp/stdin" \
35455       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
35456     esac
35457     ;;
35458   esac
35459
35460   ac_dir=`$as_dirname -- "$ac_file" ||
35461 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35462          X"$ac_file" : 'X\(//\)[^/]' \| \
35463          X"$ac_file" : 'X\(//\)$' \| \
35464          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
35465 printf "%s\n" X"$ac_file" |
35466     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35467             s//\1/
35468             q
35469           }
35470           /^X\(\/\/\)[^/].*/{
35471             s//\1/
35472             q
35473           }
35474           /^X\(\/\/\)$/{
35475             s//\1/
35476             q
35477           }
35478           /^X\(\/\).*/{
35479             s//\1/
35480             q
35481           }
35482           s/.*/./; q'`
35483   as_dir="$ac_dir"; as_fn_mkdir_p
35484   ac_builddir=.
35485
35486 case "$ac_dir" in
35487 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35488 *)
35489   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
35490   # A ".." for each directory in $ac_dir_suffix.
35491   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35492   case $ac_top_builddir_sub in
35493   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35494   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35495   esac ;;
35496 esac
35497 ac_abs_top_builddir=$ac_pwd
35498 ac_abs_builddir=$ac_pwd$ac_dir_suffix
35499 # for backward compatibility:
35500 ac_top_builddir=$ac_top_build_prefix
35501
35502 case $srcdir in
35503   .)  # We are building in place.
35504     ac_srcdir=.
35505     ac_top_srcdir=$ac_top_builddir_sub
35506     ac_abs_top_srcdir=$ac_pwd ;;
35507   [\\/]* | ?:[\\/]* )  # Absolute name.
35508     ac_srcdir=$srcdir$ac_dir_suffix;
35509     ac_top_srcdir=$srcdir
35510     ac_abs_top_srcdir=$srcdir ;;
35511   *) # Relative name.
35512     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35513     ac_top_srcdir=$ac_top_build_prefix$srcdir
35514     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35515 esac
35516 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35517
35518
35519   case $ac_mode in
35520   :F)
35521   #
35522   # CONFIG_FILE
35523   #
35524
35525   case $INSTALL in
35526   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
35527   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
35528   esac
35529   ac_MKDIR_P=$MKDIR_P
35530   case $MKDIR_P in
35531   [\\/$]* | ?:[\\/]* ) ;;
35532   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
35533   esac
35534 _ACEOF
35535
35536 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35537 # If the template does not know about datarootdir, expand it.
35538 # FIXME: This hack should be removed a few years after 2.60.
35539 ac_datarootdir_hack=; ac_datarootdir_seen=
35540 ac_sed_dataroot='
35541 /datarootdir/ {
35542   p
35543   q
35544 }
35545 /@datadir@/p
35546 /@docdir@/p
35547 /@infodir@/p
35548 /@localedir@/p
35549 /@mandir@/p'
35550 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35551 *datarootdir*) ac_datarootdir_seen=yes;;
35552 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35553   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35554 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35555 _ACEOF
35556 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35557   ac_datarootdir_hack='
35558   s&@datadir@&$datadir&g
35559   s&@docdir@&$docdir&g
35560   s&@infodir@&$infodir&g
35561   s&@localedir@&$localedir&g
35562   s&@mandir@&$mandir&g
35563   s&\\\${datarootdir}&$datarootdir&g' ;;
35564 esac
35565 _ACEOF
35566
35567 # Neutralize VPATH when `$srcdir' = `.'.
35568 # Shell code in configure.ac might set extrasub.
35569 # FIXME: do we really want to maintain this feature?
35570 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35571 ac_sed_extra="$ac_vpsub
35572 $extrasub
35573 _ACEOF
35574 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35575 :t
35576 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35577 s|@configure_input@|$ac_sed_conf_input|;t t
35578 s&@top_builddir@&$ac_top_builddir_sub&;t t
35579 s&@top_build_prefix@&$ac_top_build_prefix&;t t
35580 s&@srcdir@&$ac_srcdir&;t t
35581 s&@abs_srcdir@&$ac_abs_srcdir&;t t
35582 s&@top_srcdir@&$ac_top_srcdir&;t t
35583 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35584 s&@builddir@&$ac_builddir&;t t
35585 s&@abs_builddir@&$ac_abs_builddir&;t t
35586 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35587 s&@INSTALL@&$ac_INSTALL&;t t
35588 s&@MKDIR_P@&$ac_MKDIR_P&;t t
35589 $ac_datarootdir_hack
35590 "
35591 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
35592   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35593
35594 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35595   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
35596   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
35597       "$ac_tmp/out"`; test -z "$ac_out"; } &&
35598   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35599 which seems to be undefined.  Please make sure it is defined" >&5
35600 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35601 which seems to be undefined.  Please make sure it is defined" >&2;}
35602
35603   rm -f "$ac_tmp/stdin"
35604   case $ac_file in
35605   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
35606   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
35607   esac \
35608   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35609  ;;
35610   :H)
35611   #
35612   # CONFIG_HEADER
35613   #
35614   if test x"$ac_file" != x-; then
35615     {
35616       printf "%s\n" "/* $configure_input  */" \
35617       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
35618     } >"$ac_tmp/config.h" \
35619       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35620     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
35621       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35622 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
35623     else
35624       rm -f "$ac_file"
35625       mv "$ac_tmp/config.h" "$ac_file" \
35626         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35627     fi
35628   else
35629     printf "%s\n" "/* $configure_input  */" \
35630       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
35631       || as_fn_error $? "could not create -" "$LINENO" 5
35632   fi
35633 # Compute "$ac_file"'s index in $config_headers.
35634 _am_arg="$ac_file"
35635 _am_stamp_count=1
35636 for _am_header in $config_headers :; do
35637   case $_am_header in
35638     $_am_arg | $_am_arg:* )
35639       break ;;
35640     * )
35641       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
35642   esac
35643 done
35644 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
35645 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35646          X"$_am_arg" : 'X\(//\)[^/]' \| \
35647          X"$_am_arg" : 'X\(//\)$' \| \
35648          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
35649 printf "%s\n" X"$_am_arg" |
35650     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35651             s//\1/
35652             q
35653           }
35654           /^X\(\/\/\)[^/].*/{
35655             s//\1/
35656             q
35657           }
35658           /^X\(\/\/\)$/{
35659             s//\1/
35660             q
35661           }
35662           /^X\(\/\).*/{
35663             s//\1/
35664             q
35665           }
35666           s/.*/./; q'`/stamp-h$_am_stamp_count
35667  ;;
35668   :L)
35669   #
35670   # CONFIG_LINK
35671   #
35672
35673   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
35674     :
35675   else
35676     # Prefer the file from the source tree if names are identical.
35677     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
35678       ac_source=$srcdir/$ac_source
35679     fi
35680
35681     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
35682 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
35683
35684     if test ! -r "$ac_source"; then
35685       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
35686     fi
35687     rm -f "$ac_file"
35688
35689     # Try a relative symlink, then a hard link, then a copy.
35690     case $ac_source in
35691     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
35692         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
35693     esac
35694     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
35695       ln "$ac_source" "$ac_file" 2>/dev/null ||
35696       cp -p "$ac_source" "$ac_file" ||
35697       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
35698   fi
35699  ;;
35700   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
35701 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
35702  ;;
35703   esac
35704
35705
35706   case $ac_file$ac_mode in
35707     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
35708   # Older Autoconf quotes --file arguments for eval, but not when files
35709   # are listed without --file.  Let's play safe and only enable the eval
35710   # if we detect the quoting.
35711   case $CONFIG_FILES in
35712   *\'*) eval set x "$CONFIG_FILES" ;;
35713   *)   set x $CONFIG_FILES ;;
35714   esac
35715   shift
35716   for mf
35717   do
35718     # Strip MF so we end up with the name of the file.
35719     mf=`echo "$mf" | sed -e 's/:.*$//'`
35720     # Check whether this is an Automake generated Makefile or not.
35721     # We used to match only the files named 'Makefile.in', but
35722     # some people rename them; so instead we look at the file content.
35723     # Grep'ing the first line is not enough: some people post-process
35724     # each Makefile.in and add a new line on top of each file to say so.
35725     # Grep'ing the whole file is not good either: AIX grep has a line
35726     # limit of 2048, but all sed's we know have understand at least 4000.
35727     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
35728       dirpart=`$as_dirname -- "$mf" ||
35729 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35730          X"$mf" : 'X\(//\)[^/]' \| \
35731          X"$mf" : 'X\(//\)$' \| \
35732          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
35733 printf "%s\n" X"$mf" |
35734     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35735             s//\1/
35736             q
35737           }
35738           /^X\(\/\/\)[^/].*/{
35739             s//\1/
35740             q
35741           }
35742           /^X\(\/\/\)$/{
35743             s//\1/
35744             q
35745           }
35746           /^X\(\/\).*/{
35747             s//\1/
35748             q
35749           }
35750           s/.*/./; q'`
35751     else
35752       continue
35753     fi
35754     # Extract the definition of DEPDIR, am__include, and am__quote
35755     # from the Makefile without running 'make'.
35756     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
35757     test -z "$DEPDIR" && continue
35758     am__include=`sed -n 's/^am__include = //p' < "$mf"`
35759     test -z "am__include" && continue
35760     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
35761     # Find all dependency output files, they are included files with
35762     # $(DEPDIR) in their names.  We invoke sed twice because it is the
35763     # simplest approach to changing $(DEPDIR) to its actual value in the
35764     # expansion.
35765     for file in `sed -n "
35766       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
35767          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
35768       # Make sure the directory exists.
35769       test -f "$dirpart/$file" && continue
35770       fdir=`$as_dirname -- "$file" ||
35771 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35772          X"$file" : 'X\(//\)[^/]' \| \
35773          X"$file" : 'X\(//\)$' \| \
35774          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
35775 printf "%s\n" X"$file" |
35776     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35777             s//\1/
35778             q
35779           }
35780           /^X\(\/\/\)[^/].*/{
35781             s//\1/
35782             q
35783           }
35784           /^X\(\/\/\)$/{
35785             s//\1/
35786             q
35787           }
35788           /^X\(\/\).*/{
35789             s//\1/
35790             q
35791           }
35792           s/.*/./; q'`
35793       as_dir=$dirpart/$fdir; as_fn_mkdir_p
35794       # echo "creating $dirpart/$file"
35795       echo '# dummy' > "$dirpart/$file"
35796     done
35797   done
35798 }
35799  ;;
35800     "po-directories":C)
35801     for ac_file in $CONFIG_FILES; do
35802       # Support "outfile[:infile[:infile...]]"
35803       case "$ac_file" in
35804         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
35805       esac
35806       # PO directories have a Makefile.in generated from Makefile.in.in.
35807       case "$ac_file" in */Makefile.in)
35808         # Adjust a relative srcdir.
35809         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
35810         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
35811         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
35812         # In autoconf-2.13 it is called $ac_given_srcdir.
35813         # In autoconf-2.50 it is called $srcdir.
35814         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
35815         case "$ac_given_srcdir" in
35816           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
35817           /*) top_srcdir="$ac_given_srcdir" ;;
35818           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
35819         esac
35820         # Treat a directory as a PO directory if and only if it has a
35821         # POTFILES.in file. This allows packages to have multiple PO
35822         # directories under different names or in different locations.
35823         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
35824           rm -f "$ac_dir/POTFILES"
35825           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
35826           gt_tab=`printf '\t'`
35827           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"
35828           POMAKEFILEDEPS="POTFILES.in"
35829           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
35830           # on $ac_dir but don't depend on user-specified configuration
35831           # parameters.
35832           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
35833             # The LINGUAS file contains the set of available languages.
35834             if test -n "$OBSOLETE_ALL_LINGUAS"; then
35835               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
35836             fi
35837             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
35838             # Hide the ALL_LINGUAS assignment from automake < 1.5.
35839             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
35840             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
35841           else
35842             # The set of available languages was given in configure.in.
35843             # Hide the ALL_LINGUAS assignment from automake < 1.5.
35844             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
35845           fi
35846           # Compute POFILES
35847           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
35848           # Compute UPDATEPOFILES
35849           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
35850           # Compute DUMMYPOFILES
35851           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
35852           # Compute GMOFILES
35853           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
35854           case "$ac_given_srcdir" in
35855             .) srcdirpre= ;;
35856             *) srcdirpre='$(srcdir)/' ;;
35857           esac
35858           POFILES=
35859           UPDATEPOFILES=
35860           DUMMYPOFILES=
35861           GMOFILES=
35862           for lang in $ALL_LINGUAS; do
35863             POFILES="$POFILES $srcdirpre$lang.po"
35864             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
35865             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
35866             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
35867           done
35868           # CATALOGS depends on both $ac_dir and the user's LINGUAS
35869           # environment variable.
35870           INST_LINGUAS=
35871           if test -n "$ALL_LINGUAS"; then
35872             for presentlang in $ALL_LINGUAS; do
35873               useit=no
35874               if test "%UNSET%" != "$LINGUAS"; then
35875                 desiredlanguages="$LINGUAS"
35876               else
35877                 desiredlanguages="$ALL_LINGUAS"
35878               fi
35879               for desiredlang in $desiredlanguages; do
35880                 # Use the presentlang catalog if desiredlang is
35881                 #   a. equal to presentlang, or
35882                 #   b. a variant of presentlang (because in this case,
35883                 #      presentlang can be used as a fallback for messages
35884                 #      which are not translated in the desiredlang catalog).
35885                 case "$desiredlang" in
35886                   "$presentlang"*) useit=yes;;
35887                 esac
35888               done
35889               if test $useit = yes; then
35890                 INST_LINGUAS="$INST_LINGUAS $presentlang"
35891               fi
35892             done
35893           fi
35894           CATALOGS=
35895           if test -n "$INST_LINGUAS"; then
35896             for lang in $INST_LINGUAS; do
35897               CATALOGS="$CATALOGS $lang.gmo"
35898             done
35899           fi
35900           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
35901           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"
35902           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
35903             if test -f "$f"; then
35904               case "$f" in
35905                 *.orig | *.bak | *~) ;;
35906                 *) cat "$f" >> "$ac_dir/Makefile" ;;
35907               esac
35908             fi
35909           done
35910         fi
35911         ;;
35912       esac
35913     done ;;
35914
35915   esac
35916 done # for ac_tag
35917
35918
35919 as_fn_exit 0
35920 _ACEOF
35921 ac_clean_files=$ac_clean_files_save
35922
35923 test $ac_write_fail = 0 ||
35924   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35925
35926
35927 # configure is writing to config.log, and then calls config.status.
35928 # config.status does its own redirection, appending to config.log.
35929 # Unfortunately, on DOS this fails, as config.log is still kept open
35930 # by configure, so config.status won't be able to write to it; its
35931 # output is simply discarded.  So we exec the FD to /dev/null,
35932 # effectively closing config.log, so it can be properly (re)opened and
35933 # appended to by config.status.  When coming back to configure, we
35934 # need to make the FD available again.
35935 if test "$no_create" != yes; then
35936   ac_cs_success=:
35937   ac_config_status_args=
35938   test "$silent" = yes &&
35939     ac_config_status_args="$ac_config_status_args --quiet"
35940   exec 5>/dev/null
35941   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35942   exec 5>>config.log
35943   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35944   # would make configure fail if this is the last instruction.
35945   $ac_cs_success || as_fn_exit 1
35946 fi
35947 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35948   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35949 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35950 fi
35951